Nodes/ComfyUI libigl/Degenerate Faces
ComfyUI Node

Degenerate Faces

Your mesh has invisible faces, and they're quietly breaking your tools

By PozzettiAndrea·Created 10 months ago·Updated 4 days ago· 218
Degenerate Faces
  • trimesh
  • trimesh
  • info

Degenerate faces are triangles that have no real area: the three vertices are collinear, or two of them are the same point. They're invisible - they render as nothing - so they're easy to ignore. But they're also the classic source of "why is this failing and I can't see why." Booleans, hole filling, slicers, and physics engines all choke on degenerate faces, because mathematically those faces are undefined. If you've got a mesh that misbehaves in ways no visible feature explains, Degenerate Faces is the analysis node that hunts them down.

It's a splitter more than a reporter. Feed it a TRIMESH and it separates the degenerate faces from the healthy ones, handing you a list of meshes plus an info STRING with the report. The practical flow: run it, read the numbers, and if the degenerate count is anything but zero, take the clean part of the output and move on with it - or better, trace why the degenerates exist (usually a scan artifact, a bad export, or a booleans that produced slivers) so they don't come back.

The inputs and outputs

  • trimesh - one TRIMESH in.
  • trimesh (output) - a list, containing the separated mesh(es) - the degenerate portion and the clean geometry. This is also an output-node, so it's a legitimate terminal point, but its real value is mid-pipeline.
  • info - a STRING report: how many degenerate faces, where the problem concentrates.

Installing it

Same install as the whole pack:

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

Restart ComfyUI. ComfyUI Manager works too - search "GeometryPack" or install via Git URL with https://github.com/PozzettiAndrea/ComfyUI-GeometryPack.git. The one-click installer is experimental (comfy-env, downloads pixi); the README's manual route is the reliable one.

The workflow it slots into

Degenerate detection belongs in the "pre-flight" position: before you boolean, before you decimate, before you export for printing. Run it as a cheap sanity gate on any mesh that came from a scanner, a generator, or another node's output - that's where degenerates tend to originate. One honest caveat: this node finds and separates, it doesn't magically heal the geometry around them. If the degenerates are local slivers (classic from booleans), removing them is usually fine. If they're woven through the whole mesh, the underlying topology is suspect and you may be better off remeshing than spot-repairing. And since GeometryPack is a fast-moving WIP, treat a load-time error on this (or any) node as "update the pack" before you blame your workflow.

Categorygeompack/analysis

Inputs (1)

NameTypeDefaultDescription
trimeshTRIMESH

Outputs (2)

NameTypeDescription
trimeshTRIMESH
infoSTRING