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.
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:
| Tab | Purpose | Key Operations |
|---|---|---|
| Quick Fix | Automated diagnostics and one-click repair | Unify, filter noise shells, fix non-manifold edges |
| Shells | Analyze and manage disconnected components | View shell statistics, delete selected shells |
| Overlaps | Detect and fix overlapping triangles | Identify and remove overlapping faces |
| Triangles | Find problematic triangles by various criteria | Select by intersection, area, angle, aspect ratio, skewness |
| Holes | Detect and fill holes in the mesh | Count holes, measure diameters, fill holes |
| Normals | Fix inconsistent face orientations | Detect 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:
| Check | Description |
|---|---|
| Shells | Count the number of disconnected shell components |
| Overlapping triangles | Detect triangles that overlap with each other |
| Intersecting triangles | Find triangles that intersect other triangles |
| Holes | Count open boundaries (holes) in the mesh |
| Inverted normals | Detect triangles with inconsistent face orientations |
Each diagnostic displays a status indicator and count showing the severity of the issue.
Additional Information
| Field | Description |
|---|---|
| Noise shells | Small disconnected components that are likely artifacts |
| Non-manifold edges | Edges shared by more than two triangles (topology errors) |
Additional Fix Options
| Option | Description | Default |
|---|---|---|
| Unify | Remove duplicate vertices and process each shell separately | Enabled |
| Filter noise shells | Remove shells with area ≤0.05% of total, volume ≤0.0005% of total, or ≤2 triangles | Enabled |
| Fix non-manifoldness | Resolve non-manifold geometry issues | Enabled |
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
| Field | Description |
|---|---|
| Connected shells | Total number of disconnected shell components |
Statistics Table
The statistics table displays detailed information for each shell:
| Column | Description |
|---|---|
| Shell ID | Unique identifier for the shell |
| Volume | Enclosed volume of the shell (mm³) |
| Area | Surface area of the shell (mm²) |
| Triangles | Number 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
| Field | Description |
|---|---|
| Overlapping triangles | Number 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
| Method | Description | Parameters |
|---|---|---|
| Select intersecting triangles | Find triangles that intersect other triangles | Geometric tolerance |
| Select non-manifold triangles | Find triangles connected to non-manifold edges | None |
| Select triangles based on triangle area | Find triangles outside an area range | Min/Max area (mm²) |
| Select triangles based on triangle angle | Find triangles with extreme angles | Min/Max angle (°) |
| Select triangles based on triangle aspect ratio | Find triangles with poor aspect ratios | Min/Max aspect ratio |
| Select triangles based on triangle skewness | Find triangles with high skewness | Min/Max skew |
Parameters by Method
Intersecting Triangles
| Parameter | Description | Default |
|---|---|---|
| Geometric tolerance | Distance threshold for intersection detection | 0.3 |
Area-Based Selection
| Parameter | Description | Default |
|---|---|---|
| Min. area (mm²) | Triangles with area ≤ this value are selected | 0.005 |
| Max. area (mm²) | Triangles with area ≥ this value are selected | 1000.0 |
Angle-Based Selection
| Parameter | Description | Default |
|---|---|---|
| Min. angle (°) | Triangles with minimum angle ≤ this value are selected | 0.01 |
| Max. angle (°) | Triangles with minimum angle ≥ this value are selected | 177.0 |
Aspect Ratio-Based Selection
| Parameter | Description | Default |
|---|---|---|
| Min. aspect ratio | Triangles with aspect ratio ≤ this value are selected | 1.0 |
| Max. aspect ratio | Triangles with aspect ratio ≥ this value are selected | 1000.0 |
Skewness-Based Selection
| Parameter | Description | Default |
|---|---|---|
| Min. skew | Triangles with skewness ≤ this value are selected | 0.0 |
| Max. skew | Triangles with skewness ≥ this value are selected | 0.9994 |
Diagnostics
| Field | Description |
|---|---|
| Selected triangles | Number of triangles matching the selection criteria |
| Non-manifold edges | Number 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
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
| Field | Description |
|---|---|
| Number of holes | Count 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
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
| Field | Description |
|---|---|
| Inverted triangles | Number of triangles with normals pointing in the wrong direction |
Actions
| Action | Description |
|---|---|
| Fix Inverted Triangles | Automatically correct inverted triangle orientations |
| Update | Refresh normal analysis |
| Invert All Triangles | Flip all triangle orientations (useful if the entire surface is inside-out) |
| Invert Triangle | Interactive mode—click on individual triangles to flip them |
| Recompute Normals | Recalculate normals for all faces and vertices |
Typical Workflows
Pre-Boolean Preparation
Before performing Boolean operations, ensure your meshes are clean:
- Open the Diagnostics and Fixes tool
- Click Update on the Quick Fix tab to run all diagnostics
- Enable all fix options (Unify, Filter noise shells, Fix non-manifoldness)
- Click Fix to apply automatic repairs
- Switch to the Holes tab and fill any detected holes
- Verify the Comments section shows "Active surface mesh is closed and manifold"
3D Print Preparation
For 3D printing, surfaces must be manifold and watertight:
- Run Quick Fix diagnostics and apply automatic repairs
- Check the Shells tab—remove any unwanted small shells
- Use the Holes tab to ensure no open boundaries exist
- Verify Normals tab shows no inverted triangles
- Check for intersecting triangles in the Triangles tab
Cleaning Imported Meshes
When working with imported STL or OBJ files:
- Run comprehensive diagnostics on the Quick Fix tab
- Review shell statistics and remove noise shells
- Fix any overlapping or intersecting triangles
- Fill holes if the mesh should be watertight
- 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