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:
authorAlessandro Ranellucci <aar@cpan.org>2013-07-26 12:52:22 +0400
committerAlessandro Ranellucci <aar@cpan.org>2013-07-26 12:52:22 +0400
commitc69edf27e940ed2765d65fc584854b973d9602e7 (patch)
tree020bf1276d242031f59a093b547cbd4d2ca11dfa /lib
parentfe94e31bda044cd097bf8ff43773fdbf37411a74 (diff)
Bugfix: only_retract_when_crossing_perimeters was not triggering retraction when moving between islands that are covered/bridged on the above layer. #1308
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);