Skip to content

Commit

Permalink
Change the behaviour of infill/perimeter overlap to handle some edge …
Browse files Browse the repository at this point in the history
…cases. #2632
  • Loading branch information
alranel committed Feb 23, 2015
1 parent e88cf46 commit 7a695a4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/Slic3r/Layer/PerimeterGenerator.pm
Expand Up @@ -311,12 +311,22 @@ sub process {
# we offset by half the perimeter spacing (to get to the actual infill boundary)
# and then we offset back and forth by half the infill spacing to only consider the
# non-collapsing regions
my $inset = 0;
if ($loop_number == 0) {
# one loop
$inset += $ext_pspacing/2;
} elsif ($loop_number > 0) {
# two or more loops
$inset += $pspacing/2;
}
$inset -= $self->config->get_abs_value_over('infill_overlap', $pwidth);

my $min_perimeter_infill_spacing = $ispacing * (1 - &Slic3r::INSET_OVERLAP_TOLERANCE);
$self->fill_surfaces->append($_)
for map Slic3r::Surface->new(expolygon => $_, surface_type => S_TYPE_INTERNAL), # use a bogus surface type
@{offset2_ex(
[ map @{$_->simplify_p(&Slic3r::SCALED_RESOLUTION)}, @{union_ex(\@last)} ],
-($pspacing/2 - $self->config->get_abs_value_over('infill_overlap', $pwidth) + $min_perimeter_infill_spacing/2),
-$inset -$min_perimeter_infill_spacing/2,
+$min_perimeter_infill_spacing/2,
)};
}
Expand Down

0 comments on commit 7a695a4

Please sign in to comment.