ENH:add "reset function" in cutTongueAndGroove mode
Jira: STUDIO-5804 Change-Id: I61fb10db65f5ab954473373ed585557c99212a8c
This commit is contained in:
parent
5cb3fc86c5
commit
4b91e78fb4
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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};
|
||||
|
|
Loading…
Reference in New Issue