Checking and repairing files

STL, STereoLithography or Standard Tessellation Language files describe the surface geometry of a 3D object and are used to build physical 3D CAD models. An STL file is created using a mesh of triangles representing the surface of the physical part of an object. It is simply a complete listing of all the x, y, and z coordinates of the vertices and normals—the vectors perpendicular to a surface that determine the orientation of the triangles—that describe that 3D object. Opening an STL file with a text editor lets you see that the file is just a list of triangles, based on a set of points (known as 3D vertices).

A “good” STL file size is between .5MB for a simple file to 10MB for a large complicated one. Generally, if your part is outside these parameters, you’ll need to resize it in a program where you can reduce the number of triangles in the mesh.

A “good” STL file must also conform to two rules:

  1. Adjacent triangles must have two vertices in common.
  2. The orientation of the triangles (what side of the triangle is in and what side is out) as specified by the vertices and normals must agree.

Minor gaps and inconsistencies can usually be fixed by specialized STL-handling software. If you have more significant problems, you’ll have to go back to your original CAD model and make the necessary adjustments.

An STL file can be “bad” because of translation issues. In many CAD systems, the number of triangles that represent the model can be defined by the user. If you are using too many triangles, the STL file size can become unmanageable. If you're using too few triangles to describe your object, your curved areas will not be properly defined and your cylinders might look like hexagons.  To reach the target range that is appropriate for your printer, consider using a remeshing tool, like ZBrush, Meshmixer or MeshLab to reduce or increase the numbers of faces of your model.

Sometimes all you need to do to fix an STL file is to slice off part of it, creating a surface at the bottom that can be placed flat on the build platform. Applications like Meshmixer and Netfabb Basic offer plane cut tools to make this process essentially painless.


 

Netfabb is now owned by Autodesk.

If you have a copy of Netfabb Basic or the Autodesk newer version of Netfabb you can fix problematic models, such as:

  • Reversed normals
  • Bad edges
  • Holes in the mesh

Legacy Netfabb Basic

  1. If you have Netfabb Basic, open it.


  2. Open your model in the program.


  3. If you see this:

    Netfabb problem

    Click on the first aid icon:

    Netfabb repair


  4. Click on the Automatic repair button:

    automatic repair


  5. Click on the Execute button:

    Execute


  6. Click on the Apply repair button:

    Apply repair


  7. Click on the Yes option at the prompt to the Remove old part:

    Remove old part


Autodesk Netfabb Standard

  1. If you have a PC, download and install Autodesk Netfabb Standard.


  2. Open your model in the program.


  3. If you see this:

    01_error

    Click on the first aid icon:

    02_redcross


  4. Click on the Run Repair Script button:

    03_run_repair


  5. Click on Default Repair and then the Execute button:

    04_default_execute


  6. Click on the Apply repair button:

    05_apply


  7. Click on Remove old part:

    06_remove


  8. Here is the repaired model ready for export:

    07_fixed


Other programs to help check and repair files:

  • Blender—Provides Provides tools which analyze and repair defects. Cross-platform
  • Meshmixer—Provides Inspector feature which automatically analyzes and repairs defects. Cross-platform
  • Meshlab—Provides a set of tools for editing, cleaning, healing, inspecting, rendering and converting meshes. Also includes the following set of repairing tools: removal of duplicated, unreferenced vertices and null faces; removal of small isolated components; coherent normal unification and flipping; erasing of non manifold faces; automatic filling of holes; feature preserving smoothing and fairing filters. Cross-platform
  • Meshfix—Takes as input a polygon mesh and produces a copy of the input where all the occurrences of a specific set of "defects" are corrected. Windows only.
  • Polymender—Reads in a polygonal model and produces a closed surface mesh that approximates the original model. Linux and Windows.
  • TriMM—Repairs, alters or converts triangle meshes stored as OBJ, OFF, PLY or STL files. Windows only.
  • MakePrintable—Online repair service.
  • ZBrush—Digital sculpting tool that can increment or decrement the number of faces. Windows and Mac.

Support