mep - fix errors adding a bend/a transition

mesh is already removed by replace_object_ifc_representation
This commit is contained in:
Andrej730
2024-12-19 17:46:34 +05:00
parent 352e361ea5
commit 7be21bf02e
+2 -2
View File
@@ -846,8 +846,8 @@ class MEPAddTransition(bpy.types.Operator, tool.Ifc.Operator):
should_add_representation=False,
)
body = ifcopenshell.util.representation.get_context(ifc_file, "Model", "Body", "MODEL_VIEW")
# Will implicitly remove `mesh`.
tool.Model.replace_object_ifc_representation(body, obj, rep)
tool.Blender.remove_data_block(mesh)
pset = ifcopenshell.api.run("pset.add_pset", tool.Ifc.get(), product=transition_type, name="BBIM_Fitting")
ifcopenshell.api.run(
"pset.edit_pset",
@@ -1197,8 +1197,8 @@ class MEPAddBend(bpy.types.Operator, tool.Ifc.Operator):
should_add_representation=False,
)
body = ifcopenshell.util.representation.get_context(ifc_file, "Model", "Body", "MODEL_VIEW")
# Will implicitly remove `mesh`.
tool.Model.replace_object_ifc_representation(body, obj, rep)
tool.Blender.remove_data_block(mesh)
pset = ifcopenshell.api.run("pset.add_pset", tool.Ifc.get(), product=bend_type, name="BBIM_Fitting")
ifcopenshell.api.run(
"pset.edit_pset",