An important step in the 3D printing process is to convert the 3D design file to a 3D model file in .STL format. An .stl file is basically a 3D model defined with numerous triangles, so the file contains a complete list of the XYZ coordinates of the normals and vertices of all these triangles. If there are too many triangles defined in this file, the file will be too large and will be called a "bad" file. At this point, some clichés become quite important. Today, I'd like to share some notes on the steps to convert .stl file format, and the problems that may occur during the conversion of .
Matters to note in generating model files in .STL format: 1.
1. Common vertex rule
Every two adjacent triangle planes must and can only share two vertices. In other words, the vertex of one triangle plane cannot fall on the edge of any of the adjacent smaller triangle planes.
2. Orientation rule
For each small triangle plane, its normal vector must be directed outward, and the direction of the vector connected by 3 vertices is determined in the counterclockwise order (right-hand rule), and there must be no orientation contradiction for the adjacent small triangle planes.
3. Rules for taking values
The value of the vertex coordinate of each small triangle plane must be positive, zero and negative values will lead to failure.
4. Filling rule
All surfaces of the 3D model must be filled with small triangular planes without any omission.
5. Euler formula
The number of vertices V, the number of edges E, and the number of faces F in the STL file must conform to Euler's formula.
Possible defects in the conversion process of .STL format.
1. The presence of gaps, i.e., the loss of triangular face pieces.
This error occurs when triangulating surfaces with large curvature. On the displayed STL format model, there will be erroneous cracks or holes (where no triangles are present) that violate the fullness rule. In this case, a number of small triangular facets should be added at these cracks or holes along the edge.
2. distortion, that is, all sides of the triangle face piece are co-linear.
This defect usually occurs in the conversion algorithm from 3D solids to .STL files. The distortion of the triangular facets at the intersection lines is caused by the use of generating triangular facets to different entities at their intersection lines.
3. Overlap of triangular facets.
The overlap of the facets is mainly due to the rounding error of the values when triangulating the facets. The vertices of triangles are represented as floating point numbers in 3D space, not as integers. If the rounding error range is large, it will lead to the overlap of face slices.
4. ambiguity of topological relations.
According to the co-vertex rule, there exist only two triangles that share a side on either side. If there exist more than two triangles sharing this side, ambiguous topological relations arise. These problems can occur when triangulating planes with sharp corners, intersecting parts of different entities, or errors in control parameters when generating .STL files.
Because of these defects, we must check the validity of the model data of the .STL file in advance during the printing process, otherwise, a defective .STL file can lead to many problems during rapid prototyping system processing, such as geometric distortion of the prototype, and in severe cases, there will be a dead machine.
In response to such problems, many companies have designed software to modify the . For example, AFS in China and 3D System in USA have such software. However, it is not easy to find out the problems in .STL files and modify them, and not all the defects can be fixed.
It is also because of these problems that Microsoft has joined hands with many 3D printing companies to develop a new format file - .3MF, which claims to be directly usable by 3D printers (even without slicing) and most importantly can contain more information such as color and texture, which is what STL lacks.