mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 18:16:40 +00:00
Fixes problems with referents
This commit is contained in:
@@ -45,12 +45,14 @@ def test_name_segments():
|
||||
file, "TestAlignment", coordinates, radii, vpoints, lengths
|
||||
)
|
||||
|
||||
for rel in alignment.IsNestedBy:
|
||||
for a in rel.RelatedObjects:
|
||||
if a.is_a("IfcLinearElement"):
|
||||
ifcopenshell.api.alignment.name_segments("Q", a)
|
||||
i = 1
|
||||
for sr in a.IsNestedBy:
|
||||
for s in sr.RelatedObjects:
|
||||
assert f"Q{i}" == s.Name
|
||||
i += 1
|
||||
layout_nest = ifcopenshell.api.alignment.get_alignment_layout_nest(alignment)
|
||||
for layout in layout_nest.RelatedObjects:
|
||||
assert layout.is_a("IfcLinearElement")
|
||||
ifcopenshell.api.alignment.name_segments("Q", layout)
|
||||
segment_nest = ifcopenshell.api.alignment.get_alignment_segment_nest(layout)
|
||||
i = 1
|
||||
for segment in segment_nest.RelatedObjects:
|
||||
assert f"Q{i}" == segment.Name
|
||||
i += 1
|
||||
|
||||
test_name_segments()
|
||||
Reference in New Issue
Block a user