One more test about polygon simplification

This commit is contained in:
Alessandro Ranellucci 2013-07-19 22:49:39 +02:00
parent b5426ad297
commit 9433048873

View file

@ -2,7 +2,7 @@ use Test::More;
use strict;
use warnings;
plan tests => 7;
plan tests => 8;
BEGIN {
use FindBin;
@ -79,6 +79,9 @@ use Slic3r;
ok @simplified == 1, 'gear simplified to a single polygon';
note sprintf "original points: %d\nnew points: %d", $num_points, scalar(@{$simplified[0]});
ok @{$simplified[0]} < $num_points, 'gear was further simplified using Douglas-Peucker';
my @simplified_ex = Slic3r::ExPolygon->new($polygon)->simplify(10);
is_deeply \@simplified_ex, [ \@simplified ], 'simplified polygon equals simplified expolygon';
}
{