ifcopenshell.api.alignment.create_representation¶
Module Contents¶
- ifcopenshell.api.alignment.create_representation.create_representation(file: ifcopenshell.file, alignment: ifcopenshell.entity_instance) None¶
Creates the geometric representation of an alignment if it does not already exist. This function is intended to be used when a model has only the semantic definition of an alignment and you want to add the geometric representation.
If the alignments are complete, it is recommended that add_zero_length_segment is called before this method to ensure the proper structure of the semantic and geometric definitions of the alignment.
It is presumed that the alignment does not have any geometric representation. However, if the alignment has stationing defined, the referent defining the stationing is not related to the alignment geometry (it can’t be because the geometry doesn’t exist yet). When the geometric representation is created, the referent is updated to have an IfcLinearPlacement that references the basis curve geometry. This function assumes the referent defines the stationing at the start of the alignment, and therefore sets the IfcLinearPlacement.RelativePlacement.Location.DistanceAlong to 0.0.
- Parameters:
alignment – The alignment to create the representation.