diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2011-11-27 13:12:44 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2011-11-27 13:12:44 +0400 |
commit | 4cdd0f6fd0452173fac55895c8f01ec3896cf97b (patch) | |
tree | 2377e6cd8f4d9c943d6de2918799ea76cf37b5eb /lib/Slic3r/Print.pm | |
parent | 22551b64de05a4f53997b428d574554a8dd2390b (diff) |
Bugfix: sparse and wrong infill was generated for objects with null fill density. Also fixed a division by zero.
Diffstat (limited to 'lib/Slic3r/Print.pm')
-rw-r--r-- | lib/Slic3r/Print.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Slic3r/Print.pm b/lib/Slic3r/Print.pm index 1a13c4ea6..7835d746c 100644 --- a/lib/Slic3r/Print.pm +++ b/lib/Slic3r/Print.pm @@ -171,6 +171,13 @@ sub detect_surfaces_type { Slic3r::debugf " layer %d has %d bottom, %d top and %d internal surfaces\n", $layer->id, scalar(@bottom), scalar(@top), scalar(@internal); } + + # remove internal surfaces if no infill is requested + if ($Slic3r::fill_density == 0) { + foreach my $layer (@{$self->layers}) { + @{$layer->surfaces} = grep $_->surface_type ne 'internal', @{$layer->surfaces}; + } + } } sub discover_horizontal_shells { |