mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 18:43:26 +00:00
type.assign_type - support batching #4474
This commit is contained in:
@@ -48,7 +48,7 @@ class TestAssignMaterial(test.bootstrap.IFC4):
|
||||
def test_assign_type_material_layer_set_and_element_layer_set_usage(self):
|
||||
element_type = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWallType")
|
||||
element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
|
||||
ifcopenshell.api.run("type.assign_type", self.file, related_object=element, relating_type=element_type)
|
||||
ifcopenshell.api.run("type.assign_type", self.file, related_objects=[element], relating_type=element_type)
|
||||
material = ifcopenshell.api.run("material.add_material", self.file, name="CON01")
|
||||
ifcopenshell.api.run("material.assign_material", self.file, product=element_type, type="IfcMaterialLayerSet")
|
||||
ifcopenshell.api.run("material.assign_material", self.file, product=element, type="IfcMaterialLayerSetUsage")
|
||||
@@ -69,7 +69,7 @@ class TestAssignMaterial(test.bootstrap.IFC4):
|
||||
def test_assign_type_material_profile_set_and_element_profile_set_usage(self):
|
||||
element_type = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWallType")
|
||||
element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
|
||||
ifcopenshell.api.run("type.assign_type", self.file, related_object=element, relating_type=element_type)
|
||||
ifcopenshell.api.run("type.assign_type", self.file, related_objects=[element], relating_type=element_type)
|
||||
material = ifcopenshell.api.run("material.add_material", self.file, name="CON01")
|
||||
ifcopenshell.api.run("material.assign_material", self.file, product=element_type, type="IfcMaterialProfileSet")
|
||||
ifcopenshell.api.run("material.assign_material", self.file, product=element, type="IfcMaterialProfileSetUsage")
|
||||
|
||||
Reference in New Issue
Block a user