@itwin/core-geometry 5.0.0-dev.11 → 5.0.0-dev.111

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 (1066) hide show
  1. package/CHANGELOG.md +71 -1
  2. package/lib/cjs/Constant.js +17 -17
  3. package/lib/cjs/Constant.js.map +1 -1
  4. package/lib/cjs/Geometry.d.ts +13 -4
  5. package/lib/cjs/Geometry.d.ts.map +1 -1
  6. package/lib/cjs/Geometry.js +51 -39
  7. package/lib/cjs/Geometry.js.map +1 -1
  8. package/lib/cjs/bspline/AkimaCurve3d.js +3 -1
  9. package/lib/cjs/bspline/AkimaCurve3d.js.map +1 -1
  10. package/lib/cjs/bspline/BSpline1dNd.d.ts +90 -54
  11. package/lib/cjs/bspline/BSpline1dNd.d.ts.map +1 -1
  12. package/lib/cjs/bspline/BSpline1dNd.js +137 -84
  13. package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
  14. package/lib/cjs/bspline/BSplineCurve.d.ts +193 -155
  15. package/lib/cjs/bspline/BSplineCurve.d.ts.map +1 -1
  16. package/lib/cjs/bspline/BSplineCurve.js +249 -181
  17. package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
  18. package/lib/cjs/bspline/BSplineCurve3dH.js +1 -0
  19. package/lib/cjs/bspline/BSplineCurve3dH.js.map +1 -1
  20. package/lib/cjs/bspline/BSplineCurveOps.d.ts.map +1 -1
  21. package/lib/cjs/bspline/BSplineCurveOps.js +18 -21
  22. package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
  23. package/lib/cjs/bspline/BSplineSurface.js +22 -2
  24. package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
  25. package/lib/cjs/bspline/Bezier1dNd.js +6 -0
  26. package/lib/cjs/bspline/Bezier1dNd.js.map +1 -1
  27. package/lib/cjs/bspline/BezierCurve3d.d.ts +3 -1
  28. package/lib/cjs/bspline/BezierCurve3d.d.ts.map +1 -1
  29. package/lib/cjs/bspline/BezierCurve3d.js +5 -5
  30. package/lib/cjs/bspline/BezierCurve3d.js.map +1 -1
  31. package/lib/cjs/bspline/BezierCurve3dH.js +2 -0
  32. package/lib/cjs/bspline/BezierCurve3dH.js.map +1 -1
  33. package/lib/cjs/bspline/BezierCurveBase.d.ts.map +1 -1
  34. package/lib/cjs/bspline/BezierCurveBase.js +21 -2
  35. package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
  36. package/lib/cjs/bspline/InterpolationCurve3d.js +12 -1
  37. package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
  38. package/lib/cjs/bspline/KnotVector.d.ts +82 -60
  39. package/lib/cjs/bspline/KnotVector.d.ts.map +1 -1
  40. package/lib/cjs/bspline/KnotVector.js +144 -84
  41. package/lib/cjs/bspline/KnotVector.js.map +1 -1
  42. package/lib/cjs/bspline/SurfaceLocationDetail.js +12 -0
  43. package/lib/cjs/bspline/SurfaceLocationDetail.js.map +1 -1
  44. package/lib/cjs/clipping/AlternatingConvexClipTree.js +14 -13
  45. package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
  46. package/lib/cjs/clipping/BooleanClipFactory.js.map +1 -1
  47. package/lib/cjs/clipping/BooleanClipNode.js +4 -0
  48. package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
  49. package/lib/cjs/clipping/ClipPlane.js +10 -1
  50. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  51. package/lib/cjs/clipping/ClipPrimitive.js +19 -0
  52. package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
  53. package/lib/cjs/clipping/ClipUtils.js +5 -1
  54. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  55. package/lib/cjs/clipping/ClipVector.js +11 -8
  56. package/lib/cjs/clipping/ClipVector.js.map +1 -1
  57. package/lib/cjs/clipping/ConvexClipPlaneSet.js +5 -3
  58. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  59. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js +2 -1
  60. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  61. package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js +3 -0
  62. package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  63. package/lib/cjs/core-geometry.d.ts +1 -0
  64. package/lib/cjs/core-geometry.d.ts.map +1 -1
  65. package/lib/cjs/core-geometry.js +1 -0
  66. package/lib/cjs/core-geometry.js.map +1 -1
  67. package/lib/cjs/curve/Arc3d.d.ts +20 -4
  68. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  69. package/lib/cjs/curve/Arc3d.js +86 -21
  70. package/lib/cjs/curve/Arc3d.js.map +1 -1
  71. package/lib/cjs/curve/ConstructCurveBetweenCurves.js +3 -0
  72. package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
  73. package/lib/cjs/curve/CoordinateXYZ.js +3 -2
  74. package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
  75. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +0 -2
  76. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
  77. package/lib/cjs/curve/CurveChainWithDistanceIndex.js +25 -10
  78. package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
  79. package/lib/cjs/curve/CurveCollection.d.ts +10 -0
  80. package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
  81. package/lib/cjs/curve/CurveCollection.js +35 -9
  82. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  83. package/lib/cjs/curve/CurveCurve.js.map +1 -1
  84. package/lib/cjs/curve/CurveExtendMode.d.ts +13 -5
  85. package/lib/cjs/curve/CurveExtendMode.d.ts.map +1 -1
  86. package/lib/cjs/curve/CurveExtendMode.js +19 -15
  87. package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
  88. package/lib/cjs/curve/CurveFactory.d.ts +87 -53
  89. package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
  90. package/lib/cjs/curve/CurveFactory.js +213 -135
  91. package/lib/cjs/curve/CurveFactory.js.map +1 -1
  92. package/lib/cjs/curve/CurveLocationDetail.js +44 -0
  93. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  94. package/lib/cjs/curve/CurveOps.js.map +1 -1
  95. package/lib/cjs/curve/CurvePrimitive.d.ts +74 -18
  96. package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
  97. package/lib/cjs/curve/CurvePrimitive.js +86 -18
  98. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  99. package/lib/cjs/curve/CurveProcessor.js +2 -0
  100. package/lib/cjs/curve/CurveProcessor.js.map +1 -1
  101. package/lib/cjs/curve/CurveTypes.js.map +1 -1
  102. package/lib/cjs/curve/CurveWireMomentsXYZ.js +2 -0
  103. package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
  104. package/lib/cjs/curve/GeometryQuery.js.map +1 -1
  105. package/lib/cjs/curve/LineSegment3d.js +6 -2
  106. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  107. package/lib/cjs/curve/LineString3d.d.ts +8 -7
  108. package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
  109. package/lib/cjs/curve/LineString3d.js +52 -29
  110. package/lib/cjs/curve/LineString3d.js.map +1 -1
  111. package/lib/cjs/curve/Loop.js +12 -4
  112. package/lib/cjs/curve/Loop.js.map +1 -1
  113. package/lib/cjs/curve/OffsetOptions.js +25 -21
  114. package/lib/cjs/curve/OffsetOptions.js.map +1 -1
  115. package/lib/cjs/curve/ParityRegion.js +4 -2
  116. package/lib/cjs/curve/ParityRegion.js.map +1 -1
  117. package/lib/cjs/curve/Path.js +2 -2
  118. package/lib/cjs/curve/Path.js.map +1 -1
  119. package/lib/cjs/curve/PointString3d.js +3 -2
  120. package/lib/cjs/curve/PointString3d.js.map +1 -1
  121. package/lib/cjs/curve/ProxyCurve.js +1 -0
  122. package/lib/cjs/curve/ProxyCurve.js.map +1 -1
  123. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js +1 -0
  124. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  125. package/lib/cjs/curve/Query/CurveSplitContext.js +3 -0
  126. package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
  127. package/lib/cjs/curve/Query/CylindricalRange.js +6 -2
  128. package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
  129. package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
  130. package/lib/cjs/curve/Query/PlanarSubdivision.js +4 -6
  131. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  132. package/lib/cjs/curve/Query/StrokeCountChain.js +12 -0
  133. package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
  134. package/lib/cjs/curve/Query/StrokeCountMap.js +14 -0
  135. package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
  136. package/lib/cjs/curve/RegionMomentsXY.js +4 -5
  137. package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
  138. package/lib/cjs/curve/RegionOps.js +9 -10
  139. package/lib/cjs/curve/RegionOps.js.map +1 -1
  140. package/lib/cjs/curve/RegionOpsClassificationSweeps.js +24 -1
  141. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  142. package/lib/cjs/curve/StrokeOptions.d.ts +10 -5
  143. package/lib/cjs/curve/StrokeOptions.d.ts.map +1 -1
  144. package/lib/cjs/curve/StrokeOptions.js +30 -8
  145. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  146. package/lib/cjs/curve/UnionRegion.js +4 -2
  147. package/lib/cjs/curve/UnionRegion.js.map +1 -1
  148. package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.d.ts +71 -0
  149. package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.d.ts.map +1 -0
  150. package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.js +181 -0
  151. package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -0
  152. package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js +13 -7
  153. package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  154. package/lib/cjs/curve/internalContexts/ChainCollectorContext.js +6 -0
  155. package/lib/cjs/curve/internalContexts/ChainCollectorContext.js.map +1 -1
  156. package/lib/cjs/curve/internalContexts/CloneCurvesContext.js +2 -0
  157. package/lib/cjs/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  158. package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  159. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.d.ts +21 -5
  160. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.d.ts.map +1 -1
  161. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js +53 -20
  162. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  163. package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js +3 -0
  164. package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  165. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +18 -5
  166. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  167. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +26 -13
  168. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  169. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js +11 -5
  170. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  171. package/lib/cjs/curve/internalContexts/CurveLengthContext.js +6 -0
  172. package/lib/cjs/curve/internalContexts/CurveLengthContext.js.map +1 -1
  173. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js +8 -6
  174. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  175. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js +38 -5
  176. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
  177. package/lib/cjs/curve/internalContexts/GapSearchContext.js +1 -0
  178. package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
  179. package/lib/cjs/curve/internalContexts/MultiChainCollector.js +12 -0
  180. package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
  181. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts +5 -3
  182. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts.map +1 -1
  183. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js +6 -3
  184. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  185. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js +7 -0
  186. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  187. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +22 -4
  188. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  189. package/lib/cjs/curve/internalContexts/SumLengthsContext.js +1 -0
  190. package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
  191. package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js +3 -0
  192. package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  193. package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js +2 -0
  194. package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  195. package/lib/cjs/curve/spiral/ClothoidSeries.js +4 -0
  196. package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
  197. package/lib/cjs/curve/spiral/CubicEvaluator.js +2 -0
  198. package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
  199. package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js +4 -0
  200. package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  201. package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js +5 -0
  202. package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  203. package/lib/cjs/curve/spiral/DirectSpiral3d.js +12 -2
  204. package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
  205. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js +24 -4
  206. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  207. package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js +2 -0
  208. package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  209. package/lib/cjs/curve/spiral/NormalizedTransition.js +5 -0
  210. package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
  211. package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js +2 -0
  212. package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  213. package/lib/cjs/curve/spiral/TransitionConditionalProperties.js +10 -0
  214. package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  215. package/lib/cjs/curve/spiral/TransitionSpiral3d.js +10 -0
  216. package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
  217. package/lib/cjs/curve/spiral/XYCurveEvaluator.js +6 -0
  218. package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
  219. package/lib/cjs/geometry3d/Angle.js +18 -16
  220. package/lib/cjs/geometry3d/Angle.js.map +1 -1
  221. package/lib/cjs/geometry3d/AngleSweep.d.ts +8 -3
  222. package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
  223. package/lib/cjs/geometry3d/AngleSweep.js +22 -10
  224. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  225. package/lib/cjs/geometry3d/BarycentricTriangle.js +25 -0
  226. package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
  227. package/lib/cjs/geometry3d/BilinearPatch.js +8 -0
  228. package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
  229. package/lib/cjs/geometry3d/CoincidentGeometryOps.js +5 -0
  230. package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
  231. package/lib/cjs/geometry3d/Ellipsoid.d.ts +8 -7
  232. package/lib/cjs/geometry3d/Ellipsoid.d.ts.map +1 -1
  233. package/lib/cjs/geometry3d/Ellipsoid.js +63 -14
  234. package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
  235. package/lib/cjs/geometry3d/FrameBuilder.js +12 -4
  236. package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
  237. package/lib/cjs/geometry3d/FrustumAnimation.js +7 -0
  238. package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
  239. package/lib/cjs/geometry3d/GeometryHandler.d.ts +15 -16
  240. package/lib/cjs/geometry3d/GeometryHandler.d.ts.map +1 -1
  241. package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
  242. package/lib/cjs/geometry3d/GrowableBlockedArray.js +12 -0
  243. package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
  244. package/lib/cjs/geometry3d/GrowableFloat64Array.js +3 -0
  245. package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
  246. package/lib/cjs/geometry3d/GrowableXYArray.d.ts +0 -5
  247. package/lib/cjs/geometry3d/GrowableXYArray.d.ts.map +1 -1
  248. package/lib/cjs/geometry3d/GrowableXYArray.js +16 -7
  249. package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
  250. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +32 -10
  251. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  252. package/lib/cjs/geometry3d/GrowableXYZArray.js +70 -16
  253. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  254. package/lib/cjs/geometry3d/IndexedCollectionInterval.js +6 -0
  255. package/lib/cjs/geometry3d/IndexedCollectionInterval.js.map +1 -1
  256. package/lib/cjs/geometry3d/IndexedXYCollection.js +1 -0
  257. package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
  258. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +13 -2
  259. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  260. package/lib/cjs/geometry3d/IndexedXYZCollection.js +26 -11
  261. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  262. package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.js +3 -0
  263. package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  264. package/lib/cjs/geometry3d/Matrix3d.d.ts +13 -15
  265. package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
  266. package/lib/cjs/geometry3d/Matrix3d.js +47 -26
  267. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  268. package/lib/cjs/geometry3d/OrderedRotationAngles.js +10 -2
  269. package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
  270. package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
  271. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js +2 -0
  272. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  273. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js +7 -0
  274. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  275. package/lib/cjs/geometry3d/Point2dArrayCarrier.js +2 -0
  276. package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
  277. package/lib/cjs/geometry3d/Point2dVector2d.js +4 -0
  278. package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
  279. package/lib/cjs/geometry3d/Point3dArrayCarrier.js +3 -1
  280. package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
  281. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +7 -10
  282. package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
  283. package/lib/cjs/geometry3d/Point3dVector3d.js +16 -10
  284. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  285. package/lib/cjs/geometry3d/PointHelpers.d.ts +15 -4
  286. package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
  287. package/lib/cjs/geometry3d/PointHelpers.js +29 -8
  288. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  289. package/lib/cjs/geometry3d/PointStreaming.js +12 -4
  290. package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
  291. package/lib/cjs/geometry3d/PolygonOps.d.ts +2 -2
  292. package/lib/cjs/geometry3d/PolygonOps.js +62 -25
  293. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  294. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +7 -3
  295. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  296. package/lib/cjs/geometry3d/PolylineOps.d.ts +9 -5
  297. package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
  298. package/lib/cjs/geometry3d/PolylineOps.js +12 -5
  299. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  300. package/lib/cjs/geometry3d/Range.js +21 -4
  301. package/lib/cjs/geometry3d/Range.js.map +1 -1
  302. package/lib/cjs/geometry3d/Ray2d.js +2 -0
  303. package/lib/cjs/geometry3d/Ray2d.js.map +1 -1
  304. package/lib/cjs/geometry3d/Ray3d.d.ts +2 -2
  305. package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
  306. package/lib/cjs/geometry3d/Ray3d.js +20 -11
  307. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  308. package/lib/cjs/geometry3d/ReusableObjectCache.js +4 -0
  309. package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
  310. package/lib/cjs/geometry3d/Segment1d.js +4 -0
  311. package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
  312. package/lib/cjs/geometry3d/SortablePolygon.js +11 -0
  313. package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
  314. package/lib/cjs/geometry3d/Transform.d.ts +1 -1
  315. package/lib/cjs/geometry3d/Transform.js +4 -1
  316. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  317. package/lib/cjs/geometry3d/UVSurfaceOps.js.map +1 -1
  318. package/lib/cjs/geometry3d/XYZProps.js.map +1 -1
  319. package/lib/cjs/geometry3d/YawPitchRollAngles.js +6 -0
  320. package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
  321. package/lib/cjs/geometry4d/Map4d.js +2 -0
  322. package/lib/cjs/geometry4d/Map4d.js.map +1 -1
  323. package/lib/cjs/geometry4d/Matrix4d.js +1 -0
  324. package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
  325. package/lib/cjs/geometry4d/MomentData.d.ts +72 -73
  326. package/lib/cjs/geometry4d/MomentData.d.ts.map +1 -1
  327. package/lib/cjs/geometry4d/MomentData.js +90 -66
  328. package/lib/cjs/geometry4d/MomentData.js.map +1 -1
  329. package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js +6 -0
  330. package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  331. package/lib/cjs/geometry4d/Point4d.js +2 -0
  332. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  333. package/lib/cjs/numerics/BandedSystem.js.map +1 -1
  334. package/lib/cjs/numerics/BezierPolynomials.js +8 -0
  335. package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
  336. package/lib/cjs/numerics/ClusterableArray.js +29 -13
  337. package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
  338. package/lib/cjs/numerics/Complex.js +2 -0
  339. package/lib/cjs/numerics/Complex.js.map +1 -1
  340. package/lib/cjs/numerics/ConvexPolygon2d.js +3 -0
  341. package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
  342. package/lib/cjs/numerics/Newton.js +59 -4
  343. package/lib/cjs/numerics/Newton.js.map +1 -1
  344. package/lib/cjs/numerics/PascalCoefficients.js +1 -1
  345. package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
  346. package/lib/cjs/numerics/PolarData.js +13 -1
  347. package/lib/cjs/numerics/PolarData.js.map +1 -1
  348. package/lib/cjs/numerics/Polynomials.js +64 -26
  349. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  350. package/lib/cjs/numerics/Quadrature.js +26 -20
  351. package/lib/cjs/numerics/Quadrature.js.map +1 -1
  352. package/lib/cjs/numerics/Range1dArray.js.map +1 -1
  353. package/lib/cjs/numerics/SmallSystem.js.map +1 -1
  354. package/lib/cjs/numerics/TriDiagonalSystem.js +11 -0
  355. package/lib/cjs/numerics/TriDiagonalSystem.js.map +1 -1
  356. package/lib/cjs/numerics/UnionFind.js +1 -0
  357. package/lib/cjs/numerics/UnionFind.js.map +1 -1
  358. package/lib/cjs/numerics/UsageSums.js +10 -0
  359. package/lib/cjs/numerics/UsageSums.js.map +1 -1
  360. package/lib/cjs/polyface/AuxData.js +16 -0
  361. package/lib/cjs/polyface/AuxData.js.map +1 -1
  362. package/lib/cjs/polyface/BoxTopology.js +67 -67
  363. package/lib/cjs/polyface/BoxTopology.js.map +1 -1
  364. package/lib/cjs/polyface/FacetFaceData.d.ts +1 -1
  365. package/lib/cjs/polyface/FacetFaceData.js +3 -1
  366. package/lib/cjs/polyface/FacetFaceData.js.map +1 -1
  367. package/lib/cjs/polyface/FacetLocationDetail.js +30 -0
  368. package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
  369. package/lib/cjs/polyface/FacetOrientation.js +12 -1
  370. package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
  371. package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js +18 -2
  372. package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  373. package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts +33 -23
  374. package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
  375. package/lib/cjs/polyface/IndexedEdgeMatcher.js +63 -33
  376. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  377. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +4 -3
  378. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  379. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +16 -5
  380. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  381. package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts +233 -0
  382. package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts.map +1 -0
  383. package/lib/cjs/polyface/IndexedPolyfaceWalker.js +353 -0
  384. package/lib/cjs/polyface/IndexedPolyfaceWalker.js.map +1 -0
  385. package/lib/cjs/polyface/Polyface.d.ts +43 -14
  386. package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
  387. package/lib/cjs/polyface/Polyface.js +90 -19
  388. package/lib/cjs/polyface/Polyface.js.map +1 -1
  389. package/lib/cjs/polyface/PolyfaceBuilder.d.ts +14 -27
  390. package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
  391. package/lib/cjs/polyface/PolyfaceBuilder.js +47 -79
  392. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  393. package/lib/cjs/polyface/PolyfaceClip.js +8 -0
  394. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  395. package/lib/cjs/polyface/PolyfaceData.d.ts +36 -3
  396. package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
  397. package/lib/cjs/polyface/PolyfaceData.js +114 -8
  398. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  399. package/lib/cjs/polyface/PolyfaceQuery.js +47 -7
  400. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  401. package/lib/cjs/polyface/RangeLengthData.js +7 -0
  402. package/lib/cjs/polyface/RangeLengthData.js.map +1 -1
  403. package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js +12 -0
  404. package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
  405. package/lib/cjs/polyface/RangeTree/MinimumValueTester.js +5 -2
  406. package/lib/cjs/polyface/RangeTree/MinimumValueTester.js.map +1 -1
  407. package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js +12 -0
  408. package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
  409. package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js +14 -0
  410. package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
  411. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js +5 -0
  412. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  413. package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js +43 -0
  414. package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
  415. package/lib/cjs/polyface/TaggedNumericData.js +8 -0
  416. package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
  417. package/lib/cjs/polyface/TriangleCandidate.js +3 -0
  418. package/lib/cjs/polyface/TriangleCandidate.js.map +1 -1
  419. package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js +7 -0
  420. package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  421. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js +6 -0
  422. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  423. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js +3 -0
  424. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  425. package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js +3 -0
  426. package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  427. package/lib/cjs/polyface/multiclip/OffsetMeshContext.js +32 -0
  428. package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  429. package/lib/cjs/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  430. package/lib/cjs/polyface/multiclip/RangeSearch.js +5 -5
  431. package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
  432. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js +21 -8
  433. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  434. package/lib/cjs/polyface/multiclip/XYPointBuckets.js +6 -0
  435. package/lib/cjs/polyface/multiclip/XYPointBuckets.js.map +1 -1
  436. package/lib/cjs/serialization/BGFBAccessors.d.ts +35 -9
  437. package/lib/cjs/serialization/BGFBAccessors.d.ts.map +1 -1
  438. package/lib/cjs/serialization/BGFBAccessors.js +141 -179
  439. package/lib/cjs/serialization/BGFBAccessors.js.map +1 -1
  440. package/lib/cjs/serialization/BGFBReader.d.ts +2 -2
  441. package/lib/cjs/serialization/BGFBReader.d.ts.map +1 -1
  442. package/lib/cjs/serialization/BGFBReader.js +75 -62
  443. package/lib/cjs/serialization/BGFBReader.js.map +1 -1
  444. package/lib/cjs/serialization/BGFBWriter.d.ts +5 -1
  445. package/lib/cjs/serialization/BGFBWriter.d.ts.map +1 -1
  446. package/lib/cjs/serialization/BGFBWriter.js +18 -3
  447. package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
  448. package/lib/cjs/serialization/BentleyGeometryFlatBuffer.js +1 -0
  449. package/lib/cjs/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  450. package/lib/cjs/serialization/DeepCompare.js +17 -17
  451. package/lib/cjs/serialization/DeepCompare.js.map +1 -1
  452. package/lib/cjs/serialization/GeometrySamples.d.ts +5 -5
  453. package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
  454. package/lib/cjs/serialization/GeometrySamples.js +113 -112
  455. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  456. package/lib/cjs/serialization/IModelJsonSchema.d.ts +78 -64
  457. package/lib/cjs/serialization/IModelJsonSchema.d.ts.map +1 -1
  458. package/lib/cjs/serialization/IModelJsonSchema.js +107 -83
  459. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  460. package/lib/cjs/serialization/SerializationHelpers.d.ts +36 -0
  461. package/lib/cjs/serialization/SerializationHelpers.d.ts.map +1 -1
  462. package/lib/cjs/serialization/SerializationHelpers.js +117 -0
  463. package/lib/cjs/serialization/SerializationHelpers.js.map +1 -1
  464. package/lib/cjs/solid/Box.js +7 -2
  465. package/lib/cjs/solid/Box.js.map +1 -1
  466. package/lib/cjs/solid/Cone.d.ts +39 -14
  467. package/lib/cjs/solid/Cone.d.ts.map +1 -1
  468. package/lib/cjs/solid/Cone.js +52 -16
  469. package/lib/cjs/solid/Cone.js.map +1 -1
  470. package/lib/cjs/solid/LinearSweep.js +4 -2
  471. package/lib/cjs/solid/LinearSweep.js.map +1 -1
  472. package/lib/cjs/solid/RotationalSweep.d.ts +17 -17
  473. package/lib/cjs/solid/RotationalSweep.d.ts.map +1 -1
  474. package/lib/cjs/solid/RotationalSweep.js +38 -25
  475. package/lib/cjs/solid/RotationalSweep.js.map +1 -1
  476. package/lib/cjs/solid/RuledSweep.d.ts +26 -23
  477. package/lib/cjs/solid/RuledSweep.d.ts.map +1 -1
  478. package/lib/cjs/solid/RuledSweep.js +32 -24
  479. package/lib/cjs/solid/RuledSweep.js.map +1 -1
  480. package/lib/cjs/solid/SolidPrimitive.d.ts +12 -11
  481. package/lib/cjs/solid/SolidPrimitive.d.ts.map +1 -1
  482. package/lib/cjs/solid/SolidPrimitive.js +11 -6
  483. package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
  484. package/lib/cjs/solid/Sphere.d.ts +36 -17
  485. package/lib/cjs/solid/Sphere.d.ts.map +1 -1
  486. package/lib/cjs/solid/Sphere.js +53 -24
  487. package/lib/cjs/solid/Sphere.js.map +1 -1
  488. package/lib/cjs/solid/SweepContour.d.ts +24 -15
  489. package/lib/cjs/solid/SweepContour.d.ts.map +1 -1
  490. package/lib/cjs/solid/SweepContour.js +33 -15
  491. package/lib/cjs/solid/SweepContour.js.map +1 -1
  492. package/lib/cjs/solid/TorusPipe.js +7 -2
  493. package/lib/cjs/solid/TorusPipe.js.map +1 -1
  494. package/lib/cjs/topology/ChainMerge.js +16 -4
  495. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  496. package/lib/cjs/topology/Graph.js +41 -6
  497. package/lib/cjs/topology/Graph.js.map +1 -1
  498. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +1 -1
  499. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js +5 -1
  500. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  501. package/lib/cjs/topology/HalfEdgeGraphSearch.js +2 -0
  502. package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
  503. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js +9 -2
  504. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  505. package/lib/cjs/topology/HalfEdgeGraphValidation.js +7 -9
  506. package/lib/cjs/topology/HalfEdgeGraphValidation.js.map +1 -1
  507. package/lib/cjs/topology/HalfEdgeMarkSet.js +5 -0
  508. package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
  509. package/lib/cjs/topology/HalfEdgeNodeXYZUV.js +6 -0
  510. package/lib/cjs/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  511. package/lib/cjs/topology/HalfEdgePointInGraphSearch.js +1 -0
  512. package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  513. package/lib/cjs/topology/HalfEdgePositionDetail.js +16 -0
  514. package/lib/cjs/topology/HalfEdgePositionDetail.js.map +1 -1
  515. package/lib/cjs/topology/HalfEdgePriorityQueue.js +2 -0
  516. package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
  517. package/lib/cjs/topology/InsertAndRetriangulateContext.js +4 -0
  518. package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
  519. package/lib/cjs/topology/MaskManager.js +3 -0
  520. package/lib/cjs/topology/MaskManager.js.map +1 -1
  521. package/lib/cjs/topology/Merging.js +11 -6
  522. package/lib/cjs/topology/Merging.js.map +1 -1
  523. package/lib/cjs/topology/RegularizeFace.js +22 -0
  524. package/lib/cjs/topology/RegularizeFace.js.map +1 -1
  525. package/lib/cjs/topology/SignedDataSummary.js +22 -0
  526. package/lib/cjs/topology/SignedDataSummary.js.map +1 -1
  527. package/lib/cjs/topology/SpaceTriangulation.js.map +1 -1
  528. package/lib/cjs/topology/Triangulation.d.ts +3 -3
  529. package/lib/cjs/topology/Triangulation.d.ts.map +1 -1
  530. package/lib/cjs/topology/Triangulation.js +28 -18
  531. package/lib/cjs/topology/Triangulation.js.map +1 -1
  532. package/lib/cjs/topology/XYParitySearchContext.js +13 -0
  533. package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
  534. package/lib/esm/Constant.js +17 -17
  535. package/lib/esm/Constant.js.map +1 -1
  536. package/lib/esm/Geometry.d.ts +13 -4
  537. package/lib/esm/Geometry.d.ts.map +1 -1
  538. package/lib/esm/Geometry.js +51 -39
  539. package/lib/esm/Geometry.js.map +1 -1
  540. package/lib/esm/bspline/AkimaCurve3d.js +3 -1
  541. package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
  542. package/lib/esm/bspline/BSpline1dNd.d.ts +90 -54
  543. package/lib/esm/bspline/BSpline1dNd.d.ts.map +1 -1
  544. package/lib/esm/bspline/BSpline1dNd.js +137 -84
  545. package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
  546. package/lib/esm/bspline/BSplineCurve.d.ts +193 -155
  547. package/lib/esm/bspline/BSplineCurve.d.ts.map +1 -1
  548. package/lib/esm/bspline/BSplineCurve.js +249 -181
  549. package/lib/esm/bspline/BSplineCurve.js.map +1 -1
  550. package/lib/esm/bspline/BSplineCurve3dH.js +1 -0
  551. package/lib/esm/bspline/BSplineCurve3dH.js.map +1 -1
  552. package/lib/esm/bspline/BSplineCurveOps.d.ts.map +1 -1
  553. package/lib/esm/bspline/BSplineCurveOps.js +18 -21
  554. package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
  555. package/lib/esm/bspline/BSplineSurface.js +22 -2
  556. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  557. package/lib/esm/bspline/Bezier1dNd.js +6 -0
  558. package/lib/esm/bspline/Bezier1dNd.js.map +1 -1
  559. package/lib/esm/bspline/BezierCurve3d.d.ts +3 -1
  560. package/lib/esm/bspline/BezierCurve3d.d.ts.map +1 -1
  561. package/lib/esm/bspline/BezierCurve3d.js +5 -5
  562. package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
  563. package/lib/esm/bspline/BezierCurve3dH.js +2 -0
  564. package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
  565. package/lib/esm/bspline/BezierCurveBase.d.ts.map +1 -1
  566. package/lib/esm/bspline/BezierCurveBase.js +21 -2
  567. package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
  568. package/lib/esm/bspline/InterpolationCurve3d.js +12 -1
  569. package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
  570. package/lib/esm/bspline/KnotVector.d.ts +82 -60
  571. package/lib/esm/bspline/KnotVector.d.ts.map +1 -1
  572. package/lib/esm/bspline/KnotVector.js +144 -84
  573. package/lib/esm/bspline/KnotVector.js.map +1 -1
  574. package/lib/esm/bspline/SurfaceLocationDetail.js +12 -0
  575. package/lib/esm/bspline/SurfaceLocationDetail.js.map +1 -1
  576. package/lib/esm/clipping/AlternatingConvexClipTree.js +14 -13
  577. package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
  578. package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
  579. package/lib/esm/clipping/BooleanClipNode.js +4 -0
  580. package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
  581. package/lib/esm/clipping/ClipPlane.js +10 -1
  582. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  583. package/lib/esm/clipping/ClipPrimitive.js +19 -0
  584. package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
  585. package/lib/esm/clipping/ClipUtils.js +5 -1
  586. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  587. package/lib/esm/clipping/ClipVector.js +11 -8
  588. package/lib/esm/clipping/ClipVector.js.map +1 -1
  589. package/lib/esm/clipping/ConvexClipPlaneSet.js +5 -3
  590. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  591. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js +2 -1
  592. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  593. package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js +3 -0
  594. package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  595. package/lib/esm/core-geometry.d.ts +1 -0
  596. package/lib/esm/core-geometry.d.ts.map +1 -1
  597. package/lib/esm/core-geometry.js +1 -0
  598. package/lib/esm/core-geometry.js.map +1 -1
  599. package/lib/esm/curve/Arc3d.d.ts +20 -4
  600. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  601. package/lib/esm/curve/Arc3d.js +86 -21
  602. package/lib/esm/curve/Arc3d.js.map +1 -1
  603. package/lib/esm/curve/ConstructCurveBetweenCurves.js +3 -0
  604. package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
  605. package/lib/esm/curve/CoordinateXYZ.js +3 -2
  606. package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
  607. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +0 -2
  608. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
  609. package/lib/esm/curve/CurveChainWithDistanceIndex.js +25 -10
  610. package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
  611. package/lib/esm/curve/CurveCollection.d.ts +10 -0
  612. package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
  613. package/lib/esm/curve/CurveCollection.js +35 -9
  614. package/lib/esm/curve/CurveCollection.js.map +1 -1
  615. package/lib/esm/curve/CurveCurve.js.map +1 -1
  616. package/lib/esm/curve/CurveExtendMode.d.ts +13 -5
  617. package/lib/esm/curve/CurveExtendMode.d.ts.map +1 -1
  618. package/lib/esm/curve/CurveExtendMode.js +19 -15
  619. package/lib/esm/curve/CurveExtendMode.js.map +1 -1
  620. package/lib/esm/curve/CurveFactory.d.ts +87 -53
  621. package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
  622. package/lib/esm/curve/CurveFactory.js +213 -135
  623. package/lib/esm/curve/CurveFactory.js.map +1 -1
  624. package/lib/esm/curve/CurveLocationDetail.js +44 -0
  625. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  626. package/lib/esm/curve/CurveOps.js.map +1 -1
  627. package/lib/esm/curve/CurvePrimitive.d.ts +74 -18
  628. package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
  629. package/lib/esm/curve/CurvePrimitive.js +86 -18
  630. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  631. package/lib/esm/curve/CurveProcessor.js +2 -0
  632. package/lib/esm/curve/CurveProcessor.js.map +1 -1
  633. package/lib/esm/curve/CurveTypes.js.map +1 -1
  634. package/lib/esm/curve/CurveWireMomentsXYZ.js +2 -0
  635. package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
  636. package/lib/esm/curve/GeometryQuery.js.map +1 -1
  637. package/lib/esm/curve/LineSegment3d.js +6 -2
  638. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  639. package/lib/esm/curve/LineString3d.d.ts +8 -7
  640. package/lib/esm/curve/LineString3d.d.ts.map +1 -1
  641. package/lib/esm/curve/LineString3d.js +52 -29
  642. package/lib/esm/curve/LineString3d.js.map +1 -1
  643. package/lib/esm/curve/Loop.js +12 -4
  644. package/lib/esm/curve/Loop.js.map +1 -1
  645. package/lib/esm/curve/OffsetOptions.js +25 -21
  646. package/lib/esm/curve/OffsetOptions.js.map +1 -1
  647. package/lib/esm/curve/ParityRegion.js +4 -2
  648. package/lib/esm/curve/ParityRegion.js.map +1 -1
  649. package/lib/esm/curve/Path.js +2 -2
  650. package/lib/esm/curve/Path.js.map +1 -1
  651. package/lib/esm/curve/PointString3d.js +3 -2
  652. package/lib/esm/curve/PointString3d.js.map +1 -1
  653. package/lib/esm/curve/ProxyCurve.js +1 -0
  654. package/lib/esm/curve/ProxyCurve.js.map +1 -1
  655. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js +1 -0
  656. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  657. package/lib/esm/curve/Query/CurveSplitContext.js +3 -0
  658. package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
  659. package/lib/esm/curve/Query/CylindricalRange.js +6 -2
  660. package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
  661. package/lib/esm/curve/Query/InOutTests.js.map +1 -1
  662. package/lib/esm/curve/Query/PlanarSubdivision.js +4 -6
  663. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  664. package/lib/esm/curve/Query/StrokeCountChain.js +12 -0
  665. package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
  666. package/lib/esm/curve/Query/StrokeCountMap.js +14 -0
  667. package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
  668. package/lib/esm/curve/RegionMomentsXY.js +4 -5
  669. package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
  670. package/lib/esm/curve/RegionOps.js +9 -10
  671. package/lib/esm/curve/RegionOps.js.map +1 -1
  672. package/lib/esm/curve/RegionOpsClassificationSweeps.js +24 -1
  673. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  674. package/lib/esm/curve/StrokeOptions.d.ts +10 -5
  675. package/lib/esm/curve/StrokeOptions.d.ts.map +1 -1
  676. package/lib/esm/curve/StrokeOptions.js +30 -8
  677. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  678. package/lib/esm/curve/UnionRegion.js +4 -2
  679. package/lib/esm/curve/UnionRegion.js.map +1 -1
  680. package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.d.ts +71 -0
  681. package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.d.ts.map +1 -0
  682. package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js +177 -0
  683. package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -0
  684. package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js +13 -7
  685. package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  686. package/lib/esm/curve/internalContexts/ChainCollectorContext.js +6 -0
  687. package/lib/esm/curve/internalContexts/ChainCollectorContext.js.map +1 -1
  688. package/lib/esm/curve/internalContexts/CloneCurvesContext.js +2 -0
  689. package/lib/esm/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  690. package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  691. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.d.ts +21 -5
  692. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.d.ts.map +1 -1
  693. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js +53 -20
  694. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  695. package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js +3 -0
  696. package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  697. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +18 -5
  698. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  699. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +26 -13
  700. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  701. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js +11 -5
  702. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  703. package/lib/esm/curve/internalContexts/CurveLengthContext.js +6 -0
  704. package/lib/esm/curve/internalContexts/CurveLengthContext.js.map +1 -1
  705. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js +8 -6
  706. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  707. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js +38 -5
  708. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
  709. package/lib/esm/curve/internalContexts/GapSearchContext.js +1 -0
  710. package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
  711. package/lib/esm/curve/internalContexts/MultiChainCollector.js +12 -0
  712. package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
  713. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts +5 -3
  714. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts.map +1 -1
  715. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js +6 -3
  716. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  717. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js +7 -0
  718. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  719. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +22 -4
  720. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  721. package/lib/esm/curve/internalContexts/SumLengthsContext.js +1 -0
  722. package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
  723. package/lib/esm/curve/internalContexts/TransformInPlaceContext.js +3 -0
  724. package/lib/esm/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  725. package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js +2 -0
  726. package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  727. package/lib/esm/curve/spiral/ClothoidSeries.js +4 -0
  728. package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
  729. package/lib/esm/curve/spiral/CubicEvaluator.js +2 -0
  730. package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
  731. package/lib/esm/curve/spiral/CzechSpiralEvaluator.js +4 -0
  732. package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  733. package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js +5 -0
  734. package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  735. package/lib/esm/curve/spiral/DirectSpiral3d.js +12 -2
  736. package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
  737. package/lib/esm/curve/spiral/IntegratedSpiral3d.js +24 -4
  738. package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  739. package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js +2 -0
  740. package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  741. package/lib/esm/curve/spiral/NormalizedTransition.js +5 -0
  742. package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
  743. package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js +2 -0
  744. package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  745. package/lib/esm/curve/spiral/TransitionConditionalProperties.js +10 -0
  746. package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  747. package/lib/esm/curve/spiral/TransitionSpiral3d.js +10 -0
  748. package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
  749. package/lib/esm/curve/spiral/XYCurveEvaluator.js +6 -0
  750. package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
  751. package/lib/esm/geometry3d/Angle.js +18 -16
  752. package/lib/esm/geometry3d/Angle.js.map +1 -1
  753. package/lib/esm/geometry3d/AngleSweep.d.ts +8 -3
  754. package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
  755. package/lib/esm/geometry3d/AngleSweep.js +22 -10
  756. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  757. package/lib/esm/geometry3d/BarycentricTriangle.js +25 -0
  758. package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
  759. package/lib/esm/geometry3d/BilinearPatch.js +8 -0
  760. package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
  761. package/lib/esm/geometry3d/CoincidentGeometryOps.js +5 -0
  762. package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
  763. package/lib/esm/geometry3d/Ellipsoid.d.ts +8 -7
  764. package/lib/esm/geometry3d/Ellipsoid.d.ts.map +1 -1
  765. package/lib/esm/geometry3d/Ellipsoid.js +63 -14
  766. package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
  767. package/lib/esm/geometry3d/FrameBuilder.js +12 -4
  768. package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
  769. package/lib/esm/geometry3d/FrustumAnimation.js +7 -0
  770. package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
  771. package/lib/esm/geometry3d/GeometryHandler.d.ts +15 -16
  772. package/lib/esm/geometry3d/GeometryHandler.d.ts.map +1 -1
  773. package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
  774. package/lib/esm/geometry3d/GrowableBlockedArray.js +12 -0
  775. package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
  776. package/lib/esm/geometry3d/GrowableFloat64Array.js +3 -0
  777. package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
  778. package/lib/esm/geometry3d/GrowableXYArray.d.ts +0 -5
  779. package/lib/esm/geometry3d/GrowableXYArray.d.ts.map +1 -1
  780. package/lib/esm/geometry3d/GrowableXYArray.js +16 -7
  781. package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
  782. package/lib/esm/geometry3d/GrowableXYZArray.d.ts +32 -10
  783. package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  784. package/lib/esm/geometry3d/GrowableXYZArray.js +70 -16
  785. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  786. package/lib/esm/geometry3d/IndexedCollectionInterval.js +6 -0
  787. package/lib/esm/geometry3d/IndexedCollectionInterval.js.map +1 -1
  788. package/lib/esm/geometry3d/IndexedXYCollection.js +1 -0
  789. package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
  790. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +13 -2
  791. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  792. package/lib/esm/geometry3d/IndexedXYZCollection.js +26 -11
  793. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  794. package/lib/esm/geometry3d/LongitudeLatitudeAltitude.js +3 -0
  795. package/lib/esm/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  796. package/lib/esm/geometry3d/Matrix3d.d.ts +13 -15
  797. package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
  798. package/lib/esm/geometry3d/Matrix3d.js +47 -26
  799. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  800. package/lib/esm/geometry3d/OrderedRotationAngles.js +10 -2
  801. package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
  802. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  803. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js +2 -0
  804. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  805. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js +7 -0
  806. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  807. package/lib/esm/geometry3d/Point2dArrayCarrier.js +2 -0
  808. package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
  809. package/lib/esm/geometry3d/Point2dVector2d.js +4 -0
  810. package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
  811. package/lib/esm/geometry3d/Point3dArrayCarrier.js +3 -1
  812. package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
  813. package/lib/esm/geometry3d/Point3dVector3d.d.ts +7 -10
  814. package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
  815. package/lib/esm/geometry3d/Point3dVector3d.js +16 -10
  816. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  817. package/lib/esm/geometry3d/PointHelpers.d.ts +15 -4
  818. package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
  819. package/lib/esm/geometry3d/PointHelpers.js +29 -8
  820. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  821. package/lib/esm/geometry3d/PointStreaming.js +12 -4
  822. package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
  823. package/lib/esm/geometry3d/PolygonOps.d.ts +2 -2
  824. package/lib/esm/geometry3d/PolygonOps.js +62 -25
  825. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  826. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +7 -3
  827. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  828. package/lib/esm/geometry3d/PolylineOps.d.ts +9 -5
  829. package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
  830. package/lib/esm/geometry3d/PolylineOps.js +12 -5
  831. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  832. package/lib/esm/geometry3d/Range.js +21 -4
  833. package/lib/esm/geometry3d/Range.js.map +1 -1
  834. package/lib/esm/geometry3d/Ray2d.js +2 -0
  835. package/lib/esm/geometry3d/Ray2d.js.map +1 -1
  836. package/lib/esm/geometry3d/Ray3d.d.ts +2 -2
  837. package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
  838. package/lib/esm/geometry3d/Ray3d.js +20 -11
  839. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  840. package/lib/esm/geometry3d/ReusableObjectCache.js +4 -0
  841. package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
  842. package/lib/esm/geometry3d/Segment1d.js +4 -0
  843. package/lib/esm/geometry3d/Segment1d.js.map +1 -1
  844. package/lib/esm/geometry3d/SortablePolygon.js +11 -0
  845. package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
  846. package/lib/esm/geometry3d/Transform.d.ts +1 -1
  847. package/lib/esm/geometry3d/Transform.js +4 -1
  848. package/lib/esm/geometry3d/Transform.js.map +1 -1
  849. package/lib/esm/geometry3d/UVSurfaceOps.js.map +1 -1
  850. package/lib/esm/geometry3d/XYZProps.js.map +1 -1
  851. package/lib/esm/geometry3d/YawPitchRollAngles.js +6 -0
  852. package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
  853. package/lib/esm/geometry4d/Map4d.js +2 -0
  854. package/lib/esm/geometry4d/Map4d.js.map +1 -1
  855. package/lib/esm/geometry4d/Matrix4d.js +1 -0
  856. package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
  857. package/lib/esm/geometry4d/MomentData.d.ts +72 -73
  858. package/lib/esm/geometry4d/MomentData.d.ts.map +1 -1
  859. package/lib/esm/geometry4d/MomentData.js +90 -66
  860. package/lib/esm/geometry4d/MomentData.js.map +1 -1
  861. package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js +6 -0
  862. package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  863. package/lib/esm/geometry4d/Point4d.js +2 -0
  864. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  865. package/lib/esm/numerics/BandedSystem.js.map +1 -1
  866. package/lib/esm/numerics/BezierPolynomials.js +8 -0
  867. package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
  868. package/lib/esm/numerics/ClusterableArray.js +29 -13
  869. package/lib/esm/numerics/ClusterableArray.js.map +1 -1
  870. package/lib/esm/numerics/Complex.js +2 -0
  871. package/lib/esm/numerics/Complex.js.map +1 -1
  872. package/lib/esm/numerics/ConvexPolygon2d.js +3 -0
  873. package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
  874. package/lib/esm/numerics/Newton.js +59 -4
  875. package/lib/esm/numerics/Newton.js.map +1 -1
  876. package/lib/esm/numerics/PascalCoefficients.js +1 -1
  877. package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
  878. package/lib/esm/numerics/PolarData.js +13 -1
  879. package/lib/esm/numerics/PolarData.js.map +1 -1
  880. package/lib/esm/numerics/Polynomials.js +64 -26
  881. package/lib/esm/numerics/Polynomials.js.map +1 -1
  882. package/lib/esm/numerics/Quadrature.js +26 -20
  883. package/lib/esm/numerics/Quadrature.js.map +1 -1
  884. package/lib/esm/numerics/Range1dArray.js.map +1 -1
  885. package/lib/esm/numerics/SmallSystem.js.map +1 -1
  886. package/lib/esm/numerics/TriDiagonalSystem.js +11 -0
  887. package/lib/esm/numerics/TriDiagonalSystem.js.map +1 -1
  888. package/lib/esm/numerics/UnionFind.js +1 -0
  889. package/lib/esm/numerics/UnionFind.js.map +1 -1
  890. package/lib/esm/numerics/UsageSums.js +10 -0
  891. package/lib/esm/numerics/UsageSums.js.map +1 -1
  892. package/lib/esm/polyface/AuxData.js +16 -0
  893. package/lib/esm/polyface/AuxData.js.map +1 -1
  894. package/lib/esm/polyface/BoxTopology.js +67 -67
  895. package/lib/esm/polyface/BoxTopology.js.map +1 -1
  896. package/lib/esm/polyface/FacetFaceData.d.ts +1 -1
  897. package/lib/esm/polyface/FacetFaceData.js +3 -1
  898. package/lib/esm/polyface/FacetFaceData.js.map +1 -1
  899. package/lib/esm/polyface/FacetLocationDetail.js +30 -0
  900. package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
  901. package/lib/esm/polyface/FacetOrientation.js +12 -1
  902. package/lib/esm/polyface/FacetOrientation.js.map +1 -1
  903. package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js +18 -2
  904. package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  905. package/lib/esm/polyface/IndexedEdgeMatcher.d.ts +33 -23
  906. package/lib/esm/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
  907. package/lib/esm/polyface/IndexedEdgeMatcher.js +63 -33
  908. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  909. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +4 -3
  910. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  911. package/lib/esm/polyface/IndexedPolyfaceVisitor.js +16 -5
  912. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  913. package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts +233 -0
  914. package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts.map +1 -0
  915. package/lib/esm/polyface/IndexedPolyfaceWalker.js +349 -0
  916. package/lib/esm/polyface/IndexedPolyfaceWalker.js.map +1 -0
  917. package/lib/esm/polyface/Polyface.d.ts +43 -14
  918. package/lib/esm/polyface/Polyface.d.ts.map +1 -1
  919. package/lib/esm/polyface/Polyface.js +90 -19
  920. package/lib/esm/polyface/Polyface.js.map +1 -1
  921. package/lib/esm/polyface/PolyfaceBuilder.d.ts +14 -27
  922. package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
  923. package/lib/esm/polyface/PolyfaceBuilder.js +48 -80
  924. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  925. package/lib/esm/polyface/PolyfaceClip.js +8 -0
  926. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  927. package/lib/esm/polyface/PolyfaceData.d.ts +36 -3
  928. package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
  929. package/lib/esm/polyface/PolyfaceData.js +114 -8
  930. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  931. package/lib/esm/polyface/PolyfaceQuery.js +47 -7
  932. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  933. package/lib/esm/polyface/RangeLengthData.js +7 -0
  934. package/lib/esm/polyface/RangeLengthData.js.map +1 -1
  935. package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js +12 -0
  936. package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
  937. package/lib/esm/polyface/RangeTree/MinimumValueTester.js +5 -2
  938. package/lib/esm/polyface/RangeTree/MinimumValueTester.js.map +1 -1
  939. package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js +12 -0
  940. package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
  941. package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js +14 -0
  942. package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
  943. package/lib/esm/polyface/RangeTree/RangeTreeNode.js +5 -0
  944. package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  945. package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js +43 -0
  946. package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
  947. package/lib/esm/polyface/TaggedNumericData.js +8 -0
  948. package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
  949. package/lib/esm/polyface/TriangleCandidate.js +3 -0
  950. package/lib/esm/polyface/TriangleCandidate.js.map +1 -1
  951. package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js +7 -0
  952. package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  953. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js +6 -0
  954. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  955. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js +3 -0
  956. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  957. package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js +3 -0
  958. package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  959. package/lib/esm/polyface/multiclip/OffsetMeshContext.js +32 -0
  960. package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  961. package/lib/esm/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  962. package/lib/esm/polyface/multiclip/RangeSearch.js +5 -5
  963. package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
  964. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js +21 -8
  965. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  966. package/lib/esm/polyface/multiclip/XYPointBuckets.js +6 -0
  967. package/lib/esm/polyface/multiclip/XYPointBuckets.js.map +1 -1
  968. package/lib/esm/serialization/BGFBAccessors.d.ts +35 -9
  969. package/lib/esm/serialization/BGFBAccessors.d.ts.map +1 -1
  970. package/lib/esm/serialization/BGFBAccessors.js +141 -179
  971. package/lib/esm/serialization/BGFBAccessors.js.map +1 -1
  972. package/lib/esm/serialization/BGFBReader.d.ts +2 -2
  973. package/lib/esm/serialization/BGFBReader.d.ts.map +1 -1
  974. package/lib/esm/serialization/BGFBReader.js +75 -62
  975. package/lib/esm/serialization/BGFBReader.js.map +1 -1
  976. package/lib/esm/serialization/BGFBWriter.d.ts +5 -1
  977. package/lib/esm/serialization/BGFBWriter.d.ts.map +1 -1
  978. package/lib/esm/serialization/BGFBWriter.js +18 -3
  979. package/lib/esm/serialization/BGFBWriter.js.map +1 -1
  980. package/lib/esm/serialization/BentleyGeometryFlatBuffer.js +1 -0
  981. package/lib/esm/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  982. package/lib/esm/serialization/DeepCompare.js +17 -17
  983. package/lib/esm/serialization/DeepCompare.js.map +1 -1
  984. package/lib/esm/serialization/GeometrySamples.d.ts +5 -5
  985. package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
  986. package/lib/esm/serialization/GeometrySamples.js +113 -112
  987. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  988. package/lib/esm/serialization/IModelJsonSchema.d.ts +78 -64
  989. package/lib/esm/serialization/IModelJsonSchema.d.ts.map +1 -1
  990. package/lib/esm/serialization/IModelJsonSchema.js +107 -83
  991. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  992. package/lib/esm/serialization/SerializationHelpers.d.ts +36 -0
  993. package/lib/esm/serialization/SerializationHelpers.d.ts.map +1 -1
  994. package/lib/esm/serialization/SerializationHelpers.js +117 -0
  995. package/lib/esm/serialization/SerializationHelpers.js.map +1 -1
  996. package/lib/esm/solid/Box.js +7 -2
  997. package/lib/esm/solid/Box.js.map +1 -1
  998. package/lib/esm/solid/Cone.d.ts +39 -14
  999. package/lib/esm/solid/Cone.d.ts.map +1 -1
  1000. package/lib/esm/solid/Cone.js +53 -17
  1001. package/lib/esm/solid/Cone.js.map +1 -1
  1002. package/lib/esm/solid/LinearSweep.js +4 -2
  1003. package/lib/esm/solid/LinearSweep.js.map +1 -1
  1004. package/lib/esm/solid/RotationalSweep.d.ts +17 -17
  1005. package/lib/esm/solid/RotationalSweep.d.ts.map +1 -1
  1006. package/lib/esm/solid/RotationalSweep.js +38 -25
  1007. package/lib/esm/solid/RotationalSweep.js.map +1 -1
  1008. package/lib/esm/solid/RuledSweep.d.ts +26 -23
  1009. package/lib/esm/solid/RuledSweep.d.ts.map +1 -1
  1010. package/lib/esm/solid/RuledSweep.js +32 -24
  1011. package/lib/esm/solid/RuledSweep.js.map +1 -1
  1012. package/lib/esm/solid/SolidPrimitive.d.ts +12 -11
  1013. package/lib/esm/solid/SolidPrimitive.d.ts.map +1 -1
  1014. package/lib/esm/solid/SolidPrimitive.js +11 -6
  1015. package/lib/esm/solid/SolidPrimitive.js.map +1 -1
  1016. package/lib/esm/solid/Sphere.d.ts +36 -17
  1017. package/lib/esm/solid/Sphere.d.ts.map +1 -1
  1018. package/lib/esm/solid/Sphere.js +54 -25
  1019. package/lib/esm/solid/Sphere.js.map +1 -1
  1020. package/lib/esm/solid/SweepContour.d.ts +24 -15
  1021. package/lib/esm/solid/SweepContour.d.ts.map +1 -1
  1022. package/lib/esm/solid/SweepContour.js +33 -15
  1023. package/lib/esm/solid/SweepContour.js.map +1 -1
  1024. package/lib/esm/solid/TorusPipe.js +7 -2
  1025. package/lib/esm/solid/TorusPipe.js.map +1 -1
  1026. package/lib/esm/topology/ChainMerge.js +16 -4
  1027. package/lib/esm/topology/ChainMerge.js.map +1 -1
  1028. package/lib/esm/topology/Graph.js +41 -6
  1029. package/lib/esm/topology/Graph.js.map +1 -1
  1030. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +1 -1
  1031. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js +5 -1
  1032. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  1033. package/lib/esm/topology/HalfEdgeGraphSearch.js +2 -0
  1034. package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
  1035. package/lib/esm/topology/HalfEdgeGraphSpineContext.js +9 -2
  1036. package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  1037. package/lib/esm/topology/HalfEdgeGraphValidation.js +7 -9
  1038. package/lib/esm/topology/HalfEdgeGraphValidation.js.map +1 -1
  1039. package/lib/esm/topology/HalfEdgeMarkSet.js +5 -0
  1040. package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
  1041. package/lib/esm/topology/HalfEdgeNodeXYZUV.js +6 -0
  1042. package/lib/esm/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  1043. package/lib/esm/topology/HalfEdgePointInGraphSearch.js +1 -0
  1044. package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  1045. package/lib/esm/topology/HalfEdgePositionDetail.js +16 -0
  1046. package/lib/esm/topology/HalfEdgePositionDetail.js.map +1 -1
  1047. package/lib/esm/topology/HalfEdgePriorityQueue.js +2 -0
  1048. package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
  1049. package/lib/esm/topology/InsertAndRetriangulateContext.js +4 -0
  1050. package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
  1051. package/lib/esm/topology/MaskManager.js +3 -0
  1052. package/lib/esm/topology/MaskManager.js.map +1 -1
  1053. package/lib/esm/topology/Merging.js +11 -6
  1054. package/lib/esm/topology/Merging.js.map +1 -1
  1055. package/lib/esm/topology/RegularizeFace.js +22 -0
  1056. package/lib/esm/topology/RegularizeFace.js.map +1 -1
  1057. package/lib/esm/topology/SignedDataSummary.js +22 -0
  1058. package/lib/esm/topology/SignedDataSummary.js.map +1 -1
  1059. package/lib/esm/topology/SpaceTriangulation.js.map +1 -1
  1060. package/lib/esm/topology/Triangulation.d.ts +3 -3
  1061. package/lib/esm/topology/Triangulation.d.ts.map +1 -1
  1062. package/lib/esm/topology/Triangulation.js +28 -18
  1063. package/lib/esm/topology/Triangulation.js.map +1 -1
  1064. package/lib/esm/topology/XYParitySearchContext.js +13 -0
  1065. package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
  1066. package/package.json +9 -9
@@ -20,18 +20,29 @@ const NewtonRtoRStrokeHandler_1 = require("./NewtonRtoRStrokeHandler");
20
20
  * @internal
21
21
  */
22
22
  class ClosestPointStrokeHandler extends NewtonRtoRStrokeHandler_1.NewtonRtoRStrokeHandler {
23
+ _curve;
24
+ _closestPoint;
25
+ _spacePoint;
26
+ _extend;
27
+ // fraction and function value on one side of an interval that may bracket a root
28
+ _fractionA = 0;
29
+ _functionA = 0;
30
+ // fraction and function value on the other side of an interval that may bracket a root
31
+ _fractionB = 0;
32
+ _functionB = 0;
33
+ _numThisCurve = 0;
34
+ // scratch vars to use within methods
35
+ _workPoint;
36
+ _workRay;
37
+ _newtonSolver;
38
+ /** Constructor */
23
39
  constructor(spacePoint, extend, result) {
24
40
  super();
25
- this._fractionA = 0;
26
- this._functionA = 0;
27
- this._functionB = 0;
28
- this._fractionB = 0;
29
- this._numThisCurve = 0;
30
41
  this._spacePoint = spacePoint;
31
42
  this._workPoint = Point3dVector3d_1.Point3d.create();
32
43
  this._workRay = Ray3d_1.Ray3d.createZero();
33
44
  this._closestPoint = result;
34
- this._extend = extend;
45
+ this._extend = extend ?? false;
35
46
  this.startCurvePrimitive(undefined);
36
47
  this._newtonSolver = new Newton_1.Newton1dUnboundedApproximateDerivative(this);
37
48
  }
@@ -82,7 +93,7 @@ class ClosestPointStrokeHandler extends NewtonRtoRStrokeHandler_1.NewtonRtoRStro
82
93
  }
83
94
  announceSegmentInterval(cp, point0, point1, _numStrokes, fraction0, fraction1) {
84
95
  let localFraction = this._spacePoint.fractionOfProjectionToLine(point0, point1, 0.0);
85
- // only consider extending the segment if the immediate caller says we are at endpoints ...
96
+ // only consider extending the segment if the immediate caller says we are at endpoints
86
97
  if (!this._extend)
87
98
  localFraction = Geometry_1.Geometry.clampToStartEnd(localFraction, 0.0, 1.0);
88
99
  else {
@@ -95,13 +106,22 @@ class ClosestPointStrokeHandler extends NewtonRtoRStrokeHandler_1.NewtonRtoRStro
95
106
  const globalFraction = Geometry_1.Geometry.interpolate(fraction0, localFraction, fraction1);
96
107
  this.announceCandidate(cp, globalFraction, this._workPoint);
97
108
  }
109
+ /**
110
+ * Given a function `f` and (unordered) fractions `a` and `b`, search for and announce a root of `f` in this
111
+ * fractional interval.
112
+ * * This method searches for a root of `f` if and only if the stroke segment defined by `(a, f(a))` and
113
+ * `(b, f(b))` has a root. This is a HEURISTIC: given continuous `f` between `a` and `b`, a root of the stroke
114
+ * segment implies a root of `f`, but not vice-versa. Therefore, if the strokes are not sufficiently dense,
115
+ * this method can miss a root of `f`.
116
+ */
98
117
  searchInterval() {
99
118
  if (this._functionA * this._functionB > 0)
100
- return;
119
+ return; // stroke segment has no root; ASSUME the function has no root either
101
120
  if (this._functionA === 0)
102
121
  this.announceSolutionFraction(this._fractionA);
103
122
  if (this._functionB === 0)
104
123
  this.announceSolutionFraction(this._fractionB);
124
+ // by the Intermediate Value Theorem, a root lies between fractionA and fractionB; use Newton to find it.
105
125
  if (this._functionA * this._functionB < 0) {
106
126
  const fraction = Geometry_1.Geometry.inverseInterpolate(this._fractionA, this._functionA, this._fractionB, this._functionB);
107
127
  if (fraction) {
@@ -111,28 +131,41 @@ class ClosestPointStrokeHandler extends NewtonRtoRStrokeHandler_1.NewtonRtoRStro
111
131
  }
112
132
  }
113
133
  }
114
- evaluateB(fractionB, dataB) {
115
- this._functionB = dataB.dotProductToPoint(this._spacePoint);
116
- this._fractionB = fractionB;
117
- }
118
134
  announceSolutionFraction(fraction) {
119
135
  if (this._curve)
120
136
  this.announceCandidate(this._curve, fraction, this._curve.fractionToPoint(fraction));
121
137
  }
138
+ /**
139
+ * Evaluate the univariate real-valued function for which we are finding roots.
140
+ * * For finding the closest point to curve X from point Q, this function is `f(t) := Q-X(t) dot X'(t)`.
141
+ * * Either `pointAndDerivative` must be defined, or both `fraction` and `curve`.
142
+ * @param pointAndDerivative pre-evaluated curve
143
+ * @param fraction fraction at which to evaluate `curve`
144
+ * @param curve curve to evaluate at `fraction`
145
+ */
146
+ evaluateFunction(pointAndDerivative, fraction, curve) {
147
+ if (pointAndDerivative)
148
+ this._workRay.setFrom(pointAndDerivative);
149
+ else if (fraction !== undefined && curve)
150
+ this._workRay = curve.fractionToPointAndDerivative(fraction, this._workRay);
151
+ else
152
+ return undefined;
153
+ return this._workRay.dotProductToPoint(this._spacePoint);
154
+ }
122
155
  evaluate(fraction) {
123
156
  let curve = this._curve;
124
157
  if (this._parentCurvePrimitive)
125
158
  curve = this._parentCurvePrimitive;
126
- if (curve) {
127
- this._workRay = curve.fractionToPointAndDerivative(fraction, this._workRay);
128
- this.currentF = this._workRay.dotProductToPoint(this._spacePoint);
129
- return true;
130
- }
131
- return false;
159
+ const value = this.evaluateFunction(undefined, fraction, curve);
160
+ if (value === undefined)
161
+ return false;
162
+ this.currentF = value;
163
+ return true;
132
164
  }
133
165
  announceRay(fraction, data) {
134
- this.evaluateB(fraction, data);
135
- if (this._numThisCurve++ > 0)
166
+ this._functionB = this.evaluateFunction(data);
167
+ this._fractionB = fraction;
168
+ if (this._numThisCurve++ > 0) // after the first stroke point, a stroke segment is defined, so we have an interval
136
169
  this.searchInterval();
137
170
  this._functionA = this._functionB;
138
171
  this._fractionA = this._fractionB;
@@ -1 +1 @@
1
- {"version":3,"file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Q,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC;IACzF,CAAC;IAEM,QAAQ,CAAC,QAAgB;QAC9B,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QACxB,IAAI,IAAI,CAAC,qBAAqB;YAC5B,KAAK,GAAG,IAAI,CAAC,qBAAqB,CAAC;QACrC,IAAI,KAAK,EAAE,CAAC;YACV,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,4BAA4B,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC5E,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAClE,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAEM,WAAW,CAAC,QAAgB,EAAE,IAAW;QAC9C,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;QAC/B,IAAI,IAAI,CAAC,aAAa,EAAE,GAAG,CAAC;YAAE,IAAI,CAAC,cAAc,EAAE,CAAC;QACpD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QAClC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;IACpC,CAAC;IAEM,oBAAoB,CAAC,KAAc,EAAE,QAAgB,EAAE,OAAiB;QAC7E,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAClC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5C,CAAC;CACF;AA3ID,8DA2IC","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/** @packageDocumentation\r\n * @module Curve\r\n */\r\n\r\nimport { Geometry } from \"../../Geometry\";\r\nimport { IStrokeHandler } from \"../../geometry3d/GeometryHandler\";\r\nimport { Point3d, Vector3d } from \"../../geometry3d/Point3dVector3d\";\r\nimport { Ray3d } from \"../../geometry3d/Ray3d\";\r\nimport { Newton1dUnboundedApproximateDerivative } from \"../../numerics/Newton\";\r\nimport { CurveExtendOptions, VariantCurveExtendParameter } from \"../CurveExtendMode\";\r\nimport { CurveLocationDetail } from \"../CurveLocationDetail\";\r\nimport { CurvePrimitive } from \"../CurvePrimitive\";\r\nimport { NewtonRtoRStrokeHandler } from \"./NewtonRtoRStrokeHandler\";\r\n\r\n/**\r\n * Context for searching for the closest point to a CurvePrimitive.\r\n * @internal\r\n */\r\nexport class ClosestPointStrokeHandler extends NewtonRtoRStrokeHandler implements IStrokeHandler {\r\n private _curve: CurvePrimitive | undefined;\r\n private _closestPoint: CurveLocationDetail | undefined;\r\n private _spacePoint: Point3d;\r\n private _extend: VariantCurveExtendParameter;\r\n private _fractionA: number = 0;\r\n private _functionA: number = 0;\r\n private _functionB: number = 0;\r\n private _fractionB: number = 0;\r\n private _numThisCurve: number = 0;\r\n // scratch vars for use within methods.\r\n private _workPoint: Point3d;\r\n private _workRay: Ray3d;\r\n private _newtonSolver: Newton1dUnboundedApproximateDerivative;\r\n\r\n public constructor(spacePoint: Point3d, extend: VariantCurveExtendParameter, result?: CurveLocationDetail) {\r\n super();\r\n this._spacePoint = spacePoint;\r\n this._workPoint = Point3d.create();\r\n this._workRay = Ray3d.createZero();\r\n this._closestPoint = result;\r\n this._extend = extend;\r\n this.startCurvePrimitive(undefined);\r\n this._newtonSolver = new Newton1dUnboundedApproximateDerivative(this);\r\n }\r\n\r\n public claimResult(): CurveLocationDetail | undefined {\r\n if (this._closestPoint) {\r\n this._newtonSolver.setX(this._closestPoint.fraction);\r\n this._curve = this._closestPoint.curve;\r\n if (this._newtonSolver.runIterations()) {\r\n let fraction = this._newtonSolver.getX();\r\n fraction = CurveExtendOptions.correctFraction(this._extend, fraction);\r\n this.announceSolutionFraction(fraction);\r\n }\r\n }\r\n return this._closestPoint;\r\n }\r\n\r\n public needPrimaryGeometryForStrokes() {\r\n return true;\r\n }\r\n\r\n public startCurvePrimitive(curve: CurvePrimitive | undefined) {\r\n this._curve = curve;\r\n this._fractionA = 0.0;\r\n this._numThisCurve = 0;\r\n this._functionA = 0.0;\r\n }\r\n\r\n public endCurvePrimitive() {\r\n }\r\n\r\n public announceIntervalForUniformStepStrokes(cp: CurvePrimitive, numStrokes: number, fraction0: number, fraction1: number): void {\r\n this.startCurvePrimitive(cp);\r\n this.announceSolutionFraction(0.0); // test start point as closest\r\n this.announceSolutionFraction(1.0); // test end point as closest\r\n if (numStrokes < 1) numStrokes = 1;\r\n const df = 1.0 / numStrokes;\r\n for (let i = 0; i <= numStrokes; i++) {\r\n const fraction = Geometry.interpolate(fraction0, i * df, fraction1);\r\n cp.fractionToPointAndDerivative(fraction, this._workRay);\r\n this.announceRay(fraction, this._workRay);\r\n }\r\n }\r\n\r\n private announceCandidate(cp: CurvePrimitive, fraction: number, point: Point3d) {\r\n const distance = this._spacePoint.distance(point);\r\n if (this._closestPoint && distance > this._closestPoint.a)\r\n return;\r\n this._closestPoint = CurveLocationDetail.createCurveFractionPoint(cp, fraction, point, this._closestPoint);\r\n this._closestPoint.a = distance;\r\n if (this._parentCurvePrimitive !== undefined)\r\n this._closestPoint.curve = this._parentCurvePrimitive;\r\n }\r\n\r\n public announceSegmentInterval(cp: CurvePrimitive, point0: Point3d, point1: Point3d, _numStrokes: number, fraction0: number, fraction1: number): void {\r\n let localFraction = this._spacePoint.fractionOfProjectionToLine(point0, point1, 0.0);\r\n // only consider extending the segment if the immediate caller says we are at endpoints ...\r\n if (!this._extend)\r\n localFraction = Geometry.clampToStartEnd(localFraction, 0.0, 1.0);\r\n else {\r\n if (fraction0 !== 0.0)\r\n localFraction = Math.max(localFraction, 0.0);\r\n if (fraction1 !== 1.0)\r\n localFraction = Math.min(localFraction, 1.0);\r\n }\r\n this._workPoint = point0.interpolate(localFraction, point1);\r\n const globalFraction = Geometry.interpolate(fraction0, localFraction, fraction1);\r\n this.announceCandidate(cp, globalFraction, this._workPoint);\r\n }\r\n\r\n private searchInterval() {\r\n if (this._functionA * this._functionB > 0) return;\r\n if (this._functionA === 0) this.announceSolutionFraction(this._fractionA);\r\n if (this._functionB === 0) this.announceSolutionFraction(this._fractionB);\r\n if (this._functionA * this._functionB < 0) {\r\n const fraction = Geometry.inverseInterpolate(this._fractionA, this._functionA, this._fractionB, this._functionB);\r\n if (fraction) {\r\n this._newtonSolver.setX(fraction);\r\n if (this._newtonSolver.runIterations())\r\n this.announceSolutionFraction(this._newtonSolver.getX());\r\n }\r\n }\r\n }\r\n\r\n private evaluateB(fractionB: number, dataB: Ray3d) {\r\n this._functionB = dataB.dotProductToPoint(this._spacePoint);\r\n this._fractionB = fractionB;\r\n }\r\n\r\n private announceSolutionFraction(fraction: number) {\r\n if (this._curve)\r\n this.announceCandidate(this._curve, fraction, this._curve.fractionToPoint(fraction));\r\n }\r\n\r\n public evaluate(fraction: number): boolean {\r\n let curve = this._curve;\r\n if (this._parentCurvePrimitive)\r\n curve = this._parentCurvePrimitive;\r\n if (curve) {\r\n this._workRay = curve.fractionToPointAndDerivative(fraction, this._workRay);\r\n this.currentF = this._workRay.dotProductToPoint(this._spacePoint);\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n public announceRay(fraction: number, data: Ray3d): void {\r\n this.evaluateB(fraction, data);\r\n if (this._numThisCurve++ > 0) this.searchInterval();\r\n this._functionA = this._functionB;\r\n this._fractionA = this._fractionB;\r\n }\r\n\r\n public announcePointTangent(point: Point3d, fraction: number, tangent: Vector3d) {\r\n this._workRay.set(point, tangent);\r\n this.announceRay(fraction, this._workRay);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ClosestPointStrokeHandler.js","sourceRoot":"","sources":["../../../../src/curve/internalContexts/ClosestPointStrokeHandler.ts"],"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AAC;IACpC,CAAC;IACM,oBAAoB,CAAC,KAAc,EAAE,QAAgB,EAAE,OAAiB;QAC7E,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QAClC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC5C,CAAC;CACF;AA/JD,8DA+JC","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 */\n\nimport { Geometry } from \"../../Geometry\";\nimport { IStrokeHandler } from \"../../geometry3d/GeometryHandler\";\nimport { Point3d, Vector3d } from \"../../geometry3d/Point3dVector3d\";\nimport { Ray3d } from \"../../geometry3d/Ray3d\";\nimport { Newton1dUnboundedApproximateDerivative } from \"../../numerics/Newton\";\nimport { CurveExtendOptions, VariantCurveExtendParameter } from \"../CurveExtendMode\";\nimport { CurveLocationDetail } from \"../CurveLocationDetail\";\nimport { CurvePrimitive } from \"../CurvePrimitive\";\nimport { NewtonRtoRStrokeHandler } from \"./NewtonRtoRStrokeHandler\";\n\n/**\n * Context for searching for the closest point to a CurvePrimitive.\n * @internal\n */\nexport class ClosestPointStrokeHandler extends NewtonRtoRStrokeHandler implements IStrokeHandler {\n private _curve: CurvePrimitive | undefined;\n private _closestPoint: CurveLocationDetail | undefined;\n private _spacePoint: Point3d;\n private _extend: VariantCurveExtendParameter;\n // fraction and function value on one side of an interval that may bracket a root\n private _fractionA: number = 0;\n private _functionA: number = 0;\n // fraction and function value on the other side of an interval that may bracket a root\n private _fractionB: number = 0;\n private _functionB: number = 0;\n private _numThisCurve: number = 0;\n // scratch vars to use within methods\n private _workPoint: Point3d;\n private _workRay: Ray3d;\n private _newtonSolver: Newton1dUnboundedApproximateDerivative;\n /** Constructor */\n public constructor(spacePoint: Point3d, extend?: VariantCurveExtendParameter, result?: CurveLocationDetail) {\n super();\n this._spacePoint = spacePoint;\n this._workPoint = Point3d.create();\n this._workRay = Ray3d.createZero();\n this._closestPoint = result;\n this._extend = extend ?? false;\n this.startCurvePrimitive(undefined);\n this._newtonSolver = new Newton1dUnboundedApproximateDerivative(this);\n }\n public claimResult(): CurveLocationDetail | undefined {\n if (this._closestPoint) {\n this._newtonSolver.setX(this._closestPoint.fraction);\n this._curve = this._closestPoint.curve;\n if (this._newtonSolver.runIterations()) {\n let fraction = this._newtonSolver.getX();\n fraction = CurveExtendOptions.correctFraction(this._extend, fraction);\n this.announceSolutionFraction(fraction);\n }\n }\n return this._closestPoint;\n }\n public needPrimaryGeometryForStrokes() {\n return true;\n }\n public startCurvePrimitive(curve: CurvePrimitive | undefined) {\n this._curve = curve;\n this._fractionA = 0.0;\n this._numThisCurve = 0;\n this._functionA = 0.0;\n }\n public endCurvePrimitive() {\n }\n public announceIntervalForUniformStepStrokes(\n cp: CurvePrimitive, numStrokes: number, fraction0: number, fraction1: number,\n ): void {\n this.startCurvePrimitive(cp);\n this.announceSolutionFraction(0.0); // test start point as closest\n this.announceSolutionFraction(1.0); // test end point as closest\n if (numStrokes < 1)\n numStrokes = 1;\n const df = 1.0 / numStrokes;\n for (let i = 0; i <= numStrokes; i++) {\n const fraction = Geometry.interpolate(fraction0, i * df, fraction1);\n cp.fractionToPointAndDerivative(fraction, this._workRay);\n this.announceRay(fraction, this._workRay);\n }\n }\n private announceCandidate(cp: CurvePrimitive, fraction: number, point: Point3d) {\n const distance = this._spacePoint.distance(point);\n if (this._closestPoint && distance > this._closestPoint.a)\n return;\n this._closestPoint = CurveLocationDetail.createCurveFractionPoint(cp, fraction, point, this._closestPoint);\n this._closestPoint.a = distance;\n if (this._parentCurvePrimitive !== undefined)\n this._closestPoint.curve = this._parentCurvePrimitive;\n }\n public announceSegmentInterval(\n cp: CurvePrimitive, point0: Point3d, point1: Point3d, _numStrokes: number, fraction0: number, fraction1: number,\n ): void {\n let localFraction = this._spacePoint.fractionOfProjectionToLine(point0, point1, 0.0);\n // only consider extending the segment if the immediate caller says we are at endpoints\n if (!this._extend)\n localFraction = Geometry.clampToStartEnd(localFraction, 0.0, 1.0);\n else {\n if (fraction0 !== 0.0)\n localFraction = Math.max(localFraction, 0.0);\n if (fraction1 !== 1.0)\n localFraction = Math.min(localFraction, 1.0);\n }\n this._workPoint = point0.interpolate(localFraction, point1);\n const globalFraction = Geometry.interpolate(fraction0, localFraction, fraction1);\n this.announceCandidate(cp, globalFraction, this._workPoint);\n }\n /**\n * Given a function `f` and (unordered) fractions `a` and `b`, search for and announce a root of `f` in this\n * fractional interval.\n * * This method searches for a root of `f` if and only if the stroke segment defined by `(a, f(a))` and\n * `(b, f(b))` has a root. This is a HEURISTIC: given continuous `f` between `a` and `b`, a root of the stroke\n * segment implies a root of `f`, but not vice-versa. Therefore, if the strokes are not sufficiently dense,\n * this method can miss a root of `f`.\n */\n private searchInterval() {\n if (this._functionA * this._functionB > 0)\n return; // stroke segment has no root; ASSUME the function has no root either\n if (this._functionA === 0)\n this.announceSolutionFraction(this._fractionA);\n if (this._functionB === 0)\n this.announceSolutionFraction(this._fractionB);\n // by the Intermediate Value Theorem, a root lies between fractionA and fractionB; use Newton to find it.\n if (this._functionA * this._functionB < 0) {\n const fraction = Geometry.inverseInterpolate(this._fractionA, this._functionA, this._fractionB, this._functionB);\n if (fraction) {\n this._newtonSolver.setX(fraction);\n if (this._newtonSolver.runIterations())\n this.announceSolutionFraction(this._newtonSolver.getX());\n }\n }\n }\n private announceSolutionFraction(fraction: number) {\n if (this._curve)\n this.announceCandidate(this._curve, fraction, this._curve.fractionToPoint(fraction));\n }\n /**\n * Evaluate the univariate real-valued function for which we are finding roots.\n * * For finding the closest point to curve X from point Q, this function is `f(t) := Q-X(t) dot X'(t)`.\n * * Either `pointAndDerivative` must be defined, or both `fraction` and `curve`.\n * @param pointAndDerivative pre-evaluated curve\n * @param fraction fraction at which to evaluate `curve`\n * @param curve curve to evaluate at `fraction`\n */\n private evaluateFunction(pointAndDerivative?: Ray3d, fraction?: number, curve?: CurvePrimitive): number | undefined {\n if (pointAndDerivative)\n this._workRay.setFrom(pointAndDerivative);\n else if (fraction !== undefined && curve)\n this._workRay = curve.fractionToPointAndDerivative(fraction, this._workRay);\n else\n return undefined;\n return this._workRay.dotProductToPoint(this._spacePoint);\n }\n public evaluate(fraction: number): boolean {\n let curve = this._curve;\n if (this._parentCurvePrimitive)\n curve = this._parentCurvePrimitive;\n const value = this.evaluateFunction(undefined, fraction, curve);\n if (value === undefined)\n return false;\n this.currentF = value;\n return true;\n }\n private announceRay(fraction: number, data: Ray3d): void {\n this._functionB = this.evaluateFunction(data)!;\n this._fractionB = fraction;\n if (this._numThisCurve++ > 0) // after the first stroke point, a stroke segment is defined, so we have an interval\n this.searchInterval();\n this._functionA = this._functionB;\n this._fractionA = this._fractionB;\n }\n public announcePointTangent(point: Point3d, fraction: number, tangent: Vector3d) {\n this._workRay.set(point, tangent);\n this.announceRay(fraction, this._workRay);\n }\n}\n"]}
@@ -12,6 +12,9 @@ const LineString3d_1 = require("../LineString3d");
12
12
  * @internal
13
13
  */
14
14
  class CountLinearPartsSearchContext extends CurveProcessor_1.RecursiveCurveProcessorWithStack {
15
+ numLineSegment;
16
+ numLineString;
17
+ numOther;
15
18
  constructor() {
16
19
  super();
17
20
  this.numLineSegment = 0;
@@ -1 +1 @@
1
- {"version":3,"file":"CountLinearPartsSearchContext.js","sourceRoot":"","sources":["../../../../src/curve/internalContexts/CountLinearPartsSearchContext.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAO/F,sDAAqE;AACrE,oDAAiD;AACjD,kDAA+C;AAE/C;;GAEG;AACH,MAAa,6BAA8B,SAAQ,iDAAgC;IAIjF;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC;QACxB,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;IACpB,CAAC;IACM,MAAM,CAAC,sBAAsB,CAAC,MAAuB;QAC1D,MAAM,OAAO,GAAG,IAAI,6BAA6B,EAAE,CAAC;QACpD,MAAM,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IAC9B,CAAC;IACe,sBAAsB,CAAC,KAAqB,EAAE,cAAsB;QAClF,IAAI,KAAK,YAAY,6BAAa;YAChC,IAAI,CAAC,cAAc,EAAE,CAAC;aACnB,IAAI,KAAK,YAAY,2BAAY;YACpC,IAAI,CAAC,aAAa,EAAE,CAAC;;YAErB,IAAI,CAAC,QAAQ,EAAE,CAAC;IACpB,CAAC;CACF;AAvBD,sEAuBC","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 { CurveCollection } from \"../CurveCollection\";\r\nimport { CurvePrimitive } from \"../CurvePrimitive\";\r\nimport { RecursiveCurveProcessorWithStack } from \"../CurveProcessor\";\r\nimport { LineSegment3d } from \"../LineSegment3d\";\r\nimport { LineString3d } from \"../LineString3d\";\r\n\r\n/** Algorithmic class: Count LineSegment3d and LineString3d primitives.\r\n * @internal\r\n */\r\nexport class CountLinearPartsSearchContext extends RecursiveCurveProcessorWithStack {\r\n public numLineSegment: number;\r\n public numLineString: number;\r\n public numOther: number;\r\n constructor() {\r\n super();\r\n this.numLineSegment = 0;\r\n this.numLineString = 0;\r\n this.numOther = 0;\r\n }\r\n public static hasNonLinearPrimitives(target: CurveCollection): boolean {\r\n const context = new CountLinearPartsSearchContext();\r\n target.announceToCurveProcessor(context);\r\n return context.numOther > 0;\r\n }\r\n public override announceCurvePrimitive(curve: CurvePrimitive, _indexInParent: number): void {\r\n if (curve instanceof LineSegment3d)\r\n this.numLineSegment++;\r\n else if (curve instanceof LineString3d)\r\n this.numLineString++;\r\n else\r\n this.numOther++;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"CountLinearPartsSearchContext.js","sourceRoot":"","sources":["../../../../src/curve/internalContexts/CountLinearPartsSearchContext.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAO/F,sDAAqE;AACrE,oDAAiD;AACjD,kDAA+C;AAE/C;;GAEG;AACH,MAAa,6BAA8B,SAAQ,iDAAgC;IAC1E,cAAc,CAAS;IACvB,aAAa,CAAS;IACtB,QAAQ,CAAS;IACxB;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC;QACxB,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;IACpB,CAAC;IACM,MAAM,CAAC,sBAAsB,CAAC,MAAuB;QAC1D,MAAM,OAAO,GAAG,IAAI,6BAA6B,EAAE,CAAC;QACpD,MAAM,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IAC9B,CAAC;IACe,sBAAsB,CAAC,KAAqB,EAAE,cAAsB;QAClF,IAAI,KAAK,YAAY,6BAAa;YAChC,IAAI,CAAC,cAAc,EAAE,CAAC;aACnB,IAAI,KAAK,YAAY,2BAAY;YACpC,IAAI,CAAC,aAAa,EAAE,CAAC;;YAErB,IAAI,CAAC,QAAQ,EAAE,CAAC;IACpB,CAAC;CACF;AAvBD,sEAuBC","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\n/** @packageDocumentation\n * @module Curve\n */\nimport { CurveCollection } from \"../CurveCollection\";\nimport { CurvePrimitive } from \"../CurvePrimitive\";\nimport { RecursiveCurveProcessorWithStack } from \"../CurveProcessor\";\nimport { LineSegment3d } from \"../LineSegment3d\";\nimport { LineString3d } from \"../LineString3d\";\n\n/** Algorithmic class: Count LineSegment3d and LineString3d primitives.\n * @internal\n */\nexport class CountLinearPartsSearchContext extends RecursiveCurveProcessorWithStack {\n public numLineSegment: number;\n public numLineString: number;\n public numOther: number;\n constructor() {\n super();\n this.numLineSegment = 0;\n this.numLineString = 0;\n this.numOther = 0;\n }\n public static hasNonLinearPrimitives(target: CurveCollection): boolean {\n const context = new CountLinearPartsSearchContext();\n target.announceToCurveProcessor(context);\n return context.numOther > 0;\n }\n public override announceCurvePrimitive(curve: CurvePrimitive, _indexInParent: number): void {\n if (curve instanceof LineSegment3d)\n this.numLineSegment++;\n else if (curve instanceof LineString3d)\n this.numLineString++;\n else\n this.numOther++;\n }\n}\n"]}
@@ -40,9 +40,27 @@ const LineString3d_1 = require("../LineString3d");
40
40
  * @internal
41
41
  */
42
42
  class CurveCurveCloseApproachXY extends GeometryHandler_1.RecurseToCurvesGeometryHandler {
43
+ _geometryB;
43
44
  setGeometryB(geometryB) {
44
45
  this._geometryB = geometryB;
45
46
  }
47
+ /**
48
+ * Maximum XY distance (z is ignored). Approach larger than this is not interesting.
49
+ * This is caller defined and can be undefined.
50
+ */
51
+ _maxDistanceToAccept;
52
+ /** Squared max distance. This is private, and is forced to at least small metric distance squared. */
53
+ _maxDistanceSquared;
54
+ /**
55
+ * Start and end points of line segments that meet closest approach criteria, i.e., they are perpendicular to
56
+ * both curves and their length is smaller than _maxDistanceToAccept.
57
+ */
58
+ _results;
59
+ static _workPointAA0 = Point3dVector3d_1.Point3d.create();
60
+ static _workPointAA1 = Point3dVector3d_1.Point3d.create();
61
+ static _workPointBB0 = Point3dVector3d_1.Point3d.create();
62
+ static _workPointBB1 = Point3dVector3d_1.Point3d.create();
63
+ static _workPointB = Point3dVector3d_1.Point3d.create();
46
64
  /**
47
65
  * Constructor.
48
66
  * @param geometryB second curve for intersection. Saved for reference by specific handler methods.
@@ -834,9 +852,4 @@ class CurveCurveCloseApproachXY extends GeometryHandler_1.RecurseToCurvesGeometr
834
852
  }
835
853
  }
836
854
  exports.CurveCurveCloseApproachXY = CurveCurveCloseApproachXY;
837
- CurveCurveCloseApproachXY._workPointAA0 = Point3dVector3d_1.Point3d.create();
838
- CurveCurveCloseApproachXY._workPointAA1 = Point3dVector3d_1.Point3d.create();
839
- CurveCurveCloseApproachXY._workPointBB0 = Point3dVector3d_1.Point3d.create();
840
- CurveCurveCloseApproachXY._workPointBB1 = Point3dVector3d_1.Point3d.create();
841
- CurveCurveCloseApproachXY._workPointB = Point3dVector3d_1.Point3d.create();
842
855
  //# sourceMappingURL=CurveCurveCloseApproachXY.js.map