STL is the abbreviation for stereolithography. Stereolithography is an additive manufacturing process that designs and builds three-dimensional workpieces layer by layer. The name is derived from lithographic printing, in which a two-dimensional image is printed by applying multiple layers of ink on top of each other. The STL file format, developed by 3D Systems in 1988, is used to digitally describe 3D models. For this purpose, the surface of the object is divided into triangles, whose coordinates are encoded in the file. Today, the STL interface is one of the most widely used formats for describing three-dimensional objects. The STL file is used, for example, as a format for 3D printers. Hardly any CAD program or CAM device can do without the possibility of STL import and export.
History and development of the STL file
The US company 3D Systems developed stereolithography in 1984 and applied for a patent. Then, starting in 1988, STL was introduced as a simple file format that could be used to digitally describe 3D objects. The format was left unchanged for the next 20 years. It wasn't until 2009 that they released an update, version 2.0, which led to the development of the newer ISO-standardized AMF (additive manufacturing file format) over the course of the following years. Some of the biggest weaknesses of the STL file, such as the fact that only the outside of an object can be defined, were at least partially overcome with AMF.
Today's usage of the STL format
The STL format, despite the increasing use of AMF, still plays a role. The simplicity of the file format and the high dominance that has grown over decades are decisive for this. In the industrial sector, there is hardly a CAM system (computer aided manufacturing) that cannot accept data via STL interface. Also, in privately used 3D printers, the STL format can be used with virtually all models. Due to the comparatively simple readability of the files, the format also plays a role if CAD or CAM models are to be processed with scripts or with the aid of programs such as Wolfram Mathematica. For example, to subject entire models or partial models to automatic scaling or to subject them to computer-aided, theoretical load-bearing tests. For the construction of more complex 3D models, however, the format does not play a significant role due to its lack of flexibility.
Structure of an STL file
STL files basically exist in two different variants. One is the variant saved in ASCII format, which can basically be opened and edited with any text editor. The disadvantage of this format variant is that the files can quickly become enormously large.
In contrast, there is the binary variant of the STL format, which is somewhat more space-saving, since the coordinates of each triangle are stored in reduced form. For the storage of more complex objects, the use of the binary format is therefore more sensible. In practice, the ASCII format only plays a role to make the basic storage format of the data descriptive.
In ASCII format, each STL file begins with the keyword solid, which should help to identify the file correctly, especially earlier parsing. After that, triangles positioned in three-dimensional space are defined.
Each triangle follows the following scheme
```
STL
facet normal n1 n2 n3
outer loop
vertex v1x v1y v1z
vertex v2x v2y v2z
vertex v3x v3y v3z
endloop
endfacet
```
The three values n1, n2 and n3 define a vector perpendicular to the triangle and pointing outwards, which helps the CAD software to recognize the outside of the object. The three vertices, called vertex in the code, are described by three coordinates and define the triangle in space. It is not possible to directly link the triangles. As a result, one has to write almost all coordinates several times in the file. Although the file format gives the impression it is not intended to define more complex polygons or to combine several triangles within one facet block.
The binary variant of the STL format has in its core the same elements as the variant saved in ASCII format. However, the coordinates are stored as 32-bit long integers, which are much more compact than the human readable values in the ASCII file. This makes the files a good deal smaller, but it is no longer possible to edit them with a text editor in a meaningful way. However, since this is not expedient for more complex 3D objects even in ASCII format, this disadvantage of the binary format is not relevant in practice.
FAQ about STL file format
With which programs can I edit an STL file?
The vast majority of CAD programs can export and import STL files. However, it should be noted that the STL format contains considerably less information than real CAD blueprints. The use of all functions of a comprehensive CAD program like AutoCAD is (sensibly) only possible if other storage formats are used. In addition, there are a number of free and often open source STL editors. 3D Crafter (the successor to 3D Canvas), for example, or the open-source 3D editor Blender. Beginners can also take a look at the very reduced free CAD program FreeCAD.einen Blick auf das sehr reduzierte kostenlose CAD-Programm FreeCAD werfen.
Does the STL format have disadvantages?
STL is not quite a contemporary format anymore and has some disadvantages that modern 3D formats do not have. Among other things, it is not possible, for example, to store color information in a model. In addition, the format does not have its own function for defining curves. Therefore, to define objects with curved shapes, a very small-scale, finely-resolved description of many triangular elements is necessary. This is another reason why an STL file can quickly become very large. In addition, it is not possible to describe several linked objects in one file. Instead, only the surface of a single three-dimensional body can be defined.
What are the alternatives to the STL format?
STL, although it still has the advantage of wide distribution and easy editability, is now somewhat outdated. The XML-based successor format AMF is the obvious alternative to STL. AMF masters the coding of different colors and materials in an object, can define edges of triangles also as curves and set several separate elements in relation to each other. Alternatively, it is possible to store 3D models in the native (often proprietary) file formats of various CAD programs and export them to STL format only if required. AutoCAD's DWG format, for example, plays a major role and can also be imported by other CAD programs. The disadvantage of CAD formats is that many 3D printers and CAM devices cannot handle them directly.
Where can I get free STL sample files?
If you are new to the STL format, you have the option of downloading STL 3D models from various websites. In particular, the 3D printing community exchanges numerous 3D models on websites such as Thingiverse, most of which are offered as STL files. To get started, it makes sense to first select a model that is as simple as possible. You can then use an STL editor to make your own modifications.