STL Stereolithography 3D Mesh File Description
The Stereolithography 3D Mesh STL file format is used primarily for 3D printing, prototyping, and computer-aided manufacturing. An STL file is a triangular representation of a 3-dimensional surface geometry. The surface is broken down into small triangles or facets. Each facet is described by the triangle's vertices and unit normal vector.
The STL file format does not contain any scale or unit information. STL files can be saved in ASCII or binary format.
STL ASCII Format
The ASCII format can be viewed in any text editor software. However, ASCII format STL files are considerably larger than binary STL files. The following block is an example of the format structure:
facet normal i j k
vertex x1 y1 z1
vertex x2 y2 z2
vertex x3 y3 z3
Each facet is described by the unit normal vector (i,j,k) and each vertex is described by its coordinates (x,y,z) between the solid and endsolid lines. The numerical data (i,j,k and x,y,z) are single precision floating point values.
STL Binary Format
The binary format is significantly more compact than the ASCII format. The binary format includes an 80-byte ASCII header, an integer value indicating the number of facets, and then a series values describing the unit normal vector, facet vertices, and attribute value for each facet.
See StereoLithography Interface Specification, 3D Systems, Inc., October 1989 for more information on the STL file format specifications.