BezierCurve3d Class
3d Bezier curve class.
- Use BezierCurve3dH if the curve has weights.
- The control points (xyz) are managed as the _packedData buffer in the _polygon member of BezierCurveBase.
Extends
Methods
Name | Description | |
---|---|---|
constructor(blockSize: number, data: Float64Array): BezierCurve3d Protected | ||
clone(): BezierCurve3d | Clone as a bezier 3d. | |
clonePartialCurve(f0: number, f1: number): BezierCurve3d | undefined | Clone the interval from f0 to f1. | |
cloneTransformed(transform: Transform): BezierCurve3d | Return a curve after transform. | |
copyPointsAsLineString(): LineString3d | Return poles as a linestring | |
dispatchToGeometryHandler(handler: GeometryHandler): any | Second step of double dispatch: call handler.handleBezierCurve3d(this) |
|
extendRange(rangeToExtend: Range3d, transform?: Transform): void | Extend rangeToExtend , using candidate extrema at |
|
fractionToPoint(fraction: number, result?: Point3d): Point3d | Return a (de-weighted) point on the curve. | |
fractionToPointAnd2Derivatives(fraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors | Construct a plane with | |
fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d | Return the cartesian point and derivative vector. | |
getPolePoint3d(i: number, result?: Point3d): Point3d | undefined | Return a specific pole as a full [x,y,z] Point3d |
|
getPolePoint4d(i: number, result?: Point4d): Point4d | undefined | Return a specific pole as a full [w*x,w*y,w*z, w] Point4d |
|
isAlmostEqual(other: any): boolean | Near-equality test on poles. | |
isSameGeometryClass(other: any): boolean | test if other is also a BezierCurve3d. |
|
loadSpanPoles(data: Float64Array, spanIndex: number): void | Load order * 3 doubles from data[3 * spanIndex] as poles | |
tryTransformInPlace(transform: Transform): boolean | apply the transform to the control points. | |
create(data: Point3d[] | Point2d[]): BezierCurve3d | undefined Static | Create a curve with given points. | |
createOrder(order: number): BezierCurve3d Static | create a bezier curve of specified order, filled with zeros |
Inherited methods
Name | Inherited from | Description |
---|---|---|
addMappedStrokesToLineString3D(map: StrokeCountMap, linestring: LineString3d): number | CurvePrimitive | * evaluate strokes at fractions indicated in a StrokeCountMap. |
allocateAndZeroBezierWorkData(primaryBezierOrder: number, orderA: number, orderB: number): void Protected | BezierCurveBase | set up the _workBezier members with specific order. |
announceClipIntervals(_clipper: Clipper, _announce?: AnnounceNumberNumberCurvePrimitive): boolean | CurvePrimitive | Find intervals of this curvePrimitive that are interior to a clipper |
appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number | CurvePrimitive | Compute intersections with a plane. |
closestPoint(spacePoint: Point3d, extend: VariantCurveExtendParameter): CurveLocationDetail | undefined | CurvePrimitive | Search for the curve point that is closest to the spacePoint. |
collectCurvePrimitives(collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false): CurvePrimitive[] | CurvePrimitive | Return an array containing only the curve primitives. |
collectCurvePrimitivesGo(collectorArray: CurvePrimitive[], _smallestPossiblePrimitives: boolean): void | CurvePrimitive | Return an array containing only the curve primitives. |
computeAndAttachRecursiveStrokeCounts(options?: StrokeOptions, parentMap?: StrokeCountMap): void | CurvePrimitive | attach StrokeCountMap structure to this primitive (and recursively to any children) |
computeStrokeCountForOptions(options?: StrokeOptions): number | BezierCurveBase | Assess length and turn to determine a stroke count. |
copyPolesAsJsonArray(): any[] | BezierCurveBase | Return a simple array of arrays with the control points as [[x,y,z],[x,y,z],..] |
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 |
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 |
emitStrokableParts(handler: IStrokeHandler, _options?: StrokeOptions): void | BezierCurveBase | announce intervals with stroke counts |
emitStrokes(dest: LineString3d, options?: StrokeOptions): void | BezierCurveBase | append stroke points to a linestring, based on strokeCount and fractionToPoint from derived class |
endPoint(): Point3d | BezierCurveBase | Return the end point. |
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: |
fractionToParentFraction(fraction: number): number | BezierCurveBase | map fraction from this Bezier curves inherent 0..1 range to the (a,b) range of parent |
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 |
isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean | BezierCurveBase | return true if all poles are on a plane. |
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. |
polygonLength(): number | BezierCurveBase | Return the length of the control polygon. |
quickLength(): number | BezierCurveBase | Return the control polygon length as a quick length estimate. |
range(transform?: Transform, result?: Range3d): Range3d | GeometryQuery | return the range of the entire (tree) GeometryQuery |
reverseInPlace(): void | BezierCurveBase | reverse the poles in place |
saturateInPlace(knotVector: KnotVector, spanIndex: number): boolean | BezierCurveBase | saturate the pole in place, using knot intervals from spanIndex of the knotVector |
setInterval(a: number, b: number): void | BezierCurveBase | Set mapping to parent curve (e.g. |
startPoint(): Point3d | BezierCurveBase | Return the start point. |
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. |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
_polygon Protected | Bezier1dNd | BezierCurveBase | Control points |
_workCoffsA Protected | undefined | Float64Array | BezierCurveBase | scratch array for use by derived classes, using allocateAndZeroBezierWorkData for sizing. |
_workCoffsB Protected | undefined | Float64Array | BezierCurveBase | scratch array for use by derived classes, using allocateAndZeroBezierWorkData for sizing. |
_workData0 Protected | Float64Array | BezierCurveBase | scratch data blocks accessible by concrete class. |
_workData1 Protected | Float64Array | BezierCurveBase | scratch data blocks accessible by concrete class. |
_workPoint0 Protected | Point3d | BezierCurveBase | Scratch xyz point accessible by derived classes. |
_workPoint1 Protected | Point3d | BezierCurveBase | Scratch xyz point accessible by derived classes. |
children Accessor ReadOnly | GeometryQuery[] | undefined | GeometryQuery | return GeometryQuery children for recursive queries. * leaf classes do not need to implement. |
curvePrimitiveType | "bezierCurve" = "bezierCurve" | BezierCurveBase | String name for schema properties |
degree Accessor ReadOnly | number | BezierCurveBase | (property accessor) Return the polynomial degree (one less than order) |
geometryCategory | "curvePrimitive" = "curvePrimitive" | CurvePrimitive | String name for schema properties |
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: * LineSegment3d * LineString3d * Arc3d |
numPoles Accessor ReadOnly | number | BezierCurveBase | (property accessor) Return the number of poles (aka control points) |
order Accessor ReadOnly | number | BezierCurveBase | (property accessor) Return the polynomial order |
strokeData | undefined | StrokeCountMap | CurvePrimitive | data attached during stroking for facets. |
Defined in
Last Updated: 05 June, 2020