Bugfix: Clipper error occurred under certain circumstances

This commit is contained in:
Alessandro Ranellucci 2011-12-01 19:40:45 +01:00
parent b03afc7f1c
commit 133f3a0495
2 changed files with 10 additions and 4 deletions

View file

@ -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]) },
);
}