mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 07:03:59 -06:00
Added failing test case for troubleshooting unexpected filled holes. #858
This commit is contained in:
parent
de5b8b9f4d
commit
6e6bc74636
4 changed files with 79 additions and 15 deletions
|
@ -7,7 +7,8 @@ our @ISA = qw(Exporter);
|
|||
our @EXPORT_OK = qw(_eq);
|
||||
|
||||
use IO::Scalar;
|
||||
use Slic3r::Geometry qw(epsilon);
|
||||
use List::Util qw(first);
|
||||
use Slic3r::Geometry qw(epsilon X Y Z);
|
||||
|
||||
my %cuboids = (
|
||||
'20mm_cube' => [20,20,20],
|
||||
|
@ -58,6 +59,20 @@ sub _eq {
|
|||
return abs($a - $b) < epsilon;
|
||||
}
|
||||
|
||||
sub add_facet {
|
||||
my ($facet, $vertices, $facets) = @_;
|
||||
|
||||
push @$facets, [];
|
||||
for my $i (0..2) {
|
||||
my $v = first { $vertices->[$_][X] == $facet->[$i][X] && $vertices->[$_][Y] == $facet->[$i][Y] && $vertices->[$_][Z] == $facet->[$i][Z] } 0..$#$vertices;
|
||||
if (!defined $v) {
|
||||
push @$vertices, [ @{$facet->[$i]}[X,Y,Z] ];
|
||||
$v = $#$vertices;
|
||||
}
|
||||
$facets->[-1][$i] = $v;
|
||||
}
|
||||
}
|
||||
|
||||
package Slic3r::Test::GCodeReader;
|
||||
use Moo;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue