diff --git a/lib/Slic3r/ExtrusionPath.pm b/lib/Slic3r/ExtrusionPath.pm index e52dc66ed..212a1bb71 100644 --- a/lib/Slic3r/ExtrusionPath.pm +++ b/lib/Slic3r/ExtrusionPath.pm @@ -93,6 +93,13 @@ sub endpoints { sub is_printable { 1 } +sub is_fill { + my $self = shift; + return $self->role == EXTR_ROLE_FILL + || $self->role == EXTR_ROLE_SOLIDFILL + || $self->role == EXTR_ROLE_TOPSOLIDFILL; +} + sub split_at_acute_angles { my $self = shift; diff --git a/lib/Slic3r/GCode.pm b/lib/Slic3r/GCode.pm index 4eaf9846f..55b3dcbf9 100644 --- a/lib/Slic3r/GCode.pm +++ b/lib/Slic3r/GCode.pm @@ -198,7 +198,7 @@ sub extrude_path { # note that we're only considering the current object's islands, while we should # build a more complete configuration space $travel->translate(-$self->shift_x, -$self->shift_y); - if (!$Slic3r::Config->only_retract_when_crossing_perimeters || $path->role != EXTR_ROLE_FILL || !first { $_->encloses_line($travel, scaled_epsilon) } @{$self->layer->slices}) { + if (!$Slic3r::Config->only_retract_when_crossing_perimeters || !$path->is_fill || !first { $_->encloses_line($travel, scaled_epsilon) } @{$self->layer->slices}) { $gcode .= $self->retract(travel_to => $path->points->[0]); } }