@itwin/core-geometry 4.2.0-dev.9 → 4.3.0-dev.1

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 (478) hide show
  1. package/CHANGELOG.md +36 -1
  2. package/lib/cjs/Geometry.d.ts +4 -4
  3. package/lib/cjs/Geometry.d.ts.map +1 -1
  4. package/lib/cjs/Geometry.js +2 -2
  5. package/lib/cjs/Geometry.js.map +1 -1
  6. package/lib/cjs/clipping/AlternatingConvexClipTree.d.ts +4 -3
  7. package/lib/cjs/clipping/AlternatingConvexClipTree.d.ts.map +1 -1
  8. package/lib/cjs/clipping/AlternatingConvexClipTree.js +1 -1
  9. package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
  10. package/lib/cjs/clipping/BooleanClipNode.d.ts +4 -3
  11. package/lib/cjs/clipping/BooleanClipNode.d.ts.map +1 -1
  12. package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
  13. package/lib/cjs/clipping/ClipPlane.d.ts +2 -1
  14. package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
  15. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  16. package/lib/cjs/clipping/ClipUtils.d.ts +17 -11
  17. package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
  18. package/lib/cjs/clipping/ClipUtils.js +14 -8
  19. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  20. package/lib/cjs/clipping/ClipVector.d.ts +6 -5
  21. package/lib/cjs/clipping/ClipVector.d.ts.map +1 -1
  22. package/lib/cjs/clipping/ClipVector.js +1 -1
  23. package/lib/cjs/clipping/ClipVector.js.map +1 -1
  24. package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts +3 -2
  25. package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  26. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  27. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts +2 -1
  28. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
  29. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  30. package/lib/cjs/core-geometry.d.ts +1 -3
  31. package/lib/cjs/core-geometry.d.ts.map +1 -1
  32. package/lib/cjs/core-geometry.js +1 -3
  33. package/lib/cjs/core-geometry.js.map +1 -1
  34. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  35. package/lib/cjs/curve/Arc3d.js +4 -4
  36. package/lib/cjs/curve/Arc3d.js.map +1 -1
  37. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +93 -91
  38. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
  39. package/lib/cjs/curve/CurveChainWithDistanceIndex.js +171 -152
  40. package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
  41. package/lib/cjs/curve/CurveCollection.d.ts +19 -19
  42. package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
  43. package/lib/cjs/curve/CurveCollection.js +20 -22
  44. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  45. package/lib/cjs/curve/CurveCurve.d.ts +47 -30
  46. package/lib/cjs/curve/CurveCurve.d.ts.map +1 -1
  47. package/lib/cjs/curve/CurveCurve.js +81 -46
  48. package/lib/cjs/curve/CurveCurve.js.map +1 -1
  49. package/lib/cjs/curve/CurveFactory.d.ts +1 -1
  50. package/lib/cjs/curve/CurveFactory.js.map +1 -1
  51. package/lib/cjs/curve/CurveLocationDetail.d.ts +17 -5
  52. package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
  53. package/lib/cjs/curve/CurveLocationDetail.js +14 -2
  54. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  55. package/lib/cjs/curve/CurveOps.d.ts +1 -1
  56. package/lib/cjs/curve/CurveOps.js.map +1 -1
  57. package/lib/cjs/curve/CurvePrimitive.d.ts +1 -2
  58. package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
  59. package/lib/cjs/curve/CurvePrimitive.js +2 -2
  60. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  61. package/lib/cjs/curve/CurveProcessor.d.ts +1 -1
  62. package/lib/cjs/curve/CurveProcessor.js.map +1 -1
  63. package/lib/cjs/curve/{CurveChain.d.ts → CurveTypes.d.ts} +6 -6
  64. package/lib/cjs/curve/CurveTypes.d.ts.map +1 -0
  65. package/lib/cjs/curve/{CurveChain.js → CurveTypes.js} +1 -1
  66. package/lib/cjs/curve/CurveTypes.js.map +1 -0
  67. package/lib/cjs/curve/CurveWireMomentsXYZ.d.ts +1 -1
  68. package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
  69. package/lib/cjs/curve/ParityRegion.d.ts +3 -3
  70. package/lib/cjs/curve/ParityRegion.d.ts.map +1 -1
  71. package/lib/cjs/curve/ParityRegion.js +2 -2
  72. package/lib/cjs/curve/ParityRegion.js.map +1 -1
  73. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts +3 -2
  74. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  75. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js +2 -2
  76. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  77. package/lib/cjs/curve/Query/CurveSplitContext.d.ts +1 -1
  78. package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
  79. package/lib/cjs/curve/Query/CylindricalRange.d.ts +1 -1
  80. package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
  81. package/lib/cjs/curve/Query/InOutTests.d.ts +1 -1
  82. package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
  83. package/lib/cjs/curve/Query/StrokeCountChain.d.ts +1 -1
  84. package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
  85. package/lib/cjs/curve/RegionOps.d.ts +54 -5
  86. package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
  87. package/lib/cjs/curve/RegionOps.js +154 -3
  88. package/lib/cjs/curve/RegionOps.js.map +1 -1
  89. package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts +1 -1
  90. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  91. package/lib/cjs/curve/StrokeOptions.d.ts +20 -11
  92. package/lib/cjs/curve/StrokeOptions.d.ts.map +1 -1
  93. package/lib/cjs/curve/StrokeOptions.js +22 -11
  94. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  95. package/lib/cjs/curve/UnionRegion.d.ts +3 -3
  96. package/lib/cjs/curve/UnionRegion.d.ts.map +1 -1
  97. package/lib/cjs/curve/UnionRegion.js +2 -2
  98. package/lib/cjs/curve/UnionRegion.js.map +1 -1
  99. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.d.ts +1 -1
  100. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.d.ts.map +1 -1
  101. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js +2 -2
  102. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  103. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +233 -0
  104. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -0
  105. package/lib/cjs/curve/{CurveCurveCloseApproachXY.js → internalContexts/CurveCurveCloseApproachXY.js} +299 -202
  106. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -0
  107. package/lib/{esm/curve → cjs/curve/internalContexts}/CurveCurveIntersectXY.d.ts +45 -51
  108. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -0
  109. package/lib/cjs/curve/{CurveCurveIntersectXY.js → internalContexts/CurveCurveIntersectXY.js} +104 -115
  110. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -0
  111. package/lib/cjs/curve/{CurveCurveIntersectXYZ.d.ts → internalContexts/CurveCurveIntersectXYZ.d.ts} +18 -18
  112. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.d.ts.map +1 -0
  113. package/lib/cjs/curve/{CurveCurveIntersectXYZ.js → internalContexts/CurveCurveIntersectXYZ.js} +134 -108
  114. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -0
  115. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.d.ts +2 -2
  116. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.d.ts.map +1 -1
  117. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js +9 -5
  118. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  119. package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts +1 -1
  120. package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
  121. package/lib/cjs/geometry3d/BarycentricTriangle.d.ts +1 -0
  122. package/lib/cjs/geometry3d/BarycentricTriangle.d.ts.map +1 -1
  123. package/lib/cjs/geometry3d/BarycentricTriangle.js +1 -0
  124. package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
  125. package/lib/cjs/geometry3d/FrameBuilder.d.ts +28 -11
  126. package/lib/cjs/geometry3d/FrameBuilder.d.ts.map +1 -1
  127. package/lib/cjs/geometry3d/FrameBuilder.js +57 -45
  128. package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
  129. package/lib/cjs/geometry3d/GeometryHandler.d.ts +15 -26
  130. package/lib/cjs/geometry3d/GeometryHandler.d.ts.map +1 -1
  131. package/lib/cjs/geometry3d/GeometryHandler.js +23 -32
  132. package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
  133. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +0 -8
  134. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  135. package/lib/cjs/geometry3d/GrowableXYZArray.js +0 -16
  136. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  137. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +4 -4
  138. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  139. package/lib/cjs/geometry3d/IndexedXYZCollection.js +12 -0
  140. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  141. package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
  142. package/lib/cjs/geometry3d/Matrix3d.js +3 -6
  143. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  144. package/lib/cjs/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
  145. package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
  146. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +1 -2
  147. package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
  148. package/lib/cjs/geometry3d/Point3dVector3d.js +0 -1
  149. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  150. package/lib/cjs/geometry3d/PolygonOps.d.ts +2 -2
  151. package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
  152. package/lib/cjs/geometry3d/PolygonOps.js +2 -3
  153. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  154. package/lib/cjs/geometry3d/Range.d.ts +1 -1
  155. package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
  156. package/lib/cjs/geometry3d/Range.js +1 -1
  157. package/lib/cjs/geometry3d/Range.js.map +1 -1
  158. package/lib/cjs/geometry3d/Ray3d.d.ts +3 -1
  159. package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
  160. package/lib/cjs/geometry3d/Ray3d.js +4 -3
  161. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  162. package/lib/cjs/geometry3d/ReusableObjectCache.d.ts +2 -1
  163. package/lib/cjs/geometry3d/ReusableObjectCache.d.ts.map +1 -1
  164. package/lib/cjs/geometry3d/ReusableObjectCache.js +1 -1
  165. package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
  166. package/lib/cjs/geometry3d/SortablePolygon.d.ts +1 -1
  167. package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
  168. package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
  169. package/lib/cjs/geometry3d/Transform.js +4 -6
  170. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  171. package/lib/cjs/geometry3d/YawPitchRollAngles.js +1 -1
  172. package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
  173. package/lib/cjs/geometry4d/Map4d.d.ts +14 -8
  174. package/lib/cjs/geometry4d/Map4d.d.ts.map +1 -1
  175. package/lib/cjs/geometry4d/Map4d.js +38 -16
  176. package/lib/cjs/geometry4d/Map4d.js.map +1 -1
  177. package/lib/cjs/geometry4d/Matrix4d.d.ts.map +1 -1
  178. package/lib/cjs/geometry4d/Matrix4d.js +4 -2
  179. package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
  180. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  181. package/lib/cjs/numerics/Polynomials.d.ts +2 -2
  182. package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
  183. package/lib/cjs/numerics/Polynomials.js +2 -2
  184. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  185. package/lib/cjs/polyface/PolyfaceBuilder.d.ts +18 -6
  186. package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
  187. package/lib/cjs/polyface/PolyfaceBuilder.js +55 -25
  188. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  189. package/lib/cjs/polyface/PolyfaceClip.d.ts +16 -7
  190. package/lib/cjs/polyface/PolyfaceClip.d.ts.map +1 -1
  191. package/lib/cjs/polyface/PolyfaceClip.js +38 -7
  192. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  193. package/lib/cjs/polyface/PolyfaceData.d.ts +5 -39
  194. package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
  195. package/lib/cjs/polyface/PolyfaceData.js +7 -41
  196. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  197. package/lib/cjs/polyface/PolyfaceQuery.d.ts +10 -8
  198. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  199. package/lib/cjs/polyface/PolyfaceQuery.js +64 -18
  200. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  201. package/lib/cjs/serialization/GeometrySamples.d.ts +6 -0
  202. package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
  203. package/lib/cjs/serialization/GeometrySamples.js +68 -2
  204. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  205. package/lib/cjs/solid/LinearSweep.d.ts +1 -1
  206. package/lib/cjs/solid/LinearSweep.js.map +1 -1
  207. package/lib/cjs/solid/RotationalSweep.d.ts +1 -1
  208. package/lib/cjs/solid/RotationalSweep.js.map +1 -1
  209. package/lib/cjs/solid/RuledSweep.d.ts +1 -1
  210. package/lib/cjs/solid/RuledSweep.js.map +1 -1
  211. package/lib/cjs/solid/SweepContour.d.ts +35 -26
  212. package/lib/cjs/solid/SweepContour.d.ts.map +1 -1
  213. package/lib/cjs/solid/SweepContour.js +84 -100
  214. package/lib/cjs/solid/SweepContour.js.map +1 -1
  215. package/lib/cjs/topology/Graph.d.ts +29 -11
  216. package/lib/cjs/topology/Graph.d.ts.map +1 -1
  217. package/lib/cjs/topology/Graph.js +45 -26
  218. package/lib/cjs/topology/Graph.js.map +1 -1
  219. package/lib/cjs/topology/HalfEdgeMarkSet.d.ts +2 -2
  220. package/lib/cjs/topology/HalfEdgeMarkSet.d.ts.map +1 -1
  221. package/lib/cjs/topology/HalfEdgeMarkSet.js +4 -4
  222. package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
  223. package/lib/cjs/topology/Merging.d.ts +3 -0
  224. package/lib/cjs/topology/Merging.d.ts.map +1 -1
  225. package/lib/cjs/topology/Merging.js +19 -5
  226. package/lib/cjs/topology/Merging.js.map +1 -1
  227. package/lib/cjs/topology/Triangulation.d.ts +15 -7
  228. package/lib/cjs/topology/Triangulation.d.ts.map +1 -1
  229. package/lib/cjs/topology/Triangulation.js +89 -47
  230. package/lib/cjs/topology/Triangulation.js.map +1 -1
  231. package/lib/esm/Geometry.d.ts +4 -4
  232. package/lib/esm/Geometry.d.ts.map +1 -1
  233. package/lib/esm/Geometry.js +2 -2
  234. package/lib/esm/Geometry.js.map +1 -1
  235. package/lib/esm/clipping/AlternatingConvexClipTree.d.ts +4 -3
  236. package/lib/esm/clipping/AlternatingConvexClipTree.d.ts.map +1 -1
  237. package/lib/esm/clipping/AlternatingConvexClipTree.js +1 -1
  238. package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
  239. package/lib/esm/clipping/BooleanClipNode.d.ts +4 -3
  240. package/lib/esm/clipping/BooleanClipNode.d.ts.map +1 -1
  241. package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
  242. package/lib/esm/clipping/ClipPlane.d.ts +2 -1
  243. package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
  244. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  245. package/lib/esm/clipping/ClipUtils.d.ts +17 -11
  246. package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
  247. package/lib/esm/clipping/ClipUtils.js +14 -8
  248. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  249. package/lib/esm/clipping/ClipVector.d.ts +6 -5
  250. package/lib/esm/clipping/ClipVector.d.ts.map +1 -1
  251. package/lib/esm/clipping/ClipVector.js +1 -1
  252. package/lib/esm/clipping/ClipVector.js.map +1 -1
  253. package/lib/esm/clipping/ConvexClipPlaneSet.d.ts +3 -2
  254. package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  255. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  256. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts +2 -1
  257. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
  258. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  259. package/lib/esm/core-geometry.d.ts +1 -3
  260. package/lib/esm/core-geometry.d.ts.map +1 -1
  261. package/lib/esm/core-geometry.js +1 -3
  262. package/lib/esm/core-geometry.js.map +1 -1
  263. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  264. package/lib/esm/curve/Arc3d.js +4 -4
  265. package/lib/esm/curve/Arc3d.js.map +1 -1
  266. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +93 -91
  267. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
  268. package/lib/esm/curve/CurveChainWithDistanceIndex.js +171 -152
  269. package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
  270. package/lib/esm/curve/CurveCollection.d.ts +19 -19
  271. package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
  272. package/lib/esm/curve/CurveCollection.js +19 -20
  273. package/lib/esm/curve/CurveCollection.js.map +1 -1
  274. package/lib/esm/curve/CurveCurve.d.ts +47 -30
  275. package/lib/esm/curve/CurveCurve.d.ts.map +1 -1
  276. package/lib/esm/curve/CurveCurve.js +81 -46
  277. package/lib/esm/curve/CurveCurve.js.map +1 -1
  278. package/lib/esm/curve/CurveFactory.d.ts +1 -1
  279. package/lib/esm/curve/CurveFactory.js.map +1 -1
  280. package/lib/esm/curve/CurveLocationDetail.d.ts +17 -5
  281. package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
  282. package/lib/esm/curve/CurveLocationDetail.js +12 -1
  283. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  284. package/lib/esm/curve/CurveOps.d.ts +1 -1
  285. package/lib/esm/curve/CurveOps.js.map +1 -1
  286. package/lib/esm/curve/CurvePrimitive.d.ts +1 -2
  287. package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
  288. package/lib/esm/curve/CurvePrimitive.js +2 -2
  289. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  290. package/lib/esm/curve/CurveProcessor.d.ts +1 -1
  291. package/lib/esm/curve/CurveProcessor.js.map +1 -1
  292. package/lib/esm/curve/{CurveChain.d.ts → CurveTypes.d.ts} +6 -6
  293. package/lib/esm/curve/CurveTypes.d.ts.map +1 -0
  294. package/lib/esm/curve/{CurveChain.js → CurveTypes.js} +1 -1
  295. package/lib/esm/curve/CurveTypes.js.map +1 -0
  296. package/lib/esm/curve/CurveWireMomentsXYZ.d.ts +1 -1
  297. package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
  298. package/lib/esm/curve/ParityRegion.d.ts +3 -3
  299. package/lib/esm/curve/ParityRegion.d.ts.map +1 -1
  300. package/lib/esm/curve/ParityRegion.js +2 -2
  301. package/lib/esm/curve/ParityRegion.js.map +1 -1
  302. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts +3 -2
  303. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  304. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js +1 -1
  305. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  306. package/lib/esm/curve/Query/CurveSplitContext.d.ts +1 -1
  307. package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
  308. package/lib/esm/curve/Query/CylindricalRange.d.ts +1 -1
  309. package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
  310. package/lib/esm/curve/Query/InOutTests.d.ts +1 -1
  311. package/lib/esm/curve/Query/InOutTests.js.map +1 -1
  312. package/lib/esm/curve/Query/StrokeCountChain.d.ts +1 -1
  313. package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
  314. package/lib/esm/curve/RegionOps.d.ts +54 -5
  315. package/lib/esm/curve/RegionOps.d.ts.map +1 -1
  316. package/lib/esm/curve/RegionOps.js +153 -3
  317. package/lib/esm/curve/RegionOps.js.map +1 -1
  318. package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts +1 -1
  319. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  320. package/lib/esm/curve/StrokeOptions.d.ts +20 -11
  321. package/lib/esm/curve/StrokeOptions.d.ts.map +1 -1
  322. package/lib/esm/curve/StrokeOptions.js +22 -11
  323. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  324. package/lib/esm/curve/UnionRegion.d.ts +3 -3
  325. package/lib/esm/curve/UnionRegion.d.ts.map +1 -1
  326. package/lib/esm/curve/UnionRegion.js +2 -2
  327. package/lib/esm/curve/UnionRegion.js.map +1 -1
  328. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.d.ts +1 -1
  329. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.d.ts.map +1 -1
  330. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js +2 -2
  331. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  332. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +233 -0
  333. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -0
  334. package/lib/esm/curve/{CurveCurveCloseApproachXY.js → internalContexts/CurveCurveCloseApproachXY.js} +299 -202
  335. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -0
  336. package/lib/{cjs/curve → esm/curve/internalContexts}/CurveCurveIntersectXY.d.ts +45 -51
  337. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -0
  338. package/lib/esm/curve/{CurveCurveIntersectXY.js → internalContexts/CurveCurveIntersectXY.js} +103 -113
  339. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -0
  340. package/lib/esm/curve/{CurveCurveIntersectXYZ.d.ts → internalContexts/CurveCurveIntersectXYZ.d.ts} +18 -18
  341. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.d.ts.map +1 -0
  342. package/lib/esm/curve/{CurveCurveIntersectXYZ.js → internalContexts/CurveCurveIntersectXYZ.js} +134 -108
  343. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -0
  344. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.d.ts +2 -2
  345. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.d.ts.map +1 -1
  346. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js +9 -5
  347. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  348. package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts +1 -1
  349. package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
  350. package/lib/esm/geometry3d/BarycentricTriangle.d.ts +1 -0
  351. package/lib/esm/geometry3d/BarycentricTriangle.d.ts.map +1 -1
  352. package/lib/esm/geometry3d/BarycentricTriangle.js +1 -0
  353. package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
  354. package/lib/esm/geometry3d/FrameBuilder.d.ts +28 -11
  355. package/lib/esm/geometry3d/FrameBuilder.d.ts.map +1 -1
  356. package/lib/esm/geometry3d/FrameBuilder.js +57 -45
  357. package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
  358. package/lib/esm/geometry3d/GeometryHandler.d.ts +15 -26
  359. package/lib/esm/geometry3d/GeometryHandler.d.ts.map +1 -1
  360. package/lib/esm/geometry3d/GeometryHandler.js +23 -32
  361. package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
  362. package/lib/esm/geometry3d/GrowableXYZArray.d.ts +0 -8
  363. package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  364. package/lib/esm/geometry3d/GrowableXYZArray.js +0 -16
  365. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  366. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +4 -4
  367. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  368. package/lib/esm/geometry3d/IndexedXYZCollection.js +12 -0
  369. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  370. package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
  371. package/lib/esm/geometry3d/Matrix3d.js +3 -6
  372. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  373. package/lib/esm/geometry3d/Point3dArrayCarrier.d.ts.map +1 -1
  374. package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
  375. package/lib/esm/geometry3d/Point3dVector3d.d.ts +1 -2
  376. package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
  377. package/lib/esm/geometry3d/Point3dVector3d.js +0 -1
  378. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  379. package/lib/esm/geometry3d/PolygonOps.d.ts +2 -2
  380. package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
  381. package/lib/esm/geometry3d/PolygonOps.js +2 -3
  382. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  383. package/lib/esm/geometry3d/Range.d.ts +1 -1
  384. package/lib/esm/geometry3d/Range.d.ts.map +1 -1
  385. package/lib/esm/geometry3d/Range.js +1 -1
  386. package/lib/esm/geometry3d/Range.js.map +1 -1
  387. package/lib/esm/geometry3d/Ray3d.d.ts +3 -1
  388. package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
  389. package/lib/esm/geometry3d/Ray3d.js +4 -3
  390. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  391. package/lib/esm/geometry3d/ReusableObjectCache.d.ts +2 -1
  392. package/lib/esm/geometry3d/ReusableObjectCache.d.ts.map +1 -1
  393. package/lib/esm/geometry3d/ReusableObjectCache.js +1 -1
  394. package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
  395. package/lib/esm/geometry3d/SortablePolygon.d.ts +1 -1
  396. package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
  397. package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
  398. package/lib/esm/geometry3d/Transform.js +4 -6
  399. package/lib/esm/geometry3d/Transform.js.map +1 -1
  400. package/lib/esm/geometry3d/YawPitchRollAngles.js +1 -1
  401. package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
  402. package/lib/esm/geometry4d/Map4d.d.ts +14 -8
  403. package/lib/esm/geometry4d/Map4d.d.ts.map +1 -1
  404. package/lib/esm/geometry4d/Map4d.js +38 -16
  405. package/lib/esm/geometry4d/Map4d.js.map +1 -1
  406. package/lib/esm/geometry4d/Matrix4d.d.ts.map +1 -1
  407. package/lib/esm/geometry4d/Matrix4d.js +4 -2
  408. package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
  409. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  410. package/lib/esm/numerics/Polynomials.d.ts +2 -2
  411. package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
  412. package/lib/esm/numerics/Polynomials.js +2 -2
  413. package/lib/esm/numerics/Polynomials.js.map +1 -1
  414. package/lib/esm/polyface/PolyfaceBuilder.d.ts +18 -6
  415. package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
  416. package/lib/esm/polyface/PolyfaceBuilder.js +55 -25
  417. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  418. package/lib/esm/polyface/PolyfaceClip.d.ts +16 -7
  419. package/lib/esm/polyface/PolyfaceClip.d.ts.map +1 -1
  420. package/lib/esm/polyface/PolyfaceClip.js +38 -7
  421. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  422. package/lib/esm/polyface/PolyfaceData.d.ts +5 -39
  423. package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
  424. package/lib/esm/polyface/PolyfaceData.js +7 -41
  425. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  426. package/lib/esm/polyface/PolyfaceQuery.d.ts +10 -8
  427. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  428. package/lib/esm/polyface/PolyfaceQuery.js +64 -18
  429. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  430. package/lib/esm/serialization/GeometrySamples.d.ts +6 -0
  431. package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
  432. package/lib/esm/serialization/GeometrySamples.js +68 -2
  433. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  434. package/lib/esm/solid/LinearSweep.d.ts +1 -1
  435. package/lib/esm/solid/LinearSweep.js.map +1 -1
  436. package/lib/esm/solid/RotationalSweep.d.ts +1 -1
  437. package/lib/esm/solid/RotationalSweep.js.map +1 -1
  438. package/lib/esm/solid/RuledSweep.d.ts +1 -1
  439. package/lib/esm/solid/RuledSweep.js.map +1 -1
  440. package/lib/esm/solid/SweepContour.d.ts +35 -26
  441. package/lib/esm/solid/SweepContour.d.ts.map +1 -1
  442. package/lib/esm/solid/SweepContour.js +84 -100
  443. package/lib/esm/solid/SweepContour.js.map +1 -1
  444. package/lib/esm/topology/Graph.d.ts +29 -11
  445. package/lib/esm/topology/Graph.d.ts.map +1 -1
  446. package/lib/esm/topology/Graph.js +45 -26
  447. package/lib/esm/topology/Graph.js.map +1 -1
  448. package/lib/esm/topology/HalfEdgeMarkSet.d.ts +2 -2
  449. package/lib/esm/topology/HalfEdgeMarkSet.d.ts.map +1 -1
  450. package/lib/esm/topology/HalfEdgeMarkSet.js +2 -2
  451. package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
  452. package/lib/esm/topology/Merging.d.ts +3 -0
  453. package/lib/esm/topology/Merging.d.ts.map +1 -1
  454. package/lib/esm/topology/Merging.js +19 -5
  455. package/lib/esm/topology/Merging.js.map +1 -1
  456. package/lib/esm/topology/Triangulation.d.ts +15 -7
  457. package/lib/esm/topology/Triangulation.d.ts.map +1 -1
  458. package/lib/esm/topology/Triangulation.js +89 -47
  459. package/lib/esm/topology/Triangulation.js.map +1 -1
  460. package/package.json +4 -4
  461. package/lib/cjs/curve/CurveChain.d.ts.map +0 -1
  462. package/lib/cjs/curve/CurveChain.js.map +0 -1
  463. package/lib/cjs/curve/CurveCurveCloseApproachXY.d.ts +0 -175
  464. package/lib/cjs/curve/CurveCurveCloseApproachXY.d.ts.map +0 -1
  465. package/lib/cjs/curve/CurveCurveCloseApproachXY.js.map +0 -1
  466. package/lib/cjs/curve/CurveCurveIntersectXY.d.ts.map +0 -1
  467. package/lib/cjs/curve/CurveCurveIntersectXY.js.map +0 -1
  468. package/lib/cjs/curve/CurveCurveIntersectXYZ.d.ts.map +0 -1
  469. package/lib/cjs/curve/CurveCurveIntersectXYZ.js.map +0 -1
  470. package/lib/esm/curve/CurveChain.d.ts.map +0 -1
  471. package/lib/esm/curve/CurveChain.js.map +0 -1
  472. package/lib/esm/curve/CurveCurveCloseApproachXY.d.ts +0 -175
  473. package/lib/esm/curve/CurveCurveCloseApproachXY.d.ts.map +0 -1
  474. package/lib/esm/curve/CurveCurveCloseApproachXY.js.map +0 -1
  475. package/lib/esm/curve/CurveCurveIntersectXY.d.ts.map +0 -1
  476. package/lib/esm/curve/CurveCurveIntersectXY.js.map +0 -1
  477. package/lib/esm/curve/CurveCurveIntersectXYZ.d.ts.map +0 -1
  478. package/lib/esm/curve/CurveCurveIntersectXYZ.js.map +0 -1
@@ -17,7 +17,7 @@ import { NewtonRtoRStrokeHandler } from "./NewtonRtoRStrokeHandler";
17
17
  * @internal
18
18
  */
19
19
  export class ClosestPointStrokeHandler extends NewtonRtoRStrokeHandler {
20
- constructor(spacePoint, extend) {
20
+ constructor(spacePoint, extend, result) {
21
21
  super();
22
22
  this._fractionA = 0;
23
23
  this._functionA = 0;
@@ -27,7 +27,7 @@ export class ClosestPointStrokeHandler extends NewtonRtoRStrokeHandler {
27
27
  this._spacePoint = spacePoint;
28
28
  this._workPoint = Point3d.create();
29
29
  this._workRay = Ray3d.createZero();
30
- this._closestPoint = undefined;
30
+ this._closestPoint = result;
31
31
  this._extend = extend;
32
32
  this.startCurvePrimitive(undefined);
33
33
  this._newtonSolver = new Newton1dUnboundedApproximateDerivative(this);
@@ -1 +1 @@
1
- {"version":3,"file":"ClosestPointStrokeHandler.js","sourceRoot":"","sources":["../../../../src/curve/internalContexts/ClosestPointStrokeHandler.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MA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AC,MAAM,EAAE,QAAQ,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;YACT,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;SACb;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","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) {\r\n super();\r\n this._spacePoint = spacePoint;\r\n this._workPoint = Point3d.create();\r\n this._workRay = Ray3d.createZero();\r\n this._closestPoint = undefined;\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"],"names":[],"mappings":"AAAA;;;+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C/C,IAAI,IAAI,CAAC,MAAM;YACb,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,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;YACT,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;SACb;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","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"]}
@@ -0,0 +1,233 @@
1
+ import { BSplineCurve3d } from "../../bspline/BSplineCurve";
2
+ import { BSplineCurve3dH } from "../../bspline/BSplineCurve3dH";
3
+ import { RecurseToCurvesGeometryHandler } from "../../geometry3d/GeometryHandler";
4
+ import { Arc3d } from "../Arc3d";
5
+ import { CurveChainWithDistanceIndex } from "../CurveChainWithDistanceIndex";
6
+ import { CurveLocationDetail, CurveLocationDetailPair } from "../CurveLocationDetail";
7
+ import { CurvePrimitive } from "../CurvePrimitive";
8
+ import { AnyCurve } from "../CurveTypes";
9
+ import { LineSegment3d } from "../LineSegment3d";
10
+ import { LineString3d } from "../LineString3d";
11
+ /**
12
+ * Handler class for XY close approach between _geometryB and another geometry.
13
+ * * Approach means the XY distance (z is ignored) between _geometryB and another geometry.
14
+ * * Closest approach is a measure of the proximity of one curve to another. It's the length of the shortest line
15
+ * segment perpendicular to both curves; if the curves intersect, the closest approach is zero. In the context of
16
+ * this class, z-coordinates are ignored, so the closest approach is as seen in the top view. If you have coplanar
17
+ * input curves and want to find closest approach in their plane, rotate them first into a plane parallel to the
18
+ * xy-plane, then afterward, rotate the results back as required.
19
+ * * Close approach can also be from a curve endpoint perpendicular to another curve or from a curve endpoint to
20
+ * another curve endpoint.
21
+ * * Instances are initialized and called from CurveCurve.
22
+ * * geometryB is saved for later reference.
23
+ * @internal
24
+ */
25
+ export declare class CurveCurveCloseApproachXY extends RecurseToCurvesGeometryHandler {
26
+ private _geometryB;
27
+ private _circularArcB;
28
+ private _circularRadiusB;
29
+ private setGeometryB;
30
+ /**
31
+ * Maximum XY distance (z is ignored). Approach larger than this is not interesting.
32
+ * This is caller defined and can be undefined.
33
+ */
34
+ private _maxDistanceToAccept;
35
+ /** Squared max distance. This is private, and is forced to at least small metric distance squared. */
36
+ private _maxDistanceSquared;
37
+ /**
38
+ * Start and end points of line segments that meet closest approach criteria, i.e., they are perpendicular to
39
+ * both curves and their length is smaller than _maxDistanceToAccept.
40
+ */
41
+ private _results;
42
+ private static _workPointAA0;
43
+ private static _workPointAA1;
44
+ private static _workPointBB0;
45
+ private static _workPointBB1;
46
+ private static _workPointB;
47
+ /**
48
+ * Constructor.
49
+ * @param geometryB second curve for intersection. Saved for reference by specific handler methods.
50
+ */
51
+ constructor(geometryB: AnyCurve | undefined);
52
+ /** Set the (possibly undefined) max XY distance (z is ignored) to accept. */
53
+ set maxDistanceToAccept(value: number | undefined);
54
+ /** Access the (possibly undefined) max XY distance (z is ignored) to accept. */
55
+ get maxDistanceToAccept(): number | undefined;
56
+ /** Ask if the maxDistanceToAccept value is defined and positive */
57
+ get isMaxDistanceSet(): boolean;
58
+ /** Reset the geometry and flags, leaving all other parts unchanged (and preserving accumulated intersections) */
59
+ resetGeometry(geometryB: AnyCurve): void;
60
+ /** returns true if `fraction` is in [0,1] within tolerance */
61
+ private acceptFraction;
62
+ /**
63
+ * Return the results structure for the intersection calculation, structured as an array of CurveLocationDetailPair.
64
+ * @param reinitialize if true, a new results structure is created for use by later calls.
65
+ */
66
+ grabPairedResults(reinitialize?: boolean): CurveLocationDetailPair[];
67
+ /** Returns `true` if `detail` has same curve and fraction. */
68
+ private sameCurveAndFraction;
69
+ /**
70
+ * If distance between pointA and pointB is less than maxDistance, record CurveLocationDetailPair which is
71
+ * the approach from pointA to pointB.
72
+ */
73
+ private testAndRecordPointPairApproach;
74
+ /**
75
+ * Create a close approach pair if XY distance is within maxDistance.
76
+ * @param localFractionA a fraction on first curve
77
+ * @param cpA the first curve
78
+ * @param fractionA0 start of the first curve
79
+ * @param fractionA1 end of the first curve
80
+ * @param localFractionB a fraction on second curve
81
+ * @param cpB the second curve
82
+ * @param fractionB0 start of the second curve
83
+ * @param fractionB1 end of the second curve
84
+ * @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
85
+ * @param intervalDetails optional CurveLocationDetailPair
86
+ */
87
+ private recordPointWithLocalFractions;
88
+ /**
89
+ * Capture a close approach pair that has point and local fraction but not curve.
90
+ * * Record the pair, each detail modified with global fraction and input curve.
91
+ * * Pair is neither modified nor recorded if it would be a duplicate of the last recorded pair.
92
+ * @param pair details computed with local fractions
93
+ * @param cpA curveA
94
+ * @param fractionA0 global start fraction on curveA
95
+ * @param fractionA1 global end fraction on curveA
96
+ * @param cpB curveB
97
+ * @param fractionB0 global start fraction on curveB
98
+ * @param fractionB1 global end fraction on curveB
99
+ * @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
100
+ */
101
+ private capturePairWithLocalFractions;
102
+ /**
103
+ * Emit recordPoint for multiple pairs (on full curve) if within maxDistance.
104
+ * @param cpA first curve primitive (possibly different from curve in detailA, but fraction compatible)
105
+ * @param cpB second curve primitive (possibly different from curve in detailA, but fraction compatible)
106
+ * @param pairs array of pairs
107
+ * @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
108
+ */
109
+ recordPairs(cpA: CurvePrimitive, cpB: CurvePrimitive, pairs: CurveLocationDetailPair[] | undefined, reversed: boolean): void;
110
+ /**
111
+ * Record fully assembled (but possibly reversed) detail pair.
112
+ * @param detailA first detail
113
+ * @param detailB second detail
114
+ * @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
115
+ */
116
+ captureDetailPair(detailA: CurveLocationDetail | undefined, detailB: CurveLocationDetail | undefined, reversed: boolean): void;
117
+ private static updatePointToSegmentDistance;
118
+ /**
119
+ * Return fractions of close approach within maxDistance between two line segments (a0,a1) and (b0,b1).
120
+ * * Math details can be found at core/geometry/internaldocs/Curve.md
121
+ * @param a0 start point of line a
122
+ * @param a1 end point of line a
123
+ * @param b0 start point of line b
124
+ * @param b1 end point of line b
125
+ * @param maxDistanceSquared maximum distance squared (assumed to be positive)
126
+ * @returns the fractional (not xy) coordinates in result.x and result.y. result.x is fraction on line a.
127
+ * result.y is fraction on line b.
128
+ */
129
+ private static segmentSegmentBoundedApproach;
130
+ /**
131
+ * Check different combination of fractions on curveA and curveB. If distance between points at 2 fractions
132
+ * is less than maxDistance, record CurveLocationDetailPair which is the approach between the 2 points.
133
+ * Optionally, record close approaches of one curve's points if they fall between the other curve's points.
134
+ * @param cpA curveA
135
+ * @param fA0 fraction0 on curveA
136
+ * @param fA1 fraction1 on curveA
137
+ * @param testProjectionOnA whether to record projections of the given curveB points onto curveA
138
+ * @param cpB curveB
139
+ * @param fB0 fraction0 on curveB
140
+ * @param fB1 fraction0 on curveB
141
+ * @param testProjectionOnB whether to record projections of the given curveA points onto curveB
142
+ * @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
143
+ */
144
+ private testAndRecordFractionalPairApproach;
145
+ /** Find the closest approach between pointA and cpB. Add the approach if it's within fB0 and fB1. */
146
+ private testAndRecordProjection;
147
+ /**
148
+ * Compute intersection of two line segments.
149
+ * Filter by extension rules.
150
+ * Record with fraction mapping.
151
+ * * The fraction mappings allow portions of a linestring to be passed here.
152
+ */
153
+ private computeSegmentSegment3D;
154
+ /** Low level dispatch of segment with segment. */
155
+ private dispatchSegmentSegment;
156
+ /**
157
+ * Low level dispatch of segment with arc.
158
+ * Find close approaches within maxDistance between a line segments (pointA0, pointA1) and an arc.
159
+ * To consider:
160
+ * 1) intersection between arc and segment.
161
+ * 2) arc endpoints to segment endpoints or arc endpoints projection to the segment.
162
+ * 3) line parallel to arc tangent.
163
+ * @param cpA curve A (line segment or line string)
164
+ * @param pointA0 start point of the segment
165
+ * @param fractionA0 fraction of the start of the segment
166
+ * @param pointA1 end point of the segment
167
+ * @param fractionA1 fraction of the end of the segment
168
+ * @param arc the arc
169
+ * @param reversed whether to reverse the details in the pair (e.g., so that detailB refers to geometryB).
170
+ */
171
+ private dispatchSegmentArc;
172
+ /** Low level dispatch of circular arc with circular arc. radiusA must be larger than or equal to radiusB. */
173
+ private dispatchCircularCircularOrdered;
174
+ /** Find the fractional point (if any) on the circular `arc` in the direction of `radialVector`. */
175
+ private resolveDirectionToArcXYFraction;
176
+ /** Low level dispatch of arc with arc. Only circular arcs are supported. */
177
+ private dispatchArcArc;
178
+ /** Low level dispatch of arc with (beziers of) a bspline curve */
179
+ private dispatchArcBsplineCurve3d;
180
+ /** Low level dispatch of (beziers of) a bspline curve with (beziers of) a bspline curve */
181
+ private dispatchBSplineCurve3dBSplineCurve3d;
182
+ /** Low level dispatch of linestring with (beziers of) a bspline curve */
183
+ dispatchLineStringBSplineCurve(lsA: LineString3d, curveB: BSplineCurve3d, reversed: boolean): any;
184
+ /** Low level dispatch of segment with (beziers of) a bspline curve */
185
+ dispatchSegmentBsplineCurve(segA: LineSegment3d, curveB: BSplineCurve3d, reversed: boolean): any;
186
+ /** Detail computation for segment approaching linestring. */
187
+ computeSegmentLineString(segA: LineSegment3d, lsB: LineString3d, reversed: boolean): void;
188
+ /** Detail computation for arc approaching linestring. */
189
+ computeArcLineString(arcA: Arc3d, lsB: LineString3d, reversed: boolean): any;
190
+ /** Low level dispatch of curve collection. */
191
+ private dispatchCurveCollection;
192
+ /**
193
+ * Given a parent chain, convert the corresponding child details so that they refer to the chain's global parameterization.
194
+ * * It is assumed that `this._results[i].detailA.curve` is a child of chainA, and similarly for detailB/chainB.
195
+ * @param chainA convert each detailA to the global parameterization of chainA
196
+ * @param chainB convert each detailB to the global parameterization of chainB
197
+ */
198
+ private convertChildDetailToChainDetail;
199
+ /** Low level dispatch to geomA given a CurveChainWithDistanceIndex in geometryB. */
200
+ private dispatchCurveChainWithDistanceIndex;
201
+ /** Double dispatch handler for strongly typed segment. */
202
+ handleLineSegment3d(segmentA: LineSegment3d): any;
203
+ /**
204
+ * Set bits for comparison to range xy
205
+ * * bit 0x01 => x smaller than range.low.x
206
+ * * bit 0x02 => x larger than range.high.x
207
+ * * bit 0x04 => y smaller than range.low.y
208
+ * * bit 0x08 => y larger than range.high.y
209
+ * * If we divide XY plane into 9 areas using the range, the function returns 0 for points
210
+ * inside the range. Below is other binary numbers returned by the function for all 9 areas:
211
+ * 1001 | 1000 | 1010
212
+ * ------------------
213
+ * 1 | 0 | 10
214
+ * ------------------
215
+ * 101 | 100 | 110
216
+ * @param xy point to test
217
+ * @param range range for comparison
218
+ */
219
+ private classifyBitsPointRangeXY;
220
+ /** Low level dispatch of line string with line string. */
221
+ private computeLineStringLineString;
222
+ /** Double dispatch handler for strongly typed linestring. */
223
+ handleLineString3d(lsA: LineString3d): any;
224
+ /** Double dispatch handler for strongly typed arc. */
225
+ handleArc3d(arc0: Arc3d): any;
226
+ /** Double dispatch handler for strongly typed bspline curve. */
227
+ handleBSplineCurve3d(curve: BSplineCurve3d): any;
228
+ /** Double dispatch handler for strongly typed CurveChainWithDistanceIndex. */
229
+ handleCurveChainWithDistanceIndex(chain: CurveChainWithDistanceIndex): any;
230
+ /** Double dispatch handler for strongly typed homogeneous bspline curve .. */
231
+ handleBSplineCurve3dH(_curve: BSplineCurve3dH): any;
232
+ }
233
+ //# sourceMappingURL=CurveCurveCloseApproachXY.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CurveCurveCloseApproachXY.d.ts","sourceRoot":"","sources":["../../../../src/curve/internalContexts/CurveCurveCloseApproachXY.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,cAAc,EAAsB,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAKlF,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAE7E,OAAO,EAAqB,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C;;;;;;;;;;;;;GAaG;AACH,qBAAa,yBAA0B,SAAQ,8BAA8B;IAC3E,OAAO,CAAC,UAAU,CAAuB;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