mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 10:33:20 +00:00
nest.assign_object - support batching #4474
This commit is contained in:
@@ -190,7 +190,7 @@ class TestRemoveProduct(test.bootstrap.IFC4):
|
||||
def test_removing_all_nesting_relationships_of_a_whole(self):
|
||||
element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
|
||||
subelement = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcBeam")
|
||||
ifcopenshell.api.run("nest.assign_object", self.file, related_object=subelement, relating_object=element)
|
||||
ifcopenshell.api.run("nest.assign_object", self.file, related_objects=[subelement], relating_object=element)
|
||||
total_entities = len(list(self.file))
|
||||
ifcopenshell.api.run("root.remove_product", self.file, product=element)
|
||||
assert len(list(self.file)) == total_entities - 2
|
||||
@@ -201,7 +201,7 @@ class TestRemoveProduct(test.bootstrap.IFC4):
|
||||
def test_removing_all_nesting_relationships_of_a_part(self):
|
||||
element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
|
||||
subelement = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcBeam")
|
||||
ifcopenshell.api.run("nest.assign_object", self.file, related_object=subelement, relating_object=element)
|
||||
ifcopenshell.api.run("nest.assign_object", self.file, related_objects=[subelement], relating_object=element)
|
||||
total_entities = len(list(self.file))
|
||||
ifcopenshell.api.run("root.remove_product", self.file, product=subelement)
|
||||
assert len(list(self.file)) == total_entities - 2
|
||||
|
||||
Reference in New Issue
Block a user