mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 10:33:20 +00:00
feat: Add alignment representation templates to AddElement dialog
Wire IfcAlignment creation into Bonsai's Add IFC Element flow with representation template options (Horizontal, Gradient, Cant, 3D/2D Polyline). Adds create_representation_structure() to tool.Alignment which creates layout containers, geometric representation, and polyline placeholders. Guards create_representation against empty layout nests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -52,5 +52,6 @@ def create_representation(
|
||||
for layout in layouts:
|
||||
curve = ifcopenshell.api.alignment.get_layout_curve(layout)
|
||||
layout_nest = ifcopenshell.api.alignment.get_alignment_segment_nest(layout)
|
||||
for segment in layout_nest.RelatedObjects:
|
||||
_add_segment_to_curve(file, segment, curve)
|
||||
if layout_nest: # None when no segments exist yet (by design of get_alignment_segment_nest)
|
||||
for segment in layout_nest.RelatedObjects:
|
||||
_add_segment_to_curve(file, segment, curve)
|
||||
|
||||
Reference in New Issue
Block a user