diff --git a/src/bonsai/bonsai/bim/module/drawing/operator.py b/src/bonsai/bonsai/bim/module/drawing/operator.py index d190734290..c4c44b107d 100644 --- a/src/bonsai/bonsai/bim/module/drawing/operator.py +++ b/src/bonsai/bonsai/bim/module/drawing/operator.py @@ -1005,14 +1005,16 @@ class CreateDrawing(bpy.types.Operator): if self.cprops.generate_material_layers: self.generate_material_layers(context, root) self.merge_linework_and_add_metadata(root) - self.remove_coplanar_boundary_lines(root) + if self.cprops.generate_material_layers and self.cprops.join_coplanar_surfaces: + self.remove_coplanar_boundary_lines(root) self.move_elements_to_top(root) elif self.cprops.cut_mode == "OPENCASCADE": self.move_projection_to_bottom(root) if self.cprops.generate_material_layers: self.generate_material_layers(context, root) self.merge_linework_and_add_metadata(root) - self.remove_coplanar_boundary_lines(root) + if self.cprops.generate_material_layers and self.cprops.join_coplanar_surfaces: + self.remove_coplanar_boundary_lines(root) self.move_elements_to_top(root) if self.cprops.fill_mode == "SHAPELY": diff --git a/src/bonsai/bonsai/bim/module/drawing/prop.py b/src/bonsai/bonsai/bim/module/drawing/prop.py index 57c182c02e..235b3047c9 100644 --- a/src/bonsai/bonsai/bim/module/drawing/prop.py +++ b/src/bonsai/bonsai/bim/module/drawing/prop.py @@ -500,6 +500,11 @@ class BIMCameraProperties(PropertyGroup): generate_material_layers: bpy.props.BoolProperty( name="Generate Material Layers", description="Generate material layer linework in drawings", default=True ) + join_coplanar_surfaces: bpy.props.BoolProperty( + name="Join Coplanar Surfaces", + description="Remove shared boundary lines between adjacent coplanar elements of the same material", + default=False, + ) fill_mode: EnumProperty( items=[ ("NONE", "None", "Disable filling areas seen in projection"), diff --git a/src/bonsai/bonsai/bim/module/drawing/ui.py b/src/bonsai/bonsai/bim/module/drawing/ui.py index c1809995a0..d8e9645b1c 100644 --- a/src/bonsai/bonsai/bim/module/drawing/ui.py +++ b/src/bonsai/bonsai/bim/module/drawing/ui.py @@ -104,6 +104,10 @@ class BIM_PT_camera(Panel): row.prop(props, "linework_mode") row = self.layout.row() row.prop(props, "generate_material_layers") + if props.generate_material_layers: + row = self.layout.row() + row.separator(factor=1.0) + row.prop(props, "join_coplanar_surfaces") if props.linework_mode == "OPENCASCADE": row = self.layout.row() row.prop(props, "fill_mode")