Nodes/Avatar Graph/Mesh Intersect Boolean
ComfyUI Node

Mesh Intersect Boolean

Union, difference, and intersect without leaving edit mode

By avatechai·Created 3 years ago·Updated 2 years ago· 264
Mesh Intersect Boolean
  • BPY_OBJ
  • BPY_OBJ
operation
use_swapfalse
use_selffalse
threshold0.00
solver

This is Blender's real boolean logic - union, difference, intersect - but run directly on a selection within a single mesh, instead of the more familiar Boolean modifier between two separate objects. Note it only takes one BPY_OBJ input, not two: the "two operands" are the selected geometry versus the unselected geometry on the same mesh, not two different objects.

How it works

This wraps Blender's mesh.intersect_boolean operator, and its own description says exactly what it does: cut solid geometry from selected to unselected, using the chosen boolean operation. Compared to its sibling Mesh Intersect, which only cuts new edges along an overlap, this one actually combines or removes geometry according to operation - the difference between finding where two solids meet and actually merging, subtracting, or isolating them.

The inputs and outputs that matter

  • BPY_OBJ (optional) - the mesh, with one solid selected and the other left unselected.
  • operation - INTERSECT (keep only the overlapping volume), UNION (merge both into one combined solid), or DIFFERENCE (subtract one from the other). This is the field that actually matters - pick based on what you want out.
  • use_swap (default false) - swaps which side (selected vs. unselected) is treated as "A" versus "B." Mostly relevant for DIFFERENCE, where the direction of subtraction changes the result - if a difference operation removed the wrong side, this is the fix.
  • use_self (default false) - allows the operation to handle geometry that self-intersects, rather than assuming clean, non-overlapping input on each side.
  • threshold and solver - same as Mesh Intersect: threshold is the tiny distance tolerance for what counts as touching, and solver (FAST/EXACT) trades speed for robustness on tricky geometry. Reach for EXACT if FAST produces a broken or missing result.

Output is a single BPY_OBJ, the mesh after the boolean has been applied.

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

Result looks empty, or the wrong geometry got kept. Check operation first - it's easy to reach for INTERSECT when you meant DIFFERENCE, or vice versa, and each produces a completely different (sometimes empty-looking) result on the same input.

DIFFERENCE removed the wrong piece. Toggle use_swap - it flips which side is subtracted from which, and the "wrong direction" result is the most common surprise with this operation.

Operation fails or produces broken geometry on complex meshes. Switch solver to EXACT, and turn on use_self if either side of the boolean has any self-intersecting geometry of its own - generated or boolean-heavy meshes hit this more often than hand-modeled ones.

Categoryblender

Inputs (6)

NameTypeDefaultDescription
BPY_OBJoptBPY_OBJ
operationoptCOMBO3 options: INTERSECT, UNION, DIFFERENCE
use_swapoptBOOLEANfalse
use_selfoptBOOLEANfalse
thresholdoptFLOAT0.000–0.009999999776482582
solveroptCOMBO2 options: FAST, EXACT

Outputs (1)

NameTypeDescription
BPY_OBJBPY_OBJ