spatial.dereference_structure - support batching #4474

This commit is contained in:
Andrej730
2024-04-16 10:59:50 +05:00
parent 8ac0d22a95
commit f1f8b3da6b
6 changed files with 58 additions and 27 deletions
@@ -280,3 +280,11 @@ class TestTemporarySupportForDeprecatedAPIArguments(test.bootstrap.IFC4):
)
assert ifcopenshell.util.element.get_referenced_structures(subelement) == [element]
assert rel.is_a("IfcRelReferencedInSpatialStructure")
@deprecation_check
def test_removing_a_container(self):
element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcBuilding")
subelement = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
ifcopenshell.api.run("spatial.reference_structure", self.file, products=[subelement], relating_structure=element)
ifcopenshell.api.run("spatial.dereference_structure", self.file, product=subelement, relating_structure=element)
assert ifcopenshell.util.element.get_referenced_structures(subelement) == []