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

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Slic3r/GCode.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Slic3r/GCode.pm b/lib/Slic3r/GCode.pm
index ccfadc57c..71a9afbe8 100644
--- a/lib/Slic3r/GCode.pm
+++ b/lib/Slic3r/GCode.pm
@@ -350,8 +350,12 @@ sub travel_to {
# build a more complete configuration space
$travel->translate(-$self->shift_x, -$self->shift_y);
+ # skip retraction if the travel move is contained in an island in the current layer
+ # *and* in an island in the upper layer (so that the ooze will not be visible)
if ($travel->length < scale $self->extruder->retract_before_travel
- || ($self->config->only_retract_when_crossing_perimeters && first { $_->encloses_line($travel, scaled_epsilon) } @{$self->layer->upper_layer_slices})
+ || ($self->config->only_retract_when_crossing_perimeters
+ && (first { $_->encloses_line($travel, scaled_epsilon) } @{$self->layer->upper_layer_slices})
+ && (first { $_->encloses_line($travel, scaled_epsilon) } @{$self->layer->slices}))
|| ($role == EXTR_ROLE_SUPPORTMATERIAL && $self->layer->support_islands_enclose_line($travel))
) {
$self->straight_once(0);