Fixed regression in --infill-only-where-needed. Includes a minimal test suite for such feature. #1871

Conflicts:

	t/fill.t
This commit is contained in:
Alessandro Ranellucci 2014-04-18 21:40:27 +02:00
parent 15628a90ed
commit 62e19469bc
3 changed files with 54 additions and 8 deletions

View file

@ -566,7 +566,7 @@ sub clip_fill_surfaces {
# We only want infill under ceilings; this is almost like an
# internal support material.
my $additional_margin = scale 3;
my $additional_margin = scale 3*0;
my $overhangs = []; # arrayref of polygons
for my $layer_id (reverse 0..$#{$self->layers}) {
@ -605,10 +605,11 @@ sub clip_fill_surfaces {
# (thus we also consider perimeters)
if ($layer_id > 0) {
my $solid = diff(
[ map @$_, @{$layer->slices} ],
[ map $_->p, map @{$_->fill_surfaces}, @{$layer->regions} ],
[ map $_->p, @layer_internal ],
);
$overhangs = offset($solid, +$additional_margin);
push @$overhangs, map $_->p, @new_internal; # propagate upper overhangs
}
}