CAD Builder
32 nodes
On this page 32
Make CAD Builder
FunctionCreates an empty session with a fixed, positive modeling tolerance.
CadBuilder(tolerance: Number) -> Cad Builder
CadBuilder CadBuilder(double tolerance = 1E-06)
Parameters
| name | type | default | description |
|---|---|---|---|
| tolerance | Number | 1E-06 |
Returns
| CAD Builder | Cad Builder |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Add
FunctionAdds a model by set union, applying the current placement first. Throws on failure without changing the current model.
Add(Cad Builder: Cad Builder, model: Cad Model)
void Add(CadBuilder Cad Builder, CadModel model)
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| model | Cad Model | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Append
FunctionAdds a model as separate bodies without fusing them.
Append(Cad Builder: Cad Builder, model: Cad Model)
void Append(CadBuilder Cad Builder, CadModel model)
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| model | Cad Model | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Build
FunctionReturns the current immutable snapshot with no copying or regeneration.
Build(Cad Builder: Cad Builder) -> Cad Model
CadModel Build(CadBuilder Cad Builder)
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — |
Returns
| result | Cad Model |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Clear
FunctionRemoves all bodies, retaining the placement stack.
Clear(Cad Builder: Cad Builder)
void Clear(CadBuilder Cad Builder)
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Color
FunctionOverload 1 of 2
Color
Cad Builder: Cad Builder
color: Color
children: Action<Cad Builder>void Color(
CadBuilder Cad Builder,
ColorElement color,
Action<CadBuilder> children)Adds everything a block builds, painted: OpenSCAD's color(c) { ... } (Cad.Color). A colour painted over another replaces it, as OpenSCAD's outer color() does.
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| color | Color | — | The colour, its alpha how opaque. |
| children | Action<Cad Builder> | — | The block, given a session of its own. |
Overload 2 of 2
Color
Cad Builder: Cad Builder
color: Text
alpha: Number
children: Action<Cad Builder>void Color(
CadBuilder Cad Builder,
string color,
double alpha,
Action<CadBuilder> children)Adds everything a block builds, painted a colour written as OpenSCAD writes one: color("red") { ... }, color("#ff8000", 0.5) { ... } (Cad.ColorOf).
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| color | Text | — | A colour's name, as CSS and OpenSCAD name colours, or "#rgb", "#rgba", "#rrggbb" or "#rrggbbaa". |
| alpha | Number | — | How opaque, from 0 to 1, times any alpha the text gives. |
| children | Action<Cad Builder> | — | The block, given a session of its own. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Cut
FunctionSubtracts a model after applying the current placement.
Cut(Cad Builder: Cad Builder, model: Cad Model)
void Cut(CadBuilder Cad Builder, CadModel model)
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| model | Cad Model | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Difference
FunctionAdds the first child of a block less every other: OpenSCAD's difference() { ... }. A block that adds nothing adds nothing.
Difference
Cad Builder: Cad Builder
children: Action<Cad Builder>void Difference(
CadBuilder Cad Builder,
Action<CadBuilder> children)Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| children | Action<Cad Builder> | — | The block, given a session of its own. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Difference Group
FunctionRuns a nested construction in an independent session, then subtracts its completed union as one atomic edit.
DifferenceGroup
Cad Builder: Cad Builder
action: Action<Cad Builder>void DifferenceGroup(
CadBuilder Cad Builder,
Action<CadBuilder> action)Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| action | Action<Cad Builder> | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Children
FunctionThe children added so far, in order, each placed: what a scoped operation given this session's block works on.
Children(Cad Builder: Cad Builder) -> Cad Model Array
CadModel[] Children(CadBuilder Cad Builder)
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — |
Returns
| result | Cad Model Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Current
FunctionThe current immutable evaluated snapshot.
Current(Cad Builder: Cad Builder) -> Cad Model
CadModel Current(CadBuilder Cad Builder)
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — |
Returns
| result | Cad Model |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Tolerance
FunctionThe tolerance used by builder boolean edits, in model units.
Tolerance(Cad Builder: Cad Builder) -> Number
double Tolerance(CadBuilder Cad Builder)
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — |
Returns
| result | Number |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Hull
FunctionAdds the convex hull of everything a block builds: OpenSCAD's hull() { ... } (Cad.Hull: exact for solids of flat faces and for solids standing upright between two heights, the hull of their tessellation otherwise).
Hull(Cad Builder: Cad Builder, children: Action<Cad Builder>)
void Hull(CadBuilder Cad Builder, Action<CadBuilder> children)
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| children | Action<Cad Builder> | — | The block, given a session of its own. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Intersect
FunctionKeeps the intersection with a model after applying the current placement.
Intersect(Cad Builder: Cad Builder, model: Cad Model)
void Intersect(CadBuilder Cad Builder, CadModel model)
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| model | Cad Model | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Intersection
FunctionAdds what every child of a block has in common: OpenSCAD's intersection() { ... }.
Intersection
Cad Builder: Cad Builder
children: Action<Cad Builder>void Intersection(
CadBuilder Cad Builder,
Action<CadBuilder> children)Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| children | Action<Cad Builder> | — | The block, given a session of its own. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Linear Extrude
FunctionOverload 1 of 2
LinearExtrude
Cad Builder: Cad Builder
height: Number
children: Action<Cad Shape Builder>void LinearExtrude(
CadBuilder Cad Builder,
double height,
Action<CadShapeBuilder> children)Adds a flat shape a block draws, carried up the Z axis: OpenSCAD's linear_extrude(height) { ... }.
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| height | Number | — | How high, in model units. |
| children | Action<Cad Shape Builder> | — | The block, drawing in a flat session of its own. |
Overload 2 of 2
LinearExtrude
Cad Builder: Cad Builder
height: Number
centered: Truth
twist: Number
scaleX: Number
scaleY: Number
children: Action<Cad Shape Builder>void LinearExtrude(
CadBuilder Cad Builder,
double height,
bool centered,
double twist,
double scaleX,
double scaleY,
Action<CadShapeBuilder> children)Adds a flat shape a block draws, carried up the Z axis turning and scaling: OpenSCAD's linear_extrude(height, center, twist, scale) { ... } (Cad.LinearExtrude; the twist is in radians, counter-clockwise).
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| height | Number | — | How high, in model units. |
| centered | Truth | — | Centred on Z = 0 in height. |
| twist | Number | — | How far the top is turned, in radians, counter-clockwise seen from +Z. |
| scaleX | Number | — | The top's scale along X. |
| scaleY | Number | — | The top's scale along Y. |
| children | Action<Cad Shape Builder> | — | The block, drawing in a flat session of its own. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Minkowski
FunctionAdds the Minkowski sum of everything a block builds, each child added to the next: OpenSCAD's minkowski() { ... } (Cad.Minkowski: exact for a solid and a ball, for solids standing upright, and for polyhedra; the sum of a tessellation otherwise).
Minkowski
Cad Builder: Cad Builder
children: Action<Cad Builder>void Minkowski(
CadBuilder Cad Builder,
Action<CadBuilder> children)Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| children | Action<Cad Builder> | — | The block, given a session of its own. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Mirror
FunctionAdds what a block builds, mirrored in the plane through the origin square to a direction: OpenSCAD's mirror([x, y, z]) { ... }.
Mirror
Cad Builder: Cad Builder
x: Number
y: Number
z: Number
children: Action<Cad Builder>void Mirror(
CadBuilder Cad Builder,
double x,
double y,
double z,
Action<CadBuilder> children)Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| x | Number | — | The mirror plane's normal, along X. |
| y | Number | — | Along Y. |
| z | Number | — | Along Z. |
| children | Action<Cad Builder> | — | The block, given a session of its own. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Mult Matrix
FunctionAdds what a block builds under a transform: OpenSCAD's multmatrix(m) { ... }.
MultMatrix
Cad Builder: Cad Builder
transform: Transform
children: Action<Cad Builder>void MultMatrix(
CadBuilder Cad Builder,
Transform transform,
Action<CadBuilder> children)Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| transform | Transform | — | An invertible affine transform. |
| children | Action<Cad Builder> | — | The block, given a session of its own. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Pop Transform
FunctionRestores the preceding placement; throws if the stack is empty.
PopTransform(Cad Builder: Cad Builder)
void PopTransform(CadBuilder Cad Builder)
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Push Transform
FunctionPushes a local placement. Nested placements compose parent*local; PopTransform restores the parent.
PushTransform(Cad Builder: Cad Builder, local: Transform)
void PushTransform(CadBuilder Cad Builder, Transform local)
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| local | Transform | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Resize
FunctionAdds what a block builds, scaled about the origin to a size: OpenSCAD's resize([x, y, z], auto) { ... }.
Resize
Cad Builder: Cad Builder
x: Number
y: Number
z: Number
auto: Truth
children: Action<Cad Builder>void Resize(
CadBuilder Cad Builder,
double x,
double y,
double z,
bool auto,
Action<CadBuilder> children)Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| x | Number | — | The new size along X; zero to leave it. |
| y | Number | — | The new size along Y; zero to leave it. |
| z | Number | — | The new size along Z; zero to leave it. |
| auto | Truth | — | Scale the directions given zero with the others. |
| children | Action<Cad Builder> | — | The block, given a session of its own. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Rotate
FunctionOverload 1 of 2
Rotate
Cad Builder: Cad Builder
x: Number
y: Number
z: Number
children: Action<Cad Builder>void Rotate(
CadBuilder Cad Builder,
double x,
double y,
double z,
Action<CadBuilder> children)Adds what a block builds, turned about the X, Y and Z axes in that order: OpenSCAD's rotate([x, y, z]) { ... }, in radians.
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| x | Number | — | The turn about X, first. |
| y | Number | — | The turn about Y, second. |
| z | Number | — | The turn about Z, last. |
| children | Action<Cad Builder> | — | The block, given a session of its own. |
Overload 2 of 2
Rotate
Cad Builder: Cad Builder
angle: Number
axis: Vector3d
children: Action<Cad Builder>void Rotate(
CadBuilder Cad Builder,
double angle,
Vector3d axis,
Action<CadBuilder> children)Adds what a block builds, turned about an axis through the origin: OpenSCAD's rotate(a, [x, y, z]) { ... }, in radians.
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| angle | Number | — | How far, in radians, right-handed about the axis. |
| axis | Vector3d | — | The axis's direction. |
| children | Action<Cad Builder> | — | The block, given a session of its own. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Rotate Extrude
FunctionAdds a flat shape a block draws, turned about the Z axis: OpenSCAD's rotate_extrude(angle) { ... } (Cad.RotateExtrude; the angle is in radians).
RotateExtrude
Cad Builder: Cad Builder
angle: Number
children: Action<Cad Shape Builder>void RotateExtrude(
CadBuilder Cad Builder,
double angle,
Action<CadShapeBuilder> children)Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| angle | Number | — | How far round, in radians. |
| children | Action<Cad Shape Builder> | — | The block, drawing in a flat session of its own. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Scale
FunctionAdds what a block builds, scaled about the origin: OpenSCAD's scale([x, y, z]) { ... }.
Scale
Cad Builder: Cad Builder
x: Number
y: Number
z: Number
children: Action<Cad Builder>void Scale(
CadBuilder Cad Builder,
double x,
double y,
double z,
Action<CadBuilder> children)Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| x | Number | — | The factor along X. |
| y | Number | — | The factor along Y. |
| z | Number | — | The factor along Z. |
| children | Action<Cad Builder> | — | The block, given a session of its own. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Set
FunctionReplaces the current model on success. Ignores placement; useful for fillets, shells, undo and restoring snapshots.
Set(Cad Builder: Cad Builder, model: Cad Model)
void Set(CadBuilder Cad Builder, CadModel model)
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| model | Cad Model | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Transform Current
FunctionTransforms all current geometry; does not change the placement used for subsequent additions.
TransformCurrent(Cad Builder: Cad Builder, transform: Transform)
void TransformCurrent(
CadBuilder Cad Builder,
Transform transform)Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| transform | Transform | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Translate
FunctionAdds what a block builds, moved: OpenSCAD's translate([x, y, z]) { ... }. The block's children are one child here.
Translate
Cad Builder: Cad Builder
x: Number
y: Number
z: Number
children: Action<Cad Builder>void Translate(
CadBuilder Cad Builder,
double x,
double y,
double z,
Action<CadBuilder> children)Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| x | Number | — | How far along X. |
| y | Number | — | How far along Y. |
| z | Number | — | How far along Z. |
| children | Action<Cad Builder> | — | The block, given a session of its own. |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Try Set
FunctionAttempts to replace Current without throwing for a geometric failure. Argument errors still throw. No state changes on failure.
TrySet -> Cad Evaluation
Cad Builder: Cad Builder
model: Cad ModelCadEvaluation TrySet(CadBuilder Cad Builder, CadModel model)
Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| model | Cad Model | — |
Returns
| result | Cad Evaluation |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Union Group
FunctionRuns a nested construction in an independent session, then unions the completed model as one atomic edit. Exceptions leave the parent unchanged.
UnionGroup
Cad Builder: Cad Builder
action: Action<Cad Builder>void UnionGroup(
CadBuilder Cad Builder,
Action<CadBuilder> action)Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| action | Action<Cad Builder> | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
With Transform
FunctionExecutes a placement scope and restores placement even if the action throws. Successful individual edits remain committed, each a child of this session.
WithTransform
Cad Builder: Cad Builder
local: Transform
action: Action<Cad Builder>void WithTransform(
CadBuilder Cad Builder,
Transform local,
Action<CadBuilder> action)Parameters
| name | type | default | description |
|---|---|---|---|
| Cad Builder | Cad Builder | — | |
| local | Transform | — | |
| action | Action<Cad Builder> | — |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD
Begin
FunctionCreates an empty session from a graph node.
Begin(tolerance: Number) -> Cad Builder
CadBuilder Begin(double tolerance = 1E-06)
Parameters
| name | type | default | description |
|---|---|---|---|
| tolerance | Number | 1E-06 |
Returns
| result | Cad Builder |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Events Routine StateMachineState
- Declared by
- CAD Builder
- Package
- CAD