@itwin/core-geometry 4.5.0-dev.9 → 4.5.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.
Files changed (89) hide show
  1. package/CHANGELOG.md +56 -1
  2. package/LICENSE.md +1 -1
  3. package/lib/cjs/Geometry.d.ts +15 -0
  4. package/lib/cjs/Geometry.d.ts.map +1 -1
  5. package/lib/cjs/Geometry.js +27 -0
  6. package/lib/cjs/Geometry.js.map +1 -1
  7. package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js +1 -1
  8. package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  9. package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js +1 -1
  10. package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  11. package/lib/cjs/geometry3d/FrameBuilder.d.ts.map +1 -1
  12. package/lib/cjs/geometry3d/FrameBuilder.js +3 -0
  13. package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
  14. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +8 -2
  15. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  16. package/lib/cjs/geometry3d/GrowableXYZArray.js +11 -2
  17. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  18. package/lib/cjs/geometry3d/XYZProps.d.ts +16 -8
  19. package/lib/cjs/geometry3d/XYZProps.d.ts.map +1 -1
  20. package/lib/cjs/geometry3d/XYZProps.js.map +1 -1
  21. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +42 -50
  22. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  23. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +81 -105
  24. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  25. package/lib/cjs/polyface/Polyface.d.ts +19 -10
  26. package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
  27. package/lib/cjs/polyface/Polyface.js +17 -10
  28. package/lib/cjs/polyface/Polyface.js.map +1 -1
  29. package/lib/cjs/polyface/PolyfaceBuilder.d.ts +18 -10
  30. package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
  31. package/lib/cjs/polyface/PolyfaceBuilder.js +27 -21
  32. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  33. package/lib/cjs/polyface/PolyfaceData.d.ts +137 -86
  34. package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
  35. package/lib/cjs/polyface/PolyfaceData.js +300 -166
  36. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  37. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  38. package/lib/cjs/topology/Graph.d.ts +2 -8
  39. package/lib/cjs/topology/Graph.d.ts.map +1 -1
  40. package/lib/cjs/topology/Graph.js +0 -3
  41. package/lib/cjs/topology/Graph.js.map +1 -1
  42. package/lib/cjs/topology/Triangulation.d.ts +18 -7
  43. package/lib/cjs/topology/Triangulation.d.ts.map +1 -1
  44. package/lib/cjs/topology/Triangulation.js +50 -9
  45. package/lib/cjs/topology/Triangulation.js.map +1 -1
  46. package/lib/esm/Geometry.d.ts +15 -0
  47. package/lib/esm/Geometry.d.ts.map +1 -1
  48. package/lib/esm/Geometry.js +27 -0
  49. package/lib/esm/Geometry.js.map +1 -1
  50. package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js +1 -1
  51. package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  52. package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js +1 -1
  53. package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  54. package/lib/esm/geometry3d/FrameBuilder.d.ts.map +1 -1
  55. package/lib/esm/geometry3d/FrameBuilder.js +3 -0
  56. package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
  57. package/lib/esm/geometry3d/GrowableXYZArray.d.ts +8 -2
  58. package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  59. package/lib/esm/geometry3d/GrowableXYZArray.js +11 -2
  60. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  61. package/lib/esm/geometry3d/XYZProps.d.ts +16 -8
  62. package/lib/esm/geometry3d/XYZProps.d.ts.map +1 -1
  63. package/lib/esm/geometry3d/XYZProps.js.map +1 -1
  64. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +42 -50
  65. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  66. package/lib/esm/polyface/IndexedPolyfaceVisitor.js +80 -103
  67. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  68. package/lib/esm/polyface/Polyface.d.ts +19 -10
  69. package/lib/esm/polyface/Polyface.d.ts.map +1 -1
  70. package/lib/esm/polyface/Polyface.js +17 -10
  71. package/lib/esm/polyface/Polyface.js.map +1 -1
  72. package/lib/esm/polyface/PolyfaceBuilder.d.ts +18 -10
  73. package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
  74. package/lib/esm/polyface/PolyfaceBuilder.js +27 -21
  75. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  76. package/lib/esm/polyface/PolyfaceData.d.ts +137 -86
  77. package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
  78. package/lib/esm/polyface/PolyfaceData.js +300 -166
  79. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  80. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  81. package/lib/esm/topology/Graph.d.ts +2 -8
  82. package/lib/esm/topology/Graph.d.ts.map +1 -1
  83. package/lib/esm/topology/Graph.js +0 -3
  84. package/lib/esm/topology/Graph.js.map +1 -1
  85. package/lib/esm/topology/Triangulation.d.ts +18 -7
  86. package/lib/esm/topology/Triangulation.d.ts.map +1 -1
  87. package/lib/esm/topology/Triangulation.js +50 -9
  88. package/lib/esm/topology/Triangulation.js.map +1 -1
  89. package/package.json +6 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CAAC,WAAW,CAAC,CAAC;IAClC,CAAC;IACD,0CAA0C;IACnC,KAAK,KAA+B,OAAO,IAAI,wBAAwB,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAC3J,mCAAmC;IAC5B,aAAa,CAAC,KAAU;QAC7B,IAAI,KAAK,YAAY,wBAAwB,EAAE;YAC7C,OAAO,mBAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC;mBACtE,mBAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;SAC3E;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD;;;;;OAKG;IACI,MAAM,CAAC,2BAA2B,CAAC,cAAsB,EAAE,cAAsB,EAAE,oBAA4B;QACpH,MAAM,EAAE,GAAG,cAAc,GAAG,cAAc,CAAC;QAC3C,MAAM,EAAE,GAAG,cAAc,GAAG,cAAc,CAAC;QAC3C,MAAM,EAAE,GAAG,oBAAoB,GAAG,oBAAoB,CAAC;QACvD,OAAO,oBAAoB,GAAG,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;IACnE,CAAC;CACF;AApDD,4DAoDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Curve\r\n */\r\nimport { Geometry } from \"../../Geometry\";\r\nimport { CubicEvaluator } from \"./CubicEvaluator\";\r\n/**\r\n * MX Cubic along arc.\r\n * This is y= m*x^3 with\r\n * * x any point on the x axis\r\n * * `fraction` along the spiral goes to `x = fraction * Lx`\r\n * * m is (1/6RL)\r\n * * construction length L is nominal along the curve.\r\n * * x length Lx is along the axis, determined by two terms of the clothoid x series.\r\n * *\r\n * @param localToWorld\r\n * @param nominalL1\r\n * @param nominalR1\r\n * @param activeInterval\r\n * @internal\r\n */\r\nexport class MXCubicAlongArcEvaluator extends CubicEvaluator {\r\n public nominalLength1: number;\r\n public nominalRadius1: number;\r\n\r\n /** Constructor is private. Caller responsible for cubicM validity. */\r\n private constructor(length1: number, radius1: number, axisLength: number, cubicM: number) {\r\n super(axisLength, cubicM);\r\n this.nominalLength1 = length1;\r\n this.nominalRadius1 = radius1;\r\n }\r\n\r\n /** Compute the cubic constant. */\r\n public static computeCubicM(length1: number, radius1: number): number | undefined {\r\n const axisLength = MXCubicAlongArcEvaluator.approximateDistanceAlongToX(length1, radius1, length1);\r\n return 1.0 / (6.0 * radius1 * axisLength);\r\n }\r\n\r\n public static create(length1: number, radius1: number): MXCubicAlongArcEvaluator | undefined {\r\n const m = this.computeCubicM(length1, radius1);\r\n if (m === undefined)\r\n return undefined;\r\n const xMax = MXCubicAlongArcEvaluator.approximateDistanceAlongToX(length1, radius1, length1);\r\n return new MXCubicAlongArcEvaluator(length1, radius1, xMax, m);\r\n }\r\n\r\n public override scaleInPlace(scaleFactor: number) {\r\n this.nominalLength1 *= scaleFactor;\r\n this.nominalRadius1 *= scaleFactor;\r\n super.scaleInPlace(scaleFactor);\r\n }\r\n /** return a deep copy of the evaluator */\r\n public clone(): MXCubicAlongArcEvaluator { return new MXCubicAlongArcEvaluator(this.nominalLength1, this.nominalRadius1, super._axisLength, this.cubicM); }\r\n /** Member by member matchup ... */\r\n public isAlmostEqual(other: any): boolean {\r\n if (other instanceof MXCubicAlongArcEvaluator) {\r\n return Geometry.isSameCoordinate(this.nominalLength1, other.nominalLength1)\r\n && Geometry.isSameCoordinate(this.nominalRadius1, other.nominalRadius1);\r\n }\r\n return false;\r\n }\r\n /**\r\n * Return a (fast but mediocre) approximation of spiral x position as function of approximate distance along the curve.\r\n * * This x-to-distance relation is not as precise as the CurvePrimitive method moveSignedDistanceFromFraction.\r\n * * It is supported here for users interested in replicating the Czech distance mapping rather than the more accurate CurvePrimitive measurements.\r\n * @param x distance along the x axis.\r\n */\r\n public static approximateDistanceAlongToX(nominalLength1: number, nominalRadius1: number, nominalDistanceAlong: number): number {\r\n const l2 = nominalLength1 * nominalLength1;\r\n const r2 = nominalRadius1 * nominalRadius1;\r\n const xx = nominalDistanceAlong * nominalDistanceAlong;\r\n return nominalDistanceAlong * (1.0 - xx * xx / (40.0 * r2 * l2));\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"MXCubicAlongArcSpiralEvaluator.js","sourceRoot":"","sources":["../../../../src/curve/spiral/MXCubicAlongArcSpiralEvaluator.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AACH,6CAA0C;AAC1C,qDAAkD;AAClD;;;;;;;;;;;;;;GAcG;AACH,MAAa,wBAAyB,SAAQ,+BAAc;IAI1D,uEAAuE;IACvE,YAAoB,OAAe,EAAE,OAAe,EAAE,UAAkB,EAAE,MAAc;QACtF,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAC1B,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC;QAC9B,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC;IAChC,CAAC;IAED,kCAAkC;IAC3B,MAAM,CAAC,aAAa,CAAC,OAAe,EAAE,OAAe;QAC1D,MAAM,UAAU,GAAG,wBAAwB,CAAC,2BAA2B,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QACnG,OAAO,GAAG,GAAG,CAAC,GAAG,GAAG,OAAO,GAAG,UAAU,CAAC,CAAC;IAC5C,CAAC;IAEM,MAAM,CAAC,MAAM,CAAC,OAAe,EAAE,OAAe;QACnD,MAAM,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC/C,IAAI,CAAC,KAAK,SAAS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C;CACF;AApDD,4DAoDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Curve\r\n */\r\nimport { Geometry } from \"../../Geometry\";\r\nimport { CubicEvaluator } from \"./CubicEvaluator\";\r\n/**\r\n * MX Cubic along arc.\r\n * This is y= m*x^3 with\r\n * * x any point on the x axis\r\n * * `fraction` along the spiral goes to `x = fraction * Lx`\r\n * * m is (1/6RL)\r\n * * construction length L is nominal along the curve.\r\n * * x length Lx is along the axis, determined by two terms of the clothoid x series.\r\n * *\r\n * @param localToWorld\r\n * @param nominalL1\r\n * @param nominalR1\r\n * @param activeInterval\r\n * @internal\r\n */\r\nexport class MXCubicAlongArcEvaluator extends CubicEvaluator {\r\n public nominalLength1: number;\r\n public nominalRadius1: number;\r\n\r\n /** Constructor is private. Caller responsible for cubicM validity. */\r\n private constructor(length1: number, radius1: number, axisLength: number, cubicM: number) {\r\n super(axisLength, cubicM);\r\n this.nominalLength1 = length1;\r\n this.nominalRadius1 = radius1;\r\n }\r\n\r\n /** Compute the cubic constant. */\r\n public static computeCubicM(length1: number, radius1: number): number | undefined {\r\n const axisLength = MXCubicAlongArcEvaluator.approximateDistanceAlongToX(length1, radius1, length1);\r\n return 1.0 / (6.0 * radius1 * axisLength);\r\n }\r\n\r\n public static create(length1: number, radius1: number): MXCubicAlongArcEvaluator | undefined {\r\n const m = this.computeCubicM(length1, radius1);\r\n if (m === undefined)\r\n return undefined;\r\n const xMax = MXCubicAlongArcEvaluator.approximateDistanceAlongToX(length1, radius1, length1);\r\n return new MXCubicAlongArcEvaluator(length1, radius1, xMax, m);\r\n }\r\n\r\n public override scaleInPlace(scaleFactor: number) {\r\n this.nominalLength1 *= scaleFactor;\r\n this.nominalRadius1 *= scaleFactor;\r\n super.scaleInPlace(scaleFactor);\r\n }\r\n /** return a deep copy of the evaluator */\r\n public clone(): MXCubicAlongArcEvaluator { return new MXCubicAlongArcEvaluator(this.nominalLength1, this.nominalRadius1, this.axisLength, this.cubicM); }\r\n /** Member by member matchup ... */\r\n public isAlmostEqual(other: any): boolean {\r\n if (other instanceof MXCubicAlongArcEvaluator) {\r\n return Geometry.isSameCoordinate(this.nominalLength1, other.nominalLength1)\r\n && Geometry.isSameCoordinate(this.nominalRadius1, other.nominalRadius1);\r\n }\r\n return false;\r\n }\r\n /**\r\n * Return a (fast but mediocre) approximation of spiral x position as function of approximate distance along the curve.\r\n * * This x-to-distance relation is not as precise as the CurvePrimitive method moveSignedDistanceFromFraction.\r\n * * It is supported here for users interested in replicating the Czech distance mapping rather than the more accurate CurvePrimitive measurements.\r\n * @param x distance along the x axis.\r\n */\r\n public static approximateDistanceAlongToX(nominalLength1: number, nominalRadius1: number, nominalDistanceAlong: number): number {\r\n const l2 = nominalLength1 * nominalLength1;\r\n const r2 = nominalRadius1 * nominalRadius1;\r\n const xx = nominalDistanceAlong * nominalDistanceAlong;\r\n return nominalDistanceAlong * (1.0 - xx * xx / (40.0 * r2 * l2));\r\n }\r\n}\r\n"]}
@@ -51,7 +51,7 @@ class PolishCubicEvaluator extends CubicEvaluator_1.CubicEvaluator {
51
51
  super.scaleInPlace(scaleFactor);
52
52
  }
53
53
  /** return a deep copy of the evaluator */
54
- clone() { return new PolishCubicEvaluator(this.nominalLength1, this.nominalRadius1, super._axisLength, this.cubicM); }
54
+ clone() { return new PolishCubicEvaluator(this.nominalLength1, this.nominalRadius1, this.axisLength, this.cubicM); }
55
55
  /** Member by member matchup ... */
56
56
  isAlmostEqual(other) {
57
57
  if (other instanceof PolishCubicEvaluator) {
@@ -1 +1 @@
1
- {"version":3,"file":"PolishCubicSpiralEvaluator.js","sourceRoot":"","sources":["../../../../src/curve/spiral/PolishCubicSpiralEvaluator.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AACH,6CAA0C;AAC1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AAC,CAAC;QAC7D,MAAM,GAAG,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;QACvB,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;QACpB,MAAM,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;QACpB,sBAAsB;QACtB,sDAAsD;QACtD,mDAAmD;QACnD,aAAa;QACb,qBAAqB;QACrB,sBAAsB;QACtB,0BAA0B;QAC1B,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7F,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,kDAAkD;IAC3C,MAAM,CAAC,2BAA2B,CAAC,CAAS,EAAE,OAAe,EAAE,OAAe;QACnF,MAAM,IAAI,GAAG,qBAAY,CAAC,WAAW,CAAC,CAAC,EACrC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,EACrE,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;QAC7E,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA9FD,oDA8FC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Curve\r\n */\r\nimport { Geometry } from \"../../Geometry\";\r\nimport { SimpleNewton } from \"../../numerics/Newton\";\r\nimport { CubicEvaluator } from \"./CubicEvaluator\";\r\n/**\r\n * Polish Cubic.\r\n * * Construction takes nominal length and end radius.\r\n * curve is is y= m*x^3 with\r\n * * x any point on the x axis\r\n * * m is (1/6RL)\r\n * * Lx = x length is along the axis, determined by inversion of a distance series at nominal length\r\n * *\r\n * @param localToWorld\r\n * @param nominalL1\r\n * @param nominalR1\r\n * @param activeInterval\r\n * @internal\r\n */\r\nexport class PolishCubicEvaluator extends CubicEvaluator {\r\n public nominalLength1: number;\r\n public nominalRadius1: number;\r\n\r\n /** Constructor is private. Caller responsible for cubicM validity. */\r\n private constructor(length1: number, radius1: number, axisLength: number, cubicM: number) {\r\n super(axisLength, cubicM);\r\n this.nominalLength1 = length1;\r\n this.nominalRadius1 = radius1;\r\n }\r\n\r\n /** Compute the czech cubic constant. */\r\n public static computeCubicM(length1: number, radius1: number): number {\r\n return 1.0 / (6.0 * length1 * radius1);\r\n }\r\n\r\n public static create(length1: number, radius1: number): PolishCubicEvaluator | undefined {\r\n const m = this.computeCubicM(length1, radius1);\r\n if (m === undefined)\r\n return undefined;\r\n const xMax = PolishCubicEvaluator.approximateDistanceAlongToX(length1, radius1, length1);\r\n if (xMax === undefined)\r\n return undefined;\r\n return new PolishCubicEvaluator(length1, radius1, xMax, m);\r\n }\r\n\r\n public override scaleInPlace(scaleFactor: number) {\r\n this.nominalLength1 *= scaleFactor;\r\n this.nominalRadius1 *= scaleFactor;\r\n super.scaleInPlace(scaleFactor);\r\n }\r\n /** return a deep copy of the evaluator */\r\n public clone(): PolishCubicEvaluator { return new PolishCubicEvaluator(this.nominalLength1, this.nominalRadius1, super._axisLength, this.cubicM); }\r\n /** Member by member matchup ... */\r\n public isAlmostEqual(other: any): boolean {\r\n if (other instanceof PolishCubicEvaluator) {\r\n return Geometry.isSameCoordinate(this.nominalLength1, other.nominalLength1)\r\n && Geometry.isSameCoordinate(this.nominalRadius1, other.nominalRadius1);\r\n }\r\n return false;\r\n }\r\n\r\n /** Compute the coefficient of x^4 in the x-to-distance series expansion */\r\n public static computeX4SeriesCoefficient(length1: number, radius1: number): number {\r\n return 1.0 / (4.0 * length1 * length1 * radius1 * radius1);\r\n }\r\n /**\r\n * Evaluate a series approximation of distance along the true curve.\r\n * @param x distance along x axis\r\n * @param radius1 nominal end radius\r\n * @param length1 nominal length along curve\r\n * @returns\r\n */\r\n public static xToApproximateDistance(x: number, radius1: number, length1: number): number {\r\n // C31 * ( 1 + 1 / 10 * E31 - 1 / 72 * E31^2 + 1 / 208 * E31^3 - 5 / 2176 * E31^4 )\r\n const a4 = this.computeX4SeriesCoefficient(length1, radius1);\r\n const ax2 = a4 * x * x;\r\n const ax3 = ax2 * x;\r\n const ax4 = ax3 * x;\r\n const s0 = x * (1.0 + ax4 * (0.1 + ax4 * (-1.0 / 72.0 + ax4 * (1.0 / 208.0 - 5.0 * ax4 / 2176.0))));\r\n return s0;\r\n }\r\n\r\n /**\r\n * Evaluate the derivative of the x-to-distance series.\r\n * @param x distance along x axis\r\n * @param radius1 nominal end radius\r\n * @param length1 nominal length along curve\r\n * @returns\r\n */\r\n public static xToApproximateDistanceDerivative(x: number, radius1: number, length1: number): number {\r\n // C31 * ( 1 + 1 / 10 * E31 - 1 / 72 * E31^2 + 1 / 208 * E31^3 - 5 / 2176 * E31^4 )\r\n const a4 = this.computeX4SeriesCoefficient(length1, radius1);\r\n const ax2 = a4 * x * x;\r\n const ax3 = ax2 * x;\r\n const ax4 = ax3 * x;\r\n // derivative notes ..\r\n // take away leading x -- this reduces each power by 1\r\n // multiply each coefficient by its original power:\r\n // 0.1==>0.5\r\n // 1/72==> 9/72 = 1/8\r\n // 1/208==>13/208=1/16\r\n // 1/2176==>17/2176= 1/128\r\n const ds = (1.0 + ax4 * (0.5 + ax4 * (-1.0 / 8.0 + ax4 * (1.0 / 16.0 - 5.0 * ax4 / 128.0))));\r\n return ds;\r\n }\r\n\r\n /** Invert the xToApproximateDistance function. */\r\n public static approximateDistanceAlongToX(s: number, radius1: number, length1: number): number | undefined {\r\n const root = SimpleNewton.runNewton1D(s,\r\n (x: number) => (this.xToApproximateDistance(x, radius1, length1) - s),\r\n (x: number) => this.xToApproximateDistanceDerivative(x, radius1, length1));\r\n return root;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"PolishCubicSpiralEvaluator.js","sourceRoot":"","sources":["../../../../src/curve/spiral/PolishCubicSpiralEvaluator.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AACH,6CAA0C;AAC1C,kDAAqD;AACrD,qDAAkD;AAClD;;;;;;;;;;;;;GAaG;AACH,MAAa,oBAAqB,SAAQ,+BAAc;IAItD,uEAAuE;IACvE,YAAoB,OAAe,EAAE,OAAe,EAAE,UAAkB,EAAE,MAAc;QACtF,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAC1B,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC;QAC9B,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC;IAChC,CAAC;IAED,wCAAwC;IACjC,MAAM,CAAC,aAAa,CAAC,OAAe,EAAE,OAAe;QAC1D,OAAO,GAAG,GAAG,CAAC,GAAG,GAAG,OAAO,GAAG,OAAO,CAAC,CAAC;IACzC,CAAC;IAEM,MAAM,CAAC,MAAM,CAAC,OAAe,EAAE,OAAe;QACnD,MAAM,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC/C,IAAI,CAAC,KAAK,SAAS;YACjB,OAAO,SAAS,CAAC;QACnB,MAAM,IAAI,GAAG,oBAAoB,CAAC,2BAA2B,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QACzF,IAAI,IAAI,KAAK,SAAS;YACpB,OAAO,SAAS,CAAC;QACnB,OAAO,IAAI,oBAAoB,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAC7D,CAAC;IAEe,YAAY,CAAC,WAAmB;QAC9C,IAAI,CAAC,cAAc,IAAI,WAAW,CAAC;QACnC,IAAI,CAAC,c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------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Curve\r\n */\r\nimport { Geometry } from \"../../Geometry\";\r\nimport { SimpleNewton } from \"../../numerics/Newton\";\r\nimport { CubicEvaluator } from \"./CubicEvaluator\";\r\n/**\r\n * Polish Cubic.\r\n * * Construction takes nominal length and end radius.\r\n * curve is is y= m*x^3 with\r\n * * x any point on the x axis\r\n * * m is (1/6RL)\r\n * * Lx = x length is along the axis, determined by inversion of a distance series at nominal length\r\n * *\r\n * @param localToWorld\r\n * @param nominalL1\r\n * @param nominalR1\r\n * @param activeInterval\r\n * @internal\r\n */\r\nexport class PolishCubicEvaluator extends CubicEvaluator {\r\n public nominalLength1: number;\r\n public nominalRadius1: number;\r\n\r\n /** Constructor is private. Caller responsible for cubicM validity. */\r\n private constructor(length1: number, radius1: number, axisLength: number, cubicM: number) {\r\n super(axisLength, cubicM);\r\n this.nominalLength1 = length1;\r\n this.nominalRadius1 = radius1;\r\n }\r\n\r\n /** Compute the czech cubic constant. */\r\n public static computeCubicM(length1: number, radius1: number): number {\r\n return 1.0 / (6.0 * length1 * radius1);\r\n }\r\n\r\n public static create(length1: number, radius1: number): PolishCubicEvaluator | undefined {\r\n const m = this.computeCubicM(length1, radius1);\r\n if (m === undefined)\r\n return undefined;\r\n const xMax = PolishCubicEvaluator.approximateDistanceAlongToX(length1, radius1, length1);\r\n if (xMax === undefined)\r\n return undefined;\r\n return new PolishCubicEvaluator(length1, radius1, xMax, m);\r\n }\r\n\r\n public override scaleInPlace(scaleFactor: number) {\r\n this.nominalLength1 *= scaleFactor;\r\n this.nominalRadius1 *= scaleFactor;\r\n super.scaleInPlace(scaleFactor);\r\n }\r\n /** return a deep copy of the evaluator */\r\n public clone(): PolishCubicEvaluator { return new PolishCubicEvaluator(this.nominalLength1, this.nominalRadius1, this.axisLength, this.cubicM); }\r\n /** Member by member matchup ... */\r\n public isAlmostEqual(other: any): boolean {\r\n if (other instanceof PolishCubicEvaluator) {\r\n return Geometry.isSameCoordinate(this.nominalLength1, other.nominalLength1)\r\n && Geometry.isSameCoordinate(this.nominalRadius1, other.nominalRadius1);\r\n }\r\n return false;\r\n }\r\n\r\n /** Compute the coefficient of x^4 in the x-to-distance series expansion */\r\n public static computeX4SeriesCoefficient(length1: number, radius1: number): number {\r\n return 1.0 / (4.0 * length1 * length1 * radius1 * radius1);\r\n }\r\n /**\r\n * Evaluate a series approximation of distance along the true curve.\r\n * @param x distance along x axis\r\n * @param radius1 nominal end radius\r\n * @param length1 nominal length along curve\r\n * @returns\r\n */\r\n public static xToApproximateDistance(x: number, radius1: number, length1: number): number {\r\n // C31 * ( 1 + 1 / 10 * E31 - 1 / 72 * E31^2 + 1 / 208 * E31^3 - 5 / 2176 * E31^4 )\r\n const a4 = this.computeX4SeriesCoefficient(length1, radius1);\r\n const ax2 = a4 * x * x;\r\n const ax3 = ax2 * x;\r\n const ax4 = ax3 * x;\r\n const s0 = x * (1.0 + ax4 * (0.1 + ax4 * (-1.0 / 72.0 + ax4 * (1.0 / 208.0 - 5.0 * ax4 / 2176.0))));\r\n return s0;\r\n }\r\n\r\n /**\r\n * Evaluate the derivative of the x-to-distance series.\r\n * @param x distance along x axis\r\n * @param radius1 nominal end radius\r\n * @param length1 nominal length along curve\r\n * @returns\r\n */\r\n public static xToApproximateDistanceDerivative(x: number, radius1: number, length1: number): number {\r\n // C31 * ( 1 + 1 / 10 * E31 - 1 / 72 * E31^2 + 1 / 208 * E31^3 - 5 / 2176 * E31^4 )\r\n const a4 = this.computeX4SeriesCoefficient(length1, radius1);\r\n const ax2 = a4 * x * x;\r\n const ax3 = ax2 * x;\r\n const ax4 = ax3 * x;\r\n // derivative notes ..\r\n // take away leading x -- this reduces each power by 1\r\n // multiply each coefficient by its original power:\r\n // 0.1==>0.5\r\n // 1/72==> 9/72 = 1/8\r\n // 1/208==>13/208=1/16\r\n // 1/2176==>17/2176= 1/128\r\n const ds = (1.0 + ax4 * (0.5 + ax4 * (-1.0 / 8.0 + ax4 * (1.0 / 16.0 - 5.0 * ax4 / 128.0))));\r\n return ds;\r\n }\r\n\r\n /** Invert the xToApproximateDistance function. */\r\n public static approximateDistanceAlongToX(s: number, radius1: number, length1: number): number | undefined {\r\n const root = SimpleNewton.runNewton1D(s,\r\n (x: number) => (this.xToApproximateDistance(x, radius1, length1) - s),\r\n (x: number) => this.xToApproximateDistanceDerivative(x, radius1, length1));\r\n return root;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"FrameBuilder.d.ts","sourceRoot":"","sources":["../../../src/geometry3d/FrameBuilder.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAa,eAAe,EAAY,MAAM,aAAa,CAAC;AAGnE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAW;IACtC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAW;IACvC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAW;IACvC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAU;IAEpC,OAAO,CAAC,6BAA6B;IASrC,kDAAkD;IAC3C,KAAK;;IASZ;;;;OAIG;IACI,iBAAiB,CAAC,eAAe,GAAE,OAAe,EAAE,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS;IA0BrG,kGAAkG;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M,EAAE,OAAO,EAAE,EAAE,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS;IAatG;;;;;;;OAOG;WACW,yBAAyB,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS;IAQrG;;;;;;;;;;OAUG;WACW,kCAAkC,CAC9C,KAAK,EAAE,OAAO,EACd,WAAW,GAAE,eAA4D,EACzE,SAAS,GAAE,MAAU,EACrB,SAAS,GAAE,MAAU,EACrB,SAAS,GAAE,MAAU,EACrB,iBAAiB,GAAE,MAAY,EAC/B,MAAM,CAAC,EAAE,SAAS,GACjB,SAAS;CAiBb"}
@@ -237,6 +237,9 @@ class FrameBuilder {
237
237
  break;
238
238
  }
239
239
  }
240
+ else if (data.hasOwnProperty("x") && data.hasOwnProperty("y") && data.hasOwnProperty("z")) {
241
+ this.announcePoint(Point3dVector3d_1.Point3d.create(data.x, data.y, data.z));
242
+ }
240
243
  }
241
244
  /**
242
245
  * Create a localToWorld frame for the given data.
@@ -1 +1 @@
1
- {"version":3,"file":"FrameBuilder.js","sourceRoot":"","sources":["../../../src/geometry3d/FrameBuilder.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,0CAA0C;AAC1C,0DAAyD;AACzD,0EAAuE;AACvE,0CAAuC;AACvC,8DAA2D;AAC3D,4DAAyD;AACzD,0DAAuD;AACvD,wDAAqD;AACrD,0CAAmE;AACnE,yDAAsD;AACtD,yCAAsC;AACtC,uDAAsD;AACtD,iDAA8C;AAC9C,6CAA0C;AAE1C,2CAAwC;AAExC,mEAAmE;AAEnE;;;;;;;;;;;;;;;GAeG;AACH,MAAa,YAAY;IASvB,uEAAuE;IAC/D,6BAA6B,CACnC,OAAiB,EAAE,OAAiB,EAAE,mBAA2B,mBAAQ,CAAC,iBAAiB;QAE3F,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,SAAS,EAAE;YAClD,MAA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QAClG,OAAO,qBAAS,CAAC,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACjE,CAAC;CACF;AApUD,oCAoUC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module CartesianGeometry\r\n */\r\n\r\n// import { Point2d } from \"./Geometry2d\";\r\nimport { BSplineCurve3d } from \"../bspline/BSplineCurve\";\r\nimport { InterpolationCurve3d } from \"../bspline/InterpolationCurve3d\";\r\nimport { Arc3d } from \"../curve/Arc3d\";\r\nimport { CurveCollection } from \"../curve/CurveCollection\";\r\nimport { CurvePrimitive } from \"../curve/CurvePrimitive\";\r\nimport { LineSegment3d } from \"../curve/LineSegment3d\";\r\nimport { LineString3d } from \"../curve/LineString3d\";\r\nimport { AxisOrder, AxisScaleSelect, Geometry } from \"../Geometry\";\r\nimport { GrowableXYZArray } from \"./GrowableXYZArray\";\r\nimport { Matrix3d } from \"./Matrix3d\";\r\nimport { Point3d, Vector3d } from \"./Point3dVector3d\";\r\nimport { Point3dArray } from \"./PointHelpers\";\r\nimport { PolygonOps } from \"./PolygonOps\";\r\nimport { Range3d } from \"./Range\";\r\nimport { Transform } from \"./Transform\";\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention, no-empty */\r\n\r\n/**\r\n * Helper class to accumulate points and vectors until there is enough data to define a coordinate system.\r\n *\r\n * * For the common case of building a right handed frame:\r\n * * create the FrameBuilder and make calls to announcePoint and announceVector.\r\n * * the frame will be fully determined by an origin and two vectors.\r\n * * the first call to announcePoint will set the origin.\r\n * * additional calls to announcePoint will produce announceVector call with the vector from the origin.\r\n * * after each announcement, call getValidatedFrame(false)\r\n * * getValidatedFrame will succeed when it has two independent vectors.\r\n * * To build a left handed frame,\r\n * * an origin and 3 independent vectors are required.\r\n * * announce as above, but query with getValidatedFrame (true).\r\n * * this will use the third vector to select right or left handed frame.\r\n * @public\r\n */\r\nexport class FrameBuilder {\r\n private _origin: undefined | Point3d;\r\n private _vector0: undefined | Vector3d;\r\n private _vector1: undefined | Vector3d;\r\n private _vector2: undefined | Vector3d;\r\n private static _workMatrix?: Matrix3d;\r\n private static _workVector0?: Vector3d;\r\n private static _workVector1?: Vector3d;\r\n private static _workPoint?: Point3d;\r\n // test if both vectors are defined and have significant angle between.\r\n private areStronglyIndependentVectors(\r\n vector0: Vector3d, vector1: Vector3d, radiansTolerance: number = Geometry.smallAngleRadians,\r\n ): boolean {\r\n if (vector0 !== undefined && vector1 !== undefined) {\r\n const q = vector0.smallerUnorientedRadiansTo(vector1);\r\n return q > radiansTolerance;\r\n }\r\n return false;\r\n }\r\n /** Clear all accumulated point and vector data */\r\n public clear() {\r\n this._origin = undefined;\r\n this._vector0 = undefined;\r\n this._vector1 = undefined;\r\n this._vector2 = undefined;\r\n }\r\n constructor() {\r\n this.clear();\r\n }\r\n /**\r\n * Try to assemble the data into a non-singular transform.\r\n * * If allowLeftHanded is false, vector0 and vector1 determine a right handed coordinate system.\r\n * * if allowLeftHanded is true, the z vector of the right handed system can be flipped to agree with vector2 direction.\r\n */\r\n public getValidatedFrame(allowLeftHanded: boolean = false, result?: Transform): Transform | undefined {\r\n if (this._origin && this._vector0 && this._vector1) {\r\n const createRigidMatrix = (v0: Vector3d, v1: Vector3d): Matrix3d | undefined => {\r\n return FrameBuilder._workMatrix = Matrix3d.createRigidFromColumns(v0, v1, AxisOrder.XYZ, FrameBuilder._workMatrix);\r\n };\r\n if (!allowLeftHanded) {\r\n const matrix = createRigidMatrix(this._vector0, this._vector1);\r\n if (matrix)\r\n return Transform.createOriginAndMatrix(this._origin, matrix, result);\r\n // uh oh -- vector1 was not really independent. clear everything after vector0.\r\n this._vector1 = this._vector2 = undefined;\r\n } else if (this._vector2) {\r\n const matrix = createRigidMatrix(this._vector0, this._vector1);\r\n if (matrix) {\r\n if (this._vector0.tripleProduct(this._vector1, this._vector2) < 0)\r\n matrix.scaleColumns(1.0, 1.0, -1.0);\r\n return Transform.createOriginAndMatrix(this._origin, matrix, result);\r\n }\r\n // uh oh again -- clear vector1 and vector2, re-announce vector2 as possible vector1??\r\n const vector2 = this._vector2;\r\n this._vector1 = this._vector2 = undefined;\r\n this.announceVector(vector2);\r\n }\r\n }\r\n return undefined;\r\n }\r\n /** If vector0 is known but vector1 is not, make vector1 the cross of the up-vector and vector0 */\r\n public applyDefaultUpVector(vector?: Vector3d) {\r\n if (vector && this._vector0 && !this._vector1 && !vector.isParallelTo(this._vector0)) {\r\n this._vector1 = vector.crossProduct(this._vector0);\r\n }\r\n }\r\n /** Ask if there is a defined origin for the evolving frame */\r\n public get hasOrigin(): boolean {\r\n return this._origin !== undefined;\r\n }\r\n /**\r\n * Return the number of vectors saved. Because the save process checks numerics, this should be the rank of the system.\r\n */\r\n public savedVectorCount(): number {\r\n if (!this._vector0)\r\n return 0;\r\n if (!this._vector1)\r\n return 1;\r\n if (!this._vector2)\r\n return 2;\r\n return 3;\r\n }\r\n /**\r\n * Announce a new point. If this point is different from the origin, also compute and announce the vector from the origin.\r\n */\r\n public announcePoint(point: Point3d): number {\r\n if (!this._origin) {\r\n this._origin = point.clone();\r\n return this.savedVectorCount();\r\n }\r\n // the new point may provide an additional vector\r\n if (this._origin.isAlmostEqual(point))\r\n return this.savedVectorCount();\r\n return this.announceVector(this._origin.vectorTo(point));\r\n }\r\n /** Announce a new vector. */\r\n public announceVector(vector: Vector3d): number {\r\n if (vector.isAlmostZero)\r\n return this.savedVectorCount();\r\n if (!this._vector0) {\r\n this._vector0 = vector.clone(this._vector0);\r\n return 1;\r\n }\r\n if (!this._vector1) {\r\n if (this.areStronglyIndependentVectors(vector, this._vector0, 1.0e-5)) {\r\n this._vector1 = vector.clone(this._vector1);\r\n return 2;\r\n }\r\n return 1;\r\n }\r\n // vector0 and vector1 are independent.\r\n if (!this._vector2) {\r\n const unitPerpendicular = this._vector0.unitCrossProduct(this._vector1);\r\n if (unitPerpendicular && !Geometry.isSameCoordinate(0, unitPerpendicular.dotProduct(vector))) {\r\n this._vector2 = vector.clone(this._vector2);\r\n return 3;\r\n }\r\n return 2;\r\n }\r\n // fall through if prior vectors are all there -- no need for the new one.\r\n return 3;\r\n }\r\n /**\r\n * Inspect the content of the data. Announce points and vectors. Return when savedVectorCount becomes sufficient\r\n * for a coordinate system.\r\n */\r\n public announce(data: any) {\r\n if (this.savedVectorCount() > 1)\r\n return;\r\n if (data === undefined)\r\n return;\r\n if (data instanceof Point3d)\r\n this.announcePoint(data);\r\n else if (data instanceof Vector3d)\r\n this.announceVector(data);\r\n else if (Array.isArray(data)) {\r\n for (const child of data) {\r\n if (this.savedVectorCount() > 1)\r\n break;\r\n this.announce(child);\r\n }\r\n } else if (data instanceof CurvePrimitive) {\r\n if (data instanceof LineSegment3d) {\r\n this.announcePoint(data.startPoint());\r\n this.announcePoint(data.endPoint());\r\n } else if (data instanceof Arc3d) {\r\n const ray = data.fractionToPointAndDerivative(0.0);\r\n this.announcePoint(ray.origin);\r\n this.announceVector(ray.direction);\r\n this.announceVector(data.matrixRef.columnZCrossVector(ray.direction));\r\n } else if (data instanceof LineString3d) {\r\n for (const point of data.points) {\r\n this.announcePoint(point);\r\n if (this.savedVectorCount() > 1)\r\n break;\r\n }\r\n } else if (data instanceof BSplineCurve3d) {\r\n const point = Point3d.create();\r\n for (let i = 0; this.savedVectorCount() < 2; i++) {\r\n if (data.getPolePoint3d(i, point) instanceof Point3d)\r\n this.announcePoint(point);\r\n else break;\r\n }\r\n } else if (data instanceof InterpolationCurve3d) {\r\n const point = Point3d.create();\r\n for (let i = 0; this.savedVectorCount() < 2; i++) {\r\n if (i < data.options.fitPoints.length) {\r\n point.setFrom(data.options.fitPoints[i]);\r\n this.announcePoint(point);\r\n } else break;\r\n }\r\n } else { // unimplemented CurvePrimitive type\r\n const frame = data.fractionToFrenetFrame(0.0);\r\n if (undefined !== frame) {\r\n this.announcePoint(frame.getOrigin());\r\n this.announceVector(frame.matrix.getColumn(0));\r\n this.announceVector(frame.matrix.getColumn(1));\r\n }\r\n }\r\n } else if (data instanceof CurveCollection) {\r\n if (data.children)\r\n for (const child of data.children) {\r\n this.announce(child);\r\n if (this.savedVectorCount() > 1)\r\n break;\r\n }\r\n } else if (data instanceof GrowableXYZArray) {\r\n const point = Point3d.create();\r\n for (let i = 0; this.savedVectorCount() < 2; i++) {\r\n if (data.getPoint3dAtCheckedPointIndex(i, point) instanceof Point3d)\r\n this.announcePoint(point);\r\n else break;\r\n }\r\n }\r\n }\r\n /**\r\n * Create a localToWorld frame for the given data.\r\n * * origin is at first point.\r\n * * x axis in direction of first nonzero vector present or implied by the input.\r\n * * y axis is perpendicular to x and contains (in positive side) the next vector present or implied by the input.\r\n * * The calculation favors the first points found. It does not try to get a \"best\" plane.\r\n * @param defaultUpVector optional vector to cross with vector0 to create vector1 when it is unknown\r\n * @param params any number of geometric objects to examine in [[announce]] for point/vector data sufficient to construct a frame.\r\n * If the last argument is a `Transform`, it is populated with the computed frame and returned.\r\n * @returns computed localToWorld frame, or undefined if insufficient data.\r\n */\r\n public static createRightHandedFrame(defaultUpVector: Vector3d | undefined, ...params: any[]): Transform | undefined {\r\n // if last arg is a Transform, remove it from the array and use for the return value\r\n let frame = (params.length > 0 && params[params.length - 1] instanceof Transform) ? params.pop() as Transform : undefined;\r\n const builder = new FrameBuilder();\r\n for (const data of params) {\r\n builder.announce(data);\r\n builder.applyDefaultUpVector(defaultUpVector);\r\n if (frame = builder.getValidatedFrame(false, frame)) {\r\n if (defaultUpVector) {\r\n if (frame.matrix.dotColumnZ(defaultUpVector) < 0.0)\r\n frame.matrix.scaleColumnsInPlace(1, -1, -1);\r\n }\r\n return frame;\r\n }\r\n }\r\n const evaluatePrimitiveFrame = (curve: CurvePrimitive, result?: Transform): Transform | undefined => {\r\n return curve.fractionToFrenetFrame(0.0, result);\r\n };\r\n // try direct evaluation of curve primitives using the above lambda\r\n for (const data of params) {\r\n if (data instanceof CurvePrimitive) {\r\n return evaluatePrimitiveFrame(data, frame);\r\n } else if (data instanceof CurveCollection) {\r\n const children = data.collectCurvePrimitives();\r\n for (const curve of children) {\r\n if (frame = evaluatePrimitiveFrame(curve, frame))\r\n return frame;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Create a transform containing points or vectors in the given data.\r\n * * The xy columns of the transform contain the first points or vectors of the data.\r\n * * The z column is perpendicular to that xy plane.\r\n * * The calculation favors the first points found. It does not try to get a \"best\" plane.\r\n * @param params any number of geometric objects to examine in [[announce]] for point/vector data sufficient to construct a frame.\r\n * If the last argument is a `Transform`, it is populated with the computed frame and returned.\r\n * @returns computed localToWorld frame, or undefined if insufficient data.\r\n */\r\n public static createRightHandedLocalToWorld(...params: any[]): Transform | undefined {\r\n return this.createRightHandedFrame(undefined, params);\r\n }\r\n\r\n /**\r\n * Try to create a frame whose xy plane is through points.\r\n * * If 3 or more distinct points are present, the x axis is from the first point to the most distant, and y\r\n * direction is toward the point most distant from that line.\r\n * @param points array of points\r\n * @param result optional pre-allocated Transform to populate and return\r\n * @returns localToWorld frame for the points, or undefined if insufficient data\r\n */\r\n public static createFrameToDistantPoints(points: Point3d[], result?: Transform): Transform | undefined {\r\n if (points.length > 2) {\r\n const origin = points[0];\r\n const vector01 = FrameBuilder._workVector0 ?? Vector3d.create();\r\n Point3dArray.indexOfMostDistantPoint(points, points[0], vector01);\r\n const vector02 = FrameBuilder._workVector1 ?? Vector3d.create();\r\n Point3dArray.indexOfPointWithMaxCrossProductMagnitude(points, origin, vector01, vector02);\r\n const matrix = FrameBuilder._workMatrix = Matrix3d.createRigidFromColumns(vector01, vector02, AxisOrder.XYZ, FrameBuilder._workMatrix);\r\n if (matrix)\r\n return Transform.createOriginAndMatrix(origin, matrix, result);\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Try to create a frame whose xy plane is through points, with the points appearing CCW in the local frame.\r\n * * If 3 or more distinct points are present, the x axis is from the first point to the most distant, and y\r\n * direction is toward the point most distant from that line.\r\n * @param points array of points\r\n * @param result optional pre-allocated Transform to populate and return\r\n * @returns localToWorld frame for the points, or undefined if insufficient data\r\n */\r\n public static createFrameWithCCWPolygon(points: Point3d[], result?: Transform): Transform | undefined {\r\n if (points.length > 2) {\r\n const ray = PolygonOps.centroidAreaNormal(points); // can't pass pre-allocated ray...\r\n if (ray)\r\n return ray.toRigidZFrame(result);\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Create the localToWorld transform from a range to axes of its parent coordinate system.\r\n * @param range range to inspect\r\n * @param scaleSelect selects size of localToWorld axes.\r\n * @param fractionX fractional coordinate of frame origin x\r\n * @param fractionY fractional coordinate of frame origin y\r\n * @param fractionZ fractional coordinate of frame origin z\r\n * @param defaultAxisLength if true and any axis length is 0, that axis vector takes this physical length.\r\n * @param result optional pre-allocated Transform to populate and return\r\n * @returns localToWorld frame for the range\r\n */\r\n public static createLocalToWorldTransformInRange(\r\n range: Range3d,\r\n scaleSelect: AxisScaleSelect = AxisScaleSelect.NonUniformRangeContainment,\r\n fractionX: number = 0,\r\n fractionY: number = 0,\r\n fractionZ: number = 0,\r\n defaultAxisLength: number = 1.0,\r\n result?: Transform,\r\n ): Transform {\r\n if (range.isNull)\r\n return Transform.createIdentity(result);\r\n let a = 1.0;\r\n let b = 1.0;\r\n let c = 1.0;\r\n if (scaleSelect === AxisScaleSelect.LongestRangeDirection) {\r\n a = b = c = Geometry.correctSmallMetricDistance(range.maxLength(), defaultAxisLength);\r\n } else if (scaleSelect === AxisScaleSelect.NonUniformRangeContainment) {\r\n a = Geometry.correctSmallMetricDistance(range.xLength(), defaultAxisLength) * Geometry.maxAbsDiff(fractionX, 0, 1);\r\n b = Geometry.correctSmallMetricDistance(range.yLength(), defaultAxisLength) * Geometry.maxAbsDiff(fractionY, 0, 1);\r\n c = Geometry.correctSmallMetricDistance(range.zLength(), defaultAxisLength) * Geometry.maxAbsDiff(fractionZ, 0, 1);\r\n }\r\n const origin = FrameBuilder._workPoint = range.fractionToPoint(fractionX, fractionY, fractionZ, FrameBuilder._workPoint);\r\n const matrix = FrameBuilder._workMatrix = Matrix3d.createScale(a, b, c, FrameBuilder._workMatrix);\r\n return Transform.createOriginAndMatrix(origin, matrix, result);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"FrameBuilder.js","sourceRoot":"","sources":["../../../src/geometry3d/FrameBuilder.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,0CAA0C;AAC1C,0DAAyD;AACzD,0EAAuE;AACvE,0CAAuC;AACvC,8DAA2D;AAC3D,4DAAyD;AACzD,0DAAuD;AACvD,wDAAqD;AACrD,0CAAmE;AACnE,yDAAsD;AACtD,yCAAsC;AACtC,uDAAsD;AACtD,iDAA8C;AAC9C,6CAA0C;AAE1C,2CAAwC;AAExC,mEAAmE;AAEnE;;;;;;;;;;;;;;;GAeG;AACH,MAAa,YAAY;IASvB,uEAAuE;IAC/D,6BAA6B,CACnC,OAAiB,EAAE,OAAiB,EAAE,mBAA2B,mBAAQ,CAAC,iBAAiB;QAE3F,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,SAAS,EAAE;YAClD,MAAM,CAAC,GAAG,OAAO,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAC;YACtD,OAAO,CAAC,GAAG,gBAAgB,CAAC;SAC7B;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,kDAAkD;IAC3C,KAAK;QACV,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;IAC5B,CAAC;IACD;QACE,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IACD;;;;OAIG;IACI,iBAAiB,CAAC,kBAA2B,KAAK,EAAE,MAAkB;QAC3E,IAAI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IAAI,CAAC,GAAG,GAAG,CAAC;QACZ,IAAI,WAAW,KAAK,0BAAe,CAAC,qBAAqB,EAAE;YACzD,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,mBAAQ,CAAC,0BAA0B,CAAC,KAAK,CAAC,SAAS,EAAE,EAAE,iBAAiB,CAAC,CAAC;SACvF;aAAM,IAAI,WAAW,KAAK,0BAAe,CAAC,0BAA0B,EAAE;YACrE,CAAC,GAAG,mBAAQ,CAAC,0BAA0B,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,iBAAiB,CAAC,GAAG,mBAAQ,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YACnH,CAAC,GAAG,mBAAQ,CAAC,0BAA0B,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,iBAAiB,CAAC,GAAG,mBAAQ,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YACnH,CAAC,GAAG,mBAAQ,CAAC,0BAA0B,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,iBAAiB,CAAC,GAAG,mBAAQ,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;SACpH;QACD,MAAM,MAAM,GAAG,YAAY,CAAC,UAAU,GAAG,KAAK,CAAC,eAAe,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;QACzH,MAAM,MAAM,GAAG,YAAY,CAAC,WAAW,GAAG,mBAAQ,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;QAClG,OAAO,qBAAS,CAAC,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACjE,CAAC;CACF;AAtUD,oCAsUC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module CartesianGeometry\r\n */\r\n\r\n// import { Point2d } from \"./Geometry2d\";\r\nimport { BSplineCurve3d } from \"../bspline/BSplineCurve\";\r\nimport { InterpolationCurve3d } from \"../bspline/InterpolationCurve3d\";\r\nimport { Arc3d } from \"../curve/Arc3d\";\r\nimport { CurveCollection } from \"../curve/CurveCollection\";\r\nimport { CurvePrimitive } from \"../curve/CurvePrimitive\";\r\nimport { LineSegment3d } from \"../curve/LineSegment3d\";\r\nimport { LineString3d } from \"../curve/LineString3d\";\r\nimport { AxisOrder, AxisScaleSelect, Geometry } from \"../Geometry\";\r\nimport { GrowableXYZArray } from \"./GrowableXYZArray\";\r\nimport { Matrix3d } from \"./Matrix3d\";\r\nimport { Point3d, Vector3d } from \"./Point3dVector3d\";\r\nimport { Point3dArray } from \"./PointHelpers\";\r\nimport { PolygonOps } from \"./PolygonOps\";\r\nimport { Range3d } from \"./Range\";\r\nimport { Transform } from \"./Transform\";\r\n\r\n/* eslint-disable @typescript-eslint/naming-convention, no-empty */\r\n\r\n/**\r\n * Helper class to accumulate points and vectors until there is enough data to define a coordinate system.\r\n *\r\n * * For the common case of building a right handed frame:\r\n * * create the FrameBuilder and make calls to announcePoint and announceVector.\r\n * * the frame will be fully determined by an origin and two vectors.\r\n * * the first call to announcePoint will set the origin.\r\n * * additional calls to announcePoint will produce announceVector call with the vector from the origin.\r\n * * after each announcement, call getValidatedFrame(false)\r\n * * getValidatedFrame will succeed when it has two independent vectors.\r\n * * To build a left handed frame,\r\n * * an origin and 3 independent vectors are required.\r\n * * announce as above, but query with getValidatedFrame (true).\r\n * * this will use the third vector to select right or left handed frame.\r\n * @public\r\n */\r\nexport class FrameBuilder {\r\n private _origin: undefined | Point3d;\r\n private _vector0: undefined | Vector3d;\r\n private _vector1: undefined | Vector3d;\r\n private _vector2: undefined | Vector3d;\r\n private static _workMatrix?: Matrix3d;\r\n private static _workVector0?: Vector3d;\r\n private static _workVector1?: Vector3d;\r\n private static _workPoint?: Point3d;\r\n // test if both vectors are defined and have significant angle between.\r\n private areStronglyIndependentVectors(\r\n vector0: Vector3d, vector1: Vector3d, radiansTolerance: number = Geometry.smallAngleRadians,\r\n ): boolean {\r\n if (vector0 !== undefined && vector1 !== undefined) {\r\n const q = vector0.smallerUnorientedRadiansTo(vector1);\r\n return q > radiansTolerance;\r\n }\r\n return false;\r\n }\r\n /** Clear all accumulated point and vector data */\r\n public clear() {\r\n this._origin = undefined;\r\n this._vector0 = undefined;\r\n this._vector1 = undefined;\r\n this._vector2 = undefined;\r\n }\r\n constructor() {\r\n this.clear();\r\n }\r\n /**\r\n * Try to assemble the data into a non-singular transform.\r\n * * If allowLeftHanded is false, vector0 and vector1 determine a right handed coordinate system.\r\n * * if allowLeftHanded is true, the z vector of the right handed system can be flipped to agree with vector2 direction.\r\n */\r\n public getValidatedFrame(allowLeftHanded: boolean = false, result?: Transform): Transform | undefined {\r\n if (this._origin && this._vector0 && this._vector1) {\r\n const createRigidMatrix = (v0: Vector3d, v1: Vector3d): Matrix3d | undefined => {\r\n return FrameBuilder._workMatrix = Matrix3d.createRigidFromColumns(v0, v1, AxisOrder.XYZ, FrameBuilder._workMatrix);\r\n };\r\n if (!allowLeftHanded) {\r\n const matrix = createRigidMatrix(this._vector0, this._vector1);\r\n if (matrix)\r\n return Transform.createOriginAndMatrix(this._origin, matrix, result);\r\n // uh oh -- vector1 was not really independent. clear everything after vector0.\r\n this._vector1 = this._vector2 = undefined;\r\n } else if (this._vector2) {\r\n const matrix = createRigidMatrix(this._vector0, this._vector1);\r\n if (matrix) {\r\n if (this._vector0.tripleProduct(this._vector1, this._vector2) < 0)\r\n matrix.scaleColumns(1.0, 1.0, -1.0);\r\n return Transform.createOriginAndMatrix(this._origin, matrix, result);\r\n }\r\n // uh oh again -- clear vector1 and vector2, re-announce vector2 as possible vector1??\r\n const vector2 = this._vector2;\r\n this._vector1 = this._vector2 = undefined;\r\n this.announceVector(vector2);\r\n }\r\n }\r\n return undefined;\r\n }\r\n /** If vector0 is known but vector1 is not, make vector1 the cross of the up-vector and vector0 */\r\n public applyDefaultUpVector(vector?: Vector3d) {\r\n if (vector && this._vector0 && !this._vector1 && !vector.isParallelTo(this._vector0)) {\r\n this._vector1 = vector.crossProduct(this._vector0);\r\n }\r\n }\r\n /** Ask if there is a defined origin for the evolving frame */\r\n public get hasOrigin(): boolean {\r\n return this._origin !== undefined;\r\n }\r\n /**\r\n * Return the number of vectors saved. Because the save process checks numerics, this should be the rank of the system.\r\n */\r\n public savedVectorCount(): number {\r\n if (!this._vector0)\r\n return 0;\r\n if (!this._vector1)\r\n return 1;\r\n if (!this._vector2)\r\n return 2;\r\n return 3;\r\n }\r\n /**\r\n * Announce a new point. If this point is different from the origin, also compute and announce the vector from the origin.\r\n */\r\n public announcePoint(point: Point3d): number {\r\n if (!this._origin) {\r\n this._origin = point.clone();\r\n return this.savedVectorCount();\r\n }\r\n // the new point may provide an additional vector\r\n if (this._origin.isAlmostEqual(point))\r\n return this.savedVectorCount();\r\n return this.announceVector(this._origin.vectorTo(point));\r\n }\r\n /** Announce a new vector. */\r\n public announceVector(vector: Vector3d): number {\r\n if (vector.isAlmostZero)\r\n return this.savedVectorCount();\r\n if (!this._vector0) {\r\n this._vector0 = vector.clone(this._vector0);\r\n return 1;\r\n }\r\n if (!this._vector1) {\r\n if (this.areStronglyIndependentVectors(vector, this._vector0, 1.0e-5)) {\r\n this._vector1 = vector.clone(this._vector1);\r\n return 2;\r\n }\r\n return 1;\r\n }\r\n // vector0 and vector1 are independent.\r\n if (!this._vector2) {\r\n const unitPerpendicular = this._vector0.unitCrossProduct(this._vector1);\r\n if (unitPerpendicular && !Geometry.isSameCoordinate(0, unitPerpendicular.dotProduct(vector))) {\r\n this._vector2 = vector.clone(this._vector2);\r\n return 3;\r\n }\r\n return 2;\r\n }\r\n // fall through if prior vectors are all there -- no need for the new one.\r\n return 3;\r\n }\r\n /**\r\n * Inspect the content of the data. Announce points and vectors. Return when savedVectorCount becomes sufficient\r\n * for a coordinate system.\r\n */\r\n public announce(data: any) {\r\n if (this.savedVectorCount() > 1)\r\n return;\r\n if (data === undefined)\r\n return;\r\n if (data instanceof Point3d)\r\n this.announcePoint(data);\r\n else if (data instanceof Vector3d)\r\n this.announceVector(data);\r\n else if (Array.isArray(data)) {\r\n for (const child of data) {\r\n if (this.savedVectorCount() > 1)\r\n break;\r\n this.announce(child);\r\n }\r\n } else if (data instanceof CurvePrimitive) {\r\n if (data instanceof LineSegment3d) {\r\n this.announcePoint(data.startPoint());\r\n this.announcePoint(data.endPoint());\r\n } else if (data instanceof Arc3d) {\r\n const ray = data.fractionToPointAndDerivative(0.0);\r\n this.announcePoint(ray.origin);\r\n this.announceVector(ray.direction);\r\n this.announceVector(data.matrixRef.columnZCrossVector(ray.direction));\r\n } else if (data instanceof LineString3d) {\r\n for (const point of data.points) {\r\n this.announcePoint(point);\r\n if (this.savedVectorCount() > 1)\r\n break;\r\n }\r\n } else if (data instanceof BSplineCurve3d) {\r\n const point = Point3d.create();\r\n for (let i = 0; this.savedVectorCount() < 2; i++) {\r\n if (data.getPolePoint3d(i, point) instanceof Point3d)\r\n this.announcePoint(point);\r\n else break;\r\n }\r\n } else if (data instanceof InterpolationCurve3d) {\r\n const point = Point3d.create();\r\n for (let i = 0; this.savedVectorCount() < 2; i++) {\r\n if (i < data.options.fitPoints.length) {\r\n point.setFrom(data.options.fitPoints[i]);\r\n this.announcePoint(point);\r\n } else break;\r\n }\r\n } else { // unimplemented CurvePrimitive type\r\n const frame = data.fractionToFrenetFrame(0.0);\r\n if (undefined !== frame) {\r\n this.announcePoint(frame.getOrigin());\r\n this.announceVector(frame.matrix.getColumn(0));\r\n this.announceVector(frame.matrix.getColumn(1));\r\n }\r\n }\r\n } else if (data instanceof CurveCollection) {\r\n if (data.children)\r\n for (const child of data.children) {\r\n this.announce(child);\r\n if (this.savedVectorCount() > 1)\r\n break;\r\n }\r\n } else if (data instanceof GrowableXYZArray) {\r\n const point = Point3d.create();\r\n for (let i = 0; this.savedVectorCount() < 2; i++) {\r\n if (data.getPoint3dAtCheckedPointIndex(i, point) instanceof Point3d)\r\n this.announcePoint(point);\r\n else break;\r\n }\r\n } else if (data.hasOwnProperty(\"x\") && data.hasOwnProperty(\"y\") && data.hasOwnProperty(\"z\")) {\r\n this.announcePoint(Point3d.create(data.x, data.y, data.z));\r\n }\r\n }\r\n /**\r\n * Create a localToWorld frame for the given data.\r\n * * origin is at first point.\r\n * * x axis in direction of first nonzero vector present or implied by the input.\r\n * * y axis is perpendicular to x and contains (in positive side) the next vector present or implied by the input.\r\n * * The calculation favors the first points found. It does not try to get a \"best\" plane.\r\n * @param defaultUpVector optional vector to cross with vector0 to create vector1 when it is unknown\r\n * @param params any number of geometric objects to examine in [[announce]] for point/vector data sufficient to construct a frame.\r\n * If the last argument is a `Transform`, it is populated with the computed frame and returned.\r\n * @returns computed localToWorld frame, or undefined if insufficient data.\r\n */\r\n public static createRightHandedFrame(defaultUpVector: Vector3d | undefined, ...params: any[]): Transform | undefined {\r\n // if last arg is a Transform, remove it from the array and use for the return value\r\n let frame = (params.length > 0 && params[params.length - 1] instanceof Transform) ? params.pop() as Transform : undefined;\r\n const builder = new FrameBuilder();\r\n for (const data of params) {\r\n builder.announce(data);\r\n builder.applyDefaultUpVector(defaultUpVector);\r\n if (frame = builder.getValidatedFrame(false, frame)) {\r\n if (defaultUpVector) {\r\n if (frame.matrix.dotColumnZ(defaultUpVector) < 0.0)\r\n frame.matrix.scaleColumnsInPlace(1, -1, -1);\r\n }\r\n return frame;\r\n }\r\n }\r\n const evaluatePrimitiveFrame = (curve: CurvePrimitive, result?: Transform): Transform | undefined => {\r\n return curve.fractionToFrenetFrame(0.0, result);\r\n };\r\n // try direct evaluation of curve primitives using the above lambda\r\n for (const data of params) {\r\n if (data instanceof CurvePrimitive) {\r\n return evaluatePrimitiveFrame(data, frame);\r\n } else if (data instanceof CurveCollection) {\r\n const children = data.collectCurvePrimitives();\r\n for (const curve of children) {\r\n if (frame = evaluatePrimitiveFrame(curve, frame))\r\n return frame;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Create a transform containing points or vectors in the given data.\r\n * * The xy columns of the transform contain the first points or vectors of the data.\r\n * * The z column is perpendicular to that xy plane.\r\n * * The calculation favors the first points found. It does not try to get a \"best\" plane.\r\n * @param params any number of geometric objects to examine in [[announce]] for point/vector data sufficient to construct a frame.\r\n * If the last argument is a `Transform`, it is populated with the computed frame and returned.\r\n * @returns computed localToWorld frame, or undefined if insufficient data.\r\n */\r\n public static createRightHandedLocalToWorld(...params: any[]): Transform | undefined {\r\n return this.createRightHandedFrame(undefined, params);\r\n }\r\n\r\n /**\r\n * Try to create a frame whose xy plane is through points.\r\n * * If 3 or more distinct points are present, the x axis is from the first point to the most distant, and y\r\n * direction is toward the point most distant from that line.\r\n * @param points array of points\r\n * @param result optional pre-allocated Transform to populate and return\r\n * @returns localToWorld frame for the points, or undefined if insufficient data\r\n */\r\n public static createFrameToDistantPoints(points: Point3d[], result?: Transform): Transform | undefined {\r\n if (points.length > 2) {\r\n const origin = points[0];\r\n const vector01 = FrameBuilder._workVector0 ?? Vector3d.create();\r\n Point3dArray.indexOfMostDistantPoint(points, points[0], vector01);\r\n const vector02 = FrameBuilder._workVector1 ?? Vector3d.create();\r\n Point3dArray.indexOfPointWithMaxCrossProductMagnitude(points, origin, vector01, vector02);\r\n const matrix = FrameBuilder._workMatrix = Matrix3d.createRigidFromColumns(vector01, vector02, AxisOrder.XYZ, FrameBuilder._workMatrix);\r\n if (matrix)\r\n return Transform.createOriginAndMatrix(origin, matrix, result);\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Try to create a frame whose xy plane is through points, with the points appearing CCW in the local frame.\r\n * * If 3 or more distinct points are present, the x axis is from the first point to the most distant, and y\r\n * direction is toward the point most distant from that line.\r\n * @param points array of points\r\n * @param result optional pre-allocated Transform to populate and return\r\n * @returns localToWorld frame for the points, or undefined if insufficient data\r\n */\r\n public static createFrameWithCCWPolygon(points: Point3d[], result?: Transform): Transform | undefined {\r\n if (points.length > 2) {\r\n const ray = PolygonOps.centroidAreaNormal(points); // can't pass pre-allocated ray...\r\n if (ray)\r\n return ray.toRigidZFrame(result);\r\n }\r\n return undefined;\r\n }\r\n /**\r\n * Create the localToWorld transform from a range to axes of its parent coordinate system.\r\n * @param range range to inspect\r\n * @param scaleSelect selects size of localToWorld axes.\r\n * @param fractionX fractional coordinate of frame origin x\r\n * @param fractionY fractional coordinate of frame origin y\r\n * @param fractionZ fractional coordinate of frame origin z\r\n * @param defaultAxisLength if true and any axis length is 0, that axis vector takes this physical length.\r\n * @param result optional pre-allocated Transform to populate and return\r\n * @returns localToWorld frame for the range\r\n */\r\n public static createLocalToWorldTransformInRange(\r\n range: Range3d,\r\n scaleSelect: AxisScaleSelect = AxisScaleSelect.NonUniformRangeContainment,\r\n fractionX: number = 0,\r\n fractionY: number = 0,\r\n fractionZ: number = 0,\r\n defaultAxisLength: number = 1.0,\r\n result?: Transform,\r\n ): Transform {\r\n if (range.isNull)\r\n return Transform.createIdentity(result);\r\n let a = 1.0;\r\n let b = 1.0;\r\n let c = 1.0;\r\n if (scaleSelect === AxisScaleSelect.LongestRangeDirection) {\r\n a = b = c = Geometry.correctSmallMetricDistance(range.maxLength(), defaultAxisLength);\r\n } else if (scaleSelect === AxisScaleSelect.NonUniformRangeContainment) {\r\n a = Geometry.correctSmallMetricDistance(range.xLength(), defaultAxisLength) * Geometry.maxAbsDiff(fractionX, 0, 1);\r\n b = Geometry.correctSmallMetricDistance(range.yLength(), defaultAxisLength) * Geometry.maxAbsDiff(fractionY, 0, 1);\r\n c = Geometry.correctSmallMetricDistance(range.zLength(), defaultAxisLength) * Geometry.maxAbsDiff(fractionZ, 0, 1);\r\n }\r\n const origin = FrameBuilder._workPoint = range.fractionToPoint(fractionX, fractionY, fractionZ, FrameBuilder._workPoint);\r\n const matrix = FrameBuilder._workMatrix = Matrix3d.createScale(a, b, c, FrameBuilder._workMatrix);\r\n return Transform.createOriginAndMatrix(origin, matrix, result);\r\n }\r\n}\r\n"]}
@@ -142,17 +142,23 @@ export declare class GrowableXYZArray extends IndexedReadWriteXYZCollection {
142
142
  */
143
143
  clear(): void;
144
144
  /**
145
- * Get a point by index, strongly typed as a Point3d. This is unchecked. Use getPoint3dAtCheckedPointIndex to have validity test.
145
+ * Get a point by index, strongly typed as a Point3d. This is unchecked. Use [[getPoint3dAtCheckedPointIndex]] to have validity test.
146
146
  * @param pointIndex index to access
147
147
  * @param result optional result
148
148
  */
149
149
  getPoint3dAtUncheckedPointIndex(pointIndex: number, result?: Point3d): Point3d;
150
150
  /**
151
- * Get a point by index, strongly typed as a Point2d. This is unchecked. Use getPoint2dAtCheckedPointIndex to have validity test.
151
+ * Get a point by index, strongly typed as a Point2d. This is unchecked. Use [[getPoint2dAtCheckedPointIndex]] to have validity test.
152
152
  * @param pointIndex index to access
153
153
  * @param result optional result
154
154
  */
155
155
  getPoint2dAtUncheckedPointIndex(pointIndex: number, result?: Point2d): Point2d;
156
+ /**
157
+ * Get a vector by index, strongly typed as a Vector3d. This is unchecked. Use [[getVector3dAtCheckedVectorIndex]] to have validity test.
158
+ * @param vectorIndex index to access
159
+ * @param result optional result
160
+ */
161
+ getVector3dAtUncheckedVectorIndex(vectorIndex: number, result?: Vector3d): Vector3d;
156
162
  /** copy xyz into strongly typed Point3d */
157
163
  getPoint3dAtCheckedPointIndex(pointIndex: number, result?: Point3d): Point3d | undefined;
158
164
  /** access x of indexed point */
@@ -1 +1 @@
1
- {"version":3,"file":"GrowableXYZArray.d.ts","sourceRoot":"","sources":["../../../src/geometry3d/GrowableXYZArray.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,EAAY,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,6BAA6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ends IndexedXYZCollection_1.IndexedReadWriteXYZCollect
286
286
  this._xyzInUse = 0;
287
287
  }
288
288
  /**
289
- * Get a point by index, strongly typed as a Point3d. This is unchecked. Use getPoint3dAtCheckedPointIndex to have validity test.
289
+ * Get a point by index, strongly typed as a Point3d. This is unchecked. Use [[getPoint3dAtCheckedPointIndex]] to have validity test.
290
290
  * @param pointIndex index to access
291
291
  * @param result optional result
292
292
  */
@@ -295,7 +295,7 @@ class GrowableXYZArray extends IndexedXYZCollection_1.IndexedReadWriteXYZCollect
295
295
  return Point3dVector3d_1.Point3d.create(this._data[index], this._data[index + 1], this._data[index + 2], result);
296
296
  }
297
297
  /**
298
- * Get a point by index, strongly typed as a Point2d. This is unchecked. Use getPoint2dAtCheckedPointIndex to have validity test.
298
+ * Get a point by index, strongly typed as a Point2d. This is unchecked. Use [[getPoint2dAtCheckedPointIndex]] to have validity test.
299
299
  * @param pointIndex index to access
300
300
  * @param result optional result
301
301
  */
@@ -303,6 +303,15 @@ class GrowableXYZArray extends IndexedXYZCollection_1.IndexedReadWriteXYZCollect
303
303
  const index = 3 * pointIndex;
304
304
  return Point2dVector2d_1.Point2d.create(this._data[index], this._data[index + 1], result);
305
305
  }
306
+ /**
307
+ * Get a vector by index, strongly typed as a Vector3d. This is unchecked. Use [[getVector3dAtCheckedVectorIndex]] to have validity test.
308
+ * @param vectorIndex index to access
309
+ * @param result optional result
310
+ */
311
+ getVector3dAtUncheckedVectorIndex(vectorIndex, result) {
312
+ const index = 3 * vectorIndex;
313
+ return Point3dVector3d_1.Vector3d.create(this._data[index], this._data[index + 1], this._data[index + 2], result);
314
+ }
306
315
  /** copy xyz into strongly typed Point3d */
307
316
  getPoint3dAtCheckedPointIndex(pointIndex, result) {
308
317
  if (this.isIndexValid(pointIndex)) {