Divooka Reference

Constraint Sketch

27 nodes

On this page 27

Angle

Function

The angle between two lines, in degrees.

Signature
Angle
    Constraint Sketch: Constraint Sketch
    a: Sketch Curve
    b: Sketch Curve
    degrees: Number
    name: Text
void Angle(
    ConstraintSketch Constraint Sketch,
    SketchCurve a,
    SketchCurve b,
    double degrees,
    string name = "")

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
aSketch Curve—
bSketch Curve—
degreesNumber—
nameText—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Arc

Function

An arc counter-clockwise from its start to its end about its centre.

Signature
Arc -> Sketch Curve
    Constraint Sketch: Constraint Sketch
    cx: Number
    cy: Number
    startX: Number
    startY: Number
    endX: Number
    endY: Number
SketchCurve Arc(
    ConstraintSketch Constraint Sketch,
    double cx,
    double cy,
    double startX,
    double startY,
    double endX,
    double endY)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
cxNumber—
cyNumber—
startXNumber—
startYNumber—
endXNumber—
endYNumber—

Returns

resultSketch Curve
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Build

Function

Solves the sketch and builds its solid. The model reports what did not solve through ConstraintModel.Groups rather than throwing.

Signature
Build(Constraint Sketch: Constraint Sketch) -> Constraint Model
ConstraintModel Build(ConstraintSketch Constraint Sketch)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—

Returns

resultConstraint Model
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Circle

Function

A circle.

Signature
Circle -> Sketch Curve
    Constraint Sketch: Constraint Sketch
    cx: Number
    cy: Number
    radius: Number
SketchCurve Circle(
    ConstraintSketch Constraint Sketch,
    double cx,
    double cy,
    double radius)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
cxNumber—
cyNumber—
radiusNumber—

Returns

resultSketch Curve
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Coincident

Function

Two points at the same place.

Signature
Coincident
    Constraint Sketch: Constraint Sketch
    a: Sketch Point
    b: Sketch Point
void Coincident(
    ConstraintSketch Constraint Sketch,
    SketchPoint a,
    SketchPoint b)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
aSketch Point—
bSketch Point—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Diameter

Function

The diameter of a circle or arc.

Signature
Diameter
    Constraint Sketch: Constraint Sketch
    circle: Sketch Curve
    value: Number
    name: Text
void Diameter(
    ConstraintSketch Constraint Sketch,
    SketchCurve circle,
    double value,
    string name = "")

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
circleSketch Curve—
valueNumber—
nameText—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Distance

Function

The distance between two points; with a name, it can be changed later through ConstraintCad.SetDimension.

Signature
Distance
    Constraint Sketch: Constraint Sketch
    a: Sketch Point
    b: Sketch Point
    value: Number
    name: Text
void Distance(
    ConstraintSketch Constraint Sketch,
    SketchPoint a,
    SketchPoint b,
    double value,
    string name = "")

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
aSketch Point—
bSketch Point—
valueNumber—
nameText—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Equal Length

Function

Two lines of equal length.

Signature
EqualLength
    Constraint Sketch: Constraint Sketch
    a: Sketch Curve
    b: Sketch Curve
void EqualLength(
    ConstraintSketch Constraint Sketch,
    SketchCurve a,
    SketchCurve b)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
aSketch Curve—
bSketch Curve—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Equal Radius

Function

Two circles or arcs of equal radius.

Signature
EqualRadius
    Constraint Sketch: Constraint Sketch
    a: Sketch Curve
    b: Sketch Curve
void EqualRadius(
    ConstraintSketch Constraint Sketch,
    SketchCurve a,
    SketchCurve b)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
aSketch Curve—
bSketch Curve—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Extrude

Function

Extrudes the sketch's closed regions along the workplane's normal; the depth is a dimension like any other.

Signature
Extrude
    Constraint Sketch: Constraint Sketch
    depth: Number
    name: Text
void Extrude(
    ConstraintSketch Constraint Sketch,
    double depth,
    string name = "")

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
depthNumber—
nameText—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Origin

Function

The sketch origin, which is fixed.

Signature
Origin(Constraint Sketch: Constraint Sketch) -> Sketch Point
SketchPoint Origin(ConstraintSketch Constraint Sketch)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—

Returns

resultSketch Point
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Horizontal

Function

A line parallel to the workplane's X axis.

Signature
Horizontal
    Constraint Sketch: Constraint Sketch
    line: Sketch Curve
void Horizontal(
    ConstraintSketch Constraint Sketch,
    SketchCurve line)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
lineSketch Curve—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Lathe

Function

Turns the sketch's closed regions a full turn about a construction line.

Signature
Lathe(Constraint Sketch: Constraint Sketch, axis: Sketch Curve)
void Lathe(ConstraintSketch Constraint Sketch, SketchCurve axis)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
axisSketch Curve—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Length

Function

The length of a line segment.

Signature
Length
    Constraint Sketch: Constraint Sketch
    line: Sketch Curve
    value: Number
    name: Text
void Length(
    ConstraintSketch Constraint Sketch,
    SketchCurve line,
    double value,
    string name = "")

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
lineSketch Curve—
valueNumber—
nameText—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Line

Function

A line segment; a construction line takes part in constraints and serves as a lathe axis but bounds no region.

Signature
Line -> Sketch Curve
    Constraint Sketch: Constraint Sketch
    x1: Number
    y1: Number
    x2: Number
    y2: Number
    construction: Truth
SketchCurve Line(
    ConstraintSketch Constraint Sketch,
    double x1,
    double y1,
    double x2,
    double y2,
    bool construction = false)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
x1Number—
y1Number—
x2Number—
y2Number—
constructionTruthFalse

Returns

resultSketch Curve
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Midpoint

Function

A point at a line's midpoint.

Signature
Midpoint
    Constraint Sketch: Constraint Sketch
    point: Sketch Point
    line: Sketch Curve
void Midpoint(
    ConstraintSketch Constraint Sketch,
    SketchPoint point,
    SketchCurve line)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
pointSketch Point—
lineSketch Curve—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

On Circle

Function

A point on a circle or arc.

Signature
OnCircle
    Constraint Sketch: Constraint Sketch
    point: Sketch Point
    circle: Sketch Curve
void OnCircle(
    ConstraintSketch Constraint Sketch,
    SketchPoint point,
    SketchCurve circle)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
pointSketch Point—
circleSketch Curve—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

On Line

Function

A point on a line (extended without end).

Signature
OnLine
    Constraint Sketch: Constraint Sketch
    point: Sketch Point
    line: Sketch Curve
void OnLine(
    ConstraintSketch Constraint Sketch,
    SketchPoint point,
    SketchCurve line)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
pointSketch Point—
lineSketch Curve—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Parallel

Function

Two parallel lines.

Signature
Parallel
    Constraint Sketch: Constraint Sketch
    a: Sketch Curve
    b: Sketch Curve
void Parallel(
    ConstraintSketch Constraint Sketch,
    SketchCurve a,
    SketchCurve b)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
aSketch Curve—
bSketch Curve—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Perpendicular

Function

Two perpendicular lines.

Signature
Perpendicular
    Constraint Sketch: Constraint Sketch
    a: Sketch Curve
    b: Sketch Curve
void Perpendicular(
    ConstraintSketch Constraint Sketch,
    SketchCurve a,
    SketchCurve b)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
aSketch Curve—
bSketch Curve—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Point

Function

A datum point.

Signature
Point -> Sketch Point
    Constraint Sketch: Constraint Sketch
    x: Number
    y: Number
SketchPoint Point(
    ConstraintSketch Constraint Sketch,
    double x,
    double y)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
xNumber—
yNumber—

Returns

resultSketch Point
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Polygon

Function

A closed polygon of lines with coincident corners, through the points in order.

Signature
Polygon -> Sketch Curve Array
    Constraint Sketch: Constraint Sketch
    xs: Number Array
    ys: Number Array
SketchCurve[] Polygon(
    ConstraintSketch Constraint Sketch,
    double[] xs,
    double[] ys)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
xsNumber Array—
ysNumber Array—

Returns

resultSketch Curve Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Rectangle

Function

A closed rectangle of four lines with coincident corners, horizontal and vertical, counter-clockwise from the bottom edge.

Signature
Rectangle -> Sketch Curve Array
    Constraint Sketch: Constraint Sketch
    x1: Number
    y1: Number
    x2: Number
    y2: Number
SketchCurve[] Rectangle(
    ConstraintSketch Constraint Sketch,
    double x1,
    double y1,
    double x2,
    double y2)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
x1Number—
y1Number—
x2Number—
y2Number—

Returns

resultSketch Curve Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Revolve

Function

Turns the sketch's closed regions about a construction line by an angle in degrees.

Signature
Revolve
    Constraint Sketch: Constraint Sketch
    axis: Sketch Curve
    degrees: Number
void Revolve(
    ConstraintSketch Constraint Sketch,
    SketchCurve axis,
    double degrees)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
axisSketch Curve—
degreesNumber—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Tangent

Function

An arc tangent to a line at the point they share, which a ConstraintSketch.Coincident must make them share.

Signature
Tangent
    Constraint Sketch: Constraint Sketch
    arc: Sketch Curve
    line: Sketch Curve
void Tangent(
    ConstraintSketch Constraint Sketch,
    SketchCurve arc,
    SketchCurve line)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
arcSketch Curve—
lineSketch Curve—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Vertical

Function

A line parallel to the workplane's Y axis.

Signature
Vertical
    Constraint Sketch: Constraint Sketch
    line: Sketch Curve
void Vertical(
    ConstraintSketch Constraint Sketch,
    SketchCurve line)

Parameters

nametypedefaultdescription
Constraint SketchConstraint Sketch—
lineSketch Curve—
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD

Begin

Function

Starts a sketch in the XY workplane.

Signature
Begin() -> Constraint Sketch
ConstraintSketch Begin()

Returns

resultConstraint Sketch
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Events Routine StateMachineState
Declared by
Constraint Sketch
Package
CAD