mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-04 06:54:04 +08:00
Fixed regression causing random extrudates outside the object perimeter
This commit is contained in:
parent
9e77e6e8b6
commit
3714fbe0f9
@ -136,10 +136,10 @@ sub make_surfaces {
|
|||||||
my $self = shift;
|
my $self = shift;
|
||||||
my ($loops) = @_;
|
my ($loops) = @_;
|
||||||
|
|
||||||
my $safety_offset = scale 0.1;
|
|
||||||
{
|
{
|
||||||
|
my $safety_offset = scale 0.1;
|
||||||
# merge everything
|
# merge everything
|
||||||
my $expolygons = union_ex(safety_offset($loops, $safety_offset));
|
my $expolygons = [ map $_->offset_ex(-$safety_offset), @{union_ex(safety_offset($loops, $safety_offset))} ];
|
||||||
|
|
||||||
Slic3r::debugf " %d surface(s) having %d holes detected from %d polylines\n",
|
Slic3r::debugf " %d surface(s) having %d holes detected from %d polylines\n",
|
||||||
scalar(@$expolygons), scalar(map $_->holes, @$expolygons), scalar(@$loops);
|
scalar(@$expolygons), scalar(map $_->holes, @$expolygons), scalar(@$loops);
|
||||||
@ -158,7 +158,7 @@ sub make_surfaces {
|
|||||||
push @{$self->slices}, map Slic3r::Surface->new
|
push @{$self->slices}, map Slic3r::Surface->new
|
||||||
(expolygon => $_, surface_type => S_TYPE_INTERNAL),
|
(expolygon => $_, surface_type => S_TYPE_INTERNAL),
|
||||||
map $_->offset_ex(+$distance),
|
map $_->offset_ex(+$distance),
|
||||||
$surface->expolygon->offset_ex(-2*$distance - $safety_offset);
|
$surface->expolygon->offset_ex(-2*$distance);
|
||||||
}
|
}
|
||||||
|
|
||||||
# now detect thin walls by re-outgrowing offsetted surfaces and subtracting
|
# now detect thin walls by re-outgrowing offsetted surfaces and subtracting
|
||||||
|
Loading…
x
Reference in New Issue
Block a user