@itwin/core-geometry 5.1.0-dev.4 → 5.1.0-dev.41

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 (470) hide show
  1. package/CHANGELOG.md +48 -1
  2. package/lib/cjs/Geometry.d.ts +12 -4
  3. package/lib/cjs/Geometry.d.ts.map +1 -1
  4. package/lib/cjs/Geometry.js +13 -3
  5. package/lib/cjs/Geometry.js.map +1 -1
  6. package/lib/cjs/bspline/BSpline1dNd.d.ts +1 -1
  7. package/lib/cjs/bspline/BSpline1dNd.js +1 -1
  8. package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
  9. package/lib/cjs/bspline/BSplineCurve.d.ts.map +1 -1
  10. package/lib/cjs/bspline/BSplineCurve.js +7 -1
  11. package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
  12. package/lib/cjs/bspline/BSplineSurface.d.ts +4 -3
  13. package/lib/cjs/bspline/BSplineSurface.d.ts.map +1 -1
  14. package/lib/cjs/bspline/BSplineSurface.js +6 -5
  15. package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
  16. package/lib/cjs/clipping/ClipPlane.d.ts +7 -5
  17. package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
  18. package/lib/cjs/clipping/ClipPlane.js +9 -5
  19. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  20. package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
  21. package/lib/cjs/clipping/ClipUtils.js +5 -3
  22. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  23. package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts +1 -2
  24. package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  25. package/lib/cjs/clipping/ConvexClipPlaneSet.js +13 -25
  26. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  27. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts +1 -2
  28. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
  29. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js +1 -2
  30. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  31. package/lib/cjs/core-geometry.d.ts +1 -0
  32. package/lib/cjs/core-geometry.d.ts.map +1 -1
  33. package/lib/cjs/core-geometry.js +1 -0
  34. package/lib/cjs/core-geometry.js.map +1 -1
  35. package/lib/cjs/curve/Arc3d.d.ts +54 -32
  36. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  37. package/lib/cjs/curve/Arc3d.js +56 -37
  38. package/lib/cjs/curve/Arc3d.js.map +1 -1
  39. package/lib/cjs/curve/CurveCollection.d.ts +33 -1
  40. package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
  41. package/lib/cjs/curve/CurveCollection.js +79 -0
  42. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  43. package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
  44. package/lib/cjs/curve/CurveFactory.js.map +1 -1
  45. package/lib/cjs/curve/CurveLocationDetail.d.ts +25 -25
  46. package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
  47. package/lib/cjs/curve/CurveLocationDetail.js +25 -25
  48. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  49. package/lib/cjs/curve/CurvePrimitive.d.ts +2 -2
  50. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  51. package/lib/cjs/curve/CurveTypes.d.ts +1 -1
  52. package/lib/cjs/curve/CurveTypes.js.map +1 -1
  53. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  54. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js +10 -5
  55. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  56. package/lib/cjs/curve/Query/PlanarSubdivision.d.ts +9 -5
  57. package/lib/cjs/curve/Query/PlanarSubdivision.d.ts.map +1 -1
  58. package/lib/cjs/curve/Query/PlanarSubdivision.js +27 -11
  59. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  60. package/lib/cjs/curve/RegionMomentsXY.d.ts +1 -0
  61. package/lib/cjs/curve/RegionMomentsXY.d.ts.map +1 -1
  62. package/lib/cjs/curve/RegionMomentsXY.js +21 -39
  63. package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
  64. package/lib/cjs/curve/RegionOps.d.ts +55 -29
  65. package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
  66. package/lib/cjs/curve/RegionOps.js +96 -35
  67. package/lib/cjs/curve/RegionOps.js.map +1 -1
  68. package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts +27 -26
  69. package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
  70. package/lib/cjs/curve/RegionOpsClassificationSweeps.js +70 -54
  71. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  72. package/lib/cjs/curve/StrokeOptions.d.ts +1 -1
  73. package/lib/cjs/curve/StrokeOptions.js +1 -1
  74. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  75. package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
  76. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts +0 -1
  77. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  78. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +58 -32
  79. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  80. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
  81. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +0 -1
  82. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  83. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
  84. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
  85. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js +34 -0
  86. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
  87. package/lib/cjs/geometry3d/AngleSweep.d.ts +24 -17
  88. package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
  89. package/lib/cjs/geometry3d/AngleSweep.js +31 -17
  90. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  91. package/lib/cjs/geometry3d/CoincidentGeometryOps.d.ts +8 -7
  92. package/lib/cjs/geometry3d/CoincidentGeometryOps.d.ts.map +1 -1
  93. package/lib/cjs/geometry3d/CoincidentGeometryOps.js +19 -25
  94. package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
  95. package/lib/cjs/geometry3d/GrowableXYArray.d.ts +1 -1
  96. package/lib/cjs/geometry3d/GrowableXYArray.js +1 -1
  97. package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
  98. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +7 -2
  99. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  100. package/lib/cjs/geometry3d/GrowableXYZArray.js +20 -2
  101. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  102. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +2 -1
  103. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  104. package/lib/cjs/geometry3d/IndexedXYZCollection.js +7 -3
  105. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  106. package/lib/cjs/geometry3d/Plane3d.d.ts +2 -0
  107. package/lib/cjs/geometry3d/Plane3d.d.ts.map +1 -1
  108. package/lib/cjs/geometry3d/Plane3d.js +6 -1
  109. package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
  110. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
  111. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
  112. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
  113. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  114. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
  115. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  116. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js +18 -10
  117. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  118. package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
  119. package/lib/cjs/geometry3d/Point2dVector2d.js +0 -2
  120. package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
  121. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +4 -4
  122. package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
  123. package/lib/cjs/geometry3d/Point3dVector3d.js +4 -5
  124. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  125. package/lib/cjs/geometry3d/PointHelpers.d.ts +7 -7
  126. package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
  127. package/lib/cjs/geometry3d/PointHelpers.js +66 -26
  128. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  129. package/lib/cjs/geometry3d/PolygonOps.d.ts +49 -2
  130. package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
  131. package/lib/cjs/geometry3d/PolygonOps.js +38 -2
  132. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  133. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
  134. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
  135. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
  136. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  137. package/lib/cjs/geometry3d/PolylineOps.d.ts +5 -4
  138. package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
  139. package/lib/cjs/geometry3d/PolylineOps.js +5 -4
  140. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  141. package/lib/cjs/geometry3d/Range.d.ts +18 -10
  142. package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
  143. package/lib/cjs/geometry3d/Range.js +32 -10
  144. package/lib/cjs/geometry3d/Range.js.map +1 -1
  145. package/lib/cjs/geometry3d/Ray2d.d.ts.map +1 -1
  146. package/lib/cjs/geometry3d/Ray2d.js +0 -1
  147. package/lib/cjs/geometry3d/Ray2d.js.map +1 -1
  148. package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
  149. package/lib/cjs/geometry3d/Ray3d.js +11 -23
  150. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  151. package/lib/cjs/geometry3d/Transform.d.ts +21 -2
  152. package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
  153. package/lib/cjs/geometry3d/Transform.js +32 -13
  154. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  155. package/lib/cjs/geometry4d/Point4d.d.ts +8 -5
  156. package/lib/cjs/geometry4d/Point4d.d.ts.map +1 -1
  157. package/lib/cjs/geometry4d/Point4d.js +27 -16
  158. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  159. package/lib/cjs/numerics/BezierPolynomials.d.ts +2 -0
  160. package/lib/cjs/numerics/BezierPolynomials.d.ts.map +1 -1
  161. package/lib/cjs/numerics/BezierPolynomials.js +11 -0
  162. package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
  163. package/lib/cjs/numerics/SmallSystem.d.ts +77 -36
  164. package/lib/cjs/numerics/SmallSystem.d.ts.map +1 -1
  165. package/lib/cjs/numerics/SmallSystem.js +129 -73
  166. package/lib/cjs/numerics/SmallSystem.js.map +1 -1
  167. package/lib/cjs/polyface/FacetOrientation.d.ts +1 -1
  168. package/lib/cjs/polyface/FacetOrientation.js +1 -1
  169. package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
  170. package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts +55 -40
  171. package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
  172. package/lib/cjs/polyface/IndexedEdgeMatcher.js +83 -75
  173. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  174. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
  175. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  176. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +47 -38
  177. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  178. package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts +26 -19
  179. package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
  180. package/lib/cjs/polyface/IndexedPolyfaceWalker.js +47 -32
  181. package/lib/cjs/polyface/IndexedPolyfaceWalker.js.map +1 -1
  182. package/lib/cjs/polyface/Polyface.d.ts +19 -5
  183. package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
  184. package/lib/cjs/polyface/Polyface.js +18 -2
  185. package/lib/cjs/polyface/Polyface.js.map +1 -1
  186. package/lib/cjs/polyface/PolyfaceBuilder.d.ts +1 -1
  187. package/lib/cjs/polyface/PolyfaceBuilder.js +3 -3
  188. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  189. package/lib/cjs/polyface/PolyfaceClip.d.ts +19 -18
  190. package/lib/cjs/polyface/PolyfaceClip.d.ts.map +1 -1
  191. package/lib/cjs/polyface/PolyfaceClip.js +39 -42
  192. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  193. package/lib/cjs/polyface/PolyfaceData.d.ts +1 -1
  194. package/lib/cjs/polyface/PolyfaceData.js +1 -1
  195. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  196. package/lib/cjs/polyface/PolyfaceQuery.d.ts +119 -78
  197. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  198. package/lib/cjs/polyface/PolyfaceQuery.js +315 -231
  199. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  200. package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
  201. package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
  202. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js +3 -3
  203. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  204. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
  205. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
  206. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
  207. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  208. package/lib/cjs/serialization/GeometrySamples.d.ts +1 -1
  209. package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
  210. package/lib/cjs/serialization/GeometrySamples.js +3 -3
  211. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  212. package/lib/cjs/serialization/IModelJsonSchema.d.ts +3 -3
  213. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  214. package/lib/cjs/solid/LinearSweep.d.ts +2 -3
  215. package/lib/cjs/solid/LinearSweep.d.ts.map +1 -1
  216. package/lib/cjs/solid/LinearSweep.js +2 -3
  217. package/lib/cjs/solid/LinearSweep.js.map +1 -1
  218. package/lib/cjs/solid/RotationalSweep.d.ts +2 -2
  219. package/lib/cjs/solid/RotationalSweep.js +2 -2
  220. package/lib/cjs/solid/RotationalSweep.js.map +1 -1
  221. package/lib/cjs/topology/ChainMerge.d.ts +1 -1
  222. package/lib/cjs/topology/ChainMerge.js +1 -1
  223. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  224. package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts +1 -0
  225. package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
  226. package/lib/cjs/topology/HalfEdgeGraphSearch.js +1 -0
  227. package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
  228. package/lib/cjs/topology/Merging.d.ts +0 -1
  229. package/lib/cjs/topology/Merging.d.ts.map +1 -1
  230. package/lib/cjs/topology/Merging.js +49 -46
  231. package/lib/cjs/topology/Merging.js.map +1 -1
  232. package/lib/cjs/topology/Triangulation.d.ts +9 -14
  233. package/lib/cjs/topology/Triangulation.d.ts.map +1 -1
  234. package/lib/cjs/topology/Triangulation.js +29 -22
  235. package/lib/cjs/topology/Triangulation.js.map +1 -1
  236. package/lib/esm/Geometry.d.ts +12 -4
  237. package/lib/esm/Geometry.d.ts.map +1 -1
  238. package/lib/esm/Geometry.js +13 -3
  239. package/lib/esm/Geometry.js.map +1 -1
  240. package/lib/esm/bspline/BSpline1dNd.d.ts +1 -1
  241. package/lib/esm/bspline/BSpline1dNd.js +1 -1
  242. package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
  243. package/lib/esm/bspline/BSplineCurve.d.ts.map +1 -1
  244. package/lib/esm/bspline/BSplineCurve.js +7 -1
  245. package/lib/esm/bspline/BSplineCurve.js.map +1 -1
  246. package/lib/esm/bspline/BSplineSurface.d.ts +4 -3
  247. package/lib/esm/bspline/BSplineSurface.d.ts.map +1 -1
  248. package/lib/esm/bspline/BSplineSurface.js +6 -5
  249. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  250. package/lib/esm/clipping/ClipPlane.d.ts +7 -5
  251. package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
  252. package/lib/esm/clipping/ClipPlane.js +9 -5
  253. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  254. package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
  255. package/lib/esm/clipping/ClipUtils.js +5 -3
  256. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  257. package/lib/esm/clipping/ConvexClipPlaneSet.d.ts +1 -2
  258. package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  259. package/lib/esm/clipping/ConvexClipPlaneSet.js +13 -25
  260. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  261. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts +1 -2
  262. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
  263. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js +1 -2
  264. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  265. package/lib/esm/core-geometry.d.ts +1 -0
  266. package/lib/esm/core-geometry.d.ts.map +1 -1
  267. package/lib/esm/core-geometry.js +1 -0
  268. package/lib/esm/core-geometry.js.map +1 -1
  269. package/lib/esm/curve/Arc3d.d.ts +54 -32
  270. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  271. package/lib/esm/curve/Arc3d.js +56 -37
  272. package/lib/esm/curve/Arc3d.js.map +1 -1
  273. package/lib/esm/curve/CurveCollection.d.ts +33 -1
  274. package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
  275. package/lib/esm/curve/CurveCollection.js +79 -0
  276. package/lib/esm/curve/CurveCollection.js.map +1 -1
  277. package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
  278. package/lib/esm/curve/CurveFactory.js.map +1 -1
  279. package/lib/esm/curve/CurveLocationDetail.d.ts +25 -25
  280. package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
  281. package/lib/esm/curve/CurveLocationDetail.js +25 -25
  282. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  283. package/lib/esm/curve/CurvePrimitive.d.ts +2 -2
  284. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  285. package/lib/esm/curve/CurveTypes.d.ts +1 -1
  286. package/lib/esm/curve/CurveTypes.js.map +1 -1
  287. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  288. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js +10 -5
  289. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  290. package/lib/esm/curve/Query/PlanarSubdivision.d.ts +9 -5
  291. package/lib/esm/curve/Query/PlanarSubdivision.d.ts.map +1 -1
  292. package/lib/esm/curve/Query/PlanarSubdivision.js +27 -11
  293. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  294. package/lib/esm/curve/RegionMomentsXY.d.ts +1 -0
  295. package/lib/esm/curve/RegionMomentsXY.d.ts.map +1 -1
  296. package/lib/esm/curve/RegionMomentsXY.js +21 -39
  297. package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
  298. package/lib/esm/curve/RegionOps.d.ts +55 -29
  299. package/lib/esm/curve/RegionOps.d.ts.map +1 -1
  300. package/lib/esm/curve/RegionOps.js +96 -35
  301. package/lib/esm/curve/RegionOps.js.map +1 -1
  302. package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts +27 -26
  303. package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
  304. package/lib/esm/curve/RegionOpsClassificationSweeps.js +70 -54
  305. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  306. package/lib/esm/curve/StrokeOptions.d.ts +1 -1
  307. package/lib/esm/curve/StrokeOptions.js +1 -1
  308. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  309. package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
  310. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts +0 -1
  311. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  312. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +58 -32
  313. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  314. package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
  315. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +0 -1
  316. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  317. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
  318. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
  319. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js +30 -0
  320. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
  321. package/lib/esm/geometry3d/AngleSweep.d.ts +24 -17
  322. package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
  323. package/lib/esm/geometry3d/AngleSweep.js +31 -17
  324. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  325. package/lib/esm/geometry3d/CoincidentGeometryOps.d.ts +8 -7
  326. package/lib/esm/geometry3d/CoincidentGeometryOps.d.ts.map +1 -1
  327. package/lib/esm/geometry3d/CoincidentGeometryOps.js +19 -25
  328. package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
  329. package/lib/esm/geometry3d/GrowableXYArray.d.ts +1 -1
  330. package/lib/esm/geometry3d/GrowableXYArray.js +1 -1
  331. package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
  332. package/lib/esm/geometry3d/GrowableXYZArray.d.ts +7 -2
  333. package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  334. package/lib/esm/geometry3d/GrowableXYZArray.js +20 -2
  335. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  336. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +2 -1
  337. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  338. package/lib/esm/geometry3d/IndexedXYZCollection.js +7 -3
  339. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  340. package/lib/esm/geometry3d/Plane3d.d.ts +2 -0
  341. package/lib/esm/geometry3d/Plane3d.d.ts.map +1 -1
  342. package/lib/esm/geometry3d/Plane3d.js +6 -1
  343. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  344. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
  345. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
  346. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
  347. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  348. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
  349. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  350. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js +18 -10
  351. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  352. package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
  353. package/lib/esm/geometry3d/Point2dVector2d.js +0 -2
  354. package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
  355. package/lib/esm/geometry3d/Point3dVector3d.d.ts +4 -4
  356. package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
  357. package/lib/esm/geometry3d/Point3dVector3d.js +4 -5
  358. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  359. package/lib/esm/geometry3d/PointHelpers.d.ts +7 -7
  360. package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
  361. package/lib/esm/geometry3d/PointHelpers.js +66 -26
  362. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  363. package/lib/esm/geometry3d/PolygonOps.d.ts +49 -2
  364. package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
  365. package/lib/esm/geometry3d/PolygonOps.js +38 -2
  366. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  367. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
  368. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
  369. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
  370. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  371. package/lib/esm/geometry3d/PolylineOps.d.ts +5 -4
  372. package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
  373. package/lib/esm/geometry3d/PolylineOps.js +5 -4
  374. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  375. package/lib/esm/geometry3d/Range.d.ts +18 -10
  376. package/lib/esm/geometry3d/Range.d.ts.map +1 -1
  377. package/lib/esm/geometry3d/Range.js +32 -10
  378. package/lib/esm/geometry3d/Range.js.map +1 -1
  379. package/lib/esm/geometry3d/Ray2d.d.ts.map +1 -1
  380. package/lib/esm/geometry3d/Ray2d.js +0 -1
  381. package/lib/esm/geometry3d/Ray2d.js.map +1 -1
  382. package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
  383. package/lib/esm/geometry3d/Ray3d.js +11 -23
  384. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  385. package/lib/esm/geometry3d/Transform.d.ts +21 -2
  386. package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
  387. package/lib/esm/geometry3d/Transform.js +32 -13
  388. package/lib/esm/geometry3d/Transform.js.map +1 -1
  389. package/lib/esm/geometry4d/Point4d.d.ts +8 -5
  390. package/lib/esm/geometry4d/Point4d.d.ts.map +1 -1
  391. package/lib/esm/geometry4d/Point4d.js +27 -16
  392. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  393. package/lib/esm/numerics/BezierPolynomials.d.ts +2 -0
  394. package/lib/esm/numerics/BezierPolynomials.d.ts.map +1 -1
  395. package/lib/esm/numerics/BezierPolynomials.js +11 -0
  396. package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
  397. package/lib/esm/numerics/SmallSystem.d.ts +77 -36
  398. package/lib/esm/numerics/SmallSystem.d.ts.map +1 -1
  399. package/lib/esm/numerics/SmallSystem.js +129 -73
  400. package/lib/esm/numerics/SmallSystem.js.map +1 -1
  401. package/lib/esm/polyface/FacetOrientation.d.ts +1 -1
  402. package/lib/esm/polyface/FacetOrientation.js +1 -1
  403. package/lib/esm/polyface/FacetOrientation.js.map +1 -1
  404. package/lib/esm/polyface/IndexedEdgeMatcher.d.ts +55 -40
  405. package/lib/esm/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
  406. package/lib/esm/polyface/IndexedEdgeMatcher.js +83 -75
  407. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  408. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
  409. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  410. package/lib/esm/polyface/IndexedPolyfaceVisitor.js +47 -38
  411. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  412. package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts +26 -19
  413. package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
  414. package/lib/esm/polyface/IndexedPolyfaceWalker.js +47 -32
  415. package/lib/esm/polyface/IndexedPolyfaceWalker.js.map +1 -1
  416. package/lib/esm/polyface/Polyface.d.ts +19 -5
  417. package/lib/esm/polyface/Polyface.d.ts.map +1 -1
  418. package/lib/esm/polyface/Polyface.js +18 -2
  419. package/lib/esm/polyface/Polyface.js.map +1 -1
  420. package/lib/esm/polyface/PolyfaceBuilder.d.ts +1 -1
  421. package/lib/esm/polyface/PolyfaceBuilder.js +3 -3
  422. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  423. package/lib/esm/polyface/PolyfaceClip.d.ts +19 -18
  424. package/lib/esm/polyface/PolyfaceClip.d.ts.map +1 -1
  425. package/lib/esm/polyface/PolyfaceClip.js +39 -42
  426. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  427. package/lib/esm/polyface/PolyfaceData.d.ts +1 -1
  428. package/lib/esm/polyface/PolyfaceData.js +1 -1
  429. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  430. package/lib/esm/polyface/PolyfaceQuery.d.ts +119 -78
  431. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  432. package/lib/esm/polyface/PolyfaceQuery.js +316 -232
  433. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  434. package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
  435. package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
  436. package/lib/esm/polyface/RangeTree/RangeTreeNode.js +3 -3
  437. package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  438. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
  439. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
  440. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
  441. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  442. package/lib/esm/serialization/GeometrySamples.d.ts +1 -1
  443. package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
  444. package/lib/esm/serialization/GeometrySamples.js +3 -3
  445. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  446. package/lib/esm/serialization/IModelJsonSchema.d.ts +3 -3
  447. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  448. package/lib/esm/solid/LinearSweep.d.ts +2 -3
  449. package/lib/esm/solid/LinearSweep.d.ts.map +1 -1
  450. package/lib/esm/solid/LinearSweep.js +2 -3
  451. package/lib/esm/solid/LinearSweep.js.map +1 -1
  452. package/lib/esm/solid/RotationalSweep.d.ts +2 -2
  453. package/lib/esm/solid/RotationalSweep.js +2 -2
  454. package/lib/esm/solid/RotationalSweep.js.map +1 -1
  455. package/lib/esm/topology/ChainMerge.d.ts +1 -1
  456. package/lib/esm/topology/ChainMerge.js +1 -1
  457. package/lib/esm/topology/ChainMerge.js.map +1 -1
  458. package/lib/esm/topology/HalfEdgeGraphSearch.d.ts +1 -0
  459. package/lib/esm/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
  460. package/lib/esm/topology/HalfEdgeGraphSearch.js +1 -0
  461. package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
  462. package/lib/esm/topology/Merging.d.ts +0 -1
  463. package/lib/esm/topology/Merging.d.ts.map +1 -1
  464. package/lib/esm/topology/Merging.js +49 -46
  465. package/lib/esm/topology/Merging.js.map +1 -1
  466. package/lib/esm/topology/Triangulation.d.ts +9 -14
  467. package/lib/esm/topology/Triangulation.d.ts.map +1 -1
  468. package/lib/esm/topology/Triangulation.js +29 -22
  469. package/lib/esm/topology/Triangulation.js.map +1 -1
  470. package/package.json +3 -3
@@ -23,13 +23,13 @@ import { GraphCheckPointFunction, RegionBinaryOpType } from "./RegionOps";
23
23
  * @internal
24
24
  */
25
25
  declare abstract class RegionOpsFaceToFaceSearchCallbacks {
26
- /** Announce a representative node on the outer face of a component */
26
+ /** Announce a representative node on the outer face of a component. */
27
27
  startComponent(_node: HalfEdge): boolean;
28
- /** Announce return to outer face */
28
+ /** Announce return to outer face. */
29
29
  finishComponent(_node: HalfEdge): boolean;
30
- /** Announce face entry */
30
+ /** Announce face entry. */
31
31
  enterFace(_facePathStack: HalfEdge[], _newFaceNode: HalfEdge): boolean;
32
- /** Announce face exit */
32
+ /** Announce face exit. */
33
33
  leaveFace(_facePathStack: HalfEdge[], _newFaceNode: HalfEdge): boolean;
34
34
  }
35
35
  /** Function signature ot announce classification of a face.
@@ -45,14 +45,14 @@ type AnnounceClassifiedFace = (graph: HalfEdgeGraph, faceSeed: HalfEdge, faceTyp
45
45
  */
46
46
  export declare class RegionOpsFaceToFaceSearch {
47
47
  /**
48
- * run a DFS with face-to-face step announcements.
48
+ * Run a DFS with face-to-face step announcements.
49
49
  * * false return from any function terminates search immediately.
50
50
  * * all reachable nodes assumed to have both visit masks clear.
51
51
  * @param graph containing graph.
52
52
  * @param seed first node to visit.
53
53
  * @param faceHasBeenVisited mask marking faces that have been seen.
54
54
  * @param nodeHasBeenVisited mask marking node-to-node step around face.
55
- *
55
+ * @param callbacks callbacks.
56
56
  */
57
57
  static faceToFaceSearchFromOuterLoop(_graph: HalfEdgeGraph, seed: HalfEdge, faceHasBeenVisited: HalfEdgeMask, nodeHasBeenVisited: HalfEdgeMask, callbacks: RegionOpsFaceToFaceSearchCallbacks): void;
58
58
  /** Complete multi-step process for polygon binary booleans starting with arrays of coordinates.
@@ -126,8 +126,7 @@ export declare class RegionGroup {
126
126
  /** deep clear of state data -- group header plus all members */
127
127
  clearState(): void;
128
128
  range(): Range3d;
129
- /** Ask if the current _numIn count qualifies as an "in" for this operation type.
130
- */
129
+ /** Ask if the current _numIn count qualifies as an "in" for this operation type. */
131
130
  getInOut(): boolean;
132
131
  addMember(data: AnyRegion | AnyRegion[] | LineSegment3d | undefined, allowLineSegment?: boolean): void;
133
132
  recordMemberStateChange(oldState: number, newState: number): void;
@@ -135,28 +134,29 @@ export declare class RegionGroup {
135
134
  /**
136
135
  * A `RegionBooleanContext` carries structure and operations for binary operations between two sets of regions.
137
136
  * * In the binary operation OP (union, intersection, parity, difference), the left and right operands
138
- * are each a composite union, difference, or parity among multiple inputs, i.e.
137
+ * are each a composite union, difference, or parity among multiple inputs, i.e.,
139
138
  * * (operationA among Ai) OP (operationB among Bi)
140
139
  * * where the Ai are one set of regions, being combined by operationA
141
- * * and the Bi are the another set of regions, being combined by operationB
142
- * * Each group of Ai and Bi is a `RegionGroup`
140
+ * * and the Bi are the another set of regions, being combined by operationB.
141
+ * * Each group of Ai and Bi is a `RegionGroup`.
143
142
  * * This is an extremely delicate structure.
144
143
  * * Members are public because of the unique variety of queries, but should only be used for queries.
145
144
  * * The graph and curves in the booleans are connected by an extended pointer chain:
146
- * * (HalfEdge in Graph).edgeTag points to a CurveLocationDetail
147
- * * (CurveLocationDetail).curve points to a curve
148
- * * (Curve).parent points to RegionGroupMember
149
- * * (RegionGroupMember) points to RegionGroup
150
- * * (RegionGroup) points to RegionBooleanBinaryContext
151
- * * So..when a graph sweep crosses an edge,
152
- * * the chain leads to a parity count in the RegionGroupMember
153
- * * that can change the number of members active in the RegionGroup
145
+ * * (HalfEdge in Graph).edgeTag points to a CurveLocationDetail.
146
+ * * (CurveLocationDetail).curve points to a curve.
147
+ * * (Curve).parent points to RegionGroupMember.
148
+ * * (RegionGroupMember) points to RegionGroup.
149
+ * * (RegionGroup) points to RegionBooleanBinaryContext.
150
+ * * So when a graph sweep crosses an edge
151
+ * * the chain leads to a parity count in the RegionGroupMember.
152
+ * * that can change the number of members active in the RegionGroup.
154
153
  * * which can change the state of the context.
155
154
  * @internal
156
155
  */
157
156
  export declare class RegionBooleanContext implements RegionOpsFaceToFaceSearchCallbacks {
158
157
  groupA: RegionGroup;
159
158
  groupB: RegionGroup;
159
+ /** bridge edges */
160
160
  extraGeometry: RegionGroup;
161
161
  graph: HalfEdgeGraph;
162
162
  faceAreaFunction: NodeToNumberFunction;
@@ -214,11 +214,12 @@ export declare class RegionBooleanContext implements RegionOpsFaceToFaceSearchCa
214
214
  * @param delta
215
215
  */
216
216
  private recordTransitionAcrossEdge;
217
- /** Announce a representative node on the outer face of a component */
217
+ /** Announce a representative node on the outer face of a component. */
218
218
  startComponent(outerFaceNode: HalfEdge): boolean;
219
- /** Announce return to outer face */
219
+ /** Announce return to outer face. */
220
220
  finishComponent(_node: HalfEdge): boolean;
221
- /** Announce entry to a graph face.
221
+ /**
222
+ * Announce entry to a graph face.
222
223
  * * Both both sides of a graph edge are from the same RegionGroupMember.
223
224
  * * Hence "crossing that edge" changes the parity count for the RegionGroupMember that owns that edge by 1.
224
225
  * * The parity count for other RegionGroupMembers are never affected by this crossing.
@@ -229,7 +230,7 @@ export declare class RegionBooleanContext implements RegionOpsFaceToFaceSearchCa
229
230
  leaveFace(_facePathStack: HalfEdge[], oldFaceNode: HalfEdge): boolean;
230
231
  }
231
232
  /**
232
- * Function to accumulate area under edges
233
+ * Function to accumulate area under edges.
233
234
  * Array of nodes representing faces in a subset of a graph.
234
235
  * @internal
235
236
  */
@@ -244,14 +245,14 @@ export declare class GraphComponent {
244
245
  range: Range2d;
245
246
  constructor(faces: HalfEdge[]);
246
247
  /**
247
- * visit all vertices and edges in the component to build face area array and composite range.
248
- *
248
+ * Visit all vertices and edges in the component to build face area array and composite range.
249
249
  * @param extendRangeForEdge optional function to compute edge range. If undefined, linear edge is assumed.
250
250
  * @param faceAreaFunction optional function to compute face area. If undefined, linear edges are assumed.
251
251
  */
252
252
  buildFaceData(extendRangeForEdge: NodeAndRangeFunction | undefined, faceAreaFunction: NodeToNumberFunction | undefined): void;
253
253
  }
254
- /** build and hold an array of component data for a HalfEdgeGraph.
254
+ /**
255
+ * Build and hold an array of component data for a HalfEdgeGraph.
255
256
  * @internal
256
257
  */
257
258
  export declare class GraphComponentArray {
@@ -1 +1 @@
1
- {"version":3,"file":"RegionOpsClassificationSweeps.d.ts","sourceRoot":"","sources":["../../../src/curve/RegionOpsClassificationSweeps.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAEhF,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAGvD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAOhG,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAa,MAAM,aAAa,CAAC;AAGrF;;;;;;;;;;;;;;GAcG;AACH,uBAAe,kCAAkC;IAC/C,sEAAsE;IAC/D,cAAc,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO;IAC/C,oCAAoC;IAC7B,eAAe,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO;IAChD,0BAA0B;IACnB,SAAS,CAAC,cAAc,EAAE,QAAQ,EAAE,EAAE,YAAY,EAAE,QAAQ,GAAG,OAAO;IAC7E,yBAAyB;IAClB,SAAS,CAAC,cAAc,EAAE,QAA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;;;OAUG;IACH,OAAO,CAAC,0BAA0B;IAyBlC,uEAAuE;IAChE,cAAc,CAAC,aAAa,EAAE,QAAQ,GAAG,OAAO;IAMvD,qCAAqC;IAC9B,eAAe,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO;IAGhD;;;;;;OAMG;IACI,SAAS,CAAC,cAAc,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,QAAQ,GAAG,OAAO;IAS5E,yBAAyB;IAClB,SAAS,CAAC,cAAc,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,QAAQ,GAAG,OAAO;CAI7E;AAwCD;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;AAC5E;;;GAGG;AACH,qBAAa,cAAc;IAClB,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,KAAK,EAAE,OAAO,CAAC;gBACH,KAAK,EAAE,QAAQ,EAAE;IAKpC;;;;OAIG;IACI,aAAa,CAAC,kBAAkB,EAAE,oBAAoB,GAAG,SAAS,EAAE,gBAAgB,EAAE,oBAAoB,GAAG,SAAS;CAmB9H;AACD;;;GAGG;AACH,qBAAa,mBAAmB;IACvB,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,KAAK,EAAE,aAAa,CAAC;IAC5B,OAAO;WAIO,MAAM,CAClB,KAAK,EAAE,aAAa,EAAE,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,GAClF,mBAAmB;CAUvB"}
@@ -18,6 +18,7 @@ import { CurveCurve } from "./CurveCurve";
18
18
  import { CurveLocationDetail } from "./CurveLocationDetail";
19
19
  import { GeometryQuery } from "./GeometryQuery";
20
20
  import { PlaneAltitudeRangeContext } from "./internalContexts/PlaneAltitudeRangeContext";
21
+ import { TransferWithSplitArcs } from "./internalContexts/TransferWithSplitArcs";
21
22
  import { LineSegment3d } from "./LineSegment3d";
22
23
  import { Loop } from "./Loop";
23
24
  import { ParityRegion } from "./ParityRegion";
@@ -40,14 +41,22 @@ import { UnionRegion } from "./UnionRegion";
40
41
  * @internal
41
42
  */
42
43
  class RegionOpsFaceToFaceSearchCallbacks {
43
- /** Announce a representative node on the outer face of a component */
44
- startComponent(_node) { return true; }
45
- /** Announce return to outer face */
46
- finishComponent(_node) { return true; }
47
- /** Announce face entry */
48
- enterFace(_facePathStack, _newFaceNode) { return true; }
49
- /** Announce face exit */
50
- leaveFace(_facePathStack, _newFaceNode) { return true; }
44
+ /** Announce a representative node on the outer face of a component. */
45
+ startComponent(_node) {
46
+ return true;
47
+ }
48
+ /** Announce return to outer face. */
49
+ finishComponent(_node) {
50
+ return true;
51
+ }
52
+ /** Announce face entry. */
53
+ enterFace(_facePathStack, _newFaceNode) {
54
+ return true;
55
+ }
56
+ /** Announce face exit. */
57
+ leaveFace(_facePathStack, _newFaceNode) {
58
+ return true;
59
+ }
51
60
  }
52
61
  /**
53
62
  * Implementation of `RegionOpsFaceToFaceSearchCallbacks` for binary boolean sweep with polygonal regions.
@@ -110,14 +119,14 @@ class RegionOpsBinaryBooleanSweepCallbacks extends RegionOpsFaceToFaceSearchCall
110
119
  */
111
120
  export class RegionOpsFaceToFaceSearch {
112
121
  /**
113
- * run a DFS with face-to-face step announcements.
122
+ * Run a DFS with face-to-face step announcements.
114
123
  * * false return from any function terminates search immediately.
115
124
  * * all reachable nodes assumed to have both visit masks clear.
116
125
  * @param graph containing graph.
117
126
  * @param seed first node to visit.
118
127
  * @param faceHasBeenVisited mask marking faces that have been seen.
119
128
  * @param nodeHasBeenVisited mask marking node-to-node step around face.
120
- *
129
+ * @param callbacks callbacks.
121
130
  */
122
131
  static faceToFaceSearchFromOuterLoop(_graph, seed, faceHasBeenVisited, nodeHasBeenVisited, callbacks) {
123
132
  if (seed.isMaskSet(faceHasBeenVisited))
@@ -131,10 +140,10 @@ export class RegionOpsFaceToFaceSearch {
131
140
  let entryNode = faceWalker;
132
141
  let mate = faceWalker.edgeMate;
133
142
  if (!mate.isMaskSet(faceHasBeenVisited)) {
134
- // the faceWalker seed is always on the base of the stack.
135
- // the stack then contains even-odd pairs of (entryNode, currentNode)
136
- // * entryNode is the node where a face was entered.
137
- // * faceNode is another node around that face.
143
+ // The faceWalker seed is always on the base of the stack.
144
+ // The stack then contains even-odd pairs of (entryNode, faceNode).
145
+ // entryNode is the node where a face was entered.
146
+ // faceNode is another node around that face.
138
147
  facePathStack.push(faceWalker);
139
148
  facePathStack.push(mate);
140
149
  let faceNode = mate.faceSuccessor;
@@ -165,13 +174,13 @@ export class RegionOpsFaceToFaceSearch {
165
174
  entryNode = facePathStack[facePathStack.length - 1];
166
175
  }
167
176
  if (faceNode.isMaskSet(nodeHasBeenVisited)) {
168
- // this is disaster !!!
177
+ // this is disaster
169
178
  return;
170
179
  }
171
180
  }
172
181
  }
173
182
  }
174
- // continue at outermost level .....
183
+ // continue at outermost level
175
184
  faceWalker = faceWalker.faceSuccessor;
176
185
  } while (faceWalker !== seed);
177
186
  callbacks.finishComponent(seed);
@@ -301,7 +310,9 @@ class RegionGroupMember {
301
310
  this.parentGroup = parentGroup;
302
311
  this.sweepState = 0;
303
312
  }
304
- clearState() { this.sweepState = 0; }
313
+ clearState() {
314
+ this.sweepState = 0;
315
+ }
305
316
  }
306
317
  /**
307
318
  * A `RegionGroup` is
@@ -340,8 +351,7 @@ export class RegionGroup {
340
351
  }
341
352
  return range;
342
353
  }
343
- /** Ask if the current _numIn count qualifies as an "in" for this operation type.
344
- */
354
+ /** Ask if the current _numIn count qualifies as an "in" for this operation type. */
345
355
  getInOut() {
346
356
  // UNION is true if one or more members are IN
347
357
  if (this.groupOpType === RegionGroupOpType.Union)
@@ -357,8 +367,9 @@ export class RegionGroup {
357
367
  // push new members into the group.
358
368
  addMember(data, allowLineSegment = false) {
359
369
  if (data instanceof Loop || data instanceof ParityRegion) {
360
- const cleanerData = data.clone();
370
+ let cleanerData = data.clone();
361
371
  RegionOps.consolidateAdjacentPrimitives(cleanerData);
372
+ cleanerData = TransferWithSplitArcs.clone(cleanerData);
362
373
  this.members.push(new RegionGroupMember(cleanerData, this));
363
374
  }
364
375
  else if (data instanceof UnionRegion) {
@@ -388,28 +399,29 @@ export class RegionGroup {
388
399
  /**
389
400
  * A `RegionBooleanContext` carries structure and operations for binary operations between two sets of regions.
390
401
  * * In the binary operation OP (union, intersection, parity, difference), the left and right operands
391
- * are each a composite union, difference, or parity among multiple inputs, i.e.
402
+ * are each a composite union, difference, or parity among multiple inputs, i.e.,
392
403
  * * (operationA among Ai) OP (operationB among Bi)
393
404
  * * where the Ai are one set of regions, being combined by operationA
394
- * * and the Bi are the another set of regions, being combined by operationB
395
- * * Each group of Ai and Bi is a `RegionGroup`
405
+ * * and the Bi are the another set of regions, being combined by operationB.
406
+ * * Each group of Ai and Bi is a `RegionGroup`.
396
407
  * * This is an extremely delicate structure.
397
408
  * * Members are public because of the unique variety of queries, but should only be used for queries.
398
409
  * * The graph and curves in the booleans are connected by an extended pointer chain:
399
- * * (HalfEdge in Graph).edgeTag points to a CurveLocationDetail
400
- * * (CurveLocationDetail).curve points to a curve
401
- * * (Curve).parent points to RegionGroupMember
402
- * * (RegionGroupMember) points to RegionGroup
403
- * * (RegionGroup) points to RegionBooleanBinaryContext
404
- * * So..when a graph sweep crosses an edge,
405
- * * the chain leads to a parity count in the RegionGroupMember
406
- * * that can change the number of members active in the RegionGroup
410
+ * * (HalfEdge in Graph).edgeTag points to a CurveLocationDetail.
411
+ * * (CurveLocationDetail).curve points to a curve.
412
+ * * (Curve).parent points to RegionGroupMember.
413
+ * * (RegionGroupMember) points to RegionGroup.
414
+ * * (RegionGroup) points to RegionBooleanBinaryContext.
415
+ * * So when a graph sweep crosses an edge
416
+ * * the chain leads to a parity count in the RegionGroupMember.
417
+ * * that can change the number of members active in the RegionGroup.
407
418
  * * which can change the state of the context.
408
419
  * @internal
409
420
  */
410
421
  export class RegionBooleanContext {
411
422
  groupA;
412
423
  groupB;
424
+ /** bridge edges */
413
425
  extraGeometry;
414
426
  graph;
415
427
  faceAreaFunction;
@@ -418,7 +430,7 @@ export class RegionBooleanContext {
418
430
  this.groupA = new RegionGroup(this, groupTypeA);
419
431
  this.groupB = new RegionGroup(this, groupTypeB);
420
432
  this.extraGeometry = new RegionGroup(this, RegionGroupOpType.NonBounding);
421
- this.binaryOp = RegionBinaryOpType.Union; // it will be revised on can calls.
433
+ this.binaryOp = RegionBinaryOpType.Union; // revised in runClassificationSweep
422
434
  }
423
435
  /**
424
436
  * Create a context with both A and B groups empty.
@@ -432,8 +444,6 @@ export class RegionBooleanContext {
432
444
  addMembers(dataA, dataB) {
433
445
  this.groupA.addMember(dataA);
434
446
  this.groupB.addMember(dataB);
435
- // const doConnectives = 1;
436
- // if (doConnectives !== 0)
437
447
  this.addConnectives();
438
448
  }
439
449
  _workSegment;
@@ -477,12 +487,12 @@ export class RegionBooleanContext {
477
487
  }
478
488
  const ray = Ray3d.createZero();
479
489
  for (const p of maxPoints) {
480
- // Make a line from...
481
- // 1) exactly the max point of the loops to
482
- // 2) a point clearly outside the big range
483
- // If p came from some inner loop this will...
484
- // 1) create a bridge from the inner loop through any containing loops (always)
485
- // 2) avoid crossing any containing loop at a vertex. (with high probability, but not absolutely always)
490
+ // Make a line from
491
+ // 1) exactly the max point of the loops to
492
+ // 2) a point clearly outside the big range
493
+ // If p came from some inner loop this will
494
+ // 1) create a bridge from the inner loop through any containing loops (always)
495
+ // 2) avoid crossing any containing loop at a vertex. (with high probability, but not absolutely always)
486
496
  const bridgeLength = margin + Ray3d.create(p, RegionBooleanContext._bridgeDirection, ray).intersectionWithRange3d(rangeAB).high;
487
497
  const outside = Point3d.createAdd2Scaled(p, 1.0, RegionBooleanContext._bridgeDirection, bridgeLength);
488
498
  const bridgeLine = LineSegment3d.createXYXY(p.x, p.y, outside.x, outside.y);
@@ -499,7 +509,7 @@ export class RegionBooleanContext {
499
509
  */
500
510
  annotateAndMergeCurvesInGraph(mergeTolerance = Geometry.smallMetricDistance) {
501
511
  const allPrimitives = [];
502
- // ASSUME loops have fine-grained types -- no linestrings !!
512
+ // ASSUME loops have fine-grained types (no linestrings)
503
513
  for (const group of [this.groupA, this.groupB, this.extraGeometry]) {
504
514
  for (const member of group.members) {
505
515
  let k = allPrimitives.length;
@@ -510,7 +520,6 @@ export class RegionBooleanContext {
510
520
  }
511
521
  }
512
522
  }
513
- // const range = RegionOps.curveArrayRange(allPrimitives);
514
523
  const intersections = CurveCurve.allIntersectionsAmongPrimitivesXY(allPrimitives, mergeTolerance);
515
524
  const graph = PlanarSubdivision.assembleHalfEdgeGraph(allPrimitives, intersections, mergeTolerance);
516
525
  this.graph = graph;
@@ -529,9 +538,8 @@ export class RegionBooleanContext {
529
538
  this._announceFaceFunction = announceFaceFunction;
530
539
  this.binaryOp = binaryOp;
531
540
  this.graph.clearMask(HalfEdgeMask.EXTERIOR);
532
- for (const group of [this.groupA, this.groupB]) {
541
+ for (const group of [this.groupA, this.groupB])
533
542
  group.clearState();
534
- }
535
543
  const faceHasBeenVisitedMask = this.graph.grabMask();
536
544
  const nodeHasBeenVisitedMask = this.graph.grabMask();
537
545
  const componentArray = GraphComponentArray.create(this.graph);
@@ -612,18 +620,19 @@ export class RegionBooleanContext {
612
620
  return undefined;
613
621
  }
614
622
  // obligations to act as sweep callback ...
615
- /** Announce a representative node on the outer face of a component */
623
+ /** Announce a representative node on the outer face of a component. */
616
624
  startComponent(outerFaceNode) {
617
625
  outerFaceNode.setMaskAroundFace(HalfEdgeMask.EXTERIOR);
618
626
  if (this._announceFaceFunction)
619
627
  this._announceFaceFunction(this.graph, outerFaceNode, -1, faceAreaFromCurvedEdgeData(outerFaceNode));
620
628
  return true;
621
629
  }
622
- /** Announce return to outer face */
630
+ /** Announce return to outer face. */
623
631
  finishComponent(_node) {
624
632
  return true;
625
633
  }
626
- /** Announce entry to a graph face.
634
+ /**
635
+ * Announce entry to a graph face.
627
636
  * * Both both sides of a graph edge are from the same RegionGroupMember.
628
637
  * * Hence "crossing that edge" changes the parity count for the RegionGroupMember that owns that edge by 1.
629
638
  * * The parity count for other RegionGroupMembers are never affected by this crossing.
@@ -644,8 +653,9 @@ export class RegionBooleanContext {
644
653
  return true;
645
654
  }
646
655
  }
647
- /** return xy area between a (part of a) curve and the x axis through a reference point.
648
- * If detail is undefined or does not have both start and end fractions, just do trapezoid area
656
+ /**
657
+ * Return xy area between (part of) a curve and the x axis through a reference point.
658
+ * If detail is undefined or does not have both start and end fractions, just do trapezoid area.
649
659
  */
650
660
  function areaUnderPartialCurveXY(detail, xyStart, xyEnd, referencePoint) {
651
661
  // area between trapezoid and axis
@@ -659,15 +669,21 @@ function areaUnderPartialCurveXY(detail, xyStart, xyEnd, referencePoint) {
659
669
  let areaToChord = 0.0;
660
670
  if (detail && detail.curve && detail.hasFraction1) {
661
671
  if (detail.curve instanceof LineSegment3d) {
662
- // ah .. nothing to do for a line segment
672
+ // nothing to do for a line segment
663
673
  }
664
674
  else if (detail.curve instanceof Arc3d) {
665
675
  areaToChord = detail.curve.areaToChordXY(detail.fraction, detail.fraction1);
666
676
  }
677
+ else {
678
+ const partial = detail.curve.clonePartialCurve(detail.fraction, detail.fraction1);
679
+ areaToChord = partial ?
680
+ RegionOps.computeXYArea(Loop.create(partial, LineSegment3d.create(detail.point1, detail.point))) ?? 0
681
+ : 0;
682
+ }
667
683
  }
668
684
  return trapezoidArea + areaToChord;
669
685
  }
670
- /** Compute face area for a face whose edges are decorated with CurveLocationDetail for their (partial) curves */
686
+ /** Compute face area for a face whose edges are decorated with CurveLocationDetail for their (partial) curves. */
671
687
  function faceAreaFromCurvedEdgeData(faceSeed) {
672
688
  let area = 0.0;
673
689
  let edge = faceSeed;
@@ -690,8 +706,7 @@ export class GraphComponent {
690
706
  this.faceAreas = [];
691
707
  }
692
708
  /**
693
- * visit all vertices and edges in the component to build face area array and composite range.
694
- *
709
+ * Visit all vertices and edges in the component to build face area array and composite range.
695
710
  * @param extendRangeForEdge optional function to compute edge range. If undefined, linear edge is assumed.
696
711
  * @param faceAreaFunction optional function to compute face area. If undefined, linear edges are assumed.
697
712
  */
@@ -715,7 +730,8 @@ export class GraphComponent {
715
730
  }
716
731
  }
717
732
  }
718
- /** build and hold an array of component data for a HalfEdgeGraph.
733
+ /**
734
+ * Build and hold an array of component data for a HalfEdgeGraph.
719
735
  * @internal
720
736
  */
721
737
  export class GraphComponentArray {