@itwin/core-geometry 4.4.0-dev.9 → 4.5.0-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (655) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/lib/cjs/Constant.js.map +1 -1
  3. package/lib/cjs/Geometry.d.ts +17 -0
  4. package/lib/cjs/Geometry.d.ts.map +1 -1
  5. package/lib/cjs/Geometry.js +14 -0
  6. package/lib/cjs/Geometry.js.map +1 -1
  7. package/lib/cjs/bspline/AkimaCurve3d.js.map +1 -1
  8. package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
  9. package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
  10. package/lib/cjs/bspline/BSplineCurve3dH.js.map +1 -1
  11. package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
  12. package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
  13. package/lib/cjs/bspline/Bezier1dNd.js.map +1 -1
  14. package/lib/cjs/bspline/BezierCurve3d.js.map +1 -1
  15. package/lib/cjs/bspline/BezierCurve3dH.js.map +1 -1
  16. package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
  17. package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
  18. package/lib/cjs/bspline/KnotVector.js.map +1 -1
  19. package/lib/cjs/bspline/SurfaceLocationDetail.js.map +1 -1
  20. package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
  21. package/lib/cjs/clipping/BooleanClipFactory.js.map +1 -1
  22. package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
  23. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  24. package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
  25. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  26. package/lib/cjs/clipping/ClipVector.js.map +1 -1
  27. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  28. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  29. package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  30. package/lib/cjs/core-geometry.d.ts +3 -2
  31. package/lib/cjs/core-geometry.d.ts.map +1 -1
  32. package/lib/cjs/core-geometry.js +3 -2
  33. package/lib/cjs/core-geometry.js.map +1 -1
  34. package/lib/cjs/curve/Arc3d.js.map +1 -1
  35. package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
  36. package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
  37. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +2 -2
  38. package/lib/cjs/curve/CurveChainWithDistanceIndex.js +3 -3
  39. package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
  40. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  41. package/lib/cjs/curve/CurveCurve.js.map +1 -1
  42. package/lib/cjs/curve/CurveExtendMode.d.ts +7 -6
  43. package/lib/cjs/curve/CurveExtendMode.d.ts.map +1 -1
  44. package/lib/cjs/curve/CurveExtendMode.js +7 -6
  45. package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
  46. package/lib/cjs/curve/CurveFactory.js.map +1 -1
  47. package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
  48. package/lib/cjs/curve/CurveLocationDetail.js +23 -18
  49. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  50. package/lib/cjs/curve/CurveOps.js.map +1 -1
  51. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  52. package/lib/cjs/curve/CurveProcessor.js.map +1 -1
  53. package/lib/cjs/curve/CurveTypes.js.map +1 -1
  54. package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
  55. package/lib/cjs/curve/GeometryQuery.js.map +1 -1
  56. package/lib/cjs/curve/LineSegment3d.d.ts +14 -4
  57. package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
  58. package/lib/cjs/curve/LineSegment3d.js +107 -2
  59. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  60. package/lib/cjs/curve/LineString3d.d.ts +41 -8
  61. package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
  62. package/lib/cjs/curve/LineString3d.js +53 -15
  63. package/lib/cjs/curve/LineString3d.js.map +1 -1
  64. package/lib/cjs/curve/Loop.js +1 -1
  65. package/lib/cjs/curve/Loop.js.map +1 -1
  66. package/lib/cjs/curve/OffsetOptions.js.map +1 -1
  67. package/lib/cjs/curve/ParityRegion.js.map +1 -1
  68. package/lib/cjs/curve/Path.js.map +1 -1
  69. package/lib/cjs/curve/PointString3d.js.map +1 -1
  70. package/lib/cjs/curve/ProxyCurve.js.map +1 -1
  71. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  72. package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
  73. package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
  74. package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
  75. package/lib/cjs/curve/Query/PlanarSubdivision.d.ts +2 -2
  76. package/lib/cjs/curve/Query/PlanarSubdivision.js +2 -2
  77. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  78. package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
  79. package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
  80. package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
  81. package/lib/cjs/curve/RegionOps.d.ts +1 -2
  82. package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
  83. package/lib/cjs/curve/RegionOps.js.map +1 -1
  84. package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts +5 -8
  85. package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
  86. package/lib/cjs/curve/RegionOpsClassificationSweeps.js +12 -12
  87. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  88. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  89. package/lib/cjs/curve/UnionRegion.js.map +1 -1
  90. package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  91. package/lib/cjs/curve/internalContexts/ChainCollectorContext.js.map +1 -1
  92. package/lib/cjs/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  93. package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  94. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  95. package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  96. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  97. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  98. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  99. package/lib/cjs/curve/internalContexts/CurveLengthContext.js.map +1 -1
  100. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  101. package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
  102. package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
  103. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  104. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  105. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  106. package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
  107. package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  108. package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  109. package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
  110. package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
  111. package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  112. package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  113. package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
  114. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  115. package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  116. package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
  117. package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  118. package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  119. package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
  120. package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
  121. package/lib/cjs/geometry3d/Angle.js.map +1 -1
  122. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  123. package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
  124. package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
  125. package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
  126. package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
  127. package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
  128. package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
  129. package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
  130. package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
  131. package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
  132. package/lib/cjs/geometry3d/GrowableXYArray.d.ts +2 -2
  133. package/lib/cjs/geometry3d/GrowableXYArray.d.ts.map +1 -1
  134. package/lib/cjs/geometry3d/GrowableXYArray.js +1 -1
  135. package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
  136. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +2 -3
  137. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  138. package/lib/cjs/geometry3d/GrowableXYZArray.js +1 -1
  139. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  140. package/lib/cjs/geometry3d/IndexedCollectionInterval.js.map +1 -1
  141. package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
  142. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +18 -1
  143. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  144. package/lib/cjs/geometry3d/IndexedXYZCollection.js +13 -0
  145. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  146. package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  147. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  148. package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
  149. package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
  150. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  151. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  152. package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
  153. package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
  154. package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
  155. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  156. package/lib/cjs/geometry3d/PointHelpers.d.ts +1 -2
  157. package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
  158. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  159. package/lib/cjs/geometry3d/PointStreaming.d.ts +1 -1
  160. package/lib/cjs/geometry3d/PointStreaming.d.ts.map +1 -1
  161. package/lib/cjs/geometry3d/PointStreaming.js +3 -1
  162. package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
  163. package/lib/cjs/geometry3d/PolygonOps.d.ts +68 -1
  164. package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
  165. package/lib/cjs/geometry3d/PolygonOps.js +152 -4
  166. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  167. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  168. package/lib/cjs/geometry3d/PolylineOps.d.ts +23 -1
  169. package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
  170. package/lib/cjs/geometry3d/PolylineOps.js +73 -1
  171. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  172. package/lib/cjs/geometry3d/Range.d.ts +1 -1
  173. package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
  174. package/lib/cjs/geometry3d/Range.js.map +1 -1
  175. package/lib/cjs/geometry3d/Ray2d.js.map +1 -1
  176. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  177. package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
  178. package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
  179. package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
  180. package/lib/cjs/geometry3d/Transform.js +1 -1
  181. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  182. package/lib/cjs/geometry3d/UVSurfaceOps.js.map +1 -1
  183. package/lib/cjs/geometry3d/XYZProps.js.map +1 -1
  184. package/lib/cjs/geometry3d/YawPitchRollAngles.d.ts +7 -5
  185. package/lib/cjs/geometry3d/YawPitchRollAngles.d.ts.map +1 -1
  186. package/lib/cjs/geometry3d/YawPitchRollAngles.js +8 -6
  187. package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
  188. package/lib/cjs/geometry4d/Map4d.js.map +1 -1
  189. package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
  190. package/lib/cjs/geometry4d/MomentData.js.map +1 -1
  191. package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  192. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  193. package/lib/cjs/numerics/BandedSystem.js.map +1 -1
  194. package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
  195. package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
  196. package/lib/cjs/numerics/Complex.js.map +1 -1
  197. package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
  198. package/lib/cjs/numerics/Newton.js.map +1 -1
  199. package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
  200. package/lib/cjs/numerics/PolarData.js.map +1 -1
  201. package/lib/cjs/numerics/Polynomials.d.ts +13 -1
  202. package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
  203. package/lib/cjs/numerics/Polynomials.js +13 -1
  204. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  205. package/lib/cjs/numerics/Quadrature.js.map +1 -1
  206. package/lib/cjs/numerics/Range1dArray.js.map +1 -1
  207. package/lib/cjs/numerics/TriDiagonalSystem.js.map +1 -1
  208. package/lib/cjs/numerics/UnionFind.js.map +1 -1
  209. package/lib/cjs/numerics/UsageSums.js.map +1 -1
  210. package/lib/cjs/polyface/AuxData.js.map +1 -1
  211. package/lib/cjs/polyface/BoxTopology.js.map +1 -1
  212. package/lib/cjs/polyface/FacetFaceData.js.map +1 -1
  213. package/lib/cjs/polyface/FacetLocationDetail.d.ts +28 -5
  214. package/lib/cjs/polyface/FacetLocationDetail.d.ts.map +1 -1
  215. package/lib/cjs/polyface/FacetLocationDetail.js +50 -15
  216. package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
  217. package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
  218. package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  219. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  220. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  221. package/lib/cjs/polyface/Polyface.d.ts +1 -1
  222. package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
  223. package/lib/cjs/polyface/Polyface.js.map +1 -1
  224. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  225. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  226. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  227. package/lib/cjs/polyface/PolyfaceQuery.d.ts +7 -3
  228. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  229. package/lib/cjs/polyface/PolyfaceQuery.js +23 -0
  230. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  231. package/lib/cjs/polyface/RangeLengthData.js.map +1 -1
  232. package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.d.ts +52 -0
  233. package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.d.ts.map +1 -0
  234. package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js +78 -0
  235. package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -0
  236. package/lib/cjs/polyface/RangeTree/MinimumValueTester.d.ts +60 -0
  237. package/lib/cjs/polyface/RangeTree/MinimumValueTester.d.ts.map +1 -0
  238. package/lib/cjs/polyface/RangeTree/MinimumValueTester.js +96 -0
  239. package/lib/cjs/polyface/RangeTree/MinimumValueTester.js.map +1 -0
  240. package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.d.ts +57 -0
  241. package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.d.ts.map +1 -0
  242. package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js +73 -0
  243. package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -0
  244. package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.d.ts +57 -0
  245. package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.d.ts.map +1 -0
  246. package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js +84 -0
  247. package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -0
  248. package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts +274 -0
  249. package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -0
  250. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js +505 -0
  251. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -0
  252. package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.d.ts +204 -0
  253. package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.d.ts.map +1 -0
  254. package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js +383 -0
  255. package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -0
  256. package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
  257. package/lib/cjs/polyface/TriangleCandidate.js.map +1 -1
  258. package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  259. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  260. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  261. package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  262. package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  263. package/lib/cjs/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  264. package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
  265. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  266. package/lib/cjs/polyface/multiclip/XYPointBuckets.js.map +1 -1
  267. package/lib/cjs/serialization/BGFBAccessors.js.map +1 -1
  268. package/lib/cjs/serialization/BGFBReader.js.map +1 -1
  269. package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
  270. package/lib/cjs/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  271. package/lib/cjs/serialization/DeepCompare.js.map +1 -1
  272. package/lib/cjs/serialization/GeometrySamples.d.ts +36 -3
  273. package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
  274. package/lib/cjs/serialization/GeometrySamples.js +93 -4
  275. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  276. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  277. package/lib/cjs/serialization/SerializationHelpers.js.map +1 -1
  278. package/lib/cjs/solid/Box.js.map +1 -1
  279. package/lib/cjs/solid/Cone.js.map +1 -1
  280. package/lib/cjs/solid/LinearSweep.d.ts +1 -1
  281. package/lib/cjs/solid/LinearSweep.js +1 -1
  282. package/lib/cjs/solid/LinearSweep.js.map +1 -1
  283. package/lib/cjs/solid/RotationalSweep.js.map +1 -1
  284. package/lib/cjs/solid/RuledSweep.js.map +1 -1
  285. package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
  286. package/lib/cjs/solid/Sphere.js.map +1 -1
  287. package/lib/cjs/solid/SweepContour.d.ts +2 -2
  288. package/lib/cjs/solid/SweepContour.d.ts.map +1 -1
  289. package/lib/cjs/solid/SweepContour.js.map +1 -1
  290. package/lib/cjs/solid/TorusPipe.js.map +1 -1
  291. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  292. package/lib/cjs/topology/Graph.d.ts +5 -6
  293. package/lib/cjs/topology/Graph.d.ts.map +1 -1
  294. package/lib/cjs/topology/Graph.js +7 -6
  295. package/lib/cjs/topology/Graph.js.map +1 -1
  296. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +4 -4
  297. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js +5 -5
  298. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  299. package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts +108 -71
  300. package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
  301. package/lib/cjs/topology/HalfEdgeGraphSearch.js +223 -109
  302. package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
  303. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  304. package/lib/cjs/topology/HalfEdgeGraphValidation.js.map +1 -1
  305. package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
  306. package/lib/cjs/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  307. package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  308. package/lib/cjs/topology/HalfEdgePositionDetail.js.map +1 -1
  309. package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
  310. package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
  311. package/lib/cjs/topology/MaskManager.js.map +1 -1
  312. package/lib/cjs/topology/Merging.d.ts +1 -1
  313. package/lib/cjs/topology/Merging.d.ts.map +1 -1
  314. package/lib/cjs/topology/Merging.js.map +1 -1
  315. package/lib/cjs/topology/RegularizeFace.js.map +1 -1
  316. package/lib/cjs/topology/SignedDataSummary.d.ts +13 -13
  317. package/lib/cjs/topology/SignedDataSummary.d.ts.map +1 -1
  318. package/lib/cjs/topology/SignedDataSummary.js +3 -3
  319. package/lib/cjs/topology/SignedDataSummary.js.map +1 -1
  320. package/lib/cjs/topology/SpaceTriangulation.js.map +1 -1
  321. package/lib/cjs/topology/Triangulation.d.ts +1 -12
  322. package/lib/cjs/topology/Triangulation.d.ts.map +1 -1
  323. package/lib/cjs/topology/Triangulation.js.map +1 -1
  324. package/lib/cjs/topology/XYParitySearchContext.d.ts +27 -21
  325. package/lib/cjs/topology/XYParitySearchContext.d.ts.map +1 -1
  326. package/lib/cjs/topology/XYParitySearchContext.js +73 -71
  327. package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
  328. package/lib/esm/Constant.js.map +1 -1
  329. package/lib/esm/Geometry.d.ts +17 -0
  330. package/lib/esm/Geometry.d.ts.map +1 -1
  331. package/lib/esm/Geometry.js +14 -0
  332. package/lib/esm/Geometry.js.map +1 -1
  333. package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
  334. package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
  335. package/lib/esm/bspline/BSplineCurve.js.map +1 -1
  336. package/lib/esm/bspline/BSplineCurve3dH.js.map +1 -1
  337. package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
  338. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  339. package/lib/esm/bspline/Bezier1dNd.js.map +1 -1
  340. package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
  341. package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
  342. package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
  343. package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
  344. package/lib/esm/bspline/KnotVector.js.map +1 -1
  345. package/lib/esm/bspline/SurfaceLocationDetail.js.map +1 -1
  346. package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
  347. package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
  348. package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
  349. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  350. package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
  351. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  352. package/lib/esm/clipping/ClipVector.js.map +1 -1
  353. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  354. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  355. package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  356. package/lib/esm/core-geometry.d.ts +3 -2
  357. package/lib/esm/core-geometry.d.ts.map +1 -1
  358. package/lib/esm/core-geometry.js +3 -2
  359. package/lib/esm/core-geometry.js.map +1 -1
  360. package/lib/esm/curve/Arc3d.js.map +1 -1
  361. package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
  362. package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
  363. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +2 -2
  364. package/lib/esm/curve/CurveChainWithDistanceIndex.js +3 -3
  365. package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
  366. package/lib/esm/curve/CurveCollection.js.map +1 -1
  367. package/lib/esm/curve/CurveCurve.js.map +1 -1
  368. package/lib/esm/curve/CurveExtendMode.d.ts +7 -6
  369. package/lib/esm/curve/CurveExtendMode.d.ts.map +1 -1
  370. package/lib/esm/curve/CurveExtendMode.js +7 -6
  371. package/lib/esm/curve/CurveExtendMode.js.map +1 -1
  372. package/lib/esm/curve/CurveFactory.js.map +1 -1
  373. package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
  374. package/lib/esm/curve/CurveLocationDetail.js +23 -18
  375. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  376. package/lib/esm/curve/CurveOps.js.map +1 -1
  377. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  378. package/lib/esm/curve/CurveProcessor.js.map +1 -1
  379. package/lib/esm/curve/CurveTypes.js.map +1 -1
  380. package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
  381. package/lib/esm/curve/GeometryQuery.js.map +1 -1
  382. package/lib/esm/curve/LineSegment3d.d.ts +14 -4
  383. package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
  384. package/lib/esm/curve/LineSegment3d.js +108 -3
  385. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  386. package/lib/esm/curve/LineString3d.d.ts +41 -8
  387. package/lib/esm/curve/LineString3d.d.ts.map +1 -1
  388. package/lib/esm/curve/LineString3d.js +53 -15
  389. package/lib/esm/curve/LineString3d.js.map +1 -1
  390. package/lib/esm/curve/Loop.js +1 -1
  391. package/lib/esm/curve/Loop.js.map +1 -1
  392. package/lib/esm/curve/OffsetOptions.js.map +1 -1
  393. package/lib/esm/curve/ParityRegion.js.map +1 -1
  394. package/lib/esm/curve/Path.js.map +1 -1
  395. package/lib/esm/curve/PointString3d.js.map +1 -1
  396. package/lib/esm/curve/ProxyCurve.js.map +1 -1
  397. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  398. package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
  399. package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
  400. package/lib/esm/curve/Query/InOutTests.js.map +1 -1
  401. package/lib/esm/curve/Query/PlanarSubdivision.d.ts +2 -2
  402. package/lib/esm/curve/Query/PlanarSubdivision.js +2 -2
  403. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  404. package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
  405. package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
  406. package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
  407. package/lib/esm/curve/RegionOps.d.ts +1 -2
  408. package/lib/esm/curve/RegionOps.d.ts.map +1 -1
  409. package/lib/esm/curve/RegionOps.js +1 -1
  410. package/lib/esm/curve/RegionOps.js.map +1 -1
  411. package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts +5 -8
  412. package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
  413. package/lib/esm/curve/RegionOpsClassificationSweeps.js +12 -12
  414. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  415. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  416. package/lib/esm/curve/UnionRegion.js.map +1 -1
  417. package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  418. package/lib/esm/curve/internalContexts/ChainCollectorContext.js.map +1 -1
  419. package/lib/esm/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  420. package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  421. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  422. package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  423. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  424. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  425. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  426. package/lib/esm/curve/internalContexts/CurveLengthContext.js.map +1 -1
  427. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  428. package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
  429. package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
  430. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  431. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  432. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  433. package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
  434. package/lib/esm/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  435. package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  436. package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
  437. package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
  438. package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  439. package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  440. package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
  441. package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  442. package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  443. package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
  444. package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  445. package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  446. package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
  447. package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
  448. package/lib/esm/geometry3d/Angle.js.map +1 -1
  449. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  450. package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
  451. package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
  452. package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
  453. package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
  454. package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
  455. package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
  456. package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
  457. package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
  458. package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
  459. package/lib/esm/geometry3d/GrowableXYArray.d.ts +2 -2
  460. package/lib/esm/geometry3d/GrowableXYArray.d.ts.map +1 -1
  461. package/lib/esm/geometry3d/GrowableXYArray.js +1 -1
  462. package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
  463. package/lib/esm/geometry3d/GrowableXYZArray.d.ts +2 -3
  464. package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  465. package/lib/esm/geometry3d/GrowableXYZArray.js +1 -1
  466. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  467. package/lib/esm/geometry3d/IndexedCollectionInterval.js.map +1 -1
  468. package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
  469. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +18 -1
  470. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  471. package/lib/esm/geometry3d/IndexedXYZCollection.js +13 -0
  472. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  473. package/lib/esm/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  474. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  475. package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
  476. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  477. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  478. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  479. package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
  480. package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
  481. package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
  482. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  483. package/lib/esm/geometry3d/PointHelpers.d.ts +1 -2
  484. package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
  485. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  486. package/lib/esm/geometry3d/PointStreaming.d.ts +1 -1
  487. package/lib/esm/geometry3d/PointStreaming.d.ts.map +1 -1
  488. package/lib/esm/geometry3d/PointStreaming.js +3 -1
  489. package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
  490. package/lib/esm/geometry3d/PolygonOps.d.ts +68 -1
  491. package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
  492. package/lib/esm/geometry3d/PolygonOps.js +150 -3
  493. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  494. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  495. package/lib/esm/geometry3d/PolylineOps.d.ts +23 -1
  496. package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
  497. package/lib/esm/geometry3d/PolylineOps.js +73 -1
  498. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  499. package/lib/esm/geometry3d/Range.d.ts +1 -1
  500. package/lib/esm/geometry3d/Range.d.ts.map +1 -1
  501. package/lib/esm/geometry3d/Range.js.map +1 -1
  502. package/lib/esm/geometry3d/Ray2d.js.map +1 -1
  503. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  504. package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
  505. package/lib/esm/geometry3d/Segment1d.js.map +1 -1
  506. package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
  507. package/lib/esm/geometry3d/Transform.js +1 -1
  508. package/lib/esm/geometry3d/Transform.js.map +1 -1
  509. package/lib/esm/geometry3d/UVSurfaceOps.js.map +1 -1
  510. package/lib/esm/geometry3d/XYZProps.js.map +1 -1
  511. package/lib/esm/geometry3d/YawPitchRollAngles.d.ts +7 -5
  512. package/lib/esm/geometry3d/YawPitchRollAngles.d.ts.map +1 -1
  513. package/lib/esm/geometry3d/YawPitchRollAngles.js +8 -6
  514. package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
  515. package/lib/esm/geometry4d/Map4d.js.map +1 -1
  516. package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
  517. package/lib/esm/geometry4d/MomentData.js.map +1 -1
  518. package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  519. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  520. package/lib/esm/numerics/BandedSystem.js.map +1 -1
  521. package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
  522. package/lib/esm/numerics/ClusterableArray.js.map +1 -1
  523. package/lib/esm/numerics/Complex.js.map +1 -1
  524. package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
  525. package/lib/esm/numerics/Newton.js.map +1 -1
  526. package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
  527. package/lib/esm/numerics/PolarData.js.map +1 -1
  528. package/lib/esm/numerics/Polynomials.d.ts +13 -1
  529. package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
  530. package/lib/esm/numerics/Polynomials.js +13 -1
  531. package/lib/esm/numerics/Polynomials.js.map +1 -1
  532. package/lib/esm/numerics/Quadrature.js.map +1 -1
  533. package/lib/esm/numerics/Range1dArray.js.map +1 -1
  534. package/lib/esm/numerics/TriDiagonalSystem.js.map +1 -1
  535. package/lib/esm/numerics/UnionFind.js.map +1 -1
  536. package/lib/esm/numerics/UsageSums.js.map +1 -1
  537. package/lib/esm/polyface/AuxData.js.map +1 -1
  538. package/lib/esm/polyface/BoxTopology.js.map +1 -1
  539. package/lib/esm/polyface/FacetFaceData.js.map +1 -1
  540. package/lib/esm/polyface/FacetLocationDetail.d.ts +28 -5
  541. package/lib/esm/polyface/FacetLocationDetail.d.ts.map +1 -1
  542. package/lib/esm/polyface/FacetLocationDetail.js +48 -14
  543. package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
  544. package/lib/esm/polyface/FacetOrientation.js.map +1 -1
  545. package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  546. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  547. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  548. package/lib/esm/polyface/Polyface.d.ts +1 -1
  549. package/lib/esm/polyface/Polyface.d.ts.map +1 -1
  550. package/lib/esm/polyface/Polyface.js.map +1 -1
  551. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  552. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  553. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  554. package/lib/esm/polyface/PolyfaceQuery.d.ts +7 -3
  555. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  556. package/lib/esm/polyface/PolyfaceQuery.js +23 -0
  557. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  558. package/lib/esm/polyface/RangeLengthData.js.map +1 -1
  559. package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.d.ts +52 -0
  560. package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.d.ts.map +1 -0
  561. package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js +74 -0
  562. package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -0
  563. package/lib/esm/polyface/RangeTree/MinimumValueTester.d.ts +60 -0
  564. package/lib/esm/polyface/RangeTree/MinimumValueTester.d.ts.map +1 -0
  565. package/lib/esm/polyface/RangeTree/MinimumValueTester.js +92 -0
  566. package/lib/esm/polyface/RangeTree/MinimumValueTester.js.map +1 -0
  567. package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.d.ts +57 -0
  568. package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.d.ts.map +1 -0
  569. package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js +69 -0
  570. package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -0
  571. package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.d.ts +57 -0
  572. package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.d.ts.map +1 -0
  573. package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js +80 -0
  574. package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -0
  575. package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts +274 -0
  576. package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -0
  577. package/lib/esm/polyface/RangeTree/RangeTreeNode.js +497 -0
  578. package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -0
  579. package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.d.ts +204 -0
  580. package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.d.ts.map +1 -0
  581. package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js +374 -0
  582. package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -0
  583. package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
  584. package/lib/esm/polyface/TriangleCandidate.js.map +1 -1
  585. package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  586. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  587. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  588. package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  589. package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  590. package/lib/esm/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  591. package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
  592. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  593. package/lib/esm/polyface/multiclip/XYPointBuckets.js.map +1 -1
  594. package/lib/esm/serialization/BGFBAccessors.js.map +1 -1
  595. package/lib/esm/serialization/BGFBReader.js.map +1 -1
  596. package/lib/esm/serialization/BGFBWriter.js.map +1 -1
  597. package/lib/esm/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  598. package/lib/esm/serialization/DeepCompare.js.map +1 -1
  599. package/lib/esm/serialization/GeometrySamples.d.ts +36 -3
  600. package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
  601. package/lib/esm/serialization/GeometrySamples.js +93 -4
  602. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  603. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  604. package/lib/esm/serialization/SerializationHelpers.js.map +1 -1
  605. package/lib/esm/solid/Box.js.map +1 -1
  606. package/lib/esm/solid/Cone.js.map +1 -1
  607. package/lib/esm/solid/LinearSweep.d.ts +1 -1
  608. package/lib/esm/solid/LinearSweep.js +1 -1
  609. package/lib/esm/solid/LinearSweep.js.map +1 -1
  610. package/lib/esm/solid/RotationalSweep.js.map +1 -1
  611. package/lib/esm/solid/RuledSweep.js.map +1 -1
  612. package/lib/esm/solid/SolidPrimitive.js.map +1 -1
  613. package/lib/esm/solid/Sphere.js.map +1 -1
  614. package/lib/esm/solid/SweepContour.d.ts +2 -2
  615. package/lib/esm/solid/SweepContour.d.ts.map +1 -1
  616. package/lib/esm/solid/SweepContour.js.map +1 -1
  617. package/lib/esm/solid/TorusPipe.js.map +1 -1
  618. package/lib/esm/topology/ChainMerge.js.map +1 -1
  619. package/lib/esm/topology/Graph.d.ts +5 -6
  620. package/lib/esm/topology/Graph.d.ts.map +1 -1
  621. package/lib/esm/topology/Graph.js +7 -6
  622. package/lib/esm/topology/Graph.js.map +1 -1
  623. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +4 -4
  624. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js +5 -5
  625. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  626. package/lib/esm/topology/HalfEdgeGraphSearch.d.ts +108 -71
  627. package/lib/esm/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
  628. package/lib/esm/topology/HalfEdgeGraphSearch.js +223 -109
  629. package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
  630. package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  631. package/lib/esm/topology/HalfEdgeGraphValidation.js.map +1 -1
  632. package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
  633. package/lib/esm/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  634. package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  635. package/lib/esm/topology/HalfEdgePositionDetail.js.map +1 -1
  636. package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
  637. package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
  638. package/lib/esm/topology/MaskManager.js.map +1 -1
  639. package/lib/esm/topology/Merging.d.ts +1 -1
  640. package/lib/esm/topology/Merging.d.ts.map +1 -1
  641. package/lib/esm/topology/Merging.js.map +1 -1
  642. package/lib/esm/topology/RegularizeFace.js.map +1 -1
  643. package/lib/esm/topology/SignedDataSummary.d.ts +13 -13
  644. package/lib/esm/topology/SignedDataSummary.d.ts.map +1 -1
  645. package/lib/esm/topology/SignedDataSummary.js +3 -3
  646. package/lib/esm/topology/SignedDataSummary.js.map +1 -1
  647. package/lib/esm/topology/SpaceTriangulation.js.map +1 -1
  648. package/lib/esm/topology/Triangulation.d.ts +1 -12
  649. package/lib/esm/topology/Triangulation.d.ts.map +1 -1
  650. package/lib/esm/topology/Triangulation.js.map +1 -1
  651. package/lib/esm/topology/XYParitySearchContext.d.ts +27 -21
  652. package/lib/esm/topology/XYParitySearchContext.d.ts.map +1 -1
  653. package/lib/esm/topology/XYParitySearchContext.js +73 -71
  654. package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
  655. package/package.json +3 -3
@@ -0,0 +1,80 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module RangeSearch
7
+ */
8
+ import { Geometry } from "../../Geometry";
9
+ import { Polyface } from "../Polyface";
10
+ import { PolyfaceQuery } from "../PolyfaceQuery";
11
+ import { RangeTreeNode, RangeTreeOps } from "./RangeTreeNode";
12
+ import { SingleTreeSearchHandlerForClosestPointOnPolyface, TwoTreeSearchHandlerForFacetFacetCloseApproach } from "./RangeTreeSearchHandlers";
13
+ /**
14
+ * Handler class for searching a range tree containing the facets of a polyface.
15
+ * * Facilitates multiple searches for closest point and close approach calculations.
16
+ * @public
17
+ */
18
+ export class PolyfaceRangeTreeContext {
19
+ /** Constructor: capture inputs, initialize debug counters */
20
+ constructor(rangeTreeRoot, visitor, convexFacets = false) {
21
+ this.visitor = visitor;
22
+ this.convexFacets = convexFacets;
23
+ this._rangeTreeRoot = rangeTreeRoot;
24
+ this.numRangeTestTrue = 0;
25
+ this.numRangeTestFalse = 0;
26
+ this.numFacetTest = 0;
27
+ this.numSearch = 0;
28
+ }
29
+ /**
30
+ * Create a range tree context for the Polyface facets.
31
+ * * This is a very simple construction that splits "right and left parts" of the facet sequence.
32
+ * * Facets with any recognizable "left to right" or "top to bottom" sequencing will have very effective search structures.
33
+ * @param visitor access to facets, captured if PolyfaceVisitor
34
+ * @param maxChildPerNode maximum children per range tree node (default 4)
35
+ * @param maxAppDataPerLeaf maximum facet indices per leaf node (default 4)
36
+ * @param convexFacets whether all facets are known to be convex (cf. [[PolyfaceQuery.areFacetsConvex]]) (default false)
37
+ */
38
+ static createCapture(visitor, maxChildPerNode = 4, maxAppDataPerLeaf = 4, convexFacets = false) {
39
+ if (visitor instanceof Polyface)
40
+ return this.createCapture(visitor.createVisitor(0), maxChildPerNode, maxAppDataPerLeaf, convexFacets);
41
+ const numFacet = PolyfaceQuery.visitorClientFacetCount(visitor);
42
+ const rangeTreeRoot = RangeTreeOps.createByIndexSplits((index) => { visitor.moveToReadIndex(index); return visitor.range(); }, (index) => { return index; }, numFacet, maxChildPerNode, maxAppDataPerLeaf);
43
+ return rangeTreeRoot ? new PolyfaceRangeTreeContext(rangeTreeRoot, visitor, convexFacets) : undefined;
44
+ }
45
+ /**
46
+ * Search the range tree for closest facet(s) to spacePoint.
47
+ * @param spacePoint point to test
48
+ * @param maxDist collect points at no more than this distance from spacePoint. If undefined, return only the closest point.
49
+ * @param searchFacetInterior whether to include facet interiors in search. Default is false: just consider facet boundaries.
50
+ * @return closest point detail(s) with detail.a set to the distance from spacePoint to detail.point
51
+ */
52
+ searchForClosestPoint(spacePoint, maxDist, searchFacetInterior = false) {
53
+ const handler = new SingleTreeSearchHandlerForClosestPointOnPolyface(spacePoint, this, maxDist, searchFacetInterior);
54
+ this.numSearch++;
55
+ const numFacet = PolyfaceQuery.visitorClientFacetCount(this.visitor);
56
+ // seed the search with a few points -- this reduces early trips deep into early ranges that are far from spacePoint.
57
+ const numTest = Geometry.clamp(Math.floor(numFacet / 20), 2, 7);
58
+ const testStep = Math.floor(numFacet / numTest);
59
+ handler.processAppData(0);
60
+ handler.processAppData(numFacet - 1);
61
+ for (let i = testStep; i + 1 < numFacet; i += testStep)
62
+ handler.processAppData(i);
63
+ this._rangeTreeRoot.searchTopDown(handler);
64
+ return handler.searchState.savedItems.length <= 1 ? handler.getResult() : handler.getSavedItems();
65
+ }
66
+ /**
67
+ * Search the range trees for closest approach(es) between the polyfaces.
68
+ * @param contextA first polyface context
69
+ * @param contextB second polyface context
70
+ * @param maxDist collect close approaches separated by no more than this distance. If undefined, return only the closest approach.
71
+ * @param searchFacetInterior whether to include facet interiors in search (`context.convexFacets` must be true for both contexts). Default is false: just consider facet boundaries.
72
+ * @return closest approach detail pair(s), one per context, with detail.a set to the approach distance
73
+ */
74
+ static searchForClosestApproach(contextA, contextB, maxDist, searchFacetInterior = false) {
75
+ const handler = new TwoTreeSearchHandlerForFacetFacetCloseApproach(contextA, contextB, maxDist, searchFacetInterior);
76
+ RangeTreeNode.searchTwoTreesTopDown(contextA._rangeTreeRoot, contextB._rangeTreeRoot, handler);
77
+ return handler.searchState.savedItems.length <= 1 ? handler.getResult() : handler.getSavedItems();
78
+ }
79
+ }
80
+ //# sourceMappingURL=PolyfaceRangeTreeContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PolyfaceRangeTreeContext.js","source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UAAU,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;IACpG,CAAC;IACD;;;;;;;MAOE;IACK,MAAM,CAAC,wBAAwB,CAAC,QAAkC,EAAE,QAAkC,EAAE,OAAgB,EAAE,sBAA+B,KAAK;QACnK,MAAM,OAAO,GAAG,IAAI,8CAA8C,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,mBAAmB,CAAC,CAAC;QACrH,aAAa,CAAC,qBAAqB,CAAC,QAAQ,CAAC,cAAc,EAAE,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QAC/F,OAAO,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;IACpG,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module RangeSearch\n */\n\nimport { Geometry } from \"../../Geometry\";\nimport { Point3d } from \"../../geometry3d/Point3dVector3d\";\nimport { Range3d } from \"../../geometry3d/Range\";\nimport { FacetLocationDetail, FacetLocationDetailPair } from \"../FacetLocationDetail\";\nimport { Polyface, PolyfaceVisitor } from \"../Polyface\";\nimport { PolyfaceQuery } from \"../PolyfaceQuery\";\nimport { RangeTreeNode, RangeTreeOps } from \"./RangeTreeNode\";\nimport { SingleTreeSearchHandlerForClosestPointOnPolyface, TwoTreeSearchHandlerForFacetFacetCloseApproach } from \"./RangeTreeSearchHandlers\";\n\n/**\n * Handler class for searching a range tree containing the facets of a polyface.\n * * Facilitates multiple searches for closest point and close approach calculations.\n * @public\n */\nexport class PolyfaceRangeTreeContext {\n /** Visitor for the polyface being searched */\n public visitor: PolyfaceVisitor;\n /** Whether all facets to visit are known to be convex. */\n public convexFacets: boolean;\n\n /** Diagnostic: number of range tests that have returned true. */\n public numRangeTestTrue: number;\n /** Diagnostic: number of range tests that have been returned false */\n public numRangeTestFalse: number;\n /** Diagnostic: number of facet tests. */\n public numFacetTest: number;\n /** Diagnostic: number of searches performed. */\n public numSearch: number;\n\n /** Range tree, whose appData are facet (read) indices */\n private _rangeTreeRoot: RangeTreeNode<number>;\n\n /** Constructor: capture inputs, initialize debug counters */\n private constructor(rangeTreeRoot: RangeTreeNode<number>, visitor: PolyfaceVisitor, convexFacets: boolean = false) {\n this.visitor = visitor;\n this.convexFacets = convexFacets;\n this._rangeTreeRoot = rangeTreeRoot;\n this.numRangeTestTrue = 0;\n this.numRangeTestFalse = 0;\n this.numFacetTest = 0;\n this.numSearch = 0;\n }\n /**\n * Create a range tree context for the Polyface facets.\n * * This is a very simple construction that splits \"right and left parts\" of the facet sequence.\n * * Facets with any recognizable \"left to right\" or \"top to bottom\" sequencing will have very effective search structures.\n * @param visitor access to facets, captured if PolyfaceVisitor\n * @param maxChildPerNode maximum children per range tree node (default 4)\n * @param maxAppDataPerLeaf maximum facet indices per leaf node (default 4)\n * @param convexFacets whether all facets are known to be convex (cf. [[PolyfaceQuery.areFacetsConvex]]) (default false)\n */\n public static createCapture(visitor: Polyface | PolyfaceVisitor, maxChildPerNode: number = 4, maxAppDataPerLeaf: number = 4, convexFacets: boolean = false): PolyfaceRangeTreeContext | undefined {\n if (visitor instanceof Polyface)\n return this.createCapture(visitor.createVisitor(0), maxChildPerNode, maxAppDataPerLeaf, convexFacets);\n const numFacet = PolyfaceQuery.visitorClientFacetCount(visitor);\n const rangeTreeRoot = RangeTreeOps.createByIndexSplits<number>(\n (index: number): Range3d => { visitor.moveToReadIndex(index); return visitor.range(); },\n (index: number): number => { return index; },\n numFacet,\n maxChildPerNode,\n maxAppDataPerLeaf,\n );\n return rangeTreeRoot ? new PolyfaceRangeTreeContext(rangeTreeRoot, visitor, convexFacets) : undefined;\n }\n /**\n * Search the range tree for closest facet(s) to spacePoint.\n * @param spacePoint point to test\n * @param maxDist collect points at no more than this distance from spacePoint. If undefined, return only the closest point.\n * @param searchFacetInterior whether to include facet interiors in search. Default is false: just consider facet boundaries.\n * @return closest point detail(s) with detail.a set to the distance from spacePoint to detail.point\n */\n public searchForClosestPoint(spacePoint: Point3d, maxDist?: number, searchFacetInterior: boolean = false): FacetLocationDetail | FacetLocationDetail[] | undefined {\n const handler = new SingleTreeSearchHandlerForClosestPointOnPolyface(spacePoint, this, maxDist, searchFacetInterior);\n this.numSearch++;\n const numFacet = PolyfaceQuery.visitorClientFacetCount(this.visitor);\n // seed the search with a few points -- this reduces early trips deep into early ranges that are far from spacePoint.\n const numTest = Geometry.clamp(Math.floor(numFacet / 20), 2, 7);\n const testStep = Math.floor(numFacet / numTest);\n handler.processAppData(0);\n handler.processAppData(numFacet - 1);\n for (let i = testStep; i + 1 < numFacet; i += testStep)\n handler.processAppData(i);\n this._rangeTreeRoot.searchTopDown(handler);\n return handler.searchState.savedItems.length <= 1 ? handler.getResult() : handler.getSavedItems();\n }\n /**\n * Search the range trees for closest approach(es) between the polyfaces.\n * @param contextA first polyface context\n * @param contextB second polyface context\n * @param maxDist collect close approaches separated by no more than this distance. If undefined, return only the closest approach.\n * @param searchFacetInterior whether to include facet interiors in search (`context.convexFacets` must be true for both contexts). Default is false: just consider facet boundaries.\n * @return closest approach detail pair(s), one per context, with detail.a set to the approach distance\n */\n public static searchForClosestApproach(contextA: PolyfaceRangeTreeContext, contextB: PolyfaceRangeTreeContext, maxDist?: number, searchFacetInterior: boolean = false): FacetLocationDetailPair | FacetLocationDetailPair[] | undefined {\n const handler = new TwoTreeSearchHandlerForFacetFacetCloseApproach(contextA, contextB, maxDist, searchFacetInterior);\n RangeTreeNode.searchTwoTreesTopDown(contextA._rangeTreeRoot, contextB._rangeTreeRoot, handler);\n return handler.searchState.savedItems.length <= 1 ? handler.getResult() : handler.getSavedItems();\n }\n}\n"]}
@@ -0,0 +1,274 @@
1
+ /** @packageDocumentation
2
+ * @module RangeSearch
3
+ */
4
+ import { Range3d } from "../../geometry3d/Range";
5
+ /** Type name FlexData is shorthand for a member or parameter which can be:
6
+ * * undefined
7
+ * * an array of values of type T
8
+ * * a singleton of type T
9
+ */
10
+ type FlexData<T> = undefined | T[] | T;
11
+ /**
12
+ * Type name IndexToType is shorthand for a member or parameter which can be:
13
+ * * an array of values of type T
14
+ * * a function from integers to type T.
15
+ */
16
+ type IndexToType<T> = T[] | ((index: number) => T);
17
+ /**
18
+ * Abstract class for handler objects called during traversal of a single range tree.
19
+ * @internal
20
+ */
21
+ export declare abstract class SingleTreeSearchHandler<AppDataType> {
22
+ /** Return true if appData within the range should be offered to `processAppData`. */
23
+ abstract isRangeActive(range: Range3d): boolean;
24
+ /**
25
+ * Called for a (single) child referenced by a tree.
26
+ * * This is only called when range checks on the path from root have been passed.
27
+ * @param item child (of type AppDataType) in the tree.
28
+ */
29
+ abstract processAppData(item: AppDataType): void;
30
+ /**
31
+ * Query to see if the active search has been aborted.
32
+ * * Default implementation returns false so query runs to completion.
33
+ * * Search processes check this after range tests and child processing.
34
+ */
35
+ isAborted(): boolean;
36
+ }
37
+ /**
38
+ * Abstract class for handler objects called during traversal of two range trees.
39
+ * @internal
40
+ */
41
+ export declare abstract class TwoTreeSearchHandler<AppDataType> {
42
+ /** Return true if appData within the ranges should be offered to `processAppDataPair`. */
43
+ abstract isRangePairActive(leftRange: Range3d, rightRange: Range3d): boolean;
44
+ /**
45
+ * Called with AppDataType items from left tree and right tree.
46
+ * * This is only called when range tests have been passed.
47
+ * @param leftItem
48
+ * @param rightItem
49
+ */
50
+ abstract processAppDataPair(leftItem: AppDataType, rightItem: AppDataType): void;
51
+ /**
52
+ * Query to see if the active search has been aborted.
53
+ * * Default implementation returns false so query runs to completion.
54
+ * * Search processes check this after range tests and child processing.
55
+ */
56
+ isAborted(): boolean;
57
+ }
58
+ /**
59
+ * This class refines the TwoTreeSearchHandler with an implementation of `isRangePairActive` appropriate for computing the minimum distance between trees.
60
+ * * The concrete class must implement `getCurrentDistance()` method to provide the best-so-far distance.
61
+ * * The implementation of `isRangePairActive` returns true if the distance between ranges is less than or equal to the `getCurrentDistance()` value.
62
+ * @internal
63
+ */
64
+ export declare abstract class TwoTreeDistanceMinimizationSearchHandler<AppDataType> extends TwoTreeSearchHandler<AppDataType> {
65
+ /**
66
+ * Provides the allowable distance between ranges.
67
+ * * Range pairs with more than this distance separation are rejected.
68
+ * * The implementation may alter (probably reduce) the getCurrentDistance() value as the search progresses.
69
+ */
70
+ abstract getCurrentDistance(): number;
71
+ /**
72
+ * Method called to decide whether to process subtrees and immediate child appData items from a left tree node and right tree node.
73
+ * @param leftRange range from a node in the left tree
74
+ * @param rightRange range from a node in the right tree.
75
+ * @returns true if the smallest distance from leftRange to rightRange is less than or equal to getCurrentDistance()
76
+ */
77
+ isRangePairActive(leftRange: Range3d, rightRange: Range3d): boolean;
78
+ }
79
+ /**
80
+ * * TREE STRUCTURE
81
+ * * A RangeTreeNode is part of a range tree.
82
+ * * TREE is used here in a strictly _structural_ sense, which has no broad promises about data members.
83
+ * * Each RangeNode points to 0, 1 or many children.
84
+ * * Each child has (but does not point back to) a single parent.
85
+ * * The overall tree has a single root.
86
+ * * Each node is effectively the root of the tree of its children.
87
+ * * NON-TREE DATA MEMBERS
88
+ * * Data members in each node (in addition to children) are
89
+ * * _range = the union of ranges below in the heap
90
+ * * _appData = application data associated with the node.
91
+ * * Construction methods may place multiple _appData items in each node.
92
+ * * In common use, only the leaves will have _appData. However, the class definitions allow _appData at all nodes, and search algorithms must include them.
93
+ * * CONSTRUCTION
94
+ * * The RangeTreeNode.createByIndexSplits method constructs the tree with simple right-left splits within an array of input items.
95
+ * * The appData is placed entirely in the leaves.
96
+ * * caller can specify:
97
+ * * the number of _appData items per leaf
98
+ * * the number of children per node within the tree.
99
+ * * "deep" trees (2 children per node and one appData per leaf) may have (compared to shallow trees with many children per node and many appData per leaf)
100
+ * * faster search because lower nodes have smaller ranges that will be skipped by search algorithms.
101
+ * * larger memory use because of more nodes
102
+ * * For future construction methods:
103
+ * * _appData "above the leaves" may allow nodes below to have smaller ranges, but add complexity to search.
104
+ * @internal
105
+ */
106
+ export declare class RangeTreeNode<AppDataType> {
107
+ private _range;
108
+ private _appData;
109
+ private _children;
110
+ /** an id assigned sequentially as nodes are created. For debugging use only. */
111
+ private _id;
112
+ /**
113
+ * CONSTRUCTOR
114
+ * CAPTURE (not copy)
115
+ * * range = range for search algorithms
116
+ * * appData = application data relevant to this node.
117
+ * * children = child node reference(s).
118
+ */
119
+ private constructor();
120
+ /** Simplest public create: capture the range, appData, and children. */
121
+ static createCapture<AppDataType>(range: Range3d, appData: FlexData<AppDataType>, children: FlexData<RangeTreeNode<AppDataType>>): RangeTreeNode<AppDataType>;
122
+ /** copy (not capture) from given data into the range in this RangeEntry */
123
+ setRange(data: Range3d): void;
124
+ /** return (a copy of) the range in this RangeEntry */
125
+ getRange(data?: Range3d): Range3d;
126
+ /** return (a reference to) the range in this RangeEntry */
127
+ getRangeRef(): Range3d;
128
+ /**
129
+ * Access a child by index.
130
+ * * If the child data is an array, this dereferences the array.
131
+ * * If the child data is a singleton, treat it as index 0.
132
+ * * return undefined if there are no children.
133
+ * @param index index of item to access.
134
+ */
135
+ getChildByIndex(index: number): RangeTreeNode<AppDataType> | undefined;
136
+ /**
137
+ * * Access an appData by index.
138
+ * * If the appData data is an array, this dereferences the array.
139
+ * * If the appData data is a singleton, treat it as if it is at index 0 in an array
140
+ * * return undefined if there are no appData or for any index out of range.
141
+ * @param index index of item to access.
142
+ */
143
+ getAppDataByIndex(index: number): AppDataType | undefined;
144
+ /** Access the children or child (does not clone). */
145
+ getAllChildren(): FlexData<RangeTreeNode<AppDataType>>;
146
+ /** Access the appData array or singleton (does not clone). */
147
+ getAllAppData(): FlexData<AppDataType>;
148
+ /**
149
+ * Count the direct children in this node of the tree.
150
+ * * This is not recursive. For a recursive count, use `RangeTreeOps.getRecursiveNodeCount`.
151
+ */
152
+ getNumChildren(): number;
153
+ /**
154
+ * Count the appData items in this node of the tree.
155
+ * * This is not recursive. For a recursive count, use `RangeTreeOps.getRecursiveAppDataCount`.
156
+ */
157
+ getNumAppData(): number;
158
+ /**
159
+ * Depth-first tree iteration, calling `announceNode` on each node.
160
+ * @param announceNode callback that returns true to recurse into children
161
+ */
162
+ recurseIntoTree(announceNode: (node: RangeTreeNode<AppDataType>) => boolean): void;
163
+ /**
164
+ * Depth-first tree iteration via handler.
165
+ * * if handler decides the instance range is active, process appData, then recurse on children
166
+ * * if handler decides to abort after processing an appData, skip processing rest of appData and children
167
+ */
168
+ searchTopDown(handler: SingleTreeSearchHandler<AppDataType>): void;
169
+ /**
170
+ * Apply the handler.processAppDataPair method to each pair of appData items from leftAppData and rightStack.
171
+ * @param leftAppData singleton or array with data "from left"
172
+ * @param rightStack stack of nodes to process from right path.
173
+ * @param reverseArgs true if the caller is exchanging the sense of left and right and this should be undone in the actual call to handler.processAppDataPair.
174
+ * @param handler search handler
175
+ */
176
+ private static processAppDataAndAppDataStack;
177
+ /**
178
+ * Apply the handler.processAppDataPair method to each pair of appData items from leftAppData and rightAppData.
179
+ * @param leftAppData singleton or array with data "from left"
180
+ * @param rightAppData singleton or array with data "from right"
181
+ * @param reverseArgs true if the caller is exchanging the sense of left and right and this should be undone in the actual call to handler.processAppDataPair.
182
+ * @param handler search handler
183
+ */
184
+ private static processAppDataAndAppData;
185
+ /**
186
+ * Push the tip node to stack(s).
187
+ * @param tip new node (to be pushed)
188
+ * @param fullPath complete path, which is always extended
189
+ * @param partialPath partial path, which is only extended if the tip has _appData.
190
+ */
191
+ private static pushPaths;
192
+ /**
193
+ * Pop the tip node from stack(s).
194
+ * @param tip should match the fullPath tip.
195
+ * @param fullPath complete path, which is always popped
196
+ * @param partialPath partial path, which is only popped if the tip has _appData.
197
+ */
198
+ private static popPaths;
199
+ /**
200
+ * Process nodes from left and right trees of dual search.
201
+ * * The separate stacks for nodes that have appData is for efficiency.
202
+ * * If data is entirely in the leaves (or just in a few nodes), the stacks will all be empty (or very small) and no time will be wasted looking up the stacks for appData to process with the other tip.
203
+ * @param leftTip tip node being explored on left
204
+ * @param leftStack stack of prior left nodes
205
+ * @param leftStackWithAppData stack of prior left nodes which have appData.
206
+ * @param rightTip tip node being explored on right.
207
+ * @param rightStack stack of prior right nodes.
208
+ * @param rightStackWithAppData stack of prior right nodes which have appData.
209
+ * @param handler search handler
210
+ */
211
+ private static recursivePairSearch;
212
+ /**
213
+ * Recurse below the tip of leftTip, offering each level's appData to the appData of rightTip and rightStackWithAppData.
214
+ * @param leftTip tip node being explored on left. Its appData is not processed.
215
+ * @param rightTip tip node being explored on right. It has no children.
216
+ * @param rightStackWithAppData stack of prior right nodes which have appData.
217
+ * @param reverseArgs true if the caller is exchanging the sense of left and right
218
+ * @param handler search handler
219
+ */
220
+ private static leftRecursivePairSearch;
221
+ /**
222
+ * Recursive search down two trees, with range tests and child processing under control of a handler.
223
+ * @param leftRoot root of left tree
224
+ * @param rightRoot root of right tree
225
+ * @param handler handler for range tests and child process
226
+ */
227
+ static searchTwoTreesTopDown<AppDataType>(leftRoot: RangeTreeNode<AppDataType>, rightRoot: RangeTreeNode<AppDataType>, handler: TwoTreeSearchHandler<AppDataType>): void;
228
+ }
229
+ /**
230
+ * Utilities for various operations on RangeTree
231
+ * @internal
232
+ */
233
+ export declare class RangeTreeOps {
234
+ /** Count nodes in this tree. */
235
+ static getRecursiveNodeCount<AppDataType>(root: RangeTreeNode<AppDataType>): number;
236
+ /** Count appData in this tree. */
237
+ static getRecursiveAppDataCount<AppDataType>(root: RangeTreeNode<AppDataType>): number;
238
+ /**
239
+ * Create a leaf referencing appData items indexed index0<=index<index1 and with combined range of the same indices
240
+ * @param ranges access to ranges
241
+ * @param appData access to AppDataType items
242
+ * @param index0 first index for block of items
243
+ * @param index1 upper limit index for block of items.
244
+ * @param arrayLength one more than the largest range/appData index
245
+ * @returns newly created node.
246
+ */
247
+ private static createLeafInIndexRange;
248
+ /**
249
+ * Split the array entries appData[index0 <= i < index1] into blocks of at most maxChildPerNode * maxAppDataPerLeaf and assemble into a tree structure.
250
+ * @param ranges access to ranges
251
+ * @param appData access to AppDataType items
252
+ * @param index0 start index of the block to access
253
+ * @param index1 terminal index for the block (one after final)
254
+ * @param arrayLength one more than the largest range/appData index
255
+ * @param maxChildPerNode max number of child nodes in each interior node
256
+ * @param maxAppDataPerLeaf max number of appData items in each leaf.
257
+ * @returns
258
+ */
259
+ private static createRecursiveByIndexSplits;
260
+ /**
261
+ * Create a range tree by simple left-right split of given ranges.
262
+ * * Leaves carry the inputs in left-to-right order.
263
+ * * Each leaf range is labeled by its corresponding object(s) in the appData array.
264
+ * @param ranges access to ranges.
265
+ * @param appData access to AppDataType items (for leaves).
266
+ * @param arrayLength one more than the largest range/appData index
267
+ * @param maxChildrenPerNode max number of child nodes allowed for each interior node.
268
+ * @param maxAppDataPerLeaf max number of appData items allowed in each leaf.
269
+ * @returns the root of the new tree, or undefined if array lengths differ or are zero.
270
+ */
271
+ static createByIndexSplits<AppDataType>(ranges: IndexToType<Range3d>, appData: IndexToType<AppDataType>, arrayLength: number, maxChildrenPerNode?: number, maxAppDataPerLeaf?: number): RangeTreeNode<AppDataType> | undefined;
272
+ }
273
+ export {};
274
+ //# sourceMappingURL=RangeTreeNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RangeTreeNode.d.ts","sourceRoot":"","sources":["../../../../src/polyface/RangeTree/RangeTreeNode.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD;;;;GAIG;AACH,KAAK,QAAQ,CAAC,CAAC,IAAI,SAAS,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;AACvC;;;;GAIG;AACH,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,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