Fixed regression preventing split from working. #395
This commit is contained in:
parent
8cca3a6b28
commit
0e39a89d01
1 changed files with 3 additions and 3 deletions
|
@ -183,7 +183,7 @@ sub _write_binary {
|
|||
foreach my $facet (@{$mesh->facets}) {
|
||||
print $fh pack '(f<3)4S',
|
||||
@{_facet_normal($mesh, $facet)},
|
||||
(map @{$mesh->vertices->[$_]}, @$facet[1,2,3]),
|
||||
(map @{$mesh->vertices->[$_]}, @$facet[-3..-1]),
|
||||
0;
|
||||
}
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ sub _write_ascii {
|
|||
foreach my $facet (@{$mesh->facets}) {
|
||||
printf $fh " facet normal %f %f %f\n", @{_facet_normal($mesh, $facet)};
|
||||
printf $fh " outer loop\n";
|
||||
printf $fh " vertex %f %f %f\n", @{$mesh->vertices->[$_]} for @$facet[1,2,3];
|
||||
printf $fh " vertex %f %f %f\n", @{$mesh->vertices->[$_]} for @$facet[-3..-1];
|
||||
printf $fh " endloop\n";
|
||||
printf $fh " endfacet\n";
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ sub _write_ascii {
|
|||
|
||||
sub _facet_normal {
|
||||
my ($mesh, $facet) = @_;
|
||||
return triangle_normal(map $mesh->vertices->[$_], @$facet[1,2,3]);
|
||||
return triangle_normal(map $mesh->vertices->[$_], @$facet[-3..-1]);
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
Loading…
Reference in a new issue