Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Matena <lukasmatena@seznam.cz>2018-06-21 15:05:07 +0300
committerLukas Matena <lukasmatena@seznam.cz>2018-06-21 15:05:07 +0300
commite622401599f715b741ffc2ce4eeaa00fc1f222ec (patch)
treec16320c86cea703de3c3a7fc30de6fca963c8bff
parent7cf39227076fbb04fd9b99d7313b8d265e34c47c (diff)
Wipe tower bugfix - the tower was printed incorrectly when the rotation angle was close to 90 degreesversion_1.40.1-betauntagged-2b7490fa646089912913
-rw-r--r--xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp
index 6486f2917..fbde83754 100644
--- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp
+++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp
@@ -142,24 +142,21 @@ public:
}
m_gcode += "G1";
- if (rot.x != rotated_current_pos.x) {
- m_gcode += set_format_X(rot.x); // Transform current position back to wipe tower coordinates (was updated by set_format_X)
- m_current_pos.x = x;
- }
- if (rot.y != rotated_current_pos.y) {
+ if (std::abs(dx) > EPSILON)
+ m_gcode += set_format_X(rot.x);
+
+ if (std::abs(dy) > EPSILON)
m_gcode += set_format_Y(rot.y);
- m_current_pos.y = y;
- }
if (e != 0.f)
m_gcode += set_format_E(e);
if (f != 0.f && f != m_current_feedrate)
m_gcode += set_format_F(f);
-
-
-
-
+
+ m_current_pos.x = x;
+ m_current_pos.y = y;
+
// Update the elapsed time with a rough estimate.
m_elapsed_time += ((len == 0) ? std::abs(e) : len) / m_current_feedrate * 60.f;
m_gcode += "\n";