Identifying and Repairing Common Mesh Errors
This tutorial will teach you about common mesh errors that you may encounter with your 3D printer. Digital models on your computer are typically represented by a large list of triangles. These triangles fit together to define the overall shape of your geometry and they are the basis for the STL and OBJ file formats. After you import a model into the Simplify3D Software, you can go to View > Wireframe to show the millions of triangles that fit together to define your model. Each triangle is represented by 3 edges along with a normal vector from the center of the triangle that defines which side of the triangle is outward facing. If you go to View > Show Normals, the software will also show you a visual representation of the normal vectors used to define your triangles.
While this sounds simple enough,?there are several common mesh errors that you should keep an eye out for.?In this tutorial we are going to talk about self-intersecting surfaces, missing triangles that create holes in the surface of your mesh, backwards triangles, and even duplicate surfaces. But first, let’s talk about the signs that you might see if your mesh has errors.
How to Identify Errors in Your Mesh
When you are ready to fabricate one of your digital models, the software will create a long list of instructions that tell your printer how to actually create the part. These instructions may be plain text (such as the common .gcode file format) or they may be binary files (such as .x3g files). In addition to creating these files, the software also has the ability to render a visual preview of these instructions, showing you exactly how your printer will interpret the commands. You can preview one of these files at any time by pressing the large Prepare to Print!?button in the bottom left-hand side of the software’s main window. After the preview is loaded, you can even animate the build which will play a video of your nozzle moving around on the screen laying down each individual strand of plastic. It’s a very useful tool and a great way to identify any potential mesh errors with your part.?If the visual preview looks different than the model you expected to create, there might be problems with the mesh.?For example, a hollow cutout might appear as a solid filled in layer, or vice-versa.
Narrowing Down the Problem
So once we think there might be a problem, how do we identify what feature of the mesh is causing it? For this part of the tutorial, we are going to be using gpvillamil’s pyramid model which you can find?here. Go ahead and download the chichen-itza_pyramid.stl file and import it into the software (if you need help, please read our?Importing and Manipulating Models tutorial). Let’s imagine that you had previously used this model, but you noticed some issues with the animated Preview that made you suspicious there was an error with the mesh. There are two very useful tools in the software to help you locate any potential problems within the mesh. The first is called a?non-manifold mesh check.?This will look through your model for any holes or areas that are not watertight. You can access this tool by going to Repair > Identify Non-Manifold Edges. This will visually highlight any problematic edges on your mesh with a bright red line. You can turn off this display at any time by going to Repair > Clear Results.
If you run the non-manifold edges check for the pyramid model, you will notice that several edges on the model have been highlighted. These represent triangles that do not match up cleanly to another surface. This will create holes in the exterior of our part that can be very confusing to the software. If there are a large number of holes or self-intersecting surfaces, it becomes more difficult to determine what part of the model is actually intended to be solid. If you zoom in on the decorations at the base of the large staircase, you will see several red lines in this area. Rotate the model so that you are looking at the mesh from the underside. You will notice that the underside of these features have several holes and are not watertight. There are also a few faces on the top structure that do not meet up cleanly and are also causing problems. To find the remaining problem areas, you will need to turn on the wireframe view (enable View > Wireframe) and turn off the solid model view (disable View > Solid Model). At this point you should notice a third problem area that is actually inside the body of the pyramid. It is important to recognize that the problem areas may actually be internal to your model and may not be visible from the outside.?Turning off the solid model view helps see “inside” the part, but you can also use the built-in cross section tool to slice the model in half and look inside.?Access this tool by going to View > Cross Section. Select the Z-Axis for the slice axis and put the slice plane at 10mm. Make sure the “Enable Cross Section” option is checked and now your model should be cut in half so that you can see inside the bottom portion. This is another very useful way to look inside your part for any potential issues.
How to Repair Mesh Errors
Now that you know where the problem is, there are several options you can use to repair the mesh. The first and easiest option is to let the Simplify3D Software fix these problems during the G-Code preparation phase. If you go to the Advanced tab of your FFF Settings, you will see a section called Slicing Behavior. These settings impact how the software reacts to each individual layer of your part as it creates the instructions for your printer. Changes here will not affect the original mesh geometry, just how the software processes it internally. The first option tells the software how to handle small holes on the exterior of the model. Depending on your part, you may want to discard these broken faces, or you might want to let the software try to fill these holes automatically.?To fill the holes automatically, make sure to enable Heal for the non-manifold segment behavior.?The second option is extremely useful if your part is one single solid model. For example, our pyramid is a single solid part that should not have multiple pieces. In this case, you can enable the “Merge all outlines into a single solid model” option. While this option will not work for every part,?it is a very powerful tool that can help repair models that are not watertight solids.
The second option is to use the built-in mesh repair tools to actually alter the digital mesh and hopefully repair the root cause of these errors. You can find several different options available to you under the Repair heading in the menu bar. These options are summarized below.
- Repair Normals?– This will recalculate the normal vectors for your model to help prevent issues where the normal is facing the incorrect direction.
- Repair Flipped Triangles?– The software will analyze your model and look for any surfaces where a triangle appears to be facing the wrong direction. Typically all connected triangles are facing the same direction and this option will help correct those issues.
- Flip Surface Orientation?– Using the Repair Flipped Triangles tool is great, but you may run across a scenario where all of your triangles are pointing the same direction, but it is the wrong direction! In this case, you can use the flip surface orientation option. You just click the surface you want to flip and all of the triangles attached to that surface will be reversed.
- Remove Duplicate Triangles?– This will look through your model and remove any duplicate overlapping triangles.
- Remove Orphaned Triangles?– Any triangles that are unattached to the rest of the model will be deleted.
Note that these tools will only alter the mesh as it exists within the software. It won’t make any changes to your original STL file. If you want to save your work you can go to File > Export STL to create a new repaired STL file.
As you can see, there are quite a few tools inside the software to help you resolve any potential mesh errors you might encounter. Most models that you use will likely print without any issues, but next time you find a problematic mesh you’ll know what to do!