ifcopenshell.api.alignment.add_vertical_alignment
¶
Module Contents¶
- ifcopenshell.api.alignment.add_vertical_alignment.add_vertical_alignment(file: ifcopenshell.file, parent_alignment: ifcopenshell.entity_instance, vertical_alignment: ifcopenshell.entity_instance) None ¶
Adds a vertical alignment to a previously created alignment.
If this is the first vertical alignment assigned to the parent_alignment the IFC CT 4.1.4.4.1.1 Alignment Layout - Horizontal, Vertical and Cant is followed. If this is the second or subsequent vertical alignment assigned to the parent_alignment the IFC CT 4.1.4.4.1.2 Alignment Layout - Reusing Horizontal Layout is followed.
When the second vertical alignment is added, the structure of the IFC model must transition from one concept template to the other. Specifically, the following occurs:
The first child IfcAlignment is created and is IfcRelAggregates with the parent alignment.
The first vertical alignment is unassigned from the IfcRelNests of the parent alignment and assigned to the new child alignment IfcRelNests
A second child IfcAlignment is created ant is is IfcRelAggregates with the parent alignment.
The vertical_alignment is assigned to the second child alignment
For the third and subsequent vertical alignments, a new child alignment is created and aggregated to the parent alignment and an IfcAlignmentVertical is created from vpoints and lengths and assigned to the new child alignment.
If the parent_alignment has a geometric representation, a geometric representation will be created for the vertical alignment.
- Parameters:
parent_alignment – The parent alignment
vertical_alignment – The vertical alignment to be added
- Returns:
None