TransitionSpiral3d Class

TransitionSpiral3d is a base class for multiple variants of spirals.

  • The menagerie of spiral types have 2 broad categories:
    • IntegratedSpiral3d -- a spiral whose direct function for curvature versus distance must be integrated to determine x,y
      • The IntegratedSpiral3d types are enumerated in IntegratedSpiralTypes
    • DirectSpiral3d -- a spiral implemented with direct calculation of x,y from fractional position along the spiral.
      • The direct spiral types are enumerated in the DirectSpiralType
  • The method set for CurvePrimitive support includes a handleTransitionSpiral(g: TransitionSpiral3d) which receives all the spiral types.
  • The spiral class may impose expectations that its inflection is at the origin, with tangent along the x axis.
    • This is generally necessary for direct spirals.
    • This is not necessary for integrated spirals.

Extends

Extended by

Methods

Name Description
constructor(spiralType: string, localToWorld: Transform, activeFractionInterval: Segment1d, designProperties: TransitionConditionalProperties): TransitionSpiral3d Protected    
applyRigidPartOfTransform(transformA: Transform): undefined | { rigidAxes: Matrix3d, scale: number } Protected * If transformA is rigid with uniform scale, apply the rigid part of transformA to the localToWorld transform and return the scale and rigid separation.  
clone(): TransitionSpiral3d Abstract Return a deep clone.  
clonePartialCurve(fractionA: number, fractionB: number): TransitionSpiral3d Return (if possible) a spiral which is a portion of this curve.  
cloneTransformed(transform: Transform): TransitionSpiral3d Clone with a transform applied  
constructOffsetXY(offsetDistanceOrOptions: number | OffsetOptions): undefined | CurvePrimitive | CurvePrimitive[] Construct an offset of the instance curve as viewed in the xy-plane (ignoring z).  
extendRange(rangeToExtend: Range3d, transform?: Transform): void extend the range by the strokes of the spiral  
projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): undefined | Range1d Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of projection.  
rangeBetweenFractions(fractionA: number, fractionB: number, transform?: Transform): Range3d return the range of spiral between fractions of the activeStrokes.  
refreshComputedProperties(): void Abstract Recompute strokes  
averageCurvature(radiusLimits: Segment1d): number Static Return the average of the start and end curvatures.  
averageCurvatureR0R1(r0: number, r1: number): number Static Given two radii (or zeros for 0 curvature) return the average curvature  
curvatureToRadius(curvature: number): number Static Return 1/k with convention that if near-zero is given as curvature, its infinite radius is returned as 0  
interpolateCurvatureR0R1(r0: number, fraction: number, r1: number): number Static Given two radii (or zeros for 0 curvature) return the average curvature  
radius0LengthSweepRadiansToRadius1(radius0: number, arcLength: number, sweepRadians: number): number Static Return the end radius for spiral of given start radius, length, and turn angle.  
radius1LengthSweepRadiansToRadius0(radius1: number, arcLength: number, sweepRadians: number): number Static Return the start radius for spiral of given end radius, length, and turn angle.  
radiusRadiusLengthToSweepRadians(radius0: number, radius1: number, arcLength: number): number Static Return the turn angle for spiral of given length between two radii  
radiusRadiusSweepRadiansToArcLength(radius0: number, radius1: number, sweepRadians: number): number Static Return the arc length of a transition spiral with given sweep and radius pair.  
radiusToCurvature(radius: number): number Static Return 1/r with convention that if true zero is given as radius it represents infinite radius (0 curvature, straight line)  

Inherited methods

Name Inherited from Description
addMappedStrokesToLineString3D(map: StrokeCountMap, linestring: LineString3d): number Inherited CurvePrimitive Evaluate strokes at fractions indicated in a StrokeCountMap.
announceClipIntervals(_clipper: Clipper, _announce?: AnnounceNumberNumberCurvePrimitive): boolean Inherited CurvePrimitive Find intervals of this curvePrimitive that are interior to a clipper
appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number Inherited CurvePrimitive Compute intersections of the curve with a plane.
closestPoint(spacePoint: Point3d, extend: VariantCurveExtendParameter, result?: CurveLocationDetail): undefined | CurveLocationDetail Inherited CurvePrimitive Search for a point on the curve that is closest to the spacePoint.
collectCurvePrimitives(collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: booleanfalse, explodeLinestrings: booleanfalse): CurvePrimitive[] Inherited CurvePrimitive Return an array containing only the curve primitives.
collectCurvePrimitivesGo(collectorArray: CurvePrimitive[], _smallestPossiblePrimitives: boolean, _explodeLinestrings: booleanfalse): void Inherited CurvePrimitive Return an array containing only the curve primitives.
computeAndAttachRecursiveStrokeCounts(options?: StrokeOptions, parentMap?: StrokeCountMap): void Inherited CurvePrimitive Attach StrokeCountMap structure to this primitive (and recursively to any children)
computeStrokeCountForOptions(options?: StrokeOptions): number Abstract Inherited CurvePrimitive Return the stroke count required for given options.
curveLength(): number Inherited CurvePrimitive Return the length of the curve.
curveLengthBetweenFractions(fraction0: number, fraction1: number): number Inherited CurvePrimitive Returns a (high accuracy) length of the curve between fractional positions.
curveLengthWithFixedIntervalCountQuadrature(fraction0: number, fraction1: number, numInterval: number, numGauss: number5): number Inherited CurvePrimitive Run an integration (with a default Gaussian quadrature) with a fixed fractional step
dispatchToGeometryHandler(handler: GeometryHandler): any Abstract Inherited CurvePrimitive Double Dispatch call pattern.
emitStrokableParts(dest: IStrokeHandler, options?: StrokeOptions): void Abstract Inherited CurvePrimitive Ask the curve to announce points and simple subcurve fragments for stroking.
emitStrokes(dest: LineString3d, options?: StrokeOptions): void Abstract Inherited CurvePrimitive Add strokes to caller-supplied linestring (function updates dest)
endPoint(result?: Point3d): Point3d Inherited CurvePrimitive Return the end point of the primitive.
fractionAndDistanceToPointOnTangent(fraction: number, distance: number): Point3d Inherited CurvePrimitive Construct a point extrapolated along tangent at fraction.
fractionToCurvature(fraction: number): undefined | number Inherited CurvePrimitive Returns the (absolute) curvature magnitude.
fractionToFrenetFrame(fraction: number, result?: Transform): undefined | Transform Inherited CurvePrimitive Construct a frenet frame:
fractionToPoint(fraction: number, result?: Point3d): Point3d Abstract Inherited CurvePrimitive Return the point (x,y,z) on the curve at fractional position.
fractionToPointAnd2Derivatives(fraction: number, result?: Plane3dByOriginAndVectors): undefined | Plane3dByOriginAndVectors Abstract Inherited CurvePrimitive Return a plane with
fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d Abstract Inherited CurvePrimitive Return the point (x,y,z) and derivative on the curve at fractional position.
fractionToPointAndUnitTangent(fraction: number, result?: Ray3d): Ray3d Inherited CurvePrimitive Returns a ray whose origin is the curve point and direction is the unit tangent.
fractionToSignedXYRadiusOfCurvature(fraction: number): number Inherited CurvePrimitive Construct signed distance from a point on the planar curve to its center of curvature (in xy only).
getFractionToDistanceScale(): undefined | number Inherited CurvePrimitive If the curve primitive has distance-along-curve strictly proportional to curve fraction, return the scale factor.
isAlmostEqual(other: GeometryQuery): boolean Inherited CurvePrimitive Test for exact structure and nearly identical geometry.
isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean Abstract Inherited CurvePrimitive Ask if the curve is within tolerance of a plane.
isSameGeometryClass(other: GeometryQuery): boolean Abstract Inherited CurvePrimitive Test if (other instanceof this.Type).
moveSignedDistanceFromFraction(startFraction: number, signedDistance: number, allowExtension: boolean, result?: CurveLocationDetail): CurveLocationDetail Inherited 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 Inherited CurvePrimitive Generic algorithm to search for point at signed distance from a fractional startPoint.
quickLength(): number Abstract Inherited CurvePrimitive Compute a length for curve which may be a fast approximation to the true length.
range(transform?: Transform, result?: Range3d): Range3d Inherited CurvePrimitive Return the range of the entire GeometryQuery tree.
rangeBetweenFractionsByClone(fraction0: number, fraction1: number, transform?: Transform): Range3d Inherited CurvePrimitive Returns a (high accuracy) range of the curve between fractional positions
rangeBetweenFractionsByCount(fraction0: number, fraction1: number, count: number, transform?: Transform, extrapolationFactor: number0.0): Range3d Inherited CurvePrimitive Returns an approximate range based on a fixed number of evaluations
reverseInPlace(): void Abstract Inherited CurvePrimitive Reverse the curve's data so that its fractional stroking moves in the opposite direction.
startPoint(result?: Point3d): Point3d Inherited CurvePrimitive Return the startPoint of the primitive.
tryTransformInPlace(transform: Transform): boolean Abstract Inherited CurvePrimitive Attempt to transform in place.
tryTranslateInPlace(dx: number, dy: number0.0, dz: number0.0): boolean Inherited CurvePrimitive Try to move the geometry by dx,dy,dz.
areAlmostEqual(a: GeometryQuery, b: GeometryQuery): boolean Static Inherited CurvePrimitive Apply instance method isAlmostEqual if both are defined.
installStrokeCountMap(curve: CurvePrimitive, curveMap: StrokeCountMap, parentMap?: StrokeCountMap): void Static Inherited CurvePrimitive Final install step to save curveMap in curve.

Properties

Name Type Description
_activeFractionInterval Protected Segment1d Fractional interval for the "active" part of a containing spiral.  
_designProperties Protected undefined | TransitionConditionalProperties Original defining properties.  
_localToWorld Protected Transform Placement transform  
_spiralType Protected string string name of spiral type  
activeFractionInterval Accessor ReadOnly Segment1d Return (reference to) the active portion of the reference spiral.  
activeStrokes Accessor Abstract ReadOnly LineString3d strokes in the active portion  
designProperties Accessor ReadOnly undefined | TransitionConditionalProperties Return the original defining properties (if any) saved by the constructor.  
localToWorld Accessor ReadOnly Transform (reference to) placement transform.  
spiralType Accessor ReadOnly string    

Inherited properties

Name Type Inherited from Description
children Accessor Inherited ReadOnly undefined | GeometryQuery[] CurvePrimitive Return GeometryQuery children for recursive queries.
* leaf classes do not need to implement.
curvePrimitiveType Abstract Readonly Inherited CurvePrimitiveType CurvePrimitive String name for schema properties
geometryCategory Readonly Inherited "curvePrimitive" CurvePrimitive String name for schema properties
isExtensibleFractionSpace Accessor Inherited ReadOnly boolean CurvePrimitive * Returns true if the curve can be easily extended past its start/end point (i.e., beyond the usual
fraction space [0,1]). Otherwise, returns false.
* Base class default implementation returns false.
* These classes (and perhaps others in the future) will return true:
* LineSegment3d
* LineString3d
* Arc3d
parent Inherited any | undefined CurvePrimitive Data attached by various algorithms (e.g.
strokeData Inherited StrokeCountMap | undefined CurvePrimitive Data attached during stroking for facets.

Defined in

Last Updated: 23 November, 2024