diff --git a/src/libslic3r/CutUtils.hpp b/src/libslic3r/CutUtils.hpp index a3b515973..a27574acc 100644 --- a/src/libslic3r/CutUtils.hpp +++ b/src/libslic3r/CutUtils.hpp @@ -7,7 +7,7 @@ namespace Slic3r { - +const float CUT_TOLERANCE = 0.1f; struct Groove { float depth{0.f}; @@ -18,8 +18,8 @@ struct Groove float width_init{0.f}; float flaps_angle_init{0.f}; float angle_init{0.f}; - float depth_tolerance{0.1f}; - float width_tolerance{0.1f}; + float depth_tolerance{CUT_TOLERANCE}; + float width_tolerance{CUT_TOLERANCE}; }; class Cut { diff --git a/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.cpp b/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.cpp index e052d55a6..188695770 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.cpp @@ -395,9 +395,17 @@ void GLGizmoAdvancedCut::reset_cut_plane() void GLGizmoAdvancedCut::reset_all() { Plater::TakeSnapshot snapshot(wxGetApp().plater(), "reset cut"); - reset_connectors(); + if (m_cut_mode == CutMode::cutPlanar) { + reset_connectors(); + } else if (m_cut_mode == CutMode::cutTongueAndGroove) { + m_groove.depth = m_groove.depth_init; + m_groove.width = m_groove.width_init; + m_groove.flaps_angle = m_groove.flaps_angle_init; + m_groove.angle = m_groove.angle_init; + m_groove.depth_tolerance = CUT_TOLERANCE; + m_groove.width_tolerance = CUT_TOLERANCE; + } reset_cut_plane(); - m_keep_upper = true; m_keep_lower = true; m_cut_to_parts = false; diff --git a/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.hpp b/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.hpp index 18b5b4d64..bc3648a38 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoAdvancedCut.hpp @@ -161,10 +161,10 @@ private: BoundingBoxf3 m_transformed_bounding_box; float m_connector_depth_ratio{3.f}; - float m_connector_depth_ratio_tolerance{0.1f}; + float m_connector_depth_ratio_tolerance{CUT_TOLERANCE}; float m_connector_size{2.5f}; - float m_connector_size_tolerance{0.1f}; + float m_connector_size_tolerance{CUT_TOLERANCE}; // Input params for cut with snaps float m_snap_space_proportion{0.3f}; float m_snap_bulge_proportion{0.15f};