ifcopenshell.api.alignment.create¶
Module Contents¶
- ifcopenshell.api.alignment.create.create(file: ifcopenshell.file, name: str, include_vertical: bool = False, include_cant: bool = False, include_geometry: bool = True) ifcopenshell.entity_instance¶
Creates a new alignment with a horizontal layout. Optionally, vertical and cant layouts can be created as well. The geometric representations are created as well, unless they are explicitly excluded. Zero length segments are added at the end of the layouts and geometric representations. The alignment is automatically aggreated to the project if it exists.
- Use get_horizontal_layout(alignment), get_vertical_layout(alignment) and get_cant_layout(alignment) to get the
corresponding IfcAlignmentHorizontal, IfcAlignmentVertical, and IfcAlignmentCant layout entities.
If the alignment has Viennese Bend transition curves, create the segments in the cant layout before the horizontal layout using create_layout_segment(). The horizontal geometry in the Viennese Bend transition curves depends on the Viennese Bend cant parameters. create_layout_segment() automatically creates the geometric representation from the semantic definition. The horizontal segment geometric representation will fail if the cant segment is not defined.
This function does not define the alignment’s stationing. Call add_stationing_referent() once the layout segments (and therefore the basis curve geometry) exist to place the starting-station IfcReferent, and again for any station equations. Until stationing is defined, get_alignment_start_station() reports 0.0.
- Parameters:
file
name – name assigned to IfcAlignment.Name
include_vertical – If True, IfcAlignmentVertical is created. IfcGradientCurve is created if include_geometry is True
include_cant – If True, IfcAlignmentCant is created. IfcSegmentedReferenceCurve is created if include_geometry is True
include_geometry – If True, the geometric representations are added
- Returns:
Returns an IfcAlignment