One more test about polygon simplification
This commit is contained in:
parent
b5426ad297
commit
9433048873
1 changed files with 4 additions and 1 deletions
|
@ -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';
|
||||
}
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue