@itwin/core-geometry 5.0.0-dev.113 → 5.0.0-dev.115

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 (320) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/lib/cjs/bspline/BSplineSurface.d.ts +2 -1
  3. package/lib/cjs/bspline/BSplineSurface.d.ts.map +1 -1
  4. package/lib/cjs/bspline/BSplineSurface.js +2 -1
  5. package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
  6. package/lib/cjs/clipping/ClipPlane.d.ts +7 -5
  7. package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
  8. package/lib/cjs/clipping/ClipPlane.js +9 -5
  9. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  10. package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
  11. package/lib/cjs/clipping/ClipUtils.js +5 -3
  12. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  13. package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  14. package/lib/cjs/clipping/ConvexClipPlaneSet.js +12 -23
  15. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  16. package/lib/cjs/core-geometry.d.ts +1 -0
  17. package/lib/cjs/core-geometry.d.ts.map +1 -1
  18. package/lib/cjs/core-geometry.js +1 -0
  19. package/lib/cjs/core-geometry.js.map +1 -1
  20. package/lib/cjs/curve/Arc3d.d.ts +53 -31
  21. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  22. package/lib/cjs/curve/Arc3d.js +55 -36
  23. package/lib/cjs/curve/Arc3d.js.map +1 -1
  24. package/lib/cjs/curve/CurveCollection.d.ts +2 -0
  25. package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
  26. package/lib/cjs/curve/CurveCollection.js +14 -0
  27. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  28. package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
  29. package/lib/cjs/curve/LineSegment3d.js +1 -0
  30. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  31. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  32. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js +10 -5
  33. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  34. package/lib/cjs/curve/Query/PlanarSubdivision.d.ts.map +1 -1
  35. package/lib/cjs/curve/Query/PlanarSubdivision.js +7 -2
  36. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  37. package/lib/cjs/curve/RegionMomentsXY.d.ts +15 -21
  38. package/lib/cjs/curve/RegionMomentsXY.d.ts.map +1 -1
  39. package/lib/cjs/curve/RegionMomentsXY.js +38 -58
  40. package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
  41. package/lib/cjs/curve/RegionOps.d.ts +70 -38
  42. package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
  43. package/lib/cjs/curve/RegionOps.js +115 -45
  44. package/lib/cjs/curve/RegionOps.js.map +1 -1
  45. package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts +12 -13
  46. package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
  47. package/lib/cjs/curve/RegionOpsClassificationSweeps.js +23 -23
  48. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  49. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  50. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +36 -12
  51. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  52. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
  53. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
  54. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js +34 -0
  55. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
  56. package/lib/cjs/geometry3d/AngleSweep.d.ts +24 -17
  57. package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
  58. package/lib/cjs/geometry3d/AngleSweep.js +31 -17
  59. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  60. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +7 -2
  61. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  62. package/lib/cjs/geometry3d/GrowableXYZArray.js +20 -2
  63. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  64. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +2 -1
  65. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  66. package/lib/cjs/geometry3d/IndexedXYZCollection.js +7 -3
  67. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  68. package/lib/cjs/geometry3d/Plane3d.d.ts +2 -0
  69. package/lib/cjs/geometry3d/Plane3d.d.ts.map +1 -1
  70. package/lib/cjs/geometry3d/Plane3d.js +6 -1
  71. package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
  72. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
  73. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
  74. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
  75. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  76. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
  77. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  78. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js +18 -10
  79. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  80. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +4 -4
  81. package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
  82. package/lib/cjs/geometry3d/Point3dVector3d.js +6 -6
  83. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  84. package/lib/cjs/geometry3d/PointHelpers.d.ts +7 -7
  85. package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
  86. package/lib/cjs/geometry3d/PointHelpers.js +66 -26
  87. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  88. package/lib/cjs/geometry3d/PolygonOps.d.ts +57 -9
  89. package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
  90. package/lib/cjs/geometry3d/PolygonOps.js +57 -17
  91. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  92. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
  93. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
  94. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
  95. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  96. package/lib/cjs/geometry3d/PolylineOps.d.ts +5 -4
  97. package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
  98. package/lib/cjs/geometry3d/PolylineOps.js +5 -4
  99. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  100. package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
  101. package/lib/cjs/geometry3d/Ray3d.js +11 -23
  102. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  103. package/lib/cjs/geometry3d/Transform.d.ts +21 -2
  104. package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
  105. package/lib/cjs/geometry3d/Transform.js +32 -13
  106. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  107. package/lib/cjs/geometry4d/Matrix4d.d.ts +7 -7
  108. package/lib/cjs/geometry4d/Matrix4d.d.ts.map +1 -1
  109. package/lib/cjs/geometry4d/Matrix4d.js +9 -9
  110. package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
  111. package/lib/cjs/geometry4d/MomentData.d.ts +32 -34
  112. package/lib/cjs/geometry4d/MomentData.d.ts.map +1 -1
  113. package/lib/cjs/geometry4d/MomentData.js +56 -57
  114. package/lib/cjs/geometry4d/MomentData.js.map +1 -1
  115. package/lib/cjs/geometry4d/Point4d.d.ts +7 -4
  116. package/lib/cjs/geometry4d/Point4d.d.ts.map +1 -1
  117. package/lib/cjs/geometry4d/Point4d.js +26 -15
  118. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  119. package/lib/cjs/polyface/FacetOrientation.d.ts +1 -1
  120. package/lib/cjs/polyface/FacetOrientation.js +1 -1
  121. package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
  122. package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts +55 -40
  123. package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
  124. package/lib/cjs/polyface/IndexedEdgeMatcher.js +83 -75
  125. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  126. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
  127. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  128. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +47 -38
  129. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  130. package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts +26 -19
  131. package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
  132. package/lib/cjs/polyface/IndexedPolyfaceWalker.js +47 -32
  133. package/lib/cjs/polyface/IndexedPolyfaceWalker.js.map +1 -1
  134. package/lib/cjs/polyface/Polyface.d.ts +17 -3
  135. package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
  136. package/lib/cjs/polyface/Polyface.js +16 -0
  137. package/lib/cjs/polyface/Polyface.js.map +1 -1
  138. package/lib/cjs/polyface/PolyfaceBuilder.js +2 -2
  139. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  140. package/lib/cjs/polyface/PolyfaceClip.d.ts +19 -18
  141. package/lib/cjs/polyface/PolyfaceClip.d.ts.map +1 -1
  142. package/lib/cjs/polyface/PolyfaceClip.js +39 -42
  143. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  144. package/lib/cjs/polyface/PolyfaceQuery.d.ts +116 -75
  145. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  146. package/lib/cjs/polyface/PolyfaceQuery.js +312 -228
  147. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  148. package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
  149. package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
  150. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js +3 -3
  151. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  152. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
  153. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
  154. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
  155. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  156. package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
  157. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  158. package/lib/cjs/topology/ChainMerge.d.ts +1 -1
  159. package/lib/cjs/topology/ChainMerge.js +1 -1
  160. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  161. package/lib/esm/bspline/BSplineSurface.d.ts +2 -1
  162. package/lib/esm/bspline/BSplineSurface.d.ts.map +1 -1
  163. package/lib/esm/bspline/BSplineSurface.js +2 -1
  164. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  165. package/lib/esm/clipping/ClipPlane.d.ts +7 -5
  166. package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
  167. package/lib/esm/clipping/ClipPlane.js +9 -5
  168. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  169. package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
  170. package/lib/esm/clipping/ClipUtils.js +5 -3
  171. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  172. package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  173. package/lib/esm/clipping/ConvexClipPlaneSet.js +12 -23
  174. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  175. package/lib/esm/core-geometry.d.ts +1 -0
  176. package/lib/esm/core-geometry.d.ts.map +1 -1
  177. package/lib/esm/core-geometry.js +1 -0
  178. package/lib/esm/core-geometry.js.map +1 -1
  179. package/lib/esm/curve/Arc3d.d.ts +53 -31
  180. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  181. package/lib/esm/curve/Arc3d.js +55 -36
  182. package/lib/esm/curve/Arc3d.js.map +1 -1
  183. package/lib/esm/curve/CurveCollection.d.ts +2 -0
  184. package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
  185. package/lib/esm/curve/CurveCollection.js +14 -0
  186. package/lib/esm/curve/CurveCollection.js.map +1 -1
  187. package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
  188. package/lib/esm/curve/LineSegment3d.js +1 -0
  189. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  190. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  191. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js +10 -5
  192. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  193. package/lib/esm/curve/Query/PlanarSubdivision.d.ts.map +1 -1
  194. package/lib/esm/curve/Query/PlanarSubdivision.js +7 -2
  195. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  196. package/lib/esm/curve/RegionMomentsXY.d.ts +15 -21
  197. package/lib/esm/curve/RegionMomentsXY.d.ts.map +1 -1
  198. package/lib/esm/curve/RegionMomentsXY.js +38 -58
  199. package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
  200. package/lib/esm/curve/RegionOps.d.ts +70 -38
  201. package/lib/esm/curve/RegionOps.d.ts.map +1 -1
  202. package/lib/esm/curve/RegionOps.js +116 -46
  203. package/lib/esm/curve/RegionOps.js.map +1 -1
  204. package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts +12 -13
  205. package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
  206. package/lib/esm/curve/RegionOpsClassificationSweeps.js +23 -23
  207. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  208. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  209. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +36 -12
  210. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  211. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
  212. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
  213. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js +30 -0
  214. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
  215. package/lib/esm/geometry3d/AngleSweep.d.ts +24 -17
  216. package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
  217. package/lib/esm/geometry3d/AngleSweep.js +31 -17
  218. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  219. package/lib/esm/geometry3d/GrowableXYZArray.d.ts +7 -2
  220. package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  221. package/lib/esm/geometry3d/GrowableXYZArray.js +20 -2
  222. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  223. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +2 -1
  224. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  225. package/lib/esm/geometry3d/IndexedXYZCollection.js +7 -3
  226. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  227. package/lib/esm/geometry3d/Plane3d.d.ts +2 -0
  228. package/lib/esm/geometry3d/Plane3d.d.ts.map +1 -1
  229. package/lib/esm/geometry3d/Plane3d.js +6 -1
  230. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  231. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
  232. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
  233. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
  234. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  235. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
  236. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  237. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js +18 -10
  238. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  239. package/lib/esm/geometry3d/Point3dVector3d.d.ts +4 -4
  240. package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
  241. package/lib/esm/geometry3d/Point3dVector3d.js +6 -6
  242. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  243. package/lib/esm/geometry3d/PointHelpers.d.ts +7 -7
  244. package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
  245. package/lib/esm/geometry3d/PointHelpers.js +66 -26
  246. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  247. package/lib/esm/geometry3d/PolygonOps.d.ts +57 -9
  248. package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
  249. package/lib/esm/geometry3d/PolygonOps.js +57 -17
  250. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  251. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
  252. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
  253. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
  254. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  255. package/lib/esm/geometry3d/PolylineOps.d.ts +5 -4
  256. package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
  257. package/lib/esm/geometry3d/PolylineOps.js +5 -4
  258. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  259. package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
  260. package/lib/esm/geometry3d/Ray3d.js +11 -23
  261. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  262. package/lib/esm/geometry3d/Transform.d.ts +21 -2
  263. package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
  264. package/lib/esm/geometry3d/Transform.js +32 -13
  265. package/lib/esm/geometry3d/Transform.js.map +1 -1
  266. package/lib/esm/geometry4d/Matrix4d.d.ts +7 -7
  267. package/lib/esm/geometry4d/Matrix4d.d.ts.map +1 -1
  268. package/lib/esm/geometry4d/Matrix4d.js +9 -9
  269. package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
  270. package/lib/esm/geometry4d/MomentData.d.ts +32 -34
  271. package/lib/esm/geometry4d/MomentData.d.ts.map +1 -1
  272. package/lib/esm/geometry4d/MomentData.js +56 -57
  273. package/lib/esm/geometry4d/MomentData.js.map +1 -1
  274. package/lib/esm/geometry4d/Point4d.d.ts +7 -4
  275. package/lib/esm/geometry4d/Point4d.d.ts.map +1 -1
  276. package/lib/esm/geometry4d/Point4d.js +26 -15
  277. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  278. package/lib/esm/polyface/FacetOrientation.d.ts +1 -1
  279. package/lib/esm/polyface/FacetOrientation.js +1 -1
  280. package/lib/esm/polyface/FacetOrientation.js.map +1 -1
  281. package/lib/esm/polyface/IndexedEdgeMatcher.d.ts +55 -40
  282. package/lib/esm/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
  283. package/lib/esm/polyface/IndexedEdgeMatcher.js +83 -75
  284. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  285. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
  286. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  287. package/lib/esm/polyface/IndexedPolyfaceVisitor.js +47 -38
  288. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  289. package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts +26 -19
  290. package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
  291. package/lib/esm/polyface/IndexedPolyfaceWalker.js +47 -32
  292. package/lib/esm/polyface/IndexedPolyfaceWalker.js.map +1 -1
  293. package/lib/esm/polyface/Polyface.d.ts +17 -3
  294. package/lib/esm/polyface/Polyface.d.ts.map +1 -1
  295. package/lib/esm/polyface/Polyface.js +16 -0
  296. package/lib/esm/polyface/Polyface.js.map +1 -1
  297. package/lib/esm/polyface/PolyfaceBuilder.js +2 -2
  298. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  299. package/lib/esm/polyface/PolyfaceClip.d.ts +19 -18
  300. package/lib/esm/polyface/PolyfaceClip.d.ts.map +1 -1
  301. package/lib/esm/polyface/PolyfaceClip.js +39 -42
  302. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  303. package/lib/esm/polyface/PolyfaceQuery.d.ts +116 -75
  304. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  305. package/lib/esm/polyface/PolyfaceQuery.js +313 -229
  306. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  307. package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
  308. package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
  309. package/lib/esm/polyface/RangeTree/RangeTreeNode.js +3 -3
  310. package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  311. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
  312. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
  313. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
  314. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  315. package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
  316. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  317. package/lib/esm/topology/ChainMerge.d.ts +1 -1
  318. package/lib/esm/topology/ChainMerge.js +1 -1
  319. package/lib/esm/topology/ChainMerge.js.map +1 -1
  320. package/package.json +3 -3
@@ -9,6 +9,7 @@ exports.ConsolidateAdjacentCurvePrimitivesOptions = exports.RegionOps = exports.
9
9
  * @module Curve
10
10
  */
11
11
  const Geometry_1 = require("../Geometry");
12
+ const FrameBuilder_1 = require("../geometry3d/FrameBuilder");
12
13
  const GrowableXYZArray_1 = require("../geometry3d/GrowableXYZArray");
13
14
  const IndexedXYZCollection_1 = require("../geometry3d/IndexedXYZCollection");
14
15
  const Point3dArrayCarrier_1 = require("../geometry3d/Point3dArrayCarrier");
@@ -16,6 +17,7 @@ const Point3dVector3d_1 = require("../geometry3d/Point3dVector3d");
16
17
  const PolygonOps_1 = require("../geometry3d/PolygonOps");
17
18
  const PolylineCompressionByEdgeOffset_1 = require("../geometry3d/PolylineCompressionByEdgeOffset");
18
19
  const Range_1 = require("../geometry3d/Range");
20
+ const Ray3d_1 = require("../geometry3d/Ray3d");
19
21
  const SortablePolygon_1 = require("../geometry3d/SortablePolygon");
20
22
  const Transform_1 = require("../geometry3d/Transform");
21
23
  const MomentData_1 = require("../geometry4d/MomentData");
@@ -32,6 +34,7 @@ const CurveWireMomentsXYZ_1 = require("./CurveWireMomentsXYZ");
32
34
  const GeometryQuery_1 = require("./GeometryQuery");
33
35
  const ChainCollectorContext_1 = require("./internalContexts/ChainCollectorContext");
34
36
  const PolygonOffsetContext_1 = require("./internalContexts/PolygonOffsetContext");
37
+ const TransferWithSplitArcs_1 = require("./internalContexts/TransferWithSplitArcs");
35
38
  const LineString3d_1 = require("./LineString3d");
36
39
  const Loop_1 = require("./Loop");
37
40
  const OffsetOptions_1 = require("./OffsetOptions");
@@ -58,25 +61,29 @@ var RegionBinaryOpType;
58
61
  })(RegionBinaryOpType || (exports.RegionBinaryOpType = RegionBinaryOpType = {}));
59
62
  /**
60
63
  * Class `RegionOps` has static members for calculations on regions (areas).
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
- * * **NOTE:** Most of the methods in this class ignore z-coordinates, so callers should ensure that input geometry has
67
- * been rotated parallel to the xy-plane.
64
+ * * Regions are represented by these [[CurveCollection]] subclasses:
65
+ * * [[Loop]] -- a single loop
66
+ * * [[ParityRegion]] -- a collection of loops, interpreted by parity rules.
67
+ * The common "One outer loop and many inner loops" is a parity region.
68
+ * * [[UnionRegion]] -- a collection of `Loop` and `ParityRegion` objects understood as a (probably disjoint) union.
69
+ * * Most of the methods in this class:
70
+ * * Ignore z-coordinates, so callers should ensure that input geometry has been rotated parallel to the xy-plane.
71
+ * * Assume consistent Loop orientation: "solid" Loops are counterclockwise; "hole" Loops are clockwise.
68
72
  * @public
69
73
  */
70
74
  class RegionOps {
71
75
  /**
72
76
  * Return moment sums for a loop, parity region, or union region.
77
+ * * The input region should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
73
78
  * * If `rawMomentData` is the MomentData returned by computeXYAreaMoments, convert to principal axes and moments with
74
- * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes (rawMomentData.origin, rawMomentData.sums);`
75
- * @param root any Loop, ParityRegion, or UnionRegion.
79
+ * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes(rawMomentData.origin, rawMomentData.sums);`
80
+ * * `rawMomentData.origin` is the centroid of `region`.
81
+ * * `rawMomentData.sums.weight()` is the signed area of `region`.
82
+ * @param region any [[Loop]], [[ParityRegion]], or [[UnionRegion]].
76
83
  */
77
- static computeXYAreaMoments(root) {
84
+ static computeXYAreaMoments(region) {
78
85
  const handler = new RegionMomentsXY_1.RegionMomentsXY();
79
- const result = root.dispatchToGeometryHandler(handler);
86
+ const result = region.dispatchToGeometryHandler(handler);
80
87
  if (result instanceof MomentData_1.MomentData) {
81
88
  result.shiftOriginAndSumsToCentroidOfSums();
82
89
  return result;
@@ -85,8 +92,8 @@ class RegionOps {
85
92
  }
86
93
  /**
87
94
  * Return an area tolerance for a given xy-range and optional distance tolerance.
88
- * @param range range of planar region to tolerance
89
- * @param distanceTolerance optional absolute distance tolerance
95
+ * @param range range of planar region to tolerance.
96
+ * @param distanceTolerance optional absolute distance tolerance.
90
97
  */
91
98
  static computeXYAreaTolerance(range, distanceTolerance = Geometry_1.Geometry.smallMetricDistance) {
92
99
  // 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).
@@ -95,12 +102,13 @@ class RegionOps {
95
102
  }
96
103
  /**
97
104
  * Return a (signed) xy area for a region.
105
+ * * The input region should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
98
106
  * * The area is negative if and only if the region is oriented clockwise with respect to the positive z-axis.
99
- * @param root any Loop, ParityRegion, or UnionRegion.
107
+ * @param region any [[Loop]], [[ParityRegion]], or [[UnionRegion]].
100
108
  */
101
- static computeXYArea(root) {
109
+ static computeXYArea(region) {
102
110
  const handler = new RegionMomentsXY_1.RegionMomentsXY();
103
- const result = root.dispatchToGeometryHandler(handler);
111
+ const result = region.dispatchToGeometryHandler(handler);
104
112
  if (result instanceof MomentData_1.MomentData) {
105
113
  return result.quantitySum;
106
114
  }
@@ -108,17 +116,56 @@ class RegionOps {
108
116
  }
109
117
  /**
110
118
  * Return MomentData with the sums of wire moments.
119
+ * * The input curve should lie in a plane parallel to the xy-plane, as z-coords will be ignored.
111
120
  * * If `rawMomentData` is the MomentData returned by computeXYAreaMoments, convert to principal axes and moments with
112
- * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes (rawMomentData.origin, rawMomentData.sums);`
113
- * @param root any CurveCollection or CurvePrimitive.
121
+ * call `principalMomentData = MomentData.inertiaProductsToPrincipalAxes (rawMomentData.origin, rawMomentData.sums);`
122
+ * * `rawMomentData.origin` is the wire centroid of `curve`.
123
+ * * `rawMomentData.sums.weight()` is the signed length of `curve`.
124
+ * @param curve any [[CurveCollection]] or [[CurvePrimitive]].
114
125
  */
115
- static computeXYZWireMomentSums(root) {
126
+ static computeXYZWireMomentSums(curve) {
116
127
  const handler = new CurveWireMomentsXYZ_1.CurveWireMomentsXYZ();
117
- handler.visitLeaves(root);
128
+ handler.visitLeaves(curve);
118
129
  const result = handler.momentData;
119
130
  result.shiftOriginAndSumsToCentroidOfSums();
120
131
  return result;
121
132
  }
133
+ /**
134
+ * Return a [[Ray3d]] with:
135
+ * * `origin` is the centroid of the region,
136
+ * * `direction` is a unit vector perpendicular to the region plane,
137
+ * * `a` is the region area.
138
+ * @param region the region to process. Can lie in any plane.
139
+ * @param result optional pre-allocated result to populate and return.
140
+ */
141
+ static centroidAreaNormal(region, result) {
142
+ const localToWorld = FrameBuilder_1.FrameBuilder.createRightHandedFrame(undefined, region);
143
+ if (!localToWorld)
144
+ return undefined;
145
+ const normal = localToWorld.matrix.columnZ(result?.direction);
146
+ const regionIsXY = normal.isParallelTo(Point3dVector3d_1.Vector3d.unitZ(), true);
147
+ let regionXY = region;
148
+ if (!regionIsXY) { // rotate the region to be parallel to the xy-plane
149
+ regionXY = region.cloneTransformed(localToWorld.inverse());
150
+ if (!regionXY)
151
+ return undefined;
152
+ }
153
+ const momentData = RegionOps.computeXYAreaMoments(regionXY);
154
+ if (!momentData)
155
+ return undefined;
156
+ const centroid = momentData.origin.clone(result?.origin);
157
+ if (!regionIsXY) // rotate centroid back (area is unchanged)
158
+ localToWorld.multiplyPoint3d(centroid, centroid);
159
+ let area = momentData.sums.weight();
160
+ if (area < 0.0) {
161
+ area = -area;
162
+ normal.scale(-1.0, normal);
163
+ }
164
+ if (!result)
165
+ result = Ray3d_1.Ray3d.createCapture(centroid, normal);
166
+ result.a = area;
167
+ return result;
168
+ }
122
169
  /**
123
170
  * Create loops in the graph.
124
171
  * @internal
@@ -236,20 +283,41 @@ class RegionOps {
236
283
  const graph = RegionOpsClassificationSweeps_1.RegionOpsFaceToFaceSearch.doPolygonBoolean(loopsA, loopsB, (inA, inB) => (inA && !inB), this._graphCheckPointFunction);
237
284
  return this.finishGraphToPolyface(graph, triangulate);
238
285
  }
286
+ /**
287
+ * Simplify the type of the region by stripping redundant parent(s).
288
+ * * No Boolean operations are performed.
289
+ * * Invalid inputs (such as childless regions) are not corrected.
290
+ * @param region region to simplify
291
+ * @returns
292
+ * * For a [[UnionRegion]] with exactly one child, return it if it is a [[Loop]],
293
+ * or if it is a [[ParityRegion]] with multiple children, otherwise return the `ParityRegion`'s `Loop`.
294
+ * * For a `ParityRegion` with exactly one `Loop`, return it.
295
+ * * All other inputs returned unchanged.
296
+ */
297
+ static simplifyRegionType(region) {
298
+ if (region instanceof UnionRegion_1.UnionRegion) {
299
+ if (region.children.length === 1)
300
+ return this.simplifyRegionType(region.children[0]);
301
+ }
302
+ else if (region instanceof ParityRegion_1.ParityRegion) {
303
+ if (region.children.length === 1)
304
+ return region.children[0];
305
+ }
306
+ return region;
307
+ }
239
308
  /**
240
309
  * Return areas defined by a boolean operation.
241
- * * If there are multiple regions in loopsA, they are treated as a union.
242
- * * If there are multiple regions in loopsB, they are treated as a union.
243
- * @param loopsA first set of loops
244
- * @param loopsB second set of loops
310
+ * @note For best results, input regions should have correctly oriented loops. See [[sortOuterAndHoleLoopsXY]].
311
+ * @note A common use case of this method is to convert a region with overlapping children into one with
312
+ * non-overlapping children: `regionOut = RegionOps.regionBooleanXY(regionIn, undefined, RegionBinaryOpType.Union)`.
313
+ * @param loopsA first set of loops (treated as a union)
314
+ * @param loopsB second set of loops (treated as a union)
245
315
  * @param operation indicates Union, Intersection, Parity, AMinusB, or BMinusA
246
316
  * @param mergeTolerance absolute distance tolerance for merging loops
247
317
  * @returns a region resulting from merging input loops and the boolean operation. May contain bridge edges added
248
318
  * to connect interior loops to exterior loops.
249
319
  */
250
320
  static regionBooleanXY(loopsA, loopsB, operation, mergeTolerance = Geometry_1.Geometry.smallMetricDistance) {
251
- // Always return UnionRegion for now. But keep return type as AnyRegion:
252
- // in the future, we might return the *simplest* region type.
253
321
  const result = UnionRegion_1.UnionRegion.create();
254
322
  const context = RegionOpsClassificationSweeps_1.RegionBooleanContext.create(RegionOpsClassificationSweeps_1.RegionGroupOpType.Union, RegionOpsClassificationSweeps_1.RegionGroupOpType.Union);
255
323
  context.addMembers(loopsA, loopsB);
@@ -268,7 +336,7 @@ class RegionOps {
268
336
  result.tryAddChild(loop);
269
337
  }
270
338
  });
271
- return result;
339
+ return result ? this.simplifyRegionType(result) : undefined;
272
340
  }
273
341
  /**
274
342
  * Return a polyface whose facets are a boolean operation between the input regions.
@@ -559,14 +627,15 @@ class RegionOps {
559
627
  curves.dispatchToGeometryHandler(context);
560
628
  }
561
629
  /**
562
- * Reverse and reorder loops in the xy-plane for consistency and containment.
563
- * @param loops multiple loops in any order and orientation, z-coordinates ignored
630
+ * Reverse and reorder loops in the xy-plane for consistent orientation and containment.
631
+ * @param loops multiple loops in any order and orientation, z-coordinates ignored.
632
+ * * For best results, all overlaps should be containments, i.e., loop boundaries can touch, but should not cross.
564
633
  * @returns a region that captures the input pointers. This region is a:
565
- * * `Loop` if there is exactly one input loop. It is oriented counterclockwise.
566
- * * `ParityRegion` if input consists of exactly one outer loop with at least one hole loop.
634
+ * * [[Loop]] if there is exactly one input loop. It is oriented counterclockwise.
635
+ * * [[ParityRegion]] if input consists of exactly one outer loop with at least one hole loop.
567
636
  * Its first child is an outer loop oriented counterclockwise; all subsequent children are holes oriented
568
637
  * clockwise.
569
- * * `UnionRegion` if any other input configuration. Its children are individually ordered/oriented as in
638
+ * * [[UnionRegion]] if any other input configuration. Its children are individually ordered/oriented as in
570
639
  * the above cases.
571
640
  * @see [[PolygonOps.sortOuterAndHoleLoopsXY]]
572
641
  */
@@ -586,14 +655,14 @@ class RegionOps {
586
655
  * Find all xy-areas bounded by the unstructured, possibly intersecting curves.
587
656
  * * For best results, input curves should be parallel to the xy-plane, as z-coordinates are ignored.
588
657
  * * A common use case of this method is to assemble the bounding "exterior" loop (or loops) containing the
589
- * input curves.
658
+ * input curves. Note that "holes" implied by inputs are _not_ preserved in output.
590
659
  * * This method does not add bridge edges to connect outer loops to inner loops. Each disconnected loop,
591
660
  * regardless of its containment, is returned as its own SignedLoops object. Pre-process with [[regionBooleanXY]]
592
661
  * to add bridge edges so that [[constructAllXYRegionLoops]] will return outer and inner loops in the same
593
662
  * SignedLoops object.
594
663
  * @param curvesAndRegions Any collection of curves. Each Loop/ParityRegion/UnionRegion contributes its curve
595
- * primitives.
596
- * @param tolerance optional distance tolerance for coincidence
664
+ * primitives, stripped of parity context. This means holes are _not_ preserved in output.
665
+ * @param tolerance optional distance tolerance for coincidence.
597
666
  * @returns array of [[SignedLoops]], each entry of which describes the faces in a single connected component:
598
667
  * * `positiveAreaLoops` contains "interior" loops, _including holes in ParityRegion input_. These loops have
599
668
  * positive area and counterclockwise orientation.
@@ -603,7 +672,8 @@ class RegionOps {
603
672
  * to the edge and a constituent curve in each.
604
673
  */
605
674
  static constructAllXYRegionLoops(curvesAndRegions, tolerance = Geometry_1.Geometry.smallMetricDistance) {
606
- const primitives = RegionOps.collectCurvePrimitives(curvesAndRegions, undefined, true, true);
675
+ let primitives = RegionOps.collectCurvePrimitives(curvesAndRegions, undefined, true, true);
676
+ primitives = TransferWithSplitArcs_1.TransferWithSplitArcs.clone(CurveCollection_1.BagOfCurves.create(...primitives)).children;
607
677
  const range = this.curveArrayRange(primitives);
608
678
  const areaTol = this.computeXYAreaTolerance(range, tolerance);
609
679
  const intersections = CurveCurve_1.CurveCurve.allIntersectionsAmongPrimitivesXY(primitives, tolerance);
@@ -756,12 +826,10 @@ class RegionOps {
756
826
  }
757
827
  /**
758
828
  * Facet the region according to stroke options.
829
+ * @note For best results, [[UnionRegion]] input should consist of non-overlapping children. See [[regionBooleanXY]].
830
+ * @note For best results, [[ParityRegion]] input should be correctly oriented. See [[sortOuterAndHoleLoopsXY]].
759
831
  * @param region a closed xy-planar region, possibly with holes.
760
832
  * * 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.
761
- * * For best results, `UnionRegion` input should consist of non-overlapping children.
762
- * Caller can ensure this by passing in `region = RegionOps.regionBooleanXY(unionRegion, undefined, RegionBinaryOpType.Union)`.
763
- * * For best results, `ParityRegion` input should be correctly oriented (holes have opposite orientation to their containing loop).
764
- * Caller can ensure this for non-intersecting loops by passing in `region = RegionOps.sortOuterAndHoleLoopsXY(loops)`.
765
833
  * @param options primarily how to stroke the region boundary, but also how to facet the region interior.
766
834
  * * By default, a triangulation is returned, but if `options.maximizeConvexFacets === true`, edges between coplanar triangles are removed to return maximally convex facets.
767
835
  * @returns facets for the region, or undefined if facetting failed
@@ -825,17 +893,19 @@ function pushToInOnOutArrays(curve, select, arrayNegative, array0, arrayPositive
825
893
  array0.push(curve);
826
894
  }
827
895
  /**
828
- * * Options to control method `RegionOps.consolidateAdjacentPrimitives`
896
+ * * Options to control method `RegionOps.consolidateAdjacentPrimitives`.
829
897
  * @public
830
898
  */
831
899
  class ConsolidateAdjacentCurvePrimitivesOptions {
832
- /** True to consolidate adjacent linear geometry into a single LineString3d */
900
+ /** True to consolidate adjacent linear geometry into a single LineString3d. */
833
901
  consolidateLinearGeometry = true;
834
- /** True to consolidate contiguous compatible arcs into a single Arc3d */
902
+ /** True to consolidate contiguous compatible arcs into a single Arc3d. */
835
903
  consolidateCompatibleArcs = true;
836
- /** Tolerance for collapsing identical points */
904
+ /** Disable LineSegment3d and LineString3d point compression. */
905
+ disableLinearCompression = false;
906
+ /** Tolerance for collapsing identical points (if `!disableLinearCompression`). */
837
907
  duplicatePointTolerance = Geometry_1.Geometry.smallMetricDistance;
838
- /** Tolerance for removing interior colinear points. */
908
+ /** Tolerance for removing interior colinear points (if `!disableLinearCompression`). */
839
909
  colinearPointTolerance = Geometry_1.Geometry.smallMetricDistance;
840
910
  }
841
911
  exports.ConsolidateAdjacentCurvePrimitivesOptions = ConsolidateAdjacentCurvePrimitivesOptions;