@itwin/core-geometry 4.1.0-dev.77 → 4.1.0-dev.80

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 (461) hide show
  1. package/lib/cjs/Constant.js.map +1 -1
  2. package/lib/cjs/Geometry.js.map +1 -1
  3. package/lib/cjs/bspline/AkimaCurve3d.js.map +1 -1
  4. package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
  5. package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
  6. package/lib/cjs/bspline/BSplineCurve3dH.js.map +1 -1
  7. package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
  8. package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
  9. package/lib/cjs/bspline/Bezier1dNd.js.map +1 -1
  10. package/lib/cjs/bspline/BezierCurve3d.js.map +1 -1
  11. package/lib/cjs/bspline/BezierCurve3dH.js.map +1 -1
  12. package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
  13. package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
  14. package/lib/cjs/bspline/KnotVector.js.map +1 -1
  15. package/lib/cjs/bspline/SurfaceLocationDetail.js.map +1 -1
  16. package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
  17. package/lib/cjs/clipping/BooleanClipFactory.js.map +1 -1
  18. package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
  19. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  20. package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
  21. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  22. package/lib/cjs/clipping/ClipVector.js.map +1 -1
  23. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  24. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  25. package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  26. package/lib/cjs/core-geometry.js.map +1 -1
  27. package/lib/cjs/curve/Arc3d.d.ts +2 -2
  28. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  29. package/lib/cjs/curve/Arc3d.js +4 -3
  30. package/lib/cjs/curve/Arc3d.js.map +1 -1
  31. package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
  32. package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
  33. package/lib/cjs/curve/CurveChain.js.map +1 -1
  34. package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
  35. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  36. package/lib/cjs/curve/CurveCurve.d.ts +6 -2
  37. package/lib/cjs/curve/CurveCurve.d.ts.map +1 -1
  38. package/lib/cjs/curve/CurveCurve.js +13 -9
  39. package/lib/cjs/curve/CurveCurve.js.map +1 -1
  40. package/lib/cjs/curve/CurveCurveCloseApproachXY.d.ts +74 -68
  41. package/lib/cjs/curve/CurveCurveCloseApproachXY.d.ts.map +1 -1
  42. package/lib/cjs/curve/CurveCurveCloseApproachXY.js +100 -108
  43. package/lib/cjs/curve/CurveCurveCloseApproachXY.js.map +1 -1
  44. package/lib/cjs/curve/CurveCurveIntersectXY.d.ts +46 -48
  45. package/lib/cjs/curve/CurveCurveIntersectXY.d.ts.map +1 -1
  46. package/lib/cjs/curve/CurveCurveIntersectXY.js +72 -61
  47. package/lib/cjs/curve/CurveCurveIntersectXY.js.map +1 -1
  48. package/lib/cjs/curve/CurveCurveIntersectXYZ.d.ts +32 -38
  49. package/lib/cjs/curve/CurveCurveIntersectXYZ.d.ts.map +1 -1
  50. package/lib/cjs/curve/CurveCurveIntersectXYZ.js +86 -97
  51. package/lib/cjs/curve/CurveCurveIntersectXYZ.js.map +1 -1
  52. package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
  53. package/lib/cjs/curve/CurveFactory.js.map +1 -1
  54. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  55. package/lib/cjs/curve/CurveOps.js.map +1 -1
  56. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  57. package/lib/cjs/curve/CurveProcessor.js.map +1 -1
  58. package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
  59. package/lib/cjs/curve/GeometryQuery.js.map +1 -1
  60. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  61. package/lib/cjs/curve/LineString3d.js.map +1 -1
  62. package/lib/cjs/curve/Loop.js.map +1 -1
  63. package/lib/cjs/curve/OffsetOptions.js.map +1 -1
  64. package/lib/cjs/curve/ParityRegion.js.map +1 -1
  65. package/lib/cjs/curve/Path.js.map +1 -1
  66. package/lib/cjs/curve/PointString3d.js.map +1 -1
  67. package/lib/cjs/curve/ProxyCurve.js.map +1 -1
  68. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  69. package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
  70. package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
  71. package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
  72. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  73. package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
  74. package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
  75. package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
  76. package/lib/cjs/curve/RegionOps.js.map +1 -1
  77. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  78. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  79. package/lib/cjs/curve/UnionRegion.js.map +1 -1
  80. package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  81. package/lib/cjs/curve/internalContexts/ChainCollectorContext.js.map +1 -1
  82. package/lib/cjs/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  83. package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  84. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  85. package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  86. package/lib/cjs/curve/internalContexts/CurveLengthContext.js.map +1 -1
  87. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  88. package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
  89. package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
  90. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  91. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  92. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  93. package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
  94. package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  95. package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  96. package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
  97. package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
  98. package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  99. package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  100. package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
  101. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  102. package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  103. package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
  104. package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  105. package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  106. package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
  107. package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
  108. package/lib/cjs/geometry3d/Angle.js.map +1 -1
  109. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  110. package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
  111. package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
  112. package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
  113. package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
  114. package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
  115. package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
  116. package/lib/cjs/geometry3d/GeometryHandler.d.ts +98 -92
  117. package/lib/cjs/geometry3d/GeometryHandler.d.ts.map +1 -1
  118. package/lib/cjs/geometry3d/GeometryHandler.js +247 -124
  119. package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
  120. package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
  121. package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
  122. package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
  123. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  124. package/lib/cjs/geometry3d/IndexedCollectionInterval.js.map +1 -1
  125. package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
  126. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  127. package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  128. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  129. package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
  130. package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
  131. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  132. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  133. package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
  134. package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
  135. package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
  136. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  137. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  138. package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
  139. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  140. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  141. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  142. package/lib/cjs/geometry3d/Range.js.map +1 -1
  143. package/lib/cjs/geometry3d/Ray2d.js.map +1 -1
  144. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  145. package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
  146. package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
  147. package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
  148. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  149. package/lib/cjs/geometry3d/UVSurfaceOps.js.map +1 -1
  150. package/lib/cjs/geometry3d/XYZProps.js.map +1 -1
  151. package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
  152. package/lib/cjs/geometry4d/Map4d.js.map +1 -1
  153. package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
  154. package/lib/cjs/geometry4d/MomentData.js.map +1 -1
  155. package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  156. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  157. package/lib/cjs/numerics/BandedSystem.js.map +1 -1
  158. package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
  159. package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
  160. package/lib/cjs/numerics/Complex.js.map +1 -1
  161. package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
  162. package/lib/cjs/numerics/Newton.js.map +1 -1
  163. package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
  164. package/lib/cjs/numerics/PolarData.js.map +1 -1
  165. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  166. package/lib/cjs/numerics/Quadrature.js.map +1 -1
  167. package/lib/cjs/numerics/Range1dArray.js.map +1 -1
  168. package/lib/cjs/numerics/TriDiagonalSystem.js.map +1 -1
  169. package/lib/cjs/numerics/UnionFind.js.map +1 -1
  170. package/lib/cjs/numerics/UsageSums.js.map +1 -1
  171. package/lib/cjs/polyface/AuxData.js.map +1 -1
  172. package/lib/cjs/polyface/BoxTopology.js.map +1 -1
  173. package/lib/cjs/polyface/FacetFaceData.js.map +1 -1
  174. package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
  175. package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
  176. package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  177. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  178. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  179. package/lib/cjs/polyface/Polyface.js.map +1 -1
  180. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  181. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  182. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  183. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  184. package/lib/cjs/polyface/RangeLengthData.js.map +1 -1
  185. package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
  186. package/lib/cjs/polyface/TriangleCandidate.js.map +1 -1
  187. package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  188. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  189. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  190. package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  191. package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  192. package/lib/cjs/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  193. package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
  194. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  195. package/lib/cjs/polyface/multiclip/XYPointBuckets.js.map +1 -1
  196. package/lib/cjs/serialization/BGFBAccessors.js.map +1 -1
  197. package/lib/cjs/serialization/BGFBReader.js.map +1 -1
  198. package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
  199. package/lib/cjs/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  200. package/lib/cjs/serialization/DeepCompare.js.map +1 -1
  201. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  202. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  203. package/lib/cjs/solid/Box.js.map +1 -1
  204. package/lib/cjs/solid/Cone.js.map +1 -1
  205. package/lib/cjs/solid/LinearSweep.js.map +1 -1
  206. package/lib/cjs/solid/RotationalSweep.js.map +1 -1
  207. package/lib/cjs/solid/RuledSweep.js.map +1 -1
  208. package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
  209. package/lib/cjs/solid/Sphere.js.map +1 -1
  210. package/lib/cjs/solid/SweepContour.js.map +1 -1
  211. package/lib/cjs/solid/TorusPipe.js.map +1 -1
  212. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  213. package/lib/cjs/topology/Graph.js.map +1 -1
  214. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  215. package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
  216. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  217. package/lib/cjs/topology/HalfEdgeGraphValidation.js.map +1 -1
  218. package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
  219. package/lib/cjs/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  220. package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  221. package/lib/cjs/topology/HalfEdgePositionDetail.js.map +1 -1
  222. package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
  223. package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
  224. package/lib/cjs/topology/MaskManager.js.map +1 -1
  225. package/lib/cjs/topology/Merging.js.map +1 -1
  226. package/lib/cjs/topology/RegularizeFace.js.map +1 -1
  227. package/lib/cjs/topology/SignedDataSummary.js.map +1 -1
  228. package/lib/cjs/topology/SpaceTriangulation.js.map +1 -1
  229. package/lib/cjs/topology/Triangulation.js.map +1 -1
  230. package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
  231. package/lib/esm/Constant.js.map +1 -1
  232. package/lib/esm/Geometry.js.map +1 -1
  233. package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
  234. package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
  235. package/lib/esm/bspline/BSplineCurve.js.map +1 -1
  236. package/lib/esm/bspline/BSplineCurve3dH.js.map +1 -1
  237. package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
  238. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  239. package/lib/esm/bspline/Bezier1dNd.js.map +1 -1
  240. package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
  241. package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
  242. package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
  243. package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
  244. package/lib/esm/bspline/KnotVector.js.map +1 -1
  245. package/lib/esm/bspline/SurfaceLocationDetail.js.map +1 -1
  246. package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
  247. package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
  248. package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
  249. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  250. package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
  251. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  252. package/lib/esm/clipping/ClipVector.js.map +1 -1
  253. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  254. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  255. package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  256. package/lib/esm/core-geometry.js.map +1 -1
  257. package/lib/esm/curve/Arc3d.d.ts +2 -2
  258. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  259. package/lib/esm/curve/Arc3d.js +4 -3
  260. package/lib/esm/curve/Arc3d.js.map +1 -1
  261. package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
  262. package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
  263. package/lib/esm/curve/CurveChain.js.map +1 -1
  264. package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
  265. package/lib/esm/curve/CurveCollection.js.map +1 -1
  266. package/lib/esm/curve/CurveCurve.d.ts +6 -2
  267. package/lib/esm/curve/CurveCurve.d.ts.map +1 -1
  268. package/lib/esm/curve/CurveCurve.js +13 -9
  269. package/lib/esm/curve/CurveCurve.js.map +1 -1
  270. package/lib/esm/curve/CurveCurveCloseApproachXY.d.ts +74 -68
  271. package/lib/esm/curve/CurveCurveCloseApproachXY.d.ts.map +1 -1
  272. package/lib/esm/curve/CurveCurveCloseApproachXY.js +100 -108
  273. package/lib/esm/curve/CurveCurveCloseApproachXY.js.map +1 -1
  274. package/lib/esm/curve/CurveCurveIntersectXY.d.ts +46 -48
  275. package/lib/esm/curve/CurveCurveIntersectXY.d.ts.map +1 -1
  276. package/lib/esm/curve/CurveCurveIntersectXY.js +72 -61
  277. package/lib/esm/curve/CurveCurveIntersectXY.js.map +1 -1
  278. package/lib/esm/curve/CurveCurveIntersectXYZ.d.ts +32 -38
  279. package/lib/esm/curve/CurveCurveIntersectXYZ.d.ts.map +1 -1
  280. package/lib/esm/curve/CurveCurveIntersectXYZ.js +86 -97
  281. package/lib/esm/curve/CurveCurveIntersectXYZ.js.map +1 -1
  282. package/lib/esm/curve/CurveExtendMode.js.map +1 -1
  283. package/lib/esm/curve/CurveFactory.js.map +1 -1
  284. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  285. package/lib/esm/curve/CurveOps.js.map +1 -1
  286. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  287. package/lib/esm/curve/CurveProcessor.js.map +1 -1
  288. package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
  289. package/lib/esm/curve/GeometryQuery.js.map +1 -1
  290. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  291. package/lib/esm/curve/LineString3d.js.map +1 -1
  292. package/lib/esm/curve/Loop.js.map +1 -1
  293. package/lib/esm/curve/OffsetOptions.js.map +1 -1
  294. package/lib/esm/curve/ParityRegion.js.map +1 -1
  295. package/lib/esm/curve/Path.js.map +1 -1
  296. package/lib/esm/curve/PointString3d.js.map +1 -1
  297. package/lib/esm/curve/ProxyCurve.js.map +1 -1
  298. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  299. package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
  300. package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
  301. package/lib/esm/curve/Query/InOutTests.js.map +1 -1
  302. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  303. package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
  304. package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
  305. package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
  306. package/lib/esm/curve/RegionOps.js.map +1 -1
  307. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  308. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  309. package/lib/esm/curve/UnionRegion.js.map +1 -1
  310. package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  311. package/lib/esm/curve/internalContexts/ChainCollectorContext.js.map +1 -1
  312. package/lib/esm/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  313. package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  314. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  315. package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  316. package/lib/esm/curve/internalContexts/CurveLengthContext.js.map +1 -1
  317. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  318. package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
  319. package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
  320. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  321. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  322. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  323. package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
  324. package/lib/esm/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  325. package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  326. package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
  327. package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
  328. package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  329. package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  330. package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
  331. package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  332. package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  333. package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
  334. package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  335. package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  336. package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
  337. package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
  338. package/lib/esm/geometry3d/Angle.js.map +1 -1
  339. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  340. package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
  341. package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
  342. package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
  343. package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
  344. package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
  345. package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
  346. package/lib/esm/geometry3d/GeometryHandler.d.ts +98 -92
  347. package/lib/esm/geometry3d/GeometryHandler.d.ts.map +1 -1
  348. package/lib/esm/geometry3d/GeometryHandler.js +247 -124
  349. package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
  350. package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
  351. package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
  352. package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
  353. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  354. package/lib/esm/geometry3d/IndexedCollectionInterval.js.map +1 -1
  355. package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
  356. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  357. package/lib/esm/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  358. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  359. package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
  360. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  361. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  362. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  363. package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
  364. package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
  365. package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
  366. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  367. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  368. package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
  369. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  370. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  371. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  372. package/lib/esm/geometry3d/Range.js.map +1 -1
  373. package/lib/esm/geometry3d/Ray2d.js.map +1 -1
  374. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  375. package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
  376. package/lib/esm/geometry3d/Segment1d.js.map +1 -1
  377. package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
  378. package/lib/esm/geometry3d/Transform.js.map +1 -1
  379. package/lib/esm/geometry3d/UVSurfaceOps.js.map +1 -1
  380. package/lib/esm/geometry3d/XYZProps.js.map +1 -1
  381. package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
  382. package/lib/esm/geometry4d/Map4d.js.map +1 -1
  383. package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
  384. package/lib/esm/geometry4d/MomentData.js.map +1 -1
  385. package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  386. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  387. package/lib/esm/numerics/BandedSystem.js.map +1 -1
  388. package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
  389. package/lib/esm/numerics/ClusterableArray.js.map +1 -1
  390. package/lib/esm/numerics/Complex.js.map +1 -1
  391. package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
  392. package/lib/esm/numerics/Newton.js.map +1 -1
  393. package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
  394. package/lib/esm/numerics/PolarData.js.map +1 -1
  395. package/lib/esm/numerics/Polynomials.js.map +1 -1
  396. package/lib/esm/numerics/Quadrature.js.map +1 -1
  397. package/lib/esm/numerics/Range1dArray.js.map +1 -1
  398. package/lib/esm/numerics/TriDiagonalSystem.js.map +1 -1
  399. package/lib/esm/numerics/UnionFind.js.map +1 -1
  400. package/lib/esm/numerics/UsageSums.js.map +1 -1
  401. package/lib/esm/polyface/AuxData.js.map +1 -1
  402. package/lib/esm/polyface/BoxTopology.js.map +1 -1
  403. package/lib/esm/polyface/FacetFaceData.js.map +1 -1
  404. package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
  405. package/lib/esm/polyface/FacetOrientation.js.map +1 -1
  406. package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  407. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  408. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  409. package/lib/esm/polyface/Polyface.js.map +1 -1
  410. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  411. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  412. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  413. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  414. package/lib/esm/polyface/RangeLengthData.js.map +1 -1
  415. package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
  416. package/lib/esm/polyface/TriangleCandidate.js.map +1 -1
  417. package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  418. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  419. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  420. package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  421. package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  422. package/lib/esm/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  423. package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
  424. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  425. package/lib/esm/polyface/multiclip/XYPointBuckets.js.map +1 -1
  426. package/lib/esm/serialization/BGFBAccessors.js.map +1 -1
  427. package/lib/esm/serialization/BGFBReader.js.map +1 -1
  428. package/lib/esm/serialization/BGFBWriter.js.map +1 -1
  429. package/lib/esm/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  430. package/lib/esm/serialization/DeepCompare.js.map +1 -1
  431. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  432. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  433. package/lib/esm/solid/Box.js.map +1 -1
  434. package/lib/esm/solid/Cone.js.map +1 -1
  435. package/lib/esm/solid/LinearSweep.js.map +1 -1
  436. package/lib/esm/solid/RotationalSweep.js.map +1 -1
  437. package/lib/esm/solid/RuledSweep.js.map +1 -1
  438. package/lib/esm/solid/SolidPrimitive.js.map +1 -1
  439. package/lib/esm/solid/Sphere.js.map +1 -1
  440. package/lib/esm/solid/SweepContour.js.map +1 -1
  441. package/lib/esm/solid/TorusPipe.js.map +1 -1
  442. package/lib/esm/topology/ChainMerge.js.map +1 -1
  443. package/lib/esm/topology/Graph.js.map +1 -1
  444. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  445. package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
  446. package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  447. package/lib/esm/topology/HalfEdgeGraphValidation.js.map +1 -1
  448. package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
  449. package/lib/esm/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  450. package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  451. package/lib/esm/topology/HalfEdgePositionDetail.js.map +1 -1
  452. package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
  453. package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
  454. package/lib/esm/topology/MaskManager.js.map +1 -1
  455. package/lib/esm/topology/Merging.js.map +1 -1
  456. package/lib/esm/topology/RegularizeFace.js.map +1 -1
  457. package/lib/esm/topology/SignedDataSummary.js.map +1 -1
  458. package/lib/esm/topology/SpaceTriangulation.js.map +1 -1
  459. package/lib/esm/topology/Triangulation.js.map +1 -1
  460. package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
  461. package/package.json +3 -3
@@ -18,32 +18,16 @@ import { LineSegment3d } from "./LineSegment3d";
18
18
  import { LineString3d } from "./LineString3d";
19
19
  // cspell:word XYRR
20
20
  /**
21
- * Set bits for comparison to range xy
22
- * * bit 0x01 => x smaller than range.low.x
23
- * * bit 0x02 => x larger than range.high.x
24
- * * bit 0x04 => x smaller than range.low.y
25
- * * bit 0x08 => x larger than range.high.y
26
- * @param xy point to test
27
- * @param range range for comparison
28
- */
29
- function classifyBitsPointRangeXY(x, y, range) {
30
- let result = 0;
31
- if (x < range.low.x)
32
- result = 0x01;
33
- else if (x > range.high.x)
34
- result = 0x02;
35
- if (y < range.low.y)
36
- result |= 0x04;
37
- else if (y > range.high.y)
38
- result |= 0x08;
39
- return result;
40
- }
41
- /**
21
+ * Handler class for XY close approach between _geometryB and another geometry.
22
+ * * Approach means the distance between _geometryB and another geometry.
23
+ * * **NOTE:** GeometryQuery input (_geometryB) should really be AnyCurve.
24
+ * * Closest approach is a measure of the proximity of one curve to another. It's the length of the shortest line
25
+ * segment perpendicular to both curves; if the curves intersect, the closest approach is zero. In the context of
26
+ * this class, z-coordinates are ignored, so the closest approach is as seen in the top view. If you have coplanar
27
+ * input curves, rotate them first into a plane parallel to the xy-plane, then afterward, you should rotate the
28
+ * results back as required.
42
29
  * * Instances are initialized and called from CurveCurve.
43
- * * Constructor is told two geometry items A and B
44
- * * geometryB is saved for later reference
45
- * * type-specific handler methods will "see" geometry A repeatedly.
46
- * * Hence geometryA is NOT saved by the constructor.
30
+ * * geometryB is saved for later reference.
47
31
  * @internal
48
32
  */
49
33
  class CurveCurveCloseApproachXY extends NullGeometryHandler {
@@ -59,36 +43,38 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
59
43
  }
60
44
  }
61
45
  }
62
- // private _coincidentGeometryContext: CoincidentGeometryQuery;
63
46
  reinitialize() {
64
47
  this._results = [];
65
48
  }
66
49
  /**
67
- * @param _geometryA first curve for intersection. This is NOT saved.
68
- * @param geometryB second curve for intersection. Saved for reference by specific handler methods.
50
+ * Constructor.
51
+ * @param geometryB second curve for intersection. Saved for reference by specific handler methods.
69
52
  */
70
- constructor(_geometryA, geometryB) {
53
+ constructor(geometryB) {
71
54
  super();
72
- // this.geometryA = _geometryA;
73
55
  this.setGeometryB(geometryB);
74
56
  this._maxDistanceSquared = Geometry.smallMetricDistanceSquared;
75
- // this._coincidentGeometryContext = CoincidentGeometryQuery.create();
76
57
  this.reinitialize();
77
58
  }
78
- /** Access the (possibly undefined) max distance to accept. */
59
+ /** Set the (possibly undefined) max distance to accept. */
79
60
  set maxDistanceToAccept(value) {
80
61
  this._maxDistanceToAccept = value;
81
62
  if (this._maxDistanceToAccept !== undefined && this._maxDistanceToAccept > 0)
82
63
  this._maxDistanceSquared = this._maxDistanceToAccept * this._maxDistanceToAccept;
83
64
  }
84
- /** Set the (possibly undefined) max distance to accept. */
85
- get maxDistanceToAccept() { return this._maxDistanceToAccept; }
65
+ /** Access the (possibly undefined) max distance to accept. */
66
+ get maxDistanceToAccept() {
67
+ return this._maxDistanceToAccept;
68
+ }
86
69
  /** Ask if the maxDistanceToAccept value is defined and positive */
87
- get isMaxDistanceSet() { return this._maxDistanceToAccept !== undefined && this._maxDistanceToAccept > 0; }
70
+ get isMaxDistanceSet() {
71
+ return this._maxDistanceToAccept !== undefined && this._maxDistanceToAccept > 0;
72
+ }
88
73
  /** Reset the geometry and flags, leaving all other parts unchanged (and preserving accumulated intersections) */
89
- resetGeometry(_geometryA, geometryB) {
74
+ resetGeometry(geometryB) {
90
75
  this.setGeometryB(geometryB);
91
76
  }
77
+ /** @returns whether the `fraction` is in [0,1] within tolerance */
92
78
  acceptFraction(fraction, fractionTol = 1.0e-12) {
93
79
  if (fraction < -fractionTol)
94
80
  return false;
@@ -97,9 +83,8 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
97
83
  return true;
98
84
  }
99
85
  /**
100
- * * Return the results structure for the intersection calculation, structured as an array of CurveLocationDetailPair
86
+ * Return the results structure for the intersection calculation, structured as an array of CurveLocationDetailPair.
101
87
  * @param reinitialize if true, a new results structure is created for use by later calls.
102
- *
103
88
  */
104
89
  grabPairedResults(reinitialize = false) {
105
90
  const result = this._results;
@@ -107,6 +92,7 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
107
92
  this.reinitialize();
108
93
  return result;
109
94
  }
95
+ /** Returns `true` if `detail` has same curve and fraction. */
110
96
  sameCurveAndFraction(cp, fraction, detail) {
111
97
  return cp === detail.curve && Geometry.isAlmostEqualNumber(fraction, detail.fraction);
112
98
  }
@@ -121,15 +107,17 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
121
107
  this._results.push(pair);
122
108
  }
123
109
  }
124
- /** compute intersection of two line segments.
125
- * filter by extension rules.
126
- * record with fraction mapping.
110
+ /**
111
+ * Compute intersection of two line segments.
112
+ * Filter by extension rules.
113
+ * Record with fraction mapping.
127
114
  */
128
115
  recordPointWithLocalFractions(localFractionA, cpA, fractionA0, fractionA1, localFractionB, // Computed intersection fraction
129
116
  cpB, fractionB0, fractionB1, reversed, intervalDetails) {
130
117
  let globalFractionA, globalFractionB;
131
118
  let globalFractionA1, globalFractionB1;
132
- const isInterval = intervalDetails !== undefined && intervalDetails.detailA.hasFraction1 && intervalDetails.detailB.hasFraction1;
119
+ const isInterval = (intervalDetails !== undefined) &&
120
+ intervalDetails.detailA.hasFraction1 && intervalDetails.detailB.hasFraction1;
133
121
  if (isInterval) {
134
122
  globalFractionA = Geometry.interpolate(fractionA0, intervalDetails.detailA.fraction, fractionA1);
135
123
  globalFractionB = Geometry.interpolate(fractionB0, intervalDetails.detailB.fraction, fractionB1);
@@ -146,11 +134,13 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
146
134
  const oldDetailA = this._results[numPrevious - 1].detailA;
147
135
  const oldDetailB = this._results[numPrevious - 1].detailB;
148
136
  if (reversed) {
149
- if (this.sameCurveAndFraction(cpA, globalFractionA, oldDetailB) && this.sameCurveAndFraction(cpB, globalFractionB, oldDetailA))
137
+ if (this.sameCurveAndFraction(cpA, globalFractionA, oldDetailB) &&
138
+ this.sameCurveAndFraction(cpB, globalFractionB, oldDetailA))
150
139
  return;
151
140
  }
152
141
  else {
153
- if (this.sameCurveAndFraction(cpA, globalFractionA, oldDetailA) && this.sameCurveAndFraction(cpB, globalFractionB, oldDetailB))
142
+ if (this.sameCurveAndFraction(cpA, globalFractionA, oldDetailA) &&
143
+ this.sameCurveAndFraction(cpB, globalFractionB, oldDetailB))
154
144
  return;
155
145
  }
156
146
  }
@@ -172,8 +162,8 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
172
162
  }
173
163
  }
174
164
  /**
175
- * capture a close approach pair that has point and local fraction but not curve.
176
- * record with fraction mapping.
165
+ * Capture a close approach pair that has point and local fraction but not curve.
166
+ * Record with fraction mapping.
177
167
  */
178
168
  capturePairWithLocalFractions(pair, cpA, fractionA0, fractionA1, cpB, fractionB0, fractionB1, reversed) {
179
169
  const globalFractionA = Geometry.interpolate(fractionA0, pair.detailA.fraction, fractionA1);
@@ -184,11 +174,13 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
184
174
  const oldDetailA = this._results[numPrevious - 1].detailA;
185
175
  const oldDetailB = this._results[numPrevious - 1].detailB;
186
176
  if (reversed) {
187
- if (this.sameCurveAndFraction(cpA, globalFractionA, oldDetailB) && this.sameCurveAndFraction(cpB, globalFractionB, oldDetailA))
177
+ if (this.sameCurveAndFraction(cpA, globalFractionA, oldDetailB) &&
178
+ this.sameCurveAndFraction(cpB, globalFractionB, oldDetailA))
188
179
  return;
189
180
  }
190
181
  else {
191
- if (this.sameCurveAndFraction(cpA, globalFractionA, oldDetailA) && this.sameCurveAndFraction(cpB, globalFractionB, oldDetailB))
182
+ if (this.sameCurveAndFraction(cpA, globalFractionA, oldDetailA) &&
183
+ this.sameCurveAndFraction(cpB, globalFractionB, oldDetailB))
192
184
  return;
193
185
  }
194
186
  }
@@ -203,9 +195,9 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
203
195
  }
204
196
  }
205
197
  /**
206
- * emit recordPoint for multiple pairs (on full curve!)
207
- * @param cpA first curve primitive. (possibly different from curve in detailA, but fraction compatible)
208
- * @param cpB second curve primitive. (possibly different from curve in detailA, but fraction compatible)
198
+ * Emit recordPoint for multiple pairs (on full curve!)
199
+ * @param cpA first curve primitive (possibly different from curve in detailA, but fraction compatible)
200
+ * @param cpB second curve primitive (possibly different from curve in detailA, but fraction compatible)
209
201
  * @param pairs array of pairs
210
202
  * @param reversed true to have order reversed in final structures.
211
203
  */
@@ -217,7 +209,7 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
217
209
  }
218
210
  }
219
211
  /**
220
- * record fully assembled (but possibly reversed) detail pair.
212
+ * Record fully assembled (but possibly reversed) detail pair.
221
213
  * @param detailA first detail
222
214
  * @param detailB second detail
223
215
  * @param reversed true to have order reversed in final structures.
@@ -232,44 +224,35 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
232
224
  }
233
225
  }
234
226
  }
235
- /**
236
- *
237
- * @param fractionA
238
- * @param pointA
239
- * @param pointB0
240
- * @param pointB1
241
- * @param fractionB
242
- * @param minDistanceSquared
243
- * @param closestApproach
244
- */
245
227
  static updatePointToSegmentDistance(fractionA, pointA, pointB0, pointB1, fractionB, minDistanceSquared, closestApproach) {
246
228
  if (fractionB < 0)
247
229
  fractionB = 0;
248
230
  else if (fractionB > 1)
249
231
  fractionB = 1;
250
- this._workPointB0 = pointB0.interpolate(fractionB, pointB1, this._workPointB0);
251
- const distanceSquared = this._workPointB0.distanceSquaredXY(pointA);
232
+ this._workPointB = pointB0.interpolate(fractionB, pointB1, this._workPointB);
233
+ const distanceSquared = this._workPointB.distanceSquaredXY(pointA);
252
234
  if (distanceSquared < minDistanceSquared) {
253
235
  if (closestApproach === undefined || distanceSquared < closestApproach.detailA.a) {
254
236
  if (closestApproach === undefined)
255
237
  closestApproach = CurveLocationDetailPair.createCapture(CurveLocationDetail.create(), CurveLocationDetail.create());
256
238
  closestApproach.detailA.setFP(fractionA, pointA);
257
239
  closestApproach.detailA.a = distanceSquared;
258
- closestApproach.detailB.setFP(fractionB, this._workPointB0);
240
+ closestApproach.detailB.setFP(fractionB, this._workPointB);
259
241
  closestApproach.detailA.a = distanceSquared;
260
242
  }
261
243
  }
262
244
  return closestApproach;
263
245
  }
264
246
  /**
265
- * Return fractions of close approach within minDistance between two line segments( a0,a1) and (b0, b1)
266
- * * minDistance is assumed positive
247
+ * Return fractions of close approach within minDistance between two line segments (a0,a1) and (b0, b1).
248
+ * * minDistanceSquared is assumed positive.
267
249
  * Return the fractional (not xy) coordinates in result.x, result.y
268
250
  * @param a0 start point of line a
269
251
  * @param a1 end point of line a
270
252
  * @param b0 start point of line b
271
253
  * @param b1 end point of line b
272
- * @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.
254
+ * @param result point to receive fractional coordinates of intersection. result.x is fraction on line a.
255
+ * result.y is fraction on line b.
273
256
  */
274
257
  static segmentSegmentBoundedApproach(a0, a1, b0, b1, minDistanceSquared) {
275
258
  const ux = a1.x - a0.x;
@@ -307,16 +290,6 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
307
290
  closestApproach = this.updatePointToSegmentDistance(1, a1, b0, b1, -Geometry.dotProductXYXY(vx, vy, e10x, e10y) / vv, minDistanceSquared, closestApproach);
308
291
  return closestApproach;
309
292
  }
310
- /**
311
- * Return fractions of close approach within minDistance between two line segments( a0,a1) and (b0, b1)
312
- * * minDistance is assumed positive
313
- * Return the fractional (not xy) coordinates in result.x, result.y
314
- * @param a0 start point of line a
315
- * @param a1 end point of line a
316
- * @param b0 start point of line b
317
- * @param b1 end point of line b
318
- * @param result point to receive fractional coordinates of intersection. result.x is fraction on line a. result.y is fraction on line b.
319
- */
320
293
  testAndRecordFractionalPairApproach(cpA, fA0, fA1, testProjectionOnA, cpB, fB0, fB1, testProjectionOnB, reversed) {
321
294
  const pointA0 = cpA.fractionToPoint(fA0);
322
295
  const pointA1 = cpA.fractionToPoint(fA1);
@@ -345,9 +318,10 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
345
318
  }
346
319
  }
347
320
  }
348
- /** compute intersection of two line segments.
349
- * filter by extension rules.
350
- * record with fraction mapping.
321
+ /**
322
+ * Compute intersection of two line segments.
323
+ * Filter by extension rules.
324
+ * Record with fraction mapping.
351
325
  * * The fraction mappings allow portions of a linestring to be passed here.
352
326
  */
353
327
  computeSegmentSegment3D(cpA, pointA0, fractionA0, pointA1, fractionA1, cpB, pointB0, fractionB0, pointB1, fractionB1, reversed) {
@@ -356,15 +330,15 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
356
330
  this.capturePairWithLocalFractions(approach, cpA, fractionA0, fractionA1, cpB, fractionB0, fractionB1, reversed);
357
331
  }
358
332
  // Caller accesses data from a line segment and passes to here.
359
- // (The line segment in question might be (a) a full line segment or (b) a fragment within a linestring. The fraction and extend parameters
360
- // allow all combinations to be passed in)
333
+ // (The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
334
+ // The fraction and extend parameters allow all combinations to be passed in)
361
335
  // This method applies transform.
362
336
  dispatchSegmentSegment(cpA, pointA0, fractionA0, pointA1, fractionA1, cpB, pointB0, fractionB0, pointB1, fractionB1, reversed) {
363
337
  this.computeSegmentSegment3D(cpA, pointA0, fractionA0, pointA1, fractionA1, cpB, pointB0, fractionB0, pointB1, fractionB1, reversed);
364
338
  }
365
339
  // Caller accesses data from a linestring or segment and passes it here.
366
- // (The line segment in question might be (a) a full line segment or (b) a fragment within a linestring. The fraction and extend parameters
367
- // allow all combinations to be passed in)
340
+ // (The line segment in question might be (a) a full line segment or (b) a fragment within a linestring.
341
+ // The fraction and extend parameters allow all combinations to be passed in)
368
342
  dispatchSegmentArc(cpA, pointA0, fractionA0, pointA1, fractionA1, arc, reversed) {
369
343
  // To consider:
370
344
  // 1) endpoint to endpoint or projection
@@ -414,16 +388,14 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
414
388
  dispatchCircularCircularOrdered(cpA, radiusA, cpB, radiusB, reversed) {
415
389
  const c = cpA.center.distance(cpB.center);
416
390
  const e = this._maxDistanceToAccept !== undefined ? this._maxDistanceToAccept : Geometry.smallMetricDistance;
417
- if (c > radiusA + radiusB + e) // widely separated !!
391
+ if (c > radiusA + radiusB + e) // widely separated
418
392
  return;
419
393
  // To consider:
420
394
  // 1) endpoint to endpoint or projection
421
395
  // 2) true intersection
422
396
  // 3) line parallel to arc tangent.
423
397
  this.testAndRecordFractionalPairApproach(cpA, 0, 1, false, cpB, 0, 1, false, reversed);
424
- if (Geometry.isSmallMetricDistance(c)) {
425
- }
426
- else {
398
+ if (!Geometry.isSmallMetricDistance(c)) {
427
399
  // ?? endpoint hits are recorded. Maybe also need overlap?
428
400
  const vectorAB = Vector3d.createStartEnd(cpA.center, cpB.center);
429
401
  vectorAB.scaleInPlace(1.0 / c);
@@ -448,8 +420,9 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
448
420
  }
449
421
  }
450
422
  }
451
- /** Find the fractional point (if any) on an arc, known to be circular and displayed from the center in the direction of a scaled vector.
452
- *
423
+ /**
424
+ * Find the fractional point (if any) on an arc, known to be circular and displayed from the center in the
425
+ * direction of a scaled vector.
453
426
  */
454
427
  resolveDirectionToArcXYFraction(arc, radialVector, scale) {
455
428
  // The scale ultimately only affects the direction --- easiest way to use it is two multiplies
@@ -476,7 +449,6 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
476
449
  return;
477
450
  }
478
451
  }
479
- // Fall through for
480
452
  }
481
453
  // Caller accesses data from two arcs.
482
454
  // Selects the best conditioned arc (in xy parts) as "circle after inversion"
@@ -496,13 +468,13 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
496
468
  bcurveB.emitStrokes(lsB);
497
469
  this.computeLineStringLineString(lsA, lsB, reversed);
498
470
  }
499
- /** low level dispatch of linestring with (beziers of) a bspline curve */
471
+ /** Low level dispatch of linestring with (beziers of) a bspline curve */
500
472
  dispatchLineStringBSplineCurve(lsA, curveB, reversed) {
501
473
  const lsB = LineString3d.create();
502
474
  curveB.emitStrokes(lsB);
503
475
  this.computeLineStringLineString(lsA, lsB, reversed);
504
476
  }
505
- /** low level dispatch of linestring with (beziers of) a bspline curve */
477
+ /** Low level dispatch of segment with (beziers of) a bspline curve */
506
478
  dispatchSegmentBsplineCurve(lsA, curveB, reversed) {
507
479
  const lsB = LineString3d.create();
508
480
  curveB.emitStrokes(lsB);
@@ -561,7 +533,7 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
561
533
  this.testAndRecordFractionalPairApproach(lsA, 0, 1, true, lsB, 0, 1, false, reversed);
562
534
  return undefined;
563
535
  }
564
- /** Detail computation for arcA intersecting lsB. */
536
+ /** Detail computation for arc approaching linestring. */
565
537
  computeArcLineString(arcA, lsB, reversed) {
566
538
  const pointB0 = CurveCurveCloseApproachXY._workPointBB0;
567
539
  const pointB1 = CurveCurveCloseApproachXY._workPointBB1;
@@ -580,8 +552,7 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
580
552
  }
581
553
  return undefined;
582
554
  }
583
- // private static _workPointB1 = Point3d.create();
584
- /** double dispatch handler for strongly typed segment.. */
555
+ /** Double dispatch handler for strongly typed segment. */
585
556
  handleLineSegment3d(segmentA) {
586
557
  if (this._geometryB instanceof LineSegment3d) {
587
558
  const segmentB = this._geometryB;
@@ -597,6 +568,27 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
597
568
  this.dispatchSegmentBsplineCurve(segmentA, this._geometryB, false);
598
569
  }
599
570
  }
571
+ /**
572
+ * Set bits for comparison to range xy
573
+ * * bit 0x01 => x smaller than range.low.x
574
+ * * bit 0x02 => x larger than range.high.x
575
+ * * bit 0x04 => y smaller than range.low.y
576
+ * * bit 0x08 => y larger than range.high.y
577
+ * @param xy point to test
578
+ * @param range range for comparison
579
+ */
580
+ classifyBitsPointRangeXY(x, y, range) {
581
+ let result = 0;
582
+ if (x < range.low.x)
583
+ result = 0x01;
584
+ else if (x > range.high.x)
585
+ result = 0x02;
586
+ if (y < range.low.y)
587
+ result |= 0x04;
588
+ else if (y > range.high.y)
589
+ result |= 0x08;
590
+ return result;
591
+ }
600
592
  computeLineStringLineString(lsA, lsB, reversed) {
601
593
  const rangeA = lsA.range();
602
594
  const rangeB = lsB.range();
@@ -617,9 +609,7 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
617
609
  const dfA = 1.0 / (numA - 1);
618
610
  const dfB = 1.0 / (numB - 1);
619
611
  let fA0 = 0.0;
620
- let fB0;
621
- let fA1;
622
- let fB1;
612
+ let fA1, fB0, fB1;
623
613
  lsA.pointAt(0, pointA0);
624
614
  for (let ia = 1; ia < numA; ia++, pointA0.setFrom(pointA1), fA0 = fA1) {
625
615
  fA1 = ia * dfA;
@@ -631,10 +621,10 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
631
621
  rangeA1.expandInPlace(this._maxDistanceToAccept);
632
622
  if (rangeA1.intersectsRangeXY(rangeB)) {
633
623
  lsB.pointAt(0, pointB0);
634
- bitB0 = classifyBitsPointRangeXY(pointB0.x, pointB0.y, rangeA1);
624
+ bitB0 = this.classifyBitsPointRangeXY(pointB0.x, pointB0.y, rangeA1);
635
625
  for (let ib = 1; ib < numB; ib++, pointB0.setFrom(pointB1), fB0 = fB1, bitB0 = bitB1) {
636
626
  lsB.pointAt(ib, pointB1);
637
- bitB1 = classifyBitsPointRangeXY(pointB1.x, pointB1.y, rangeA1);
627
+ bitB1 = this.classifyBitsPointRangeXY(pointB1.x, pointB1.y, rangeA1);
638
628
  fB1 = ib * dfB;
639
629
  // Do NOT study the segment in detail if both bitB bits are on for any of the 4 planes . ..
640
630
  if ((bitB0 & bitB1) === 0) {
@@ -645,7 +635,7 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
645
635
  }
646
636
  }
647
637
  }
648
- /** double dispatch handler for strongly typed linestring.. */
638
+ /** Double dispatch handler for strongly typed linestring. */
649
639
  handleLineString3d(lsA) {
650
640
  if (this._geometryB instanceof LineString3d) {
651
641
  const lsB = this._geometryB;
@@ -662,7 +652,7 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
662
652
  }
663
653
  return undefined;
664
654
  }
665
- /** double dispatch handler for strongly typed arc .. */
655
+ /** Double dispatch handler for strongly typed arc. */
666
656
  handleArc3d(arc0) {
667
657
  if (this._geometryB instanceof LineSegment3d) {
668
658
  this.dispatchSegmentArc(this._geometryB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, arc0, true);
@@ -678,7 +668,7 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
678
668
  }
679
669
  return undefined;
680
670
  }
681
- /** double dispatch handler for strongly typed bspline curve .. */
671
+ /** Double dispatch handler for strongly typed bspline curve. */
682
672
  handleBSplineCurve3d(curve) {
683
673
  if (this._geometryB instanceof LineSegment3d) {
684
674
  this.dispatchSegmentBsplineCurve(this._geometryB, curve, true);
@@ -694,9 +684,11 @@ class CurveCurveCloseApproachXY extends NullGeometryHandler {
694
684
  }
695
685
  return undefined;
696
686
  }
697
- /** double dispatch handler for strongly typed homogeneous bspline curve .. */
687
+ /** Double dispatch handler for strongly typed homogeneous bspline curve .. */
698
688
  handleBSplineCurve3dH(_curve) {
699
- /* NEEDS WORK -- make "dispatch" methods tolerant of both 3d and 3dH ..."easy" if both present BezierCurve3dH span loaders
689
+ /*
690
+ //NEEDS WORK -- make "dispatch" methods tolerant of both 3d and 3dH.
691
+ // "easy" if both present BezierCurve3dH span loaders
700
692
  if (this._geometryB instanceof LineSegment3d) {
701
693
  this.dispatchSegmentBsplineCurve(
702
694
  this._geometryB, this._extendB, this._geometryB.point0Ref, 0.0, this._geometryB.point1Ref, 1.0, this._extendB,
@@ -716,6 +708,6 @@ CurveCurveCloseApproachXY._workPointBB0 = Point3d.create();
716
708
  CurveCurveCloseApproachXY._workPointBB1 = Point3d.create();
717
709
  CurveCurveCloseApproachXY._workPointBB2 = Point3d.create();
718
710
  CurveCurveCloseApproachXY._workVectorA = Vector3d.create();
719
- CurveCurveCloseApproachXY._workPointB0 = Point3d.create();
711
+ CurveCurveCloseApproachXY._workPointB = Point3d.create();
720
712
  export { CurveCurveCloseApproachXY };
721
713
  //# sourceMappingURL=CurveCurveCloseApproachXY.js.map