vispy.io.stl module

exception vispy.io.stl.HeaderError[source]

Bases: Exception

vispy.io.stl.load_stl(file_obj, file_type=None)[source]

Load an STL file from a file object.

Parameters
file_obj: open file- like object
file_type: not used
Returns
loaded: kwargs for a Trimesh constructor with keys:

vertices: (n,3) float, vertices faces: (m,3) int, indexes of vertices face_normals: (m,3) float, normal vector of each face

vispy.io.stl.load_stl_ascii(file_obj)[source]

Load an ASCII STL file from a file object.

Parameters
file_obj: open file- like object
Returns
loaded: kwargs for a Trimesh constructor with keys:

vertices: (n,3) float, vertices faces: (m,3) int, indexes of vertices face_normals: (m,3) float, normal vector of each face

vispy.io.stl.load_stl_binary(file_obj)[source]

Load a binary STL file from a file object.

Parameters
file_obj: open file- like object
Returns
loaded: kwargs for a Trimesh constructor with keys:

vertices: (n,3) float, vertices faces: (m,3) int, indexes of vertices face_normals: (m,3) float, normal vector of each face