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 | |
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. | |
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: string, radius0: number, radius1: number, bearing0: Angle, bearing1: Angle, arcLength: number, fractionInterval: 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 Inherited | TransitionSpiral3d | Evaluate strokes at fractions indicated in a StrokeCountMap. |
announceClipIntervals(_clipper: Clipper, _announce?: AnnounceNumberNumberCurvePrimitive): boolean Inherited | TransitionSpiral3d | Find intervals of this curvePrimitive that are interior to a clipper |
appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number Inherited | TransitionSpiral3d | Compute intersections of the curve with a plane. |
applyRigidPartOfTransform(transformA: Transform): undefined | { rigidAxes: Matrix3d, scale: number } Protected Inherited | 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. |
clonePartialCurve(fractionA: number, fractionB: number): TransitionSpiral3d Inherited | TransitionSpiral3d | Return (if possible) a spiral which is a portion of this curve. |
cloneTransformed(transform: Transform): TransitionSpiral3d Inherited | TransitionSpiral3d | Clone with a transform applied |
closestPoint(spacePoint: Point3d, extend: VariantCurveExtendParameter, result?: CurveLocationDetail): undefined | CurveLocationDetail Inherited | TransitionSpiral3d | Search for a point on the curve that is closest to the spacePoint. |
collectCurvePrimitives(collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: booleanfalse, explodeLinestrings: booleanfalse): CurvePrimitive[] Inherited | TransitionSpiral3d | Return an array containing only the curve primitives. |
collectCurvePrimitivesGo(collectorArray: CurvePrimitive[], _smallestPossiblePrimitives: boolean, _explodeLinestrings: booleanfalse): void Inherited | TransitionSpiral3d | Return an array containing only the curve primitives. |
computeAndAttachRecursiveStrokeCounts(options?: StrokeOptions, parentMap?: StrokeCountMap): void Inherited | TransitionSpiral3d | Attach StrokeCountMap structure to this primitive (and recursively to any children) |
constructOffsetXY(offsetDistanceOrOptions: number | OffsetOptions): undefined | CurvePrimitive | CurvePrimitive[] Inherited | TransitionSpiral3d | Construct an offset of the instance curve as viewed in the xy-plane (ignoring z). |
curveLengthWithFixedIntervalCountQuadrature(fraction0: number, fraction1: number, numInterval: number, numGauss: number5): number Inherited | TransitionSpiral3d | Run an integration (with a default Gaussian quadrature) with a fixed fractional step |
extendRange(rangeToExtend: Range3d, transform?: Transform): void Inherited | TransitionSpiral3d | extend the range by the strokes of the spiral |
fractionAndDistanceToPointOnTangent(fraction: number, distance: number): Point3d Inherited | TransitionSpiral3d | Construct a point extrapolated along tangent at fraction. |
fractionToPointAndUnitTangent(fraction: number, result?: Ray3d): Ray3d Inherited | TransitionSpiral3d | Returns a ray whose origin is the curve point and direction is the unit tangent. |
fractionToSignedXYRadiusOfCurvature(fraction: number): number Inherited | TransitionSpiral3d | Construct signed distance from a point on the planar curve to its center of curvature (in xy only). |
getFractionToDistanceScale(): undefined | number Inherited | TransitionSpiral3d | If the curve primitive has distance-along-curve strictly proportional to curve fraction, return the scale factor. |
moveSignedDistanceFromFraction(startFraction: number, signedDistance: number, allowExtension: boolean, result?: CurveLocationDetail): CurveLocationDetail Inherited | 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 Inherited | TransitionSpiral3d | Generic algorithm to search for point at signed distance from a fractional startPoint. |
projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): undefined | Range1d Inherited | TransitionSpiral3d | Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of projection. |
range(transform?: Transform, result?: Range3d): Range3d Inherited | TransitionSpiral3d | Return the range of the entire GeometryQuery tree. |
rangeBetweenFractions(fractionA: number, fractionB: number, transform?: Transform): Range3d Inherited | TransitionSpiral3d | return the range of spiral between fractions of the activeStrokes. |
rangeBetweenFractionsByClone(fraction0: number, fraction1: number, transform?: Transform): Range3d Inherited | TransitionSpiral3d | 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 | TransitionSpiral3d | Returns an approximate range based on a fixed number of evaluations |
tryTranslateInPlace(dx: number, dy: number0.0, dz: number0.0): boolean Inherited | TransitionSpiral3d | Try to move the geometry by dx,dy,dz. |
areAlmostEqual(a: GeometryQuery, b: GeometryQuery): boolean Static Inherited | TransitionSpiral3d | Apply instance method isAlmostEqual if both are defined. |
averageCurvature(radiusLimits: Segment1d): number Static Inherited | TransitionSpiral3d | Return the average of the start and end curvatures. |
averageCurvatureR0R1(r0: number, r1: number): number Static Inherited | TransitionSpiral3d | Given two radii (or zeros for 0 curvature) return the average curvature |
curvatureToRadius(curvature: number): number Static Inherited | 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 Inherited | TransitionSpiral3d | Final install step to save curveMap in curve. |
interpolateCurvatureR0R1(r0: number, fraction: number, r1: number): number Static Inherited | TransitionSpiral3d | Given two radii (or zeros for 0 curvature) return the average curvature |
radius0LengthSweepRadiansToRadius1(radius0: number, arcLength: number, sweepRadians: number): number Static Inherited | TransitionSpiral3d | Return the end radius for spiral of given start radius, length, and turn angle. |
radius1LengthSweepRadiansToRadius0(radius1: number, arcLength: number, sweepRadians: number): number Static Inherited | TransitionSpiral3d | Return the start radius for spiral of given end radius, length, and turn angle. |
radiusRadiusLengthToSweepRadians(radius0: number, radius1: number, arcLength: number): number Static Inherited | TransitionSpiral3d | Return the turn angle for spiral of given length between two radii |
radiusRadiusSweepRadiansToArcLength(radius0: number, radius1: number, sweepRadians: number): number Static Inherited | TransitionSpiral3d | Return the arc length of a transition spiral with given sweep and radius pair. |
radiusToCurvature(radius: number): number Static Inherited | 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 Static Readonly | "clothoid" | default spiral type name. | |
radius01 | Segment1d | start and end radii as a Segment1d |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
_activeFractionInterval Protected Inherited | Segment1d | TransitionSpiral3d | Fractional interval for the "active" part of a containing spiral. |
_designProperties Protected Inherited | undefined | TransitionConditionalProperties | TransitionSpiral3d | Original defining properties. |
_localToWorld Protected Inherited | Transform | TransitionSpiral3d | Placement transform |
_spiralType Protected Inherited | string | TransitionSpiral3d | string name of spiral type |
activeFractionInterval Accessor Inherited ReadOnly | Segment1d | TransitionSpiral3d | Return (reference to) the active portion of the reference spiral. |
children Accessor Inherited ReadOnly | undefined | GeometryQuery[] | TransitionSpiral3d | Return GeometryQuery children for recursive queries. * leaf classes do not need to implement. |
designProperties Accessor Inherited ReadOnly | undefined | TransitionConditionalProperties | TransitionSpiral3d | Return the original defining properties (if any) saved by the constructor. |
geometryCategory Readonly Inherited | "curvePrimitive" | TransitionSpiral3d | String name for schema properties |
isExtensibleFractionSpace Accessor Inherited ReadOnly | boolean | TransitionSpiral3d | * 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 |
localToWorld Accessor Inherited ReadOnly | Transform | TransitionSpiral3d | (reference to) placement transform. |
parent Inherited | any | undefined | TransitionSpiral3d | Data attached by various algorithms (e.g. |
spiralType Accessor Inherited ReadOnly | string | TransitionSpiral3d | |
strokeData Inherited | StrokeCountMap | undefined | TransitionSpiral3d | Data attached during stroking for facets. |
Defined in
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.