Skip to content
Shapemetry

NurbsCurve2d

2D curves in the type-tagged Curve2dJSON envelope (the tag is spelled type, never kind). type: "shape" is a plane chain (Path2d atom). intersect is exact curve-curve (conic algebraic; NURBS seed+refine on the originals).

import { NurbsCurve2d } from '@huukhanhnguyen/geometry'

API reference

NurbsCurve2d.axesAtParam

NurbsCurve2d.axesAtParam(curve_json: string, t: number): Float64Array

Wasm: curve2d_axes_at_param

NurbsCurve2d.boundingBox

NurbsCurve2d.boundingBox(curve_json: string): Float64Array

Wasm: curve2d_bounding_box

NurbsCurve2d.closestPoint

NurbsCurve2d.closestPoint(curve_json: string, x: number, y: number): Float64Array

Wasm: curve2d_closest_point

NurbsCurve2d.end

NurbsCurve2d.end(curve_json: string): Float64Array

Wasm: curve2d_end

NurbsCurve2d.intersect

NurbsCurve2d.intersect(a_json: string, b_json: string, tolerance: number): string

Wasm: curve2d_intersect

NurbsCurve2d.isClosed

NurbsCurve2d.isClosed(curve_json: string): boolean

Wasm: curve2d_is_closed

NurbsCurve2d.length

NurbsCurve2d.length(curve_json: string): number

Wasm: curve2d_length

NurbsCurve2d.lengthAt

NurbsCurve2d.lengthAt(curve_json: string, t: number): number

Wasm: curve2d_length_at

NurbsCurve2d.paramAtLength

NurbsCurve2d.paramAtLength(curve_json: string, s: number): number

Wasm: curve2d_param_at_length

NurbsCurve2d.pointAt

NurbsCurve2d.pointAt(curve_json: string, t: number): Float64Array

Wasm: curve2d_point_at

NurbsCurve2d.reverse

NurbsCurve2d.reverse(curve_json: string): string

Wasm: curve2d_reverse

NurbsCurve2d.signedArea

NurbsCurve2d.signedArea(curve_json: string): number

Wasm: curve2d_signed_area

NurbsCurve2d.spline

NurbsCurve2d.spline(points: Float64Array, degree: number): string

Wasm: curve2d_spline

NurbsCurve2d.splitAt

NurbsCurve2d.splitAt(curve_json: string, t: number): string

Wasm: curve2d_split_at

NurbsCurve2d.start

NurbsCurve2d.start(curve_json: string): Float64Array

Wasm: curve2d_start

NurbsCurve2d.tangentAt

NurbsCurve2d.tangentAt(curve_json: string, t: number): Float64Array

Wasm: curve2d_tangent_at

NurbsCurve2d.toNurbsCurve

NurbsCurve2d.toNurbsCurve(curve_json: string): string

Wasm: curve2d_to_nurbs_curve

NurbsCurve2d.transform

NurbsCurve2d.transform(curve_json: string, elements: Float64Array): string

Wasm: curve2d_transform

See GEOMETRY_CATALOG.md for catalog ownership.

Last updated: 📖 1 min readEdit on GitHub