mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
mep - fix errors adding a bend/a transition
mesh is already removed by replace_object_ifc_representation
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user