def vertex_normals(self): r""" Normal at each point. :type: (`n_points`, 3) ndarray Compute the per-vertex normals from the current set of points and triangle list. Only valid for 3D dimensional meshes. Raises ------ DimensionalityError If mesh is not 3D """ if self.n_dims != 3: raise ValueError("Normals are only valid for 3D meshes") return compute_normals(self.points, self.trilist)[0]
def face_normals(self): r""" Normal at each face. :type: (``n_tris``, 3) ndarray Compute the face normals from the current set of points and triangle list. Only valid for 3D dimensional meshes. Raises ------ DimensionalityError If mesh is not 3D """ if self.n_dims != 3: raise DimensionalityError("Normals are only valid for 3D meshes") return compute_normals(self.points, self.trilist)[1]