The .STL (stereolithography) file is the de-facto standard CAD representation for RP. It was established by 3D Systems in the late 80s. The .STL format of a CAD model is a faceted surface representation,i.e. a list of the triangular surfaces with no adjacency information. This is the standard input for most RP systems. There are two format for .STL files: binary and ASCII which differs as follow:
The binary .STL files format consists of an 80 bytes header used to describe the solid contained within the file, then 4 bytes represent the total number of facets in the file. A facet is described as follow: the first 12 bytes (3 x 4 bytes) represent its normal, the next 36 bytes (3 x 3 x 4 bytes) represent its (three) vertices, then two unused bytes are padded to achieve a block size of 50 bytes.
ASCII files use keywords and are self explanatory. The ASCII .stl file must start with the lower case keyword solid and end with endsolid. Within these keywords are listings of individual triangles that define the faces of the solid model. Each individual triangle description defines a single normal vector directed away from the solid's surface followed by the xyz components for all three of the vertices. These values are all in Cartesian coordinates and are floating point values. The triangle values should all be positive and contained within the building volume. The normal vector is a unit vector of length one based at the origin. If the normals are not included then most software will generate them using the right hand rule. If the normal information is not included then the three values should be set to 0.0. There is a variety of errors in ASCII files that do not appear in binary files. For instance, it happens that keywords are either skipped of extraneous, hindering the extraction of data. Here's an example of an .STL ASCII file:
solid Solidname facet normal 9.838605e-01 3.226734e-02 1.760037e-01 outer loop vertex -1.070000e+02 0.000000e+00 1.816000e+02 vertex -1.060000e+02 0.000000e+00 1.760100e+02 vertex -1.070000e+02 1.200000e+00 1.813800e+02 endloop endfacet facet normal 9.824255e-01 9.205564e-02 1.623759e-01 outer loop vertex -1.070000e+02 1.200000e+00 1.813800e+02 vertex -1.060000e+02 0.000000e+00 1.760100e+02 [...] endloop endfacet [...] endsolid
Example:
The bold characters should be typed as is. The italic characters should be substituted with their corresponding values.
Slice V0 # 0 = zero FILE(filename) # filename may include full path SLICES() # Z z dz # z = absolute z of layer, dz = layer thickness x y # Provide the coordinates of the corner points x y # along each contour. Do not duplicate the x y # first point. The is no upper limit on the x y # number of points in a contour. x y # C # Terminate the contour with a "C". x y # Begin the second contour on this level... x y # x y # x y # x y # C # Terminate the second contour. Z z dz # Begin a new layer (z = z.old + dz) x y # Begin a new contour on a new level... x y # x y # x y # x y # C # Terminate the contour. END # All following lines are ignored.
Home | What's New | General | RP Systems | Software | Research | Bureaus | Case_Studies | Information | Research at UQTR | My Homepage |