From 494f4f94bfc0e2211ddf2dd22f0c7473c38de4c5 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 20 May 2012 17:28:53 +0200 Subject: [PATCH] After recent memory optimizations, no solid layers were made when using fill density == 0 --- lib/Slic3r/Fill.pm | 2 +- lib/Slic3r/Layer.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/Fill.pm b/lib/Slic3r/Fill.pm index d3b49730f8..0bb20e0074 100644 --- a/lib/Slic3r/Fill.pm +++ b/lib/Slic3r/Fill.pm @@ -139,7 +139,7 @@ sub make_fill { my $density = $Slic3r::fill_density; my $flow_spacing = $Slic3r::flow_spacing; my $is_bridge = $layer->id > 0 && $surface->surface_type == S_TYPE_BOTTOM; - my $is_solid = grep { $surface->surface_type == $_ } S_TYPE_TOP, S_TYPE_BOTTOM, S_TYPE_INTERNALSOLID; + my $is_solid = (grep { $surface->surface_type == $_ } S_TYPE_TOP, S_TYPE_BOTTOM, S_TYPE_INTERNALSOLID) ? 1 : 0; # force 100% density and rectilinear fill for external surfaces if ($surface->surface_type != S_TYPE_INTERNAL) { diff --git a/lib/Slic3r/Layer.pm b/lib/Slic3r/Layer.pm index a37d224830..ec837b165c 100644 --- a/lib/Slic3r/Layer.pm +++ b/lib/Slic3r/Layer.pm @@ -347,7 +347,7 @@ sub prepare_fill_surfaces { # remove internal surfaces if ($Slic3r::fill_density == 0) { - @surfaces = grep $_->surface_type == S_TYPE_INTERNAL, @surfaces; + @surfaces = grep $_->surface_type != S_TYPE_INTERNAL, @surfaces; } $self->fill_surfaces([@surfaces]);