mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 10:33:20 +00:00
material.assign_material - support batching #4474
This commit is contained in:
@@ -70,12 +70,12 @@ class Usecase:
|
||||
profile_set=material_set, material=steel, profile=hea100)
|
||||
|
||||
# Great! Let's assign our material set to our beam type.
|
||||
ifcopenshell.api.run("material.assign_material", model, product=beam_type, material=material_set)
|
||||
ifcopenshell.api.run("material.assign_material", model, products=[beam_type], material=material_set)
|
||||
|
||||
# Let's create an occurrence of this beam.
|
||||
beam = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcBeam", name="B1.01")
|
||||
rel = ifcopenshell.api.run("material.assign_material", model,
|
||||
product=beam, type="IfcMaterialProfileSetUsage")
|
||||
products=[beam], type="IfcMaterialProfileSetUsage")
|
||||
|
||||
# Let's give a 1000mm long beam body representation.
|
||||
body = ifcopenshell.api.run("geometry.add_profile_representation",
|
||||
|
||||
Reference in New Issue
Block a user