.STL
Stereolithography
Introduction
STL was created by 3D Systems in 1987 for its stereolithography printers, and it is still the most common format for 3D printing. An STL file holds one thing: a surface made of triangles. It has no colours, materials or units, so a model in millimetres and one in inches look the same to the file.
There are two forms. ASCII STL is readable text; binary STL is smaller and far more common.
Software
- PrusaSlicer (Windows, macOS, Linux)
- UltiMaker Cura (Windows, macOS, Linux)
- Bambu Studio (Windows, macOS, Linux)
- OrcaSlicer (Windows, macOS, Linux)
- Blender (Windows, macOS, Linux)
- MeshLab (Windows, macOS, Linux)
- FreeCAD (Windows, macOS, Linux)
- Autodesk Fusion (Windows, macOS)
Structure
A binary STL file starts with an 80-byte header that readers ignore, then a 32-bit count of triangles. Each triangle follows in 50 bytes: a normal and three corner positions, each three 32-bit little-endian floats, then a 16-bit attribute byte count that is normally zero.
0Header free text, ignored by readers80 bytes80Count number of triangles, unsigned 32-bit4 bytes84Triangles one after another50 bytes each+0Normal x, y, z as floats12 bytes+12Vertices three corners, x, y, z each36 bytes+48Attribute byte count usually 02 bytes
ASCII STL wraps the same data in keywords. It begins with solid, so a
reader cannot rely on that word alone: some binary files also start their header with
it. Comparing the file size with 84 + 50 × count tells the two apart.
solid part
facet normal 0 0 1
outer loop
vertex 0 0 0
vertex 1 0 0
vertex 0 1 0
endloop
endfacet
endsolid part