ENH: wipe_distance should not to be 0 or negative value

As title, fix github issue #220

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: If63c839da1341ac2e16bbfa287c4e32564284d59
This commit is contained in:
salt.wei authored and Lane.Wei committed 2022-09-08 21:49:36 +08:00
1 parent e6f0c5abec
commit 4e1caa428d
4 files changed
+9 -8

No files matched your search

+2 -2
View File
@@ -3836,8 +3836,8 @@ std::string GCode::retract(bool toolchange, bool is_last_retraction)
if (m_writer.extruder() == nullptr)
return gcode;
// wipe (if it's enabled for this extruder and we have a stored wipe path)
if (EXTRUDER_CONFIG(wipe) && m_wipe.has_path()) {
// wipe (if it's enabled for this extruder and we have a stored wipe path and no-zero wipe distance)
if (EXTRUDER_CONFIG(wipe) && m_wipe.has_path() && scale_(EXTRUDER_CONFIG(wipe_distance)) > SCALED_EPSILON) {
gcode += toolchange ? m_writer.retract_for_toolchange(true) : m_writer.retract(true);
gcode += m_wipe.wipe(*this, toolchange, is_last_retraction);
}