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-12-01 22:40:45 +0400
committerAlessandro Ranellucci <aar@cpan.org>2011-12-01 22:40:45 +0400
commit133f3a0495ed293c8dfbfbd61347921711fa28b5 (patch)
tree1e5eef39ed6499a7a4e472d1c528824a3ed3b9e8 /lib/Slic3r/ExPolygon.pm
parentb03afc7f1cbcb3920ba3902aae8046db9f1df7da (diff)
Bugfix: Clipper error occurred under certain circumstances
Diffstat (limited to 'lib/Slic3r/ExPolygon.pm')
-rw-r--r--lib/Slic3r/ExPolygon.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Slic3r/ExPolygon.pm b/lib/Slic3r/ExPolygon.pm
index ba46f7095..6fc391a41 100644
--- a/lib/Slic3r/ExPolygon.pm
+++ b/lib/Slic3r/ExPolygon.pm
@@ -55,8 +55,14 @@ sub offset {
sub safety_offset {
my $self = shift;
+
+ # we're offsetting contour and holes separately
+ # because Clipper doesn't return polygons in the same order as
+ # we feed them to it
+
return (ref $self)->new(
- @{ Slic3r::Geometry::Clipper::safety_offset([@$self]) },
+ $self->contour->safety_offset,
+ @{ Slic3r::Geometry::Clipper::safety_offset([$self->holes]) },
);
}