diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2011-12-01 22:40:45 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2011-12-01 22:40:45 +0400 |
commit | 133f3a0495ed293c8dfbfbd61347921711fa28b5 (patch) | |
tree | 1e5eef39ed6499a7a4e472d1c528824a3ed3b9e8 /lib/Slic3r/ExPolygon.pm | |
parent | b03afc7f1cbcb3920ba3902aae8046db9f1df7da (diff) |
Bugfix: Clipper error occurred under certain circumstances
Diffstat (limited to 'lib/Slic3r/ExPolygon.pm')
-rw-r--r-- | lib/Slic3r/ExPolygon.pm | 8 |
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]) }, ); } |