mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 02:23:34 +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")
|
||||
|
||||
@@ -62,7 +62,7 @@ class TestUnassignMaterial(test.bootstrap.IFC4):
|
||||
def test_unassign_material_layer_set_usage_from_element(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")
|
||||
@@ -78,8 +78,8 @@ class TestUnassignMaterial(test.bootstrap.IFC4):
|
||||
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")
|
||||
element2 = 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_object=element2, relating_type=element_type)
|
||||
ifcopenshell.api.run("type.assign_type", self.file, related_objects=[element], relating_type=element_type)
|
||||
ifcopenshell.api.run("type.assign_type", self.file, related_objects=[element2], 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")
|
||||
rel = ifcopenshell.api.run(
|
||||
@@ -114,7 +114,7 @@ class TestUnassignMaterial(test.bootstrap.IFC4):
|
||||
def test_unassign_material_profile_set_usage_from_element(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