Fill Holes
Six hole-filling algorithms, one dropdown
- mesh
- filled_mesh
- info
Holes in a mesh are the most common damage in the real world - scans lose chunks, reconstructions drop triangles, and suddenly your model isn't watertight and won't slice or boolean. Fill Holes is the pack's front node for patching them, and it's built on a bet: no single hole-filling algorithm is right for every hole, so here are six. One dropdown, six backends, and enough size controls that you can aim the fix.
The backends
- trimesh - the fast, zero-config fill. Great for small holes, pancakes the big ones.
- pymeshlab - MeshLab's close_holes with a maxholesize cap (default 0 = fill everything).
- pymeshfix - MeshFix-based; the quality pick for irregular boundaries.
- igl_fan - libigl fan triangulation of the hole boundary.
- cgal - CGAL's hole filling in its isolated environment; robust on tricky topology.
- gpu_cumesh - GPU-accelerated fill when you have the cuMesh environment and speed matters.
The optional backend.* params adapt to the backend: maxholesize and max_edges (both default 0 = no limit) cap holes by boundary-edge count, perimeter (default 0.03, relative to mesh scale) caps by size, and refine (default true) plus quality (triangulate / refine / fair) control patch quality. fair is the one to know: it blends the fill smoothly into the surrounding surface instead of leaving a flat cap on a curved hole.
Outputs: filled_mesh (TRIMESH) and info with what got closed.
How to think about it
Start with trimesh for a quick check - it's free and instant. If the result has pancaked patches, move to pymeshfix with refine on, or pymeshlab and tune maxholesize so you only fill what you meant to. Big, meaningful holes on organic shapes want quality: fair. The workflow that works: fill → check watertight in the info output → Preview Mesh to look at the patches. If a patch looks wrong, change backend, not hope.
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. The trimesh/pymeshlab/pymeshfix/igl backends run in the main env; the cgal and gpu_cumesh ones need their isolated environments built on first launch (the big downloads).
Where people get burned
"Fill everything" with maxholesize: 0 is how you learn that your mesh has a giant hole you didn't know about, and now there's a pancake across half the model. Cap the hole size first, then raise it. And the perennial pack gotcha: saved workflows from older versions fail validation with "value not in list" errors on backend combo values - re-pick the backend, re-save, and if it persists, update the pack. This node's many moving parts make it the most likely place you'll hit that.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| mesh | TRIMESH | — | |
| backend | COMBO | Hole filling algorithm and backend |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| filled_mesh | TRIMESH | — |
| info | STRING | — |