Geom.diff()
Description
Binary operation: difference of two or more shapes.
Syntax
JSGeom.diff(a: Shape, b: Shape) -> Shape
Geom.diff(shapes: Array<Point3>) -> Shape
Parameters
Parameter |
Type |
Description |
a |
Shape |
The first shape. |
b |
Shape |
The second shape. |
shapes |
Array<Point3> |
An array of shapes to compute the difference of. |
Return value
Type |
Description |
Shape |
A Shape object, resulting from the difference of shapes. |
Example
JS |
---|
| let box = Geom.box(100, 100, 100);
let cyl = Geom.cylinder(50, 150);
let s1 = Geom.diff(box, cyl); // box - cyl
console.info(s1); // output:
let s2 = Geom.diff(cyl, box); // cyl - box
console.info(s2); // output:
|
Last update: 14 August 2025, 18:47