From 4da71e8f135f5ba696411db9c2c0aaa973159f9f Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Tue, 14 Jan 2014 12:49:07 +0100 Subject: [PATCH] Fix tests in stable after stronger type checking was applied --- lib/Slic3r/Polygon.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Slic3r/Polygon.pm b/lib/Slic3r/Polygon.pm index 963c13fa2..4e0d15c59 100644 --- a/lib/Slic3r/Polygon.pm +++ b/lib/Slic3r/Polygon.pm @@ -42,7 +42,10 @@ sub grow { # original orientation sub simplify { my $self = shift; - return @{Slic3r::Geometry::Clipper::simplify_polygons([ $self->SUPER::simplify(@_) ])}; + my $tolerance = shift || 10; + + my $simplified = Boost::Geometry::Utils::linestring_simplify($self->pp, $tolerance); + return @{Slic3r::Geometry::Clipper::simplify_polygons([ $simplified ])}; } # this method subdivides the polygon segments to that no one of them