From 0a912c631633ac0b377613a6866a65d479b0c213 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Mon, 5 Nov 2012 14:26:55 +0100 Subject: [PATCH] Only apply min_skirt_length on bottom layer --- 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 6ae8bc53..5fe70bd2 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -753,7 +753,11 @@ sub write_gcode { if ($layer_id < $Slic3r::Config->skirt_height) { # distribute skirt loops across all extruders for my $i (0 .. $#{$self->skirt}) { - $gcode .= $gcodegen->set_extruder($self->extruders->[ ($i/@{$self->extruders}) % @{$self->extruders} ]); + # when printing layers > 0 ignore 'min_skirt_length' and + # just use the 'skirts' setting; also just use the current extruder + last if ($layer_id > 0) && ($i >= $Slic3r::Config->skirts); + $gcode .= $gcodegen->set_extruder($self->extruders->[ ($i/@{$self->extruders}) % @{$self->extruders} ]) + if $layer_id == 0; $gcode .= $gcodegen->extrude_loop($self->skirt->[$i], 'skirt'); } }