From 35c8c846313dcb6016e8b31f0e9243833705632f Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Fri, 3 Apr 2020 09:07:58 +0200 Subject: [PATCH 1/2] Fix of #3965 (properly disable linear advance with RepRap firmware) --- src/libslic3r/GCode/WipeTower.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/GCode/WipeTower.cpp b/src/libslic3r/GCode/WipeTower.cpp index d31adbd8fc..c0f778687c 100644 --- a/src/libslic3r/GCode/WipeTower.cpp +++ b/src/libslic3r/GCode/WipeTower.cpp @@ -102,7 +102,9 @@ public: } WipeTowerWriter& disable_linear_advance() { - m_gcode += (m_gcode_flavor == gcfRepRap ? std::string("M572 D0 S0\n") : std::string("M900 K0\n")); + m_gcode += (m_gcode_flavor == gcfRepRap + ? (std::string("M572 D") + std::to_string(m_current_tool) + " S0\n") + : std::string("M900 K0\n")); return *this; } From ae7bb123a900cf17ceb275d4e8c8681f14a5494b Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Thu, 21 May 2020 11:27:47 +0200 Subject: [PATCH 2/2] Fix win build --- src/slic3r/GUI/Gizmos/GLGizmoFlatten.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoFlatten.cpp b/src/slic3r/GUI/Gizmos/GLGizmoFlatten.cpp index 3f2c0ea460..ee5c648184 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoFlatten.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoFlatten.cpp @@ -236,7 +236,7 @@ void GLGizmoFlatten::update_planes() discard = true; else { // We also check the inner angles and discard polygons with angles smaller than the following threshold - constexpr double angle_threshold = ::cos(10.0 * (double)PI / 180.0); + const double angle_threshold = ::cos(10.0 * (double)PI / 180.0); for (unsigned int i = 0; i < polygon.size(); ++i) { const Vec3d& prec = polygon[(i == 0) ? polygon.size() - 1 : i - 1];