More porting work

This commit is contained in:
Alessandro Ranellucci 2013-09-08 00:44:01 +02:00
parent 5adb187dd2
commit 46bd407da4
3 changed files with 131 additions and 46 deletions

View file

@ -44,11 +44,17 @@ my $cube = {
ok abs($m->size->[0] - sqrt(2)*40) < 1E-4, 'rotate';
}
{
if (0) {
my $m = Slic3r::TriangleMesh::XS->new;
$m->ReadFromPerl($cube->{vertices}, $cube->{facets});
$m->Repair;
my $result = $m->slice([2,4,8,6,8,10,12,14,16,18,20]);
my @z = (2,4,8,6,8,10,12,14,16,18,20);
my $result = $m->slice(\@z);
for my $i (0..$#z) {
is scalar(@{$result->[$i]}), 1, 'number of returned polygons per layer';
is $result->[$i][0]->area, 20*20, 'size of returned polygon';
ok $result->[$i][0]->is_counter_clockwise, 'orientation of returned polygon';
}
}
__END__