ENH: fix issue that sommetimes no wipe path is generated

This is handling for github issue #1072

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: I253be46b07054eb69ddbad3889e31dfca57b2a52
This commit is contained in:
salt.wei 2023-01-16 14:56:59 +08:00 committed by Lane.Wei
parent 27fc88169e
commit 4a3a4645f0

View file

@ -176,7 +176,7 @@ bool GCode::gcode_label_objects = false;
// Shorten the retraction length by the amount already retracted before wipe.
length *= (1. - gcodegen.writer().extruder()->retract_before_wipe());
if (length > 0) {
if (length >= 0) {
/* Calculate how long we need to travel in order to consume the required
amount of retraction. In other words, how far do we move in XY at wipe_speed
for the time needed to consume retraction_length at retraction_speed? */