From 44016b38c52bf358ca0e8332f4ee04c043774271 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Wed, 24 Oct 2012 19:13:40 +0200 Subject: [PATCH] Distribute skirt loops across all extruders --- 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 3669187b29..d7bbf75d9a 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -711,7 +711,11 @@ sub write_gcode { $gcode .= $gcodegen->set_acceleration($Slic3r::Config->perimeter_acceleration); # skip skirt if we have a large brim if ($layer_id < $Slic3r::Config->skirt_height) { - $gcode .= $gcodegen->extrude_loop($_, 'skirt') for @{$self->skirt}; + # distribute skirt loops across all extruders + for my $i (0 .. $#{$self->skirt}) { + $gcode .= $gcodegen->set_extruder($self->extruders->[ ($i/@{$self->extruders}) % @{$self->extruders} ]); + $gcode .= $gcodegen->extrude_loop($self->skirt->[$i], 'skirt'); + } } $skirt_done++; }