Skip to content

.stl - Stereolithography file format

The .stl or stereolithography format is an ASCII or binary file used in manufacturing. It is a list of the triangular surfaces that describe a computer generated solid model. This is the standard input for most rapid prototyping machines.

 solid
 ...
 facet normal 0.00 0.00 1.00
    outer loop
      vertex  2.00  2.00  0.00
      vertex -1.00  1.00  0.00
      vertex  0.00 -1.00  0.00
    endloop
  endfacet
 ...
 endsolid

Here is an example of using TetGen to read (-p) a polyhedron described in .stl file format (sphere.stl), compute its constrained Delaunay tetrahedralization.

tetgen -p sphere.stl

The picture of the sphere.

Source file: sphere.stl