Divooka Reference

CAD

79 nodes

On this page 79

Area

Function

Sums body surface areas in square model units, including interior faces of unfused groups.

Signature
Area(model: Cad Model) -> Number
double Area(CadModel model)

Parameters

nametypedefaultdescription
modelCad Model—

Returns

resultNumber
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Assemble

Function

Collects two models as separate assembly bodies. Its group is both.

Signature
Assemble -> Cad Model
    first: Cad Model
    second: Cad Model
    name: Text
CadModel Assemble(
    CadModel first,
    CadModel second,
    string name = "")

Parameters

nametypedefaultdescription
firstCad Model—One model.
secondCad Model—The other.
nameText—What its groups are called; empty for "Assemble".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Bodies

Function

Returns each body as an independently owned model for assembly manipulation.

Signature
Bodies(model: Cad Model) -> Cad Model Array
CadModel[] Bodies(CadModel model)

Parameters

nametypedefaultdescription
modelCad Model—

Returns

resultCad Model Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Bounds

Function

Returns combined bounds of trimmed geometry, or BoundingBox.Empty for an empty model.

Signature
Bounds(model: Cad Model) -> Bounding Box
BoundingBox Bounds(CadModel model)

Parameters

nametypedefaultdescription
modelCad Model—

Returns

resultBounding Box
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Box

Function

Box with a minimum corner at the origin, or centered on it when requested. Dimensions must exceed tolerance. Its groups: the whole box, and its sides "top", "bottom", "left", "right", "front" and "back", facing +Z, -Z, -X, +X, -Y and +Y.

Signature
Box -> Cad Model
    width: Number
    depth: Number
    height: Number
    centered: Truth
    tolerance: Number
    name: Text
CadModel Box(
    double width,
    double depth,
    double height,
    bool centered = false,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
widthNumber—Along X.
depthNumber—Along Y.
heightNumber—Along Z.
centeredTruthFalseCentered on the origin rather than cornered on it.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Box".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Cap

Function

Caps planar openings. Closed solids pass through unchanged; an open body that cannot be capped reports failure. Its groups: everything it gave, and "caps", the faces it closed the openings with.

Signature
Cap -> Cad Model
    model: Cad Model
    tolerance: Number
    name: Text
CadModel Cap(
    CadModel model,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The open bodies.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Cap".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Chamfer

Function

Bevels the edges a description picks on one solid, cutting each back by a distance on both faces it joins. Its groups: everything it gave, and "chamfers", the flat faces it cut.

Signature
Chamfer -> Cad Model
    model: Cad Model
    edges: Text
    distance: Number
    tolerance: Number
    name: Text
CadModel Chamfer(
    CadModel model,
    string edges,
    double distance,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The solid, one body.
edgesText—Which edges, in words: "edges of the top face", "vertical edges", "all edges", "edges of Boss top".
distanceNumber—How far back each edge is cut on both of its faces, in the model's units.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Chamfer".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Color

Function

Overload 1 of 2

Signature
Color(model: Cad Model, color: Color, name: Text) -> Cad Model
CadModel Color(
    CadModel model,
    ColorElement color,
    string name = "")

Paints every face of the bodies, OpenSCAD's color(c): a face keeps its colour through whatever is done to it after - a union keeps each solid's colours, a cut face takes the colour of the cutter it came from, as OpenSCAD's preview shows them, and the faces a fillet or a shell makes take the colour most of the body is. A colour painted over another replaces it, as OpenSCAD's outer color() does. The colours go out to STEP and 3MF (Parametric.CadExport) and show in the 3D view. Its group is everything it painted.

Parameters

nametypedefaultdescription
modelCad Model—The bodies.
colorColor—The colour, its alpha how opaque.
nameText—What its group is called; empty for "Color".

Returns

resultCad Model

Overload 2 of 2

Signature
Color -> Cad Model
    model: Cad Model
    color: Text
    alpha: Number
    name: Text
CadModel Color(
    CadModel model,
    string color,
    double alpha = 1,
    string name = "")

Paints every face of the bodies a colour written as OpenSCAD writes one: color("red"), color("#ff8000"), color("SteelBlue", 0.5) (see Cad.ColorOf and Cad.Color).

Parameters

nametypedefaultdescription
modelCad Model—The bodies.
colorText—A colour's name, as CSS and OpenSCAD name colours, or "#rgb", "#rgba", "#rrggbb" or "#rrggbbaa".
alphaNumber1How opaque, from 0 to 1, times any alpha the text gives.
nameText—What its group is called; empty for "Color".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Color Of

Function

A colour written as OpenSCAD writes one: a name CSS and OpenSCAD both know, case aside ("red", "SteelBlue"), or a hex code "#rgb", "#rgba", "#rrggbb" or "#rrggbbaa".

Signature
ColorOf(color: Text, alpha: Number) -> Color
ColorElement ColorOf(string color, double alpha = 1)

Parameters

nametypedefaultdescription
colorText—The colour's name or hex code.
alphaNumber1How opaque, from 0 to 1, times any alpha the text gives.

Returns

resultColor
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Color Rgb

Function

A colour from its red, green and blue, each from 0 to 1, as OpenSCAD's color([r, g, b, a]) gives one.

Signature
ColorRgb -> Color
    red: Number
    green: Number
    blue: Number
    alpha: Number
ColorElement ColorRgb(
    double red,
    double green,
    double blue,
    double alpha = 1)

Parameters

nametypedefaultdescription
redNumber—Red, from 0 to 1.
greenNumber—Green, from 0 to 1.
blueNumber—Blue, from 0 to 1.
alphaNumber1How opaque, from 0 to 1.

Returns

resultColor
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Colors

Function

The colours a model's faces are painted, each once, in the order its bodies and faces first show them; empty for a model none of whose faces is painted.

Signature
Colors(model: Cad Model) -> Color Array
ColorElement[] Colors(CadModel model)

Parameters

nametypedefaultdescription
modelCad Model—The bodies.

Returns

resultColor Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Cone

Function

Capped cone with its base at Z=0 and apex on positive Z. Its groups: the whole cone, "bottom", its flat base, and "side", its slope.

Signature
Cone -> Cad Model
    radius: Number
    height: Number
    tolerance: Number
    name: Text
CadModel Cone(
    double radius,
    double height,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
radiusNumber—Its base's radius.
heightNumber—Its height, along Z.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Cone".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Contains

Function

Tests whether a point is contained by any solid in the model.

Signature
Contains -> Truth
    model: Cad Model
    point: Point3d
    strictlyInside: Truth
    tolerance: Number
bool Contains(
    CadModel model,
    Point3d point,
    bool strictlyInside = false,
    double tolerance = 1E-06)

Parameters

nametypedefaultdescription
modelCad Model—
pointPoint3d—
strictlyInsideTruthFalse
toleranceNumber1E-06

Returns

resultTruth
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Cylinder

Function

Capped cylinder along positive Z, base at Z=0 or centered in height. Its groups: the whole cylinder, "top" and "bottom", its flat ends, and "side", its round face.

Signature
Cylinder -> Cad Model
    radius: Number
    height: Number
    centered: Truth
    tolerance: Number
    name: Text
CadModel Cylinder(
    double radius,
    double height,
    bool centered = false,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
radiusNumber—Its radius.
heightNumber—Its height, along Z.
centeredTruthFalseCentered on the origin in height rather than standing on it.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Cylinder".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Difference

Function

Subtracts the union of every cutter body from the union of subject bodies. All disconnected output pieces are preserved. Its groups: everything it gave, "seams", the edges it made where the cut meets the subject, and "cut", the faces the cutters left - a hole's walls, a slot's floor.

Signature
Difference -> Cad Model
    subject: Cad Model
    cutters: Cad Model Array
    tolerance: Number
    name: Text
CadModel Difference(
    CadModel subject,
    CadModel[] cutters,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
subjectCad Model—What is cut.
cuttersCad Model Array—What cuts it.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Difference".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Draft

Function

Tilts the flat faces a description picks on one solid by an angle, in radians, about where each meets a neutral plane - a mould's draft: positive angles narrow the part away from the plane. Its groups: everything it gave, and "drafted", the faces it tilted.

Signature
Draft -> Cad Model
    model: Cad Model
    faces: Text
    angle: Number
    neutralPlane: Plane
    tolerance: Number
    name: Text
CadModel Draft(
    CadModel model,
    string faces,
    double angle,
    Plane neutralPlane,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The solid, one body.
facesText—Which faces, in words: "faces facing front and faces facing back", "flat faces except the top and bottom faces", "Box left and Box right".
angleNumber—How far each face tilts, in radians.
neutralPlanePlane—The plane the faces keep their place on; its normal is the way the part is pulled from its mould.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Draft".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Edges

Function

The exact curves of the edges a description picks on every body - all of them unless told which - in body and edge order: what a fillet or a chamfer given the same words would round, to see before it does.

Signature
Edges(model: Cad Model, which: Text) -> Curve Array
Curve[] Edges(CadModel model, string which = "all edges")

Parameters

nametypedefaultdescription
modelCad Model—The model, of any number of bodies.
whichTextall edgesWhich edges, in words: "all edges", "edges parallel to Z", "edges of the top face", "circular edges", "edges of Boss top", "Fuse seams".

Returns

resultCurve Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Empty

Function

A successful collection with no bodies; identity for union and difference tools.

Signature
Empty() -> Cad Model
CadModel Empty()

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Evaluate

Function

Explicitly evaluates a graph value so its diagnostic result can be inspected in a node.

Signature
Evaluate(model: Cad Model) -> Cad Evaluation
CadEvaluation Evaluate(CadModel model)

Parameters

nametypedefaultdescription
modelCad Model—

Returns

resultCad Evaluation
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Extrude

Function

Extrudes a copied planar profile with optional hole loops. Capped closed profiles produce solids; uncapped profiles produce sheets. Its groups: the whole extrusion, "start", the cap where the profile was, "end", the cap it was carried to, and "sides", every other face - the holes' walls among them.

Signature
Extrude -> Cad Model
    profile: Curve
    direction: Vector3d
    capped: Truth
    holes: Curve Array
    tolerance: Number
    name: Text
CadModel Extrude(
    Curve profile,
    Vector3d direction,
    bool capped = true,
    Curve[] holes,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
profileCurve—The closed or open profile, in a plane.
directionVector3d—Which way, and how far.
cappedTruthTrueWhether a closed profile's ends are capped into a solid.
holesCurve Array—Closed loops inside the profile, cut through.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Extrude".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Extrude Face

Function

Pushes or pulls the one face a description picks on a solid along its outward normal by a distance: outward adds to the solid, a negative distance cuts into it. Its groups: everything it gave, "cap", the face it pushed out, and "walls", the faces it made between the two.

Signature
ExtrudeFace -> Cad Model
    model: Cad Model
    face: Text
    distance: Number
    tolerance: Number
    name: Text
CadModel ExtrudeFace(
    CadModel model,
    string face,
    double distance,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The solid, one body.
faceText—Which face, in words: "the top face", "the largest face", "Boss top".
distanceNumber—How far, in the model's units: outward adds, a negative distance cuts in.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Extrude Face".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Extrude Regions

Function

Extrudes planar boolean regions, preserving each region's holes. Its groups: the whole extrusion, "start", the caps where the regions were, "end", the caps they were carried to, and "sides", every other face.

Signature
ExtrudeRegions -> Cad Model
    regions: Curve Region Array
    direction: Vector3d
    tolerance: Number
    name: Text
CadModel ExtrudeRegions(
    CurveRegion[] regions,
    Vector3d direction,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
regionsCurve Region Array—The regions, in one plane.
directionVector3d—Which way, and how far.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Extrude Regions".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Face Colors

Function

The colour each face of one body is painted, by face, or null for a face never painted.

Signature
FaceColors -> Optional Color Array
    model: Cad Model
    body: Integer
ColorElement?[] FaceColors(CadModel model, int body = 0)

Parameters

nametypedefaultdescription
modelCad Model—The bodies.
bodyInteger0Which body, counted from 0.

Returns

resultOptional Color Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Faces

Function

The faces a description picks on every body - all of them unless told which - each a sheet of its own in body and face order, its exact surface, holes and trims kept: what a shell or a draft given the same words would take, to see before it does.

Signature
Faces(model: Cad Model, which: Text) -> Cad Model Array
CadModel[] Faces(CadModel model, string which = "all faces")

Parameters

nametypedefaultdescription
modelCad Model—The model, of any number of bodies.
whichTextall facesWhich faces, in words: "all faces", "the top face", "faces facing up", "cylindrical faces", "Boss top", "the top face of Plate".

Returns

resultCad Model Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Faceted Sphere

Function

OpenSCAD's faceted sphere, sphere(r, $fn = segments): rings of corners at (i + ½)·180°/rings from the top, rings being half the segments rounded up, each ring's first corner over +X; flat polygons close the top and the bottom and flat quadrilaterals join the rings. The exact sphere is Cad.Sphere. Its group is the solid.

Signature
FacetedSphere -> Cad Model
    radius: Number
    segments: Integer
    tolerance: Number
    name: Text
CadModel FacetedSphere(
    double radius,
    int segments,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
radiusNumber—The radius the corners lie on.
segmentsInteger—The corners round each ring, at least three: OpenSCAD's $fn, or Cad2D.Fragments of the radius.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its group is called; empty for "Faceted Sphere".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Fillet

Function

Rounds the edges a description picks on one solid with a rolling ball of a radius: "edges parallel to Z", "edges of the top face", "edges of Boss top". Edges that run on smoothly from a picked one are rounded with it. Its groups: everything it gave, and "fillets", the round faces it made.

Signature
Fillet -> Cad Model
    model: Cad Model
    edges: Text
    radius: Number
    tolerance: Number
    name: Text
CadModel Fillet(
    CadModel model,
    string edges,
    double radius,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The solid, one body.
edgesText—Which edges, in words: "edges parallel to Z", "vertical edges", "edges of the top face", "edges of Boss top", "Boss rim".
radiusNumber—The rolling ball's radius, in the model's units.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Fillet".

Returns

resultCad Model

Remarks

Round 26: picked by what they are, or by the groups the operations before gave them, rather than by index (Parametric.CadSelection), so a fillet keeps rounding the same edges after an edit upstream renumbers the body's edges.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

From Breps

Function

Imports independently owned copies of exact kernel geometry. Subsequent edits to the supplied B-reps cannot change this model.

Signature
FromBreps(breps: Brep Array) -> Cad Model
CadModel FromBreps(params Brep[] breps)

Parameters

nametypedefaultdescription
brepsBrep Array—

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

From Surface

Function

Creates an open B-rep from a copied surface. Solid-only operations report failure on open geometry. Its group is the sheet.

Signature
FromSurface -> Cad Model
    surface: Surface
    tolerance: Number
    name: Text
CadModel FromSurface(
    Surface surface,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
surfaceSurface—The surface.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "From Surface".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Frustum

Function

A cone cut off square to its axis, standing on Z = 0 or centred on it - OpenSCAD's cylinder(h, r1, r2, center): its bottom radius and its top radius may differ, either may be zero for a point, and equal they make a cylinder. Given three or more segments it is OpenSCAD's faceted one, a frustum of a regular pyramid with a corner on +X ($fn = segments); otherwise its surfaces are exact. Its groups: the whole frustum, "top" and "bottom", its flat ends, and "side", every other face.

Signature
Frustum -> Cad Model
    bottomRadius: Number
    topRadius: Number
    height: Number
    centered: Truth
    segments: Integer
    tolerance: Number
    name: Text
CadModel Frustum(
    double bottomRadius,
    double topRadius,
    double height,
    bool centered = false,
    int segments = 0,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
bottomRadiusNumber—The radius at Z = 0 (or at the bottom when centred).
topRadiusNumber—The radius at the top.
heightNumber—Its height, along Z.
centeredTruthFalseCentred on the origin in height rather than standing on it.
segmentsInteger0Zero for exact circles, or the number of corners of OpenSCAD's faceted one (at least three).
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Frustum".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Fuse

Function

Set union of two models, retaining disconnected output bodies. Its groups: everything it gave, and "seams", the edges it made where the two cross.

Signature
Fuse -> Cad Model
    first: Cad Model
    second: Cad Model
    tolerance: Number
    name: Text
CadModel Fuse(
    CadModel first,
    CadModel second,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
firstCad Model—One model.
secondCad Model—The other.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Fuse".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Group

Function

Collects models without fusing touching or overlapping bodies. Arrays are copied when the node is created.

Signature
Group(models: Cad Model Array) -> Cad Model
CadModel Group(params CadModel[] models)

Parameters

nametypedefaultdescription
modelsCad Model Array—

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Hull

Function

The convex hull of solids, OpenSCAD's hull(): the smallest convex solid holding them all. Exact where the solids allow it: solids of flat faces give the exact polyhedron of their corners, and solids standing upright between the same two heights - cylinders and prisms side by side, OpenSCAD's rounded plate - give the exact extrusion of the flat hull of their footprint. Other curved solids give the hull of their tessellation, a polyhedron within Chord of the true hull, and the result says so in its warnings. Its group is the hull.

Signature
Hull -> Cad Model
    models: Cad Model Array
    chord: Number
    tolerance: Number
    name: Text
CadModel Hull(
    CadModel[] models,
    double chord = 0,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
modelsCad Model Array—The solids.
chordNumber0How far the tessellation of curved solids may stray from them, in model units; zero for a thousandth of the solids' size.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its group is called; empty for "Hull".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Hull Of Points

Function

The convex polyhedron of points: OpenSCAD's hull of points (the corners of tiny cubes, say), exact, its corners the given points. Its group is the hull.

Signature
HullOfPoints -> Cad Model
    points: Point3d Array
    tolerance: Number
    name: Text
CadModel HullOfPoints(
    Point3d[] points,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
pointsPoint3d Array—At least four points not in one plane.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its group is called; empty for "Hull Of Points".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Intersection

Function

Intersection of two body sets. Disjoint sets succeed with empty output. Its groups: everything it gave, and "seams", the edges it made where the two cross.

Signature
Intersection -> Cad Model
    left: Cad Model
    right: Cad Model
    tolerance: Number
    name: Text
CadModel Intersection(
    CadModel left,
    CadModel right,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
leftCad Model—One set.
rightCad Model—The other.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Intersection".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Join

Function

Joins coincident naked edges of open B-reps; does not boolean fuse overlapping solids. Its group is everything it gave.

Signature
Join -> Cad Model
    models: Cad Model Array
    tolerance: Number
    name: Text
CadModel Join(
    CadModel[] models,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
modelsCad Model Array—The sheets.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Join".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Linear Array

Function

Copies the model count times, including the original at index zero, without fusing bodies. A zero count returns empty. Each copy keeps the groups of what it copies, so "Boss top" is the top of every copy; its own group is all the copies.

Signature
LinearArray -> Cad Model
    model: Cad Model
    count: Integer
    step: Vector3d
    name: Text
CadModel LinearArray(
    CadModel model,
    int count,
    Vector3d step,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The bodies.
countInteger—How many, the original among them.
stepVector3d—How far each copy is from the one before.
nameText—What its group is called; empty for "Linear Array".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Linear Extrude

Function

A flat shape carried up the Z axis into a solid, OpenSCAD's linear_extrude(height, center, twist, scale): as it rises the shape turns about the Z axis by up to Twist and is scaled about it along X and Y up to Scale X and Scale Y, turned first and then scaled. Without a twist the solid is exact; a twist's sides are fitted to the tolerance, since no exact surface makes them. Its groups: the whole extrusion, "start", the caps at the bottom, "end", the caps at the top, and "sides", every other face.

Signature
LinearExtrude -> Cad Model
    shape: Cad Shape
    height: Number
    centered: Truth
    twist: Number
    scaleX: Number
    scaleY: Number
    tolerance: Number
    name: Text
CadModel LinearExtrude(
    CadShape shape,
    double height,
    bool centered = false,
    double twist = 0,
    double scaleX = 1,
    double scaleY = 1,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
shapeCad Shape—The shape, in the XY plane.
heightNumber—How high, in model units.
centeredTruthFalseCentred on Z = 0 in height rather than standing on it.
twistNumber0How far the top is turned, in radians, counter-clockwise seen from +Z.
scaleXNumber1The top's scale along X: 1 keeps the shape's size, 0 (with Scale Y) closes it at a point.
scaleYNumber1The top's scale along Y.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Linear Extrude".

Returns

resultCad Model

Remarks

OpenSCAD's twist is in degrees and turns clockwise seen from above; here it is in radians and counter-clockwise, so OpenSCAD's twist = 90 is -π/2. OpenSCAD's slices only set how finely its mesh follows the twist and have nothing to set here. Both scales zero close each region at an apex on the axis, a pyramid or a cone.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Loft

Function

Lofts ordered, copied cross-sections. Sections must have compatible topology and orientation. Its group is the loft.

Signature
Loft -> Cad Model
    sections: Curve Array
    capped: Truth
    type: Loft Type
    tolerance: Number
    name: Text
CadModel Loft(
    Curve[] sections,
    bool capped = true,
    LoftType type = LoftType.Normal,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
sectionsCurve Array—The sections, in order.
cappedTruthTrueWhether closed end sections are capped into a solid.
typeLoft TypeNormalHow the surface runs between the sections.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Loft".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Minkowski

Function

The Minkowski sum of solids, OpenSCAD's minkowski(): every point of one added to every point of the next. Exact where an exact sum is a solid the kernel makes. A solid plus a ball - OpenSCAD's rounded cube - is the solid offset by the radius with its outside edges rounded by it, checked against the definition at points all over it. Two solids standing upright between two heights, a cube and a cylinder, are the extrusion of the flat sum of their cross-sections. Two polyhedra give their exact polyhedral sum. Other curved solids are tessellated within Chord first, as OpenSCAD facets every curved solid, and the result says so in its warnings. Its group is the sum.

Signature
Minkowski -> Cad Model
    models: Cad Model Array
    chord: Number
    tolerance: Number
    name: Text
CadModel Minkowski(
    CadModel[] models,
    double chord = 0,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
modelsCad Model Array—The solids, summed in turn.
chordNumber0How far the tessellation of curved solids may stray from them, in model units; zero for a thousandth of their size.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its group is called; empty for "Minkowski".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Mirror

Function

Mirrors in a plane. Its group is everything it mirrored.

Signature
Mirror(model: Cad Model, plane: Plane, name: Text) -> Cad Model
CadModel Mirror(CadModel model, Plane plane, string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The bodies.
planePlane—The mirror's plane.
nameText—What its group is called; empty for "Mirror".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Move Face

Function

Moves the one flat face a description picks on a solid by X, Y and Z, and the faces around it follow: a wall made thicker, a step raised. Its groups: everything it gave, and "moved", the face it moved.

Signature
MoveFace -> Cad Model
    model: Cad Model
    face: Text
    x: Number
    y: Number
    z: Number
    tolerance: Number
    name: Text
CadModel MoveFace(
    CadModel model,
    string face,
    double x,
    double y,
    double z,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The solid, one body.
faceText—Which face, in words: "the right face", "the top face", "Boss right".
xNumber—How far along X, in the model's units.
yNumber—How far along Y.
zNumber—How far along Z.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Move Face".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Offset

Function

Offsets a single closed solid without changing its topology. Unsupported topology changes produce a failed evaluation. Its group is everything it gave.

Signature
Offset -> Cad Model
    model: Cad Model
    distance: Number
    tolerance: Number
    name: Text
CadModel Offset(
    CadModel model,
    double distance,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The solid, one body.
distanceNumber—How far, outward, in the model's units.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its group is called; empty for "Offset".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Orient

Function

Orients a model between local frames without scaling. Its group is everything it moved.

Signature
Orient -> Cad Model
    model: Cad Model
    from: Plane
    to: Plane
    name: Text
CadModel Orient(
    CadModel model,
    Plane from,
    Plane to,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The bodies.
fromPlane—The frame they are in.
toPlane—The frame they go to.
nameText—What its group is called; empty for "Orient".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Pick Edges

Function

Which edges, chosen from a list instead of written: the words a Fillet's or a Chamfer's pin reads, made for it. With Of, among a group's edges, or of some faces.

Signature
PickEdges(which: Cad Edges, of: Text) -> Text
string PickEdges(CadEdges which = CadEdges.All, string of = "")

Parameters

nametypedefaultdescription
whichCad EdgesAllThe edges to pick.
ofText—Among what: a group's name, such as "Boss top", or words that pick faces, such as "the top face", for the edges that bound those faces. Empty for the whole solid.

Returns

EdgesText
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Pick Faces

Function

Which faces, chosen from a list instead of written: the words a Fillet's, a Shell's or a Draft's pin reads, made for it. With Of, among a group's faces, or of some edges.

Signature
PickFaces(which: Cad Faces, of: Text) -> Text
string PickFaces(CadFaces which = CadFaces.Top, string of = "")

Parameters

nametypedefaultdescription
whichCad FacesTopThe faces to pick.
ofText—Among what: a group's name, such as "Boss", or words that pick edges, such as "circular edges", for the faces those edges bound. Empty for the whole solid.

Returns

FacesText

Remarks

Round 26's review, and Charles's answer to it: the words that pick are English and are not translated, being what a group's name is written among, so somebody working in another language chooses from a list here, which the editor shows in their language, and wires the result where the words would be typed. What comes out is those same words, so the two can be mixed: "Boss top" typed into Of, or this node's result joined to typed words downstream.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Pipe

Function

Pipe along a copied rail. Zero thickness makes a solid pipe; positive thickness makes a hollow pipe. Its group is the pipe.

Signature
Pipe -> Cad Model
    rail: Curve
    radius: Number
    capped: Truth
    thickness: Number
    tolerance: Number
    name: Text
CadModel Pipe(
    Curve rail,
    double radius,
    bool capped = true,
    double thickness = 0,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
railCurve—The pipe's path.
radiusNumber—Its outer radius.
cappedTruthTrueWhether its ends are capped.
thicknessNumber0Its wall's thickness; zero for a solid rod.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Pipe".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Planar Face

Function

Creates a planar trimmed sheet from a closed boundary and optional hole loops. Its group is the sheet.

Signature
PlanarFace -> Cad Model
    boundary: Curve
    holes: Curve Array
    tolerance: Number
    name: Text
CadModel PlanarFace(
    Curve boundary,
    Curve[] holes,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
boundaryCurve—The closed boundary.
holesCurve Array—Closed loops inside it, cut out.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Planar Face".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Polar Array

Function

Copies around the world Z axis without fusing bodies. Full circles exclude a duplicate endpoint; partial arcs also use angle/count spacing. Each copy keeps the groups of what it copies; its own group is all the copies.

Signature
PolarArray -> Cad Model
    model: Cad Model
    count: Integer
    angle: Number
    name: Text
CadModel PolarArray(
    CadModel model,
    int count,
    double angle = 6.283185307179586,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The bodies.
countInteger—How many, the original among them.
angleNumber6.283185307179586The angle the copies spread over, in radians.
nameText—What its group is called; empty for "Polar Array".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Polyhedron

Function

A closed solid of flat faces through points, OpenSCAD's polyhedron(points, faces): each face a list of indices into the points. A face whose points lie in one plane is one exact planar face, of any number of sides; one whose points do not is cut into triangles, as OpenSCAD cuts it. The faces must close round a volume, each edge shared by two of them. OpenSCAD lists each face's points clockwise seen from outside; faces listed the other way round throughout are read too, and the solid turned outward. Its group is the solid.

Signature
Polyhedron -> Cad Model
    points: Point3d Array
    faces: Integer Array Array
    tolerance: Number
    name: Text
CadModel Polyhedron(
    Point3d[] points,
    int[][] faces,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
pointsPoint3d Array—The corners.
facesInteger Array Array—The faces, each a list of at least three indices into Points.
toleranceNumber1E-06The model's tolerance, in its units: how far a face's points may stray from its plane and still be one flat face.
nameText—What its group is called; empty for "Polyhedron".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Project Curve

Function

Projects a curve in a direction onto all trimmed faces, retaining all resulting pieces.

Signature
ProjectCurve -> Curve Array
    model: Cad Model
    curve: Curve
    direction: Vector3d
    tolerance: Number
Curve[] ProjectCurve(
    CadModel model,
    Curve curve,
    Vector3d direction,
    double tolerance = 1E-06)

Parameters

nametypedefaultdescription
modelCad Model—
curveCurve—
directionVector3d—
toleranceNumber1E-06

Returns

resultCurve Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Projection

Function

The shadow of solids on the XY plane, OpenSCAD's projection(): everything a line parallel to Z through it would meet, as a flat shape; with Cut, the cut through them at Z = 0 instead, OpenSCAD's projection(cut = true) (Cad.Slice). The shadow's edges are the solids' own edges and the curves along which their faces turn from facing up to facing down, carried straight down: exact where those are lines and arcs - a box however it is turned, a cylinder lying down, a sphere, a torus with its hole - and fitted within the tolerance where the faces are freeform.

Signature
Projection -> Cad Shape
    model: Cad Model
    cut: Truth
    tolerance: Number
CadShape Projection(
    CadModel model,
    bool cut = false,
    double tolerance = 1E-06)

Parameters

nametypedefaultdescription
modelCad Model—The solids.
cutTruthFalseWhether to cut at Z = 0 rather than cast the whole shadow.
toleranceNumber1E-06The model's tolerance, in its units.

Returns

resultCad Shape

Remarks

Every edge and silhouette curve, carried down, cuts the plane into faces; a face is in the shadow when the solids lie over (or under) a point well inside it.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Pull Curve

Function

Pulls a curve onto trimmed B-rep faces by closest point.

Signature
PullCurve -> Curve Array
    model: Cad Model
    curve: Curve
    tolerance: Number
Curve[] PullCurve(
    CadModel model,
    Curve curve,
    double tolerance = 1E-06)

Parameters

nametypedefaultdescription
modelCad Model—
curveCurve—
toleranceNumber1E-06

Returns

resultCurve Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Resize

Function

A solid scaled about the origin to a size, OpenSCAD's resize([x, y, z], auto): a size of zero keeps that direction as it is, or, with Auto, scales it by the largest factor of the sizes given, keeping the proportions. The sizes are read off the evaluated bodies' box. Its group is everything it scaled.

Signature
Resize -> Cad Model
    model: Cad Model
    x: Number
    y: Number
    z: Number
    auto: Truth
    name: Text
CadModel Resize(
    CadModel model,
    double x,
    double y,
    double z,
    bool auto = false,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The bodies.
xNumber—The new size along X; zero to leave it.
yNumber—The new size along Y; zero to leave it.
zNumber—The new size along Z; zero to leave it.
autoTruthFalseScale the directions given zero with the others.
nameText—What its group is called; empty for "Resize".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Revolve

Function

Revolves a copied profile about a line. Angle is radians; cap behavior follows the profile and kernel. Its groups: the whole revolution, "caps", the flat faces closing a turn short of a whole one, and "sides", every face the profile swept.

Signature
Revolve -> Cad Model
    profile: Curve
    axisStart: Point3d
    axisDirection: Vector3d
    angle: Number
    tolerance: Number
    name: Text
CadModel Revolve(
    Curve profile,
    Point3d axisStart,
    Vector3d axisDirection,
    double angle = 6.283185307179586,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
profileCurve—The profile.
axisStartPoint3d—A point on the axis.
axisDirectionVector3d—The axis's direction.
angleNumber6.283185307179586How far round, in radians.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Revolve".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Rotate

Function

Rotates around an axis through the supplied center, in radians. Its group is everything it turned.

Signature
Rotate -> Cad Model
    model: Cad Model
    angle: Number
    axis: Vector3d
    center: Point3d
    name: Text
CadModel Rotate(
    CadModel model,
    double angle,
    Vector3d axis,
    Point3d center,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The bodies.
angleNumber—The angle, in radians.
axisVector3d—The axis's direction.
centerPoint3d—A point on the axis.
nameText—What its group is called; empty for "Rotate".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Rotate Extrude

Function

A flat shape turned about the Z axis into a solid, OpenSCAD's rotate_extrude(angle): the shape's X becomes the distance from the axis and its Y the height, so the shape stands in the XZ plane, and it turns from there counter-clockwise seen from +Z. The solid is exact. Its groups: the whole revolution, "caps", the flat faces closing a turn short of a whole one, and "sides", every face the shape swept.

Signature
RotateExtrude -> Cad Model
    shape: Cad Shape
    angle: Number
    tolerance: Number
    name: Text
CadModel RotateExtrude(
    CadShape shape,
    double angle = 6.283185307179586,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
shapeCad Shape—The shape, in the XY plane, on one side of the Y axis.
angleNumber6.283185307179586How far round, in radians, counter-clockwise, or clockwise when negative: a whole turn by default.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Rotate Extrude".

Returns

resultCad Model

Remarks

As in OpenSCAD the shape must lie on one side of the Y axis, which becomes the Z axis; it may touch it along an edge. OpenSCAD's angle is in degrees; here it is in radians. A negative angle turns the other way, clockwise from the XZ plane, as OpenSCAD's does.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Rotate Xyz

Function

A solid turned about the X, Y and Z axes in that order, each through the origin - OpenSCAD's rotate([x, y, z]), whose angles are in degrees where these are in radians. Its group is everything it turned.

Signature
RotateXyz -> Cad Model
    model: Cad Model
    x: Number
    y: Number
    z: Number
    name: Text
CadModel RotateXyz(
    CadModel model,
    double x,
    double y,
    double z,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The bodies.
xNumber—The turn about X, first, in radians.
yNumber—The turn about Y, second.
zNumber—The turn about Z, last.
nameText—What its group is called; empty for "Rotate XYZ".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Ruled

Function

Creates an open ruled surface B-rep between copied curves. Its group is the sheet.

Signature
Ruled -> Cad Model
    first: Curve
    second: Curve
    tolerance: Number
    name: Text
CadModel Ruled(
    Curve first,
    Curve second,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
firstCurve—One edge of the sheet.
secondCurve—The other.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Ruled".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Scale

Function

Scales about the origin. Factors may be negative for reflection but cannot be zero. Its group is everything it scaled.

Signature
Scale -> Cad Model
    model: Cad Model
    x: Number
    y: Number
    z: Number
    name: Text
CadModel Scale(
    CadModel model,
    double x,
    double y,
    double z,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The bodies.
xNumber—The factor along X.
yNumber—The factor along Y.
zNumber—The factor along Z.
nameText—What its group is called; empty for "Scale".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Section

Function

Returns independently owned section curves through all bodies.

Signature
Section -> Curve Array
    model: Cad Model
    plane: Plane
    tolerance: Number
Curve[] Section(
    CadModel model,
    Plane plane,
    double tolerance = 1E-06)

Parameters

nametypedefaultdescription
modelCad Model—
planePlane—
toleranceNumber1E-06

Returns

resultCurve Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Select

Function

Names a selection on a solid, as an operation names what it made: the faces or edges the words pick - over the solid's descriptions and its groups, "edges of Boss top", "vertical edges of Plate" - become a group of that Name, which later operations read as they read any group ("Boss rim"). The solid's geometry is untouched.

Signature
Select(model: Cad Model, name: Text, pick: Text) -> Cad Model
CadModel Select(CadModel model, string name, string pick)

Parameters

nametypedefaultdescription
modelCad Model—The solid.
nameText—The group's name: "Boss rim".
pickText—The words that pick its faces or edges: "edges of Boss top".

Returns

resultCad Model

Remarks

Round 26 (Charles): "The 'Bookkeep' can still be used to provide a generic set of operations and thus named as Select, which just adds new names to existing selections." The words are read when the group is, not before, and what they picked follows the solid's history as any group's members do. A name already a group on the solid is refused.

Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Shell

Function

Hollows one solid to walls of a thickness, leaving open the faces a description picks: "the top face" makes an open box. Left empty, it keeps every face and hollows the solid inside. Its groups: everything it gave, "inside", the walls and floor it lined the solid with, and "rim", what is left of the faces it opened.

Signature
Shell -> Cad Model
    model: Cad Model
    openFaces: Text
    thickness: Number
    tolerance: Number
    name: Text
CadModel Shell(
    CadModel model,
    string openFaces,
    double thickness,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The solid, one body.
openFacesText—Which faces to leave open, in words: "the top face", "faces facing up", "Box top"; empty for none.
thicknessNumber—The walls' thickness, inward from the outside.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Shell".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Slice

Function

The cut through a solid at a height, as a flat shape in the XY plane - OpenSCAD's projection(cut = true) of the solid moved down by Z. Bodies that overlap are cut together, as one.

Signature
Slice -> Cad Shape
    model: Cad Model
    z: Number
    tolerance: Number
CadShape Slice(
    CadModel model,
    double z = 0,
    double tolerance = 1E-06)

Parameters

nametypedefaultdescription
modelCad Model—The solids.
zNumber0The height of the cut.
toleranceNumber1E-06The model's tolerance, in its units.

Returns

resultCad Shape
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Snapshot

Function

Evaluates and detaches construction history, preserving exact geometry.

Signature
Snapshot(model: Cad Model) -> Cad Model
CadModel Snapshot(CadModel model)

Parameters

nametypedefaultdescription
modelCad Model—

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Sphere

Function

Sphere centered at the origin. Its group is the sphere.

Signature
Sphere -> Cad Model
    radius: Number
    tolerance: Number
    name: Text
CadModel Sphere(
    double radius,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
radiusNumber—Its radius.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Sphere".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Split

Function

Splits every body by a plane, retaining both sides and all disconnected pieces. Its groups: everything it gave, and "seams", the edges it made along the plane.

Signature
Split -> Cad Model
    model: Cad Model
    plane: Plane
    tolerance: Number
    name: Text
CadModel Split(
    CadModel model,
    Plane plane,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The bodies.
planePlane—The plane that splits them.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Split".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Subtract

Function

Subtracts one cutter model, including all of its bodies, from a subject model. Its groups: everything it gave, "seams", the edges it made where the cut meets the subject, and "cut", the faces the cutter left.

Signature
Subtract -> Cad Model
    subject: Cad Model
    cutter: Cad Model
    tolerance: Number
    name: Text
CadModel Subtract(
    CadModel subject,
    CadModel cutter,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
subjectCad Model—What is cut.
cutterCad Model—What cuts it.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Subtract".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Surface

Function

A heightmap read from a file as a solid, OpenSCAD's surface(file, center, invert): a text file of heights, one row of numbers a line along X, the lines along Y, blank lines and lines starting with # skipped; or an image, each pixel's grey (its luminance, 0.2126 R + 0.7152 G + 0.0722 B) a height from 0 to 100, the top row of the image furthest along Y. See Cad.SurfaceFromHeights for the solid.

Signature
Surface -> Cad Model
    file: Text
    centered: Truth
    invert: Truth
    smooth: Truth
    tolerance: Number
    name: Text
CadModel Surface(
    string file,
    bool centered = false,
    bool invert = false,
    bool smooth = false,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
fileText—The text file (.dat or any other extension) or image (.png, .jpg, .bmp, .webp).
centeredTruthFalseCentred on the origin in X and Y.
invertTruthFalseFor an image, its heights turned upside down as OpenSCAD 2021.01 turns them, from 100/255 at black down to -99.6 at white; no effect on a text file.
smoothTruthFalseThe top an exact bicubic surface through the heights, rather than OpenSCAD's triangles.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its group is called; empty for "Surface".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Surface From Heights

Function

A heightmap as a solid, OpenSCAD's surface() of numbers given here: height heights[y][x] over the point (x, y), one unit apart, closed by upright sides and a flat bottom at the lower of 0 and one unit under the lowest height, as OpenSCAD closes it (smooth, one unit under the lowest point of the top, which can dip between heights). As OpenSCAD draws it, each square between four heights is four triangles meeting over its middle at their mean height, and triangles lying in one plane are one face. Smooth, the top is instead an exact bicubic B-spline surface through every height, the sides flat faces under its edges.

Signature
SurfaceFromHeights -> Cad Model
    heights: Number Array Array
    centered: Truth
    smooth: Truth
    tolerance: Number
    name: Text
CadModel SurfaceFromHeights(
    double[][] heights,
    bool centered = false,
    bool smooth = false,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
heightsNumber Array Array—The heights, a row for each Y, each as long as the first; at least two by two.
centeredTruthFalseCentred on the origin in X and Y.
smoothTruthFalseThe top an exact bicubic surface through the heights, rather than OpenSCAD's triangles.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its group is called; empty for "Surface".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Sweep

Function

Sweeps a copied profile along one rail; freeform sweeps are fitted to tolerance. Its group is the sweep.

Signature
Sweep -> Cad Model
    rail: Curve
    profile: Curve
    capped: Truth
    tolerance: Number
    name: Text
CadModel Sweep(
    Curve rail,
    Curve profile,
    bool capped = true,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
railCurve—The path.
profileCurve—The section carried along it.
cappedTruthTrueWhether a closed profile's ends are capped into a solid.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Sweep".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Sweep Two Rails

Function

Sweeps a copied profile between two rails. Its group is the sweep.

Signature
SweepTwoRails -> Cad Model
    rail1: Curve
    rail2: Curve
    profile: Curve
    capped: Truth
    tolerance: Number
    name: Text
CadModel SweepTwoRails(
    Curve rail1,
    Curve rail2,
    Curve profile,
    bool capped = true,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
rail1Curve—One rail.
rail2Curve—The other.
profileCurve—The section carried between them.
cappedTruthTrueWhether a closed profile's ends are capped into a solid.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Sweep Two Rails".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Thicken

Function

Thickens a single open surface B-rep into a solid. Its group is everything it gave.

Signature
Thicken -> Cad Model
    model: Cad Model
    thickness: Number
    tolerance: Number
    name: Text
CadModel Thicken(
    CadModel model,
    double thickness,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The sheet, one body.
thicknessNumber—How thick, in the model's units.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its group is called; empty for "Thicken".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

To Mesh

Function

Tessellates exact bodies with shared face-boundary vertices, preserving solid topology for collision and analysis. Separate bodies remain separate components; chord tolerance and normal angle control approximation. Output geometry is independently owned.

Signature
ToMesh -> Mesh
    model: Cad Model
    chordTolerance: Number
    angle: Number
Mesh ToMesh(
    CadModel model,
    double chordTolerance = 0.01,
    double angle = 0.15)

Parameters

nametypedefaultdescription
modelCad Model—
chordToleranceNumber0.01
angleNumber0.15

Returns

resultMesh
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Torus

Function

Ring torus around the Z axis. Major radius must exceed minor radius. Its group is the torus.

Signature
Torus -> Cad Model
    majorRadius: Number
    minorRadius: Number
    tolerance: Number
    name: Text
CadModel Torus(
    double majorRadius,
    double minorRadius,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
majorRadiusNumber—From the axis to the tube's middle.
minorRadiusNumber—The tube's radius.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Torus".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Transformed

Function

Applies a finite, invertible affine transform to every body. Transform composition uses column vectors: A*B applies B first. Its group is everything it moved.

Signature
Transformed -> Cad Model
    model: Cad Model
    transform: Transform
    name: Text
CadModel Transformed(
    CadModel model,
    Transform transform,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The bodies.
transformTransform—The transform.
nameText—What its group is called; empty for "Transformed".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Translate

Function

Translates every body by a vector in model units. Its group is everything it moved.

Signature
Translate -> Cad Model
    model: Cad Model
    x: Number
    y: Number
    z: Number
    name: Text
CadModel Translate(
    CadModel model,
    double x,
    double y,
    double z,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The bodies.
xNumber—How far along X.
yNumber—How far along Y.
zNumber—How far along Z.
nameText—What its group is called; empty for "Translate".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Trim

Function

Trims bodies to one side of a plane. Behind means opposite the plane normal. Its groups: everything it gave, and "seams", the edges it made along the plane.

Signature
Trim -> Cad Model
    model: Cad Model
    plane: Plane
    keep: Cutter Side
    tolerance: Number
    name: Text
CadModel Trim(
    CadModel model,
    Plane plane,
    CutterSide keep = CutterSide.Behind,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
modelCad Model—The bodies.
planePlane—The plane that trims them.
keepCutter SideBehindWhich side is kept.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Trim".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Union

Function

Unites all bodies as a set. Disjoint bodies are retained, and an empty list produces an empty model. Its groups: everything it gave, and "seams", the edges it made where the bodies cross.

Signature
Union -> Cad Model
    models: Cad Model Array
    tolerance: Number
    name: Text
CadModel Union(
    CadModel[] models,
    double tolerance = 1E-06,
    string name = "")

Parameters

nametypedefaultdescription
modelsCad Model Array—The models.
toleranceNumber1E-06The model's tolerance, in its units.
nameText—What its groups are called; empty for "Union".

Returns

resultCad Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD

Volume

Function

Sums signed solid volumes, in cubic model units. Grouped overlapping bodies are counted separately; union them first for set volume.

Signature
Volume(model: Cad Model) -> Number
double Volume(CadModel model)

Parameters

nametypedefaultdescription
modelCad Model—

Returns

resultNumber
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
CAD
Package
CAD