From 0520d1645b17a2a8b34fa0583f23239bb60e7c3c Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Tue, 28 Feb 2012 21:55:32 +0100 Subject: [PATCH] Bugfix: retraction wasn't triggered when moving between copies. #232 --- lib/Slic3r/Print.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index 1657f5748..e7ba03d96 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -640,7 +640,11 @@ sub export_gcode { $layer_gcode .= $extruder->set_acceleration($Slic3r::perimeter_acceleration); $layer_gcode .= $extruder->extrude_loop($_, 'skirt') for @{ $layer->skirts }; - foreach my $copy (@{$self->copies}) { + for (my $i = 0; $i <= $#{$self->copies}; $i++) { + # retract explicitely because changing the shift_[xy] properties below + # won't always trigger the automatic retraction + $layer_gcode .= $extruder->retract; + $extruder->shift_x($shift[X] + unscale $copy->[X]); $extruder->shift_y($shift[Y] + unscale $copy->[Y]);