mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-10-21 14:09:54 +02:00
Ported intersect_expolygons() and subtract_expolygons() to XS
This commit is contained in:
1 parent
5f81292f3f
commit
761f261a68
11 files changed
+95
-29
No files matched your search
@@ -27,22 +27,6 @@ sub clip_with_expolygon {
|
||||
$self->polyline->clip_with_expolygon($expolygon);
|
||||
}
|
||||
|
||||
sub intersect_expolygons {
|
||||
my $self = shift;
|
||||
my ($expolygons_pp) = @_;
|
||||
|
||||
return map $self->clone(polyline => Slic3r::Polyline->new(@$_)),
|
||||
@{Boost::Geometry::Utils::multi_polygon_multi_linestring_intersection($expolygons_pp, [$self->pp])};
|
||||
}
|
||||
|
||||
sub subtract_expolygons {
|
||||
my $self = shift;
|
||||
my ($expolygons_pp) = @_;
|
||||
|
||||
return map $self->clone(polyline => Slic3r::Polyline->new(@$_)),
|
||||
@{Boost::Geometry::Utils::multi_linestring_multi_polygon_difference([$self->pp], $expolygons_pp)};
|
||||
}
|
||||
|
||||
sub simplify {
|
||||
my $self = shift;
|
||||
$self->polyline($self->polyline->simplify(@_));
|
||||
|
||||
Reference in new issue
Block a user