diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2013-07-26 12:52:22 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2013-07-26 12:52:22 +0400 |
commit | c69edf27e940ed2765d65fc584854b973d9602e7 (patch) | |
tree | 020bf1276d242031f59a093b547cbd4d2ca11dfa /lib | |
parent | fe94e31bda044cd097bf8ff43773fdbf37411a74 (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.pm | 6 |
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); |