material.assign_material - support batching #4474

This commit is contained in:
Andrej730
2024-04-12 11:21:35 +05:00
parent 32d2f1d629
commit 59cc9c0a16
43 changed files with 432 additions and 236 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ class TestGetElementsByMaterial(NewFile):
tool.Ifc.set(ifc)
element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcWall")
material = ifcopenshell.api.run("material.add_material", ifc)
ifcopenshell.api.run("material.assign_material", ifc, product=element, material=material)
ifcopenshell.api.run("material.assign_material", ifc, products=[element], material=material)
assert subject.get_elements_by_material(material) == {element}