ProxyCurve Class

A ProxyCurve is expected to be used as a base class for curve types that use some existing curve (the proxy) for evaluation and display but carry other defining data.

  • The ProxyCurve implements all required CurvePrimitive methods by dispatching to the proxy.
  • These methods presumably require support from the application class and are left abstract:
    • clone
    • clonePartialCurve
    • cloneTransformed
    • curvePrimitiveType
    • isSameCurvePrimitiveType
    • isSameGeometryClass
    • tryTransformInPlace
    • reverseInPlace

Extends

Extended by

Methods

Name Description
constructor(proxyCurve: CurvePrimitive): ProxyCurve Constructor CAPTURES the proxyCurve pointer  
computeStrokeCountForOptions(options?: StrokeOptions): number Implement by proxyCurve  
dispatchToGeometryHandler(handler: GeometryHandler): any * "double dispatch" call pattern.  
emitStrokableParts(dest: IStrokeHandler, options?: StrokeOptions): void Implement by proxyCurve  
emitStrokes(dest: LineString3d, options?: StrokeOptions): void Implement by proxyCurve  
extendRange(rangeToExtend: Range3d, transform?: Transform): void Implement by proxyCurve  
fractionToPoint(fraction: number, result?: Point3d): Point3d Implement by proxyCurve  
fractionToPointAnd2Derivatives(fraction: number, result?: Plane3dByOriginAndVectors): undefined | Plane3dByOriginAndVectors Implement by proxyCurve  
fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d Implement by proxyCurve  
isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean Implement by proxyCurve  
quickLength(): number Compute a length which may be an fast approximation to the true length.  
range(transform?: Transform, result?: Range3d): Range3d Implement by proxyCurve  

Inherited methods

Name Inherited from Description
addMappedStrokesToLineString3D(map: StrokeCountMap, linestring: LineString3d): number CurvePrimitive * evaluate strokes at fractions indicated in a StrokeCountMap.
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.
clone(): undefined | GeometryQuery Abstract CurvePrimitive return a clone
clonePartialCurve(_fractionA: number, _fractionB: number): undefined | CurvePrimitive CurvePrimitive Return (if possible) a curve primitive which is a portion of this curve.
cloneTransformed(transform: Transform): undefined | GeometryQuery Abstract CurvePrimitive return a transformed clone.
closestPoint(spacePoint: Point3d, extend: VariantCurveExtendParameter): undefined | CurveLocationDetail CurvePrimitive Search for the curve point that is closest to the spacePoint.
collectCurvePrimitives(collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLinestrings: boolean = false): CurvePrimitive[] CurvePrimitive Return an array containing only the curve primitives.
collectCurvePrimitivesGo(collectorArray: CurvePrimitive[], _smallestPossiblePrimitives: boolean, _explodeLinestrings: boolean = false): 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)
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
endPoint(result?: Point3d): Point3d CurvePrimitive return the end point of the primitive.
fractionAndDistanceToPointOnTangent(fraction: number, distance: number): Point3d CurvePrimitive Construct a point extrapolated along tangent at fraction.
fractionToCurvature(fraction: number): undefined | number CurvePrimitive Returns the (absolute) curvature magnitude.
fractionToFrenetFrame(fraction: number, result?: Transform): undefined | Transform CurvePrimitive Construct a frenet frame:
fractionToPointAndUnitTangent(fraction: number, result?: Ray3d): Ray3d CurvePrimitive Returns a ray whose origin is the curve point and direction is the unit tangent.
getFractionToDistanceScale(): undefined | number CurvePrimitive * If the curve primitive has distance-along-curve strictly proportional to curve fraction, return true
isAlmostEqual(other: GeometryQuery): boolean CurvePrimitive test for exact structure and nearly identical geometry.
isSameGeometryClass(other: GeometryQuery): boolean Abstract CurvePrimitive test if (other instanceof this.Type).
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.
reverseInPlace(): void Abstract CurvePrimitive Reverse the curve's data so that its fractional stroking moves in the opposite direction.
startPoint(result?: Point3d): Point3d CurvePrimitive return the startPoint of the primitive.
tryTransformInPlace(transform: Transform): boolean Abstract CurvePrimitive Attempt to transform in place.
tryTranslateInPlace(dx: number, dy: number = 0.0, dz: number = 0.0): boolean CurvePrimitive try to move the geometry by dx,dy,dz
areAlmostEqual(a: undefined | GeometryQuery, b: undefined | GeometryQuery): boolean Static CurvePrimitive apply instance method isAlmostEqual if both are defined.
installStrokeCountMap(curve: CurvePrimitive, curveMap: StrokeCountMap, parentMap?: StrokeCountMap): void Static CurvePrimitive final install step to save curveMap in curve.

Properties

Name Type Description
_proxyCurve Protected CurvePrimitive    

Inherited properties

Name Type Inherited from Description
children Accessor ReadOnly undefined | GeometryQuery[] CurvePrimitive return GeometryQuery children for recursive queries.

* leaf classes do not need to implement.
curvePrimitiveType AbstractReadonly CurvePrimitiveType CurvePrimitive String name for schema properties
geometryCategory Readonly "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
parent undefined | any CurvePrimitive data attached by various algorithms (e.g.
strokeData undefined | StrokeCountMap CurvePrimitive data attached during stroking for facets.

Defined in

Last Updated: 11 June, 2024