From 65ef3b35d9350a3a9843c1a40800f491c7ea9941 Mon Sep 17 00:00:00 2001 From: Mike Sheldrake Date: Fri, 18 Jan 2013 08:36:01 -0800 Subject: [PATCH] limit layer requests to object->layer_count when preparing skirt #901 Each object on the plater was being queried for points for producing the skirt for all skirt layers, even when the object was shorter than the skirt. layers of the print --- lib/Slic3r/Print.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index 1cd95334f..8c2d94e46 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -546,10 +546,10 @@ sub make_skirt { return unless $Slic3r::Config->skirts > 0; # collect points from all layers contained in skirt height - my $skirt_height = $Slic3r::Config->skirt_height; - $skirt_height = $self->layer_count if $skirt_height > $self->layer_count; my @points = (); foreach my $obj_idx (0 .. $#{$self->objects}) { + my $skirt_height = $Slic3r::Config->skirt_height; + $skirt_height = $self->objects->[$obj_idx]->layer_count if $skirt_height > $self->objects->[$obj_idx]->layer_count; my @layers = map $self->objects->[$obj_idx]->layers->[$_], 0..($skirt_height-1); my @layer_points = ( (map @$_, map @$_, map @{$_->slices}, @layers),