mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
Collect undetected lines (caused by dirty or non-manifold models), warn the user, post debug info. Includes some further ExPolygon refactoring.
This commit is contained in:
@@ -5,7 +5,7 @@ use warnings;
|
||||
require Exporter;
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT_OK = qw(explode_expolygon explode_expolygons safety_offset
|
||||
diff_ex diff union_ex intersection_ex);
|
||||
diff_ex diff union_ex intersection_ex PFT_EVENODD);
|
||||
|
||||
use Math::Clipper 1.02 ':all';
|
||||
our $clipper = Math::Clipper->new;
|
||||
@@ -39,10 +39,14 @@ sub diff {
|
||||
}
|
||||
|
||||
sub union_ex {
|
||||
my ($polygons) = @_;
|
||||
my ($polygons, $jointype) = @_;
|
||||
$jointype = PFT_NONZERO unless defined $jointype;
|
||||
$clipper->clear;
|
||||
$clipper->add_subject_polygons($polygons);
|
||||
return $clipper->ex_execute(CT_UNION, PFT_NONZERO, PFT_NONZERO);
|
||||
return [
|
||||
map Slic3r::ExPolygon->new($_),
|
||||
@{ $clipper->ex_execute(CT_UNION, $jointype, $jointype) },
|
||||
];
|
||||
}
|
||||
|
||||
sub intersection_ex {
|
||||
|
||||
Reference in New Issue
Block a user