@huukhanhnguyen/geometry / catalog/curve
catalog/curve
Curve
Curve =
Curve
3D curve document — collection of ordered space chains.
Wire: { curves: PolyCurve[], transformation? }. Construct and transform only; boolean/offset stay on Curve2d.
Curve2d
Curve2d =
Curve2d
2D filled/stroked curve document ops (wasm path2d_*).
Curve
Curve: {
empty:string;fromCurves:string;fromPolyCurve:string;transform:string; }
3D curve document — collection of ordered space chains.
Wire: { curves: PolyCurve[], transformation? }. Construct and transform only; boolean/offset stay on Curve2d.
empty()
readonlyempty():string
Empty curve document (no curves).
Returns
string
fromCurves()
readonlyfromCurves(curvesJson):string
Build a Curve from a JSON array of PolyCurve objects, or pass through an existing Curve document object.
Parameters
curvesJson
string
Returns
string
fromPolyCurve()
readonlyfromPolyCurve(compositeJson):string
Wrap one PolyCurve JSON string as a single-chain Curve.
Parameters
compositeJson
string
Returns
string
transform()
readonlytransform(curveJson,elements):string
Apply a 4×4 matrix to every polycurve in the document. Document-level transformation (if present) is left unchanged — call sites that want placement composition do that outside.
Parameters
curveJson
string
elements
number[] | Float64Array<ArrayBufferLike>
Returns
string
Curve2d
Curve2d:
namespaces/Curve2d
2D filled/stroked curve document ops (wasm path2d_*).