Never scale TriangleMesh objects

This commit is contained in:
Alessandro Ranellucci 2013-11-23 19:25:33 +01:00
parent 46e3b3180e
commit e75dbf37fa
6 changed files with 33 additions and 16 deletions

View file

@ -80,9 +80,10 @@ my $cube = {
$m->repair;
my @z = (2,4,8,6,8,10,12,14,16,18,20);
my $result = $m->slice(\@z);
my $SCALING_FACTOR = 0.000001;
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';
is $result->[$i][0]->area, 20*20/($SCALING_FACTOR**2), 'size of returned polygon';
ok $result->[$i][0]->is_counter_clockwise, 'orientation of returned polygon';
}
}