How to Repair STL Files for 3D Printing – Meshmixer, Blender


Repairing STL files in 3D Printing is a valuable skill to learn when you come across files or designs that have errors. These are usually holes or gaps in the model itself, intersecting edges, or something called non-manifold edges.

There are two main ways you can repair a broken STL file. The first option involves fixing all the model’s design flaws in the CAD software before exporting it to an STL format.

The second fix requires you to use an STL file repair software to check and repair any defects in the model.

This is the basic answer on how to repair STL files for optimal 3D Printing, but there is more information that you’ll want to know. So, keep reading on to find out the details to repair your STL files properly.

However, before we go any further, let’s quickly look at the building blocks of STL files.

What are STL Files?

STL, which stands for Standard Tessellation Language or Stereolithography, is a file format used in describing the surface geometry of a 3D object. It is important to note that it doesn’t contain any information about the model’s color, texture, or other attributes.

It’s the file format you convert your 3D objects into after modeling them in the CAD software. You can then send the STL file to a slicer to prepare it for Printing.

STL files store information about the 3D model using a principle called “Tessellation.”

Tessellation involves laying out a series of interconnected triangles in a mesh over the surface of the model. Each triangle shares at least two vertices neighboring triangles.

The mesh laid out on the model’s surface closely approximates the shape of the surface itself.

Hence, to describe the 3D model, the STL file stores the coordinates of the triangles’ vertices in the mesh. It also contains a normal vector for each triangle, which defines the triangle’s direction.

The slicer takes the STL file and uses this information to describe the model’s surface to the 3D printer for Printing.

Note: The number of triangles the STL file uses determines the mesh’s accuracy. For higher accuracy, you’ll need a larger number of triangles resulting in a bigger STL file.

What Are STL Errors in 3D Printing?

STL file errors in 3D Printing occur due to faults in the model or issues stemming from poor exportation of the CAD model.

These errors can severely affect the printability of the CAD model. If they aren’t caught during slicing, they often result in failed prints, leading to a waste of time and resources.

STL errors come in various forms. Let’s look at some of the more common ones.

Inverted triangle

In an STL file, the normal vectors on the triangles in the mesh should always point outwards. Thus, we have a flipped or inverted triangle when a normal vector points inward or in any other direction.

The inverted triangle error confuses the slicer and the 3D printer. In this situation, they both do not know the correct orientation of the surface.

As a result, the 3D printer doesn’t know where to deposit the material.

This results in slicing and print errors when it’s time to prep the model for Printing.

Surface Holes

One of the primary requirements set in place for a 3D model to print is for it to be “watertight.” For an STL 3D model to be watertight, the triangular mesh must form a closed volume.

When a model has surface holes, it means that there are gaps in the mesh. One way to describe this is that some triangles in the mesh do not share two vertices with adjacent triangles resulting in the hole.

Thus, the STL model is not a closed watertight volume, and the printer will not print it correctly.

2D Surfaces

Usually, this error results from using 3D modeling tools like sculptors and scanners. When using these tools, the model might display accurately on the computer screen, but it does not have any depth in reality.

As a result, Slicers and 3D printers are not able to understand and print the 2D surfaces. So, you have to fix these models by extruding them and giving them depth before exporting them to an STL format.

Floating Surfaces

When creating a 3D model, there might be particular features or additions that the STL designer may have wanted to try out. These features might not make it into the final model, but they may remain in the STL file.

If these “forgotten” features are not attached to the main body of the model, there is a big chance they can confuse both the slicer and the 3D printer.

You have to remove these features and clean up the model to slice and print the object seamlessly.

Overlapping/Intersecting Faces

For an STL file to be printable, you must render it as one single solid object. However, sometimes it isn’t easy to achieve this in a 3D model.

Often, when assembling a 3D model, specific faces or features can overlap. This might seem fine on screen, but it confuses the 3D printer.

When these features collide or overlap, the path of the 3D printer’s print head receives instructions to pass over the same areas twice. Unfortunately, this often leads to print errors.

Non-Manifold and Bad Edges

Non-manifold edges occur when two or more bodies share the same edge. It also appears when models have an internal surface inside their main body.

These bad edges and internal surfaces can confuse the slicer and even cause redundant printing paths.

Bloated STL File (Over-Refined Mesh)

As you can recall from earlier, the accuracy of the mesh depends on the number of triangles used in the mesh. However, if it has too many triangles, the mesh can become over-refined, leading to a bloated STL file.

Bloated STL files are challenging for most slicers and online printing services due to their large sizes.

Furthermore, although an over-refined mesh captures even the tiniest details of the model, most 3D printers are not accurate enough to print out these details.

Thus, when creating a mesh, you have to strike a delicate balance between the accuracy and capability of the printer.

How Do I Fix an STL File That Needs Repair?

Now that we’ve seen some things that can go wrong with an STL file, it’s time for some good news. You can repair all these errors and print the STL file successfully.

Depending on how extensive the errors in the STL file are, you can edit and patch up these files so they can slice and print satisfactorily.

There are two main ways you can repair a broken STL file. They are:

  • Fixing the model in the native CAD program before exporting to STL.
  • Fixing the model with STL repair software.

Fixing the Model in the CAD File

Fixing the model in the native CAD program is a relatively more straightforward option. In addition, most modern 3D modeling applications have features that you can use to check and fix these errors before exporting them to an STL format.

So, using these features, designers can adequately optimize the models to make sure slicing and Printing go smoothly.

Fixing the Model With an STL Repair Software

In some cases, users might not have access to the original CAD file or 3D modeling software. This makes it harder for them to analyze, modify and repair the design.

Luckily, there are applications for fixing STL files without needing the CAD file. These STL repair files contain many tools that you can use to detect and fix these errors in the STL files relatively quickly.

Examples of things you can do using STL repair software include;

  1. Autodetecting and repairing errors in the STL file.
  2. Manually editing the mesh’s triangles in the file.
  3. Recalculating and optimizing the mesh size for the best resolution and definition.
  4. Filling holes and extruding 2D surfaces.
  5. Deleting floating surfaces
  6. Resolving non-manifold and bad edges.
  7. Recalculating the mesh to resolve intersections.
  8. Flipping inverted triangles back to the normal direction.

In the next section, we’ll be looking at some of the best software for doing this.

Best Software for Repairing Broken STL Files

There are several applications on the market for repairing STL files. Each of them offers different features helpful in restoring and optimizing STL files for 3D Printing.

I’ve compiled a list of some of the best ones available. Let’s take a look at them

3D Builder

Price: Free | Operating System: Windows | Difficulty: Easy

First off on my list is the Microsoft 3D Builder. 3D Builder is a 3D modeling tool provided by Microsoft for designing, building, and editing 3D models.

One of the significant benefits of this software is that it is free, easily accessible, and doesn’t require much computing power. If you don’t find it pre-installed on your PC, you can always get it on the Microsoft app store.

Everything about this app is geared towards beginners in 3D Printing. Although 3D Builder doesn’t have the functionality of some of the more advanced 3D modeling software, it still holds its own quite well.

One of the areas where this simple design shines through is in preparing 3D models for Printing. Using 3D Builder’s suite of tools, you can import, clean up and export 3D models to STL files for Printing.

However, the particular area of interest to us is 3D Builder’s STL file repair feature. So, let’s look at how this works.

How to Repair an STL File Using 3D Builder

Step 1: Install and launch the 3D Builder software.

Step 2: Import the broken STL file to the workspace.

  • From the side menu or the display screen, click “Open > Load Object.”
  • Select the broken STL file from your PC.
  • Once the model appears on the workspace, click “Import model” from the top menu.

Step 3: Fix the 3D model.

  • After importing the model, the 3D Builder automatically checks it for errors.
  • If it has any errors, you should see a red ring around the model. A blue ring means the model has no errors.
  • To fix the errors, click on the popup at the bottom left that says, “One or more objects are invalidly defined. Click here to repair.”
  • Viola, your model is fixed, and you are ready to print.

Step 4: Make sure you save the repaired model in an STL file instead of Microsoft’s 3MF format.

As we’ve seen, 3D Builder is the most straightforward tool you can use to repair a broken STL file. However, in some cases, the repair functionality it provides might not be enough.

Let’s look at some of the more powerful software available.

Meshmixer

Price: Free | Operating System: Windows, macOS | Difficulty: Medium

Meshmixer is a mesh editing application from industry big boys, Autodesk. It is a very noticeable step up in functionality from basic programs like 3D Builder.

Meshmixer combines an intuitive, user-friendly interface with a full suite of mesh editing and analysis features. This combination makes it a versatile yet powerful tool for preparing 3D models for Printing.

Meshmixer also comes with a full suite of tools for repairing STL files. Some of these tools include:

  • Auto-repair
  • Hole filling and bridging
  • 3D sculpting
  • Automatic surface alignment
  • Mesh smoothing, resizing, and optimization
  • Conversion of 2D surfaces to 3D surfaces, etc.

So, let’s look at how you can use these tools to fix your STL file.

How to Repair Your STL File with Meshmixer

Step 1: Install the software and launch the application.

Step 2: Import the broken model.

  • Click on the “+” sign on the welcome page.
  • Select the STL file you want to fix from your PC using the menu that appears.

Step 3: Analyze and fix the model

  • On the left panel, click on “Analysis > Inspector.
  • The software will scan and automatically highlight all the errors in pink.
  • You can select each error and fix them separately.
  • You can also use the “Auto repair all” option to fix all the options at once.

Step 4: Save the final file.

Apart from the Analysis and Inspector features, Meshmixer also has tools like “Select,” “Make Solid,” and “Edit” for working with meshes. You use these tools to reshape, edit and remodel the mesh to your liking.

To learn more about the Meshmixer software, you can follow this helpful tutorial on YouTube.

Blender

Price: Free | Operating System: Windows, MacOS | Difficulty: Hard

Blender is one software many 3D artists are familiar with. It is free, open-source software that provides a full suite of 3D modeling tools that include; modeling, rigging, animation, etc.

One of its lesser-known features is its STL repair capability. Thanks to a unique add-on called the Mesh: 3D printer toolbox, users can manipulate and repair STL files with relative ease.

Let’s look at how this works.

How to Repair an STL File Uing Blender

Step 1: Enable the Mesh: 3D Printing toolbox.

  • Launch the Blender software
  • Go to “File > User Preferences > Add-ons”.
  • In the search bar, type in “Mesh: 3D printing”.
  • Once it appears, click the little box next to it to activate it.

Step 2: Import the STL file.

  • Go to “File > Import > STL.”
  • Browse for the STL file you want to repair on your PC and select it.

Step 3: Repair the STL file.

  • On the left sidebar, you should see the Print3D
  • Click on it, and you’ll see a variety of options for repairing the STL mesh.

Step 4: Save and export the STL mesh.

Alternatively, Blender also provides a robust tool for manipulating meshes in the edit mode. You have greater freedom to edit the mesh than in the 3D print toolbox in the edit mode.

You can use it via the following steps:

Step 1: Select the object or area you want to edit, then click on the Tab key on the keyboard to enter edit mode.

Step 2: On the Lower toolbar, you should see the mesh mode option. Click on it.

Step 3: On the menu that pops up, you’ll see a variety of tools for modifying and editing various areas of the mesh, e.g., “Edges,” Faces,” “Vertices,” etc.

Of all the tools on this list, Blender arguably offers the greatest mesh editing functionality. With it, you can not only repair the STL file, but you can also change the structure significantly.

However, when it comes to mesh repair, it lags behind the others because it doesn’t offer any one-click to fix all options. Also, Blender’s tools are somewhat convoluted and require considerable expertise to use.

Honorable mention:

Netfabb

Price: Paid | Operating System: Windows | Difficulty: High

Netfabb is another tool from Autodesk that you can use in manipulating, editing, and repairing STL files and meshes. It is tempting to compare the two programs, but Netfabb is far more advanced than Meshmixer.

Netfabb is an advanced manufacturing software that focuses mainly on optimizing and creating high-quality 3D models for additive manufacturing processes. As a result, it is more popular with businesses and professionals than the average hobbyist.

It contains various tools not just for repairing and preparing 3D models, but for also:

  • Simulating the production process
  • Topology optimization
  • Finite element analysis
  • Customizable toolpath generation
  • Reliability analysis
  • Failure analysis, etc.

All these make it the ultimate software for repairing and preparing STL files and 3D models.

However, as I said earlier, it’s not for the average hobbyist. It can be very complex to master, and with subscriptions starting at $240/year, it’s not the most cost-effective option for individual users.

How Do You Simplify & Reduce an STL File Size?

To simplify and reduce an STL file, all you need to do is to recalculate and optimize the mesh. For smaller file size, you’ll need a smaller number of triangles or polygons in the mesh.

However, you have to be careful when simplifying the mesh. You can lose some of the model’s more minor features and even model resolution if you reduce the number of triangles by a significant amount.

There are several ways you can reduce an STL file using various STL repair software. Let’s look at them.

How to Reduce STL File Size with 3D Builder

Step 1: Import the file.

Step 2: Click on “Edit” in the top toolbar.

Step 3: In the menu that appears, click on “Simplify.”

Step 4: Use the Slider that appears to select the level of optimization you want.

Note: As I said earlier, be careful not to over-optimize the model and lose its finer details.

Step 5: Once you’ve reached an acceptable mesh resolution, click on “Reduce faces.”

Step 6: Save the model.

Note: Reducing the file size might introduce some problems to the STL file, so you might need to repair it again.

How to Reduce STL File Size with Meshmixer

Step 1: Import the model into Meshmixer

Step 2: Click on the “Select” tool on the sidebar.

Step 3: Double-click on the model to select it.

Step 4: On the sidebar, click on “Edit > Reduce” or Shift + R.

Step 5: In the menu that appears, you can reduce the file’s size using options including “Percentage”, “Triangle Budget”, “Max. Deviation”.

How to Reduce STL File Size with Blender

Step 1: Import the model into Blender.

Step 2: On the right sidebar, click on the wrench icon to open tools.

Step 3: In the popup menu, click on “Add modifier > Decimate” to bring up the decimate tools.

The decimate tool displays the polygon count.

Step 4: To lower the file size, input the ratio you want to reduce the file by in the ratio box.

For example, to reduce the polygon count to 70% of its original size put 0.7 in the box.

Step 5: Save the model.

Well, that’s all you need to know about repairing an STL file. I hope this guide helps you with all your STL file troubles.

Good luck and happy Printing!!

Recent Posts