API Reference¶
The primary entry point is stl.Mesh, which inherits
from BaseStl and BaseMesh.
Enumerations¶
- class stl.Mode(*values)[source]¶
STL file format mode for loading and saving.
Use
AUTOMATICfor auto-detection (default),ASCIIto force ASCII format, orBINARYto force binary format.- AUTOMATIC = 0¶
Automatically detect whether the output is a TTY, if so, write ASCII otherwise write BINARY
- ASCII = 1¶
Force writing ASCII
- BINARY = 2¶
Force writing BINARY
- class stl.Dimension(*values)[source]¶
Named indices for X/Y/Z axes.
- X = 0¶
X index (for example, mesh.v0[0][X])
- Y = 1¶
Y index (for example, mesh.v0[0][Y])
- Z = 2¶
Z index (for example, mesh.v0[0][Z])
- class stl.RemoveDuplicates(*values)[source]¶
Strategy for handling duplicate triangles.
Use with
BaseMesh.remove_duplicate_polygons().- NONE = 0¶
- SINGLE = 1¶
- ALL = 2¶
Constants¶
- stl.HEADER_SIZE¶
Size of the binary STL header in bytes (80).
- stl.COUNT_SIZE¶
Size of the triangle count field in bytes (4).
- stl.MAX_COUNT¶
Maximum number of triangles in a binary STL file (100,000,000).