From 5c7b447f07e892912b38378c9ef6d75c7dd6defb Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 23 Jun 2013 00:20:52 +0200 Subject: [PATCH] Ensure there's no numerical error when searching for concave points --- lib/Slic3r/Polygon.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/Polygon.pm b/lib/Slic3r/Polygon.pm index aa57247be..f743ac543 100644 --- a/lib/Slic3r/Polygon.pm +++ b/lib/Slic3r/Polygon.pm @@ -7,7 +7,7 @@ use parent 'Slic3r::Polyline'; use Slic3r::Geometry qw(polygon_lines polygon_remove_parallel_continuous_edges polygon_remove_acute_vertices polygon_segment_having_point point_in_polygon - PI X1 X2 Y1 Y2); + PI X1 X2 Y1 Y2 epsilon); use Slic3r::Geometry::Clipper qw(JT_MITER); sub lines { @@ -159,7 +159,7 @@ sub concave_points { my $self = shift; return map $self->[$_], - grep Slic3r::Geometry::angle3points(@$self[$_, $_-1, $_+1]) < PI, + grep Slic3r::Geometry::angle3points(@$self[$_, $_-1, $_+1]) < PI - epsilon, -1 .. ($#$self-1); }