From 70092a9cf5ee43c7bfbe0b20969f67a0a5908ff8 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Mon, 4 Mar 2013 23:37:58 +0100 Subject: [PATCH] Apply only_retract_when_crossing_perimeters to all infills --- lib/Slic3r/ExtrusionPath.pm | 7 +++++++ lib/Slic3r/GCode.pm | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) 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]); } }