MeshFix
The one-click-ish mesh doctor for wrecked scans
- input_mesh
- repaired_mesh
- info
MeshFix is the pack's "just make it watertight" node, built on the classic MeshFix algorithm by Marco Attene (via the pymeshfix wrapper). Photogrammetry scans come out broken in every way at once - holes, floating fragments, self-intersections, degenerate triangles. This node runs the whole cleanup in one pass: strip small junk, join nearby pieces, fill holes, and clear out self-intersections. It's the node you reach for before you've even decided what's actually wrong.
What it actually does
The defaults do a sensible full sweep:
- remove_small_components (default true) - deletes isolated fragments.
- join_components (default false) - attempt to stitch nearby disconnected parts together. Off by default, because joining things is riskier than deleting; turn it on when you know the pieces belong together.
- fill_holes (default true) - close boundary holes, with max_hole_edges (default 0 = fill everything) and refine_holes (default true) for better triangulation on the patches.
- clean_mesh (default true) - remove self-intersections and degenerate faces, with clean_iterations (default 10) and inner_loops (default 3) controlling how hard it works.
Outputs are repaired_mesh (TRIMESH) and an info report. The info string is worth reading - it tells you how many holes were closed and faces removed, which is how you know whether the fix actually bit.
Why it beats the single-purpose repair nodes
The pack has specialist fixers - Fill Holes (six backends), Fix Self Intersections (Removal), Fix Normals. MeshFix is the shotgun instead of the scalpel: fewer knobs, broader coverage, and it handles the common case of "I have no idea what's wrong, just fix it." For a scan that needs to be printable or boolean-able, run MeshFix first, then check the result in Preview Mesh, then reach for a specialist only if something specific survived. That's the workflow the pack's author points new users toward in the release thread - repair, then inspect.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/PozzettiAndrea/ComfyUI-GeometryPack.git
cd ComfyUI-GeometryPack
pip install -r requirements.txt --upgrade
python install.py
Or ComfyUI Manager → GeometryPack → Install, restart. pymeshfix is a main-env dependency - lighter than the Blender/CGAL side of the pack.
Where people get burned
MeshFix is not magic. Truly catastrophic input - giant overlapping regions, zero manifold structure - can produce a result that's watertight but geometrically wrong (pinched, warped, or features flattened). Check the viewer before you trust it. And join_components is the setting people flip on out of hope and regret: joining what shouldn't be joined welds unrelated parts together with ugly bridges. Start with it off, turn it on only when you know the pieces are one object. This pack is young - a fast-moving author means update before you debug.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| input_mesh | TRIMESH | — | |
| remove_small_componentsopt | COMBO | true | Remove small isolated mesh fragments before repair |
| join_componentsopt | COMBO | false | Attempt to join nearby disconnected components |
| fill_holesopt | COMBO | true | Fill boundary holes in the mesh |
| max_hole_edgesopt | INT | 00–10000 | Max edges for holes to fill. 0 = fill all holes regardless of size |
| refine_holesopt | COMBO | true | Refine triangulation when filling holes for better quality |
| clean_meshopt | COMBO | true | Remove self-intersections and degenerate faces |
| clean_iterationsopt | INT | 101–100 | Max iterations for self-intersection removal |
| inner_loopsopt | INT | 31–10 | Inner loops per clean iteration |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| repaired_mesh | TRIMESH | — |
| info | STRING | — |