Nodes/Avatar Graph/Mesh Intersect
ComfyUI Node

Mesh Intersect

Cutting a mesh's geometry against itself

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Mesh Intersect
  • BPY_OBJ
  • BPY_OBJ
mode
separate_mode
threshold0.00
solver

Blender calls this "Knife Intersect," and that's the more honest name - it's a self-cutting operator. Wherever the selected geometry overlaps other geometry on the same mesh, it slices new edges along the intersection lines. No second object involved; it cuts a mesh against its own overlapping parts.

How it works

This wraps Blender's mesh.intersect operator. Its official description is blunt about what it actually does: cut solid geometry from selected to unselected. Wherever the selected faces cross unselected faces in 3D space, new edges get cut in along the overlap, splitting the affected faces on both sides of that boundary - but nothing gets deleted or combined the way a full boolean would. It's the intersection-finding half of a boolean operation without the union/difference step; for that, see its sibling Mesh Intersect Boolean.

The inputs and outputs that matter

  • BPY_OBJ (optional) - the mesh, with the geometry you want cut against the rest already selected.
  • mode - SELECT or SELECT_UNSELECT, controlling which side of the resulting cut ends up selected afterward (useful if you're chaining a delete or extrude onto whichever piece the cut leaves selected).
  • separate_mode - ALL, CUT, or NONE, controlling whether the operation also splits the result into separate loose geometry along the new cut, or leaves it as one connected mesh with new edges added.
  • threshold (default a very small value, ~1e-6) - how close two surfaces need to be to count as intersecting. Rarely needs adjusting; raise it slightly if two surfaces that visually touch aren't registering as an intersection due to floating-point noise.
  • solver - FAST or EXACT. EXACT is more robust on tricky or coplanar overlaps at some performance cost; reach for it if FAST produces a broken or incomplete cut.

Output is a single BPY_OBJ, the mesh with the intersection cut in.

How to install it

ComfyUI Manager: search "Avatar Graph" and install. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui

then pip install -r requirements.txt and restart. Needs Blender's bpy module, pinned to Python 3.10.x - a dedicated conda environment on macOS/Linux, or Avatech's prebuilt Python-3.10 ComfyUI zip on Windows with the pack installed through Manager afterward.

Common issues & troubleshooting

Nothing gets cut even though the geometry visually overlaps. Double-check the selection - this operator specifically needs some faces selected and others not, since it cuts along the boundary between selected and unselected geometry. Selecting the entire mesh (or none of it) gives it no boundary to work with.

Cut looks broken or incomplete on complex, overlapping geometry. Switch solver to EXACT. FAST is quicker but more prone to failing on coplanar faces or messy overlaps - exactly the kind of thing generated or boolean-heavy meshes tend to produce.

Result isn't split into separate pieces the way you expected. Check separate_mode - NONE deliberately leaves everything as one connected mesh even after the cut; you need ALL or CUT if you actually want loose, separable geometry out the other side.

Categoryblender

Inputs (5)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
modeoptCOMBO2 options: SELECT, SELECT_UNSELECT
separate_modeoptCOMBO3 options: ALL, CUT, NONE
thresholdoptFLOAT0.000–0.009999999776482582
solveroptCOMBO2 options: FAST, EXACT

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ