Skip to content

Commit 7869762

Browse files
committed
::Lattice points must be 3,x,y
1 parent 02f63d9 commit 7869762

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/PDL/Graphics/TriD/Objects.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ sub new {
254254
$colors = $this->normalise_as("COLOR",$colors,$points);
255255
$options = $this->{Options};
256256
my $shading = $options->{Shading};
257-
my (undef, $x, $y, @extradims) = $points->dims;
257+
my ($tri, $x, $y, @extradims) = $points->dims;
258+
PDL::barf "Lattice: points must be 3,x,y: got ($x $y @extradims)" if @extradims or $tri != 3;
258259
if ($shading) {
259260
my $inds = PDL::ulong(0,1,$x,$x+1,$x,1)->slice(',*'.($x-1).',*'.($y-1));
260261
$inds = $inds->dupN(1,1,@extradims) if @extradims;

0 commit comments

Comments
 (0)