ifcopenshell.api.alignment.distance_along_from_station

Module Contents

ifcopenshell.api.alignment.distance_along_from_station.distance_along_from_station(file: ifcopenshell.file, alignment: ifcopenshell.entity_instance, station: float) float

Given a station, returns the distance along the horizontal alignment.

If the alignment does not have stationing defined with an IfcReferent, the start of the alignment is assumed to be at station 0.0. That is, the station is the distance along.

Note

The current implementation does not account for station equations and assumes stationing is increasing along the alignment.

Parameters:
  • alignment – the alignment

  • station – station value

Returns:

distance along the horizontal alignment

Example:

alignment = model.by_type("IfcAlignment")[0] # alignment with start station 1+00.00
dist_along = ifcopenshell.api.alignment.distance_along_from_station(model,alignment=alignment,station=200.0)
print(dist_along) # 100.00