From 2ef90562ce4da0e46f3d60d0f46b9291854f8328 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Tue, 6 Nov 2012 22:16:01 +0100 Subject: [PATCH] Fixed regression causing first two layers to be infilled with parallel lines --- lib/Slic3r/Fill.pm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/Slic3r/Fill.pm b/lib/Slic3r/Fill.pm index 974b8bf3..f9e93010 100644 --- a/lib/Slic3r/Fill.pm +++ b/lib/Slic3r/Fill.pm @@ -50,8 +50,6 @@ sub make_fill { my $self = shift; my ($layer) = @_; - $_->layer_id($layer->id) for values %{$self->fillers}; - Slic3r::debugf "Filling layer %d:\n", $layer->id; # merge overlapping surfaces @@ -145,11 +143,16 @@ sub make_fill { next SURFACE unless $density > 0; } - my @paths = $self->filler($filler)->fill_surface( - $surface, - density => $density, - flow_spacing => $flow_spacing, - ); + my @paths; + { + my $f = $self->filler($filler); + $f->layer_id($layer->id); + @paths = $f->fill_surface( + $surface, + density => $density, + flow_spacing => $flow_spacing, + ); + } my $params = shift @paths; # save into layer