mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 03:43:52 +00:00
Some tests were failing
This commit is contained in:
14
t/clipper.t
14
t/clipper.t
@@ -1,4 +1,6 @@
|
||||
use Test::More;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
plan tests => 1;
|
||||
|
||||
@@ -20,7 +22,7 @@ my $hole_in_square = [ # cw
|
||||
[16, 14],
|
||||
];
|
||||
|
||||
my $square = [ # ccw
|
||||
my $square2 = [ # ccw
|
||||
[5, 12],
|
||||
[25, 12],
|
||||
[25, 18],
|
||||
@@ -28,7 +30,7 @@ my $square = [ # ccw
|
||||
];
|
||||
|
||||
$clipper->add_subject_polygons([ $square, $hole_in_square ]);
|
||||
$clipper->add_clip_polygons([ $square ]);
|
||||
$clipper->add_clip_polygons([ $square2 ]);
|
||||
my $intersection = $clipper->ex_execute(CT_INTERSECTION, PFT_NONZERO, PFT_NONZERO);
|
||||
|
||||
is_deeply $intersection, [
|
||||
@@ -42,10 +44,10 @@ is_deeply $intersection, [
|
||||
],
|
||||
],
|
||||
outer => [
|
||||
[5, 18],
|
||||
[5, 12],
|
||||
[25, 12],
|
||||
[25, 18],
|
||||
[10, 18],
|
||||
[10, 12],
|
||||
[20, 12],
|
||||
[20, 18],
|
||||
],
|
||||
},
|
||||
], 'hole is preserved after intersection';
|
||||
|
||||
Reference in New Issue
Block a user