Divooka Reference

Weed Tree Geometry

26 nodes

On this page 26

Average Points

Function

Computes the arithmetic point mean independently per nonempty branch.

Signature
AveragePoints(points: Cad Tree of Point3d) -> Cad Tree of Point3d
CadTree<Point3d> AveragePoints(CadTree<Point3d> points)

Parameters

nametypedefaultdescription
pointsCad Tree of Point3d—

Returns

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

Control Point Curves

Function

Creates one clamped NURBS from each control-point branch; these are control vertices, not interpolated samples.

Signature
ControlPointCurves -> Cad Tree of Curve
    points: Cad Tree of Point3d
    degree: Integer
CadTree<Curve> ControlPointCurves(
    CadTree<Point3d> points,
    int degree = 3)

Parameters

nametypedefaultdescription
pointsCad Tree of Point3d—
degreeInteger3

Returns

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

Cull Curve Index

Function

Removes one curve item per branch, appending the culling operation's item path.

Signature
CullCurveIndex -> Cad Tree of Curve
    curves: Cad Tree of Curve
    index: Integer
CadTree<Curve> CullCurveIndex(
    CadTree<Curve> curves,
    int index = 0)

Parameters

nametypedefaultdescription
curvesCad Tree of Curve—
indexInteger0

Returns

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

Cull Duplicate Points

Function

Removes points closer than tolerance within each branch, preserving the first representative and its order.

Signature
CullDuplicatePoints -> Cad Tree of Point3d
    points: Cad Tree of Point3d
    tolerance: Number
CadTree<Point3d> CullDuplicatePoints(
    CadTree<Point3d> points,
    double tolerance = 0.01)

Parameters

nametypedefaultdescription
pointsCad Tree of Point3d—
toleranceNumber0.01

Returns

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

Flatten Curves

Function

Collects curves in numeric branch order for a subsequent explicit loft or other list operation.

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

Parameters

nametypedefaultdescription
curvesCad Tree of Curve—

Returns

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

Flatten Points

Function

Collects points in branch order.

Signature
FlattenPoints(points: Cad Tree of Point3d) -> Point3d Array
Point3d[] FlattenPoints(CadTree<Point3d> points)

Parameters

nametypedefaultdescription
pointsCad Tree of Point3d—

Returns

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

Move Curves

Function

Moves matched curves by vectors, returning owned geometry.

Signature
MoveCurves -> Cad Tree of Curve
    curves: Cad Tree of Curve
    vectors: Cad Tree of Vector3d
CadTree<Curve> MoveCurves(
    CadTree<Curve> curves,
    CadTree<Vector3d> vectors)

Parameters

nametypedefaultdescription
curvesCad Tree of Curve—
vectorsCad Tree of Vector3d—

Returns

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

Move Points

Function

Moves matched points by vectors.

Signature
MovePoints -> Cad Tree of Point3d
    points: Cad Tree of Point3d
    vectors: Cad Tree of Vector3d
CadTree<Point3d> MovePoints(
    CadTree<Point3d> points,
    CadTree<Vector3d> vectors)

Parameters

nametypedefaultdescription
pointsCad Tree of Point3d—
vectorsCad Tree of Vector3d—

Returns

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

Planes

Function

Constructs local frames from matched origins and X axes, with a shared independent Y direction.

Signature
Planes -> Cad Tree of Plane
    origins: Cad Tree of Point3d
    xAxes: Cad Tree of Vector3d
    yAxis: Vector3d
CadTree<Plane> Planes(
    CadTree<Point3d> origins,
    CadTree<Vector3d> xAxes,
    Vector3d yAxis)

Parameters

nametypedefaultdescription
originsCad Tree of Point3d—
xAxesCad Tree of Vector3d—
yAxisVector3d—

Returns

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

Point Branch Count

Function

Returns the number of point branches as one scalar.

Signature
PointBranchCount(points: Cad Tree of Point3d) -> Cad Tree of Number
CadTree<double> PointBranchCount(CadTree<Point3d> points)

Parameters

nametypedefaultdescription
pointsCad Tree of Point3d—

Returns

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

Point Counts

Function

Returns the number of points in each branch.

Signature
PointCounts(points: Cad Tree of Point3d) -> Cad Tree of Number
CadTree<double> PointCounts(CadTree<Point3d> points)

Parameters

nametypedefaultdescription
pointsCad Tree of Point3d—

Returns

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

Point Items

Function

Selects one point from each branch, retaining branch order in the flattened output.

Signature
PointItems -> Point3d Array
    points: Cad Tree of Point3d
    index: Integer
    wrap: Truth
Point3d[] PointItems(
    CadTree<Point3d> points,
    int index = 0,
    bool wrap = true)

Parameters

nametypedefaultdescription
pointsCad Tree of Point3d—
indexInteger0
wrapTruthTrue

Returns

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

Points

Function

Constructs points with longest item and branch matching across coordinates.

Signature
Points -> Cad Tree of Point3d
    x: Cad Tree of Number
    y: Cad Tree of Number
    z: Cad Tree of Number
CadTree<Point3d> Points(
    CadTree<double> x,
    CadTree<double> y,
    CadTree<double> z)

Parameters

nametypedefaultdescription
xCad Tree of Number—
yCad Tree of Number—
zCad Tree of Number—

Returns

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

Polylines

Function

Creates a polyline per branch, optionally closing it with a final segment.

Signature
Polylines -> Cad Tree of Curve
    points: Cad Tree of Point3d
    closed: Truth
CadTree<Curve> Polylines(
    CadTree<Point3d> points,
    bool closed = false)

Parameters

nametypedefaultdescription
pointsCad Tree of Point3d—
closedTruthFalse

Returns

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

Prefix Points

Function

Prepends a common ancestor index to every point-tree branch.

Signature
PrefixPoints -> Cad Tree of Point3d
    points: Cad Tree of Point3d
    index: Integer
CadTree<Point3d> PrefixPoints(
    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 Tree Geometry
Package
CAD

Rectangles

Function

Constructs local rectangles on every frame.

Signature
Rectangles -> Cad Tree of Curve
    planes: Cad Tree of Plane
    x: Interval
    y: Interval
CadTree<Curve> Rectangles(
    CadTree<Plane> planes,
    Interval x,
    Interval y)

Parameters

nametypedefaultdescription
planesCad Tree of Plane—
xInterval—
yInterval—

Returns

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

Rotate Curves

Function

Rotates matched curves within their local planes.

Signature
RotateCurves -> Cad Tree of Curve
    curves: Cad Tree of Curve
    planes: Cad Tree of Plane
    angle: Number
CadTree<Curve> RotateCurves(
    CadTree<Curve> curves,
    CadTree<Plane> planes,
    double angle)

Parameters

nametypedefaultdescription
curvesCad Tree of Curve—
planesCad Tree of Plane—
angleNumber—

Returns

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

Scale Curves

Function

Scales matched curves in local X and Y, keeping local Z unchanged.

Signature
ScaleCurves -> Cad Tree of Curve
    curves: Cad Tree of Curve
    planes: Cad Tree of Plane
    x: Cad Tree of Number
    y: Cad Tree of Number
CadTree<Curve> ScaleCurves(
    CadTree<Curve> curves,
    CadTree<Plane> planes,
    CadTree<double> x,
    CadTree<double> y)

Parameters

nametypedefaultdescription
curvesCad Tree of Curve—
planesCad Tree of Plane—
xCad Tree of Number—
yCad Tree of Number—

Returns

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

Scale Points

Function

Scales points along world axes about matched centers.

Signature
ScalePoints -> Cad Tree of Point3d
    points: Cad Tree of Point3d
    centers: Cad Tree of Point3d
    x: Number
    y: Number
    z: Number
CadTree<Point3d> ScalePoints(
    CadTree<Point3d> points,
    CadTree<Point3d> centers,
    double x = 1,
    double y = 1,
    double z = 1)

Parameters

nametypedefaultdescription
pointsCad Tree of Point3d—
centersCad Tree of Point3d—
xNumber1
yNumber1
zNumber1

Returns

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

Simplify Curves

Function

Removes common leading path indices from a curve tree.

Signature
SimplifyCurves(curves: Cad Tree of Curve) -> Cad Tree of Curve
CadTree<Curve> SimplifyCurves(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 Tree Geometry
Package
CAD

Simplify Vectors

Function

Removes common leading vector-path indices.

Signature
SimplifyVectors(vectors: Cad Tree of Vector3d) -> Cad Tree of Vector3d
CadTree<Vector3d> SimplifyVectors(CadTree<Vector3d> vectors)

Parameters

nametypedefaultdescription
vectorsCad Tree of Vector3d—

Returns

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

Sort Points

Function

Sorts point items by corresponding numeric keys independently in each matching branch.

Signature
SortPoints -> Cad Tree of Point3d
    points: Cad Tree of Point3d
    keys: Cad Tree of Number
    descending: Truth
CadTree<Point3d> SortPoints(
    CadTree<Point3d> points,
    CadTree<double> keys,
    bool descending = false)

Parameters

nametypedefaultdescription
pointsCad Tree of Point3d—
keysCad Tree of Number—
descendingTruthFalse

Returns

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

Unit X

Function

Scales the world X axis per factor, retaining branches.

Signature
UnitX(factors: Cad Tree of Number) -> Cad Tree of Vector3d
CadTree<Vector3d> UnitX(CadTree<double> factors)

Parameters

nametypedefaultdescription
factorsCad Tree of Number—

Returns

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

Unit Y

Function

Scales the world Y axis per factor, retaining branches.

Signature
UnitY(factors: Cad Tree of Number) -> Cad Tree of Vector3d
CadTree<Vector3d> UnitY(CadTree<double> factors)

Parameters

nametypedefaultdescription
factorsCad Tree of Number—

Returns

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

Unit Z

Function

Scales the world Z axis per factor, retaining branches.

Signature
UnitZ(factors: Cad Tree of Number) -> Cad Tree of Vector3d
CadTree<Vector3d> UnitZ(CadTree<double> factors)

Parameters

nametypedefaultdescription
factorsCad Tree of Number—

Returns

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

Y Coordinates

Function

Extracts world Y coordinates without changing point-tree paths.

Signature
YCoordinates(points: Cad Tree of Point3d) -> Cad Tree of Number
CadTree<double> YCoordinates(CadTree<Point3d> points)

Parameters

nametypedefaultdescription
pointsCad Tree of Point3d—

Returns

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