@itwin/core-geometry 5.0.0-dev.99 → 5.0.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 (444) hide show
  1. package/CHANGELOG.md +48 -1
  2. package/lib/cjs/Geometry.d.ts +15 -4
  3. package/lib/cjs/Geometry.d.ts.map +1 -1
  4. package/lib/cjs/Geometry.js +17 -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/BSplineSurface.d.ts +4 -3
  10. package/lib/cjs/bspline/BSplineSurface.d.ts.map +1 -1
  11. package/lib/cjs/bspline/BSplineSurface.js +6 -5
  12. package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
  13. package/lib/cjs/clipping/ClipPlane.d.ts +7 -5
  14. package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
  15. package/lib/cjs/clipping/ClipPlane.js +9 -5
  16. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  17. package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
  18. package/lib/cjs/clipping/ClipUtils.js +5 -3
  19. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  20. package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  21. package/lib/cjs/clipping/ConvexClipPlaneSet.js +12 -23
  22. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  23. package/lib/cjs/core-geometry.d.ts +1 -0
  24. package/lib/cjs/core-geometry.d.ts.map +1 -1
  25. package/lib/cjs/core-geometry.js +1 -0
  26. package/lib/cjs/core-geometry.js.map +1 -1
  27. package/lib/cjs/curve/Arc3d.d.ts +56 -32
  28. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  29. package/lib/cjs/curve/Arc3d.js +91 -36
  30. package/lib/cjs/curve/Arc3d.js.map +1 -1
  31. package/lib/cjs/curve/CurveCollection.d.ts +2 -0
  32. package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
  33. package/lib/cjs/curve/CurveCollection.js +14 -0
  34. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  35. package/lib/cjs/curve/CurveExtendMode.d.ts +13 -5
  36. package/lib/cjs/curve/CurveExtendMode.d.ts.map +1 -1
  37. package/lib/cjs/curve/CurveExtendMode.js +19 -15
  38. package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
  39. package/lib/cjs/curve/CurveLocationDetail.d.ts +1 -1
  40. package/lib/cjs/curve/CurveLocationDetail.js +1 -1
  41. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  42. package/lib/cjs/curve/CurvePrimitive.d.ts +67 -8
  43. package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
  44. package/lib/cjs/curve/CurvePrimitive.js +59 -6
  45. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  46. package/lib/cjs/curve/CurveTypes.d.ts +1 -1
  47. package/lib/cjs/curve/CurveTypes.js.map +1 -1
  48. package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
  49. package/lib/cjs/curve/LineSegment3d.js +1 -0
  50. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  51. package/lib/cjs/curve/LineString3d.d.ts +8 -7
  52. package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
  53. package/lib/cjs/curve/LineString3d.js +25 -22
  54. package/lib/cjs/curve/LineString3d.js.map +1 -1
  55. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  56. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js +10 -5
  57. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  58. package/lib/cjs/curve/Query/PlanarSubdivision.d.ts.map +1 -1
  59. package/lib/cjs/curve/Query/PlanarSubdivision.js +7 -2
  60. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  61. package/lib/cjs/curve/RegionMomentsXY.d.ts +15 -21
  62. package/lib/cjs/curve/RegionMomentsXY.d.ts.map +1 -1
  63. package/lib/cjs/curve/RegionMomentsXY.js +38 -58
  64. package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
  65. package/lib/cjs/curve/RegionOps.d.ts +70 -38
  66. package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
  67. package/lib/cjs/curve/RegionOps.js +115 -45
  68. package/lib/cjs/curve/RegionOps.js.map +1 -1
  69. package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts +12 -13
  70. package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
  71. package/lib/cjs/curve/RegionOpsClassificationSweeps.js +23 -23
  72. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  73. package/lib/cjs/curve/StrokeOptions.d.ts +1 -1
  74. package/lib/cjs/curve/StrokeOptions.js +1 -1
  75. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  76. package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.d.ts +71 -0
  77. package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.d.ts.map +1 -0
  78. package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.js +181 -0
  79. package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -0
  80. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.d.ts +21 -5
  81. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.d.ts.map +1 -1
  82. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js +42 -17
  83. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  84. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  85. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +36 -12
  86. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  87. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts +5 -3
  88. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts.map +1 -1
  89. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js +5 -3
  90. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  91. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
  92. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
  93. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js +34 -0
  94. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
  95. package/lib/cjs/geometry3d/AngleSweep.d.ts +25 -18
  96. package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
  97. package/lib/cjs/geometry3d/AngleSweep.js +39 -25
  98. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  99. package/lib/cjs/geometry3d/GeometryHandler.d.ts +15 -16
  100. package/lib/cjs/geometry3d/GeometryHandler.d.ts.map +1 -1
  101. package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
  102. package/lib/cjs/geometry3d/GrowableXYArray.d.ts +1 -1
  103. package/lib/cjs/geometry3d/GrowableXYArray.js +1 -1
  104. package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
  105. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +7 -2
  106. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  107. package/lib/cjs/geometry3d/GrowableXYZArray.js +20 -2
  108. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  109. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +2 -1
  110. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  111. package/lib/cjs/geometry3d/IndexedXYZCollection.js +7 -3
  112. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  113. package/lib/cjs/geometry3d/Matrix3d.d.ts +10 -11
  114. package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
  115. package/lib/cjs/geometry3d/Matrix3d.js +11 -12
  116. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  117. package/lib/cjs/geometry3d/Plane3d.d.ts +2 -0
  118. package/lib/cjs/geometry3d/Plane3d.d.ts.map +1 -1
  119. package/lib/cjs/geometry3d/Plane3d.js +6 -1
  120. package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
  121. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
  122. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
  123. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
  124. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  125. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
  126. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  127. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js +18 -10
  128. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  129. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +4 -4
  130. package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
  131. package/lib/cjs/geometry3d/Point3dVector3d.js +6 -6
  132. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  133. package/lib/cjs/geometry3d/PointHelpers.d.ts +7 -7
  134. package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
  135. package/lib/cjs/geometry3d/PointHelpers.js +66 -26
  136. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  137. package/lib/cjs/geometry3d/PolygonOps.d.ts +57 -9
  138. package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
  139. package/lib/cjs/geometry3d/PolygonOps.js +57 -17
  140. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  141. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
  142. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
  143. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
  144. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  145. package/lib/cjs/geometry3d/PolylineOps.d.ts +5 -4
  146. package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
  147. package/lib/cjs/geometry3d/PolylineOps.js +5 -4
  148. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  149. package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
  150. package/lib/cjs/geometry3d/Ray3d.js +11 -23
  151. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  152. package/lib/cjs/geometry3d/Transform.d.ts +21 -2
  153. package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
  154. package/lib/cjs/geometry3d/Transform.js +32 -13
  155. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  156. package/lib/cjs/geometry4d/Matrix4d.d.ts +7 -7
  157. package/lib/cjs/geometry4d/Matrix4d.d.ts.map +1 -1
  158. package/lib/cjs/geometry4d/Matrix4d.js +9 -9
  159. package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
  160. package/lib/cjs/geometry4d/MomentData.d.ts +32 -34
  161. package/lib/cjs/geometry4d/MomentData.d.ts.map +1 -1
  162. package/lib/cjs/geometry4d/MomentData.js +56 -57
  163. package/lib/cjs/geometry4d/MomentData.js.map +1 -1
  164. package/lib/cjs/geometry4d/Point4d.d.ts +8 -5
  165. package/lib/cjs/geometry4d/Point4d.d.ts.map +1 -1
  166. package/lib/cjs/geometry4d/Point4d.js +27 -16
  167. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  168. package/lib/cjs/polyface/FacetOrientation.d.ts +1 -1
  169. package/lib/cjs/polyface/FacetOrientation.js +2 -2
  170. package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
  171. package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts +55 -40
  172. package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
  173. package/lib/cjs/polyface/IndexedEdgeMatcher.js +83 -75
  174. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  175. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
  176. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  177. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +47 -38
  178. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  179. package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts +26 -19
  180. package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
  181. package/lib/cjs/polyface/IndexedPolyfaceWalker.js +47 -32
  182. package/lib/cjs/polyface/IndexedPolyfaceWalker.js.map +1 -1
  183. package/lib/cjs/polyface/Polyface.d.ts +19 -5
  184. package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
  185. package/lib/cjs/polyface/Polyface.js +18 -2
  186. package/lib/cjs/polyface/Polyface.js.map +1 -1
  187. package/lib/cjs/polyface/PolyfaceBuilder.d.ts +1 -1
  188. package/lib/cjs/polyface/PolyfaceBuilder.js +3 -3
  189. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  190. package/lib/cjs/polyface/PolyfaceClip.d.ts +19 -18
  191. package/lib/cjs/polyface/PolyfaceClip.d.ts.map +1 -1
  192. package/lib/cjs/polyface/PolyfaceClip.js +39 -42
  193. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  194. package/lib/cjs/polyface/PolyfaceData.d.ts +1 -1
  195. package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
  196. package/lib/cjs/polyface/PolyfaceData.js +3 -1
  197. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  198. package/lib/cjs/polyface/PolyfaceQuery.d.ts +119 -78
  199. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  200. package/lib/cjs/polyface/PolyfaceQuery.js +315 -231
  201. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  202. package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
  203. package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
  204. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js +3 -3
  205. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  206. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
  207. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
  208. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
  209. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  210. package/lib/cjs/serialization/GeometrySamples.d.ts +1 -1
  211. package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
  212. package/lib/cjs/serialization/GeometrySamples.js +1 -1
  213. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  214. package/lib/cjs/serialization/IModelJsonSchema.d.ts +3 -3
  215. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  216. package/lib/cjs/topology/ChainMerge.d.ts +1 -1
  217. package/lib/cjs/topology/ChainMerge.js +1 -1
  218. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  219. package/lib/cjs/topology/Triangulation.d.ts +3 -3
  220. package/lib/cjs/topology/Triangulation.d.ts.map +1 -1
  221. package/lib/cjs/topology/Triangulation.js +7 -7
  222. package/lib/cjs/topology/Triangulation.js.map +1 -1
  223. package/lib/esm/Geometry.d.ts +15 -4
  224. package/lib/esm/Geometry.d.ts.map +1 -1
  225. package/lib/esm/Geometry.js +17 -3
  226. package/lib/esm/Geometry.js.map +1 -1
  227. package/lib/esm/bspline/BSpline1dNd.d.ts +1 -1
  228. package/lib/esm/bspline/BSpline1dNd.js +1 -1
  229. package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
  230. package/lib/esm/bspline/BSplineSurface.d.ts +4 -3
  231. package/lib/esm/bspline/BSplineSurface.d.ts.map +1 -1
  232. package/lib/esm/bspline/BSplineSurface.js +6 -5
  233. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  234. package/lib/esm/clipping/ClipPlane.d.ts +7 -5
  235. package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
  236. package/lib/esm/clipping/ClipPlane.js +9 -5
  237. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  238. package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
  239. package/lib/esm/clipping/ClipUtils.js +5 -3
  240. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  241. package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  242. package/lib/esm/clipping/ConvexClipPlaneSet.js +12 -23
  243. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  244. package/lib/esm/core-geometry.d.ts +1 -0
  245. package/lib/esm/core-geometry.d.ts.map +1 -1
  246. package/lib/esm/core-geometry.js +1 -0
  247. package/lib/esm/core-geometry.js.map +1 -1
  248. package/lib/esm/curve/Arc3d.d.ts +56 -32
  249. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  250. package/lib/esm/curve/Arc3d.js +91 -36
  251. package/lib/esm/curve/Arc3d.js.map +1 -1
  252. package/lib/esm/curve/CurveCollection.d.ts +2 -0
  253. package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
  254. package/lib/esm/curve/CurveCollection.js +14 -0
  255. package/lib/esm/curve/CurveCollection.js.map +1 -1
  256. package/lib/esm/curve/CurveExtendMode.d.ts +13 -5
  257. package/lib/esm/curve/CurveExtendMode.d.ts.map +1 -1
  258. package/lib/esm/curve/CurveExtendMode.js +19 -15
  259. package/lib/esm/curve/CurveExtendMode.js.map +1 -1
  260. package/lib/esm/curve/CurveLocationDetail.d.ts +1 -1
  261. package/lib/esm/curve/CurveLocationDetail.js +1 -1
  262. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  263. package/lib/esm/curve/CurvePrimitive.d.ts +67 -8
  264. package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
  265. package/lib/esm/curve/CurvePrimitive.js +59 -6
  266. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  267. package/lib/esm/curve/CurveTypes.d.ts +1 -1
  268. package/lib/esm/curve/CurveTypes.js.map +1 -1
  269. package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
  270. package/lib/esm/curve/LineSegment3d.js +1 -0
  271. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  272. package/lib/esm/curve/LineString3d.d.ts +8 -7
  273. package/lib/esm/curve/LineString3d.d.ts.map +1 -1
  274. package/lib/esm/curve/LineString3d.js +25 -22
  275. package/lib/esm/curve/LineString3d.js.map +1 -1
  276. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  277. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js +10 -5
  278. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  279. package/lib/esm/curve/Query/PlanarSubdivision.d.ts.map +1 -1
  280. package/lib/esm/curve/Query/PlanarSubdivision.js +7 -2
  281. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  282. package/lib/esm/curve/RegionMomentsXY.d.ts +15 -21
  283. package/lib/esm/curve/RegionMomentsXY.d.ts.map +1 -1
  284. package/lib/esm/curve/RegionMomentsXY.js +38 -58
  285. package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
  286. package/lib/esm/curve/RegionOps.d.ts +70 -38
  287. package/lib/esm/curve/RegionOps.d.ts.map +1 -1
  288. package/lib/esm/curve/RegionOps.js +116 -46
  289. package/lib/esm/curve/RegionOps.js.map +1 -1
  290. package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts +12 -13
  291. package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
  292. package/lib/esm/curve/RegionOpsClassificationSweeps.js +23 -23
  293. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  294. package/lib/esm/curve/StrokeOptions.d.ts +1 -1
  295. package/lib/esm/curve/StrokeOptions.js +1 -1
  296. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  297. package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.d.ts +71 -0
  298. package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.d.ts.map +1 -0
  299. package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js +177 -0
  300. package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -0
  301. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.d.ts +21 -5
  302. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.d.ts.map +1 -1
  303. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js +42 -17
  304. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  305. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  306. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +36 -12
  307. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  308. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts +5 -3
  309. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts.map +1 -1
  310. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js +5 -3
  311. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  312. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
  313. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
  314. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js +30 -0
  315. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
  316. package/lib/esm/geometry3d/AngleSweep.d.ts +25 -18
  317. package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
  318. package/lib/esm/geometry3d/AngleSweep.js +39 -25
  319. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  320. package/lib/esm/geometry3d/GeometryHandler.d.ts +15 -16
  321. package/lib/esm/geometry3d/GeometryHandler.d.ts.map +1 -1
  322. package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
  323. package/lib/esm/geometry3d/GrowableXYArray.d.ts +1 -1
  324. package/lib/esm/geometry3d/GrowableXYArray.js +1 -1
  325. package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
  326. package/lib/esm/geometry3d/GrowableXYZArray.d.ts +7 -2
  327. package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  328. package/lib/esm/geometry3d/GrowableXYZArray.js +20 -2
  329. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  330. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +2 -1
  331. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  332. package/lib/esm/geometry3d/IndexedXYZCollection.js +7 -3
  333. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  334. package/lib/esm/geometry3d/Matrix3d.d.ts +10 -11
  335. package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
  336. package/lib/esm/geometry3d/Matrix3d.js +11 -12
  337. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  338. package/lib/esm/geometry3d/Plane3d.d.ts +2 -0
  339. package/lib/esm/geometry3d/Plane3d.d.ts.map +1 -1
  340. package/lib/esm/geometry3d/Plane3d.js +6 -1
  341. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  342. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
  343. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
  344. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
  345. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  346. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
  347. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  348. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js +18 -10
  349. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  350. package/lib/esm/geometry3d/Point3dVector3d.d.ts +4 -4
  351. package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
  352. package/lib/esm/geometry3d/Point3dVector3d.js +6 -6
  353. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  354. package/lib/esm/geometry3d/PointHelpers.d.ts +7 -7
  355. package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
  356. package/lib/esm/geometry3d/PointHelpers.js +66 -26
  357. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  358. package/lib/esm/geometry3d/PolygonOps.d.ts +57 -9
  359. package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
  360. package/lib/esm/geometry3d/PolygonOps.js +57 -17
  361. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  362. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
  363. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
  364. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
  365. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  366. package/lib/esm/geometry3d/PolylineOps.d.ts +5 -4
  367. package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
  368. package/lib/esm/geometry3d/PolylineOps.js +5 -4
  369. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  370. package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
  371. package/lib/esm/geometry3d/Ray3d.js +11 -23
  372. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  373. package/lib/esm/geometry3d/Transform.d.ts +21 -2
  374. package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
  375. package/lib/esm/geometry3d/Transform.js +32 -13
  376. package/lib/esm/geometry3d/Transform.js.map +1 -1
  377. package/lib/esm/geometry4d/Matrix4d.d.ts +7 -7
  378. package/lib/esm/geometry4d/Matrix4d.d.ts.map +1 -1
  379. package/lib/esm/geometry4d/Matrix4d.js +9 -9
  380. package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
  381. package/lib/esm/geometry4d/MomentData.d.ts +32 -34
  382. package/lib/esm/geometry4d/MomentData.d.ts.map +1 -1
  383. package/lib/esm/geometry4d/MomentData.js +56 -57
  384. package/lib/esm/geometry4d/MomentData.js.map +1 -1
  385. package/lib/esm/geometry4d/Point4d.d.ts +8 -5
  386. package/lib/esm/geometry4d/Point4d.d.ts.map +1 -1
  387. package/lib/esm/geometry4d/Point4d.js +27 -16
  388. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  389. package/lib/esm/polyface/FacetOrientation.d.ts +1 -1
  390. package/lib/esm/polyface/FacetOrientation.js +2 -2
  391. package/lib/esm/polyface/FacetOrientation.js.map +1 -1
  392. package/lib/esm/polyface/IndexedEdgeMatcher.d.ts +55 -40
  393. package/lib/esm/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
  394. package/lib/esm/polyface/IndexedEdgeMatcher.js +83 -75
  395. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  396. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
  397. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  398. package/lib/esm/polyface/IndexedPolyfaceVisitor.js +47 -38
  399. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  400. package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts +26 -19
  401. package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
  402. package/lib/esm/polyface/IndexedPolyfaceWalker.js +47 -32
  403. package/lib/esm/polyface/IndexedPolyfaceWalker.js.map +1 -1
  404. package/lib/esm/polyface/Polyface.d.ts +19 -5
  405. package/lib/esm/polyface/Polyface.d.ts.map +1 -1
  406. package/lib/esm/polyface/Polyface.js +18 -2
  407. package/lib/esm/polyface/Polyface.js.map +1 -1
  408. package/lib/esm/polyface/PolyfaceBuilder.d.ts +1 -1
  409. package/lib/esm/polyface/PolyfaceBuilder.js +3 -3
  410. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  411. package/lib/esm/polyface/PolyfaceClip.d.ts +19 -18
  412. package/lib/esm/polyface/PolyfaceClip.d.ts.map +1 -1
  413. package/lib/esm/polyface/PolyfaceClip.js +39 -42
  414. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  415. package/lib/esm/polyface/PolyfaceData.d.ts +1 -1
  416. package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
  417. package/lib/esm/polyface/PolyfaceData.js +3 -1
  418. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  419. package/lib/esm/polyface/PolyfaceQuery.d.ts +119 -78
  420. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  421. package/lib/esm/polyface/PolyfaceQuery.js +316 -232
  422. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  423. package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
  424. package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
  425. package/lib/esm/polyface/RangeTree/RangeTreeNode.js +3 -3
  426. package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  427. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
  428. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
  429. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
  430. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  431. package/lib/esm/serialization/GeometrySamples.d.ts +1 -1
  432. package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
  433. package/lib/esm/serialization/GeometrySamples.js +1 -1
  434. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  435. package/lib/esm/serialization/IModelJsonSchema.d.ts +3 -3
  436. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  437. package/lib/esm/topology/ChainMerge.d.ts +1 -1
  438. package/lib/esm/topology/ChainMerge.js +1 -1
  439. package/lib/esm/topology/ChainMerge.js.map +1 -1
  440. package/lib/esm/topology/Triangulation.d.ts +3 -3
  441. package/lib/esm/topology/Triangulation.d.ts.map +1 -1
  442. package/lib/esm/topology/Triangulation.js +7 -7
  443. package/lib/esm/topology/Triangulation.js.map +1 -1
  444. package/package.json +3 -3
@@ -2,6 +2,7 @@ import { GrowableXYZArray } from "../geometry3d/GrowableXYZArray";
2
2
  import { IndexedXYZCollection, MultiLineStringDataVariant } from "../geometry3d/IndexedXYZCollection";
3
3
  import { Point3d } from "../geometry3d/Point3dVector3d";
4
4
  import { Range3d } from "../geometry3d/Range";
5
+ import { Ray3d } from "../geometry3d/Ray3d";
5
6
  import { Transform } from "../geometry3d/Transform";
6
7
  import { MomentData } from "../geometry4d/MomentData";
7
8
  import { IndexedPolyface, Polyface } from "../polyface/Polyface";
@@ -35,42 +36,59 @@ export declare enum RegionBinaryOpType {
35
36
  }
36
37
  /**
37
38
  * Class `RegionOps` has static members for calculations on regions (areas).
38
- * * Regions are represented by these `CurveCollection` subclasses:
39
- * * `Loop` -- a single loop
40
- * * `ParityRegion` -- a collection of loops, interpreted by parity rules.
41
- * The common "One outer loop and many Inner loops" is a parity region.
42
- * * `UnionRegion` -- a collection of `Loop` and `ParityRegion` objects understood as a (probably disjoint) union.
43
- * * **NOTE:** Most of the methods in this class ignore z-coordinates, so callers should ensure that input geometry has
44
- * been rotated parallel to the xy-plane.
39
+ * * Regions are represented by these [[CurveCollection]] subclasses:
40
+ * * [[Loop]] -- a single loop
41
+ * * [[ParityRegion]] -- a collection of loops, interpreted by parity rules.
42
+ * The common "One outer loop and many inner loops" is a parity region.
43
+ * * [[UnionRegion]] -- a collection of `Loop` and `ParityRegion` objects understood as a (probably disjoint) union.
44
+ * * Most of the methods in this class:
45
+ * * Ignore z-coordinates, so callers should ensure that input geometry has been rotated parallel to the xy-plane.
46
+ * * Assume consistent Loop orientation: "solid" Loops are counterclockwise; "hole" Loops are clockwise.
45
47
  * @public
46
48
  */
47
49
  export declare class RegionOps {
48
50
  /**
49
51
  * Return moment sums for a loop, parity region, or union region.
52
+ * * The input region should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
50
53
  * * If `rawMomentData` is the MomentData returned by computeXYAreaMoments, convert to principal axes and moments with
51
- * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes (rawMomentData.origin, rawMomentData.sums);`
52
- * @param root any Loop, ParityRegion, or UnionRegion.
54
+ * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes(rawMomentData.origin, rawMomentData.sums);`
55
+ * * `rawMomentData.origin` is the centroid of `region`.
56
+ * * `rawMomentData.sums.weight()` is the signed area of `region`.
57
+ * @param region any [[Loop]], [[ParityRegion]], or [[UnionRegion]].
53
58
  */
54
- static computeXYAreaMoments(root: AnyRegion): MomentData | undefined;
59
+ static computeXYAreaMoments(region: AnyRegion): MomentData | undefined;
55
60
  /**
56
61
  * Return an area tolerance for a given xy-range and optional distance tolerance.
57
- * @param range range of planar region to tolerance
58
- * @param distanceTolerance optional absolute distance tolerance
62
+ * @param range range of planar region to tolerance.
63
+ * @param distanceTolerance optional absolute distance tolerance.
59
64
  */
60
65
  static computeXYAreaTolerance(range: Range3d, distanceTolerance?: number): number;
61
66
  /**
62
67
  * Return a (signed) xy area for a region.
68
+ * * The input region should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
63
69
  * * The area is negative if and only if the region is oriented clockwise with respect to the positive z-axis.
64
- * @param root any Loop, ParityRegion, or UnionRegion.
70
+ * @param region any [[Loop]], [[ParityRegion]], or [[UnionRegion]].
65
71
  */
66
- static computeXYArea(root: AnyRegion): number | undefined;
72
+ static computeXYArea(region: AnyRegion): number | undefined;
67
73
  /**
68
74
  * Return MomentData with the sums of wire moments.
75
+ * * The input curve should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
69
76
  * * If `rawMomentData` is the MomentData returned by computeXYAreaMoments, convert to principal axes and moments with
70
- * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes (rawMomentData.origin, rawMomentData.sums);`
71
- * @param root any CurveCollection or CurvePrimitive.
77
+ * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes (rawMomentData.origin, rawMomentData.sums);`
78
+ * * `rawMomentData.origin` is the wire centroid of `curve`.
79
+ * * `rawMomentData.sums.weight()` is the signed length of `curve`.
80
+ * @param curve any [[CurveCollection]] or [[CurvePrimitive]].
72
81
  */
73
- static computeXYZWireMomentSums(root: AnyCurve): MomentData | undefined;
82
+ static computeXYZWireMomentSums(curve: AnyCurve): MomentData | undefined;
83
+ /**
84
+ * Return a [[Ray3d]] with:
85
+ * * `origin` is the centroid of the region,
86
+ * * `direction` is a unit vector perpendicular to the region plane,
87
+ * * `a` is the region area.
88
+ * @param region the region to process. Can lie in any plane.
89
+ * @param result optional pre-allocated result to populate and return.
90
+ */
91
+ static centroidAreaNormal(region: AnyRegion, result?: Ray3d): Ray3d | undefined;
74
92
  /**
75
93
  * Create loops in the graph.
76
94
  * @internal
@@ -119,12 +137,25 @@ export declare class RegionOps {
119
137
  * @param triangulate whether to triangulate the result
120
138
  */
121
139
  static polygonXYAreaDifferenceLoopsToPolyface(loopsA: MultiLineStringDataVariant, loopsB: MultiLineStringDataVariant, triangulate?: boolean): Polyface | undefined;
140
+ /**
141
+ * Simplify the type of the region by stripping redundant parent(s).
142
+ * * No Boolean operations are performed.
143
+ * * Invalid inputs (such as childless regions) are not corrected.
144
+ * @param region region to simplify
145
+ * @returns
146
+ * * For a [[UnionRegion]] with exactly one child, return it if it is a [[Loop]],
147
+ * or if it is a [[ParityRegion]] with multiple children, otherwise return the `ParityRegion`'s `Loop`.
148
+ * * For a `ParityRegion` with exactly one `Loop`, return it.
149
+ * * All other inputs returned unchanged.
150
+ */
151
+ static simplifyRegionType(region: AnyRegion): AnyRegion;
122
152
  /**
123
153
  * Return areas defined by a boolean operation.
124
- * * If there are multiple regions in loopsA, they are treated as a union.
125
- * * If there are multiple regions in loopsB, they are treated as a union.
126
- * @param loopsA first set of loops
127
- * @param loopsB second set of loops
154
+ * @note For best results, input regions should have correctly oriented loops. See [[sortOuterAndHoleLoopsXY]].
155
+ * @note A common use case of this method is to convert a region with overlapping children into one with
156
+ * non-overlapping children: `regionOut = RegionOps.regionBooleanXY(regionIn, undefined, RegionBinaryOpType.Union)`.
157
+ * @param loopsA first set of loops (treated as a union)
158
+ * @param loopsB second set of loops (treated as a union)
128
159
  * @param operation indicates Union, Intersection, Parity, AMinusB, or BMinusA
129
160
  * @param mergeTolerance absolute distance tolerance for merging loops
130
161
  * @returns a region resulting from merging input loops and the boolean operation. May contain bridge edges added
@@ -282,14 +313,15 @@ export declare class RegionOps {
282
313
  */
283
314
  static consolidateAdjacentPrimitives(curves: CurveCollection, options?: ConsolidateAdjacentCurvePrimitivesOptions): void;
284
315
  /**
285
- * Reverse and reorder loops in the xy-plane for consistency and containment.
286
- * @param loops multiple loops in any order and orientation, z-coordinates ignored
316
+ * Reverse and reorder loops in the xy-plane for consistent orientation and containment.
317
+ * @param loops multiple loops in any order and orientation, z-coordinates ignored.
318
+ * * For best results, all overlaps should be containments, i.e., loop boundaries can touch, but should not cross.
287
319
  * @returns a region that captures the input pointers. This region is a:
288
- * * `Loop` if there is exactly one input loop. It is oriented counterclockwise.
289
- * * `ParityRegion` if input consists of exactly one outer loop with at least one hole loop.
320
+ * * [[Loop]] if there is exactly one input loop. It is oriented counterclockwise.
321
+ * * [[ParityRegion]] if input consists of exactly one outer loop with at least one hole loop.
290
322
  * Its first child is an outer loop oriented counterclockwise; all subsequent children are holes oriented
291
323
  * clockwise.
292
- * * `UnionRegion` if any other input configuration. Its children are individually ordered/oriented as in
324
+ * * [[UnionRegion]] if any other input configuration. Its children are individually ordered/oriented as in
293
325
  * the above cases.
294
326
  * @see [[PolygonOps.sortOuterAndHoleLoopsXY]]
295
327
  */
@@ -298,14 +330,14 @@ export declare class RegionOps {
298
330
  * Find all xy-areas bounded by the unstructured, possibly intersecting curves.
299
331
  * * For best results, input curves should be parallel to the xy-plane, as z-coordinates are ignored.
300
332
  * * A common use case of this method is to assemble the bounding "exterior" loop (or loops) containing the
301
- * input curves.
333
+ * input curves. Note that "holes" implied by inputs are _not_ preserved in output.
302
334
  * * This method does not add bridge edges to connect outer loops to inner loops. Each disconnected loop,
303
335
  * regardless of its containment, is returned as its own SignedLoops object. Pre-process with [[regionBooleanXY]]
304
336
  * to add bridge edges so that [[constructAllXYRegionLoops]] will return outer and inner loops in the same
305
337
  * SignedLoops object.
306
338
  * @param curvesAndRegions Any collection of curves. Each Loop/ParityRegion/UnionRegion contributes its curve
307
- * primitives.
308
- * @param tolerance optional distance tolerance for coincidence
339
+ * primitives, stripped of parity context. This means holes are _not_ preserved in output.
340
+ * @param tolerance optional distance tolerance for coincidence.
309
341
  * @returns array of [[SignedLoops]], each entry of which describes the faces in a single connected component:
310
342
  * * `positiveAreaLoops` contains "interior" loops, _including holes in ParityRegion input_. These loops have
311
343
  * positive area and counterclockwise orientation.
@@ -357,12 +389,10 @@ export declare class RegionOps {
357
389
  private static triangulateRegionComponent;
358
390
  /**
359
391
  * Facet the region according to stroke options.
392
+ * @note For best results, [[UnionRegion]] input should consist of non-overlapping children. See [[regionBooleanXY]].
393
+ * @note For best results, [[ParityRegion]] input should be correctly oriented. See [[sortOuterAndHoleLoopsXY]].
360
394
  * @param region a closed xy-planar region, possibly with holes.
361
395
  * * The z-coordinates of the region are ignored. Caller is responsible for rotating the region into plane local coordinates beforehand, and reversing the rotation afterwards.
362
- * * For best results, `UnionRegion` input should consist of non-overlapping children.
363
- * Caller can ensure this by passing in `region = RegionOps.regionBooleanXY(unionRegion, undefined, RegionBinaryOpType.Union)`.
364
- * * For best results, `ParityRegion` input should be correctly oriented (holes have opposite orientation to their containing loop).
365
- * Caller can ensure this for non-intersecting loops by passing in `region = RegionOps.sortOuterAndHoleLoopsXY(loops)`.
366
396
  * @param options primarily how to stroke the region boundary, but also how to facet the region interior.
367
397
  * * By default, a triangulation is returned, but if `options.maximizeConvexFacets === true`, edges between coplanar triangles are removed to return maximally convex facets.
368
398
  * @returns facets for the region, or undefined if facetting failed
@@ -377,17 +407,19 @@ export declare class RegionOps {
377
407
  static convexDecomposePolygonXY(polygon: MultiLineStringDataVariant, maximize?: boolean): GrowableXYZArray[] | undefined;
378
408
  }
379
409
  /**
380
- * * Options to control method `RegionOps.consolidateAdjacentPrimitives`
410
+ * * Options to control method `RegionOps.consolidateAdjacentPrimitives`.
381
411
  * @public
382
412
  */
383
413
  export declare class ConsolidateAdjacentCurvePrimitivesOptions {
384
- /** True to consolidate adjacent linear geometry into a single LineString3d */
414
+ /** True to consolidate adjacent linear geometry into a single LineString3d. */
385
415
  consolidateLinearGeometry: boolean;
386
- /** True to consolidate contiguous compatible arcs into a single Arc3d */
416
+ /** True to consolidate contiguous compatible arcs into a single Arc3d. */
387
417
  consolidateCompatibleArcs: boolean;
388
- /** Tolerance for collapsing identical points */
418
+ /** Disable LineSegment3d and LineString3d point compression. */
419
+ disableLinearCompression?: boolean;
420
+ /** Tolerance for collapsing identical points (if `!disableLinearCompression`). */
389
421
  duplicatePointTolerance: number;
390
- /** Tolerance for removing interior colinear points. */
422
+ /** Tolerance for removing interior colinear points (if `!disableLinearCompression`). */
391
423
  colinearPointTolerance: number;
392
424
  }
393
425
  //# sourceMappingURL=RegionOps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RegionOps.d.ts","sourceRoot":"","sources":["../../../src/curve/RegionOps.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,M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;;;;OAUG;WACW,sBAAsB,CAClC,UAAU,EAAE,QAAQ,GAAG,QAAQ,EAAE,EACjC,cAAc,CAAC,EAAE,cAAc,EAAE,EACjC,0BAA0B,GAAE,OAAe,EAC3C,kBAAkB,GAAE,OAAe,GAClC,cAAc,EAAE;IAanB;;;;;OAKG;WACW,iBAAiB,CAAC,UAAU,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE;IAe/E;;;;OAIG;WACW,eAAe,CAAC,IAAI,EAAE,GAAG,EAAE,YAAY,CAAC,EAAE,SAAS,GAAG,OAAO;IAkB3E;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,iCAAiC;IAqChD,oCAAoC;IACpC,OAAO,CAAC,MAAM,CAAC,qBAAqB;IAepC;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,0BAA0B;IAIzC;;;;;;;;;OASG;WACW,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,eAAe,GAAG,SAAS;IAyBpG;;;;;MAKE;WACY,wBAAwB,CAAC,OAAO,EAAE,0BAA0B,EAAE,QAAQ,GAAE,OAAc,GAAG,gBAAgB,EAAE,GAAG,SAAS;CActI;AAaD;;;GAGG;AACH,qBAAa,yCAAyC;IACpD,+EAA+E;IACxE,yBAAyB,EAAE,OAAO,CAAQ;IACjD,0EAA0E;IACnE,yBAAyB,EAAE,OAAO,CAAQ;IACjD,gEAAgE;IACzD,wBAAwB,CAAC,EAAE,OAAO,CAAS;IAClD,kFAAkF;IAC3E,uBAAuB,EAAE,MAAM,CAAgC;IACtE,wFAAwF;IACjF,sBAAsB,EAAE,MAAM,CAAgC;CACtE"}
@@ -6,13 +6,15 @@
6
6
  * @module Curve
7
7
  */
8
8
  import { Geometry } from "../Geometry";
9
+ import { FrameBuilder } from "../geometry3d/FrameBuilder";
9
10
  import { GrowableXYZArray } from "../geometry3d/GrowableXYZArray";
10
11
  import { IndexedReadWriteXYZCollection, IndexedXYZCollection, } from "../geometry3d/IndexedXYZCollection";
11
12
  import { Point3dArrayCarrier } from "../geometry3d/Point3dArrayCarrier";
12
- import { Point3d } from "../geometry3d/Point3dVector3d";
13
+ import { Point3d, Vector3d } from "../geometry3d/Point3dVector3d";
13
14
  import { PolygonOps } from "../geometry3d/PolygonOps";
14
15
  import { PolylineCompressionContext } from "../geometry3d/PolylineCompressionByEdgeOffset";
15
16
  import { Range3d } from "../geometry3d/Range";
17
+ import { Ray3d } from "../geometry3d/Ray3d";
16
18
  import { SortablePolygon } from "../geometry3d/SortablePolygon";
17
19
  import { Transform } from "../geometry3d/Transform";
18
20
  import { MomentData } from "../geometry4d/MomentData";
@@ -29,6 +31,7 @@ import { CurveWireMomentsXYZ } from "./CurveWireMomentsXYZ";
29
31
  import { GeometryQuery } from "./GeometryQuery";
30
32
  import { ChainCollectorContext } from "./internalContexts/ChainCollectorContext";
31
33
  import { PolygonWireOffsetContext } from "./internalContexts/PolygonOffsetContext";
34
+ import { TransferWithSplitArcs } from "./internalContexts/TransferWithSplitArcs";
32
35
  import { LineString3d } from "./LineString3d";
33
36
  import { Loop } from "./Loop";
34
37
  import { OffsetOptions } from "./OffsetOptions";
@@ -55,25 +58,29 @@ export var RegionBinaryOpType;
55
58
  })(RegionBinaryOpType || (RegionBinaryOpType = {}));
56
59
  /**
57
60
  * Class `RegionOps` has static members for calculations on regions (areas).
58
- * * Regions are represented by these `CurveCollection` subclasses:
59
- * * `Loop` -- a single loop
60
- * * `ParityRegion` -- a collection of loops, interpreted by parity rules.
61
- * The common "One outer loop and many Inner loops" is a parity region.
62
- * * `UnionRegion` -- a collection of `Loop` and `ParityRegion` objects understood as a (probably disjoint) union.
63
- * * **NOTE:** Most of the methods in this class ignore z-coordinates, so callers should ensure that input geometry has
64
- * been rotated parallel to the xy-plane.
61
+ * * Regions are represented by these [[CurveCollection]] subclasses:
62
+ * * [[Loop]] -- a single loop
63
+ * * [[ParityRegion]] -- a collection of loops, interpreted by parity rules.
64
+ * The common "One outer loop and many inner loops" is a parity region.
65
+ * * [[UnionRegion]] -- a collection of `Loop` and `ParityRegion` objects understood as a (probably disjoint) union.
66
+ * * Most of the methods in this class:
67
+ * * Ignore z-coordinates, so callers should ensure that input geometry has been rotated parallel to the xy-plane.
68
+ * * Assume consistent Loop orientation: "solid" Loops are counterclockwise; "hole" Loops are clockwise.
65
69
  * @public
66
70
  */
67
71
  export class RegionOps {
68
72
  /**
69
73
  * Return moment sums for a loop, parity region, or union region.
74
+ * * The input region should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
70
75
  * * If `rawMomentData` is the MomentData returned by computeXYAreaMoments, convert to principal axes and moments with
71
- * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes (rawMomentData.origin, rawMomentData.sums);`
72
- * @param root any Loop, ParityRegion, or UnionRegion.
76
+ * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes(rawMomentData.origin, rawMomentData.sums);`
77
+ * * `rawMomentData.origin` is the centroid of `region`.
78
+ * * `rawMomentData.sums.weight()` is the signed area of `region`.
79
+ * @param region any [[Loop]], [[ParityRegion]], or [[UnionRegion]].
73
80
  */
74
- static computeXYAreaMoments(root) {
81
+ static computeXYAreaMoments(region) {
75
82
  const handler = new RegionMomentsXY();
76
- const result = root.dispatchToGeometryHandler(handler);
83
+ const result = region.dispatchToGeometryHandler(handler);
77
84
  if (result instanceof MomentData) {
78
85
  result.shiftOriginAndSumsToCentroidOfSums();
79
86
  return result;
@@ -82,8 +89,8 @@ export class RegionOps {
82
89
  }
83
90
  /**
84
91
  * Return an area tolerance for a given xy-range and optional distance tolerance.
85
- * @param range range of planar region to tolerance
86
- * @param distanceTolerance optional absolute distance tolerance
92
+ * @param range range of planar region to tolerance.
93
+ * @param distanceTolerance optional absolute distance tolerance.
87
94
  */
88
95
  static computeXYAreaTolerance(range, distanceTolerance = Geometry.smallMetricDistance) {
89
96
  // if A = bh and e is distance tolerance, then A' := (b+e/2)(h+e/2) = A + e/2(b+h+e/2), so A'-A = e/2(b+h+e/2).
@@ -92,12 +99,13 @@ export class RegionOps {
92
99
  }
93
100
  /**
94
101
  * Return a (signed) xy area for a region.
102
+ * * The input region should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
95
103
  * * The area is negative if and only if the region is oriented clockwise with respect to the positive z-axis.
96
- * @param root any Loop, ParityRegion, or UnionRegion.
104
+ * @param region any [[Loop]], [[ParityRegion]], or [[UnionRegion]].
97
105
  */
98
- static computeXYArea(root) {
106
+ static computeXYArea(region) {
99
107
  const handler = new RegionMomentsXY();
100
- const result = root.dispatchToGeometryHandler(handler);
108
+ const result = region.dispatchToGeometryHandler(handler);
101
109
  if (result instanceof MomentData) {
102
110
  return result.quantitySum;
103
111
  }
@@ -105,17 +113,56 @@ export class RegionOps {
105
113
  }
106
114
  /**
107
115
  * Return MomentData with the sums of wire moments.
116
+ * * The input curve should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
108
117
  * * If `rawMomentData` is the MomentData returned by computeXYAreaMoments, convert to principal axes and moments with
109
- * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes (rawMomentData.origin, rawMomentData.sums);`
110
- * @param root any CurveCollection or CurvePrimitive.
118
+ * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes (rawMomentData.origin, rawMomentData.sums);`
119
+ * * `rawMomentData.origin` is the wire centroid of `curve`.
120
+ * * `rawMomentData.sums.weight()` is the signed length of `curve`.
121
+ * @param curve any [[CurveCollection]] or [[CurvePrimitive]].
111
122
  */
112
- static computeXYZWireMomentSums(root) {
123
+ static computeXYZWireMomentSums(curve) {
113
124
  const handler = new CurveWireMomentsXYZ();
114
- handler.visitLeaves(root);
125
+ handler.visitLeaves(curve);
115
126
  const result = handler.momentData;
116
127
  result.shiftOriginAndSumsToCentroidOfSums();
117
128
  return result;
118
129
  }
130
+ /**
131
+ * Return a [[Ray3d]] with:
132
+ * * `origin` is the centroid of the region,
133
+ * * `direction` is a unit vector perpendicular to the region plane,
134
+ * * `a` is the region area.
135
+ * @param region the region to process. Can lie in any plane.
136
+ * @param result optional pre-allocated result to populate and return.
137
+ */
138
+ static centroidAreaNormal(region, result) {
139
+ const localToWorld = FrameBuilder.createRightHandedFrame(undefined, region);
140
+ if (!localToWorld)
141
+ return undefined;
142
+ const normal = localToWorld.matrix.columnZ(result?.direction);
143
+ const regionIsXY = normal.isParallelTo(Vector3d.unitZ(), true);
144
+ let regionXY = region;
145
+ if (!regionIsXY) { // rotate the region to be parallel to the xy-plane
146
+ regionXY = region.cloneTransformed(localToWorld.inverse());
147
+ if (!regionXY)
148
+ return undefined;
149
+ }
150
+ const momentData = RegionOps.computeXYAreaMoments(regionXY);
151
+ if (!momentData)
152
+ return undefined;
153
+ const centroid = momentData.origin.clone(result?.origin);
154
+ if (!regionIsXY) // rotate centroid back (area is unchanged)
155
+ localToWorld.multiplyPoint3d(centroid, centroid);
156
+ let area = momentData.sums.weight();
157
+ if (area < 0.0) {
158
+ area = -area;
159
+ normal.scale(-1.0, normal);
160
+ }
161
+ if (!result)
162
+ result = Ray3d.createCapture(centroid, normal);
163
+ result.a = area;
164
+ return result;
165
+ }
119
166
  /**
120
167
  * Create loops in the graph.
121
168
  * @internal
@@ -233,20 +280,41 @@ export class RegionOps {
233
280
  const graph = RegionOpsFaceToFaceSearch.doPolygonBoolean(loopsA, loopsB, (inA, inB) => (inA && !inB), this._graphCheckPointFunction);
234
281
  return this.finishGraphToPolyface(graph, triangulate);
235
282
  }
283
+ /**
284
+ * Simplify the type of the region by stripping redundant parent(s).
285
+ * * No Boolean operations are performed.
286
+ * * Invalid inputs (such as childless regions) are not corrected.
287
+ * @param region region to simplify
288
+ * @returns
289
+ * * For a [[UnionRegion]] with exactly one child, return it if it is a [[Loop]],
290
+ * or if it is a [[ParityRegion]] with multiple children, otherwise return the `ParityRegion`'s `Loop`.
291
+ * * For a `ParityRegion` with exactly one `Loop`, return it.
292
+ * * All other inputs returned unchanged.
293
+ */
294
+ static simplifyRegionType(region) {
295
+ if (region instanceof UnionRegion) {
296
+ if (region.children.length === 1)
297
+ return this.simplifyRegionType(region.children[0]);
298
+ }
299
+ else if (region instanceof ParityRegion) {
300
+ if (region.children.length === 1)
301
+ return region.children[0];
302
+ }
303
+ return region;
304
+ }
236
305
  /**
237
306
  * Return areas defined by a boolean operation.
238
- * * If there are multiple regions in loopsA, they are treated as a union.
239
- * * If there are multiple regions in loopsB, they are treated as a union.
240
- * @param loopsA first set of loops
241
- * @param loopsB second set of loops
307
+ * @note For best results, input regions should have correctly oriented loops. See [[sortOuterAndHoleLoopsXY]].
308
+ * @note A common use case of this method is to convert a region with overlapping children into one with
309
+ * non-overlapping children: `regionOut = RegionOps.regionBooleanXY(regionIn, undefined, RegionBinaryOpType.Union)`.
310
+ * @param loopsA first set of loops (treated as a union)
311
+ * @param loopsB second set of loops (treated as a union)
242
312
  * @param operation indicates Union, Intersection, Parity, AMinusB, or BMinusA
243
313
  * @param mergeTolerance absolute distance tolerance for merging loops
244
314
  * @returns a region resulting from merging input loops and the boolean operation. May contain bridge edges added
245
315
  * to connect interior loops to exterior loops.
246
316
  */
247
317
  static regionBooleanXY(loopsA, loopsB, operation, mergeTolerance = Geometry.smallMetricDistance) {
248
- // Always return UnionRegion for now. But keep return type as AnyRegion:
249
- // in the future, we might return the *simplest* region type.
250
318
  const result = UnionRegion.create();
251
319
  const context = RegionBooleanContext.create(RegionGroupOpType.Union, RegionGroupOpType.Union);
252
320
  context.addMembers(loopsA, loopsB);
@@ -265,7 +333,7 @@ export class RegionOps {
265
333
  result.tryAddChild(loop);
266
334
  }
267
335
  });
268
- return result;
336
+ return result ? this.simplifyRegionType(result) : undefined;
269
337
  }
270
338
  /**
271
339
  * Return a polyface whose facets are a boolean operation between the input regions.
@@ -556,14 +624,15 @@ export class RegionOps {
556
624
  curves.dispatchToGeometryHandler(context);
557
625
  }
558
626
  /**
559
- * Reverse and reorder loops in the xy-plane for consistency and containment.
560
- * @param loops multiple loops in any order and orientation, z-coordinates ignored
627
+ * Reverse and reorder loops in the xy-plane for consistent orientation and containment.
628
+ * @param loops multiple loops in any order and orientation, z-coordinates ignored.
629
+ * * For best results, all overlaps should be containments, i.e., loop boundaries can touch, but should not cross.
561
630
  * @returns a region that captures the input pointers. This region is a:
562
- * * `Loop` if there is exactly one input loop. It is oriented counterclockwise.
563
- * * `ParityRegion` if input consists of exactly one outer loop with at least one hole loop.
631
+ * * [[Loop]] if there is exactly one input loop. It is oriented counterclockwise.
632
+ * * [[ParityRegion]] if input consists of exactly one outer loop with at least one hole loop.
564
633
  * Its first child is an outer loop oriented counterclockwise; all subsequent children are holes oriented
565
634
  * clockwise.
566
- * * `UnionRegion` if any other input configuration. Its children are individually ordered/oriented as in
635
+ * * [[UnionRegion]] if any other input configuration. Its children are individually ordered/oriented as in
567
636
  * the above cases.
568
637
  * @see [[PolygonOps.sortOuterAndHoleLoopsXY]]
569
638
  */
@@ -583,14 +652,14 @@ export class RegionOps {
583
652
  * Find all xy-areas bounded by the unstructured, possibly intersecting curves.
584
653
  * * For best results, input curves should be parallel to the xy-plane, as z-coordinates are ignored.
585
654
  * * A common use case of this method is to assemble the bounding "exterior" loop (or loops) containing the
586
- * input curves.
655
+ * input curves. Note that "holes" implied by inputs are _not_ preserved in output.
587
656
  * * This method does not add bridge edges to connect outer loops to inner loops. Each disconnected loop,
588
657
  * regardless of its containment, is returned as its own SignedLoops object. Pre-process with [[regionBooleanXY]]
589
658
  * to add bridge edges so that [[constructAllXYRegionLoops]] will return outer and inner loops in the same
590
659
  * SignedLoops object.
591
660
  * @param curvesAndRegions Any collection of curves. Each Loop/ParityRegion/UnionRegion contributes its curve
592
- * primitives.
593
- * @param tolerance optional distance tolerance for coincidence
661
+ * primitives, stripped of parity context. This means holes are _not_ preserved in output.
662
+ * @param tolerance optional distance tolerance for coincidence.
594
663
  * @returns array of [[SignedLoops]], each entry of which describes the faces in a single connected component:
595
664
  * * `positiveAreaLoops` contains "interior" loops, _including holes in ParityRegion input_. These loops have
596
665
  * positive area and counterclockwise orientation.
@@ -600,7 +669,8 @@ export class RegionOps {
600
669
  * to the edge and a constituent curve in each.
601
670
  */
602
671
  static constructAllXYRegionLoops(curvesAndRegions, tolerance = Geometry.smallMetricDistance) {
603
- const primitives = RegionOps.collectCurvePrimitives(curvesAndRegions, undefined, true, true);
672
+ let primitives = RegionOps.collectCurvePrimitives(curvesAndRegions, undefined, true, true);
673
+ primitives = TransferWithSplitArcs.clone(BagOfCurves.create(...primitives)).children;
604
674
  const range = this.curveArrayRange(primitives);
605
675
  const areaTol = this.computeXYAreaTolerance(range, tolerance);
606
676
  const intersections = CurveCurve.allIntersectionsAmongPrimitivesXY(primitives, tolerance);
@@ -753,12 +823,10 @@ export class RegionOps {
753
823
  }
754
824
  /**
755
825
  * Facet the region according to stroke options.
826
+ * @note For best results, [[UnionRegion]] input should consist of non-overlapping children. See [[regionBooleanXY]].
827
+ * @note For best results, [[ParityRegion]] input should be correctly oriented. See [[sortOuterAndHoleLoopsXY]].
756
828
  * @param region a closed xy-planar region, possibly with holes.
757
829
  * * The z-coordinates of the region are ignored. Caller is responsible for rotating the region into plane local coordinates beforehand, and reversing the rotation afterwards.
758
- * * For best results, `UnionRegion` input should consist of non-overlapping children.
759
- * Caller can ensure this by passing in `region = RegionOps.regionBooleanXY(unionRegion, undefined, RegionBinaryOpType.Union)`.
760
- * * For best results, `ParityRegion` input should be correctly oriented (holes have opposite orientation to their containing loop).
761
- * Caller can ensure this for non-intersecting loops by passing in `region = RegionOps.sortOuterAndHoleLoopsXY(loops)`.
762
830
  * @param options primarily how to stroke the region boundary, but also how to facet the region interior.
763
831
  * * By default, a triangulation is returned, but if `options.maximizeConvexFacets === true`, edges between coplanar triangles are removed to return maximally convex facets.
764
832
  * @returns facets for the region, or undefined if facetting failed
@@ -821,17 +889,19 @@ function pushToInOnOutArrays(curve, select, arrayNegative, array0, arrayPositive
821
889
  array0.push(curve);
822
890
  }
823
891
  /**
824
- * * Options to control method `RegionOps.consolidateAdjacentPrimitives`
892
+ * * Options to control method `RegionOps.consolidateAdjacentPrimitives`.
825
893
  * @public
826
894
  */
827
895
  export class ConsolidateAdjacentCurvePrimitivesOptions {
828
- /** True to consolidate adjacent linear geometry into a single LineString3d */
896
+ /** True to consolidate adjacent linear geometry into a single LineString3d. */
829
897
  consolidateLinearGeometry = true;
830
- /** True to consolidate contiguous compatible arcs into a single Arc3d */
898
+ /** True to consolidate contiguous compatible arcs into a single Arc3d. */
831
899
  consolidateCompatibleArcs = true;
832
- /** Tolerance for collapsing identical points */
900
+ /** Disable LineSegment3d and LineString3d point compression. */
901
+ disableLinearCompression = false;
902
+ /** Tolerance for collapsing identical points (if `!disableLinearCompression`). */
833
903
  duplicatePointTolerance = Geometry.smallMetricDistance;
834
- /** Tolerance for removing interior colinear points. */
904
+ /** Tolerance for removing interior colinear points (if `!disableLinearCompression`). */
835
905
  colinearPointTolerance = Geometry.smallMetricDistance;
836
906
  }
837
907
  //# sourceMappingURL=RegionOps.js.map