API Reference > geometry-core > Bspline > BezierCurve3dH BezierCurve3dH Class 3d curve with homogeneous weights. A control point with weight w and cartesian (projected) coordinates x,y,z has the weight multiplied into the coordinates, hence the control point as stored is (xw, yw, zw, w). Extends BezierCurveBase Methods Name Description clone(): BezierCurve3dH Clone the entire curve. cloneTransformed(transform: Transform): BezierCurve3dH Return a curve after transform. dispatchToGeometryHandler(handler: GeometryHandler): any Second step of double dispatch: call handler.handleBezierCurve3dH(this) extendRange(rangeToExtend: Range3d, transform?: Transform): void Extend rangeToExtend, using candidate extrema at fractionToPoint(fraction: number, result?: Point3d): Point3d Return a (deweighted) point on the curve. fractionToPoint4d(fraction: number, result?: Point4d): Point4d Return a (deweighted) 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 normalized to weight 1 getPolePoint4d(i: number, result?: Point4d): undefined | Point4d Return a specific pole as a full [x,y,z,x] Point4d isAlmostEqual(other: any): boolean test for nearly equal control points isSameGeometryClass(other: any): boolean test if other is also a BezierCurve3dH. isUnitWeight(tolerance?: number): boolean Returns true if all weights are within tolerance of 1.0 loadSpan3dPolesWithWeight(data: Float64Array, spanIndex: number, weight: number): void Load order * 4 doubles from data[3 * spanIndex] as poles (with added weight) loadSpan4dPoles(data: Float64Array, spanIndex: number): void Load order * 4 doubles from data[3 * spanIndex] as poles (with added weight) poleProductsXYZW(products: Float64Array, ax: number, ay: number, az: number, aw: number): void Form dot products of each pole with given coefficients. tryMultiplyMatrix4dInPlace(matrix: Matrix4d): void Apply (multiply by) a perspective transform tryTransformInPlace(transform: Transform): boolean Apply (multiply by) an affine transform updateClosestPointByTruePerpendicular(spacePoint: Point3d, detail: CurveLocationDetail): boolean Find the closest point within the bezier span, using true perpendicular test (but no endpoint test) create(data: Point3d[] | Point2d[] | Point4d[]): undefined | BezierCurve3dH Static Create a curve with given points. createOrder(order: number): BezierCurve3dH 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. clonePartialCurve(_fractionA: number, _fractionB: number): undefined | CurvePrimitive BezierCurveBase Return (if possible) a curve primitive which is a portion of this curve. 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/BezierCurve3dH.ts Line 28 Last Updated: 12 June, 2024