Apps Part of Renderloom

3D Mesh Boolean (union, difference, intersection)

Combine two closed meshes: add them, cut one out of the other or keep the overlap.

A closed mesh with up to 60000 triangles.

A closed mesh with up to 60000 triangles. For a difference, this is the part that is cut away.

More options

Used for the volume in cm³ and for GLB output (GLB stores metres). Both meshes must use the same units.

Try an example: · ·

More about this tool

How it works

Upload two closed STL, OBJ, PLY or GLB meshes and get their union, difference (first minus second) or intersection as a new watertight mesh. Move the second mesh with an offset, then download the result as STL, OBJ, PLY or GLB with a volume report.

  • Both meshes are welded and checked with the shared analyser: each must be watertight (no open or non-manifold edges, consistent winding, no zero-area triangles). Inside-out shells are turned outward; cavities keep pointing inward.
  • Decisions are made in normalised coordinates in which the second mesh is offset by a tiny amount along its vertex normals (outward for union and difference, inward for intersection) plus a small fixed translation. Every orientation test is certified with Shewchuk’s floating-point error bound; if a sign is uncertain the run repeats with a larger offset (up to 4 attempts).
  • Each edge of one mesh is tested against nearby faces of the other (bounding volume hierarchy). A crossing creates one vertex shared by both meshes and by the faces on both sides of the edge, so the cut curves match exactly.
  • Cut faces are split along the intersection curves and ear-clipped. Connected patches are classified as inside or outside the other mesh from the exact signs at the crossings (local face normals or the generalised winding number where a patch has none). Union keeps both outsides, intersection both insides, difference the outside of the first and the flipped inside of the second.
  • Edges shorter than the offset that end in an intersection vertex are collapsed, closed parts with zero thickness are removed, and the result is checked again: only watertight results are returned. Output coordinates are the original ones; intersection vertices lie on the original edges.

Both meshes must be closed, manifold and free of self-intersections; open or non-manifold meshes are refused, self-intersections are not detected. Intersection points may move by up to about 1e-8 of the model size, and faces that touch exactly are resolved by a tiny symbolic offset (touching parts merge in a union and are cut cleanly in a difference).

Sources

Part of Renderloom

How to combine two 3D meshes with a union, difference or intersection

Add two closed STL, OBJ, PLY or GLB meshes together, cut one out of the other or keep their overlap, and download a watertight result with a volume report.

What it is for

3D Mesh Boolean combines two closed meshes into one new solid. A union joins them, for example a pin and the block it sits on. A difference cuts the second mesh out of the first, for example a pocket, a hole or a recess for a magnet. An intersection keeps only the space both meshes share. You get the result as binary or ASCII STL, OBJ, PLY or GLB, plus a report of the volume, the triangle count and how the cut went.

Both meshes must already be clean solids: closed, manifold, consistently wound and free of zero-area triangles. Open or broken meshes are refused with a message that names the first or second mesh, so run 3D Mesh Repair first when needed. Meshes that cross themselves are not detected and give unreliable results.

Worked example

The first example uploads a 30 × 30 × 20 mm block (12 triangles) and a ball with a 12 mm radius (1280 triangles) whose centre sits on the middle of the block's top face. With Difference (A − B) the summary reads "Difference (A − B): watertight, 14.412 cm³, 722 triangles." The block had 18000 mm³ and the ball 7175.94 mm³; exactly half of the ball was inside, so 18000 − 3587.97 = 14412 mm³ remain. The download is a 36184-byte binary STL with a bowl-shaped pocket.

Switch the same files to Intersection (A ∩ B) and you get the lower half of the ball: 3587.97 mm³ in a 24 × 24 × 12 mm box. Union (A + B) gives 21588 mm³, the block plus the upper half of the ball.

The second example joins a 6 × 6 × 40 mm pin to the block. Move the second mesh along X, Y and Z are 12, 12 and 10 mm, so the pin stands in the middle and sticks out 30 mm. The union has 36 triangles and 19080 mm³ (18000 + 6 × 6 × 30) and is saved as GLB.

How to read the result

The metrics show whether the result is watertight, its volume in cm³, the triangle count and the number of separate parts. A difference that cuts a block in two, or a union of meshes that do not touch, gives more than one part.

Boolean result repeats these figures in your model units together with the surface area and the bounding box. Inputs lists the volume and triangle count of both meshes, so you can check that A ∪ B = A + B − A ∩ B. Intersection counts the intersection vertices and segments and the faces cut in each mesh. Tiny edges collapsed counts leftovers from faces that touch exactly; in the first example the ball's equator lies exactly in the top face, which gives 78. Perturbation tolerance is the largest distance a point can move, here about 5e-8 mm.

Tips and common mistakes

  • Both files must use the same units. Model units only sets the cm³ figure and the scale of GLB output.
  • Faces that touch exactly are handled: a union of two stacked boxes becomes one box, a cut that is flush with a face leaves a clean opening, and an intersection of touching parts is empty.
  • An empty result gives a message but no download.
  • GLB output is in metres with Y up, as glTF expects; STL, OBJ and PLY keep your coordinates.
  • Each mesh may have up to 60,000 triangles. Simplify dense scans first.

FAQ

Why was my mesh refused?

It has open edges, edges shared by more than two triangles, flipped triangles or zero-area triangles. 3D Mesh Repair fixes most of these.

Does the result keep my exact coordinates?

Yes for every original vertex. New vertices lie exactly on the original edges, placed to within the perturbation tolerance.

Can I chain several operations?

Yes. In Renderloom Mesh Lab, Use the result as the first mesh makes the result the new first mesh.

Is anything uploaded when I use the app?

No. Renderloom Mesh Lab runs the same engine in your browser, in a background worker.

Guide last updated:

For scripts and AI agents

  • JSON API: POST https://renderloommeshboolean.usefulweb.app/api/v1/calculate (same calculation as this page)
  • Interface description: OpenAPI 3.1 · AI guide: llms.txt
  • MCP server (Streamable HTTP): https://renderloommeshboolean.usefulweb.app/mcp · tool name renderloom_mesh_boolean
Example request
curl -s -X POST https://renderloommeshboolean.usefulweb.app/api/v1/calculate \
  -H 'content-type: application/json' \
  -d '{…see OpenAPI examples…}'
Feedback · ideas & bug reports welcome