Nodes/ComfyUI libigl/Fill Holes Trimesh (backend)
ComfyUI Node

Fill Holes Trimesh (backend)

The one-input hole filler that's already on your machine

By PozzettiAndrea·Created 10 months ago·Updated 4 days ago· 218
Fill Holes Trimesh (backend)
  • mesh
  • filled_mesh
  • info

Fill Holes Trimesh is the simplest repair node in ComfyUI-GeometryPack: one input, one call to trimesh.fill_holes(), done. It's the hidden backend behind the trimesh option in the Fill Holes front node, and its whole personality is "cheap and cheerful." If a mesh has a handful of small boundary holes - the kind of damage scans pick up constantly - this patches them in milliseconds with zero configuration.

How it works

Trimesh's hole filling scans the boundary edges, groups them into loops, and closes each one with a fan of triangles. There are no knobs: you hand it a mesh and it returns filled_mesh plus an info string telling you how many faces were added and whether the result is watertight. If the mesh started watertight, it stays that way and says so.

That's the whole feature set, and it's a feature. The Fill Holes front node gives you six backends - PyMeshLab, PyMeshFix, IGL, CGAL, GPU - and a pile of quality controls. This backend is what you use when you don't care about the fine print, you just want holes gone.

When it's the right tool

Reach for it when the holes are small relative to the mesh and you just need a closed surface - a model heading to a slicer that's refusing to print because of a couple of pinholes, for example. The trade-off is real: trimesh's default fill is a straight triangulation, so on big curved holes you get a flat pancake instead of a surface that matches the surrounding shape. That's where the fancier backends earn their keep - PyMeshFix (the MeshFix node) refines the patch, and the pack's Fill Holes front node has a fair quality mode for smoothly blending filled regions into the surface.

Installing it

Standard pack install - trimesh is the dependency here, and the pack requires it anyway:

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. No heavy isolated environment needed for this backend; it runs in the main env.

Where people get burned

The "it filled but looks wrong" case - big holes get pancaked. That's not a bug, it's the algorithm's honest limits, and the fix is a better backend, not more patience. Also watch the watertight line in the info output: if it still says false after filling, there are holes this pass didn't cover, and you'll want the front node's maxholesize/perimeter controls or a remesh. And as with every node in this young, fast-moving pack, if a saved workflow throws a validation error, re-pick the backend and update the pack before you blame your mesh.

Categorygeompack/repair

Inputs (1)

NameTypeDefaultDescription
meshTRIMESH

Outputs (2)

NameTypeDescription
filled_meshTRIMESH
infoSTRING