Import
Example
Notes
- Nodes use
[x, z]profile coordinates. toRing()changes curved edges into points.- A closed profile needs three nodes or more.
- A network is one path. It has no branches, and it does not split where it crosses itself.
Constructor
Properties
VNNode[]
boolean
number
Read-only. Number of edges: a closed loop has one per node; an open path has one fewer.
Methods
segmentEndpoints
i as profile points.
segmentMidpoint
i (on the curve if curved), in profile coords.
moveNode
endIndex
i ends at.
bendSegmentTo
i so its curve passes through (px, pz) at the midpoint.
insertNode
i.
deleteNode
i and heal the gap: the previous node’s outgoing edge now spans to the next node.
toRing
[x, z] points for the kernel.
Types
VNNode
number
required
number
required
boolean
required
Whether the edge leaving this node (to the next node) is a cubic Bézier.
Point
required
Control point near this node (absolute profile coords). Valid when
curved.Point
required
Control point near the next node (absolute profile coords). Valid when
curved.