Divooka Reference

Weed Planar Curves

36 nodes

On this page 36

Centroid

Function

Computes a closed planar profile's area centroid.

Signature
Centroid -> Point3d
    curve: Curve
    plane: Plane
    tolerance: Number
Point3d Centroid(
    Curve curve,
    Plane plane,
    double tolerance = 0.001)

Parameters

nametypedefaultdescription
curveCurve—
planePlane—
toleranceNumber0.001

Returns

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

Centroids

Function

Computes the area centroid of each closed planar curve.

Signature
Centroids -> Point3d Array
    curves: Curve Array
    plane: Plane
    tolerance: Number
Point3d[] Centroids(
    Curve[] curves,
    Plane plane,
    double tolerance = 0.001)

Parameters

nametypedefaultdescription
curvesCurve Array—
planePlane—
toleranceNumber0.001

Returns

resultPoint3d Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Planar Curves
Package
CAD

Close

Function

Adds a straight closing segment to each open curve; closed inputs are copied unchanged.

Signature
Close(curves: Curve Array, tolerance: Number) -> Curve Array
Curve[] Close(Curve[] curves, double tolerance = 0.001)

Parameters

nametypedefaultdescription
curvesCurve Array—
toleranceNumber0.001

Returns

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

Collection

Function

Copies a single curve into a list.

Signature
Collection(curve: Curve) -> Curve Array
Curve[] Collection(Curve curve)

Parameters

nametypedefaultdescription
curveCurve—

Returns

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

Difference

Function

Subtracts closed planar curve regions, retaining outer boundaries and holes as separate loops in each region's order.

Signature
Difference -> Curve Array
    subjects: Curve Array
    cutters: Curve Array
    plane: Plane
    tolerance: Number
Curve[] Difference(
    Curve[] subjects,
    Curve[] cutters,
    Plane plane,
    double tolerance = 0.001)

Parameters

nametypedefaultdescription
subjectsCurve Array—
cuttersCurve Array—
planePlane—
toleranceNumber0.001

Returns

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

End

Function

Returns the curve end point.

Signature
End(curve: Curve) -> Point3d
Point3d End(Curve curve)

Parameters

nametypedefaultdescription
curveCurve—

Returns

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

End Points

Function

Returns every start followed by every end, matching merged endpoint lists.

Signature
EndPoints(curves: Curve Array) -> Point3d Array
Point3d[] EndPoints(Curve[] curves)

Parameters

nametypedefaultdescription
curvesCurve Array—

Returns

resultPoint3d Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Planar Curves
Package
CAD

Ends

Function

Returns the end of each curve in source order.

Signature
Ends(curves: Curve Array) -> Point3d Array
Point3d[] Ends(Curve[] curves)

Parameters

nametypedefaultdescription
curvesCurve Array—

Returns

resultPoint3d Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Planar Curves
Package
CAD

Explode

Function

Explodes composite curves into their constituent segments, adding each curve's item index to the path.

Signature
Explode(curves: Cad Tree of Curve) -> Cad Tree of Curve
CadTree<Curve> Explode(CadTree<Curve> curves)

Parameters

nametypedefaultdescription
curvesCad Tree of Curve—

Returns

resultCad Tree of Curve
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Planar Curves
Package
CAD

Graft

Function

Copies each profile into its own singleton branch.

Signature
Graft(curves: Curve Array) -> Cad Tree of Curve
CadTree<Curve> Graft(Curve[] curves)

Parameters

nametypedefaultdescription
curvesCurve Array—

Returns

resultCad Tree of Curve
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Planar Curves
Package
CAD

Heights

Function

Returns world Y bounding extents of curves.

Signature
Heights(curves: Curve Array) -> Number Array
double[] Heights(Curve[] curves)

Parameters

nametypedefaultdescription
curvesCurve Array—

Returns

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

Intersection Parameters

Function

Returns intersection parameters on the first curve, including both limits of overlapping intervals.

Signature
IntersectionParameters -> Number Array
    first: Curve
    second: Curve
    tolerance: Number
double[] IntersectionParameters(
    Curve first,
    Curve second,
    double tolerance = 0.001)

Parameters

nametypedefaultdescription
firstCurve—
secondCurve—
toleranceNumber0.001

Returns

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

Items

Function

Returns one curve per branch, with cyclic indexing so -1 selects the last section.

Signature
Items(curves: Cad Tree of Curve, index: Integer) -> Curve Array
Curve[] Items(CadTree<Curve> curves, int index = -1)

Parameters

nametypedefaultdescription
curvesCad Tree of Curve—
indexInteger-1

Returns

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

Join Branches

Function

Joins each branch independently and flattens the resulting curves in branch order.

Signature
JoinBranches -> Curve Array
    curves: Cad Tree of Curve
    tolerance: Number
Curve[] JoinBranches(
    CadTree<Curve> curves,
    double tolerance = 0.001)

Parameters

nametypedefaultdescription
curvesCad Tree of Curve—
toleranceNumber0.001

Returns

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

Lines Between

Function

Creates lines between longest-matched endpoint lists.

Signature
LinesBetween -> Curve Array
    starts: Point3d Array
    ends: Point3d Array
Curve[] LinesBetween(Point3d[] starts, Point3d[] ends)

Parameters

nametypedefaultdescription
startsPoint3d Array—
endsPoint3d Array—

Returns

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

Loft Branches

Function

Creates one normal cubic loft per branch of ordered section curves.

Signature
LoftBranches(sections: Cad Tree of Curve) -> Cad Model
CadModel LoftBranches(CadTree<Curve> sections)

Parameters

nametypedefaultdescription
sectionsCad Tree of Curve—

Returns

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

Loft Branches At Parameters

Function

Lofts every branch at the same explicit section parameters, so common segment endpoints produce coincident patch boundaries.

Signature
LoftBranchesAtParameters -> Cad Model
    sections: Cad Tree of Curve
    parameters: Number Array
CadModel LoftBranchesAtParameters(
    CadTree<Curve> sections,
    double[] parameters)

Parameters

nametypedefaultdescription
sectionsCad Tree of Curve—
parametersNumber Array—

Returns

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

Mirror At X

Function

Mirrors corresponding curves across YZ planes at supplied origins.

Signature
MirrorAtX -> Curve Array
    curves: Curve Array
    origins: Point3d Array
Curve[] MirrorAtX(Curve[] curves, Point3d[] origins)

Parameters

nametypedefaultdescription
curvesCurve Array—
originsPoint3d Array—

Returns

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

Mirror Chords

Function

Mirrors each planar curve across the vertical plane through its endpoint chord.

Signature
MirrorChords(curves: Curve Array) -> Curve Array
Curve[] MirrorChords(Curve[] curves)

Parameters

nametypedefaultdescription
curvesCurve Array—

Returns

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

Move Points

Function

Moves every point by a common vector.

Signature
MovePoints -> Point3d Array
    points: Point3d Array
    motion: Vector3d
Point3d[] MovePoints(Point3d[] points, Vector3d motion)

Parameters

nametypedefaultdescription
pointsPoint3d Array—
motionVector3d—

Returns

resultPoint3d Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Planar Curves
Package
CAD

Move Sections

Function

Moves each branch's curve items along Z by corresponding heights; list lengths must agree.

Signature
MoveSections -> Cad Tree of Curve
    curves: Cad Tree of Curve
    heights: Number Array
CadTree<Curve> MoveSections(
    CadTree<Curve> curves,
    double[] heights)

Parameters

nametypedefaultdescription
curvesCad Tree of Curve—
heightsNumber Array—

Returns

resultCad Tree of Curve
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Planar Curves
Package
CAD

Offset Toward

Function

Offsets each profile toward a matched side point at every supplied distance; each profile owns one branch of ordered sections.

Signature
OffsetToward -> Cad Tree of Curve
    curves: Curve Array
    sidePoints: Point3d Array
    distances: Number Array
    plane: Plane
    tolerance: Number
CadTree<Curve> OffsetToward(
    Curve[] curves,
    Point3d[] sidePoints,
    double[] distances,
    Plane plane,
    double tolerance = 0.001)

Parameters

nametypedefaultdescription
curvesCurve Array—
sidePointsPoint3d Array—
distancesNumber Array—
planePlane—
toleranceNumber0.001

Returns

resultCad Tree of Curve
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Planar Curves
Package
CAD

Orient Increasing X

Function

Orients an open curve from the endpoint with the smaller world X coordinate. This makes a join's otherwise unspecified direction explicit.

Signature
OrientIncreasingX(curve: Curve) -> Curve
Curve OrientIncreasingX(Curve curve)

Parameters

nametypedefaultdescription
curveCurve—

Returns

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

Planar Faces

Function

Creates independent planar faces from closed profiles.

Signature
PlanarFaces(curves: Curve Array, tolerance: Number) -> Cad Model
CadModel PlanarFaces(Curve[] curves, double tolerance = 0.001)

Parameters

nametypedefaultdescription
curvesCurve Array—
toleranceNumber0.001

Returns

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

Point Y

Function

Returns world Y coordinates.

Signature
PointY(point: Point3d) -> Number
double PointY(Point3d point)

Parameters

nametypedefaultdescription
pointPoint3d—

Returns

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

Rotate At Origins

Function

Rotates copies around corresponding origins and angles using longest-list matching.

Signature
RotateAtOrigins -> Curve Array
    curve: Curve
    origins: Point3d Array
    angles: Number Array
Curve[] RotateAtOrigins(
    Curve curve,
    Point3d[] origins,
    double[] angles)

Parameters

nametypedefaultdescription
curveCurve—
originsPoint3d Array—
anglesNumber Array—

Returns

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

Scale

Function

Uniformly scales a curve about a supplied center.

Signature
Scale(curve: Curve, center: Point3d, factor: Number) -> Curve
Curve Scale(Curve curve, Point3d center, double factor)

Parameters

nametypedefaultdescription
curveCurve—
centerPoint3d—
factorNumber—

Returns

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

Shatter Closed

Function

Splits a closed curve into cyclic pieces; the original seam is joined through unless it is itself a cut.

Signature
ShatterClosed -> Curve Array
    curve: Curve
    parameters: Number Array
    tolerance: Number
Curve[] ShatterClosed(
    Curve curve,
    double[] parameters,
    double tolerance = 0.001)

Parameters

nametypedefaultdescription
curveCurve—
parametersNumber Array—
toleranceNumber0.001

Returns

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

Sort Centroid Y

Function

Sorts closed profiles by their area centroid's world Y coordinate.

Signature
SortCentroidY -> Curve Array
    curves: Curve Array
    plane: Plane
    tolerance: Number
Curve[] SortCentroidY(
    Curve[] curves,
    Plane plane,
    double tolerance = 0.001)

Parameters

nametypedefaultdescription
curvesCurve Array—
planePlane—
toleranceNumber0.001

Returns

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

Sort Length

Function

Sorts curves by measured arc length, retaining stable order for ties.

Signature
SortLength(curves: Curve Array) -> Curve Array
Curve[] SortLength(Curve[] curves)

Parameters

nametypedefaultdescription
curvesCurve Array—

Returns

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

Start

Function

Returns the curve start point.

Signature
Start(curve: Curve) -> Point3d
Point3d Start(Curve curve)

Parameters

nametypedefaultdescription
curveCurve—

Returns

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

Starts

Function

Returns the start of each curve in source order.

Signature
Starts(curves: Curve Array) -> Point3d Array
Point3d[] Starts(Curve[] curves)

Parameters

nametypedefaultdescription
curvesCurve Array—

Returns

resultPoint3d Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Planar Curves
Package
CAD

Sublist

Function

Extracts an inclusive interval of list indices with strict bounds.

Signature
Sublist -> Curve Array
    curves: Curve Array
    first: Integer
    last: Integer
Curve[] Sublist(Curve[] curves, int first = 0, int last = 1)

Parameters

nametypedefaultdescription
curvesCurve Array—
firstInteger0
lastInteger1

Returns

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

Transpose Sections

Function

Transposes segment items against the final section-path index: {A;B}(i) becomes {A;i}(B). Missing segments are rejected so an incomplete surface cannot appear successful.

Signature
TransposeSections(segments: Cad Tree of Curve) -> Cad Tree of Curve
CadTree<Curve> TransposeSections(CadTree<Curve> segments)

Parameters

nametypedefaultdescription
segmentsCad Tree of Curve—

Returns

resultCad Tree of Curve
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Planar Curves
Package
CAD

Vectors Between

Function

Constructs vectors between corresponding points using longest-list matching.

Signature
VectorsBetween -> Vector3d Array
    starts: Point3d Array
    ends: Point3d Array
Vector3d[] VectorsBetween(Point3d[] starts, Point3d[] ends)

Parameters

nametypedefaultdescription
startsPoint3d Array—
endsPoint3d Array—

Returns

resultVector3d Array
Ships with
Divooka ExploreDivooka Compute
Graph kinds
Flows Function Events Routine Constructs StateMachineState
Declared by
Weed Planar Curves
Package
CAD

Widths

Function

Returns world X bounding extents of curves.

Signature
Widths(curves: Curve Array) -> Number Array
double[] Widths(Curve[] curves)

Parameters

nametypedefaultdescription
curvesCurve Array—

Returns

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