STL Format: 3D Printing & Modeling Standard"
IshanKakad1
70 views
32 slides
Dec 31, 2024
Slide 1 of 32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
About This Presentation
STL Format: 3D Printing & Modeling Standard"
Size: 5.41 MB
Language: en
Added: Dec 31, 2024
Slides: 32 pages
Slide Content
STL file In a nutshell, an STL file stores information about 3D models. This format describes only the surface geometry of a three-dimensional object without representing color , texture, or other common model attributes. These files are typically created by a computer-aided design (CAD) program as an end product of the 3D modeling process. You can identify STL files by the “. stl ” file extension.
STL file The STL file format is the most commonly used file format for 3D printing. When used with a 3D slicer, it allows a computer to communicate with the 3D printer hardware. many CAD software packages have adopted and supported the STL file format. Today it is widely used for rapid prototyping, 3D printing, and computer-aided manufacturing. Hobbyists and professionals alike use it.
First 3 D printed part The world's first 3D printed part made using stereolithography (Source: 3D Systems
STL - ST ereo L ithography , It’s widely believed that STL is an abbreviation of the word ST ereo L ithography , a 3D printing process and corresponding file type created by Chuck Hull at 3D Systems in the 1980s. STL file type, including “Standard Triangle Language,” “Standard Tessellation Language,” and “Surface Tesselation Language .” The primary purpose of the STL file format is to encode the surface geometry of a 3D object. It encodes this information using a simple concept called “tessellation.”
Tessellation Tessellation is the process of tiling a surface with one or more geometric shapes so there are no overlaps or gaps. If you have ever seen a tiled floor or wall, that is an excellent example of tessellation. The tiled walls and floor are simple real-life examples of tessellation (Source: Gavin Allanwood via Unsplash )
Tessellation Tessellation can involve simple geometric shapes or very complicated (and imaginative) shapes Two advanced tesselation patterns made from different animals (Source: M.C. Escher )
Exploiting Tessellation to Encode Surface Data way to transfer information about 3D CAD models to the 3D printer, it could use tessellations of the 3D model’s surface to encode this information.
a simple 3D cube, this can be covered by 12 triangles, If you have a 3D model of a sphere, then it can be covered by many small triangles, Because the triangles always consist of three straight edges, the only way to approximate curved geometries is to increase mesh density and decrease the individual triangles’ size .
Chuck Hull, the “father” of 3D printing (Source: 3D Systems ) The basic idea was to tessellate the two-dimensional outer surface of 3D models using tiny triangles (also called “facets”) and store information about the facets in a file. The fine triangular mesh is approximately encoding the surface geometry of this 3D model
Differences Between ASCII and Binary STL The STL file format provides two ways of storing information about the triangular facets that tile the object surface. are called ASCII encoding and binary encoding. In both formats, the information of each triangle is stored as: The coordinates of the vertices. The components of the unit normal vector to the triangle. The normal vector should point outwards in accordance with the 3D model.
An STL file stores the coordinates of the vertices and the components of the unit normal vector to the facets
The ASCII STL File Format The ASCII STL file starts with the mandatory line: solid < name> where < name> is the name of the 3D model. This field can be left blank, but there must be a space after the word “solid” in that case. The file continues with information about the covering triangles. Information about the vertices and the normal vector is represented as: facet normal n x n y n z outer loop vertex v1 x v1 y v1 z vertex v2 x v2 y v2 z vertex v3 x v3 y v3 z endloop endfacet Here, n is the normal of the triangle, and v1 , v2, and v3 are the triangle’s vertices. Coordinate values are represented as a floating-point number with the sign-mantissa- esign -exponent format – for example, “3.245000e-002”. The file ends with the mandatory line: endsolid < name>
The Binary STL File Format The Binary STL File Format The ASCII STL file can become huge if the tessellation involves many small triangles. This is why the more compact binary STL format exists. The binary STL file starts with an 80-character header. This is generally ignored by most STL file readers, with some notable exceptions that we will talk about later. After the header, the total number of triangles is indicated using a 4-byte unsigned integer. UINT8[80] – Header UINT32 – Number of triangles
The Binary STL File Format The information about the triangles follows. The file ends after the last triangle. Twelve 32-bit floating-point numbers represent each triangle. Like the ASCII STL file, three numbers are for the 3D Cartesian coordinates of the triangle’s normal to the triangle. The remaining nine numbers are for the coordinates of the vertices (three each). Here’s how this looks: for each triangle REAL32[3] – Normal vector REAL32[3] – Vertex 1 REAL32[3] – Vertex 2 REAL32[3] – Vertex 3 UINT16 – Attribute byte count end Note that after each triangle, there is a 2-byte sequence called the “attribute byte count.” This is usually set to zero and acts as a spacer between two triangles. But some software will use these 2 bytes to encode additional information about the triangle. We will see such an example later, where these bytes are used to store color information.
Special Rules for the STL File Format The STL specification has some special rules for tessellation and storing information. The Vertex Rule The vertex rule states that each triangle must share two vertices with its neighboring triangles. This rule is to be respected when tessellating the surface of the 3D object. According to this rule, here’s an example of a valid and invalid tessellation. The figure on the left violates this rule and is an invalid tessellation, while the figure on the right is conformant and valid.
The Vertex Rule Vertex rule for STL files: The figure on the left is an invalid tessellation, while the figure on the right is acceptable (Source: 3D Systems )
The Orientation Rule The Orientation Rule The orientation rule says that the orientation of the facet (i.e. which way is “in” the 3D object and which way is “out”) must be specified in two ways. First, the direction of the normal should point outwards. Second, the vertices are listed in counterclockwise order when looking at the object from the outside (right-hand rule
The Orientation Rule The orientation of each facet is specified in two ways: by the direction of the normal vector and by the vertice enumeration order (Source: 3D Systems )This redundancy exists for a reason. It helps ensure mesh consistency and spot corrupt data. The software can, for example, calculate the orientation from the normal and subsequently from the vertices and verify whether they match. If it doesn’t, it can declare the STL file corrupted.
The All Positive Octant Rule The All Positive Octant Rule The all positive octant rule says that the coordinates of the triangle vertices must all be positive. This implies that the 3D object lives in the all-positive octant of the 3D Cartesian coordinate system (and hence the name). The rationale behind this rule is to save space. If the 3D object were allowed to live anywhere in the coordinate space, we would have to deal with negative coordinates. To store negative coordinates, you use signed floating-point numbers . Signed floating-point numbers require one extra bit to store the sign (+/-). By ensuring that all coordinates are positive, this rule allows us to use unsigned numbers for the coordinates and save a bit for every coordinate value we store.
The All Positive Octant Rule The red cube labeled “1” is the all-positive octant (Source: Wikipedia )
The Triangle Sorting Rule The triangle sorting rule recommends that the triangles appear in ascending z-value order. This helps the software to slice the 3D models faster, but the rule is not strictly enforced.
An STL file, loaded and ready to be sliced (Source: All3DP) For 3D printing, you must open the STL file in slicing software, often known simply as a “slicer.” What’s a slicer? It’s a piece of 3D printing software that converts digital 3D models into printing instructions for your 3D printer to create an object. Based on your chosen settings, the slicer chops up your STL file into hundreds (sometimes thousands) of flat horizontal layers and calculates how much material your printer will need to extrude and how long it will take.
The STL file format approximates the surface of a CAD model with triangles. The approximation is never perfect, and the facets introduce coarseness to the model. The perfect spherical surface on the left is approximated by tessellations. The figure on the right uses big triangles, resulting in a coarse model. The figure in the center uses smaller triangles and achieves a smoother approximation (Source: i.materialise )The 3D printer will print the object with the same coarseness as specified by the STL file. Of course, by making the triangles smaller and smaller, the approximation can be made better and better, resulting in good-quality prints. Therefore , finding the right balance between file size and print quality is crucial. It does not make sense to reduce the size of the triangles ad infinitum because first, your eyes and then your printer’s resolution will be unable to distinguish between print qualities. However, as you decrease the size of the triangle, the number of triangles needed to cover the surface also increases. This can lead to gigantic STL files, which some slicing software will struggle to handle. It’s also a pain to share or upload huge files like that.
Advantages & Disadvantages Since there are many 3D printing file formats, the obvious question is, “Which one should you use for your prints?” As it turns out, the answer depends a lot on your use case. When Not to Use an STL File As we saw earlier, the STL file format cannot store additional information such as color , material, facets, or triangles. It only stores information about the vertices and the normal vector. If you want to use multiple colors or materials for your prints, then the STL file format is not the right choice. The OBJ or 3MF formats are popular and well-supported formats that can specify color and material. Therefore, either is the right choice for this task. When to Use an STL File On the other hand, if you want to print with a single color or material, which is most often the case, STL is better than OBJ since it is more straightforward, leading to smaller file sizes and faster processing.
Advantages of the STL File Type Universal : Another significant advantage of the STL file format is that it is universal and supported by nearly all 3D printers. This cannot be said for the OBJ format, even though it also enjoys reasonable adoption and support. The VRML, AMF, and 3MF formats are not as widely supported at this point. Mature ecosystem: Most 3D printable models you can find online are in the STL file format. This ecosystem, combined with STL-based software investments made by 3D printer manufacturers, has given rise to a large user base heavily invested in the format. This means there’s plenty of third-party software dealing with STL files, which is not the case with the other file formats.
Disadvantages of the STL File Type There are some glaring disadvantages to using STL as well. Fidelity: As the fidelity of printing processes embraces micron-scale resolution, the number of triangles required to describe smooth curved surfaces can result in massive file sizes. No metadata: It’s also impossible to include metadata (such as authorship and copyright information) in an STL file.