/** @packageDocumentation * @module Curve */ import { TransitionSpiral3d } from "./TransitionSpiral3d"; import { Segment1d } from "../../geometry3d/Segment1d"; import { AngleSweep } from "../../geometry3d/AngleSweep"; import { Transform } from "../../geometry3d/Transform"; import { LineString3d } from "../LineString3d"; import { Point3d } from "../../geometry3d/Point3dVector3d"; import { Angle } from "../../geometry3d/Angle"; import { Plane3dByOriginAndUnitNormal } from "../../geometry3d/Plane3dByOriginAndUnitNormal"; import { StrokeOptions } from "../StrokeOptions"; import { GeometryHandler, IStrokeHandler } from "../../geometry3d/GeometryHandler"; import { Ray3d } from "../../geometry3d/Ray3d"; import { Plane3dByOriginAndVectors } from "../../geometry3d/Plane3dByOriginAndVectors"; import { Range3d } from "../../geometry3d/Range"; import { GeometryQuery } from "../GeometryQuery"; /** * 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. * @public */ export declare class IntegratedSpiral3d extends TransitionSpiral3d { /** String name for schema properties */ readonly curvePrimitiveType = "transitionSpiral"; /** start and end radii as a Segment1d */ radius01: Segment1d; /** start and end bearings as an AngleSweep */ bearing01: AngleSweep; /** stroked approximation of entire spiral. */ private _globalStrokes; /** stroked approximation of active spiral. * * Same count as global -- possibly overly fine, but it gives some consistency between same clothoid constructed as partial versus complete. * * If no trimming, this points to the same place as the _globalStrokes !!! Don't double transform!!! */ private _activeStrokes?; /** Return the internal stroked form of the (possibly partial) spiral */ get activeStrokes(): LineString3d; private _evaluator; /** Total curve arc length (computed) */ private _arcLength01; /** Curvatures (inverse radii) at start and end */ private _curvature01; /** evaluator for transition */ private constructor(); /** default spiral type name. (clothoid) */ static readonly defaultSpiralType = "clothoid"; /** use the integrated function to return an angle at fractional position. */ globalFractionToBearingRadians(fraction: number): number; /** use the integrated function to return an angle at fractional position. */ globalFractionToCurvature(fraction: number): number; /** Return the bearing at given fraction of the active interval .... */ fractionToBearingRadians(activeFraction: number): number; /** Return the curvature at given fraction of the active interval ... * * The `undefined` result is to match the abstract class -- it cannot actually occur. */ fractionToCurvature(activeFraction: number): number | undefined; private static _gaussFraction; private static _gaussWeight; private static _gaussMapper; /** Initialize class level work arrays. */ static initWorkSpace(): void; /** Evaluate and sum the gauss quadrature formulas to integrate cos(theta), sin(theta) fractional subset of a reference length. * (recall that theta is a nonlinear function of the fraction.) * * This is a single interval of gaussian integration. * * The fraction is on the full spiral (not in the mapped active interval) * @param xyz advancing integrated point. * @param fractionA fraction at start of interval * @param fractionB fraction at end of interval. * @param unitArcLength length of curve for 0 to 1 fractional */ private fullSpiralIncrementalIntegral; /** Recompute strokes */ refreshComputedProperties(): void; /** * Create a transition spiral with radius and bearing conditions. * @param radius01 radius (inverse curvature) at start and end. (radius of zero means straight line) * @param bearing01 bearing angles at start and end. bearings are measured from the x axis, positive clockwise towards y axis * @param activeFractionInterval fractional limits of the active portion of the spiral. * @param localToWorld placement frame. Fractional coordinate 0 is at the origin. */ static createRadiusRadiusBearingBearing(radius01: Segment1d, bearing01: AngleSweep, activeFractionInterval: Segment1d, localToWorld: Transform, typeName?: string): IntegratedSpiral3d | undefined; /** * Create a transition spiral. * * Inputs must provide exactly 4 of the 5 values `[radius0,radius1,bearing0,bearing1,length`. * @param spiralType one of "clothoid", "bloss", "biquadratic", "cosine", "sine". If undefined, "clothoid" is used. * @param radius0 radius (or 0 for tangent to line) at start * @param radius1 radius (or 0 for tangent to line) at end * @param bearing0 bearing, measured CCW from x axis at start. * @param bearing1 bearing, measured CCW from x axis at end. * @param fractionInterval optional fractional interval for an "active" portion of the curve. if omitted, the full [0,1] is used. * @param localToWorld placement transform */ static createFrom4OutOf5(spiralType: string | undefined, radius0: number | undefined, radius1: number | undefined, bearing0: Angle | undefined, bearing1: Angle | undefined, arcLength: number | undefined, fractionInterval: undefined | Segment1d, localToWorld: Transform): IntegratedSpiral3d | undefined; /** Copy all defining data from another spiral. */ setFrom(other: IntegratedSpiral3d): IntegratedSpiral3d; /** Deep clone of this spiral */ clone(): IntegratedSpiral3d; /** Return (if possible) a spiral which is a portion of this curve. */ clonePartialCurve(fractionA: number, fractionB: number): IntegratedSpiral3d | undefined; /** apply `transform` to this spiral's local to world transform. */ tryTransformInPlace(transformA: Transform): boolean; /** Clone with a transform applied */ cloneTransformed(transform: Transform): TransitionSpiral3d; /** Return the spiral start point. */ startPoint(): Point3d; /** return the spiral end point. */ endPoint(): Point3d; /** test if the local to world transform places the spiral xy plane into `plane` */ isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean; /** Return length of the spiral. Because TransitionSpiral is parameterized directly in terms of distance along, this is a simple return value. */ quickLength(): number; /** Return length of the spiral. Because TransitionSpiral is parameterized directly in terms of distance along, this is a simple return value. */ curveLength(): number; /** Return (unsigned) length of the spiral between fractions. Because TransitionSpiral is parameterized directly in terms of distance along, this is a simple return value. */ curveLengthBetweenFractions(fraction0: number, fraction1: number): number; /** Test if `other` is an instance of `TransitionSpiral3d` */ isSameGeometryClass(other: any): boolean; /** Add strokes from this spiral to `dest`. * * Linestrings will usually stroke as just their points. * * If maxEdgeLength is given, this will sub-stroke within the linestring -- not what we want. */ emitStrokes(dest: LineString3d, options?: StrokeOptions): void; /** emit stroke fragments to `dest` handler. */ emitStrokableParts(dest: IStrokeHandler, options?: StrokeOptions): void; /** * return the stroke count required for given options. * @param options StrokeOptions that determine count */ computeStrokeCountForOptions(options?: StrokeOptions): number; /** Reverse the active interval and active strokes. * * Primary defining data remains unchanged !!! */ reverseInPlace(): void; /** Evaluate curve point with respect to fraction. */ fractionToPoint(activeFraction: number, result?: Point3d): Point3d; /** Evaluate curve point and derivative with respect to fraction. */ fractionToPointAndDerivative(activeFraction: number, result?: Ray3d): Ray3d; /** Return the frenet frame at fractional position. */ fractionToFrenetFrame(activeFraction: number, result?: Transform): Transform; /** Return a plane with * * * origin at fractional position along the curve * * vectorU is the first derivative, i.e. tangent vector with length equal to the rate of change with respect to the fraction. * * vectorV is the second derivative, i.e.derivative of vectorU. */ fractionToPointAnd2Derivatives(activeFraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors | undefined; /** Second step of double dispatch: call `handler.handleTransitionSpiral(this)` */ dispatchToGeometryHandler(handler: GeometryHandler): any; /** extend the range by the strokes of the spiral */ extendRange(rangeToExtend: Range3d, transform?: Transform): void; /** compare various coordinate quantities */ isAlmostEqual(other?: GeometryQuery): boolean; } //# sourceMappingURL=IntegratedSpiral3d.d.ts.map