spatial.assign_container - support batching #4474

This commit is contained in:
Andrej730
2024-04-05 14:57:11 +05:00
parent ee6c7a9fad
commit 52995d1cdd
32 changed files with 157 additions and 119 deletions
+3 -3
View File
@@ -154,7 +154,7 @@ class TestGetContainer(NewFile):
ifc = ifcopenshell.file()
site = ifc.createIfcSite()
wall = ifc.createIfcWall()
ifcopenshell.api.run("spatial.assign_container", ifc, product=wall, relating_structure=site)
ifcopenshell.api.run("spatial.assign_container", ifc, products=[wall], relating_structure=site)
assert subject.get_container(wall) == site
@@ -163,7 +163,7 @@ class TestGetDecomposedElements(NewFile):
ifc = ifcopenshell.file()
site = ifc.createIfcSite()
wall = ifc.createIfcWall()
ifcopenshell.api.run("spatial.assign_container", ifc, product=wall, relating_structure=site)
ifcopenshell.api.run("spatial.assign_container", ifc, products=[wall], relating_structure=site)
assert subject.get_decomposed_elements(site) == [wall]
@@ -268,4 +268,4 @@ class TestSelectProducts(NewFile):
bpy.context.scene.collection.objects.link(obj)
tool.Ifc.link(product, obj)
subject.select_products([product])
assert obj in bpy.context.selected_objects
assert obj in bpy.context.selected_objects