Introduction
Binary STL is the form of the stereolithography format that slicers, CAD programs and model sites use almost everywhere. It stores each triangle in a fixed 50 bytes, so a file is much smaller than the same model in ASCII STL and quick to read.
The two bytes at the end of each triangle are officially an attribute byte count and normally zero. Some programs use them for a colour per triangle, but there is no agreed way to do so.
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.
The file size is therefore exactly 84 + 50 × count.
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
In this reference
- File layout – the header, the count and the 50-byte triangle record, with a worked byte example
- Colour extensions – the VisCAM and SolidView facet colour and the Materialise Magics header and facet colours
Variants
- ASCII STL – the text form of STL: each triangle a facet of three vertex lines
- Binary STL – the usual form of STL: a header, a count, then 50 bytes per triangle
Links
Software
- PrusaSlicer – Prusa Research’s free open source slicer (Windows, macOS, Linux)
- UltiMaker Cura – free open source slicer from UltiMaker (Windows, macOS, Linux)
- Bambu Studio – Bambu Lab’s free slicer for its printers (Windows, macOS, Linux)
- OrcaSlicer – free open source slicer for many printer brands (Windows, macOS, Linux)
- Blender – free open source 3D suite that imports and exports STL (Windows, macOS, Linux)
- MeshLab – free open source mesh viewer and editor, useful for repairing STL (Windows, macOS, Linux)
- FreeCAD – free open source parametric CAD program (Windows, macOS, Linux)
- Autodesk Fusion – Autodesk’s CAD and CAM program (Windows, macOS)
Developers
Reference
- The StL Format – Marshall Burns’ account of 3D Systems’ 1989 specification, from Automated Fabrication
- STL (STereoLithography) File Format, Binary – the Library of Congress’s description of binary STL