From 55045e043738a876486401122698d6b52e2d288c Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 22 Dec 2011 11:57:26 +0100 Subject: [PATCH] Limit skirt height to the print height. #128 --- lib/Slic3r/Print.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index b07d31608..ea21fd570 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -328,7 +328,9 @@ sub extrude_skirt { # collect points from all layers contained in skirt height my @points = (); - my @layers = map $self->layer($_), 0..($Slic3r::skirt_height-1); + my $skirt_height = $Slic3r::skirt_height; + $skirt_height = $self->layer_count if $skirt_height > $self->layer_count; + my @layers = map $self->layer($_), 0..($skirt_height-1); push @points, map @$_, map $_->p, map @{ $_->slices }, @layers; return if !@points;