IntegratedSpiral3d Class

An IntegratedSpiral3d is a curve defined by integrating its curvature.

  • The first integral of curvature (with respect to distance along the curve) is the bearing angle (in radians)
  • Integrating (cos(theta), sin(theta)) gives displacement from the start point, and thus the actual curve position.
  • The curvature functions of interest are all symmetric snap functions in the NormalizedTransition class.
  • TransitionConditionalProperties implements the computations of the interrelationship of radii, bearing, and length.

Extends

Methods

Name Description
clone(): IntegratedSpiral3d Deep clone of this spiral  
clonePartialCurve(fractionA: number, fractionB: number): undefined | IntegratedSpiral3d Return (if possible) a spiral which is a portion of this curve.  
cloneTransformed(transform: Transform): TransitionSpiral3d Clone with a transform applied  
computeStrokeCountForOptions(options?: StrokeOptions): number return the stroke count required for given options.  
curveLength(): number Return length of the spiral.  
curveLengthBetweenFractions(fraction0: number, fraction1: number): number Return (unsigned) length of the spiral between fractions.  
dispatchToGeometryHandler(handler: GeometryHandler): any Second step of double dispatch: call handler.handleTransitionSpiral(this)  
emitStrokableParts(dest: IStrokeHandler, options?: StrokeOptions): void emit stroke fragments to dest handler.  
emitStrokes(dest: LineString3d, options?: StrokeOptions): void Add strokes from this spiral to dest.  
endPoint(): Point3d return the spiral end point.  
extendRange(rangeToExtend: Range3d, transform?: Transform): void extend the range by the strokes of the spiral  
fractionToBearingRadians(activeFraction: number): number Return the bearing at given fraction of the active interval ....  
fractionToCurvature(activeFraction: number): undefined | number Return the curvature at given fraction of the active interval ...  
fractionToFrenetFrame(activeFraction: number, result?: Transform): Transform Return the frenet frame at fractional position.  
fractionToPoint(activeFraction: number, result?: Point3d): Point3d Evaluate curve point with respect to fraction.  
fractionToPointAnd2Derivatives(activeFraction: number, result?: Plane3dByOriginAndVectors): undefined | Plane3dByOriginAndVectors Return a plane with  
fractionToPointAndDerivative(activeFraction: number, result?: Ray3d): Ray3d Evaluate curve point and derivative with respect to fraction.  
globalFractionToBearingRadians(fraction: number): number use the integrated function to return an angle at fractional position.  
globalFractionToCurvature(fraction: number): number use the integrated function to return an angle at fractional position.  
isAlmostEqual(other?: GeometryQuery): boolean compare various coordinate quantities  
isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean test if the local to world transform places the spiral xy plane into plane  
isSameGeometryClass(other: any): boolean Test if other is an instance of TransitionSpiral3d  
quickLength(): number Return length of the spiral.  
refreshComputedProperties(): void Recompute strokes  
reverseInPlace(): void Reverse the active interval and active strokes.  
setFrom(other: IntegratedSpiral3d): IntegratedSpiral3d Copy all defining data from another spiral.  
startPoint(): Point3d Return the spiral start point.  
tryTransformInPlace(transformA: Transform): boolean apply transform to this spiral's local to world transform.  
createFrom4OutOf5(spiralType: undefined | string, radius0: undefined | number, radius1: undefined | number, bearing0: undefined | Angle, bearing1: undefined | Angle, arcLength: undefined | number, fractionInterval: undefined | Segment1d, localToWorld: Transform): undefined | IntegratedSpiral3d Static Create a transition spiral.  
createRadiusRadiusBearingBearing(radius01: Segment1d, bearing01: AngleSweep, activeFractionInterval: Segment1d, localToWorld: Transform, typeName?: string): undefined | IntegratedSpiral3d Static Create a transition spiral with radius and bearing conditions.  
initWorkSpace(): void Static Initialize class level work arrays.  

Inherited methods

Name Inherited from Description
addMappedStrokesToLineString3D(map: StrokeCountMap, linestring: LineString3d): number TransitionSpiral3d * evaluate strokes at fractions indicated in a StrokeCountMap.
announceClipIntervals(_clipper: Clipper, _announce?: AnnounceNumberNumberCurvePrimitive): boolean TransitionSpiral3d Find intervals of this curvePrimitive that are interior to a clipper
appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number TransitionSpiral3d Compute intersections with a plane.
applyRigidPartOfTransform(transformA: Transform): undefined | { rigidAxes: Matrix3d, scale: number } Protected TransitionSpiral3d * If transformA is rigid with uniform scale, apply the rigid part of transformA to the localToWorld transform and return the scale and rigid separation.
closestPoint(spacePoint: Point3d, extend: VariantCurveExtendParameter): undefined | CurveLocationDetail TransitionSpiral3d Search for the curve point that is closest to the spacePoint.
collectCurvePrimitives(collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLinestrings: boolean = false): CurvePrimitive[] TransitionSpiral3d Return an array containing only the curve primitives.
collectCurvePrimitivesGo(collectorArray: CurvePrimitive[], _smallestPossiblePrimitives: boolean, _explodeLinestrings: boolean = false): void TransitionSpiral3d Return an array containing only the curve primitives.
computeAndAttachRecursiveStrokeCounts(options?: StrokeOptions, parentMap?: StrokeCountMap): void TransitionSpiral3d attach StrokeCountMap structure to this primitive (and recursively to any children)
curveLengthWithFixedIntervalCountQuadrature(fraction0: number, fraction1: number, numInterval: number, numGauss: number = 5): number TransitionSpiral3d * Run an integration (with a default gaussian quadrature) with a fixed fractional step
fractionAndDistanceToPointOnTangent(fraction: number, distance: number): Point3d TransitionSpiral3d Construct a point extrapolated along tangent at fraction.
fractionToPointAndUnitTangent(fraction: number, result?: Ray3d): Ray3d TransitionSpiral3d Returns a ray whose origin is the curve point and direction is the unit tangent.
getFractionToDistanceScale(): undefined | number TransitionSpiral3d * If the curve primitive has distance-along-curve strictly proportional to curve fraction, return true
moveSignedDistanceFromFraction(startFraction: number, signedDistance: number, allowExtension: boolean, result?: CurveLocationDetail): CurveLocationDetail TransitionSpiral3d * (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 TransitionSpiral3d Generic algorithm to search for point at signed distance from a fractional startPoint.
range(transform?: Transform, result?: Range3d): Range3d TransitionSpiral3d return the range of the entire (tree) GeometryQuery
tryTranslateInPlace(dx: number, dy: number = 0.0, dz: number = 0.0): boolean TransitionSpiral3d try to move the geometry by dx,dy,dz
areAlmostEqual(a: undefined | GeometryQuery, b: undefined | GeometryQuery): boolean Static TransitionSpiral3d apply instance method isAlmostEqual if both are defined.
averageCurvature(radiusLimits: Segment1d): number Static TransitionSpiral3d Return the average of the start and end curvatures.
averageCurvatureR0R1(r0: number, r1: number): number Static TransitionSpiral3d Given two radii (or zeros for 0 curvature) return the average curvature
curvatureToRadius(curvature: number): number Static TransitionSpiral3d Return 1/k with convention that if near-zero is given as curvature, its infinite radius is returned as 0
installStrokeCountMap(curve: CurvePrimitive, curveMap: StrokeCountMap, parentMap?: StrokeCountMap): void Static TransitionSpiral3d final install step to save curveMap in curve.
interpolateCurvatureR0R1(r0: number, fraction: number, r1: number): number Static TransitionSpiral3d Given two radii (or zeros for 0 curvature) return the average curvature
radius0LengthSweepRadiansToRadius1(radius0: number, arcLength: number, sweepRadians: number): number Static TransitionSpiral3d Return the end radius for spiral of given start radius, length, and turn angle.
radius1LengthSweepRadiansToRadius0(radius1: number, arcLength: number, sweepRadians: number): number Static TransitionSpiral3d Return the start radius for spiral of given end radius, length, and turn angle.
radiusRadiusLengthToSweepRadians(radius0: number, radius1: number, arcLength: number): number Static TransitionSpiral3d Return the turn angle for spiral of given length between two radii
radiusRadiusSweepRadiansToArcLength(radius0: number, radius1: number, sweepRadians: number): number Static TransitionSpiral3d Return the arc length of a transition spiral with given sweep and radius pair.
radiusToCurvature(radius: number): number Static TransitionSpiral3d Return 1/r with convention that if true zero is given as radius it represents infinite radius (0 curvature, straight line)

Properties

Name Type Description
activeStrokes Accessor ReadOnly LineString3d Return the internal stroked form of the (possibly partial) spiral  
bearing01 AngleSweep start and end bearings as an AngleSweep  
curvePrimitiveType Readonly "transitionSpiral" String name for schema properties  
defaultSpiralType StaticReadonly "clothoid" default spiral type name.  
radius01 Segment1d start and end radii as a Segment1d  

Inherited properties

Name Type Inherited from Description
_activeFractionInterval Protected Segment1d TransitionSpiral3d Fractional interval for the "active" part of a containing spiral.
_designProperties Protected undefined | TransitionConditionalProperties TransitionSpiral3d Original defining properties.
_localToWorld Protected Transform TransitionSpiral3d Placement transform
_spiralType Protected string TransitionSpiral3d string name of spiral type
activeFractionInterval Accessor ReadOnly Segment1d TransitionSpiral3d Return (reference to) the active portion of the reference spiral.
children Accessor ReadOnly undefined | GeometryQuery[] TransitionSpiral3d return GeometryQuery children for recursive queries.

* leaf classes do not need to implement.
designProperties Accessor ReadOnly undefined | TransitionConditionalProperties TransitionSpiral3d Return the original defining properties (if any) saved by the constructor.
geometryCategory Readonly "curvePrimitive" TransitionSpiral3d String name for schema properties
isExtensibleFractionSpace Accessor ReadOnly boolean TransitionSpiral3d * 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
localToWorld Accessor ReadOnly Transform TransitionSpiral3d (reference to) placement transform.
parent undefined | any TransitionSpiral3d data attached by various algorithms (e.g.
spiralType Accessor ReadOnly string TransitionSpiral3d  
strokeData undefined | StrokeCountMap TransitionSpiral3d data attached during stroking for facets.

Defined in

Last Updated: 12 June, 2024