mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-12 15:59:00 +08:00
One more test about polygon simplification
This commit is contained in:
parent
b5426ad297
commit
9433048873
@ -2,7 +2,7 @@ use Test::More;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
plan tests => 7;
|
plan tests => 8;
|
||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
use FindBin;
|
use FindBin;
|
||||||
@ -79,6 +79,9 @@ use Slic3r;
|
|||||||
ok @simplified == 1, 'gear simplified to a single polygon';
|
ok @simplified == 1, 'gear simplified to a single polygon';
|
||||||
note sprintf "original points: %d\nnew points: %d", $num_points, scalar(@{$simplified[0]});
|
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';
|
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…
x
Reference in New Issue
Block a user