From c5c71094159e299b5afa8f7aaf82e03395cd368d Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 24 Nov 2023 20:37:23 +0500 Subject: [PATCH] Fixed issue duplicating IfcRelSpaceBoundary #4043 --- src/blenderbim/blenderbim/bim/module/geometry/operator.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/blenderbim/blenderbim/bim/module/geometry/operator.py b/src/blenderbim/blenderbim/bim/module/geometry/operator.py index 257209b452..779dfe3044 100644 --- a/src/blenderbim/blenderbim/bim/module/geometry/operator.py +++ b/src/blenderbim/blenderbim/bim/module/geometry/operator.py @@ -800,7 +800,12 @@ class OverrideDuplicateMove(bpy.types.Operator): # clean up the orphaned mesh with ifc id of the original object to avoid confusion # IfcGridAxis keeps the same mesh data (it's pointing to ifc id 0, so it's not a problem) if new and temp_data and not new.is_a("IfcGridAxis"): - tool.Blender.remove_data_block(temp_data) + if new.is_a("IfcRelSpaceBoundary"): + surface = new.ConnectionGeometry.SurfaceOnRelatingElement + temp_data.name = f"0/{surface.id()}" + temp_data.BIMMeshProperties.ifc_definition_id = surface.id() + else: + tool.Blender.remove_data_block(temp_data) if new: # TODO: handle array data for other cases of duplication