STL interface

from Wikipedia, the free encyclopedia
STL
File extension : .stl
MIME type : application / sla
Developed by: 3D Systems, Inc.
Initial release: 1988
Type: ASCII, binary format
Container for: 3D models


3D models

The STL interface ( ST ereo L ithographie, also S tandard T riangulation / tessellation L anguage) is a standard interface of many CAD systems. It provides geometric information from three-dimensional data models for production using additive manufacturing processes / 3D printing or rapid prototyping systems. Stereolithography systems (SLA) were the first commercially available systems that were operated with this geometry description.

definition

The STL format describes the surface of 3D bodies with the help of triangular facets (English tessellation = " parquet "). Each triangular facet is characterized by the three corner points and the associated surface normal of the triangle. If the three corner points are arranged counterclockwise when looking at a triangular surface, the surface is assumed to be the outside of a solid. The redundant surface normal always points out of the body.

Because at least three triangles share a corner point, each point is listed at least three times. In addition, the surface normal is saved, which could just as easily be defined by the order in which a single triangle is described. This and the storage in ASCII code mean that the amount of data can be enormous. The format also exists in a binary stored variant, which already results in a considerable reduction; in addition, a reduction to manageable file sizes can be achieved with compression .

A format that has the same structure (triangulated surfaces) but avoids redundancies (multiple responses) is VRML (Virtual Reality Modeling Language, also * .vrml). In this format there are two numbered lists: the first contains the coordinates of the triangle corner points, in the second the triangles are defined using the position number of the point list, as are the surface normals from the order of the triangle points. This geometry element is required to distinguish between the inside and the outside. In order to build up the surface of the body, it is necessary to run through the second list of the VRML file once. In the STL format, the triangles can be read out directly, but as mentioned above, the points are read several times. The time required to build a virtual model is not very different for the two formats, but VRML has a clear advantage in terms of storage requirements and data transmission. For this reason, the format is preferred for computer games, in "virtual reality" and for 3D applications on the Internet.

Curved surfaces are only approximated by the triangles . The fewer the number of triangles, the greater the deviations; the more precise the approximation, the more individual triangles are necessary. Therefore, the amount of data increases sharply with higher accuracy.

The description of the model surface in the form of the STL format actually represents an industry standard . VRML is not generated or read correctly by all systems, which has prevented substitution so far. VRML offers the possibility of adding colors or textures to the surfaces or a fourth dimension that is represented by changing geometrical elements over time (point coordinates). Standardization ends here at the latest (comparable to the dialect versions of NC code ).

Data in STL format can be rotated and enlarged or reduced in a CAD program without reimporting them to e.g. B. to compensate for the shrinkage of the resin during stereolithography .

ASCII format

Each STL file in ASCII code is structured as follows:

solid name
 facet normal n1 n2 n3
  outer loop
   vertex p1x p1y p1z
   vertex p2x p2y p2z
   vertex p3x p3y p3z
  endloop
 endfacet
endsolid name

name stands for the file name, the block from facet to endfacet stands for a triangle and is repeated according to the number of triangles. n i indicates the normal vector of the triangle, p1 j to p3 j the x, y and z coordinates of the corner points of the triangle.

Binary format

Since models in the ASCII format easily lead to very large files, the binary format is often used for saving. A binary STL file begins with a header ( header ) of 80 bytes. The content of the header is ignored during processing, but it must not solidbegin with , as this is the keyword for STL files in ASCII format. The header is followed by 4 bytes, which represent an unsigned integer, which indicates the number of triangles (or facet entries) in the file. This is followed by the data for the individual triangles. The file ends after the last triangle.

Each triangle is represented by twelve floating point numbers of 32 bits each: three for the normal and three for the respective X, Y and Z coordinates of the corner points of the triangle. This is followed by two bytes, which represent an unsigned integer ( attribute byte count ). As a rule, its value is zero, and most of the existing software does not understand any other values.

Floating point numbers are represented according to IEEE 754 , with the byte order little-endian being used.

UINT8[80]         -   Dateikopf (Header)
UINT32            -   Anzahl der Dreiecke
foreach triangle
  REAL32[3]       -    Normalenvektor
  REAL32[3]       -    Vertex 1
  REAL32[3]       -    Vertex 2
  REAL32[3]       -    Vertex 3
  UINT16          -    Attribute byte count
end

Bugs and problems

Various errors can occur when converting the internal CAD geometry data. They are divided as follows:

Implementation problems

  • no direct implementation of curved form elements possible
  • Distortion of form elements due to the selected degree of approximation (minimum size or maximum density of the triangular facets used)

The implementation errors lead to a falsification of the manufactured geometry in relation to the design basis. However, they have no influence on the processability of the data on the stereolithography system. The size of the error depends on the CAD system used with its specified properties and how the system (and especially the STL interface) is handled by the operator. A special influencing factor is the degree of approximation used for curved form elements. This defines the number of triangular facets to be used per curved surface and thus the fineness of the implementation. The more facets used, the more precise the description and the larger the file generated. Here a compromise has to be found between the amount of data and form deviation for the workpiece to be described.

These values ​​are therefore of fundamental importance for the manufacture of the parts.

Syntactic representation errors

If errors occur in these data files, production is only possible with restrictions or not at all. These errors can be:

  • Gaps between triangular facets
  • Double triangular facets
  • Incorrect orientation of individual facets
  • wrinkles

Related file formats

Web links

Individual evidence

  1. a b Chua Chee Kai, Gan GK Jacob, Tong Mei: Interface between CAD and Rapid Prototyping systems. Abstract. In: The International Journal of Advanced Manufacturing Technology. SpringerLink, accessed on August 5, 2015 .