Bugfix: incomplete slicing when a horizontal surface was tangent to the slicing plane and it shared an edge with an adjacent volume. #1672

Conflicts:

	xs/src/TriangleMesh.cpp
This commit is contained in:
Alessandro Ranellucci
2014-01-13 00:45:19 +01:00
parent a712284afb
commit 2d9c399d96
3 changed files with 28 additions and 12 deletions

View File

@@ -4,7 +4,8 @@ use strict;
use warnings;
use Slic3r::XS;
use Test::More tests => 52;
use List::Util qw(sum);
use Test::More tests => 53;
is Slic3r::TriangleMesh::hello_world(), 'Hello world!',
'hello world';
@@ -96,6 +97,7 @@ my $cube = {
);
$m->repair;
my $slices = $m->slice([ 5, 10 ]);
is $slices->[0][0]->area, $slices->[1][0]->area, 'slicing a tangent plane includes its area';
is sum(map $_->area, @{$slices->[0]}), sum(map $_->area, @{$slices->[1]}),
'slicing a tangent plane includes its area';
}
__END__