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
@@ -55,7 +55,7 @@ class Usecase:
# Our wall type now has the layer set assigned to it
ifcopenshell.api.run("material.assign_material", model,
product=wall_type, type="IfcMaterialLayerSet", material=material_set)
products=[wall_type], type="IfcMaterialLayerSet", material=material_set)
# Let's imagine an occurrence of this wall type.
wall = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall")
@@ -67,7 +67,7 @@ class Usecase:
# they automatically detect the inherited material set from the
# type. You'd write similar code for a profile set.
rel = ifcopenshell.api.run("material.assign_material", model,
product=wall, type="IfcMaterialLayerSetUsage")
products=[wall], type="IfcMaterialLayerSetUsage")
# Let's change the offset from the reference line to be 200mm
# instead of the default of 0mm.