diagnose_mesh
Detects self-intersections, holes, inverted normals, and floating fragments in 3D mesh files before slicing. Returns a severity-rated defect report with actionable fix steps for Blender or MeshLab.
Instructions
Deep mesh defect analysis — self-intersections, holes, normals, fragments (defect-focused).
Goes deeper than ``analyze_mesh_geometry`` (which focuses on printability
scoring and overhang detection). Use this when you suspect mesh defects
or when ``repair_mesh`` didn't fix the issue.
Analyzes: self-intersections, inverted/inconsistent normals, degenerate
(zero-area) faces, floating fragments, detailed hole reporting (count,
size, location), and polygon count assessment for FDM printing.
Returns a structured report with severity level, defect list, and
actionable fix recommendations (specific MeshLab/Blender steps).
Requires the optional ``trimesh`` package (``pip install trimesh``).
Supports STL, 3MF, OBJ, PLY, OFF, GLB, and GLTF formats. A 3MF
holding several objects is read as one body — the report describes
the whole plate.
Use this BEFORE slicing to catch problems that would cause print
failures or slicer errors. Complements ``validate_generated_mesh``
(basic checks) and ``analyze_printability`` (print-readiness scoring).
Args:
file_path: Path to a mesh file (STL, 3MF, OBJ, PLY, OFF, GLB,
GLTF).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>"
},
"name": "diagnose_mesh"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Path to a mesh file (STL, 3MF, OBJ, PLY, OFF, GLB, GLTF). |