Divooka Reference

Constraint Cad

9 nodes

On this page 9

Curves

Function

The model's solved curves, exact, in millimetres: every line, arc, circle, spline and text outline its sketches draw, and what its extrusions, lathes and repeats make of them - their copies, and the edges an extrusion runs between the copies of their ends - with construction lines and hidden groups left out. With a group name, that group's curves alone.

Signature
Curves(model: Constraint Model, group: Text) -> Curve Array
Curve[] Curves(ConstraintModel model, string group)

Parameters

nametypedefaultdescription
modelConstraint Model—
groupText—

Returns

resultCurve Array

Remarks

Round 25: what a sketch looks like once solved, as curves the CAD toolbox takes - and what the 3D view draws of a model, over its solid. A circle, a long arc or a spline Kerf keeps in several pieces comes out as one curve.

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

Dimensions

Function

The dimensions that drive the model, with their names (the constraints' comments) and values.

Signature
Dimensions(model: Constraint Model) -> Constraint Dimension Array
ConstraintDimension[] Dimensions(ConstraintModel model)

Parameters

nametypedefaultdescription
modelConstraint Model—

Returns

resultConstraint Dimension Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Constraint Cad
Package
CAD

Exact Solid

Function

The model's solid made exactly by the CAD kernel, in millimetres: every extrusion, lathe and revolve made from its sketch's exact curves rather than triangles, every repeat copied, each combined with the solid before it as the model combines it - joined, cut away, kept where they meet, or kept beside it. With a group name, the solid as it stands after that group.

Signature
ExactSolid -> Cad Model
    model: Constraint Model
    group: Text
    name: Text
CadModel ExactSolid(
    ConstraintModel model,
    string group,
    string name = "")

Parameters

nametypedefaultdescription
modelConstraint Model—The constraint model.
groupText—The sketch group to stop after; empty for the whole model.
nameText—What the solid's group is called; empty for "Exact Solid".

Returns

resultCad Model

Remarks

Round 26, Charles: "exact solids for sketches ... through the CAD kernel, not a mesh approximation". The model's own solid stays the triangle mesh Kerf builds (ConstraintCad.Solid); this is the same history made again from the solved curves, so its volume is the shape's own rather than a polygon's, its circles are cylinders, and every CAD node - fillets, sections, measuring, STEP - takes it. A helix and a linked part have no exact form here, and say so as the model's failure.

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

Groups

Function

The model's feature history: each group's name, type, remaining degrees of freedom and errors.

Signature
Groups(model: Constraint Model) -> Constraint Group Array
ConstraintGroup[] Groups(ConstraintModel model)

Parameters

nametypedefaultdescription
modelConstraint Model—

Returns

resultConstraint Group Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Constraint Cad
Package
CAD

Regions

Function

The closed regions a sketch bounds, exact, in millimetres: each the area inside an outer contour and outside the contours within it, its lines and arcs kept as lines and arcs. With a group name, that sketch's regions; without, every visible sketch's.

Signature
Regions -> Curve Region Array
    model: Constraint Model
    group: Text
CurveRegion[] Regions(ConstraintModel model, string group)

Parameters

nametypedefaultdescription
modelConstraint Model—
groupText—

Returns

resultCurve Region Array

Remarks

Round 26, Charles: "exact solids for sketches". A region is what the CAD toolbox extrudes, revolves or fills - Extrude Regions makes the sketch's solid from these without a triangle in between.

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

Set Dimension

Function

A new model with one dimension changed and everything re-solved: lengths in millimetres, angles in degrees. The dimension is found by its name (the constraint's comment) or by "#index" from ConstraintCad.Dimensions.

Signature
SetDimension -> Constraint Model
    model: Constraint Model
    dimension: Text
    value: Number
ConstraintModel SetDimension(
    ConstraintModel model,
    string dimension,
    double value)

Parameters

nametypedefaultdescription
modelConstraint Model—
dimensionText—
valueNumber—

Returns

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

Solid

Function

The solid the whole history builds, as a triangle mesh with shared vertices and normals; null when the model builds none. With a group name, the solid as it stands after that group.

Signature
Solid(model: Constraint Model, group: Text) -> Mesh
Mesh Solid(ConstraintModel model, string group)

Parameters

nametypedefaultdescription
modelConstraint Model—
groupText—

Returns

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

Surface Area

Function

The surface area of the model's solid, in square millimetres; 0 when it builds none.

Signature
SurfaceArea(model: Constraint Model) -> Number
double SurfaceArea(ConstraintModel model)

Parameters

nametypedefaultdescription
modelConstraint Model—

Returns

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

Volume

Function

The volume of the model's solid, in cubic millimetres; 0 when it builds none.

Signature
Volume(model: Constraint Model) -> Number
double Volume(ConstraintModel model)

Parameters

nametypedefaultdescription
modelConstraint Model—

Returns

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