Sub topic 6
Difference, Union and Intersect
This chapter assumes you can add modifiers in the Properties editor and switch between Object Mode and Edit Mode. It also assumes you know what a manifold mesh is from the earlier chapters. The Boolean modifier takes two solids and builds a new surface from them. The Operation setting decides which parts of the two solids survive. There are three operations, and each answers a different question about the overlap.
The mental model: inside and outside
A boolean treats each mesh as a solid, not as a shell of faces. Every point in space is either inside or outside each solid. Call the object that owns the modifier A (the target). Call the object it references B (the operand). The operation is a rule about which regions of space belong to the result:
- Difference: inside A and not inside B.
- Union: inside A or inside B.
- Intersect: inside A and inside B.
The modifier then builds new faces along the curve where the two surfaces cross, and it discards the faces that fall in rejected regions.
This model explains why the earlier chapters on manifold meshes and normals matter. If a mesh has holes, "inside" has no clear meaning, and the result becomes unreliable.
The three operations
| Operation | Result | Does order matter? | Typical use |
|---|---|---|---|
| Difference | A minus B | Yes | Holes, slots, windows, engraved shapes |
| Union | A and B fused into one shell | No (shape), though the target's data is kept | Joining parts into one solid, removing hidden internal faces |
| Intersect | Only the shared volume | No (shape) | Trimming a shape to a boundary, carving a part out of a block |
"Order does not matter" refers to the geometric shape. The mesh that holds the result is still the target, so its materials, UV maps and other data stay with it.
Difference
Difference subtracts B from A. If you swap the roles, you get a different shape: a cube minus a sphere is a cube with a dent, and a sphere minus a cube is a sphere with a flat-sided bite. When a cut looks wrong, first check that the modifier sits on the object you want to keep.
Difference leaves a cavity where B was. Any part of B that sticks out past A has no effect, because it was never inside A.
Union
Union merges both objects into a single outer surface. Faces of A that lie inside B are removed, and the same goes for faces of B inside A. This differs from joining with Ctrl+J. Joining puts both meshes in one object but keeps all their faces, including the ones buried inside. Union deletes the buried faces and gives you one connected shell.
Union is useful when you need a single watertight volume, for example before 3D printing.
Intersect
Intersect keeps only the volume that both objects share. Think of it as using B as a mold. A common use is shaping a block by intersecting it with a larger rounded form, so the block takes on a curved face. If the two objects do not overlap at all, the result is empty and the object seems to disappear. This is correct behavior, not a bug.
Setting the operation in the interface
Add a Boolean modifier from Add Modifier > Generate > Boolean. The panel shows these fields:
- Operation buttons: Intersect, Union, Difference.
- Operand Type: Object or Collection.
- Object (or Collection): the operand B.
- Solver: Fast or Exact, covered in a later chapter.
With a Collection operand, every object in the collection acts as an operand. This is handy when you have many cutters, such as a row of holes. For Difference, all collection members are subtracted. For Union, all are fused in. Use a collection when you have more than a few operands, because it avoids stacking many modifiers.
Doing it from a script
The same operation can be set through the operation property. This script builds a cube and a sphere that overlap and adds a Boolean modifier to the cube. Change the OPERATION value to try each mode.
import bpy
OPERATION = 'DIFFERENCE' # or 'UNION' or 'INTERSECT'
bpy.ops.mesh.primitive_cube_add(size=2, location=(0, 0, 0))
target = bpy.context.active_object
target.name = "Target"
bpy.ops.mesh.primitive_uv_sphere_add(radius=1.3, location=(0.8, 0, 0.8))
operand = bpy.context.active_object
operand.name = "Operand"
mod = target.modifiers.new(name="Boolean", type='BOOLEAN')
mod.operation = OPERATION
mod.operand_type = 'OBJECT'
mod.object = operand
mod.solver = 'EXACT'
operand.display_type = 'WIRE'
bpy.context.view_layer.objects.active = targetThe operand stays visible as a wireframe so you can see where it sits. With DIFFERENCE, you see the cube with a spherical bite out of one corner. With UNION, the sphere fuses into the corner. With INTERSECT, only the rounded corner of the cube that lies inside the sphere remains.
Choosing the right operation
Pick the operation by asking what you want to do with the overlap:
- You want to remove material: use Difference with a cutter.
- You want to merge two shapes into one solid: use Union.
- You want to keep only the shared region: use Intersect.
A single shape can often be built more than one way. A rounded block can come from Intersect, or from several Difference cuts. Choose the version that is easier to edit later. Difference with separate cutters usually wins, because each cutter can be moved on its own.
Combining operations in a stack
You can stack several Boolean modifiers on one object. They evaluate from top to bottom, and each one works on the result of the one above. This means order changes the outcome when you mix operations. For example:
- Union a boss (a raised cylinder) onto a plate.
- Difference a hole straight through the plate and the boss.
This gives a hole through both parts. Reverse the order and the hole is cut first, then the boss is added on top, which fills the hole where the boss overlaps it. Always put Union modifiers before the Difference cuts that should pass through the added parts.
The chapter on applying modifiers returns to this ordering and to the risks of applying a stack.
Common mistakes with operations
- The result looks inverted or has missing faces. The operand may have flipped normals, or it may not be closed. The Fast solver depends on normals, so a flipped operand can produce a cut that seems inside out. Recalculate normals on both objects.
- Nothing changes. Check that the operand actually overlaps the target, that the modifier's viewport display is on, and that you picked the right Operand Type.
- The wrong object is cut. The modifier belongs on the object that should keep its identity. Selecting the cutter and adding the modifier there cuts in the wrong direction.
- The cutter shows up in the render. The operand is still a normal object. Set it to display as wireframe or bounds, and turn off its render visibility, as the cutter workflow chapter shows.
- Partial cuts leave thin slivers. If an operand face lies exactly on a target face, the solver has to decide which side wins. Move the cutter slightly past the surface to avoid this.
Summary of behavior
Difference removes the overlap from the target. Union fuses both shapes and deletes the buried faces. Intersect keeps only the overlap. Each depends on the solid being well defined, and each can be stacked, so the order of modifiers decides the final shape.
Exercise
You have a flat plate with a raised cylindrical boss on top. You want a hole that goes through both the plate and the boss. Which operations do you use, in what order, and why?
Show answer
Add the boss with a Union modifier first, then add the hole with a Difference modifier below it. Modifiers evaluate top to bottom, so the Union produces one solid, and the Difference then cuts through the combined shape. If the Difference came first, the Union would fill the hole where the boss overlaps it.
Exercise
A cube has a Boolean modifier set to Intersect with a sphere that sits entirely outside the cube. What do you see, and is it a fault?
Show answer
The object disappears, because the two solids share no volume and the intersection is empty. This is correct behavior. Move the sphere so it overlaps the cube to get a visible result.