ifcopenshell.api.alignment.update_alignment_parameter_segment_tags

Module Contents

ifcopenshell.api.alignment.update_alignment_parameter_segment_tags.update_alignment_parameter_segment_tags(file: ifcopenshell.file, layout: ifcopenshell.entity_instance, label_end_tag: bool = False) → None

Sets IfcAlignmentParameterSegment.StartTag (and, optionally, EndTag) for every segment transition in an alignment layout. Unlike update_key_point_referents, this does not create any IfcReferent or IfcRelNests – it only mutates the StartTag/EndTag string attributes already present on each segment’s DesignParameters.

Every real segment’s StartTag is set to a computed tag describing the point where it begins, using the same label-and-station format as update_key_point_referents’ Name minus the alignment name (via _get_key_point_tag), e.g. “145+98.32 (P.C.)”. The first segment’s StartTag comes from the “Beginning of Alignment” boundary label.

EndTag is left untouched unless label_end_tag is True. When enabled, for each transition between two consecutive segments, the outgoing segment’s EndTag is set to the same tag as the incoming segment’s StartTag (they describe the same physical point), and the last segment’s EndTag is set from the “End of Alignment” boundary label.

Labels come from _get_segment_start_point_label – if a callback has been registered via register_referent_name_callback(), its output is used instead of the built-in labels, exactly as in update_key_point_referents.

Parameters:
  • layout – IfcAlignmentHorizontal, IfcAlignmentVertical, or IfcAlignmentCant

  • label_end_tag – if True, also sets EndTag on every real segment. If False (default), EndTag is left untouched.

Returns:

None – this function mutates segment.DesignParameters.StartTag/EndTag in place

Example:

horizontal = ifcopenshell.api.alignment.get_horizontal_layout(alignment)
ifcopenshell.api.alignment.update_alignment_parameter_segment_tags(model, horizontal)