From d550f3fb5f252cde9ec706e121f7e0d5176dcc90 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 20 May 2012 13:03:34 +0200 Subject: [PATCH] Fixed regression preventing top solid shells to be computed --- lib/Slic3r/Print/Object.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Slic3r/Print/Object.pm b/lib/Slic3r/Print/Object.pm index fb08ceac..78c5796d 100644 --- a/lib/Slic3r/Print/Object.pm +++ b/lib/Slic3r/Print/Object.pm @@ -317,11 +317,11 @@ sub discover_horizontal_shells { grep $_->surface_type == $type, @{$layer->fill_surfaces} or next; my $surfaces_p = [ map $_->p, @surfaces ]; Slic3r::debugf "Layer %d has %d surfaces of type '%s'\n", - $i, scalar(@surfaces), $type; + $i, scalar(@surfaces), ($type == S_TYPE_TOP ? 'top' : 'bottom'); - for (my $n = $type eq 'top' ? $i-1 : $i+1; + for (my $n = $type == S_TYPE_TOP ? $i-1 : $i+1; abs($n - $i) <= $Slic3r::solid_layers-1; - $type eq 'top' ? $n-- : $n++) { + $type == S_TYPE_TOP ? $n-- : $n++) { next if $n < 0 || $n >= $self->layer_count; Slic3r::debugf " looking for neighbors on layer %d...\n", $n;