BSplineCurve3dH Class

Weighted (Homogeneous) BSplineCurve in 3d



Name Description
constructor(poleDimension: number, numPoles: number, order: number, knots: KnotVector): BSplineCurve3dH Protected    
clone(): BSplineCurve3dH Return a deep clone of this curve.  
cloneTransformed(transform: Transform): BSplineCurve3dH Clone the curve and apply a transform to the clone.  
computeAndAttachRecursiveStrokeCounts(options?: StrokeOptions, parentStrokeMap?: StrokeCountMap): void Compute individual segment stroke counts.  
computeStrokeCountForOptions(options?: StrokeOptions): number Assess length and turn to determine a stroke count.  
copyPoints(): any[] Return a simple array of arrays with the control points as [[x,y,z,w],[x,y,z,w],..]  
copyPointsFloat64Array(): Float64Array Return a simple array of the control points coordinates  
dispatchToGeometryHandler(handler: GeometryHandler): any Second step of double dispatch: call handler.handleBSplineCurve3dH(this)  
emitStrokableParts(handler: IStrokeHandler, options?: StrokeOptions): void call a handler with interval data for stroking.  
emitStrokes(dest: LineString3d, options?: StrokeOptions): void Append stroked approximation of this curve to the linestring.  
evaluatePointAndDerivativeInSpan(spanIndex: number, spanFraction: number, result?: Ray3d): Ray3d Evaluate at a position given by fractional position within a span.  
evaluatePointInSpan(spanIndex: number, spanFraction: number, result?: Point3d): Point3d Evaluate at a position given by fractional position within a span.  
extendRange(rangeToExtend: Range3d, transform?: Transform): void Extend a range so in includes the range of this curve
* REMARK: this is based on the poles, not the exact curve.
getPolePoint3d(poleIndex: number, result?: Point3d): Point3d | undefined Get a pole, normalized to Point3d.  
getPolePoint4d(poleIndex: number, result?: Point4d): Point4d | undefined Get a pole as Point4d  
getSaturatedBezierSpan3dH(spanIndex: number, result?: BezierCurveBase): BezierCurveBase | undefined Return a CurvePrimitive (which is a BezierCurve3dH) for a specified span of this curve.  
getSaturatedBezierSpan3dOr3dH(spanIndex: number, _prefer3dH: boolean, result?: BezierCurveBase): BezierCurveBase | undefined Return a BezierCurveBase for this curve.  
isAlmostEqual(other: any): boolean test if the curve is almost equal to other  
isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean Test if the curve is entirely within a plane.  
isSameGeometryClass(other: any): boolean Test if other is an instance of BSplineCurve3dH  
knotToPoint(u: number, result?: Point3d): Point3d Evaluate at a position given by a knot value.  
knotToPointAnd2Derivatives(u: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors Evaluate at a position given by a knot value.  
knotToPointAndDerivative(u: number, result?: Ray3d): Ray3d Evaluate at a position given by a knot value.  
quickLength(): number Return the control polygon length as quick approximation to the curve length.  
spanFractionToKnot(span: number, localFraction: number): number map a spanIndex and fraction to a knot value.  
tryTransformInPlace(transform: Transform): boolean Apply transform to the curve  
create(controlPoints: Float64Array | Point4d[] | Point3d[], knotArray: Float64Array | number[], order: number): BSplineCurve3dH | undefined Static Create a bspline with given knots.  
createUniformKnots(controlPoints: Point3d[] | Point4d[] | Float64Array, order: number): BSplineCurve3dH | undefined Static Create a bspline with uniform knots.  

Inherited methods

Name Inherited from Description
addMappedStrokesToLineString3D(map: StrokeCountMap, linestring: LineString3d): number CurvePrimitive * evaluate strokes at fractions indicated in a StrokeCountMap.
announceClipIntervals(_clipper: Clipper, _announce?: AnnounceNumberNumberCurvePrimitive): boolean CurvePrimitive Find intervals of this curvePrimitive that are interior to a clipper
appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number BSplineCurve3dBase Implement CurvePrimitive.appendPlaneIntersections
clonePartialCurve(_fractionA: number, _fractionB: number): CurvePrimitive | undefined CurvePrimitive Return (if possible) a curve primitive which is a portion of this curve.
closestPoint(spacePoint: Point3d, _extend: boolean): CurveLocationDetail | undefined BSplineCurve3dBase Search for the curve point that is closest to the spacePoint.
collectBezierSpans(prefer3dH: boolean): BezierCurveBase[] BSplineCurve3dBase Return an array with this curve's bezier fragments.
copyKnots(includeExtraEndKnot: boolean): number[] BSplineCurve3dBase return a simple array form of the knots.
curveLength(): number CurvePrimitive return the length of the curve.
curveLengthBetweenFractions(fraction0: number, fraction1: number): number CurvePrimitive Returns a (high accuracy) length of the curve between fractional positions
* Curve length is always positive.
curveLengthWithFixedIntervalCountQuadrature(fraction0: number, fraction1: number, numInterval: number, numGauss: number = 5): number CurvePrimitive Run an integration (with a default gaussian quadrature) with a fixed fractional step
This is typically called by specific curve type implementations of curveLengthBetweenFractions.
endPoint(): Point3d BSplineCurve3dBase Return the end point of the curve
fractionAndDistanceToPointOnTangent(fraction: number, distance: number): Point3d CurvePrimitive Construct a point extrapolated along tangent at fraction.
fractionToFrenetFrame(fraction: number, result?: Transform): Transform | undefined CurvePrimitive Construct a frenet frame:
origin at the point on the curve
x axis is unit vector along the curve (tangent)
* y axis is perpendicular and in the plane of the osculating circle.
fractionToPoint(fraction: number, result?: Point3d): Point3d BSplineCurve3dBase Evaluate the curve point at fraction
fractionToPointAnd2Derivatives(fraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors BSplineCurve3dBase Construct a plane with
origin at the fractional position along the arc
x axis is the first derivative, i.e.
fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d BSplineCurve3dBase Construct a ray with
origin at the fractional position along the arc
direction is the first derivative, i.e.
fractionToPointAndUnitTangent(fraction: number, result?: Ray3d): Ray3d CurvePrimitive Returns a ray whose origin is the curve point and direction is the unit tangent.
getFractionToDistanceScale(): number | undefined CurvePrimitive If the curve primitive has distance-along-curve strictly proportional to curve fraction, return true
If distance-along-the-curve is not proportional, return undefined.
moveSignedDistanceFromFraction(startFraction: number, signedDistance: number, allowExtension: boolean, result?: CurveLocationDetail): CurveLocationDetail CurvePrimitive * (Attempt to) find a position on the curve at a signed distance from start fraction.
moveSignedDistanceFromFractionGeneric(startFraction: number, signedDistance: number, allowExtension: boolean, result?: CurveLocationDetail): CurveLocationDetail Protected CurvePrimitive Generic algorithm to search for point at signed distance from a fractional startPoint.
poleIndexToDataIndex(poleIndex: number): number | undefined BSplineCurve3dBase Given a pole index, return the starting index for the contiguous array.
range(transform?: Transform, result?: Range3d): Range3d GeometryQuery return the range of the entire (tree) GeometryQuery
reverseInPlace(): void BSplineCurve3dBase Reverse the curve in place.
setWrappable(value: BSplineWrapMode): void BSplineCurve3dBase Set the flag indicating the bspline might be suitable for having wrapped "closed" interpretation.
startPoint(): Point3d BSplineCurve3dBase Return the start point of the curve.
tryTranslateInPlace(dx: number, dy: number = 0, dz: number = 0): boolean GeometryQuery try to move the geometry by dx,dy,dz
installStrokeCountMap(curve: CurvePrimitive, curveMap: StrokeCountMap, parentMap?: StrokeCountMap): void Static CurvePrimitive final install step to save curveMap in curve.


Name Type Description
isClosable Accessor ReadOnly boolean return true if the spline is (a) unclamped with (degree-1) matching knot intervals,
(b) (degree-1) wrapped points,
(c) marked wrappable from construction time.

Inherited properties

Name Type Inherited from Description
_bcurve Protected BSpline1dNd BSplineCurve3dBase The underlying blocked-pole spline, with simple x,y,z poles
children Accessor ReadOnly GeometryQuery[] | undefined GeometryQuery return GeometryQuery children for recursive queries.

* leaf classes do not need to implement.
curvePrimitiveType "bsplineCurve" = "bsplineCurve" BSplineCurve3dBase  
degree Accessor ReadOnly number BSplineCurve3dBase Return the degree (one less than the order) of the curve
geometryCategory "curvePrimitive" = "curvePrimitive" CurvePrimitive  
isExtensibleFractionSpace Accessor ReadOnly boolean CurvePrimitive Returns true if the curve's fraction queries extend beyond 0..1.
Base class default implementation returns false.
These class (and perhaps others in the future) will return true:
numPoles Accessor ReadOnly number BSplineCurve3dBase Return the number of poles
numSpan Accessor ReadOnly number BSplineCurve3dBase Return the number of bezier spans in the curve. Note that this number includes the number of null spans at repeated knows
order Accessor ReadOnly number BSplineCurve3dBase Return the order (one more than degree) of the curve
strokeData undefined | StrokeCountMap CurvePrimitive data attached during stroking for facets.

Defined in

Last Updated: 20 September, 2019