Skip to main content

Common

Common keeps only the volume that lies inside every solid you pick, and throws the rest away. With two solids that is their overlap; with three it is the part all three cover.

It is the operation for trimming a body down to an envelope — the space a part is allowed to occupy, the shape two profiles have in common when you approach a form from two directions.

In the viewport

  1. Click Boolean on the toolbar and choose the Common tab.
  2. Click each solid. They land in the Solids slot as numbered chips.
  3. Click Apply. Everything outside the shared volume disappears.
The Boolean dialog on the Common tab with two solids picked
  1. 1
    Common tab
    Uses the same single Solids slot as Fuse, so you can pick the solids first and choose the operation after.
  2. 2
    Solids
    Two or more. With three solids only the volume all three share is left, which is usually much smaller than you expect.
  3. 3
    The chips
    Numbered in pick order, but the order changes nothing here — the shared volume is the same whichever way round you pick.
  4. 4
    Apply
    Writes common(…). Exit closes the dialog and leaves the model alone.

Two cubes standing side by side, overlapping by half a cube, show it plainly:

BeforeBefore modetwo solids

Two 60 mm cubes in a row, the second shifted 30 mm along X. The band down the middle is where they overlap.

AfterAfter modecommon(a, b)

That band and nothing else: a 30 × 60 × 60 slab. Both cubes are consumed.

The code behind it

Everything either cube held on its own is gone. Common always shrinks the model — the result can never be bigger than the smallest solid you picked.

cubes.part.js
import { sketch, line, extrude, common } from 'fluidcad/core';
import { coincident, distance, fix, horizontal, vertical } from 'fluidcad/constraints';

// Cube A, on the left.
sketch("xy", () => {
const bottom = line([-45, -30], [15, -30]);
const right = line([15, -30], [15, 30]);
const top = line([15, 30], [-45, 30]);
const left = line([-45, 30], [-45, -30]);
coincident(bottom.end(), right.start());
coincident(right.end(), top.start());
coincident(top.end(), left.start());
coincident(left.end(), bottom.start());
horizontal(bottom);
vertical(right);
horizontal(top);
vertical(left);
fix(bottom.start(), [-45, -30]);
distance(bottom.start(), bottom.end(), 60);
distance(right.start(), right.end(), 60);
});
const a = extrude(60);

// Cube B, 30 mm to the right of A — the two overlap by half a cube.
sketch("xy", () => {
const bottom = line([-15, -30], [45, -30]);
const right = line([45, -30], [45, 30]);
const top = line([45, 30], [-15, 30]);
const left = line([-15, 30], [-15, -30]);
coincident(bottom.end(), right.start());
coincident(right.end(), top.start());
coincident(top.end(), left.start());
coincident(left.end(), bottom.start());
horizontal(bottom);
vertical(right);
horizontal(top);
vertical(left);
fix(bottom.start(), [-15, -30]);
distance(bottom.start(), bottom.end(), 60);
distance(right.start(), right.end(), 60);
});
const b = extrude(60).new();

common(a, b);
// Only the slab both cubes cover is left: 30 mm along X, the full
// 60 x 60 of their shared face.

Code forms

import { common } from 'fluidcad/core';

common(a, b) // the overlap of two solids
common(a, b, c) // the volume inside all three
common() // every solid in the current context

Solids that do not overlap have nothing in common, so the result would be empty. Rather than leave you with a silently missing body, the feature reports it as an error on its timeline row.