account for extrusion width when clearing layers for combined infill

Otherwise you get extraneous fill up against sloped walls in regions
of layers that should not have fill, like in #834.
internal-support
Mike Sheldrake 2013-02-16 07:53:47 -08:00
parent f46226b32f
commit 9a86edc70c
1 changed files with 7 additions and 1 deletions

View File

@ -565,6 +565,12 @@ sub combine_infill {
# $intersection now contains the regions that can be combined across the full amount of layers
# so let's remove those areas from all layers
my @intersection_with_clearance = map $_->offset(
$layerms[-1]->infill_flow->scaled_width / 2
+ $layerms[-1]->perimeter_flow->scaled_width / 2
), @$intersection;
foreach my $layerm (@layerms) {
my @this_type = grep $_->surface_type == $type, @{$layerm->fill_surfaces};
my @other_types = grep $_->surface_type != $type, @{$layerm->fill_surfaces};
@ -572,7 +578,7 @@ sub combine_infill {
@this_type = map Slic3r::Surface->new(expolygon => $_, surface_type => $type),
@{diff_ex(
[ map @{$_->expolygon}, @this_type ],
[ map @$_, @$intersection ],
[ @intersection_with_clearance ],
)};
# apply surfaces back with adjusted depth to the uppermost layer