Fix Self Intersections (Removal)
The blunt-force cure for self-intersecting meshes
- trimesh
- fixed_mesh
- info
Self-intersections are when a mesh crosses itself - faces poking through other faces. They're the reason a scan won't slice for 3D printing, won't boolean, and makes UV unwrappers throw up their hands. Fix Self Intersections (Removal) does what the name promises: it deletes the offending faces. It's not elegant. It's effective, and for meshes with a few isolated problem regions it's usually all you need.
How it works
The node looks for a self_intersecting attribute on the mesh's faces - which you get from the pack's Detect Self Intersections node - then removes every face flagged as intersecting. Removing faces leaves holes, so by default it fills them (fill_holes, default on) and re-orients the normals (fix_normals, default on) to keep things consistent. max_hole_size (default 100) caps how big a hole it'll try to close, and re_detect_after_fix re-runs intersection detection on the result so you can see whether anything survived.
Here's the catch, and the pack tells you it in the warning text: if the mesh has no self_intersecting data, the node returns the mesh unchanged. It won't detect intersections for you. The intended pipeline is:
- Load Mesh
- Detect Self Intersections
- Fix Self Intersections (Removal)
Skip step 2 and you'll get a "Please run DetectSelfIntersections first" message in the info output.
Inputs and outputs
- trimesh - the input mesh, ideally after Detect Self Intersections.
- fill_holes (bool, default true) - close the holes left by removed faces.
- fix_normals (bool, default true) - re-consistently orient normals after surgery.
- max_hole_size (3–10000, default 100) - holes bigger than this many edges stay open.
- re_detect_after_fix (bool, default true) - refresh the intersection fields on output.
It returns fixed_mesh (TRIMESH) and an info report of how many faces were removed and holes filled. The output is a repaired mesh you can then pipe into Fill Holes or MeshFix for cleanup, or straight to Save Meshes to Folder.
Installing
It's part of ComfyUI-GeometryPack:
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 after. This node runs in the main environment, so it doesn't need the heavy Blender/CGAL isolations some of this pack's backends drag in.
Where people get burned
The "it did nothing" moment is almost always the missing detection step - there's no intersection data, so it bails. The other trap: removal is destructive. If a mesh has huge overlapping regions (the classic "100 pieces that need to be converted" print-failure case from the pack's own release thread), removing faces can carve big craters that even hole-filling can't smooth over nicely. For light contamination this node is perfect. For a wreck, run MeshFix or remesh afterward instead of expecting this to be a magic bullet. That's also where the pack's own author points people - remeshing is the sledgehammer for the really broken stuff.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| trimesh | TRIMESH | — | |
| fill_holesopt | BOOLEAN | true | — |
| fix_normalsopt | BOOLEAN | true | — |
| max_hole_sizeopt | INT | 1003–10000 | — |
| re_detect_after_fixopt | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| fixed_mesh | TRIMESH | — |
| info | STRING | — |