Bugfix: some holes were skipped
This commit is contained in:
parent
4af295bce3
commit
e2a5c2119f
@ -105,14 +105,7 @@ sub make_surfaces {
|
|||||||
my ($loops) = @_;
|
my ($loops) = @_;
|
||||||
|
|
||||||
{
|
{
|
||||||
# merge contours
|
my $expolygons = union_ex($loops);
|
||||||
my $expolygons = union_ex([ grep is_counter_clockwise($_), @$loops ]);
|
|
||||||
|
|
||||||
# subtract holes
|
|
||||||
$expolygons = union_ex([
|
|
||||||
(map @$_, @$expolygons),
|
|
||||||
(grep !is_counter_clockwise($_), @$loops)
|
|
||||||
]);
|
|
||||||
|
|
||||||
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);
|
||||||
@ -134,11 +127,13 @@ sub make_surfaces {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#use Slic3r::SVG;
|
if (0) {
|
||||||
#Slic3r::SVG::output(undef, "surfaces.svg",
|
require "Slic3r/SVG.pm";
|
||||||
# polygons => [ map $_->contour->p, @{$self->surfaces} ],
|
Slic3r::SVG::output(undef, "surfaces.svg",
|
||||||
# red_polygons => [ map $_->p, map @{$_->holes}, @{$self->surfaces} ],
|
polygons => [ map $_->contour->p, @{$self->slices} ],
|
||||||
#);
|
red_polygons => [ map $_->p, map @{$_->holes}, @{$self->slices} ],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub prepare_fill_surfaces {
|
sub prepare_fill_surfaces {
|
||||||
|
Loading…
Reference in New Issue
Block a user