From c090073858b4519a5d7519b66f44719e26d43ce1 Mon Sep 17 00:00:00 2001 From: Richard Brice <37087370+RickBrice@users.noreply.github.com> Date: Wed, 27 Aug 2025 07:35:49 -0700 Subject: [PATCH] Removes assumption about which nest contains alignment layout segments --- .../ifcopenshell/api/alignment/create_representation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_representation.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_representation.py index 443345bd0f..c94ee873fa 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/create_representation.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/create_representation.py @@ -50,5 +50,6 @@ def create_representation( layouts = ifcopenshell.api.alignment.get_alignment_layouts(alignment) for layout in layouts: curve = ifcopenshell.api.alignment.get_layout_curve(layout) - for segment in layout.IsNestedBy[0].RelatedObjects: + layout_nest = ifcopenshell.api.alignment.get_alignment_segment_nest(layout) + for segment in layout_nest.RelatedObjects: _add_segment_to_curve(file, segment, curve)