diff --git a/src/slic3r/GUI/CAD/DesignCanvas.cpp b/src/slic3r/GUI/CAD/DesignCanvas.cpp index fa58034052..35772b0da1 100644 --- a/src/slic3r/GUI/CAD/DesignCanvas.cpp +++ b/src/slic3r/GUI/CAD/DesignCanvas.cpp @@ -85,6 +85,7 @@ DesignCanvas::DesignCanvas(wxWindow* parent) m_canvas->enable_collapse_toolbar(false); m_canvas->enable_plate_chrome(false); m_canvas->enable_labels(false); + m_canvas->enable_sinking_contours(false); // they would be sliced from the plater's meshes m_canvas->set_axes_at_bed_center(true); // triad at bed centre = modeling origin m_canvas->set_design_sketch_tool(&m_sketch_tool); diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 4ecb6a52db..afc885752a 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -8753,7 +8753,7 @@ void GLCanvas3D::_render_objects(GLVolumeCollection::ERenderType type, bool with else { m_volumes.set_clipping_plane(m_camera_clipping_plane.get_data()); } - if (m_canvas_type == CanvasAssembleView) + if (m_canvas_type == CanvasAssembleView || !m_sinking_contours_enabled) m_volumes.set_show_sinking_contours(false); else m_volumes.set_show_sinking_contours(!m_gizmos.is_hiding_instances()); diff --git a/src/slic3r/GUI/GLCanvas3D.hpp b/src/slic3r/GUI/GLCanvas3D.hpp index 62cf13dd6b..c1c2c7a1f9 100644 --- a/src/slic3r/GUI/GLCanvas3D.hpp +++ b/src/slic3r/GUI/GLCanvas3D.hpp @@ -606,6 +606,9 @@ private: // Design tab: draw the printer bed and its plate grid at all. Default true, so the // main editor is untouched; the Design tab lets the user hide it to model without a bed. bool m_show_bed{true}; + // Design tab: draw the outline where a volume crosses the bed. GLVolume::SinkingContours slices + // the plater model's mesh by the volume's ids, so a canvas over its own Model must turn it off. + bool m_sinking_contours_enabled{true}; // Design tab: CAD grid drawn on the bed plane in place of the plate's corner-origin grid. // Two GLModels (10 mm minor / 50 mm major) generated from the bed centre so a line passes // exactly through the modeling origin; built once and rebuilt only when the bed shape changes. @@ -1021,6 +1024,7 @@ public: void set_axes_at_bed_center(bool b) { m_axes_at_bed_center = b; } void set_show_bed(bool b) { m_show_bed = b; } bool get_show_bed() const { return m_show_bed; } + void enable_sinking_contours(bool enable) { m_sinking_contours_enabled = enable; } #ifdef SLIC3R_CAD void set_design_sketch_tool(DesignSketchTool* tool) { m_design_sketch_tool = tool; } DesignSketchTool* get_design_sketch_tool() const { return m_design_sketch_tool; }