Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2011-11-12 14:05:32 +0400
committerAlessandro Ranellucci <aar@cpan.org>2011-11-12 14:05:32 +0400
commita13e4c6fb56794ba49fbbb27dcd67ba32d009501 (patch)
tree8a9fb4f9e6aadf6a9627db3fbb5340a30690153a /lib/Slic3r/Geometry
parentc5d5e4d244f049ef9068f3b13370577774916cc2 (diff)
Detect membranes (solid parts generating both a bottom and a top surface on the same layers) and don't infill twice. #28
Diffstat (limited to 'lib/Slic3r/Geometry')
-rw-r--r--lib/Slic3r/Geometry/Clipper.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Slic3r/Geometry/Clipper.pm b/lib/Slic3r/Geometry/Clipper.pm
index 4899d1960..aeacab661 100644
--- a/lib/Slic3r/Geometry/Clipper.pm
+++ b/lib/Slic3r/Geometry/Clipper.pm
@@ -50,12 +50,15 @@ sub union_ex {
}
sub intersection_ex {
- my ($subject, $clip) = @_;
-
+ my ($subject, $clip, $jointype) = @_;
+ $jointype = PFT_NONZERO unless defined $jointype;
$clipper->clear;
$clipper->add_subject_polygons($subject);
$clipper->add_clip_polygons($clip);
- return $clipper->ex_execute(CT_INTERSECTION, PFT_NONZERO, PFT_NONZERO);
+ return [
+ map Slic3r::ExPolygon->new($_),
+ @{ $clipper->ex_execute(CT_INTERSECTION, $jointype, $jointype) },
+ ];
}
1;