@itwin/core-geometry 5.3.0-dev.9 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -1
- package/lib/cjs/curve/Arc3d.d.ts +15 -1
- package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
- package/lib/cjs/curve/Arc3d.js +31 -2
- package/lib/cjs/curve/Arc3d.js.map +1 -1
- package/lib/cjs/curve/CurveFactory.d.ts +25 -8
- package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
- package/lib/cjs/curve/CurveFactory.js +51 -55
- package/lib/cjs/curve/CurveFactory.js.map +1 -1
- package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.d.ts +10 -13
- package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js +23 -22
- package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/ClothoidSeries.d.ts +10 -6
- package/lib/cjs/curve/spiral/ClothoidSeries.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/ClothoidSeries.js +36 -19
- package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
- package/lib/cjs/curve/spiral/CubicEvaluator.d.ts +7 -6
- package/lib/cjs/curve/spiral/CubicEvaluator.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/CubicEvaluator.js +29 -14
- package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/CzechSpiralEvaluator.d.ts +34 -44
- package/lib/cjs/curve/spiral/CzechSpiralEvaluator.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js +47 -53
- package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.d.ts +2 -2
- package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js +17 -7
- package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/DirectSpiral3d.d.ts +112 -104
- package/lib/cjs/curve/spiral/DirectSpiral3d.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/DirectSpiral3d.js +143 -117
- package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.d.ts +71 -53
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js +99 -66
- package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.d.ts +8 -12
- package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js +11 -13
- package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/NormalizedTransition.d.ts +36 -29
- package/lib/cjs/curve/spiral/NormalizedTransition.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/NormalizedTransition.js +62 -40
- package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
- package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.d.ts +13 -18
- package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js +21 -24
- package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionConditionalProperties.d.ts +41 -27
- package/lib/cjs/curve/spiral/TransitionConditionalProperties.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/TransitionConditionalProperties.js +50 -33
- package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts +45 -34
- package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/TransitionSpiral3d.js +56 -38
- package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/cjs/curve/spiral/XYCurveEvaluator.d.ts +27 -21
- package/lib/cjs/curve/spiral/XYCurveEvaluator.d.ts.map +1 -1
- package/lib/cjs/curve/spiral/XYCurveEvaluator.js +23 -18
- package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.d.ts +96 -98
- package/lib/cjs/geometry3d/GrowableXYArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYArray.js +121 -110
- package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +135 -142
- package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/cjs/geometry3d/GrowableXYZArray.js +165 -160
- package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYCollection.d.ts +51 -34
- package/lib/cjs/geometry3d/IndexedXYCollection.d.ts.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYCollection.js +16 -6
- package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +78 -77
- package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/cjs/geometry3d/IndexedXYZCollection.js +38 -35
- package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.d.ts +27 -7
- package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/cjs/geometry3d/PolygonOps.js +30 -9
- package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
- package/lib/esm/curve/Arc3d.d.ts +15 -1
- package/lib/esm/curve/Arc3d.d.ts.map +1 -1
- package/lib/esm/curve/Arc3d.js +31 -2
- package/lib/esm/curve/Arc3d.js.map +1 -1
- package/lib/esm/curve/CurveFactory.d.ts +25 -8
- package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
- package/lib/esm/curve/CurveFactory.js +51 -55
- package/lib/esm/curve/CurveFactory.js.map +1 -1
- package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.d.ts +10 -13
- package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.d.ts.map +1 -1
- package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js +23 -22
- package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/ClothoidSeries.d.ts +10 -6
- package/lib/esm/curve/spiral/ClothoidSeries.d.ts.map +1 -1
- package/lib/esm/curve/spiral/ClothoidSeries.js +36 -19
- package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
- package/lib/esm/curve/spiral/CubicEvaluator.d.ts +7 -6
- package/lib/esm/curve/spiral/CubicEvaluator.d.ts.map +1 -1
- package/lib/esm/curve/spiral/CubicEvaluator.js +29 -14
- package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/CzechSpiralEvaluator.d.ts +34 -44
- package/lib/esm/curve/spiral/CzechSpiralEvaluator.d.ts.map +1 -1
- package/lib/esm/curve/spiral/CzechSpiralEvaluator.js +47 -53
- package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.d.ts +2 -2
- package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.d.ts.map +1 -1
- package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js +17 -7
- package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.d.ts +112 -104
- package/lib/esm/curve/spiral/DirectSpiral3d.d.ts.map +1 -1
- package/lib/esm/curve/spiral/DirectSpiral3d.js +143 -117
- package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.d.ts +71 -53
- package/lib/esm/curve/spiral/IntegratedSpiral3d.d.ts.map +1 -1
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js +99 -66
- package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.d.ts +8 -12
- package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.d.ts.map +1 -1
- package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js +11 -13
- package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/NormalizedTransition.d.ts +36 -29
- package/lib/esm/curve/spiral/NormalizedTransition.d.ts.map +1 -1
- package/lib/esm/curve/spiral/NormalizedTransition.js +62 -40
- package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
- package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.d.ts +13 -18
- package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.d.ts.map +1 -1
- package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js +21 -24
- package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionConditionalProperties.d.ts +41 -27
- package/lib/esm/curve/spiral/TransitionConditionalProperties.d.ts.map +1 -1
- package/lib/esm/curve/spiral/TransitionConditionalProperties.js +50 -33
- package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts +45 -34
- package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
- package/lib/esm/curve/spiral/TransitionSpiral3d.js +56 -38
- package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
- package/lib/esm/curve/spiral/XYCurveEvaluator.d.ts +27 -21
- package/lib/esm/curve/spiral/XYCurveEvaluator.d.ts.map +1 -1
- package/lib/esm/curve/spiral/XYCurveEvaluator.js +23 -18
- package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.d.ts +96 -98
- package/lib/esm/geometry3d/GrowableXYArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYArray.js +122 -111
- package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts +135 -142
- package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
- package/lib/esm/geometry3d/GrowableXYZArray.js +165 -160
- package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYCollection.d.ts +51 -34
- package/lib/esm/geometry3d/IndexedXYCollection.d.ts.map +1 -1
- package/lib/esm/geometry3d/IndexedXYCollection.js +14 -5
- package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +78 -77
- package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
- package/lib/esm/geometry3d/IndexedXYZCollection.js +38 -35
- package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.d.ts +27 -7
- package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
- package/lib/esm/geometry3d/PolygonOps.js +30 -9
- package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DirectSpiral3d.js","sourceRoot":"","sources":["../../../../src/curve/spiral/DirectSpiral3d.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,E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CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC;mBAC9D,QAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC;mBAC5D,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,KAAK,CAAC,YAAY,CAAC;mBACnD,IAAI,CAAC,uBAAuB,CAAC,aAAa,CAAC,KAAK,CAAC,uBAAuB,CAAC;mBACzE,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACvD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Curve\n */\nimport { Geometry } from \"../../Geometry\";\nimport { Angle } from \"../../geometry3d/Angle\";\nimport { GeometryHandler, IStrokeHandler } from \"../../geometry3d/GeometryHandler\";\nimport { Plane3dByOriginAndUnitNormal } from \"../../geometry3d/Plane3dByOriginAndUnitNormal\";\nimport { Plane3dByOriginAndVectors } from \"../../geometry3d/Plane3dByOriginAndVectors\";\nimport { Point3d } from \"../../geometry3d/Point3dVector3d\";\nimport { Ray3d } from \"../../geometry3d/Ray3d\";\nimport { Segment1d } from \"../../geometry3d/Segment1d\";\nimport { Transform } from \"../../geometry3d/Transform\";\nimport { CurveLengthContext } from \"../internalContexts/CurveLengthContext\";\nimport { LineString3d } from \"../LineString3d\";\nimport { StrokeOptions } from \"../StrokeOptions\";\nimport { AustralianRailCorpXYEvaluator } from \"./AustralianRailCorpXYEvaluator\";\nimport { ClothoidSeriesRLEvaluator } from \"./ClothoidSeries\";\nimport { CzechSpiralEvaluator, ItalianSpiralEvaluator } from \"./CzechSpiralEvaluator\";\nimport { DirectHalfCosineSpiralEvaluator } from \"./DirectHalfCosineSpiralEvaluator\";\nimport { MXCubicAlongArcEvaluator } from \"./MXCubicAlongArcSpiralEvaluator\";\nimport { PolishCubicEvaluator } from \"./PolishCubicSpiralEvaluator\";\nimport { TransitionConditionalProperties } from \"./TransitionConditionalProperties\";\nimport { TransitionSpiral3d } from \"./TransitionSpiral3d\";\nimport { XYCurveEvaluator } from \"./XYCurveEvaluator\";\n\n/**\n* DirectSpiral3d acts like a TransitionSpiral3d for serialization purposes, but implements spiral types that have \"direct\" xy calculations without the integrations required\n* for IntegratedSpiral3d.\n* * Each DirectSpiral3d carries an XYCurveEvaluator to give it specialized behavior.\n* * Direct spirals that flow through serialization to native imodel02 are create with these static methods:\n* * createArema\n* * createJapaneseCubic\n* * createAustralianRail\n* * createDirectHalfCosine\n* * createChineseCubic\n* * createCzechCubic\n* * createPolishCubic\n* * createItalian\n* * createWesternAustralian\n* @public\n*/\nexport class DirectSpiral3d extends TransitionSpiral3d {\n\n /** String name for schema properties */\n\n public readonly curvePrimitiveType = \"transitionSpiral\";\n\n /** stroked approximation of entire spiral. This is AFTER the localToWorld transform ... */\n private _globalStrokes: LineString3d;\n /** stroked approximation of active spiral. This is AFTER the localToWorld transfomr ...\n * * Same count as global -- possibly overly fine, but it gives some consistency between same clothoid constructed as partial versus complete.\n * * If no trimming, this points to the same place as the _globalStrokes !!! Don't double transform!!!\n */\n private _activeStrokes?: LineString3d;\n /** Return the internal stroked form of the (possibly partial) spiral */\n public get activeStrokes(): LineString3d { return this._activeStrokes !== undefined ? this._activeStrokes : this._globalStrokes; }\n\n private _nominalL1: number;\n private _nominalR1: number;\n private _evaluator: XYCurveEvaluator;\n\n /** Return the nominal end radius. */\n public get nominalR1(): number { return this._nominalR1; }\n /** Return the nominal distance from inflection to endpoint. */\n public get nominalL1(): number { return this._nominalL1; }\n /** Return the nominal end curvature */\n public get nominalCurvature1(): number { return TransitionSpiral3d.radiusToCurvature(this._nominalR1); }\n /** Return the low level evaluator\n * @internal\n */\n public get evaluator(): XYCurveEvaluator { return this._evaluator; }\n\n // constructor demands radius1 and distance1 for nominal construction.\n // caller is responsible for managing intervals of partial spiral\n constructor(\n localToWorld: Transform,\n spiralType: string | undefined,\n originalProperties: TransitionConditionalProperties | undefined,\n nominalL1: number,\n nominalR1: number,\n activeFractionInterval: Segment1d | undefined,\n evaluator: XYCurveEvaluator) {\n super(spiralType, localToWorld, activeFractionInterval, originalProperties);\n this._nominalL1 = nominalL1;\n this._nominalR1 = nominalR1;\n this._evaluator = evaluator;\n this._globalStrokes = LineString3d.create();\n this._activeStrokes = LineString3d.create();\n // initialize for compiler -- but this will be recomputed in refreshComputeProperties ...\n this.refreshComputedProperties();\n }\n /**\n * Compute stroke data in an interval.\n * @param strokes strokes to clear and refill.\n * @param fraction0 start fraction\n * @param fraction1 end fraction\n */\n private computeStrokes(strokes: LineString3d, fractionA: number, fractionB: number, numInterval: number, applyLocalToWorld: boolean = true) {\n if (numInterval < 1)\n numInterval = 1;\n strokes.clear();\n strokes.ensureEmptyUVParams();\n strokes.ensureEmptyFractions();\n const distances = strokes.packedUVParams!;\n const nominalIntervalLength = Math.abs(fractionB - fractionA) * this._nominalL1;\n for (let i = 0; i <= numInterval; i++) {\n const fraction = Geometry.interpolate(fractionA, i / numInterval, fractionB);\n const nominalDistanceAlong = fraction * nominalIntervalLength;\n strokes.packedPoints.pushXYZ(this._evaluator.fractionToX(fraction),\n this._evaluator.fractionToY(fraction), 0);\n distances.pushXY(fraction, nominalDistanceAlong); // the second distance will be updated below\n }\n if (applyLocalToWorld)\n strokes.tryTransformInPlace (this._localToWorld);\n let fraction0 = distances.getXAtUncheckedPointIndex(0);\n let trueDistance0 = distances.getYAtUncheckedPointIndex(0); // whatever was assigned as start distance is fine\n let trueDistance1, fraction1;\n for (let i = 1; i <= numInterval; i++) {\n fraction1 = distances.getXAtUncheckedPointIndex(i);\n trueDistance1 = trueDistance0 + this._evaluator.integrateDistanceBetweenFractions(fraction0, fraction1);\n distances.setXYAtCheckedPointIndex(i, fraction1, trueDistance1);\n fraction0 = fraction1;\n trueDistance0 = trueDistance1;\n }\n\n }\n /** Recompute strokes */\n public override refreshComputedProperties() {\n const sweepRadians = this.nominalL1 / (2.0 * this.nominalR1);\n const radiansStep = 0.02;\n const numInterval = StrokeOptions.applyAngleTol(undefined, 4, sweepRadians, radiansStep);\n this.computeStrokes(this._globalStrokes, 0, 1, numInterval);\n const numActiveInterval = Math.ceil(this._activeFractionInterval.absoluteDelta() * numInterval);\n this._activeStrokes = LineString3d.create();\n this.computeStrokes(this._activeStrokes, this._activeFractionInterval.x0, this._activeFractionInterval.x1,\n numActiveInterval);\n }\n /**\n * Create a spiral object which uses numXTerm terms from the clothoid X series and numYTerm from the clothoid Y series.\n * @param numXTerm number of terms to use from X series\n * @param numYTerm number of terms to use from Y series\n * @param localToWorld placement frame. Inflection point is at origin, initial direction is along x axis.\n * @param nominalL1 design distance from inflection to end point.\n * @param nominalR1 design radius at end point.\n * @param activeInterval active interval (as fractions of nominalL1 !!!)\n */\n public static createTruncatedClothoid(\n spiralType: string,\n localToWorld: Transform,\n numXTerm: number, numYTerm: number,\n originalProperties: TransitionConditionalProperties | undefined,\n nominalL1: number, nominalR1: number,\n activeInterval: Segment1d | undefined): DirectSpiral3d | undefined {\n if (numXTerm < 1)\n numXTerm = 1;\n if (numYTerm < 1)\n numYTerm = 1;\n const evaluator = new ClothoidSeriesRLEvaluator(nominalL1, 1.0 / (2.0 * nominalL1 * nominalR1), numXTerm, numYTerm);\n return new DirectSpiral3d(\n localToWorld.clone(),\n spiralType,\n originalProperties,\n nominalL1, nominalR1,\n activeInterval ? activeInterval.clone() : Segment1d.create(0, 1), evaluator);\n }\n /**\n * Create an Japanese spiral clothoid approximation\n * * X is 1 terms of the clothoid series as a function of nominal distance along.\n * * Y is 1 terms f the clothoid series as a function of nominal distance along.\n * * Remark: This is identical to the ChineseCubic\n * @param localToWorld axes with inflection at origin, tangent along x axis\n * @param nominalL1 nominal length as used in series LR terms.\n * @param nominalR1 nominal final radius as used in series LR terms\n * @param activeInterval fractional interval with (0, nominalL1) range for nominal distance along\n */\n public static createJapaneseCubic(\n localToWorld: Transform,\n nominalL1: number,\n nominalR1: number,\n activeInterval?: Segment1d): DirectSpiral3d | undefined {\n return this.createTruncatedClothoid(\"JapaneseCubic\", localToWorld, 1, 1, undefined, nominalL1, nominalR1, activeInterval);\n }\n /**\n * Create a czech cubic.\n * This is y= m*x^3 with\n * * x any point on the x axis\n * * `fraction` along the spiral goes to `x = fraction * L`\n * * m is gamma / (6RL)\n * * 1/(6RL) is the leading term of the sine series.\n * * `gamma = 2R/sqrt (4RR-LL)` pushes y up a little bit to simulate the lost series terms.\n * @param localToWorld\n * @param nominalLx nominal length along x axis\n * @param nominalR1\n * @param activeInterval\n */\n public static createCzechCubic(\n localToWorld: Transform,\n nominalLx: number,\n nominalR1: number,\n activeInterval?: Segment1d): DirectSpiral3d | undefined {\n const evaluator = CzechSpiralEvaluator.create(nominalLx, nominalR1);\n if (evaluator === undefined)\n return undefined;\n return new DirectSpiral3d(\n localToWorld.clone(),\n \"Czech\",\n undefined,\n nominalLx, nominalR1,\n activeInterval ? activeInterval.clone() : Segment1d.create(0, 1), evaluator);\n }\n /**\n * Create an italian spiral\n * This is y= m*x^3 with\n * * x any point on the x axis\n * * `fraction` along the spiral goes to `x = fraction * L`\n * * m is gamma / (6RL)\n * * 1/(6RL) is the leading term of the sine series.\n * * `gamma = 2R/sqrt (4RR-LL)` pushes y up a little bit to simulate the lost series terms.\n * * L in gamma and m is the\n * @param localToWorld\n * @param nominalL1 nominal length along the spiral\n * @param nominalR1\n * @param activeInterval\n */\n public static createItalian(\n localToWorld: Transform,\n nominalL1: number,\n nominalR1: number,\n activeInterval?: Segment1d): DirectSpiral3d | undefined {\n const evaluator = ItalianSpiralEvaluator.create(nominalL1, nominalR1);\n if (evaluator === undefined)\n return undefined;\n return new DirectSpiral3d(\n localToWorld.clone(),\n \"Italian\",\n undefined,\n nominalL1, nominalR1,\n activeInterval ? activeInterval.clone() : Segment1d.create(0, 1), evaluator);\n }\n\n /**\n * Create an MX Cubic whose nominal length is close to along the curve.\n * This is y= m*x^3 with\n * * m is 1/ (6RL1)\n * * 1/(6RL) is the leading term of the sine series.\n * * L1 is an along-the-x-axis distance that is slightly LESS THAN the nominal length\n * * x is axis position that is slightly LESS than nominal distance along\n * * L1, x use the approximation `x = s * ( 1 - s^4/ (40 R R L L))\n * @param localToWorld\n * @param nominalL1\n * @param nominalR1\n * @param activeInterval\n */\n public static createMXCubicAlongArc(\n localToWorld: Transform,\n nominalL1: number,\n nominalR1: number,\n activeInterval?: Segment1d): DirectSpiral3d | undefined {\n const evaluator = MXCubicAlongArcEvaluator.create(nominalL1, nominalR1);\n if (evaluator === undefined)\n return undefined;\n return new DirectSpiral3d(\n localToWorld.clone(),\n \"MXCubicAlongArc\",\n undefined,\n nominalL1, nominalR1,\n activeInterval ? activeInterval.clone() : Segment1d.create(0, 1), evaluator);\n }\n\n /**\n * Create a polish cubic\n * This is y= m*x^3 with\n * * m is 1/ (6RL)\n * * 1/(6RL) is the leading term of the sine series.\n * * L is nominal length\n * * R is nominal end radius.\n * * x ranges up to the x axis distance for which the polish distance series produces f(x)=L\n * * The support class PolishCubicEvaluator has static methods for the distance series and its inversion.\n */\n public static createPolishCubic(\n localToWorld: Transform,\n nominalL1: number,\n nominalR1: number,\n activeInterval?: Segment1d): DirectSpiral3d | undefined {\n const evaluator = PolishCubicEvaluator.create(nominalL1, nominalR1);\n if (evaluator === undefined)\n return undefined;\n return new DirectSpiral3d(\n localToWorld.clone(),\n \"PolishCubic\",\n undefined,\n nominalL1, nominalR1,\n activeInterval ? activeInterval.clone() : Segment1d.create(0, 1), evaluator);\n }\n\n /**\n * Create an AustralianRailCorp spiral\n * This is y= m*x^3 with\n * * x any point on the x axis\n * * `fraction` along the spiral goes to `x = fraction * L`\n * * m is gamma / (6RL)\n * * 1/(6RL) is the leading term of the sine series.\n * * `gamma = 2R/sqrt (4RR-LL)` pushes y up a little bit to simulate the lost series terms.\n * @param localToWorld\n * @param nominalL1\n * @param nominalR1\n * @param activeInterval\n */\n public static createAustralianRail(\n localToWorld: Transform,\n nominalL1: number,\n nominalR1: number,\n activeInterval?: Segment1d): DirectSpiral3d | undefined {\n const evaluator = AustralianRailCorpXYEvaluator.create(nominalL1, nominalR1);\n if (evaluator === undefined)\n return undefined;\n return new DirectSpiral3d(\n localToWorld.clone(),\n \"AustralianRailCorp\",\n undefined,\n nominalL1, nominalR1,\n activeInterval ? activeInterval.clone() : Segment1d.create(0, 1), evaluator);\n }\n\n public static createDirectHalfCosine(\n localToWorld: Transform,\n nominalL1: number,\n nominalR1: number,\n activeInterval?: Segment1d): DirectSpiral3d | undefined {\n return new this(localToWorld, \"HalfCosine\", undefined, nominalL1, nominalR1, activeInterval,\n new DirectHalfCosineSpiralEvaluator(nominalL1, nominalR1));\n }\n /**\n * Create an Arema spiral clothoid approximation\n * * X is 2 terms of the clothoid series as a function of nominal distance along\n * * Y is 2 terms f the clothoid series as a function of nominal distance along\n * * Remark: This is identical to the ChineseCubic\n * @param localToWorld axes with inflection at origin, tangent along x axis\n * @param nominalL1 nominal length as used in series LR terms.\n * @param nominalR1 nominal final radius as used in series LR terms\n * @param activeInterval fractional interval with (0, nominalL1) range for nominal distance along\n */\n public static createArema(\n localToWorld: Transform,\n nominalL1: number,\n nominalR1: number,\n activeInterval?: Segment1d): DirectSpiral3d | undefined {\n return this.createTruncatedClothoid(\"Arema\", localToWorld, 2, 2, undefined, nominalL1, nominalR1, activeInterval);\n }\n\n /**\n * Create a Chinese clothoid approximation\n * * X is 2 terms of the clothoid series as a function of nominal distance along\n * * Y is 2 terms f the clothoid series as a function of nominal distance along\n * * Remark: This is identical to the Arema spiral\n * @param localToWorld axes with inflection at origin, tangent along x axis\n * @param nominalL1 nominal length as used in series LR terms.\n * @param nominalR1 nominal final radius as used in series LR terms\n * @param activeInterval fractional interval with (0, nominalL1) range for nominal distance along\n */\n public static createChineseCubic(\n localToWorld: Transform,\n nominalL1: number,\n nominalR1: number,\n activeInterval?: Segment1d): DirectSpiral3d | undefined {\n return this.createTruncatedClothoid(\"ChineseCubic\", localToWorld, 2, 2, undefined, nominalL1, nominalR1, activeInterval);\n }\n /**\n * Create a Western Australian direct spiral.\n * * X is 2 terms of the clothoid series as a function of distance along\n * * Y is 1 term (cubic in nominal distance along)\n * @param localToWorld axes with inflection at origin, tangent along x axis\n * @param nominalL1 nominal length as used in series LR terms.\n * @param nominalR1 nominal final radius as used in series LR terms\n * @param activeInterval fractional interval with (0, nominalL1) range for nominal distance along\n */\n public static createWesternAustralian(\n localToWorld: Transform,\n nominalL1: number,\n nominalR1: number,\n activeInterval?: Segment1d): DirectSpiral3d | undefined {\n return this.createTruncatedClothoid(\"WesternAustralian\", localToWorld, 2, 1, undefined, nominalL1, nominalR1, activeInterval);\n }\n /**\n * Create (if possible) a DirectSpiral3d, applying various strict conditions appropriate to the spiral type.\n * The parameter list includes extraneous values in order to directly match IntegratedSpiral3d.create, which has greater flexibility about\n * mixtures of values.\n * * IMPORTANT RESTRICTIONS\n * * Direct spirals must have the inflection at the origin of their coordinate system, aligned with the x axis.\n * * hence bearing0 = 0\n * * hence radius0 = 0\n * * bearing1 is ignored\n * * radius1 must be given.\n * * arcLength must be given,\n * @param spiralType one of the types in `DirectSpiralTypeNames`\n * @param radius0 radius (or 0 for tangent to line) at start. Must be ZERO or UNDEFINED\n * @param radius1 radius (or 0 for tangent to line) at end.\n * @param bearing0 bearing, measured CCW from x axis at start. Must be ZERO or UNDEFINED\n * @param bearing1 bearing, measured CCW from x axis at end. IGNORED.\n * @param fractionInterval optional fractional interval for an \"active\" portion of the curve. if omitted, the full [0,1] is used.\n * @param localToWorld placement transform\n */\n public static createFromLengthAndRadius(\n spiralType: string,\n radius0: number | undefined,\n radius1: number | undefined,\n bearing0: Angle | undefined,\n _bearing1: Angle | undefined,\n arcLength: number | undefined,\n activeInterval: undefined | Segment1d,\n localToWorld: Transform): TransitionSpiral3d | undefined {\n if (bearing0 !== undefined && !bearing0.isAlmostZero)\n return undefined;\n if (radius0 !== undefined && !Geometry.isSmallMetricDistance(radius0))\n return undefined;\n if (radius1 === undefined || Geometry.isSmallMetricDistance(radius1))\n return undefined;\n if (arcLength === undefined)\n return undefined;\n if (Geometry.equalStringNoCase(spiralType, \"Arema\"))\n return this.createArema(localToWorld, arcLength, radius1, activeInterval);\n if (Geometry.equalStringNoCase(spiralType, \"ChineseCubic\"))\n return this.createChineseCubic(localToWorld, arcLength, radius1, activeInterval);\n if (Geometry.equalStringNoCase(spiralType, \"JapaneseCubic\"))\n return this.createJapaneseCubic(localToWorld, arcLength, radius1, activeInterval);\n if (Geometry.equalStringNoCase(spiralType, \"HalfCosine\"))\n return this.createDirectHalfCosine(localToWorld, arcLength, radius1, activeInterval);\n if (Geometry.equalStringNoCase(spiralType, \"Czech\"))\n return this.createCzechCubic(localToWorld, arcLength, radius1, activeInterval);\n if (Geometry.equalStringNoCase(spiralType, \"Italian\"))\n return this.createItalian(localToWorld, arcLength, radius1, activeInterval);\n if (Geometry.equalStringNoCase(spiralType, \"AustralianRailCorp\"))\n return this.createAustralianRail(localToWorld, arcLength, radius1, activeInterval);\n if (Geometry.equalStringNoCase(spiralType, \"MXCubicAlongArc\"))\n return this.createMXCubicAlongArc(localToWorld, arcLength, radius1, activeInterval);\n if (Geometry.equalStringNoCase(spiralType, \"WesternAustralian\"))\n return this.createWesternAustralian(localToWorld, arcLength, radius1, activeInterval);\n if (Geometry.equalStringNoCase(spiralType, \"PolishCubic\"))\n return this.createPolishCubic(localToWorld, arcLength, radius1, activeInterval);\n return undefined;\n }\n /** Deep clone of this spiral */\n public override clone(): DirectSpiral3d {\n return new DirectSpiral3d(\n this.localToWorld.clone(),\n this._spiralType,\n this.designProperties?.clone(),\n this._nominalL1,\n this._nominalR1,\n this._activeFractionInterval?.clone(),\n this._evaluator.clone());\n }\n\n /** apply `transform` to this spiral's local to world transform. */\n public tryTransformInPlace(transformA: Transform): boolean {\n const rigidData = this.applyRigidPartOfTransform(transformA);\n if (rigidData !== undefined) {\n this._nominalL1 *= rigidData.scale;\n this._nominalR1 *= rigidData.scale;\n this.evaluator.scaleInPlace(rigidData.scale);\n }\n this.refreshComputedProperties();\n return true;\n }\n\n /** Return the spiral start point. */\n public override startPoint(result?: Point3d): Point3d {\n return this.activeStrokes.startPoint(result);\n }\n /** return the spiral end point. */\n public override endPoint(result?: Point3d): Point3d {\n return this.activeStrokes.endPoint(result);\n }\n /** test if the local to world transform places the spiral xy plane into `plane` */\n public isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean {\n return plane.isPointInPlane(this.localToWorld.origin as Point3d)\n && Geometry.isSameCoordinate(0.0, this.localToWorld.matrix.dotColumnX(plane.getNormalRef()))\n && Geometry.isSameCoordinate(0.0, this.localToWorld.matrix.dotColumnY(plane.getNormalRef()));\n }\n /** Return quick length of the spiral.\n * The tangent vector of a true clothoid is length 1 everywhere, so simple proportion of nominalL1 is a good approximation.\n */\n public quickLength() {\n const distanceData = this._globalStrokes.packedUVParams!;\n const n = distanceData.length;\n return distanceData.getYAtUncheckedPointIndex(n - 1);\n }\n /** Return length of the spiral.\n * * True length is stored at back of uvParams . . .\n */\n // use the generic integrator ... public override curveLength() { return this.quickLength(); }\n /** Test if `other` is an instance of `TransitionSpiral3d` */\n public isSameGeometryClass(other: any): boolean { return other instanceof DirectSpiral3d; }\n /** Add strokes from this spiral to `dest`.\n * * Linestrings will usually stroke as just their points.\n * * If maxEdgeLength is given, this will sub-stroke within the linestring -- not what we want.\n */\n public emitStrokes(dest: LineString3d, options?: StrokeOptions): void { this.activeStrokes.emitStrokes(dest, options); }\n /** emit stroke fragments to `dest` handler. */\n public emitStrokableParts(dest: IStrokeHandler, options?: StrokeOptions): void {\n const n = this.computeStrokeCountForOptions(options);\n const activeStrokes = this.activeStrokes;\n dest.startParentCurvePrimitive(this);\n\n // hack: specify the extended range so we can compute length of an extended spiral\n let globalFraction0 = 0.0;\n let globalFraction1 = 1.0;\n if (dest instanceof CurveLengthContext) {\n if (dest.getFraction0 < 0.0)\n globalFraction0 = dest.getFraction0;\n if (dest.getFraction1 > 1.0)\n globalFraction1 = dest.getFraction1;\n }\n\n if (n <= activeStrokes.numPoints())\n dest.announceIntervalForUniformStepStrokes(this, 2 * activeStrokes.numPoints(), globalFraction0, globalFraction1);\n else\n dest.announceIntervalForUniformStepStrokes(this, n, globalFraction0, globalFraction1);\n\n dest.endParentCurvePrimitive(this);\n }\n\n /**\n * return the stroke count required for given options.\n * @param options StrokeOptions that determine count\n */\n\n public computeStrokeCountForOptions(options?: StrokeOptions): number {\n let numStroke;\n const nominalRadians = this._nominalL1 / (2.0 * this._nominalR1);\n if (options) {\n const rMin = Math.abs(this._nominalR1);\n numStroke = options.applyTolerancesToArc(rMin, nominalRadians);\n numStroke = options.applyMaxEdgeLength(numStroke, this.quickLength());\n numStroke = options.applyMinStrokesPerPrimitive(numStroke);\n } else {\n numStroke = StrokeOptions.applyAngleTol(undefined, 4, nominalRadians, 0.02);\n }\n numStroke = Math.ceil(this._activeFractionInterval.absoluteDelta() * numStroke);\n return numStroke;\n }\n\n /** Reverse the active interval and active strokes.\n * * Primary defining data remains unchanged !!!\n */\n\n public reverseInPlace(): void {\n this._activeFractionInterval.reverseInPlace();\n if (this._activeStrokes === undefined)\n this._activeStrokes = this._globalStrokes.clone();\n this._activeStrokes.reverseInPlace();\n }\n /** Evaluate curve point with respect to fraction. */\n public fractionToPoint(activeFraction: number, result?: Point3d): Point3d {\n const globalFraction = this._activeFractionInterval.fractionToPoint(activeFraction);\n result = this._evaluator.fractionToPoint(globalFraction, result);\n this.localToWorld.multiplyPoint3d(result, result);\n return result;\n }\n /** Evaluate curve point and derivative with respect to fraction. */\n public fractionToPointAndDerivative(activeFraction: number, result?: Ray3d): Ray3d {\n const globalFraction = this._activeFractionInterval.fractionToPoint(activeFraction);\n result = this._evaluator.fractionToPointAndDerivative(globalFraction, result);\n result.direction.scaleInPlace(this._activeFractionInterval.signedDelta());\n result.transformInPlace(this.localToWorld);\n return result;\n }\n\n /** Return a plane with\n *\n * * origin at fractional position along the curve\n * * vectorU is the first derivative, i.e. tangent vector with length equal to the rate of change with respect to the fraction.\n * * vectorV is the second derivative, i.e.derivative of vectorU.\n */\n\n public fractionToPointAnd2Derivatives(activeFraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors | undefined {\n const globalFraction = this._activeFractionInterval.fractionToPoint(activeFraction);\n result = this._evaluator.fractionToPointAnd2Derivatives(globalFraction, result);\n const a = this._activeFractionInterval.signedDelta();\n result.vectorU.scaleInPlace(a);\n result.vectorV.scaleInPlace(a * a);\n result.transformInPlace(this.localToWorld);\n return result;\n }\n /** Second step of double dispatch: call `handler.handleTransitionSpiral(this)` */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleTransitionSpiral(this);\n }\n /** compare various coordinate quantities */\n public override isAlmostEqual(other: any): boolean {\n if (other instanceof DirectSpiral3d) {\n return Geometry.isSameCoordinate(this._nominalL1, other._nominalL1)\n && Geometry.isSameCoordinate(this._nominalR1, other._nominalR1)\n && this.localToWorld.isAlmostEqual(other.localToWorld)\n && this._activeFractionInterval.isAlmostEqual(other._activeFractionInterval)\n && this._evaluator.isAlmostEqual(other._evaluator);\n }\n return false;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"DirectSpiral3d.js","sourceRoot":"","sources":["../../../../src/curve/spiral/DirectSpiral3d.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO1C,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OA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AC,UAAU,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACvD,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Curve\n */\nimport { Geometry } from \"../../Geometry\";\nimport { Angle } from \"../../geometry3d/Angle\";\nimport { GeometryHandler, IStrokeHandler } from \"../../geometry3d/GeometryHandler\";\nimport { Plane3dByOriginAndUnitNormal } from \"../../geometry3d/Plane3dByOriginAndUnitNormal\";\nimport { Plane3dByOriginAndVectors } from \"../../geometry3d/Plane3dByOriginAndVectors\";\nimport { Point3d } from \"../../geometry3d/Point3dVector3d\";\nimport { Ray3d } from \"../../geometry3d/Ray3d\";\nimport { Segment1d } from \"../../geometry3d/Segment1d\";\nimport { Transform } from \"../../geometry3d/Transform\";\nimport { CurveLengthContext } from \"../internalContexts/CurveLengthContext\";\nimport { LineString3d } from \"../LineString3d\";\nimport { StrokeOptions } from \"../StrokeOptions\";\nimport { AustralianRailCorpXYEvaluator } from \"./AustralianRailCorpXYEvaluator\";\nimport { ClothoidSeriesRLEvaluator } from \"./ClothoidSeries\";\nimport { CzechSpiralEvaluator, ItalianSpiralEvaluator } from \"./CzechSpiralEvaluator\";\nimport { DirectHalfCosineSpiralEvaluator } from \"./DirectHalfCosineSpiralEvaluator\";\nimport { MXCubicAlongArcEvaluator } from \"./MXCubicAlongArcSpiralEvaluator\";\nimport { PolishCubicEvaluator } from \"./PolishCubicSpiralEvaluator\";\nimport { TransitionConditionalProperties } from \"./TransitionConditionalProperties\";\nimport { TransitionSpiral3d } from \"./TransitionSpiral3d\";\nimport { XYCurveEvaluator } from \"./XYCurveEvaluator\";\n\n/**\n* DirectSpiral3d acts like a TransitionSpiral3d for serialization purposes, but implements spiral types that have\n* \"direct\" xy calculations without the integrations required for IntegratedSpiral3d.\n* * Each DirectSpiral3d carries an XYCurveEvaluator to give it specialized behavior.\n* * Direct spirals that flow through serialization to native imodel02 are created with these static methods:\n* * createArema\n* * createJapaneseCubic\n* * createAustralianRail\n* * createDirectHalfCosine\n* * createChineseCubic\n* * createCzechCubic\n* * createPolishCubic\n* * createItalian\n* * createWesternAustralian\n* @public\n*/\nexport class DirectSpiral3d extends TransitionSpiral3d {\n /** String name for schema properties. */\n public readonly curvePrimitiveType = \"transitionSpiral\";\n /** Stroked approximation of entire spiral. This is AFTER the localToWorld transform. */\n private _globalStrokes: LineString3d;\n /**\n * Stroked approximation of active spiral. This is AFTER the localToWorld transform.\n * * Same count as global; possibly overly fine, but it gives some consistency between same clothoid constructed as\n * partial versus complete.\n * * If no trimming, this points to the same place as the _globalStrokes. DO NOT double transform.\n */\n private _activeStrokes?: LineString3d;\n /** Return the internal stroked form of the (possibly partial) spiral. */\n public get activeStrokes(): LineString3d {\n return this._activeStrokes !== undefined ? this._activeStrokes : this._globalStrokes;\n }\n private _nominalL1: number;\n private _nominalR1: number;\n private _evaluator: XYCurveEvaluator;\n /** Return the nominal end radius. */\n public get nominalR1(): number {\n return this._nominalR1;\n }\n /** Return the nominal distance from inflection to endpoint. */\n public get nominalL1(): number {\n return this._nominalL1;\n }\n /** Return the nominal end curvature */\n public get nominalCurvature1(): number {\n return TransitionSpiral3d.radiusToCurvature(this._nominalR1);\n }\n /**\n * Return the low level evaluator.\n * @internal\n */\n public get evaluator(): XYCurveEvaluator {\n return this._evaluator;\n }\n // constructor demands radius1 and distance1 for nominal construction.\n // caller is responsible for managing intervals of partial spiral.\n public constructor(\n localToWorld: Transform,\n spiralType: string | undefined,\n originalProperties: TransitionConditionalProperties | undefined,\n nominalL1: number,\n nominalR1: number,\n activeFractionInterval: Segment1d | undefined,\n evaluator: XYCurveEvaluator,\n ) {\n super(spiralType, localToWorld, activeFractionInterval, originalProperties);\n this._nominalL1 = nominalL1;\n this._nominalR1 = nominalR1;\n this._evaluator = evaluator;\n this._globalStrokes = LineString3d.create();\n this._activeStrokes = LineString3d.create();\n // initialize for compiler; but this will be recomputed in refreshComputeProperties\n this.refreshComputedProperties();\n }\n /**\n * Compute stroke data in an interval.\n * @param strokes strokes to clear and refill.\n * @param fractionA start fraction.\n * @param fractionB end fraction.\n * @param numInterval number of intervals.\n * @param applyLocalToWorld if true, apply the localToWorld transform.\n */\n private computeStrokes(\n strokes: LineString3d, fractionA: number, fractionB: number, numInterval: number, applyLocalToWorld: boolean = true,\n ): void {\n if (numInterval < 1)\n numInterval = 1;\n strokes.clear();\n strokes.ensureEmptyUVParams();\n strokes.ensureEmptyFractions();\n const distances = strokes.packedUVParams!;\n const nominalIntervalLength = Math.abs(fractionB - fractionA) * this._nominalL1;\n for (let i = 0; i <= numInterval; i++) {\n const fraction = Geometry.interpolate(fractionA, i / numInterval, fractionB);\n const nominalDistanceAlong = fraction * nominalIntervalLength;\n strokes.packedPoints.pushXYZ(this._evaluator.fractionToX(fraction), this._evaluator.fractionToY(fraction), 0);\n distances.pushXY(fraction, nominalDistanceAlong); // the second distance will be updated below\n }\n if (applyLocalToWorld)\n strokes.tryTransformInPlace(this._localToWorld);\n let fraction0 = distances.getXAtUncheckedPointIndex(0);\n let trueDistance0 = distances.getYAtUncheckedPointIndex(0); // whatever was assigned as start distance is fine\n let trueDistance1, fraction1;\n for (let i = 1; i <= numInterval; i++) {\n fraction1 = distances.getXAtUncheckedPointIndex(i);\n trueDistance1 = trueDistance0 + this._evaluator.integrateDistanceBetweenFractions(fraction0, fraction1);\n distances.setXYAtCheckedPointIndex(i, fraction1, trueDistance1);\n fraction0 = fraction1;\n trueDistance0 = trueDistance1;\n }\n }\n /** Recompute strokes. */\n public override refreshComputedProperties() {\n const sweepRadians = this.nominalL1 / (2.0 * this.nominalR1);\n const radiansStep = 0.02;\n const numInterval = StrokeOptions.applyAngleTol(undefined, 4, sweepRadians, radiansStep);\n this.computeStrokes(this._globalStrokes, 0, 1, numInterval);\n const numActiveInterval = Math.ceil(this._activeFractionInterval.absoluteDelta() * numInterval);\n this._activeStrokes = LineString3d.create();\n this.computeStrokes(\n this._activeStrokes, this._activeFractionInterval.x0, this._activeFractionInterval.x1, numActiveInterval,\n );\n }\n /**\n * Create a spiral object which uses numXTerm terms from the clothoid X series and numYTerm from the clothoid Y series.\n * @param spiralType type of spiral.\n * @param localToWorld placement frame. Inflection point is at origin, initial direction is along x axis.\n * @param numXTerm number of terms to use from X series\n * @param numYTerm number of terms to use from Y series\n * @param originalProperties (optional) transition conditional properties.\n * @param nominalL1 design distance from inflection to end point.\n * @param nominalR1 design radius at end point.\n * @param activeInterval (optional) active interval (as fractions of nominalL1)\n */\n public static createTruncatedClothoid(\n spiralType: string,\n localToWorld: Transform,\n numXTerm: number,\n numYTerm: number,\n originalProperties: TransitionConditionalProperties | undefined,\n nominalL1: number,\n nominalR1: number,\n activeInterval: Segment1d | undefined,\n ): DirectSpiral3d | undefined {\n if (numXTerm < 1)\n numXTerm = 1;\n if (numYTerm < 1)\n numYTerm = 1;\n const evaluator = new ClothoidSeriesRLEvaluator(nominalL1, 1.0 / (2.0 * nominalL1 * nominalR1), numXTerm, numYTerm);\n return new DirectSpiral3d(\n localToWorld.clone(),\n spiralType,\n originalProperties,\n nominalL1,\n nominalR1,\n activeInterval ? activeInterval.clone() : Segment1d.create(0, 1),\n evaluator,\n );\n }\n /**\n * Create a czech cubic.\n * This is y = m*x^3 with\n * * x any point on the x axis.\n * * `fraction` along the spiral goes to `x = fraction * L`.\n * * m is gamma/(6RL).\n * * 1/(6RL) is the leading term of the sine series.\n * * `gamma = 2R/sqrt(4RR-LL)` pushes y up a little bit to simulate the lost series terms.\n * @param localToWorld\n * @param nominalLx nominal length along x axis.\n * @param nominalR1\n * @param activeInterval\n */\n public static createCzechCubic(\n localToWorld: Transform, nominalLx: number, nominalR1: number, activeInterval?: Segment1d,\n ): DirectSpiral3d | undefined {\n const evaluator = CzechSpiralEvaluator.create(nominalLx, nominalR1);\n if (evaluator === undefined)\n return undefined;\n return new DirectSpiral3d(\n localToWorld.clone(),\n \"Czech\",\n undefined,\n nominalLx,\n nominalR1,\n activeInterval ? activeInterval.clone() : Segment1d.create(0, 1),\n evaluator,\n );\n }\n /**\n * Create an italian spiral\n * This is y = m*x^3 with\n * * x any point on the x axis.\n * * `fraction` along the spiral goes to `x = fraction * L`.\n * * m is gamma/(6RL).\n * * 1/(6RL) is the leading term of the sine series.\n * * `gamma = 2R/sqrt(4RR-LL)` pushes y up a little bit to simulate the lost series terms.\n * @param localToWorld\n * @param nominalL1 nominal length along the spiral.\n * @param nominalR1\n * @param activeInterval\n */\n public static createItalian(\n localToWorld: Transform, nominalL1: number, nominalR1: number, activeInterval?: Segment1d,\n ): DirectSpiral3d | undefined {\n const evaluator = ItalianSpiralEvaluator.create(nominalL1, nominalR1);\n if (evaluator === undefined)\n return undefined;\n return new DirectSpiral3d(\n localToWorld.clone(),\n \"Italian\",\n undefined,\n nominalL1,\n nominalR1,\n activeInterval ? activeInterval.clone() : Segment1d.create(0, 1),\n evaluator,\n );\n }\n /**\n * Create an MX Cubic whose nominal length is close to along the curve.\n * This is y = m*x^3 with\n * * m is 1/(6RL1).\n * * 1/(6RL) is the leading term of the sine series.\n * * L1 is an along-the-x-axis distance that is slightly LESS THAN the nominal length.\n * * x is axis position that is slightly LESS than nominal distance along.\n * * L1, x use the approximation `x = s * ( 1 - s^4/ (40 R R L L))\n * @param localToWorld\n * @param nominalL1\n * @param nominalR1\n * @param activeInterval\n */\n public static createMXCubicAlongArc(\n localToWorld: Transform, nominalL1: number, nominalR1: number, activeInterval?: Segment1d,\n ): DirectSpiral3d | undefined {\n const evaluator = MXCubicAlongArcEvaluator.create(nominalL1, nominalR1);\n if (evaluator === undefined)\n return undefined;\n return new DirectSpiral3d(\n localToWorld.clone(),\n \"MXCubicAlongArc\",\n undefined,\n nominalL1,\n nominalR1,\n activeInterval ? activeInterval.clone() : Segment1d.create(0, 1),\n evaluator,\n );\n }\n /**\n * Create a polish cubic\n * This is y = m*x^3 with\n * * m is 1/(6RL).\n * * 1/(6RL) is the leading term of the sine series.\n * * L is nominal length.\n * * R is nominal end radius.\n * * x ranges up to the x axis distance for which the polish distance series produces f(x) = L.\n * * The support class PolishCubicEvaluator has static methods for the distance series and its inversion.\n */\n public static createPolishCubic(\n localToWorld: Transform, nominalL1: number, nominalR1: number, activeInterval?: Segment1d,\n ): DirectSpiral3d | undefined {\n const evaluator = PolishCubicEvaluator.create(nominalL1, nominalR1);\n if (evaluator === undefined)\n return undefined;\n return new DirectSpiral3d(\n localToWorld.clone(),\n \"PolishCubic\",\n undefined,\n nominalL1,\n nominalR1,\n activeInterval ? activeInterval.clone() : Segment1d.create(0, 1),\n evaluator,\n );\n }\n /**\n * Create an AustralianRailCorp spiral\n * This is y = m*x^3 with\n * * x any point on the x axis.\n * * `fraction` along the spiral goes to `x = fraction * L`.\n * * m is gamma/(6RL).\n * * 1/(6RL) is the leading term of the sine series.\n * * `gamma = 2R/sqrt(4RR-LL)` pushes y up a little bit to simulate the lost series terms.\n * @param localToWorld\n * @param nominalL1\n * @param nominalR1\n * @param activeInterval\n */\n public static createAustralianRail(\n localToWorld: Transform, nominalL1: number, nominalR1: number, activeInterval?: Segment1d,\n ): DirectSpiral3d | undefined {\n const evaluator = AustralianRailCorpXYEvaluator.create(nominalL1, nominalR1);\n if (evaluator === undefined)\n return undefined;\n return new DirectSpiral3d(\n localToWorld.clone(),\n \"AustralianRailCorp\",\n undefined,\n nominalL1,\n nominalR1,\n activeInterval ? activeInterval.clone() : Segment1d.create(0, 1),\n evaluator,\n );\n }\n public static createDirectHalfCosine(\n localToWorld: Transform, nominalL1: number, nominalR1: number, activeInterval?: Segment1d,\n ): DirectSpiral3d | undefined {\n return new DirectSpiral3d(\n localToWorld,\n \"HalfCosine\",\n undefined,\n nominalL1,\n nominalR1,\n activeInterval,\n new DirectHalfCosineSpiralEvaluator(nominalL1, nominalR1),\n );\n }\n /**\n * Create an Arema spiral clothoid approximation\n * * X is 2 terms of the clothoid series as a function of nominal distance along.\n * * Y is 2 terms f the clothoid series as a function of nominal distance along.\n * * Remark: This is identical to the ChineseCubic.\n * @param localToWorld axes with inflection at origin, tangent along x axis.\n * @param nominalL1 nominal length as used in series LR terms.\n * @param nominalR1 nominal final radius as used in series LR terms.\n * @param activeInterval fractional interval with (0, nominalL1) range for nominal distance along.\n */\n public static createArema(\n localToWorld: Transform, nominalL1: number, nominalR1: number, activeInterval?: Segment1d,\n ): DirectSpiral3d | undefined {\n return this.createTruncatedClothoid(\"Arema\", localToWorld, 2, 2, undefined, nominalL1, nominalR1, activeInterval);\n }\n /**\n * Create a Japanese spiral clothoid approximation.\n * * X is 1 terms of the clothoid series as a function of nominal distance along.\n * * Y is 1 terms of the clothoid series as a function of nominal distance along.\n * * Remark: This is identical to the ChineseCubic.\n * @param localToWorld axes with inflection at origin, tangent along x axis.\n * @param nominalL1 nominal length as used in series LR terms.\n * @param nominalR1 nominal final radius as used in series LR terms.\n * @param activeInterval fractional interval with (0, nominalL1) range for nominal distance along\n */\n public static createJapaneseCubic(\n localToWorld: Transform, nominalL1: number, nominalR1: number, activeInterval?: Segment1d,\n ): DirectSpiral3d | undefined {\n return this.createTruncatedClothoid(\n \"JapaneseCubic\", localToWorld, 1, 1, undefined, nominalL1, nominalR1, activeInterval,\n );\n }\n /**\n * Create a Chinese clothoid approximation\n * * X is 2 terms of the clothoid series as a function of nominal distance along.\n * * Y is 2 terms f the clothoid series as a function of nominal distance along.\n * * Remark: This is identical to the Arema spiral.\n * @param localToWorld axes with inflection at origin, tangent along x axis.\n * @param nominalL1 nominal length as used in series LR terms.\n * @param nominalR1 nominal final radius as used in series LR terms.\n * @param activeInterval fractional interval with (0, nominalL1) range for nominal distance along.\n */\n public static createChineseCubic(\n localToWorld: Transform, nominalL1: number, nominalR1: number, activeInterval?: Segment1d,\n ): DirectSpiral3d | undefined {\n return this.createTruncatedClothoid(\"ChineseCubic\", localToWorld, 2, 2, undefined, nominalL1, nominalR1, activeInterval);\n }\n /**\n * Create a Western Australian direct spiral.\n * * X is 2 terms of the clothoid series as a function of distance along.\n * * Y is 1 term (cubic in nominal distance along).\n * @param localToWorld axes with inflection at origin, tangent along x axis.\n * @param nominalL1 nominal length as used in series LR terms.\n * @param nominalR1 nominal final radius as used in series LR terms.\n * @param activeInterval fractional interval with (0, nominalL1) range for nominal distance along.\n */\n public static createWesternAustralian(\n localToWorld: Transform, nominalL1: number, nominalR1: number, activeInterval?: Segment1d,\n ): DirectSpiral3d | undefined {\n return this.createTruncatedClothoid(\"WesternAustralian\", localToWorld, 2, 1, undefined, nominalL1, nominalR1, activeInterval);\n }\n /**\n * Create (if possible) a DirectSpiral3d, applying various strict conditions appropriate to the spiral type.\n * The parameter list includes extraneous values in order to directly match IntegratedSpiral3d.create, which has\n * greater flexibility about mixtures of values.\n * * IMPORTANT RESTRICTIONS:\n * * Direct spirals must have the inflection at the origin of their coordinate system, aligned with the x axis.\n * * hence bearing0 = 0.\n * * hence radius0 = 0.\n * * bearing1 is ignored.\n * * radius1 must be given.\n * * arcLength must be given,\n * @param spiralType one of the types in `DirectSpiralTypeName`\n * @param radius0 radius (or 0 for tangent to line) at start. Must be ZERO or UNDEFINED\n * @param radius1 radius (or 0 for tangent to line) at end.\n * @param bearing0 bearing, measured CCW from x axis at start. Must be ZERO or UNDEFINED\n * @param bearing1 bearing, measured CCW from x axis at end. IGNORED.\n * @param fractionInterval (optional) fractional interval for an \"active\" portion of the curve. If omitted, the\n * full [0,1] is used.\n * @param localToWorld placement transform.\n */\n public static createFromLengthAndRadius(\n spiralType: string,\n radius0: number | undefined,\n radius1: number | undefined,\n bearing0: Angle | undefined,\n _bearing1: Angle | undefined,\n arcLength: number | undefined,\n activeInterval: undefined | Segment1d,\n localToWorld: Transform,\n ): TransitionSpiral3d | undefined {\n if (bearing0 !== undefined && !bearing0.isAlmostZero)\n return undefined;\n if (radius0 !== undefined && !Geometry.isSmallMetricDistance(radius0))\n return undefined;\n if (radius1 === undefined || Geometry.isSmallMetricDistance(radius1))\n return undefined;\n if (arcLength === undefined)\n return undefined;\n if (Geometry.equalStringNoCase(spiralType, \"Arema\"))\n return this.createArema(localToWorld, arcLength, radius1, activeInterval);\n if (Geometry.equalStringNoCase(spiralType, \"ChineseCubic\"))\n return this.createChineseCubic(localToWorld, arcLength, radius1, activeInterval);\n if (Geometry.equalStringNoCase(spiralType, \"JapaneseCubic\"))\n return this.createJapaneseCubic(localToWorld, arcLength, radius1, activeInterval);\n if (Geometry.equalStringNoCase(spiralType, \"HalfCosine\"))\n return this.createDirectHalfCosine(localToWorld, arcLength, radius1, activeInterval);\n if (Geometry.equalStringNoCase(spiralType, \"Czech\"))\n return this.createCzechCubic(localToWorld, arcLength, radius1, activeInterval);\n if (Geometry.equalStringNoCase(spiralType, \"Italian\"))\n return this.createItalian(localToWorld, arcLength, radius1, activeInterval);\n if (Geometry.equalStringNoCase(spiralType, \"AustralianRailCorp\"))\n return this.createAustralianRail(localToWorld, arcLength, radius1, activeInterval);\n if (Geometry.equalStringNoCase(spiralType, \"MXCubicAlongArc\"))\n return this.createMXCubicAlongArc(localToWorld, arcLength, radius1, activeInterval);\n if (Geometry.equalStringNoCase(spiralType, \"WesternAustralian\"))\n return this.createWesternAustralian(localToWorld, arcLength, radius1, activeInterval);\n if (Geometry.equalStringNoCase(spiralType, \"PolishCubic\"))\n return this.createPolishCubic(localToWorld, arcLength, radius1, activeInterval);\n return undefined;\n }\n /** Deep clone of this spiral. */\n public override clone(): DirectSpiral3d {\n return new DirectSpiral3d(\n this.localToWorld.clone(),\n this._spiralType,\n this.designProperties?.clone(),\n this._nominalL1,\n this._nominalR1,\n this._activeFractionInterval?.clone(),\n this._evaluator.clone(),\n );\n }\n /** Apply `transform` to this spiral's local to world transform. */\n public tryTransformInPlace(transformA: Transform): boolean {\n const rigidData = this.applyRigidPartOfTransform(transformA);\n if (rigidData !== undefined) {\n this._nominalL1 *= rigidData.scale;\n this._nominalR1 *= rigidData.scale;\n this.evaluator.scaleInPlace(rigidData.scale);\n }\n this.refreshComputedProperties();\n return true;\n }\n /** Return the spiral start point. */\n public override startPoint(result?: Point3d): Point3d {\n return this.activeStrokes.startPoint(result);\n }\n /** Return the spiral end point. */\n public override endPoint(result?: Point3d): Point3d {\n return this.activeStrokes.endPoint(result);\n }\n /** Test if the local to world transform places the spiral xy plane into `plane`. */\n public isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean {\n return plane.isPointInPlane(this.localToWorld.origin as Point3d)\n && Geometry.isSameCoordinate(0.0, this.localToWorld.matrix.dotColumnX(plane.getNormalRef()))\n && Geometry.isSameCoordinate(0.0, this.localToWorld.matrix.dotColumnY(plane.getNormalRef()));\n }\n /**\n * Return quick length of the spiral.\n * The tangent vector of a true clothoid is length 1 everywhere, so simple proportion of nominalL1 is a good approximation.\n */\n public quickLength() {\n const distanceData = this._globalStrokes.packedUVParams!;\n const n = distanceData.length;\n return distanceData.getYAtUncheckedPointIndex(n - 1);\n }\n // We claim true length is stored at the back of `packedUVParams`.\n // Nevertheless defer to the generic integrator in the default implementation.\n // public override curveLength() {\n // return this.quickLength();\n // }\n /** Test if `other` is an instance of `TransitionSpiral3d` */\n public isSameGeometryClass(other: any): boolean {\n return other instanceof TransitionSpiral3d;\n }\n /**\n * Add strokes from this spiral to `dest`.\n * * Line strings will usually stroke as just their points.\n * * If maxEdgeLength is given, this will sub-stroke within the linestring -- not what we want.\n */\n public emitStrokes(dest: LineString3d, options?: StrokeOptions): void {\n this.activeStrokes.emitStrokes(dest, options);\n }\n /** Emit stroke fragments to `dest` handler. */\n public emitStrokableParts(dest: IStrokeHandler, options?: StrokeOptions): void {\n const n = this.computeStrokeCountForOptions(options);\n const activeStrokes = this.activeStrokes;\n dest.startParentCurvePrimitive(this);\n // hack: specify the extended range so we can compute length of an extended spiral\n let globalFraction0 = 0.0;\n let globalFraction1 = 1.0;\n if (dest instanceof CurveLengthContext) {\n if (dest.getFraction0 < 0.0)\n globalFraction0 = dest.getFraction0;\n if (dest.getFraction1 > 1.0)\n globalFraction1 = dest.getFraction1;\n }\n if (n <= activeStrokes.numPoints())\n dest.announceIntervalForUniformStepStrokes(this, 2 * activeStrokes.numPoints(), globalFraction0, globalFraction1);\n else\n dest.announceIntervalForUniformStepStrokes(this, n, globalFraction0, globalFraction1);\n dest.endParentCurvePrimitive(this);\n }\n /**\n * Return the stroke count required for given options.\n * @param options StrokeOptions that determine count.\n */\n public computeStrokeCountForOptions(options?: StrokeOptions): number {\n let numStroke;\n const nominalRadians = this._nominalL1 / (2.0 * this._nominalR1);\n if (options) {\n const rMin = Math.abs(this._nominalR1);\n numStroke = options.applyTolerancesToArc(rMin, nominalRadians);\n numStroke = options.applyMaxEdgeLength(numStroke, this.quickLength());\n numStroke = options.applyMinStrokesPerPrimitive(numStroke);\n } else {\n numStroke = StrokeOptions.applyAngleTol(undefined, 4, nominalRadians, 0.02);\n }\n numStroke = Math.ceil(this._activeFractionInterval.absoluteDelta() * numStroke);\n return numStroke;\n }\n /**\n * Reverse the active interval and active strokes.\n * * Primary defining data remains unchanged.\n */\n public reverseInPlace(): void {\n this._activeFractionInterval.reverseInPlace();\n if (this._activeStrokes === undefined)\n this._activeStrokes = this._globalStrokes.clone();\n this._activeStrokes.reverseInPlace();\n }\n /** Evaluate curve point with respect to fraction. */\n public fractionToPoint(activeFraction: number, result?: Point3d): Point3d {\n const globalFraction = this._activeFractionInterval.fractionToPoint(activeFraction);\n result = this._evaluator.fractionToPoint(globalFraction, result);\n this.localToWorld.multiplyPoint3d(result, result);\n return result;\n }\n /** Evaluate curve point and derivative with respect to fraction. */\n public fractionToPointAndDerivative(activeFraction: number, result?: Ray3d): Ray3d {\n const globalFraction = this._activeFractionInterval.fractionToPoint(activeFraction);\n result = this._evaluator.fractionToPointAndDerivative(globalFraction, result);\n result.direction.scaleInPlace(this._activeFractionInterval.signedDelta());\n result.transformInPlace(this.localToWorld);\n return result;\n }\n /**\n * Return a plane with\n * * origin at fractional position along the curve.\n * * vectorU is the first derivative, i.e. tangent vector with length equal to the rate of change with respect to\n * the fraction.\n * * vectorV is the second derivative, i.e.derivative of vectorU.\n */\n public fractionToPointAnd2Derivatives(\n activeFraction: number, result?: Plane3dByOriginAndVectors,\n ): Plane3dByOriginAndVectors | undefined {\n const globalFraction = this._activeFractionInterval.fractionToPoint(activeFraction);\n result = this._evaluator.fractionToPointAnd2Derivatives(globalFraction, result);\n const a = this._activeFractionInterval.signedDelta();\n result.vectorU.scaleInPlace(a);\n result.vectorV.scaleInPlace(a * a);\n result.transformInPlace(this.localToWorld);\n return result;\n }\n /** Second step of double dispatch: call `handler.handleTransitionSpiral(this)`. */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleTransitionSpiral(this);\n }\n /** Compare various coordinate quantities. */\n public override isAlmostEqual(other: any): boolean {\n if (other instanceof DirectSpiral3d) {\n return Geometry.isSameCoordinate(this._nominalL1, other._nominalL1)\n && Geometry.isSameCoordinate(this._nominalR1, other._nominalR1)\n && this.localToWorld.isAlmostEqual(other.localToWorld)\n && this._activeFractionInterval.isAlmostEqual(other._activeFractionInterval)\n && this._evaluator.isAlmostEqual(other._evaluator);\n }\n return false;\n }\n}\n"]}
|
|
@@ -16,44 +16,47 @@ import { Plane3dByOriginAndVectors } from "../../geometry3d/Plane3dByOriginAndVe
|
|
|
16
16
|
import { GeometryQuery } from "../GeometryQuery";
|
|
17
17
|
/**
|
|
18
18
|
* An IntegratedSpiral3d is a curve defined by integrating its curvature.
|
|
19
|
-
* * The first integral of curvature (with respect to distance along the curve) is the bearing angle (in radians)
|
|
19
|
+
* * The first integral of curvature (with respect to distance along the curve) is the bearing angle (in radians).
|
|
20
20
|
* * Integrating (cos(theta), sin(theta)) gives displacement from the start point, and thus the actual curve position.
|
|
21
|
-
* * The curvature functions of interest are all symmetric snap functions in the NormalizedTransition class.
|
|
22
|
-
* *
|
|
21
|
+
* * The curvature functions of interest are all symmetric snap functions in the [[NormalizedTransition]] class.
|
|
22
|
+
* * [[TransitionConditionalProperties]] implements the computations of the interrelationship of radii, bearing, and length.
|
|
23
23
|
* @public
|
|
24
24
|
*/
|
|
25
25
|
export declare class IntegratedSpiral3d extends TransitionSpiral3d {
|
|
26
|
-
/** String name for schema properties */
|
|
26
|
+
/** String name for schema properties. */
|
|
27
27
|
readonly curvePrimitiveType = "transitionSpiral";
|
|
28
|
-
/**
|
|
28
|
+
/** Start and end radii as a Segment1d. */
|
|
29
29
|
radius01: Segment1d;
|
|
30
|
-
/**
|
|
30
|
+
/** Start and end bearings as an AngleSweep. */
|
|
31
31
|
bearing01: AngleSweep;
|
|
32
|
-
/**
|
|
32
|
+
/** Stroked approximation of entire spiral. */
|
|
33
33
|
private _globalStrokes;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* *
|
|
34
|
+
/**
|
|
35
|
+
* Stroked approximation of active spiral.
|
|
36
|
+
* * Same count as global -- possibly overly fine, but it gives some consistency between same clothoid constructed
|
|
37
|
+
* as partial versus complete.
|
|
38
|
+
* * If no trimming, this points to the same place as the _globalStrokes. DO NOT double transform.
|
|
37
39
|
*/
|
|
38
40
|
private _activeStrokes?;
|
|
39
|
-
/** Return the internal stroked form of the (possibly partial) spiral
|
|
41
|
+
/** Return the internal stroked form of the (possibly partial) spiral. */
|
|
40
42
|
get activeStrokes(): LineString3d;
|
|
43
|
+
/** Evaluator for transition. */
|
|
41
44
|
private _evaluator;
|
|
42
|
-
/** Total curve arc length (computed) */
|
|
45
|
+
/** Total curve arc length (computed). */
|
|
43
46
|
private _arcLength01;
|
|
44
|
-
/** Curvatures (inverse radii) at start and end */
|
|
47
|
+
/** Curvatures (inverse radii) at start and end. */
|
|
45
48
|
private _curvature01;
|
|
46
|
-
/** evaluator for transition */
|
|
47
49
|
private constructor();
|
|
48
|
-
/**
|
|
50
|
+
/** Default spiral type name: clothoid. */
|
|
49
51
|
static readonly defaultSpiralType = "clothoid";
|
|
50
|
-
/**
|
|
52
|
+
/** Use the integrated function to return an angle at fractional position. */
|
|
51
53
|
globalFractionToBearingRadians(fraction: number): number;
|
|
52
|
-
/**
|
|
54
|
+
/** Use the integrated function to return an angle at fractional position. */
|
|
53
55
|
globalFractionToCurvature(fraction: number): number;
|
|
54
|
-
/** Return the bearing at given fraction of the active interval
|
|
56
|
+
/** Return the bearing at given fraction of the active interval. */
|
|
55
57
|
fractionToBearingRadians(activeFraction: number): number;
|
|
56
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Return the curvature at given fraction of the active interval.
|
|
57
60
|
* * The `undefined` result is to match the abstract class -- it cannot actually occur.
|
|
58
61
|
*/
|
|
59
62
|
fractionToCurvature(activeFraction: number): number | undefined;
|
|
@@ -62,72 +65,86 @@ export declare class IntegratedSpiral3d extends TransitionSpiral3d {
|
|
|
62
65
|
private static _gaussMapper;
|
|
63
66
|
/** Initialize class level work arrays. */
|
|
64
67
|
static initWorkSpace(): void;
|
|
65
|
-
/**
|
|
66
|
-
*
|
|
68
|
+
/**
|
|
69
|
+
* Evaluate and sum the gauss quadrature formulas to integrate cos(theta), sin(theta) fractional subset of a reference
|
|
70
|
+
* length (recall that theta is a nonlinear function of the fraction).
|
|
67
71
|
* * This is a single interval of gaussian integration.
|
|
68
|
-
* * The fraction is on the full spiral (not in the mapped active interval)
|
|
72
|
+
* * The fraction is on the full spiral (not in the mapped active interval).
|
|
69
73
|
* @param xyz advancing integrated point.
|
|
70
|
-
* @param fractionA fraction at start of interval
|
|
74
|
+
* @param fractionA fraction at start of interval.
|
|
71
75
|
* @param fractionB fraction at end of interval.
|
|
72
|
-
* @param unitArcLength length of curve for 0 to 1 fractional
|
|
76
|
+
* @param unitArcLength length of curve for 0 to 1 fractional.
|
|
73
77
|
*/
|
|
74
78
|
private fullSpiralIncrementalIntegral;
|
|
75
|
-
/** Recompute strokes */
|
|
79
|
+
/** Recompute strokes. */
|
|
76
80
|
refreshComputedProperties(): void;
|
|
77
81
|
/**
|
|
78
82
|
* Create a transition spiral with radius and bearing conditions.
|
|
79
|
-
* @param radius01 radius (inverse curvature) at start and end
|
|
80
|
-
* @param bearing01 bearing angles at start and end. bearings are measured from the x axis, positive clockwise
|
|
83
|
+
* @param radius01 radius (inverse curvature) at start and end (radius of zero means straight line).
|
|
84
|
+
* @param bearing01 bearing angles at start and end. bearings are measured from the x axis, positive clockwise
|
|
85
|
+
* towards y axis.
|
|
81
86
|
* @param activeFractionInterval fractional limits of the active portion of the spiral.
|
|
82
|
-
* @param localToWorld placement frame.
|
|
87
|
+
* @param localToWorld placement frame. Fractional coordinate 0 is at the origin.
|
|
83
88
|
*/
|
|
84
89
|
static createRadiusRadiusBearingBearing(radius01: Segment1d, bearing01: AngleSweep, activeFractionInterval: Segment1d, localToWorld: Transform, typeName?: string): IntegratedSpiral3d | undefined;
|
|
85
90
|
/**
|
|
86
91
|
* Create a transition spiral.
|
|
87
|
-
* * Inputs must provide exactly 4 of the 5 values `[radius0,radius1,bearing0,bearing1,length`.
|
|
92
|
+
* * Inputs must provide exactly 4 of the 5 values `[radius0,radius1,bearing0,bearing1,length]`.
|
|
88
93
|
* @param spiralType one of "clothoid", "bloss", "biquadratic", "cosine", "sine". If undefined, "clothoid" is used.
|
|
89
|
-
* @param radius0 radius (or 0 for tangent to line) at start
|
|
90
|
-
* @param radius1 radius (or 0 for tangent to line) at end
|
|
94
|
+
* @param radius0 radius (or 0 for tangent to line) at start.
|
|
95
|
+
* @param radius1 radius (or 0 for tangent to line) at end.
|
|
91
96
|
* @param bearing0 bearing, measured CCW from x axis at start.
|
|
92
97
|
* @param bearing1 bearing, measured CCW from x axis at end.
|
|
93
|
-
* @param fractionInterval optional fractional interval for an "active" portion of the curve.
|
|
94
|
-
*
|
|
98
|
+
* @param fractionInterval optional fractional interval for an "active" portion of the curve. If omitted, the full
|
|
99
|
+
* [0,1] is used.
|
|
100
|
+
* @param localToWorld placement transform.
|
|
95
101
|
*/
|
|
96
102
|
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;
|
|
97
103
|
/** Copy all defining data from another spiral. */
|
|
98
104
|
setFrom(other: IntegratedSpiral3d): IntegratedSpiral3d;
|
|
99
|
-
/** Deep clone of this spiral */
|
|
105
|
+
/** Deep clone of this spiral. */
|
|
100
106
|
clone(): IntegratedSpiral3d;
|
|
101
|
-
/**
|
|
107
|
+
/** Apply `transform` to this spiral's local to world transform. */
|
|
102
108
|
tryTransformInPlace(transformA: Transform): boolean;
|
|
103
109
|
/** Return the spiral start point. */
|
|
104
110
|
startPoint(result?: Point3d): Point3d;
|
|
105
|
-
/**
|
|
111
|
+
/** Return the spiral end point. */
|
|
106
112
|
endPoint(result?: Point3d): Point3d;
|
|
107
|
-
/**
|
|
113
|
+
/** Test if the local to world transform places the spiral xy plane into `plane`. */
|
|
108
114
|
isInPlane(plane: Plane3dByOriginAndUnitNormal): boolean;
|
|
109
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* Return length of the spiral.
|
|
117
|
+
* * Because TransitionSpiral is parameterized directly in terms of distance along, this is a simple return value.
|
|
118
|
+
*/
|
|
110
119
|
quickLength(): number;
|
|
111
|
-
/**
|
|
120
|
+
/**
|
|
121
|
+
* Return length of the spiral.
|
|
122
|
+
* * Because TransitionSpiral is parameterized directly in terms of distance along, this is a simple return value.
|
|
123
|
+
*/
|
|
112
124
|
curveLength(): number;
|
|
113
|
-
/**
|
|
125
|
+
/**
|
|
126
|
+
* Return (unsigned) length of the spiral between fractions.
|
|
127
|
+
* * Because TransitionSpiral is parameterized directly in terms of distance along, this is a simple return value.
|
|
128
|
+
*/
|
|
114
129
|
curveLengthBetweenFractions(fraction0: number, fraction1: number): number;
|
|
115
|
-
/** Test if `other` is an instance of `TransitionSpiral3d
|
|
130
|
+
/** Test if `other` is an instance of `TransitionSpiral3d`. */
|
|
116
131
|
isSameGeometryClass(other: any): boolean;
|
|
117
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
* Add strokes from this spiral to `dest`.
|
|
118
134
|
* * Linestrings will usually stroke as just their points.
|
|
119
135
|
* * If maxEdgeLength is given, this will sub-stroke within the linestring -- not what we want.
|
|
120
136
|
*/
|
|
121
137
|
emitStrokes(dest: LineString3d, options?: StrokeOptions): void;
|
|
122
|
-
/**
|
|
138
|
+
/** Emit stroke fragments to `dest` handler. */
|
|
123
139
|
emitStrokableParts(dest: IStrokeHandler, options?: StrokeOptions): void;
|
|
124
140
|
/**
|
|
125
|
-
*
|
|
126
|
-
* @param options StrokeOptions that determine count
|
|
141
|
+
* Return the stroke count required for given options.
|
|
142
|
+
* @param options StrokeOptions that determine count.
|
|
127
143
|
*/
|
|
128
144
|
computeStrokeCountForOptions(options?: StrokeOptions): number;
|
|
129
|
-
/**
|
|
130
|
-
*
|
|
145
|
+
/**
|
|
146
|
+
* Reverse the active interval and active strokes.
|
|
147
|
+
* * Primary defining data remains unchanged.
|
|
131
148
|
*/
|
|
132
149
|
reverseInPlace(): void;
|
|
133
150
|
/** Evaluate curve point with respect to fraction. */
|
|
@@ -136,16 +153,17 @@ export declare class IntegratedSpiral3d extends TransitionSpiral3d {
|
|
|
136
153
|
fractionToPointAndDerivative(activeFraction: number, result?: Ray3d): Ray3d;
|
|
137
154
|
/** Return the frenet frame at fractional position. */
|
|
138
155
|
fractionToFrenetFrame(activeFraction: number, result?: Transform): Transform;
|
|
139
|
-
/**
|
|
140
|
-
*
|
|
141
|
-
* * origin at fractional position along the curve
|
|
142
|
-
* * vectorU is the first derivative, i.e. tangent vector with length equal to the rate of change with respect to
|
|
156
|
+
/**
|
|
157
|
+
* Return a plane with
|
|
158
|
+
* * origin at fractional position along the curve.
|
|
159
|
+
* * vectorU is the first derivative, i.e. tangent vector with length equal to the rate of change with respect to
|
|
160
|
+
* the fraction.
|
|
143
161
|
* * vectorV is the second derivative, i.e.derivative of vectorU.
|
|
144
162
|
*/
|
|
145
163
|
fractionToPointAnd2Derivatives(activeFraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors | undefined;
|
|
146
|
-
/** Second step of double dispatch: call `handler.handleTransitionSpiral(this)
|
|
164
|
+
/** Second step of double dispatch: call `handler.handleTransitionSpiral(this)`. */
|
|
147
165
|
dispatchToGeometryHandler(handler: GeometryHandler): any;
|
|
148
|
-
/**
|
|
166
|
+
/** Compare various coordinate quantities. */
|
|
149
167
|
isAlmostEqual(other?: GeometryQuery): boolean;
|
|
150
168
|
}
|
|
151
169
|
//# sourceMappingURL=IntegratedSpiral3d.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntegratedSpiral3d.d.ts","sourceRoot":"","sources":["../../../../src/curve/spiral/IntegratedSpiral3d.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAE3D,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAE7F,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC/C,OAAO,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"IntegratedSpiral3d.d.ts","sourceRoot":"","s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