Bugfix: detect thin fill loops so that they can be started at the nearest point without unnecessary loops. #1990
This commit is contained in:
parent
abdf6531f1
commit
2bce8bb745
1 changed files with 6 additions and 2 deletions
|
@ -180,8 +180,7 @@ sub make_perimeters {
|
|||
# and use zigzag).
|
||||
my $w = $gap_size->[2];
|
||||
my @filled = map {
|
||||
@{($_->isa('Slic3r::ExtrusionLoop') ? $_->split_at_first_point : $_)
|
||||
->polyline
|
||||
@{($_->isa('Slic3r::ExtrusionLoop') ? $_->polygon->split_at_first_point : $_->polyline)
|
||||
->grow(scale $w/2)};
|
||||
} @gap_fill;
|
||||
@last = @{diff(\@last, \@filled)};
|
||||
|
@ -438,6 +437,11 @@ sub _fill_gaps {
|
|||
my $loop = Slic3r::ExtrusionLoop->new;
|
||||
$loop->append(Slic3r::ExtrusionPath->new(polyline => $polylines[$i]->split_at_first_point, %path_args));
|
||||
$polylines[$i] = $loop;
|
||||
} elsif ($polylines[$i]->is_valid && $polylines[$i]->first_point->coincides_with($polylines[$i]->last_point)) {
|
||||
# since medial_axis() now returns only Polyline objects, detect loops here
|
||||
my $loop = Slic3r::ExtrusionLoop->new;
|
||||
$loop->append(Slic3r::ExtrusionPath->new(polyline => $polylines[$i], %path_args));
|
||||
$polylines[$i] = $loop;
|
||||
} else {
|
||||
$polylines[$i] = Slic3r::ExtrusionPath->new(polyline => $polylines[$i], %path_args);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue