mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
material.assign_material - support batching #4474
This commit is contained in:
@@ -72,7 +72,7 @@ class Usecase:
|
||||
wall_type = ifcopenshell.api.run("root.create_entity", library, ifc_class="IfcWallType", name="WAL01")
|
||||
concrete = ifcopenshell.api.run("material.add_material", self.file, name="CON", category="concrete")
|
||||
rel = ifcopenshell.api.run("material.assign_material", library,
|
||||
product=wall_type, type="IfcMaterialLayerSet")
|
||||
products=[wall_type], type="IfcMaterialLayerSet")
|
||||
layer = ifcopenshell.api.run("material.add_layer", library,
|
||||
layer_set=rel.RelatingMaterial, material=concrete)
|
||||
layer.Name = "Structure"
|
||||
|
||||
@@ -65,7 +65,7 @@ class Usecase:
|
||||
wall_type = ifcopenshell.api.run("root.create_entity", library, ifc_class="IfcWallType", name="WAL01")
|
||||
concrete = ifcopenshell.api.run("material.add_material", self.file, name="CON", category="concrete")
|
||||
rel = ifcopenshell.api.run("material.assign_material", library,
|
||||
product=wall_type, type="IfcMaterialLayerSet")
|
||||
products=[wall_type], type="IfcMaterialLayerSet")
|
||||
layer = ifcopenshell.api.run("material.add_layer", library,
|
||||
layer_set=rel.RelatingMaterial, material=concrete)
|
||||
layer.Name = "Structure"
|
||||
|
||||
Reference in New Issue
Block a user