Ported Polygon->is_counter_clockwise() and rearranged code in .cpp files
This commit is contained in:
parent
bd3fb21cfd
commit
fe061b19ad
27 changed files with 675 additions and 660 deletions
|
@ -4,7 +4,7 @@ use strict;
|
|||
use warnings;
|
||||
|
||||
use Slic3r::XS;
|
||||
use Test::More tests => 6;
|
||||
use Test::More tests => 8;
|
||||
|
||||
my $square = [ # ccw
|
||||
[100, 100],
|
||||
|
@ -30,4 +30,11 @@ is_deeply [ map $_->pp, @$lines ], [
|
|||
is_deeply $polygon->split_at_first_point->pp, [ @$square[0,1,2,3,0] ], 'split_at_first_point';
|
||||
is_deeply $polygon->split_at_index(2)->pp, [ @$square[2,3,0,1,2] ], 'split_at_index';
|
||||
|
||||
ok $polygon->is_counter_clockwise, 'is_counter_clockwise';
|
||||
{
|
||||
my $clone = $polygon->clone;
|
||||
$clone->reverse;
|
||||
ok !$clone->is_counter_clockwise, 'is_counter_clockwise';
|
||||
}
|
||||
|
||||
__END__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue