API Reference > geometry-core > Bspline > BezierCurve3d 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 BezierCurveBase Methods Name Description clone(): BezierCurve3d Clone as a bezier 3d. clonePartialCurve(f0: number, f1: number): undefined | BezierCurve3d 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): undefined | Point3d Return a specific pole as a full [x,y,z] Point3d getPolePoint4d(i: number, result?: Point4d): undefined | Point4d 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[]): undefined | BezierCurve3d 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 BezierCurveBase * 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 BezierCurveBase Find intervals of this curvePrimitive that are interior to a clipper appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number BezierCurveBase Compute intersections with a plane. closestPoint(spacePoint: Point3d, extend: VariantCurveExtendParameter): undefined | CurveLocationDetail BezierCurveBase Search for the curve point that is closest to the spacePoint. collectCurvePrimitives(collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLinestrings: boolean = false): CurvePrimitive[] BezierCurveBase Return an array containing only the curve primitives. collectCurvePrimitivesGo(collectorArray: CurvePrimitive[], _smallestPossiblePrimitives: boolean, _explodeLinestrings: boolean = false): void BezierCurveBase Return an array containing only the curve primitives. computeAndAttachRecursiveStrokeCounts(options?: StrokeOptions, parentMap?: StrokeCountMap): void BezierCurveBase 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 BezierCurveBase return the length of the curve. curveLengthBetweenFractions(fraction0: number, fraction1: number): number BezierCurveBase Returns a (high accuracy) length of the curve between fractional positions curveLengthWithFixedIntervalCountQuadrature(fraction0: number, fraction1: number, numInterval: number, numGauss: number = 5): number BezierCurveBase * 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 BezierCurveBase Construct a point extrapolated along tangent at fraction. fractionToCurvature(fraction: number): undefined | number BezierCurveBase Returns the (absolute) curvature magnitude. fractionToFrenetFrame(fraction: number, result?: Transform): undefined | Transform BezierCurveBase 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 BezierCurveBase Returns a ray whose origin is the curve point and direction is the unit tangent. getFractionToDistanceScale(): undefined | number BezierCurveBase * 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 BezierCurveBase * (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 BezierCurveBase 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 BezierCurveBase 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.0, dz: number = 0.0): boolean BezierCurveBase try to move the geometry by dx,dy,dz areAlmostEqual(a: undefined | GeometryQuery, b: undefined | GeometryQuery): boolean Static BezierCurveBase apply instance method isAlmostEqual if both are defined. installStrokeCountMap(curve: CurvePrimitive, curveMap: StrokeCountMap, parentMap?: StrokeCountMap): void Static BezierCurveBase 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 undefined | GeometryQuery[] BezierCurveBase return GeometryQuery children for recursive queries.* leaf classes do not need to implement. curvePrimitiveType Readonly "bezierCurve" BezierCurveBase String name for schema properties degree Accessor ReadOnly number BezierCurveBase (property accessor) Return the polynomial degree (one less than order) geometryCategory Readonly "curvePrimitive" BezierCurveBase String name for schema properties isExtensibleFractionSpace Accessor ReadOnly boolean BezierCurveBase * 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 parent undefined | any BezierCurveBase data attached by various algorithms (e.g. strokeData undefined | StrokeCountMap BezierCurveBase data attached during stroking for facets. Defined in bspline/BezierCurve3d.ts Line 30 Last Updated: 11 June, 2024