Bugfix: solid-infill-below-area wasn't ignored when fill_density = 0, causing solid layers here and there. #1049

This commit is contained in:
Alessandro Ranellucci 2013-03-26 15:47:40 +01:00
parent 2f046799f2
commit aae9625a13
2 changed files with 19 additions and 1 deletions

View file

@ -462,7 +462,7 @@ sub prepare_fill_surfaces {
}
# turn too small internal regions into solid regions according to the user setting
{
if ($Slic3r::Config->fill_density > 0) {
my $min_area = scale scale $Slic3r::Config->solid_infill_below_area; # scaling an area requires two calls!
my @small = grep $_->surface_type == S_TYPE_INTERNAL && $_->expolygon->contour->area <= $min_area, @{$self->fill_surfaces};
$_->surface_type(S_TYPE_INTERNALSOLID) for @small;

View file

@ -95,4 +95,22 @@ sub scale_points (@) { map [scale $_->[X], scale $_->[Y]], @_ }
ok Slic3r::Test::gcode($print), 'successful hilbertcurve infill generation';
}
{
my $config = Slic3r::Config->new_from_defaults;
$config->set('skirts', 0);
$config->set('perimeters', 0);
$config->set('fill_density', 0);
$config->set('top_solid_layers', 0);
$config->set('bottom_solid_layers', 0);
$config->set('solid_infill_below_area', 20000000);
my $print = Slic3r::Test::init_print('20mm_cube', config => $config);
Slic3r::Test::GCodeReader->new(gcode => Slic3r::Test::gcode($print))->parse(sub {
my ($self, $cmd, $args, $info) = @_;
fail "solid_infill_below_area should be ignored when fill_density is 0"
if $info->{extruding};
});
}
__END__