ifcopenshell.api.alignment.add_stationing_referent

Module Contents

ifcopenshell.api.alignment.add_stationing_referent.add_stationing_referent(file: ifcopenshell.file, name: str, alignment: ifcopenshell.entity_instance, distance_along: float, station: float, incoming_station: float | None = None, has_increasing_station: bool | None = None, on_basis_curve: bool | None = None) → ifcopenshell.entity_instance

Adds an IfcReferent to the alignment that defines the stationing system.

Call this once with distance_along=0.0 to define the starting station, and again for each station equation. If the alignment has no geometry yet, the referent is placed with an IfcLocalPlacement at the global origin; once the basis curve has real segments it is placed with an IfcLinearPlacement at distance_along on that curve. create_representation() restates an origin-placed starting referent onto the curve when geometry is added later.

Parameters:
  • name – name to assign to IfcReferent.Name, typically a stringized version of the station value

  • alignment – the alignment to receive the referent

  • distance_along – distance along the alignment basis curve

  • station – station value

  • incoming_station – station value of the incoming segment, only set to specify a station equation

  • has_increasing_station – sets Pset_Stationing.HasIncreasingStation, which records the direction of stationing for the referents nested after this one. Leave None (the default) or pass True for the common case where station values increase with distance along; pass False on the starting referent of a reverse-stationed alignment, where station values decrease as distance along increases.

  • on_basis_curve – whether the referent is positioned on the basis curve or the alignment curve, if None the function will default to the basis curve

Returns:

referent

Example:

alignment = model.by_type("IfcAlignment")[0]
ifcopenshell.api.alignment.add_stationing_referent(model,name="1+00.0",alignment=alignment,distance_along=0.0,station=100.0)