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, start_station: float = 0.0) 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.
If geometric representations are created, the alignment stationing referent is also created using the start_station value. IfcReferent.ObjectPlacement is required for linear positiion elements and IfcLinearPlacement is defined relative to alignment curve geometry.
- 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
start_station – station value at the start of the alignment.
- Returns:
Returns an IfcAlignment