nest.assign_object - support batching #4474

This commit is contained in:
Andrej730
2024-04-09 16:41:34 +05:00
parent d1bcec7a6a
commit 97db95085a
15 changed files with 173 additions and 45 deletions
@@ -107,3 +107,11 @@ class TestTemporarySupportForDeprecatedAPIArguments(test.bootstrap.IFC4):
ifcopenshell.api.run("spatial.assign_container", self.file, products=[subelement], relating_structure=element)
ifcopenshell.api.run("spatial.remove_container", self.file, product=subelement)
assert ifcopenshell.util.element.get_container(subelement) is None
@deprecation_check
def test_assigning_a_nesting(self):
element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcSanitaryTerminal")
subelement = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcValve")
rel = ifcopenshell.api.run("nest.assign_object", self.file, related_object=subelement, relating_object=element)
assert ifcopenshell.util.element.get_nest(subelement) == element
assert rel.is_a("IfcRelNests")