Prevent internal infill at all when fill density is set to zero. #545
This commit is contained in:
parent
1fdbd2c0e1
commit
f899deb6b6
@ -379,6 +379,16 @@ sub prepare_fill_surfaces {
|
||||
my $self = shift;
|
||||
|
||||
my @surfaces = @{$self->surfaces};
|
||||
|
||||
# if no solid layers are requested, turn top/bottom surfaces to internal
|
||||
if ($Slic3r::solid_layers == 0) {
|
||||
$_->surface_type(S_TYPE_INTERNAL) for grep $_->surface_type != S_TYPE_INTERNAL, @surfaces;
|
||||
}
|
||||
|
||||
# if hollow object is requested, remove internal surfaces
|
||||
if ($Slic3r::fill_density == 0) {
|
||||
@surfaces = grep $_->surface_type != S_TYPE_INTERNAL, @surfaces;
|
||||
}
|
||||
|
||||
# merge too small internal surfaces with their surrounding tops
|
||||
# (if they're too small, they can be treated as solid)
|
||||
@ -400,16 +410,6 @@ sub prepare_fill_surfaces {
|
||||
@surfaces = (grep($_->surface_type != S_TYPE_TOP, @surfaces), @top);
|
||||
}
|
||||
|
||||
# remove top/bottom surfaces
|
||||
if ($Slic3r::solid_layers == 0) {
|
||||
$_->surface_type(S_TYPE_INTERNAL) for grep $_->surface_type != S_TYPE_INTERNAL, @surfaces;
|
||||
}
|
||||
|
||||
# remove internal surfaces
|
||||
if ($Slic3r::fill_density == 0) {
|
||||
@surfaces = grep $_->surface_type != S_TYPE_INTERNAL, @surfaces;
|
||||
}
|
||||
|
||||
$self->fill_surfaces([@surfaces]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user