Skip to main content

Diagnostics and Fixes

The Diagnostics and Fixes tool provides comprehensive mesh analysis and repair capabilities for surface objects. This tool is essential for identifying and resolving common mesh quality issues such as disconnected shells, overlapping triangles, intersecting faces, holes, and inverted normals—problems that can cause failures in downstream operations like Boolean operations, 3D printing, or simulation.

Medical Disclaimer

This tool is provided for research and educational purposes only. Any clinical or diagnostic use requires proper validation in accordance with applicable regulations.

Overview

Surface meshes generated from segmentation or imported from external sources often contain defects that can compromise their usability. The Diagnostics and Fixes tool organizes repair operations into specialized tabs, each targeting a specific category of mesh problems:

TabPurposeKey Operations
Quick FixAutomated diagnostics and one-click repairUnify, filter noise shells, fix non-manifold edges
ShellsAnalyze and manage disconnected componentsView shell statistics, delete selected shells
OverlapsDetect and fix overlapping trianglesIdentify and remove overlapping faces
TrianglesFind problematic triangles by various criteriaSelect by intersection, area, angle, aspect ratio, skewness
HolesDetect and fill holes in the meshCount holes, measure diameters, fill holes
NormalsFix inconsistent face orientationsDetect inverted normals, flip triangles, recompute normals

Quick Fix Tab

The Quick Fix tab provides an automated approach to mesh diagnostics and repair. It performs multiple checks simultaneously and offers one-click fixes for common issues.

Diagnostics Section

Select which diagnostic checks to perform:

CheckDescription
ShellsCount the number of disconnected shell components
Overlapping trianglesDetect triangles that overlap with each other
Intersecting trianglesFind triangles that intersect other triangles
HolesCount open boundaries (holes) in the mesh
Inverted normalsDetect triangles with inconsistent face orientations

Each diagnostic displays a status indicator and count showing the severity of the issue.

Additional Information

FieldDescription
Noise shellsSmall disconnected components that are likely artifacts
Non-manifold edgesEdges shared by more than two triangles (topology errors)

Additional Fix Options

OptionDescriptionDefault
UnifyRemove duplicate vertices and process each shell separatelyEnabled
Filter noise shellsRemove shells with area ≤0.05% of total, volume ≤0.0005% of total, or ≤2 trianglesEnabled
Fix non-manifoldnessResolve non-manifold geometry issuesEnabled

Actions

  • Fix: Apply automatic repairs based on selected options
  • Update: Refresh diagnostic information for the active surface

Shells Tab

The Shells tab provides detailed analysis of disconnected components within the active surface. This is particularly useful for identifying and removing small artifact shells that result from noisy segmentation data.

Diagnostics

FieldDescription
Connected shellsTotal number of disconnected shell components

Statistics Table

The statistics table displays detailed information for each shell:

ColumnDescription
Shell IDUnique identifier for the shell
VolumeEnclosed volume of the shell (mm³)
AreaSurface area of the shell (mm²)
TrianglesNumber of triangles in the shell

You can select shells in the table to highlight them in the 3D view.

Actions

  • Delete Selected Shells: Remove the selected shells from the surface
  • Update: Refresh shell analysis

Overlaps Tab

The Overlaps tab detects triangles that occupy the same space—a common issue that can cause problems in Boolean operations and rendering.

Diagnostics

FieldDescription
Overlapping trianglesNumber of triangles that overlap with other triangles

Detected overlapping triangles are highlighted in the 3D view for visual inspection.

Actions

  • Fix: Remove the detected overlapping triangles
  • Update: Refresh the overlap detection

Triangles Tab

The Triangles tab provides advanced triangle selection based on various quality metrics. This allows you to identify and remove problematic triangles that don't meet specific quality criteria.

Triangle Selection Methods

MethodDescriptionParameters
Select intersecting trianglesFind triangles that intersect other trianglesGeometric tolerance
Select non-manifold trianglesFind triangles connected to non-manifold edgesNone
Select triangles based on triangle areaFind triangles outside an area rangeMin/Max area (mm²)
Select triangles based on triangle angleFind triangles with extreme anglesMin/Max angle (°)
Select triangles based on triangle aspect ratioFind triangles with poor aspect ratiosMin/Max aspect ratio
Select triangles based on triangle skewnessFind triangles with high skewnessMin/Max skew

Parameters by Method

Intersecting Triangles

ParameterDescriptionDefault
Geometric toleranceDistance threshold for intersection detection0.3

Area-Based Selection

ParameterDescriptionDefault
Min. area (mm²)Triangles with area ≤ this value are selected0.005
Max. area (mm²)Triangles with area ≥ this value are selected1000.0

Angle-Based Selection

ParameterDescriptionDefault
Min. angle (°)Triangles with minimum angle ≤ this value are selected0.01
Max. angle (°)Triangles with minimum angle ≥ this value are selected177.0

Aspect Ratio-Based Selection

ParameterDescriptionDefault
Min. aspect ratioTriangles with aspect ratio ≤ this value are selected1.0
Max. aspect ratioTriangles with aspect ratio ≥ this value are selected1000.0

Skewness-Based Selection

ParameterDescriptionDefault
Min. skewTriangles with skewness ≤ this value are selected0.0
Max. skewTriangles with skewness ≥ this value are selected0.9994

Diagnostics

FieldDescription
Selected trianglesNumber of triangles matching the selection criteria
Non-manifold edgesNumber of edges shared by more than two triangles

Actions

  • Delete Selected Triangles: Remove triangles matching the current selection criteria
  • Update: Refresh the triangle selection
  • Delete Triangle: Interactive mode—click on triangles to delete them one by one
  • Create Triangle: Interactive mode—click three points to create a new triangle
Interactive Editing

When using Delete Triangle or Create Triangle mode, hold the Alt key to enable camera spinning, panning, and zooming.

Holes Tab

The Holes tab detects open boundaries in the mesh and provides hole-filling capabilities to create watertight surfaces.

Diagnostics

FieldDescription
Number of holesCount of open boundaries in the mesh
Smallest hole diameter (mm)Diameter of the smallest detected hole
Largest hole diameter (mm)Diameter of the largest detected hole

Actions

  • Fill Holes: Automatically fill all detected holes
  • Update: Refresh hole detection
Hole Filling Algorithm

The hole-filling algorithm creates new triangles to close open boundaries. For complex holes, you may need to use the Fill Holes tool for more control over the filling strategy.

Normals Tab

The Normals tab helps ensure consistent face orientations across the surface. Inverted normals cause rendering issues (faces appear inside-out) and can cause Boolean operations to fail.

Diagnostics

FieldDescription
Inverted trianglesNumber of triangles with normals pointing in the wrong direction

Actions

ActionDescription
Fix Inverted TrianglesAutomatically correct inverted triangle orientations
UpdateRefresh normal analysis
Invert All TrianglesFlip all triangle orientations (useful if the entire surface is inside-out)
Invert TriangleInteractive mode—click on individual triangles to flip them
Recompute NormalsRecalculate normals for all faces and vertices

Typical Workflows

Pre-Boolean Preparation

Before performing Boolean operations, ensure your meshes are clean:

  1. Open the Diagnostics and Fixes tool
  2. Click Update on the Quick Fix tab to run all diagnostics
  3. Enable all fix options (Unify, Filter noise shells, Fix non-manifoldness)
  4. Click Fix to apply automatic repairs
  5. Switch to the Holes tab and fill any detected holes
  6. Verify the Comments section shows "Active surface mesh is closed and manifold"

3D Print Preparation

For 3D printing, surfaces must be manifold and watertight:

  1. Run Quick Fix diagnostics and apply automatic repairs
  2. Check the Shells tab—remove any unwanted small shells
  3. Use the Holes tab to ensure no open boundaries exist
  4. Verify Normals tab shows no inverted triangles
  5. Check for intersecting triangles in the Triangles tab

Cleaning Imported Meshes

When working with imported STL or OBJ files:

  1. Run comprehensive diagnostics on the Quick Fix tab
  2. Review shell statistics and remove noise shells
  3. Fix any overlapping or intersecting triangles
  4. Fill holes if the mesh should be watertight
  5. Ensure consistent normal orientation

Understanding Mesh Quality Metrics

Aspect Ratio

The aspect ratio measures how elongated a triangle is. An equilateral triangle has an aspect ratio of 1.0 (ideal). Higher values indicate increasingly elongated triangles:

  • 1.0: Equilateral (ideal)
  • 1.0–5.0: Good quality
  • 5.0–20.0: Acceptable for most applications
  • >20.0: May cause numerical issues

Skewness

Skewness measures deviation from an equilateral triangle (equiangle skew):

  • 0.0: Equilateral (ideal)
  • 0.0–0.5: Good quality
  • 0.5–0.9: Acceptable
  • >0.9: Poor quality, nearly degenerate

Non-Manifold Geometry

A mesh is manifold if:

  • Every edge is shared by exactly two faces
  • Every vertex is surrounded by a single fan of faces

Non-manifold conditions include:

  • Edges shared by more than two faces
  • Vertices where multiple fans meet (pinched vertices)
  • Self-intersecting surfaces

See Also

  • Filter Shells - Advanced shell filtering options
  • Fill Holes - Detailed hole-filling controls
  • Remesh - Improve mesh quality through remeshing
  • Editor - Manual triangle editing tools