mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-23 22:54:08 -06:00
Bugfix: some islands having ho holes and contained in holes themselves were ignored
This commit is contained in:
parent
47df3f8f2d
commit
a86bc260e7
4 changed files with 47 additions and 12 deletions
|
@ -5,7 +5,7 @@ use warnings;
|
|||
require Exporter;
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT_OK = qw(explode_expolygon explode_expolygons safety_offset offset
|
||||
diff_ex diff union_ex intersection_ex PFT_EVENODD JT_MITER JT_ROUND
|
||||
diff_ex diff union_ex intersection_ex xor_ex PFT_EVENODD JT_MITER JT_ROUND
|
||||
is_counter_clockwise);
|
||||
|
||||
use Math::Clipper 1.02 ':all';
|
||||
|
@ -66,4 +66,16 @@ sub intersection_ex {
|
|||
];
|
||||
}
|
||||
|
||||
sub xor_ex {
|
||||
my ($subject, $clip, $jointype) = @_;
|
||||
$jointype = PFT_NONZERO unless defined $jointype;
|
||||
$clipper->clear;
|
||||
$clipper->add_subject_polygons($subject);
|
||||
$clipper->add_clip_polygons($clip);
|
||||
return [
|
||||
map Slic3r::ExPolygon->new($_),
|
||||
@{ $clipper->ex_execute(CT_XOR, $jointype, $jointype) },
|
||||
];
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue