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
This commit is contained in:
Mike Sheldrake 2013-01-18 08:36:01 -08:00
parent 09bdd2ea5d
commit 65ef3b35d9

View file

@ -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),