BSplineCurve3d Class

A BSplineCurve3d is a bspline curve whose poles are Point3d. See BSplineCurve3dBase for description of knots, order, degree.

Extends

Methods

Name Description
clone(): BSplineCurve3d Return a deep clone  
computeStrokeCountForOptions(options?: StrokeOptions): number Assess length and turn to determine a stroke count.  
copyKnots(includeExtraEndKnot: boolean): number[] return a simple array form of the knots.  
copyPoints(): any[] Return a simple array of arrays with the control points as [[x,y,z],[x,y,z],..]  
copyPointsFloat64Array(): Float64Array Return a simple array of the control points coordinates  
dispatchToGeometryHandler(handler: GeometryHandler): any Second step of double dispatch: call handler.handleBSplineCurve3d(this)  
emitStrokableParts(handler: IStrokeHandler, options?: StrokeOptions): void Emit beziers or strokes (selected by the stroke options) to the handler.  
emitStrokes(dest: LineString3d, options?: StrokeOptions): void Append strokes to a linestring.  
evaluatePointAndDerivativeInSpan(spanIndex: number, spanFraction: number): Ray3d Evaluate point and derivative vector at a position given by fractional position within a span.  
evaluatePointInSpan(spanIndex: number, spanFraction: number): 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  
getPolePoint3d(poleIndex: number, result?: Point3d): undefined | Point3d Get a pole as simple Point3d.  
getPolePoint4d(poleIndex: number, result?: Point4d): undefined | Point4d Get a pole as Point4d with weight 1  
getSaturatedBezierSpan3d(spanIndex: number, result?: BezierCurveBase): undefined | BezierCurveBase Return a CurvePrimitive (which is a BezierCurve3d) for a specified span of this curve.  
getSaturatedBezierSpan3dH(spanIndex: number, result?: BezierCurveBase): undefined | BezierCurve3dH Return a CurvePrimitive (which is a BezierCurve3dH) for a specified span of this curve.  
getSaturatedBezierSpan3dOr3dH(spanIndex: number, prefer3dH: boolean, result?: BezierCurveBase): undefined | BezierCurveBase Return a BezierCurveBase for this curve.  
isAlmostEqual(other: any): boolean test if almost the same curve as other  
isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean test if this curve is entirely within plane.  
isSameGeometryClass(other: any): boolean test of other is an instance of BSplineCurve3d  
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 approximation (always overestimate) of the curve length.  
setWrappable(value: BSplineWrapMode): void Set the flag indicating the bspline might be suitable for having wrapped "closed" interpretation.  
spanFractionToKnot(span: number, localFraction: number): number Convert spanIndex and localFraction to a knot.  
tryTransformInPlace(transform: Transform): boolean Apply transform to the poles.  
create(poleArray: Point3d[] | Float64Array, knotArray: number[] | Float64Array, order: number): undefined | BSplineCurve3d Static Create a bspline with given knots.  
createFromAkimaCurve3dOptions(options: AkimaCurve3dOptions): undefined | BSplineCurve3d Static    
createFromInterpolationCurve3dOptions(options: InterpolationCurve3dOptions): undefined | BSplineCurve3d Static Create a C2 cubic B-spline curve that interpolates the given points and optional end tangents.  
createPeriodicUniformKnots(poles: Point3d[] | Float64Array | GrowableXYZArray, order: number): undefined | BSplineCurve3d Static Create a smoothly closed B-spline curve with uniform knots.  
createUniformKnots(poles: Point3d[] | Float64Array | GrowableXYZArray, order: number): undefined | BSplineCurve3d Static Create a bspline with uniform knots.  

Inherited methods

Name Inherited from Description
addMappedStrokesToLineString3D(map: StrokeCountMap, linestring: LineString3d): number BSplineCurve3dBase * evaluate strokes at fractions indicated in a StrokeCountMap.
announceClipIntervals(_clipper: Clipper, _announce?: AnnounceNumberNumberCurvePrimitive): boolean BSplineCurve3dBase 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): BSplineCurve3dBase BSplineCurve3dBase Return a curve primitive which is a portion of this curve.
cloneTransformed(transform: Transform): BSplineCurve3dBase BSplineCurve3dBase Return a transformed deep clone.
closestPoint(spacePoint: Point3d, _extend: boolean): undefined | CurveLocationDetail 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.
collectCurvePrimitives(collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLinestrings: boolean = false): CurvePrimitive[] BSplineCurve3dBase Return an array containing only the curve primitives.
collectCurvePrimitivesGo(collectorArray: CurvePrimitive[], _smallestPossiblePrimitives: boolean, _explodeLinestrings: boolean = false): void BSplineCurve3dBase Return an array containing only the curve primitives.
constructOffsetXY(offsetDistanceOrOptions: number | OffsetOptions): undefined | CurvePrimitive | CurvePrimitive[] BSplineCurve3dBase Construct an offset of the instance curve as viewed in the xy-plane (ignoring z).
curveLength(): number BSplineCurve3dBase return the length of the curve.
curveLengthBetweenFractions(fraction0: number, fraction1: number): number BSplineCurve3dBase Returns a (high accuracy) length of the curve between fractional positions
curveLengthWithFixedIntervalCountQuadrature(fraction0: number, fraction1: number, numInterval: number, numGauss: number = 5): number BSplineCurve3dBase * Run an integration (with a default gaussian quadrature) with a fixed fractional step
endPoint(): Point3d BSplineCurve3dBase Return the end point of the curve
fractionAndDistanceToPointOnTangent(fraction: number, distance: number): Point3d BSplineCurve3dBase Construct a point extrapolated along tangent at fraction.
fractionToCurvature(fraction: number): undefined | number BSplineCurve3dBase Returns the (absolute) curvature magnitude.
fractionToFrenetFrame(fraction: number, result?: Transform): undefined | Transform BSplineCurve3dBase Construct a frenet frame:
fractionToPoint(fraction: number, result?: Point3d): Point3d BSplineCurve3dBase Evaluate the curve point at fraction
fractionToPointAnd2Derivatives(fraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors BSplineCurve3dBase Construct a plane with
fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d BSplineCurve3dBase Construct a ray with
fractionToPointAndUnitTangent(fraction: number, result?: Ray3d): Ray3d BSplineCurve3dBase Returns a ray whose origin is the curve point and direction is the unit tangent.
fractionToSignedXYRadiusOfCurvature(fraction: number): number BSplineCurve3dBase Construct signed distance from a point on the curve to its center of curvature (in xy only).
getFractionToDistanceScale(): undefined | number BSplineCurve3dBase * If the curve primitive has distance-along-curve strictly proportional to curve fraction, return the scale factor.
moveSignedDistanceFromFraction(startFraction: number, signedDistance: number, allowExtension: boolean, result?: CurveLocationDetail): CurveLocationDetail BSplineCurve3dBase * (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 BSplineCurve3dBase Generic algorithm to search for point at signed distance from a fractional startPoint.
poleIndexToDataIndex(poleIndex: number): undefined | number BSplineCurve3dBase Given a pole index, return the starting index for the contiguous array.
projectedParameterRange(ray: Ray3d | Vector3d, lowHigh?: Range1d): undefined | Range1d BSplineCurve3dBase Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of projection.
range(transform?: Transform, result?: Range3d): Range3d BSplineCurve3dBase return the range of the entire (tree) GeometryQuery
rangeBetweenFractions(fraction0: number, fraction1: number, transform?: Transform): Range3d BSplineCurve3dBase Returns a (high accuracy) range of the curve between fractional positions
rangeBetweenFractionsByClone(fraction0: number, fraction1: number, transform?: Transform): Range3d BSplineCurve3dBase Returns a (high accuracy) range of the curve between fractional positions
rangeBetweenFractionsByCount(fraction0: number, fraction1: number, count: number, transform?: Transform, extrapolationFactor: number = 0.0): Range3d BSplineCurve3dBase Returns an approximate range based on a fixed number of evaluations
reverseInPlace(): void BSplineCurve3dBase Reverse the curve in place.
startPoint(): Point3d BSplineCurve3dBase Return the start point of the curve.
tryTranslateInPlace(dx: number, dy: number = 0.0, dz: number = 0.0): boolean BSplineCurve3dBase try to move the geometry by dx,dy,dz
areAlmostEqual(a: undefined | GeometryQuery, b: undefined | GeometryQuery): boolean Static BSplineCurve3dBase apply instance method isAlmostEqual if both are defined.
installStrokeCountMap(curve: CurvePrimitive, curveMap: StrokeCountMap, parentMap?: StrokeCountMap): void Static BSplineCurve3dBase final install step to save curveMap in curve.

Properties

Name Type Description
isClosable Accessor ReadOnly BSplineWrapMode Test knots, control points, and wrappable flag to see if all agree for a possible wrapping.  

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 undefined | GeometryQuery[] BSplineCurve3dBase return GeometryQuery children for recursive queries.

* leaf classes do not need to implement.
curvePrimitiveType Readonly "bsplineCurve" BSplineCurve3dBase String name for schema properties
definitionData Accessor any BSplineCurve3dBase  
degree Accessor ReadOnly number BSplineCurve3dBase Return the degree (one less than the order) of the curve
geometryCategory Readonly "curvePrimitive" BSplineCurve3dBase String name for schema properties
isExtensibleFractionSpace Accessor ReadOnly boolean BSplineCurve3dBase * 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:
* LineSegment3d
* LineString3d
* Arc3d
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
parent undefined | any BSplineCurve3dBase data attached by various algorithms (e.g.
strokeData undefined | StrokeCountMap BSplineCurve3dBase data attached during stroking for facets.

Defined in

Last Updated: 30 November, 2023