mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-30 16:43:00 +00:00
Minor refactor add_constr_type_instance is now add_occurrence
This commit is contained in:
@@ -517,12 +517,12 @@ class TestApplyIfcMaterialChanges(NewFile):
|
||||
|
||||
# Setup occurrences.
|
||||
relating_type_id = element_type.id()
|
||||
bpy.ops.bim.add_constr_type_instance(relating_type_id=relating_type_id)
|
||||
bpy.ops.bim.add_occurrence(relating_type_id=relating_type_id)
|
||||
simple = bpy.context.active_object
|
||||
simple.name = "Simple"
|
||||
|
||||
# Occurrence with an opening.
|
||||
bpy.ops.bim.add_constr_type_instance(relating_type_id=relating_type_id)
|
||||
bpy.ops.bim.add_occurrence(relating_type_id=relating_type_id)
|
||||
with_opening = bpy.context.active_object
|
||||
with_opening.name = "With Opening"
|
||||
props = tool.Root.get_root_props()
|
||||
@@ -530,7 +530,7 @@ class TestApplyIfcMaterialChanges(NewFile):
|
||||
bpy.ops.bim.add_element(ifc_product="IfcFeatureElement", ifc_class="IfcOpeningElement")
|
||||
|
||||
# Occurrence with a material override.
|
||||
bpy.ops.bim.add_constr_type_instance(relating_type_id=relating_type_id)
|
||||
bpy.ops.bim.add_occurrence(relating_type_id=relating_type_id)
|
||||
with_material = bpy.context.active_object
|
||||
with_material.name = "With Material"
|
||||
tool.Blender.set_objects_selection(bpy.context, active_object=with_material, selected_objects=[with_material])
|
||||
|
||||
@@ -184,9 +184,9 @@ class TestReassignClass(NewFile):
|
||||
n_slab_types = len(ifc_file.by_type("IfcSlabType"))
|
||||
|
||||
# create 3 slabs
|
||||
bpy.ops.bim.add_constr_type_instance(relating_type_id=relating_type_id)
|
||||
bpy.ops.bim.add_constr_type_instance(relating_type_id=relating_type_id)
|
||||
bpy.ops.bim.add_constr_type_instance(relating_type_id=relating_type_id)
|
||||
bpy.ops.bim.add_occurrence(relating_type_id=relating_type_id)
|
||||
bpy.ops.bim.add_occurrence(relating_type_id=relating_type_id)
|
||||
bpy.ops.bim.add_occurrence(relating_type_id=relating_type_id)
|
||||
|
||||
slabs = [tool.Ifc.get_object(e) for e in ifc_file.by_type("IfcSlab")]
|
||||
assert len(slabs) == 3
|
||||
|
||||
Reference in New Issue
Block a user