From 8efb9fbb6e616b180a2f34bad26bbd884e219b37 Mon Sep 17 00:00:00 2001 From: "zhimin.zeng" Date: Sat, 12 Oct 2024 11:18:43 +0800 Subject: [PATCH] FIX: G1 empty command jira: none Change-Id: I399aa2d8bb820d5a6547025b66bd0dc3eeaa37c3 --- src/libslic3r/GCode/WipeTower.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/GCode/WipeTower.cpp b/src/libslic3r/GCode/WipeTower.cpp index f5d059107..b2f4a2c91 100644 --- a/src/libslic3r/GCode/WipeTower.cpp +++ b/src/libslic3r/GCode/WipeTower.cpp @@ -172,7 +172,7 @@ public: // Extrude with an explicitely provided amount of extrusion. WipeTowerWriter& extrude_explicit(float x, float y, float e, float f = 0.f, bool record_length = false, bool limit_volumetric_flow = true) { - if (x == m_current_pos.x() && y == m_current_pos.y() && e == 0.f && (f == 0.f || f == m_current_feedrate)) + if ((std::abs(x - m_current_pos.x()) <= (float)EPSILON) && (std::abs(y - m_current_pos.y()) < (float)EPSILON) && e == 0.f && (f == 0.f || f == m_current_feedrate)) // Neither extrusion nor a travel move. return *this; @@ -1101,7 +1101,7 @@ void WipeTower::toolchange_Wipe( if (m_depth_traversed != 0) writer.travel(xl, writer.y() + dy); #endif - + bool need_change_flow = false; // now the wiping itself: for (int i = 0; true; ++i) {