Model - To curve
API reference for src/nodeMethods/toCurve on @huukhanhnguyen/model, reachable from ..
See the Guide for the ModelJSON / evaluate pipeline.
API reference
Signatures are generated from the live package .d.ts - not hand-written.
curveControlPoints
function
A curve value's NURBS CONTROL POINTS as [x, y, z] triples — the wire shape the kernel writes them in, and what scene's NurbsCurve spells.
curveControlPoints(geometry: unknown): Point$1[]curveGeometryToNurbs
function
Curve entity geometry (a PolyCurve) → the NurbsCurve every other kernel curve call reads. Single nurbs/analytic segments keep exact form via wasm; multi-segment chains sample to a polyline NURBS.
curveGeometryToNurbs(geometry: unknown): NurbsCurvecurveJsonToPolyCurve
function
Bare Curve (line/arc/ellipse/nurbs) → one-segment PolyCurve.
curveJsonToPolyCurve(segment: Curve): PolyCurvecurveNurbsText
function
The same recovery as a JSON STRING — what every NurbsCurve.* reader takes as its first argument, without the parse/stringify round trip in between.
curveNurbsText(geometry: unknown): stringcurvePoints
function
A curve value's world polyline — NurbsCurve.tessellate unpacked from its flat [x, y, z, ...] run. A degree-1 control polygon comes back exactly: its chords deviate from it by zero, so no tolerance can subdivide them (measured on an open and a closed polyline).
curvePoints(geometry: unknown, tolerance: number): Point$1[]isNurbsCurve
function
isNurbsCurve(value: unknown): value is NurbsCurvenurbsToPolyCurve
function
Bare NurbsCurve → one-segment PolyCurve (entity geometry).
nurbsToPolyCurve(nurbs: NurbsCurve): PolyCurvepolyCurveFromPoints
function
Build a PolyCurve chain of line segments through ordered points.
polyCurveFromPoints(points: Point$1[], closed?: boolean): PolyCurvetoCurve
function
Coerce to a PolyCurve document. Accepts:
- curve entity
- PolyCurve
- bare NurbsCurve (one-segment wrap)
- bare Curve (type-tagged)
- Point[]
toCurve(value: unknown, options?: { closed?: boolean; }): PolyCurvetoNurbsCurve
function
Coerce to NurbsCurve (consumers that need control points).
toNurbsCurve(value: unknown): NurbsCurve