Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t/thin.t
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2014-05-21 17:03:31 +0400
committerAlessandro Ranellucci <aar@cpan.org>2014-05-21 17:03:31 +0400
commit08279ec5d8b4ae01b6c09fca8b8e02b146d0de7d (patch)
tree120e18930a0eebdf1948206603fa5047f4d46d99 /t/thin.t
parenta8b6e327671237f516023ba5bd0b75bd998d6cbe (diff)
Bugfix: thin walls forming a closed loop had overlapping segments at their endpoints. #1948 #1875
Diffstat (limited to 't/thin.t')
-rw-r--r--t/thin.t6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/thin.t b/t/thin.t
index eb31b6e29..e02e1b33d 100644
--- a/t/thin.t
+++ b/t/thin.t
@@ -1,4 +1,4 @@
-use Test::More tests => 11;
+use Test::More tests => 13;
use strict;
use warnings;
@@ -62,7 +62,9 @@ if (0) {
);
my $expolygon = Slic3r::ExPolygon->new($square, $hole_in_square);
my $res = $expolygon->medial_axis(scale 1, scale 0.5);
- is scalar(@$res), 1, 'medial axis of a square shape is a single closed loop';
+ is scalar(@$res), 1, 'medial axis of a square shape is a single path';
+ isa_ok $res->[0], 'Slic3r::Polyline', 'medial axis result is a polyline';
+ ok $res->[0]->first_point->coincides_with($res->[0]->last_point), 'polyline forms a closed loop';
ok $res->[0]->length > $hole_in_square->length && $res->[0]->length < $square->length,
'medial axis loop has reasonable length';
}