mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
Ported diff_ex() to XS
This commit is contained in:
parent
898007fc36
commit
79db996696
3 changed files with 49 additions and 17 deletions
|
@ -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) = @_;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue