Fix Tunnels: find and remove tunnels in a mesh

Fix Tunnels Tool Explained

5 min read
In the app
  • Mesh RepairFix Tunnels

Fix Tunnels finds tunnels (through-holes and handles) in a mesh, cuts them and closes the cuts, so that the mesh becomes topologically equivalent to a sphere. You need it when a scan or a reconstructed model has small unwanted tunnels that cause problems in 3D printing, rendering or simulation.

In scans and in meshes built from CT or voxel data, small tunnels usually appear where two surfaces lie very close to each other and fuse into a thin bridge: for example, between neighboring roots, fingers or folds.

Important: for Fix Tunnels, every through-hole is a tunnel, including the ones the object really has: the hole of a ring, a handle, a mounting hole through a plate. With the default settings the tool can cut them too. Limit the search with Max Tunnel Length (see below), check the selected triangles before you remove them, and undo with Ctrl+Z (Cmd+Z on macOS) if a real feature was cut.

To open the tool, select a mesh and click Mesh Repair › Fix Tunnels.

The Mesh Repair tab of the ribbon with the Fix Tunnels button outlined in red.

After you click Fix Tunnels, a panel opens with several settings. The most important one is Prefer Tunnels. It defines which types of tunnel loops the algorithm will search for.

Prefer Tunnels

The available options include:

  • Shortest (default) searches for the shortest loops by length.
  • Most Curved searches for loops passing along edges where the mesh is most curved (either concave or convex).
  • Most Concave searches for loops passing along edges where the mesh is most concave.
  • Most Convex searches for loops passing along edges where the mesh is most convex.
  • Least Curved searches for loops passing along edges where the mesh is least curved (neither concave nor convex).

Advanced Select Options

The Advanced Select Options section provides additional controls that help refine how tunnel loops are detected.

Setting What it does Default
Loop Type What kind of loops to search for. Any: all types of loops. Outer: loops that mostly surround the object, like a cut around a handle. Inner: loops that surround a tunnel inside the mesh. Any
Max Tunnel Length Loops longer than this value are ignored. Set it a little above the size of the unwanted tunnels to keep large, real holes of the object. 10000
Curvature Priority Shown when Prefer Tunnels is not Shortest. At 0, curvature is ignored; at larger values, the desired curvature matters more than the length of the loops. 2
Max Iterations The maximum number of tunnel detection iterations (1 to 10). Not all tunnels are found in the first iteration, but on a big mesh with many tunnels even one iteration can take a while. 1
Build Co-Loops Finds shorter tunnels, but takes more time. On
Filter Equivalent Co-Loops Shown when Build Co-Loops is on. When it is off, some tunnels may be cut in several places; turn it on if this is a problem, but the search takes significantly longer. Off

Commands

Once you define the tunnel loops you are searching for, you can process them using the following buttons:

  • Select Tunnel Triangles selects the triangles that belong to the tunnel regions matching your criteria.
  • Remove Selected Triangles deletes the currently selected tunnel triangles from the mesh.
  • Fill Created Holes fills the holes that appear after the tunnel triangles are removed.

To check that no holes are left, look at the Information panel: the Holes row is shown only while the mesh has holes.

Mesh Healer has a Small Tunnels check that finds and fixes small tunnels automatically, with its own Maximum Tunnel Length and Build Co-Loops settings. The check is off by default; turn it on in Mesh Healer when you repair a scan, and use Fix Tunnels when you want to see and control each step.

Sample Workflow

In this example, we apply the Fix Tunnels tool to a mesh representing a root structure. After opening the tool, we keep the default settings and click Select Tunnel Triangles. MeshInspector analyzes the surface and detects tunnel regions that match the selected criteria. The triangles belonging to these tunnel areas are then selected and highlighted in red.

The Fix Tunnels panel beside a scanned surface; red arrows point to the Select Tunnel Triangles button and to the tunnel triangles it selected in red.

As shown in the screenshot, the detected triangles appear along narrow tunnel-like cavities within the root geometry. These highlighted regions indicate the parts of the mesh that can be removed to eliminate the tunnel structures.

To better inspect the detected regions, we apply the Section tool. The mesh is 'clipped' by a plane, allowing us to see the internal structure of the model. As shown in the screenshot, the section plane cuts through the root geometry and reveals the interior of the mesh. The triangles previously detected by Select Tunnel Triangles remain highlighted in red, making it easier to understand how the tunnel passes through the model.

After Section: Selected Triangles

Next, we click Remove Selected Triangles. MeshInspector deletes the triangles that were previously selected as part of the detected tunnel regions. As a result, the tunnel geometry is removed from the mesh, leaving open holes where the tunnel structures used to be.

Fix Tunnels: Remove Selected Triangles

Again, you can use Section to examine the internal structure of the model.

Section after Remove Selected Triangles

Finally, we click Fill Created Holes. MeshInspector automatically fills the openings that appeared after the tunnel triangles were removed. The tool reconstructs the missing surface and restores a continuous, closed mesh. As shown in the screenshot below, the previously open tunnel areas are now filled with new geometry.

Fix Tunnels: Fill Created Holes

Customize Consent Preferences

We use cookies and similar technologies, such as local storage. You will find detailed information about all of them under each consent category below.

To learn more about how Google processes personal information, visit: Google privacy policy

Always Active