STL Files


Introduction

Stereolithography (STL) files were introduced in software by 3D Systems of Valencia, CA, as a simple method of storing information about 3D objects. 3D Systems was one of the first companies to produce physical 3D models from computer 3D data. Since the startup of 3D Systems, several other companies have emerged as competitors to 3D Systems and have adopted the STL file format in their systems. STL files reproduce an object's 3D geometry by storing a set number of facets or 3D triangles in a complex digital model. After storing the outer and/or inner surface of a 3D object as facets in an STL file, the digital model can be manipulated, and a physical representation or replica of a 3D model can be made. STL files are mainly used to produce a physical 3D models or replicas.

Common uses of STL files

The original use of the STL file format was to take create 3D models on CAD/CAM systems and produce a physical 3D model from a STL file. In the past five years, computer digitization of objects or physical models has greatly expanded. After these physical models are in a computer system, they can be enhanced or modified and then made back into a physical 3D model or replica.

The applications of this technology are primarily in the fields of medicine, natural sciences, and engineering. One use of STL files in medicine are in the making of artificial replacement joints and prostheses. In addition, some hospitals use STL files to make physical 3D models of tumors or other abnormalities from CAT scan, MRI scan, or PET scan data before surgery. In the natural sciences, 3D models from seismic data can be used to define structures on the surface or subsurface of the Earth. These 3D models can be made into physical 3D maps showing the scaled down topography of the surface. In biology, confocal microscope images can be made into 3D models to show very small structures in plants and animals. After a 3D model is obtained from a confocal microscope, a much larger physical model can be made with a STL file. In engineering, competitors from the auto and aerospace industry can purchase a competitor's product and use an industrial CAT scanner to obtain 3D information about inside and outside of various metal parts. The 3D model can then be modified in a CAD/CAM system and exported to STL to construct a physical 3D model of the part. In addition, the use of nondestructive testing (CAT scan and Ultrasound) can reveal flaws or voids than can be made into larger, scaled physical 3D models to study fatigue, strain, and the effects of metallurgy.

Basics about STL files

Every facet in a STL file is defined by the three points that make up the 3D facet and the normal to the facet. The normal to the facet is redundant because the normal can be calculated from the three points that define the facet. This redundancy is a potential problem, because the large size of STL files can be prohibitive. If the normals were omitted, the file size would be reduced by one quarter of the original size. In addition, 3D models that contains a large number of small individual facets produce a larger file sizes. When the size of the individual facets in a model is small, the 3D model has a higher resolution. The number of facets can be reduced and the size of the facets increased by decimating the computer model, but this may decreases the accuracy or resolution of the model as well.

ASCII and Binary STL files are the two types of STL files that are commonly used. Both types store 3D facets (3D triangles) and their normals . ASCII STL files have one advantage in that it is easy to read with most text editors. This makes it easier to spot errors in the STL file, and these files can be used with computer systems that do not read Binary STL files. Binary STL files are more compact and faster to read. When STL files are transferred over a network, Binary STL files are mostly used because of the smaller file size. Despite the smaller size, Binary STL files have a null space of 2 bytes for every facet which has no use. In the future, however, the null space may be used for something.

STL files have become the standard for most rapid prototyping machines that produce 3D physical models. Many CAD/CAM systems (i.e.- IDEAS, AutoCAD, 3D Studio, and Pro Engineer) are adopting STL files as an import/export option. However, many CAD/CAM systems still do not DIRECTLY support the STL format, and conversion utilities must be used transform the 3D models to the STL format. Examples of free or shareware conversion utilities include STL UTIL and Visualization ToolKit, both of which are available on the internet. Conversion of other file formats into STL files, however, frequently includes loss or distortion of information, making the STL file useless or difficult to read.

One basic problem with STL file conversion is that STL file formats are facet based, and this is a very inefficient in storing some types of 3D models. Many CAD/CAM software programs store 3D information as 3D primitives in the form of cubes, cylinders, cones, or spline surfaces. To produce a STL file, the cubes, cylinders, cones, or spline surfaces must be converted into 3D facets. This conversion usually creates a much larger file with less accuracy than the original 3D model.

 

Alternatives to STL files

Are there better ways to create physical 3D models? In some cases, it may be better to bypass the 3D model altogether and use the raw data. Many 3D data sets originate as a stack of parallel images. Since all systems that make 3D physical models use a series of parallel 2D data, it would make sense to convert 2D stacks (data) to 2D stacks output directly.

For example, 3D models produced from CAT scans, PET scans, MRI scans, Ultrasounds, Seismic data, Contour surfaces, and Confocal microscope images all originated as a series of parallel images. The parallel images are then converted to a 3D model. The 3D model is then converted to a STL file. The STL file is then divided up into parallel slices for the production of the physical 3D model. It would be much better to convert the original data directly into slices for the production system , and thus bypassing the problematic conversion of the data into STL file formats.

Conclusion

The STL format to date has become a standard in the production of physical 3D models, and the number of other CAD/CAM systems that have ways to read and/or write is growing. To change the STL format to include other types of primitives could cause problems with some computer systems that now read STL files. Similar problems could occur if the normals or the null space were left out of the STL format.

STL file formats do have their disadvantages, yet they are still an overall benefit for the rapid prototyping industry.



Example of a tetrahedron in ASCII STL:


SOLID TRI
   FACET NORMAL 0.0 0.0 -1.0
     OUTER LOOP
       VERTEX -1.5 -1.5 1.4
       VERTEX 0.0 1.7 1.4
       VERTEX 1.5 -1.5 1.4
     ENDLOOP
   ENDFACET
   FACET NORMAL 0.0 0.88148 0.472221
     OUTER LOOP
       VERTEX -1.5 -1.5 1.4
       VERTEX 1.5 -1.5 1.4
       VERTEX 0.0 0.0 -1.4
     ENDLOOP
   ENDFACET
   FACET NORMAL -0.876814 -0.411007 0.24954
     OUTER LOOP
       VERTEX 1.5 -1.5 1.4
       VERTEX 0.0 1.7 1.4
       VERTEX 0.0 0.0 -1.4
     ENDLOOP
   ENDFACET
   FACET NORMAL 0.876814 -0.411007 0.24954
     OUTER LOOP
       VERTEX 0.0 1.7 1.4
       VERTEX -1.5 -1.5 1.4
       VERTEX 0.0 0.0 -1.4
     ENDLOOP
   ENDFACET
ENDSOLID TRI

Web by Reuben Reyes