BSplineCurve3d Class
A BSplineCurve3d is a B-spline curve whose poles are Point3d. See BSplineCurve3dBase for description of knots, order, degree, and poles.
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 poles as [[x,y,z],[x,y,z],..] . |
|
copyPointsFloat64Array(): Float64Array | Return a simple array of poles' 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 the given linestring. | |
evaluatePointAndDerivativeInSpan(spanIndex: number, spanFraction: number): Ray3d | Evaluate the curve and derivative at a fractional position within a given span. | |
evaluatePointInSpan(spanIndex: number, spanFraction: number): Point3d | Evaluate the curve at a fractional position within a given span. | |
extendRange(rangeToExtend: Range3d, transform?: Transform): void | Extend a range so it contains the range of this curve. | |
getPolePoint3d(poleIndex: number, result?: Point3d): undefined | Point3d | Get a pole as a simple Point3d. | |
getPolePoint4d(poleIndex: number, result?: Point4d): undefined | Point4d | Get a pole as Point4d with weight 1. | |
getSaturatedBezierSpan3d(spanIndex: number, result?: BezierCurveBase): undefined | BezierCurve3d | Return the Bezier fragment corresponding to the given span of this curve. | |
getSaturatedBezierSpan3dH(spanIndex: number, result?: BezierCurveBase): undefined | BezierCurve3dH | Return the Bezier fragment corresponding to the given span of this curve. | |
getSaturatedBezierSpan3dOr3dH(spanIndex: number, prefer3dH: boolean, result?: BezierCurveBase): undefined | BezierCurveBase | Return the Bezier fragment corresponding to the given span of this curve. | |
isAlmostEqual(other: any): boolean | Test if this is almost the same curve as other . |
|
isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean | Test if this curve lies entirely in the given plane. | |
isSameGeometryClass(other: any): boolean | Test if other is an instance of BSplineCurve3d. |
|
knotToPoint(u: number, result?: Point3d): Point3d | Evaluate the curve at the given parameter. | |
knotToPointAnd2Derivatives(u: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors | Evaluate the curve and two derivatives at the given parameter. | |
knotToPointAndDerivative(u: number, result?: Ray3d): Ray3d | Evaluate the curve and derivative at the given parameter. | |
quickLength(): number | Return the control polygon length as an approximation to the curve length. | |
spanFractionToKnot(spanIndex: number, spanFraction: number): number | Convert the fractional position in the given span to a knot. | |
tryTransformInPlace(transform: Transform): boolean | Apply transform to the poles. |
|
create(poleArray: Float64Array | number[][] | Point3d[], knotArray: Float64Array | number[], order: number): undefined | BSplineCurve3d Static | Create a B-spline curve with given knots. | |
createFromAkimaCurve3dOptions(options: AkimaCurve3dOptions): undefined | BSplineCurve3d Static | Create a B-spline curve from an Akima curve. | |
createFromInterpolationCurve3dOptions(options: InterpolationCurve3dOptions): undefined | BSplineCurve3d Static | Create a C2 cubic B-spline curve that interpolates the given points and optional end tangents. | |
createPeriodicUniformKnots(poles: Float64Array | Point3d[] | GrowableXYZArray, order: number): undefined | BSplineCurve3d Static | Create a smoothly closed B-spline curve with uniform knots. | |
createUniformKnots(poles: Float64Array | Point3d[] | GrowableXYZArray, order: number): undefined | BSplineCurve3d Static | Create a B-spline with uniform knots. |
Inherited methods
Name | Inherited from | Description |
---|---|---|
addMappedStrokesToLineString3D(map: StrokeCountMap, linestring: LineString3d): number Inherited | BSplineCurve3dBase | Evaluate strokes at fractions indicated in a StrokeCountMap. |
announceClipIntervals(_clipper: Clipper, _announce?: AnnounceNumberNumberCurvePrimitive): boolean Inherited | BSplineCurve3dBase | Find intervals of this curvePrimitive that are interior to a clipper |
appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number Inherited | BSplineCurve3dBase | Implement CurvePrimitive.appendPlaneIntersections to compute intersections of the curve with a plane. |
clonePartialCurve(fractionA: number, fractionB: number): BSplineCurve3dBase Inherited | BSplineCurve3dBase | Return a curve primitive which is a portion of this curve. |
cloneTransformed(transform: Transform): BSplineCurve3dBase Inherited | BSplineCurve3dBase | Return a transformed deep clone. |
closestPoint(spacePoint: Point3d, _extend: VariantCurveExtendParameter, result?: CurveLocationDetail): undefined | CurveLocationDetail Inherited | BSplineCurve3dBase | Search for the curve point that is closest to the spacePoint. |
collectBezierSpans(prefer3dH: boolean): BezierCurveBase[] Inherited | BSplineCurve3dBase | Return an array with this curve's Bezier fragments. |
collectCurvePrimitives(collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: booleanfalse, explodeLinestrings: booleanfalse): CurvePrimitive[] Inherited | BSplineCurve3dBase | Return an array containing only the curve primitives. |
collectCurvePrimitivesGo(collectorArray: CurvePrimitive[], _smallestPossiblePrimitives: boolean, _explodeLinestrings: booleanfalse): void Inherited | BSplineCurve3dBase | Return an array containing only the curve primitives. |
constructOffsetXY(offsetDistanceOrOptions: number | OffsetOptions): undefined | BSplineCurve3d Inherited | BSplineCurve3dBase | Construct an offset of the instance curve as viewed in the xy-plane (ignoring z). |
curveLength(): number Inherited | BSplineCurve3dBase | Return the length of the curve. |
curveLengthBetweenFractions(fraction0: number, fraction1: number): number Inherited | BSplineCurve3dBase | Returns a (high accuracy) length of the curve between fractional positions. |
curveLengthWithFixedIntervalCountQuadrature(fraction0: number, fraction1: number, numInterval: number, numGauss: number5): number Inherited | BSplineCurve3dBase | Run an integration (with a default Gaussian quadrature) with a fixed fractional step |
endPoint(): Point3d Inherited | BSplineCurve3dBase | Return the end point of the curve. |
fractionAndDistanceToPointOnTangent(fraction: number, distance: number): Point3d Inherited | BSplineCurve3dBase | Construct a point extrapolated along tangent at fraction. |
fractionToCurvature(fraction: number): undefined | number Inherited | BSplineCurve3dBase | Returns the (absolute) curvature magnitude. |
fractionToFrenetFrame(fraction: number, result?: Transform): undefined | Transform Inherited | BSplineCurve3dBase | Construct a frenet frame: |
fractionToPoint(fraction: number, result?: Point3d): Point3d Inherited | BSplineCurve3dBase | Evaluate the curve point at the given fractional parameter. |
fractionToPointAnd2Derivatives(fraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors Inherited | BSplineCurve3dBase | Evaluate the curve and two derivatives at the given fractional parameter. |
fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d Inherited | BSplineCurve3dBase | Evaluate the curve and derivative at the given fractional parameter. |
fractionToPointAndUnitTangent(fraction: number, result?: Ray3d): Ray3d Inherited | BSplineCurve3dBase | Returns a ray whose origin is the curve point and direction is the unit tangent. |
fractionToSignedXYRadiusOfCurvature(fraction: number): number Inherited | BSplineCurve3dBase | Construct signed distance from a point on the planar curve to its center of curvature (in xy only). |
getFractionToDistanceScale(): undefined | number Inherited | BSplineCurve3dBase | If the curve primitive has distance-along-curve strictly proportional to curve fraction, return the scale factor. |
getWrappable(): BSplineWrapMode Inherited | BSplineCurve3dBase | Get the flag indicating the curve might be suitable for having wrapped "closed" interpretation. |
moveSignedDistanceFromFraction(startFraction: number, signedDistance: number, allowExtension: boolean, result?: CurveLocationDetail): CurveLocationDetail Inherited | 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 Inherited | BSplineCurve3dBase | Generic algorithm to search for point at signed distance from a fractional startPoint. |
poleIndexToDataIndex(poleIndex: number): undefined | number Inherited | BSplineCurve3dBase | Given a pole index, return the starting index for the contiguous array. |
projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): undefined | Range1d Inherited | BSplineCurve3dBase | Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters |
range(transform?: Transform, result?: Range3d): Range3d Inherited | BSplineCurve3dBase | Return the range of the entire GeometryQuery tree. |
rangeBetweenFractions(fraction0: number, fraction1: number, transform?: Transform): Range3d Inherited | BSplineCurve3dBase | Returns the range of the curve between fractional positions. |
rangeBetweenFractionsByClone(fraction0: number, fraction1: number, transform?: Transform): Range3d Inherited | BSplineCurve3dBase | Returns a high accuracy range of the curve between fractional positions using clonePartialCurve. |
rangeBetweenFractionsByCount(fraction0: number, fraction1: number, count: number, transform?: Transform, extrapolationFactor: number0.0): Range3d Inherited | BSplineCurve3dBase | Returns an approximate range based on a fixed number of evaluations. |
reverseInPlace(): void Inherited | BSplineCurve3dBase | Reverse the curve in place. |
setWrappable(value: BSplineWrapMode): void Inherited | BSplineCurve3dBase | Set the flag indicating the curve might be suitable for having wrapped "closed" interpretation. |
startPoint(): Point3d Inherited | BSplineCurve3dBase | Return the start point of the curve. |
tryTranslateInPlace(dx: number, dy: number0.0, dz: number0.0): boolean Inherited | BSplineCurve3dBase | Try to move the geometry by dx,dy,dz. |
areAlmostEqual(a: GeometryQuery, b: GeometryQuery): boolean Static Inherited | BSplineCurve3dBase | Apply instance method isAlmostEqual if both are defined. |
installStrokeCountMap(curve: CurvePrimitive, curveMap: StrokeCountMap, parentMap?: StrokeCountMap): void Static Inherited | BSplineCurve3dBase | Final install step to save curveMap in curve. |
Properties
Name | Type | Description | |
---|---|---|---|
isClosable Accessor ReadOnly | BSplineWrapMode | Test knots and poles to determine if it is possible to close (aka "wrap") the curve. |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
_bcurve Protected Inherited | BSpline1dNd | BSplineCurve3dBase | The underlying blocked-pole spline, with simple x,y,z poles. |
children Accessor Inherited ReadOnly | undefined | GeometryQuery[] | BSplineCurve3dBase | Return GeometryQuery children for recursive queries. * leaf classes do not need to implement. |
curvePrimitiveType Readonly Inherited | "bsplineCurve" | BSplineCurve3dBase | String name for schema properties. |
definitionData Accessor Inherited | any | BSplineCurve3dBase | |
degree Accessor Inherited ReadOnly | number | BSplineCurve3dBase | Return the degree (one less than the order) of the curve. |
geometryCategory Readonly Inherited | "curvePrimitive" | BSplineCurve3dBase | String name for schema properties |
isClosableCurve Accessor Inherited ReadOnly | BSplineWrapMode | BSplineCurve3dBase | Test knots and poles to determine if it is possible to close (aka "wrap") the curve. |
isExtensibleFractionSpace Accessor Inherited ReadOnly | boolean | BSplineCurve3dBase | * Returns true if the curve can be easily extended past its start/end point (i.e., beyond the usual fraction space [0,1]). Otherwise, returns false. * Base class default implementation returns false. * These classes (and perhaps others in the future) will return true: * LineSegment3d * LineString3d * Arc3d |
knotsRef Accessor Inherited ReadOnly | Float64Array | BSplineCurve3dBase | Return live reference to the knots of the curve. |
numPoles Accessor Inherited ReadOnly | number | BSplineCurve3dBase | Return the number of poles. |
numSpan Accessor Inherited 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 Inherited ReadOnly | number | BSplineCurve3dBase | Return the order (one more than degree) of the curve. |
parent Inherited | any | undefined | BSplineCurve3dBase | Data attached by various algorithms (e.g. |
poleDimension Accessor Inherited ReadOnly | number | BSplineCurve3dBase | Number of components per pole, e.g., * 3 for conventional (x,y,z) curve. * 4 for weighted (wx,wy,wz,w) curve. |
polesRef Accessor Inherited ReadOnly | Float64Array | BSplineCurve3dBase | Return live reference to the poles of the curve. |
strokeData Inherited | StrokeCountMap | undefined | BSplineCurve3dBase | Data attached during stroking for facets. |
Defined in
- bspline/BSplineCurve.ts Line 423
Last Updated: 20 February, 2025
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.