Commit a473baa7 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

BF: Handle de-generate case of a surface which contains a single triangle

parent 3c57660e
......@@ -229,7 +229,7 @@ def loadGiftiMesh(filename):
'at least one pointset array'.format(filename))
vertices = [ps.data for ps in pointsets]
indices = triangles[0].data
indices = np.atleast_2d(triangles[0].data)
if len(vdata) == 0: vdata = None
else: vdata = prepareGiftiVertexData(vdata, filename)
......
......@@ -687,7 +687,7 @@ def calcFaceNormals(vertices, indices):
fnormals = np.cross((v1 - v0), (v2 - v0))
fnormals = affine.normalise(fnormals)
return fnormals
return np.atleast_2d(fnormals)
def calcVertexNormals(vertices, indices, fnormals):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment