From a29eeb7789345054c4d2d26b787e5b6b1acc6cec Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 24 Nov 2013 00:59:45 +0100 Subject: [PATCH] Fix t/geometry.t --- lib/Slic3r/Geometry.pm | 2 +- t/geometry.t | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Slic3r/Geometry.pm b/lib/Slic3r/Geometry.pm index d16b53c1c..935dcbb42 100644 --- a/lib/Slic3r/Geometry.pm +++ b/lib/Slic3r/Geometry.pm @@ -16,7 +16,7 @@ our @EXPORT_OK = qw( dot perp polygon_points_visibility line_intersection bounding_box bounding_box_intersect angle3points three_points_aligned line_direction - chained_path collinear scale unscale + chained_path chained_path_from collinear scale unscale rad2deg_dir bounding_box_center line_intersects_any douglas_peucker polyline_remove_short_segments normal triangle_normal polygon_is_convex scaled_epsilon bounding_box_3D size_3D size_2D diff --git a/t/geometry.t b/t/geometry.t index 484455bcc..910535586 100644 --- a/t/geometry.t +++ b/t/geometry.t @@ -11,7 +11,7 @@ BEGIN { use Slic3r; use Slic3r::Geometry qw(PI polygon_is_convex - chained_path epsilon scale); + chained_path_from epsilon scale); #========================================================== @@ -162,7 +162,7 @@ my $polygons = [ # if chained_path() works correctly, these points should be joined with no diagonal paths # (thus 26 units long) my @points = map Slic3r::Point->new_scale(@$_), [26,26],[52,26],[0,26],[26,52],[26,0],[0,52],[52,52],[52,0]; - my @ordered = @points[@{chained_path(\@points, $points[0])}]; + my @ordered = @points[@{chained_path_from(\@points, $points[0])}]; ok !(grep { abs($ordered[$_]->distance_to($ordered[$_+1]) - scale 26) > epsilon } 0..$#ordered-1), 'chained_path'; }