docs / Combine shapes
Combine shapes
Merge or intersect solids, or group them without paying for a boolean.
intersect() keeps only the overlap. Lower the sphere radius and the carved corner shrinks.
const block = box(40, 40, 40);
const ball = sphere(26).translate(20, 20, 20);
return block.intersect(ball).color('beam');Calls
| Call | What it does |
|---|---|
union(...shapes) => Shape | Boolean union of two or more shapes. |
Shape.union(...others) => Shape | Boolean union with one or more shapes. |
Shape.intersect(...others) => Shape | Boolean intersection. |
Curve3D.analytics.intersect(other: Curve3D | Surface, opts?: { tolerance?: number }) => CurveCurveIntersection[] | CurveSurfaceIntersection[] | Geometric intersection of this curve with another Curve3D (returns { tA, tB, ptA, ptB, distance } records) or with a Surface from nurbsSurface() (returns { tCurve, uv, pt } records). |
Scene.toCompound() => Shape | OCCT TopoDS_Compound — groups bodies without booleaning. |
Scene.toUnion() => Shape | Explicit boolean fuse of all parts into one Shape. |