Divooka Reference

Weed Curve Lists

15 nodes

On this page 15

Alternating Branches

Function

Selects alternating branches, retaining their paths and copying curve geometry.

Signature
AlternatingBranches -> Cad Tree of Curve
    curves: Cad Tree of Curve
    first: Truth
CadTree<Curve> AlternatingBranches(
    CadTree<Curve> curves,
    bool first = true)

Parameters

nametypedefaultdescription
curvesCad Tree of Curve—
firstTruthTrue

Returns

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

Alternating Points

Function

Selects alternating point items in each branch, starting with even indices when first is true.

Signature
AlternatingPoints -> Cad Tree of Point3d
    points: Cad Tree of Point3d
    first: Truth
CadTree<Point3d> AlternatingPoints(
    CadTree<Point3d> points,
    bool first = true)

Parameters

nametypedefaultdescription
pointsCad Tree of Point3d—
firstTruthTrue

Returns

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

Bounds Center

Function

Returns the center of the accurate union bounding box of a nonempty curve list.

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

Parameters

nametypedefaultdescription
curvesCurve Array—

Returns

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

Control Points

Function

Returns the control vertices of each curve in its own child branch.

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

Parameters

nametypedefaultdescription
curvesCad Tree of Curve—

Returns

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

Cull Point Index

Function

Removes one point index from each branch, appending the single index-operation output path.

Signature
CullPointIndex -> Cad Tree of Point3d
    points: Cad Tree of Point3d
    index: Integer
CadTree<Point3d> CullPointIndex(
    CadTree<Point3d> points,
    int index = 0)

Parameters

nametypedefaultdescription
pointsCad Tree of Point3d—
indexInteger0

Returns

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

Extrude Groups

Function

Extrudes each curve-group branch along Z by its corresponding height, keeping open profiles uncapped.

Signature
ExtrudeGroups -> Cad Model
    curves: Cad Tree of Curve
    heights: Number Array
    capped: Truth
CadModel ExtrudeGroups(
    CadTree<Curve> curves,
    double[] heights,
    bool capped = false)

Parameters

nametypedefaultdescription
curvesCad Tree of Curve—
heightsNumber Array—
cappedTruthFalse

Returns

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

Interleave

Function

Interleaves two equally sized lists, equivalent to merging paired singleton branches and then flattening.

Signature
Interleave -> Curve Array
    first: Curve Array
    second: Curve Array
Curve[] Interleave(Curve[] first, Curve[] second)

Parameters

nametypedefaultdescription
firstCurve Array—
secondCurve Array—

Returns

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

Item

Function

Returns a curve from a list using cyclic or strict indexing.

Signature
Item(curves: Curve Array, index: Integer, wrap: Truth) -> Curve
Curve Item(Curve[] curves, int index = 0, bool wrap = true)

Parameters

nametypedefaultdescription
curvesCurve Array—
indexInteger0
wrapTruthTrue

Returns

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

Merge

Function

Concatenates two curve lists in source order.

Signature
Merge(first: Curve Array, second: Curve Array) -> Curve Array
Curve[] Merge(Curve[] first, Curve[] second)

Parameters

nametypedefaultdescription
firstCurve Array—
secondCurve Array—

Returns

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

Mirror X

Function

Mirrors a curve across the world YZ plane.

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

Parameters

nametypedefaultdescription
curveCurve—

Returns

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

Move Groups X

Function

Moves each curve-group branch along X by its corresponding distance. Counts must agree.

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

Parameters

nametypedefaultdescription
curvesCad Tree of Curve—
distancesNumber Array—

Returns

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

Rectangular Cells

Function

Constructs rectangular cells in the XY plane, one branch per X column and Y varying inside each branch.

Signature
RectangularCells -> Cad Tree of Curve
    sizeX: Number
    sizeY: Number
    countX: Integer
    countY: Integer
CadTree<Curve> RectangularCells(
    double sizeX = 1,
    double sizeY = 1,
    int countX = 1,
    int countY = 10)

Parameters

nametypedefaultdescription
sizeXNumber1
sizeYNumber1
countXInteger1
countYInteger10

Returns

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

Scale Groups X

Function

Copies a curve group for each X scale factor around a supplied center; each transformed group occupies one branch.

Signature
ScaleGroupsX -> Cad Tree of Curve
    curves: Curve Array
    factors: Number Array
    center: Point3d
CadTree<Curve> ScaleGroupsX(
    Curve[] curves,
    double[] factors,
    Point3d center)

Parameters

nametypedefaultdescription
curvesCurve Array—
factorsNumber Array—
centerPoint3d—

Returns

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

Vertices

Function

Returns a curve's control vertices, optionally reversing their order explicitly.

Signature
Vertices(curve: Curve, reverse: Truth) -> Point3d Array
Point3d[] Vertices(Curve curve, bool reverse = false)

Parameters

nametypedefaultdescription
curveCurve—
reverseTruthFalse

Returns

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

Widths

Function

Returns the accurate X extent of each curve-group branch.

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

Parameters

nametypedefaultdescription
curvesCad Tree of Curve—

Returns

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