mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-07 22:14:00 -06:00
New Slic3r::ExPolygon::XS class
This commit is contained in:
parent
c2d63bcd09
commit
5a11d4df89
9 changed files with 138 additions and 3 deletions
25
xs/t/04_expolygon.t
Normal file
25
xs/t/04_expolygon.t
Normal file
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Slic3r::XS;
|
||||
use Test::More tests => 1;
|
||||
|
||||
my $square = [ # ccw
|
||||
[100, 100],
|
||||
[200, 100],
|
||||
[200, 200],
|
||||
[100, 200],
|
||||
];
|
||||
my $hole_in_square = [ # cw
|
||||
[140, 140],
|
||||
[140, 160],
|
||||
[160, 160],
|
||||
[160, 140],
|
||||
];
|
||||
|
||||
my $expolygon = Slic3r::ExPolygon::XS->new($square, $hole_in_square);
|
||||
is_deeply [ @$expolygon ], [$square, $hole_in_square], 'expolygon roundtrip';
|
||||
|
||||
__END__
|
Loading…
Add table
Add a link
Reference in a new issue