CurveChainWithDistanceIndex Class
CurveChainWithDistanceIndex
is a CurvePrimitive whose fractional parameterization is proportional to true
distance along a CurveChain.
- The curve chain can be any type derived from CurveChain.
- i.e. either a
Path
or aLoop
- i.e. either a
Extends
Methods
Name | Description | |
---|---|---|
chainDistanceToChainFraction(distance: number): number | Convert distance along the chain to fraction along the chain. | |
chainDistanceToFragment(distance: number, allowExtrapolation: boolean = false): undefined | PathFragment | Resolve a fraction of the CurveChain to a PathFragment | |
chainDistanceToFragmentIndex(distance: number, allowExtrapolation: boolean = false): undefined | number Protected | Resolve a fraction of the CurveChain to a PathFragment index | |
clone(): CurveChainWithDistanceIndex | Return a deep clone | |
clonePartialCurve(fractionA: number, fractionB: number): undefined | CurveChainWithDistanceIndex | Return a deep clone | |
cloneTransformed(transform: Transform): undefined | CurveChainWithDistanceIndex | Create a clone, transformed and with its own distance index. | |
closestPoint(spacePoint: Point3d, extend: VariantCurveExtendParameter): undefined | CurveLocationDetail | Search for the curve point that is closest to the spacePoint. | |
collectCurvePrimitivesGo(collectorArray: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLineStrings: boolean = false): void | Return an array containing only the curve primitives. | |
computeAndAttachRecursiveStrokeCounts(options?: StrokeOptions, parentStrokeMap?: StrokeCountMap): void | construct StrokeCountMap for each child, accumulating data to stroke count map for this primitive. | |
computeStrokeCountForOptions(options?: StrokeOptions): number | return the stroke count required for given options. | |
constructOffsetXY(offsetDistanceOrOptions: number | OffsetOptions): undefined | CurvePrimitive | CurvePrimitive[] | Construct an offset of each child as viewed in the xy-plane (ignoring z). | |
curveAndChildFractionToFragment(curve: CurvePrimitive, fraction: number): undefined | PathFragment | Resolve a fraction within a specific curve to a fragment. | |
curveLength(): number | Returns the total length of curves. | |
curveLengthBetweenFractions(fraction0: number, fraction1: number): number | * Curve length is always positive. | |
dispatchToGeometryHandler(handler: GeometryHandler): any | Second step of double dispatch: call this._path.dispatchToGeometryHandler (handler) |
|
emitStrokableParts(dest: IStrokeHandler, options?: StrokeOptions): void | Ask the curve to announce points and simple subcurve fragments for stroking. | |
emitStrokes(dest: LineString3d, options?: StrokeOptions): void | Add strokes to caller-supplied linestring | |
endPoint(result?: Point3d): Point3d | Return the end point of the primitive. | |
extendRange(rangeToExtend: Range3d, transform?: Transform): void | Extend (increase) rangeToExtend as needed to include these curves (optionally transformed) |
|
fractionToPoint(fraction: number, result?: Point3d): Point3d | Return the point (x,y,z) on the curve at fractional position along the chain. | |
fractionToPointAnd2Derivatives(fraction: number, result?: Plane3dByOriginAndVectors): undefined | Plane3dByOriginAndVectors | Return a plane with | |
fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d | Return the point (x,y,z) and derivative on the curve at fractional position. | |
fractionToPointAndUnitTangent(fraction: number, result?: Ray3d): Ray3d | Returns a ray whose origin is the curve point and direction is the unit tangent. | |
isAlmostEqual(other: GeometryQuery): boolean | Test for equality conditions: | |
isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean | Ask if the curve is within tolerance of a plane. | |
isSameGeometryClass(other: GeometryQuery): boolean | Test if other is a CurveChainWithDistanceIndex |
|
moveSignedDistanceFromFraction(startFraction: number, signedDistance: number, allowExtension: boolean, result?: CurveLocationDetail): CurveLocationDetail | Implement moveSignedDistanceFromFraction. | |
projectedParameterRange(ray: Ray3d | Vector3d, lowHigh?: Range1d): undefined | Range1d | Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of projection. | |
quickLength(): number | Returns the total length of the path. | |
reverseInPlace(): void | Reverse the curve's data so that its fractional stroking moves in the opposite direction. | |
startPoint(result?: Point3d): Point3d | return the start point of the primitive. | |
tryTransformInPlace(transform: Transform): boolean | Attempt to transform in place. | |
createCapture(path: CurveChain, options?: StrokeOptions): CurveChainWithDistanceIndex Static | Capture (not clone) a path into a new CurveChainWithDistanceIndex |
|
getClosestPointTestCounts(clear: boolean = true): { numAssigned: number, numCalls: number, numCandidate: number, numTested: number } Static | The returned object has |
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. |
collectCurvePrimitives(collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLinestrings: boolean = false): CurvePrimitive[] | CurvePrimitive | Return an array containing only the curve primitives. |
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 |
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: |
fractionToSignedXYRadiusOfCurvature(fraction: number): number | CurvePrimitive | Construct signed distance from a point on the curve to its center of curvature (in xy only). |
getFractionToDistanceScale(): undefined | number | CurvePrimitive | * If the curve primitive has distance-along-curve strictly proportional to curve fraction, return the scale factor. |
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. |
range(transform?: Transform, result?: Range3d): Range3d | CurvePrimitive | return the range of the entire (tree) GeometryQuery |
rangeBetweenFractions(fraction0: number, fraction1: number, transform?: Transform): Range3d | CurvePrimitive | Returns a (high accuracy) range of the curve between fractional positions |
rangeBetweenFractionsByClone(fraction0: number, fraction1: number, transform?: Transform): Range3d | CurvePrimitive | Returns a (high accuracy) range of the curve between fractional positions |
rangeBetweenFractionsByCount(fraction0: number, fraction1: number, count: number, transform?: Transform, extrapolationFactor: number = 0.0): Range3d | CurvePrimitive | Returns an approximate range based on a fixed number of evaluations |
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 | |
---|---|---|---|
curvePrimitiveType Readonly | "curveChainWithDistanceIndex" | String name for schema properties | |
fragments Accessor ReadOnly | PathFragment[] | Reference to the fragments array. | |
path Accessor ReadOnly | CurveChain | Reference to the contained path. |
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. |
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
- curve/CurveChainWithDistanceIndex.ts Line 229
Last Updated: 20 June, 2023