Format Specifications

The STL file is a list of facet info. Each facet is uniquely identified by a normal unit (a line perpendicular to the triangle and a length of 1.0) and three vertices (corners). Normal and each vertex are described by three coordinates each, so a total of 12 numbers are stored for each facet.

Facet orientation: The facet defines the surface of a three-dimensional object. As such, each facet is part of the boundary between the inside and the outside of the object. The orientation of the facets (which path is “out” and which path is “in”) is given redundantly in two ways that must be consistent. The direction of the normal is outward, first. Second, the vertices are seen in the anti-clockwise order when looking at the object from the outside (right-hand rule). These rules are shown in Figure 2.2.

Vertex-to-vertex rule: Each triangle must share two vertices with each of its neighboring triangles. In other words, the vertex of one triangle cannot lie on the

The orientation of the facet shall be determined by the direction of the normal unit and the order in which the vertices are indicated

FIGURE 2.2 The orientation of the facet shall be determined by the direction of the normal unit and the order in which the vertices are indicated.

Vertex-to-vertex rule. Figure (a) shows a violation of Rule (a). The correct configuration is shown in Figure (b)

FIGURE 2.3 Vertex-to-vertex rule. Figure (a) shows a violation of Rule (a). The correct configuration is shown in Figure (b).

other side. This is shown in Figure 2.3. The object shown must be placed in the all-positive octant. In other words, all vertex coordinates must be positive-defined (non-negative and non-zero) numbers. The STL file does not contain any scale information; the coordinates are stored in arbitrary units. The official 3D Systems STL specification document states that there is provision for the inclusion of “special attributes for building parameters” but that there is no format for the inclusion of these attributes. Also, the document specifies the details for the “minimum length of the triangle side” and “maximum triangle size,” but these numbers are of doubtful significance. Triangle sorting in ascending z-value order is recommended, but not required, in order to optimize the performance of the slice program. Typically, the STL file is saved with the “STL” extension, case-insensitive. This extension may be provided by the slice system or it may allow a specific extension to be defined.

The STL standard includes two ASCII and binary data formats. These are described below separately.

STL ASCII Format

The ASCII format is primarily utilized for the development of new CAD interfaces. The large size of its files makes it infeasible for general use.

The syntax of the ASCII STL file is as follows:

Boldface indicates the keyword; it must appear in lowercase letters. Note that there is space in “facet normal” and “outer loop,” while there is no space in any of the keywords starting with “end.” The indentation must be with spaces; the tabs are not allowed. The notation“{...} +” implies that the contents of the brace brackets can be repeated one or more times. Italic symbols are variables to be replaced by user-specific values. The numerical data for facet normal and vertex lines are single precision floats, e.g. 1,23456E+789. A facet normal coordinate may have a leading minus sign; it may not have a vertex coordinate.

STL Binary Format

The binary format uses IEEE integer and floating point numeric representation. The syntax for the STL binary file is as follows:

The notation“{...} +” implies that the contents of the brace brackets can be reproduced one or more times. The syntax of the attribute is not recorded in the formal specification. It is defined that the byte count attribute should be set to zero.

 
Source
< Prev   CONTENTS   Source   Next >