mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-10-21 22:20:02 +02:00
Ported diff_ex() to XS
This commit is contained in:
1 parent
898007fc36
commit
79db996696
3 files changed
+49
-17
No files matched your search
@@ -45,18 +45,6 @@ sub offset2 {
|
||||
return @$offsets;
|
||||
}
|
||||
|
||||
sub diff_ex {
|
||||
my ($subject, $clip, $safety_offset) = @_;
|
||||
|
||||
$clipper->clear;
|
||||
$clipper->add_subject_polygons(_convert($subject));
|
||||
$clipper->add_clip_polygons($safety_offset ? _convert(safety_offset($clip)) : _convert($clip));
|
||||
return [
|
||||
map Slic3r::ExPolygon->new($_->{outer}, @{$_->{holes}}),
|
||||
@{ $clipper->ex_execute(CT_DIFFERENCE, PFT_NONZERO, PFT_NONZERO) },
|
||||
];
|
||||
}
|
||||
|
||||
sub diff {
|
||||
my ($subject, $clip, $safety_offset) = @_;
|
||||
|
||||
|
||||
Reference in new issue
Block a user