DirectSpiral3d Class
DirectSpiral3d acts like a TransitionSpiral3d for serialization purposes, but implements spiral types that have "direct" xy calculations without the integrations required for IntegratedSpiral3d.
- Each DirectSpiral3d carries an XYCurveEvaluator to give it specialized behavior.
- Direct spirals that flow through serialization to native imodel02 are create with these static methods:
- createArema
- createJapaneseCubic
- createAustralianRail
- createDirectHalfCosine
- createChineseCubic
- createCzechCubic
- createPolishCubic
- createItalian
- createWesternAustralian
Extends
Methods
| Name | Description | |
|---|---|---|
| constructor(localToWorld: Transform, spiralType: string, originalProperties: TransitionConditionalProperties, nominalL1: number, nominalR1: number, activeFractionInterval: Segment1d, evaluator: ): DirectSpiral3d | ||
| clone(): DirectSpiral3d | Deep clone of this spiral | |
| computeStrokeCountForOptions(options?: StrokeOptions): number | return the stroke count required for given options. | |
| 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(result?: Point3d): Point3d | return the spiral end point. | |
| 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. | |
| isAlmostEqual(other: any): 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 quick length of the spiral. | |
| refreshComputedProperties(): void | Recompute strokes | |
| reverseInPlace(): void | Reverse the active interval and active strokes. | |
| startPoint(result?: Point3d): Point3d | Return the spiral start point. | |
| tryTransformInPlace(transformA: Transform): boolean | apply transform to this spiral's local to world transform. |
|
| createArema(localToWorld: Transform, nominalL1: number, nominalR1: number, activeInterval?: Segment1d): undefined | DirectSpiral3d Static | Create an Arema spiral clothoid approximation | |
| createAustralianRail(localToWorld: Transform, nominalL1: number, nominalR1: number, activeInterval?: Segment1d): undefined | DirectSpiral3d Static | Create an AustralianRailCorp spiral | |
| createChineseCubic(localToWorld: Transform, nominalL1: number, nominalR1: number, activeInterval?: Segment1d): undefined | DirectSpiral3d Static | Create a Chinese clothoid approximation | |
| createCzechCubic(localToWorld: Transform, nominalLx: number, nominalR1: number, activeInterval?: Segment1d): undefined | DirectSpiral3d Static | Create a czech cubic. | |
| createDirectHalfCosine(localToWorld: Transform, nominalL1: number, nominalR1: number, activeInterval?: Segment1d): undefined | DirectSpiral3d Static | ||
| createFromLengthAndRadius(spiralType: string, radius0: number, radius1: number, bearing0: Angle, _bearing1: Angle, arcLength: number, activeInterval: Segment1d, localToWorld: Transform): undefined | TransitionSpiral3d Static | Create (if possible) a DirectSpiral3d, applying various strict conditions appropriate to the spiral type. | |
| createItalian(localToWorld: Transform, nominalL1: number, nominalR1: number, activeInterval?: Segment1d): undefined | DirectSpiral3d Static | Create an italian spiral | |
| createJapaneseCubic(localToWorld: Transform, nominalL1: number, nominalR1: number, activeInterval?: Segment1d): undefined | DirectSpiral3d Static | Create an Japanese spiral clothoid approximation | |
| createMXCubicAlongArc(localToWorld: Transform, nominalL1: number, nominalR1: number, activeInterval?: Segment1d): undefined | DirectSpiral3d Static | Create an MX Cubic whose nominal length is close to along the curve. | |
| createPolishCubic(localToWorld: Transform, nominalL1: number, nominalR1: number, activeInterval?: Segment1d): undefined | DirectSpiral3d Static | Create a polish cubic | |
| createTruncatedClothoid(spiralType: string, localToWorld: Transform, numXTerm: number, numYTerm: number, originalProperties: TransitionConditionalProperties, nominalL1: number, nominalR1: number, activeInterval: Segment1d): undefined | DirectSpiral3d Static | Create a spiral object which uses numXTerm terms from the clothoid X series and numYTerm from the clothoid Y series. | |
| createWesternAustralian(localToWorld: Transform, nominalL1: number, nominalR1: number, activeInterval?: Segment1d): undefined | DirectSpiral3d Static | Create a Western Australian direct spiral. |
Inherited methods
| Name | Inherited from | Description |
|---|---|---|
| addMappedStrokesToLineString3D(map: StrokeCountMap, linestring: LineString3d): number Inherited | TransitionSpiral3d | Evaluate strokes at fractions indicated in a StrokeCountMap. |
| allTangents(spacePoint: Point3d, options?: TangentOptions): undefined | CurveLocationDetail[] Inherited | TransitionSpiral3d | Return all points P on the curve such that the line containing spacePoint and P is tangent to the curve in |
| 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. |
| closestTangent(spacePoint: Point3d, options?: TangentOptions): undefined | CurveLocationDetail Inherited | TransitionSpiral3d | Return the point P on the curve such that the line containing spacePoint and P is tangent to the curve in |
| collectCurvePrimitives(collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLinestrings: boolean = false): CurvePrimitive[] Inherited | TransitionSpiral3d | Return an array containing only the curve primitives. |
| collectCurvePrimitivesGo(collectorArray: CurvePrimitive[], _smallestPossiblePrimitives: boolean, _explodeLinestrings: boolean = false): 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 | BSplineCurve3d Inherited | TransitionSpiral3d | Construct an offset of the instance curve as viewed in the xy-plane (ignoring z). |
| curveLength(): number Inherited | TransitionSpiral3d | Return the length of the curve. |
| curveLengthBetweenFractions(fraction0: number, fraction1: number): number Inherited | TransitionSpiral3d | Returns a (high accuracy) length of the curve between fractional positions. |
| curveLengthWithFixedIntervalCountQuadrature(fraction0: number, fraction1: number, numInterval: number, numGauss: number = 5): number Inherited | TransitionSpiral3d | Run an integration (with a default Gaussian quadrature) with a fixed fractional step |
| emitTangents(spacePoint: Point3d, announceTangent: (tangent: CurveLocationDetail) => any, options?: TangentOptions): void Inherited | TransitionSpiral3d | Announce all points P on the curve such that the line containing spacePoint and P is tangent to the curve in |
| 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. |
| fractionToCurvature(fraction: number): undefined | number Inherited | TransitionSpiral3d | Returns the (absolute) curvature magnitude. |
| fractionToFrenetFrame(fraction: number, result?: Transform): undefined | Transform Inherited | TransitionSpiral3d | Construct a frenet frame: |
| 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. |
| isPhysicallyClosedCurve(tolerance: number = Geometry.smallMetricDistance, xyOnly: boolean = false): boolean Inherited | TransitionSpiral3d | Whether the start and end points are defined and within tolerance. |
| 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 using clonePartialCurve. |
| rangeBetweenFractionsByCount(fraction0: number, fraction1: number, count: number, transform?: Transform, extrapolationFactor: number = 0.0): Range3d Inherited | TransitionSpiral3d | Returns an approximate range based on a fixed number of evaluations. |
| tryTranslateInPlace(dx: number, dy: number = 0.0, dz: number = 0.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 | |
| curvePrimitiveType Readonly | "transitionSpiral" | String name for schema properties | |
| nominalCurvature1 Accessor ReadOnly | number | Return the nominal end curvature | |
| nominalL1 Accessor ReadOnly | number | Return the nominal distance from inflection to endpoint. | |
| nominalR1 Accessor ReadOnly | number | Return the nominal end radius. |
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
- curve/spiral/DirectSpiral3d.ts Line 46
Last Updated: 24 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.