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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (896) hide show
  1. package/CHANGELOG.md +87 -1
  2. package/lib/cjs/Constant.js.map +1 -1
  3. package/lib/cjs/Geometry.js.map +1 -1
  4. package/lib/cjs/bspline/AkimaCurve3d.js.map +1 -1
  5. package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
  6. package/lib/cjs/bspline/BSplineCurve.d.ts +1 -1
  7. package/lib/cjs/bspline/BSplineCurve.d.ts.map +1 -1
  8. package/lib/cjs/bspline/BSplineCurve.js +2 -2
  9. package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
  10. package/lib/cjs/bspline/BSplineCurve3dH.js.map +1 -1
  11. package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
  12. package/lib/cjs/bspline/BSplineSurface.d.ts.map +1 -1
  13. package/lib/cjs/bspline/BSplineSurface.js +1 -1
  14. package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
  15. package/lib/cjs/bspline/Bezier1dNd.js.map +1 -1
  16. package/lib/cjs/bspline/BezierCurve3d.js.map +1 -1
  17. package/lib/cjs/bspline/BezierCurve3dH.js.map +1 -1
  18. package/lib/cjs/bspline/BezierCurveBase.d.ts +1 -1
  19. package/lib/cjs/bspline/BezierCurveBase.d.ts.map +1 -1
  20. package/lib/cjs/bspline/BezierCurveBase.js +2 -2
  21. package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
  22. package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
  23. package/lib/cjs/bspline/KnotVector.js.map +1 -1
  24. package/lib/cjs/bspline/SurfaceLocationDetail.js.map +1 -1
  25. package/lib/cjs/clipping/AlternatingConvexClipTree.d.ts +15 -17
  26. package/lib/cjs/clipping/AlternatingConvexClipTree.d.ts.map +1 -1
  27. package/lib/cjs/clipping/AlternatingConvexClipTree.js +24 -20
  28. package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
  29. package/lib/cjs/clipping/BooleanClipFactory.d.ts +28 -28
  30. package/lib/cjs/clipping/BooleanClipFactory.d.ts.map +1 -1
  31. package/lib/cjs/clipping/BooleanClipFactory.js +28 -28
  32. package/lib/cjs/clipping/BooleanClipFactory.js.map +1 -1
  33. package/lib/cjs/clipping/BooleanClipNode.d.ts +11 -11
  34. package/lib/cjs/clipping/BooleanClipNode.d.ts.map +1 -1
  35. package/lib/cjs/clipping/BooleanClipNode.js +11 -11
  36. package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
  37. package/lib/cjs/clipping/ClipPlane.d.ts +73 -76
  38. package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
  39. package/lib/cjs/clipping/ClipPlane.js +105 -86
  40. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  41. package/lib/cjs/clipping/ClipPrimitive.d.ts +78 -47
  42. package/lib/cjs/clipping/ClipPrimitive.d.ts.map +1 -1
  43. package/lib/cjs/clipping/ClipPrimitive.js +112 -54
  44. package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
  45. package/lib/cjs/clipping/ClipUtils.d.ts +54 -44
  46. package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
  47. package/lib/cjs/clipping/ClipUtils.js +33 -29
  48. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  49. package/lib/cjs/clipping/ClipVector.d.ts +39 -25
  50. package/lib/cjs/clipping/ClipVector.d.ts.map +1 -1
  51. package/lib/cjs/clipping/ClipVector.js +35 -23
  52. package/lib/cjs/clipping/ClipVector.js.map +1 -1
  53. package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts +61 -38
  54. package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  55. package/lib/cjs/clipping/ConvexClipPlaneSet.js +64 -41
  56. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  57. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts +49 -30
  58. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
  59. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js +50 -30
  60. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  61. package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.d.ts +2 -2
  62. package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.d.ts.map +1 -1
  63. package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js +2 -2
  64. package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  65. package/lib/cjs/core-geometry.d.ts +5 -1
  66. package/lib/cjs/core-geometry.d.ts.map +1 -1
  67. package/lib/cjs/core-geometry.js +5 -1
  68. package/lib/cjs/core-geometry.js.map +1 -1
  69. package/lib/cjs/curve/Arc3d.d.ts +4 -3
  70. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  71. package/lib/cjs/curve/Arc3d.js +7 -5
  72. package/lib/cjs/curve/Arc3d.js.map +1 -1
  73. package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
  74. package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
  75. package/lib/cjs/curve/CurveChain.js.map +1 -1
  76. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +62 -42
  77. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
  78. package/lib/cjs/curve/CurveChainWithDistanceIndex.js +71 -48
  79. package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
  80. package/lib/cjs/curve/CurveCollection.d.ts +36 -26
  81. package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
  82. package/lib/cjs/curve/CurveCollection.js +46 -39
  83. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  84. package/lib/cjs/curve/CurveCurve.d.ts +6 -2
  85. package/lib/cjs/curve/CurveCurve.d.ts.map +1 -1
  86. package/lib/cjs/curve/CurveCurve.js +13 -9
  87. package/lib/cjs/curve/CurveCurve.js.map +1 -1
  88. package/lib/cjs/curve/CurveCurveCloseApproachXY.d.ts +74 -68
  89. package/lib/cjs/curve/CurveCurveCloseApproachXY.d.ts.map +1 -1
  90. package/lib/cjs/curve/CurveCurveCloseApproachXY.js +100 -108
  91. package/lib/cjs/curve/CurveCurveCloseApproachXY.js.map +1 -1
  92. package/lib/cjs/curve/CurveCurveIntersectXY.d.ts +46 -48
  93. package/lib/cjs/curve/CurveCurveIntersectXY.d.ts.map +1 -1
  94. package/lib/cjs/curve/CurveCurveIntersectXY.js +72 -61
  95. package/lib/cjs/curve/CurveCurveIntersectXY.js.map +1 -1
  96. package/lib/cjs/curve/CurveCurveIntersectXYZ.d.ts +32 -38
  97. package/lib/cjs/curve/CurveCurveIntersectXYZ.d.ts.map +1 -1
  98. package/lib/cjs/curve/CurveCurveIntersectXYZ.js +86 -97
  99. package/lib/cjs/curve/CurveCurveIntersectXYZ.js.map +1 -1
  100. package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
  101. package/lib/cjs/curve/CurveFactory.d.ts +67 -3
  102. package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
  103. package/lib/cjs/curve/CurveFactory.js +75 -7
  104. package/lib/cjs/curve/CurveFactory.js.map +1 -1
  105. package/lib/cjs/curve/CurveLocationDetail.d.ts +6 -6
  106. package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
  107. package/lib/cjs/curve/CurveLocationDetail.js +9 -7
  108. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  109. package/lib/cjs/curve/CurveOps.d.ts +77 -0
  110. package/lib/cjs/curve/CurveOps.d.ts.map +1 -0
  111. package/lib/cjs/curve/CurveOps.js +160 -0
  112. package/lib/cjs/curve/CurveOps.js.map +1 -0
  113. package/lib/cjs/curve/CurvePrimitive.d.ts +26 -18
  114. package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
  115. package/lib/cjs/curve/CurvePrimitive.js +4 -3
  116. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  117. package/lib/cjs/curve/CurveProcessor.js.map +1 -1
  118. package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
  119. package/lib/cjs/curve/GeometryQuery.d.ts +2 -2
  120. package/lib/cjs/curve/GeometryQuery.d.ts.map +1 -1
  121. package/lib/cjs/curve/GeometryQuery.js +2 -2
  122. package/lib/cjs/curve/GeometryQuery.js.map +1 -1
  123. package/lib/cjs/curve/LineSegment3d.d.ts +7 -5
  124. package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
  125. package/lib/cjs/curve/LineSegment3d.js +6 -6
  126. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  127. package/lib/cjs/curve/LineString3d.d.ts +2 -2
  128. package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
  129. package/lib/cjs/curve/LineString3d.js +3 -3
  130. package/lib/cjs/curve/LineString3d.js.map +1 -1
  131. package/lib/cjs/curve/Loop.d.ts +7 -5
  132. package/lib/cjs/curve/Loop.d.ts.map +1 -1
  133. package/lib/cjs/curve/Loop.js +18 -6
  134. package/lib/cjs/curve/Loop.js.map +1 -1
  135. package/lib/cjs/curve/OffsetOptions.d.ts +97 -0
  136. package/lib/cjs/curve/OffsetOptions.d.ts.map +1 -0
  137. package/lib/cjs/curve/OffsetOptions.js +166 -0
  138. package/lib/cjs/curve/OffsetOptions.js.map +1 -0
  139. package/lib/cjs/curve/ParityRegion.d.ts +7 -7
  140. package/lib/cjs/curve/ParityRegion.d.ts.map +1 -1
  141. package/lib/cjs/curve/ParityRegion.js +19 -11
  142. package/lib/cjs/curve/ParityRegion.js.map +1 -1
  143. package/lib/cjs/curve/Path.d.ts +6 -6
  144. package/lib/cjs/curve/Path.d.ts.map +1 -1
  145. package/lib/cjs/curve/Path.js +15 -9
  146. package/lib/cjs/curve/Path.js.map +1 -1
  147. package/lib/cjs/curve/PointString3d.js.map +1 -1
  148. package/lib/cjs/curve/ProxyCurve.d.ts +5 -7
  149. package/lib/cjs/curve/ProxyCurve.d.ts.map +1 -1
  150. package/lib/cjs/curve/ProxyCurve.js +7 -7
  151. package/lib/cjs/curve/ProxyCurve.js.map +1 -1
  152. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  153. package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
  154. package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
  155. package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
  156. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  157. package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
  158. package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
  159. package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
  160. package/lib/cjs/curve/RegionOps.d.ts +76 -56
  161. package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
  162. package/lib/cjs/curve/RegionOps.js +83 -60
  163. package/lib/cjs/curve/RegionOps.js.map +1 -1
  164. package/lib/cjs/curve/RegionOpsClassificationSweeps.js +2 -2
  165. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  166. package/lib/cjs/curve/StrokeOptions.d.ts.map +1 -1
  167. package/lib/cjs/curve/StrokeOptions.js +6 -2
  168. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  169. package/lib/cjs/curve/UnionRegion.d.ts +6 -5
  170. package/lib/cjs/curve/UnionRegion.d.ts.map +1 -1
  171. package/lib/cjs/curve/UnionRegion.js +17 -8
  172. package/lib/cjs/curve/UnionRegion.js.map +1 -1
  173. package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  174. package/lib/cjs/curve/{ChainCollectorContext.d.ts → internalContexts/ChainCollectorContext.d.ts} +4 -4
  175. package/lib/cjs/curve/internalContexts/ChainCollectorContext.d.ts.map +1 -0
  176. package/lib/cjs/curve/{ChainCollectorContext.js → internalContexts/ChainCollectorContext.js} +4 -4
  177. package/lib/cjs/curve/internalContexts/ChainCollectorContext.js.map +1 -0
  178. package/lib/cjs/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  179. package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  180. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  181. package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  182. package/lib/cjs/curve/internalContexts/CurveLengthContext.js.map +1 -1
  183. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  184. package/lib/cjs/curve/internalContexts/GapSearchContext.d.ts +2 -1
  185. package/lib/cjs/curve/internalContexts/GapSearchContext.d.ts.map +1 -1
  186. package/lib/cjs/curve/internalContexts/GapSearchContext.js +6 -2
  187. package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
  188. package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts +59 -70
  189. package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
  190. package/lib/cjs/curve/internalContexts/MultiChainCollector.js +130 -220
  191. package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
  192. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  193. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.d.ts +14 -8
  194. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.d.ts.map +1 -1
  195. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js +14 -8
  196. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  197. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts +23 -95
  198. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
  199. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +89 -178
  200. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  201. package/lib/cjs/curve/internalContexts/SumLengthsContext.d.ts.map +1 -1
  202. package/lib/cjs/curve/internalContexts/SumLengthsContext.js +4 -1
  203. package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
  204. package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  205. package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  206. package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
  207. package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
  208. package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  209. package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  210. package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
  211. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js +1 -1
  212. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  213. package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  214. package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
  215. package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  216. package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  217. package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts +1 -1
  218. package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
  219. package/lib/cjs/curve/spiral/TransitionSpiral3d.js +2 -2
  220. package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
  221. package/lib/cjs/curve/spiral/XYCurveEvaluator.js +1 -1
  222. package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
  223. package/lib/cjs/geometry3d/Angle.d.ts +9 -0
  224. package/lib/cjs/geometry3d/Angle.d.ts.map +1 -1
  225. package/lib/cjs/geometry3d/Angle.js +13 -0
  226. package/lib/cjs/geometry3d/Angle.js.map +1 -1
  227. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  228. package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
  229. package/lib/cjs/geometry3d/BilinearPatch.d.ts +43 -48
  230. package/lib/cjs/geometry3d/BilinearPatch.d.ts.map +1 -1
  231. package/lib/cjs/geometry3d/BilinearPatch.js +51 -55
  232. package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
  233. package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
  234. package/lib/cjs/geometry3d/Ellipsoid.d.ts +1 -1
  235. package/lib/cjs/geometry3d/Ellipsoid.js +1 -1
  236. package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
  237. package/lib/cjs/geometry3d/FrameBuilder.d.ts.map +1 -1
  238. package/lib/cjs/geometry3d/FrameBuilder.js +13 -11
  239. package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
  240. package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
  241. package/lib/cjs/geometry3d/GeometryHandler.d.ts +103 -97
  242. package/lib/cjs/geometry3d/GeometryHandler.d.ts.map +1 -1
  243. package/lib/cjs/geometry3d/GeometryHandler.js +247 -124
  244. package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
  245. package/lib/cjs/geometry3d/GrowableBlockedArray.d.ts.map +1 -1
  246. package/lib/cjs/geometry3d/GrowableBlockedArray.js +1 -1
  247. package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
  248. package/lib/cjs/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
  249. package/lib/cjs/geometry3d/GrowableFloat64Array.js +1 -1
  250. package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
  251. package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
  252. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  253. package/lib/cjs/geometry3d/IndexedCollectionInterval.js.map +1 -1
  254. package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
  255. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  256. package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  257. package/lib/cjs/geometry3d/Matrix3d.d.ts +18 -0
  258. package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
  259. package/lib/cjs/geometry3d/Matrix3d.js +32 -5
  260. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  261. package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
  262. package/lib/cjs/geometry3d/Plane3d.d.ts +41 -32
  263. package/lib/cjs/geometry3d/Plane3d.d.ts.map +1 -1
  264. package/lib/cjs/geometry3d/Plane3d.js +11 -8
  265. package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
  266. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +37 -34
  267. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
  268. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js +65 -43
  269. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  270. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts +36 -32
  271. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  272. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js +37 -32
  273. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  274. package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
  275. package/lib/cjs/geometry3d/Point2dVector2d.d.ts +8 -9
  276. package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
  277. package/lib/cjs/geometry3d/Point2dVector2d.js +9 -10
  278. package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
  279. package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
  280. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +12 -4
  281. package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
  282. package/lib/cjs/geometry3d/Point3dVector3d.js +18 -5
  283. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  284. package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
  285. package/lib/cjs/geometry3d/PointHelpers.js +5 -5
  286. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  287. package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
  288. package/lib/cjs/geometry3d/PolygonOps.d.ts +6 -2
  289. package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
  290. package/lib/cjs/geometry3d/PolygonOps.js +31 -22
  291. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  292. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  293. package/lib/cjs/geometry3d/PolylineOps.d.ts +16 -1
  294. package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
  295. package/lib/cjs/geometry3d/PolylineOps.js +55 -0
  296. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  297. package/lib/cjs/geometry3d/Range.d.ts +134 -94
  298. package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
  299. package/lib/cjs/geometry3d/Range.js +297 -145
  300. package/lib/cjs/geometry3d/Range.js.map +1 -1
  301. package/lib/cjs/geometry3d/Ray2d.d.ts +69 -0
  302. package/lib/cjs/geometry3d/Ray2d.d.ts.map +1 -0
  303. package/lib/cjs/geometry3d/Ray2d.js +146 -0
  304. package/lib/cjs/geometry3d/Ray2d.js.map +1 -0
  305. package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
  306. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  307. package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
  308. package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
  309. package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
  310. package/lib/cjs/geometry3d/Transform.d.ts +10 -3
  311. package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
  312. package/lib/cjs/geometry3d/Transform.js +18 -6
  313. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  314. package/lib/cjs/geometry3d/UVSurfaceOps.js.map +1 -1
  315. package/lib/cjs/geometry3d/XYZProps.js.map +1 -1
  316. package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
  317. package/lib/cjs/geometry4d/Map4d.js.map +1 -1
  318. package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
  319. package/lib/cjs/geometry4d/MomentData.js.map +1 -1
  320. package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  321. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  322. package/lib/cjs/numerics/BandedSystem.js.map +1 -1
  323. package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
  324. package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
  325. package/lib/cjs/numerics/Complex.js.map +1 -1
  326. package/lib/cjs/numerics/ConvexPolygon2d.d.ts +7 -49
  327. package/lib/cjs/numerics/ConvexPolygon2d.d.ts.map +1 -1
  328. package/lib/cjs/numerics/ConvexPolygon2d.js +16 -107
  329. package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
  330. package/lib/cjs/numerics/Newton.js.map +1 -1
  331. package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
  332. package/lib/cjs/numerics/PolarData.js.map +1 -1
  333. package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
  334. package/lib/cjs/numerics/Polynomials.js +0 -2
  335. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  336. package/lib/cjs/numerics/Quadrature.js +5 -5
  337. package/lib/cjs/numerics/Quadrature.js.map +1 -1
  338. package/lib/cjs/numerics/Range1dArray.js.map +1 -1
  339. package/lib/cjs/numerics/TriDiagonalSystem.js.map +1 -1
  340. package/lib/cjs/numerics/UnionFind.js.map +1 -1
  341. package/lib/cjs/numerics/UsageSums.js.map +1 -1
  342. package/lib/cjs/polyface/AuxData.js.map +1 -1
  343. package/lib/cjs/polyface/BoxTopology.js.map +1 -1
  344. package/lib/cjs/polyface/FacetFaceData.js.map +1 -1
  345. package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
  346. package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
  347. package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  348. package/lib/cjs/polyface/IndexedEdgeMatcher.js +1 -1
  349. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  350. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  351. package/lib/cjs/polyface/Polyface.js.map +1 -1
  352. package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
  353. package/lib/cjs/polyface/PolyfaceBuilder.js +2 -2
  354. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  355. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  356. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  357. package/lib/cjs/polyface/PolyfaceQuery.d.ts +93 -14
  358. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  359. package/lib/cjs/polyface/PolyfaceQuery.js +173 -34
  360. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  361. package/lib/cjs/polyface/RangeLengthData.js.map +1 -1
  362. package/lib/cjs/polyface/TaggedNumericData.js +1 -1
  363. package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
  364. package/lib/cjs/polyface/TriangleCandidate.js.map +1 -1
  365. package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js +2 -2
  366. package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  367. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.d.ts +27 -19
  368. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.d.ts.map +1 -1
  369. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js +30 -12
  370. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  371. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.d.ts +12 -8
  372. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.d.ts.map +1 -1
  373. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js +18 -4
  374. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  375. package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.d.ts +3 -4
  376. package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.d.ts.map +1 -1
  377. package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js +3 -5
  378. package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  379. package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  380. package/lib/cjs/polyface/multiclip/Range2dSearchInterface.d.ts +15 -12
  381. package/lib/cjs/polyface/multiclip/Range2dSearchInterface.d.ts.map +1 -1
  382. package/lib/cjs/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  383. package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
  384. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts +38 -0
  385. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
  386. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js +104 -1
  387. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  388. package/lib/cjs/polyface/multiclip/XYPointBuckets.js.map +1 -1
  389. package/lib/cjs/serialization/BGFBAccessors.js.map +1 -1
  390. package/lib/cjs/serialization/BGFBReader.js.map +1 -1
  391. package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
  392. package/lib/cjs/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  393. package/lib/cjs/serialization/DeepCompare.js.map +1 -1
  394. package/lib/cjs/serialization/GeometrySamples.d.ts +11 -0
  395. package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
  396. package/lib/cjs/serialization/GeometrySamples.js +30 -0
  397. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  398. package/lib/cjs/serialization/IModelJsonSchema.d.ts +2 -7
  399. package/lib/cjs/serialization/IModelJsonSchema.d.ts.map +1 -1
  400. package/lib/cjs/serialization/IModelJsonSchema.js +2 -7
  401. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  402. package/lib/cjs/solid/Box.js.map +1 -1
  403. package/lib/cjs/solid/Cone.js.map +1 -1
  404. package/lib/cjs/solid/LinearSweep.d.ts +2 -1
  405. package/lib/cjs/solid/LinearSweep.d.ts.map +1 -1
  406. package/lib/cjs/solid/LinearSweep.js.map +1 -1
  407. package/lib/cjs/solid/RotationalSweep.d.ts +2 -1
  408. package/lib/cjs/solid/RotationalSweep.d.ts.map +1 -1
  409. package/lib/cjs/solid/RotationalSweep.js.map +1 -1
  410. package/lib/cjs/solid/RuledSweep.d.ts +2 -1
  411. package/lib/cjs/solid/RuledSweep.d.ts.map +1 -1
  412. package/lib/cjs/solid/RuledSweep.js.map +1 -1
  413. package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
  414. package/lib/cjs/solid/Sphere.js.map +1 -1
  415. package/lib/cjs/solid/SweepContour.d.ts +2 -2
  416. package/lib/cjs/solid/SweepContour.d.ts.map +1 -1
  417. package/lib/cjs/solid/SweepContour.js +9 -0
  418. package/lib/cjs/solid/SweepContour.js.map +1 -1
  419. package/lib/cjs/solid/TorusPipe.js.map +1 -1
  420. package/lib/cjs/topology/ChainMerge.js +1 -1
  421. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  422. package/lib/cjs/topology/Graph.js.map +1 -1
  423. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  424. package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
  425. package/lib/cjs/topology/HalfEdgeGraphSearch.js +1 -1
  426. package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
  427. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js +1 -1
  428. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  429. package/lib/cjs/topology/HalfEdgeGraphValidation.js.map +1 -1
  430. package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
  431. package/lib/cjs/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  432. package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  433. package/lib/cjs/topology/HalfEdgePositionDetail.js.map +1 -1
  434. package/lib/cjs/topology/HalfEdgePriorityQueue.d.ts.map +1 -1
  435. package/lib/cjs/topology/HalfEdgePriorityQueue.js +1 -1
  436. package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
  437. package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
  438. package/lib/cjs/topology/MaskManager.js.map +1 -1
  439. package/lib/cjs/topology/Merging.js.map +1 -1
  440. package/lib/cjs/topology/RegularizeFace.js +3 -3
  441. package/lib/cjs/topology/RegularizeFace.js.map +1 -1
  442. package/lib/cjs/topology/SignedDataSummary.js.map +1 -1
  443. package/lib/cjs/topology/SpaceTriangulation.js.map +1 -1
  444. package/lib/cjs/topology/Triangulation.js +1 -1
  445. package/lib/cjs/topology/Triangulation.js.map +1 -1
  446. package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
  447. package/lib/esm/Constant.js.map +1 -1
  448. package/lib/esm/Geometry.js.map +1 -1
  449. package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
  450. package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
  451. package/lib/esm/bspline/BSplineCurve.d.ts +1 -1
  452. package/lib/esm/bspline/BSplineCurve.d.ts.map +1 -1
  453. package/lib/esm/bspline/BSplineCurve.js +1 -1
  454. package/lib/esm/bspline/BSplineCurve.js.map +1 -1
  455. package/lib/esm/bspline/BSplineCurve3dH.js.map +1 -1
  456. package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
  457. package/lib/esm/bspline/BSplineSurface.d.ts.map +1 -1
  458. package/lib/esm/bspline/BSplineSurface.js +1 -1
  459. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  460. package/lib/esm/bspline/Bezier1dNd.js.map +1 -1
  461. package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
  462. package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
  463. package/lib/esm/bspline/BezierCurveBase.d.ts +1 -1
  464. package/lib/esm/bspline/BezierCurveBase.d.ts.map +1 -1
  465. package/lib/esm/bspline/BezierCurveBase.js +1 -1
  466. package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
  467. package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
  468. package/lib/esm/bspline/KnotVector.js.map +1 -1
  469. package/lib/esm/bspline/SurfaceLocationDetail.js.map +1 -1
  470. package/lib/esm/clipping/AlternatingConvexClipTree.d.ts +15 -17
  471. package/lib/esm/clipping/AlternatingConvexClipTree.d.ts.map +1 -1
  472. package/lib/esm/clipping/AlternatingConvexClipTree.js +24 -20
  473. package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
  474. package/lib/esm/clipping/BooleanClipFactory.d.ts +28 -28
  475. package/lib/esm/clipping/BooleanClipFactory.d.ts.map +1 -1
  476. package/lib/esm/clipping/BooleanClipFactory.js +28 -28
  477. package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
  478. package/lib/esm/clipping/BooleanClipNode.d.ts +11 -11
  479. package/lib/esm/clipping/BooleanClipNode.d.ts.map +1 -1
  480. package/lib/esm/clipping/BooleanClipNode.js +11 -11
  481. package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
  482. package/lib/esm/clipping/ClipPlane.d.ts +73 -76
  483. package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
  484. package/lib/esm/clipping/ClipPlane.js +105 -86
  485. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  486. package/lib/esm/clipping/ClipPrimitive.d.ts +78 -47
  487. package/lib/esm/clipping/ClipPrimitive.d.ts.map +1 -1
  488. package/lib/esm/clipping/ClipPrimitive.js +112 -54
  489. package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
  490. package/lib/esm/clipping/ClipUtils.d.ts +54 -44
  491. package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
  492. package/lib/esm/clipping/ClipUtils.js +33 -29
  493. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  494. package/lib/esm/clipping/ClipVector.d.ts +39 -25
  495. package/lib/esm/clipping/ClipVector.d.ts.map +1 -1
  496. package/lib/esm/clipping/ClipVector.js +35 -23
  497. package/lib/esm/clipping/ClipVector.js.map +1 -1
  498. package/lib/esm/clipping/ConvexClipPlaneSet.d.ts +61 -38
  499. package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  500. package/lib/esm/clipping/ConvexClipPlaneSet.js +64 -41
  501. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  502. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts +49 -30
  503. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
  504. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js +50 -30
  505. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  506. package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.d.ts +2 -2
  507. package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.d.ts.map +1 -1
  508. package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js +2 -2
  509. package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  510. package/lib/esm/core-geometry.d.ts +5 -1
  511. package/lib/esm/core-geometry.d.ts.map +1 -1
  512. package/lib/esm/core-geometry.js +5 -1
  513. package/lib/esm/core-geometry.js.map +1 -1
  514. package/lib/esm/curve/Arc3d.d.ts +4 -3
  515. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  516. package/lib/esm/curve/Arc3d.js +6 -4
  517. package/lib/esm/curve/Arc3d.js.map +1 -1
  518. package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
  519. package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
  520. package/lib/esm/curve/CurveChain.js.map +1 -1
  521. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +62 -42
  522. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
  523. package/lib/esm/curve/CurveChainWithDistanceIndex.js +70 -47
  524. package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
  525. package/lib/esm/curve/CurveCollection.d.ts +36 -26
  526. package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
  527. package/lib/esm/curve/CurveCollection.js +46 -39
  528. package/lib/esm/curve/CurveCollection.js.map +1 -1
  529. package/lib/esm/curve/CurveCurve.d.ts +6 -2
  530. package/lib/esm/curve/CurveCurve.d.ts.map +1 -1
  531. package/lib/esm/curve/CurveCurve.js +13 -9
  532. package/lib/esm/curve/CurveCurve.js.map +1 -1
  533. package/lib/esm/curve/CurveCurveCloseApproachXY.d.ts +74 -68
  534. package/lib/esm/curve/CurveCurveCloseApproachXY.d.ts.map +1 -1
  535. package/lib/esm/curve/CurveCurveCloseApproachXY.js +100 -108
  536. package/lib/esm/curve/CurveCurveCloseApproachXY.js.map +1 -1
  537. package/lib/esm/curve/CurveCurveIntersectXY.d.ts +46 -48
  538. package/lib/esm/curve/CurveCurveIntersectXY.d.ts.map +1 -1
  539. package/lib/esm/curve/CurveCurveIntersectXY.js +72 -61
  540. package/lib/esm/curve/CurveCurveIntersectXY.js.map +1 -1
  541. package/lib/esm/curve/CurveCurveIntersectXYZ.d.ts +32 -38
  542. package/lib/esm/curve/CurveCurveIntersectXYZ.d.ts.map +1 -1
  543. package/lib/esm/curve/CurveCurveIntersectXYZ.js +86 -97
  544. package/lib/esm/curve/CurveCurveIntersectXYZ.js.map +1 -1
  545. package/lib/esm/curve/CurveExtendMode.js.map +1 -1
  546. package/lib/esm/curve/CurveFactory.d.ts +67 -3
  547. package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
  548. package/lib/esm/curve/CurveFactory.js +74 -6
  549. package/lib/esm/curve/CurveFactory.js.map +1 -1
  550. package/lib/esm/curve/CurveLocationDetail.d.ts +6 -6
  551. package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
  552. package/lib/esm/curve/CurveLocationDetail.js +9 -7
  553. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  554. package/lib/esm/curve/CurveOps.d.ts +77 -0
  555. package/lib/esm/curve/CurveOps.d.ts.map +1 -0
  556. package/lib/esm/curve/CurveOps.js +156 -0
  557. package/lib/esm/curve/CurveOps.js.map +1 -0
  558. package/lib/esm/curve/CurvePrimitive.d.ts +26 -18
  559. package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
  560. package/lib/esm/curve/CurvePrimitive.js +4 -3
  561. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  562. package/lib/esm/curve/CurveProcessor.js.map +1 -1
  563. package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
  564. package/lib/esm/curve/GeometryQuery.d.ts +2 -2
  565. package/lib/esm/curve/GeometryQuery.d.ts.map +1 -1
  566. package/lib/esm/curve/GeometryQuery.js +2 -2
  567. package/lib/esm/curve/GeometryQuery.js.map +1 -1
  568. package/lib/esm/curve/LineSegment3d.d.ts +7 -5
  569. package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
  570. package/lib/esm/curve/LineSegment3d.js +5 -5
  571. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  572. package/lib/esm/curve/LineString3d.d.ts +2 -2
  573. package/lib/esm/curve/LineString3d.d.ts.map +1 -1
  574. package/lib/esm/curve/LineString3d.js +2 -2
  575. package/lib/esm/curve/LineString3d.js.map +1 -1
  576. package/lib/esm/curve/Loop.d.ts +7 -5
  577. package/lib/esm/curve/Loop.d.ts.map +1 -1
  578. package/lib/esm/curve/Loop.js +18 -6
  579. package/lib/esm/curve/Loop.js.map +1 -1
  580. package/lib/esm/curve/OffsetOptions.d.ts +97 -0
  581. package/lib/esm/curve/OffsetOptions.d.ts.map +1 -0
  582. package/lib/esm/curve/OffsetOptions.js +161 -0
  583. package/lib/esm/curve/OffsetOptions.js.map +1 -0
  584. package/lib/esm/curve/ParityRegion.d.ts +7 -7
  585. package/lib/esm/curve/ParityRegion.d.ts.map +1 -1
  586. package/lib/esm/curve/ParityRegion.js +19 -11
  587. package/lib/esm/curve/ParityRegion.js.map +1 -1
  588. package/lib/esm/curve/Path.d.ts +6 -6
  589. package/lib/esm/curve/Path.d.ts.map +1 -1
  590. package/lib/esm/curve/Path.js +15 -9
  591. package/lib/esm/curve/Path.js.map +1 -1
  592. package/lib/esm/curve/PointString3d.js.map +1 -1
  593. package/lib/esm/curve/ProxyCurve.d.ts +5 -7
  594. package/lib/esm/curve/ProxyCurve.d.ts.map +1 -1
  595. package/lib/esm/curve/ProxyCurve.js +7 -7
  596. package/lib/esm/curve/ProxyCurve.js.map +1 -1
  597. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  598. package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
  599. package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
  600. package/lib/esm/curve/Query/InOutTests.js.map +1 -1
  601. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  602. package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
  603. package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
  604. package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
  605. package/lib/esm/curve/RegionOps.d.ts +76 -56
  606. package/lib/esm/curve/RegionOps.d.ts.map +1 -1
  607. package/lib/esm/curve/RegionOps.js +84 -61
  608. package/lib/esm/curve/RegionOps.js.map +1 -1
  609. package/lib/esm/curve/RegionOpsClassificationSweeps.js +2 -2
  610. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  611. package/lib/esm/curve/StrokeOptions.d.ts.map +1 -1
  612. package/lib/esm/curve/StrokeOptions.js +6 -2
  613. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  614. package/lib/esm/curve/UnionRegion.d.ts +6 -5
  615. package/lib/esm/curve/UnionRegion.d.ts.map +1 -1
  616. package/lib/esm/curve/UnionRegion.js +17 -8
  617. package/lib/esm/curve/UnionRegion.js.map +1 -1
  618. package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  619. package/lib/esm/curve/{ChainCollectorContext.d.ts → internalContexts/ChainCollectorContext.d.ts} +4 -4
  620. package/lib/esm/curve/internalContexts/ChainCollectorContext.d.ts.map +1 -0
  621. package/lib/esm/curve/{ChainCollectorContext.js → internalContexts/ChainCollectorContext.js} +4 -4
  622. package/lib/esm/curve/internalContexts/ChainCollectorContext.js.map +1 -0
  623. package/lib/esm/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  624. package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  625. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  626. package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  627. package/lib/esm/curve/internalContexts/CurveLengthContext.js.map +1 -1
  628. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  629. package/lib/esm/curve/internalContexts/GapSearchContext.d.ts +2 -1
  630. package/lib/esm/curve/internalContexts/GapSearchContext.d.ts.map +1 -1
  631. package/lib/esm/curve/internalContexts/GapSearchContext.js +6 -2
  632. package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
  633. package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts +59 -70
  634. package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
  635. package/lib/esm/curve/internalContexts/MultiChainCollector.js +129 -218
  636. package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
  637. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  638. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.d.ts +14 -8
  639. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.d.ts.map +1 -1
  640. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js +14 -8
  641. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  642. package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts +23 -95
  643. package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
  644. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +86 -173
  645. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  646. package/lib/esm/curve/internalContexts/SumLengthsContext.d.ts.map +1 -1
  647. package/lib/esm/curve/internalContexts/SumLengthsContext.js +4 -1
  648. package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
  649. package/lib/esm/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  650. package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  651. package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
  652. package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
  653. package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  654. package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  655. package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
  656. package/lib/esm/curve/spiral/IntegratedSpiral3d.js +1 -1
  657. package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  658. package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  659. package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
  660. package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  661. package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  662. package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts +1 -1
  663. package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
  664. package/lib/esm/curve/spiral/TransitionSpiral3d.js +1 -1
  665. package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
  666. package/lib/esm/curve/spiral/XYCurveEvaluator.js +1 -1
  667. package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
  668. package/lib/esm/geometry3d/Angle.d.ts +9 -0
  669. package/lib/esm/geometry3d/Angle.d.ts.map +1 -1
  670. package/lib/esm/geometry3d/Angle.js +13 -0
  671. package/lib/esm/geometry3d/Angle.js.map +1 -1
  672. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  673. package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
  674. package/lib/esm/geometry3d/BilinearPatch.d.ts +43 -48
  675. package/lib/esm/geometry3d/BilinearPatch.d.ts.map +1 -1
  676. package/lib/esm/geometry3d/BilinearPatch.js +51 -55
  677. package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
  678. package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
  679. package/lib/esm/geometry3d/Ellipsoid.d.ts +1 -1
  680. package/lib/esm/geometry3d/Ellipsoid.js +1 -1
  681. package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
  682. package/lib/esm/geometry3d/FrameBuilder.d.ts.map +1 -1
  683. package/lib/esm/geometry3d/FrameBuilder.js +13 -11
  684. package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
  685. package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
  686. package/lib/esm/geometry3d/GeometryHandler.d.ts +103 -97
  687. package/lib/esm/geometry3d/GeometryHandler.d.ts.map +1 -1
  688. package/lib/esm/geometry3d/GeometryHandler.js +247 -124
  689. package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
  690. package/lib/esm/geometry3d/GrowableBlockedArray.d.ts.map +1 -1
  691. package/lib/esm/geometry3d/GrowableBlockedArray.js +1 -1
  692. package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
  693. package/lib/esm/geometry3d/GrowableFloat64Array.d.ts.map +1 -1
  694. package/lib/esm/geometry3d/GrowableFloat64Array.js +1 -1
  695. package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
  696. package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
  697. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  698. package/lib/esm/geometry3d/IndexedCollectionInterval.js.map +1 -1
  699. package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
  700. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  701. package/lib/esm/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  702. package/lib/esm/geometry3d/Matrix3d.d.ts +18 -0
  703. package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
  704. package/lib/esm/geometry3d/Matrix3d.js +32 -5
  705. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  706. package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
  707. package/lib/esm/geometry3d/Plane3d.d.ts +41 -32
  708. package/lib/esm/geometry3d/Plane3d.d.ts.map +1 -1
  709. package/lib/esm/geometry3d/Plane3d.js +11 -8
  710. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  711. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +37 -34
  712. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
  713. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js +65 -43
  714. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  715. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts +36 -32
  716. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  717. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js +37 -32
  718. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  719. package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
  720. package/lib/esm/geometry3d/Point2dVector2d.d.ts +8 -9
  721. package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
  722. package/lib/esm/geometry3d/Point2dVector2d.js +9 -10
  723. package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
  724. package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
  725. package/lib/esm/geometry3d/Point3dVector3d.d.ts +12 -4
  726. package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
  727. package/lib/esm/geometry3d/Point3dVector3d.js +18 -5
  728. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  729. package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
  730. package/lib/esm/geometry3d/PointHelpers.js +5 -5
  731. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  732. package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
  733. package/lib/esm/geometry3d/PolygonOps.d.ts +6 -2
  734. package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
  735. package/lib/esm/geometry3d/PolygonOps.js +31 -22
  736. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  737. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  738. package/lib/esm/geometry3d/PolylineOps.d.ts +16 -1
  739. package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
  740. package/lib/esm/geometry3d/PolylineOps.js +56 -1
  741. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  742. package/lib/esm/geometry3d/Range.d.ts +134 -94
  743. package/lib/esm/geometry3d/Range.d.ts.map +1 -1
  744. package/lib/esm/geometry3d/Range.js +297 -145
  745. package/lib/esm/geometry3d/Range.js.map +1 -1
  746. package/lib/esm/geometry3d/Ray2d.d.ts +69 -0
  747. package/lib/esm/geometry3d/Ray2d.d.ts.map +1 -0
  748. package/lib/esm/geometry3d/Ray2d.js +142 -0
  749. package/lib/esm/geometry3d/Ray2d.js.map +1 -0
  750. package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
  751. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  752. package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
  753. package/lib/esm/geometry3d/Segment1d.js.map +1 -1
  754. package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
  755. package/lib/esm/geometry3d/Transform.d.ts +10 -3
  756. package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
  757. package/lib/esm/geometry3d/Transform.js +18 -6
  758. package/lib/esm/geometry3d/Transform.js.map +1 -1
  759. package/lib/esm/geometry3d/UVSurfaceOps.js.map +1 -1
  760. package/lib/esm/geometry3d/XYZProps.js.map +1 -1
  761. package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
  762. package/lib/esm/geometry4d/Map4d.js.map +1 -1
  763. package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
  764. package/lib/esm/geometry4d/MomentData.js.map +1 -1
  765. package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  766. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  767. package/lib/esm/numerics/BandedSystem.js.map +1 -1
  768. package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
  769. package/lib/esm/numerics/ClusterableArray.js.map +1 -1
  770. package/lib/esm/numerics/Complex.js.map +1 -1
  771. package/lib/esm/numerics/ConvexPolygon2d.d.ts +7 -49
  772. package/lib/esm/numerics/ConvexPolygon2d.d.ts.map +1 -1
  773. package/lib/esm/numerics/ConvexPolygon2d.js +14 -104
  774. package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
  775. package/lib/esm/numerics/Newton.js.map +1 -1
  776. package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
  777. package/lib/esm/numerics/PolarData.js.map +1 -1
  778. package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
  779. package/lib/esm/numerics/Polynomials.js +0 -2
  780. package/lib/esm/numerics/Polynomials.js.map +1 -1
  781. package/lib/esm/numerics/Quadrature.js +5 -5
  782. package/lib/esm/numerics/Quadrature.js.map +1 -1
  783. package/lib/esm/numerics/Range1dArray.js.map +1 -1
  784. package/lib/esm/numerics/TriDiagonalSystem.js.map +1 -1
  785. package/lib/esm/numerics/UnionFind.js.map +1 -1
  786. package/lib/esm/numerics/UsageSums.js.map +1 -1
  787. package/lib/esm/polyface/AuxData.js.map +1 -1
  788. package/lib/esm/polyface/BoxTopology.js.map +1 -1
  789. package/lib/esm/polyface/FacetFaceData.js.map +1 -1
  790. package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
  791. package/lib/esm/polyface/FacetOrientation.js.map +1 -1
  792. package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  793. package/lib/esm/polyface/IndexedEdgeMatcher.js +1 -1
  794. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  795. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  796. package/lib/esm/polyface/Polyface.js.map +1 -1
  797. package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
  798. package/lib/esm/polyface/PolyfaceBuilder.js +2 -2
  799. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  800. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  801. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  802. package/lib/esm/polyface/PolyfaceQuery.d.ts +93 -14
  803. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  804. package/lib/esm/polyface/PolyfaceQuery.js +173 -35
  805. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  806. package/lib/esm/polyface/RangeLengthData.js.map +1 -1
  807. package/lib/esm/polyface/TaggedNumericData.js +1 -1
  808. package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
  809. package/lib/esm/polyface/TriangleCandidate.js.map +1 -1
  810. package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js +2 -2
  811. package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  812. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.d.ts +27 -19
  813. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.d.ts.map +1 -1
  814. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js +30 -12
  815. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  816. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.d.ts +12 -8
  817. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.d.ts.map +1 -1
  818. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js +18 -4
  819. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  820. package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.d.ts +3 -4
  821. package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.d.ts.map +1 -1
  822. package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js +3 -5
  823. package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  824. package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  825. package/lib/esm/polyface/multiclip/Range2dSearchInterface.d.ts +15 -12
  826. package/lib/esm/polyface/multiclip/Range2dSearchInterface.d.ts.map +1 -1
  827. package/lib/esm/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  828. package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
  829. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts +38 -0
  830. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
  831. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js +102 -1
  832. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  833. package/lib/esm/polyface/multiclip/XYPointBuckets.js.map +1 -1
  834. package/lib/esm/serialization/BGFBAccessors.js.map +1 -1
  835. package/lib/esm/serialization/BGFBReader.js.map +1 -1
  836. package/lib/esm/serialization/BGFBWriter.js.map +1 -1
  837. package/lib/esm/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  838. package/lib/esm/serialization/DeepCompare.js.map +1 -1
  839. package/lib/esm/serialization/GeometrySamples.d.ts +11 -0
  840. package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
  841. package/lib/esm/serialization/GeometrySamples.js +30 -0
  842. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  843. package/lib/esm/serialization/IModelJsonSchema.d.ts +2 -7
  844. package/lib/esm/serialization/IModelJsonSchema.d.ts.map +1 -1
  845. package/lib/esm/serialization/IModelJsonSchema.js +2 -7
  846. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  847. package/lib/esm/solid/Box.js.map +1 -1
  848. package/lib/esm/solid/Cone.js.map +1 -1
  849. package/lib/esm/solid/LinearSweep.d.ts +2 -1
  850. package/lib/esm/solid/LinearSweep.d.ts.map +1 -1
  851. package/lib/esm/solid/LinearSweep.js.map +1 -1
  852. package/lib/esm/solid/RotationalSweep.d.ts +2 -1
  853. package/lib/esm/solid/RotationalSweep.d.ts.map +1 -1
  854. package/lib/esm/solid/RotationalSweep.js.map +1 -1
  855. package/lib/esm/solid/RuledSweep.d.ts +2 -1
  856. package/lib/esm/solid/RuledSweep.d.ts.map +1 -1
  857. package/lib/esm/solid/RuledSweep.js.map +1 -1
  858. package/lib/esm/solid/SolidPrimitive.js.map +1 -1
  859. package/lib/esm/solid/Sphere.js.map +1 -1
  860. package/lib/esm/solid/SweepContour.d.ts +2 -2
  861. package/lib/esm/solid/SweepContour.d.ts.map +1 -1
  862. package/lib/esm/solid/SweepContour.js +9 -0
  863. package/lib/esm/solid/SweepContour.js.map +1 -1
  864. package/lib/esm/solid/TorusPipe.js.map +1 -1
  865. package/lib/esm/topology/ChainMerge.js +1 -1
  866. package/lib/esm/topology/ChainMerge.js.map +1 -1
  867. package/lib/esm/topology/Graph.js.map +1 -1
  868. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  869. package/lib/esm/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
  870. package/lib/esm/topology/HalfEdgeGraphSearch.js +1 -1
  871. package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
  872. package/lib/esm/topology/HalfEdgeGraphSpineContext.js +1 -1
  873. package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  874. package/lib/esm/topology/HalfEdgeGraphValidation.js.map +1 -1
  875. package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
  876. package/lib/esm/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  877. package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  878. package/lib/esm/topology/HalfEdgePositionDetail.js.map +1 -1
  879. package/lib/esm/topology/HalfEdgePriorityQueue.d.ts.map +1 -1
  880. package/lib/esm/topology/HalfEdgePriorityQueue.js +1 -1
  881. package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
  882. package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
  883. package/lib/esm/topology/MaskManager.js.map +1 -1
  884. package/lib/esm/topology/Merging.js.map +1 -1
  885. package/lib/esm/topology/RegularizeFace.js +3 -3
  886. package/lib/esm/topology/RegularizeFace.js.map +1 -1
  887. package/lib/esm/topology/SignedDataSummary.js.map +1 -1
  888. package/lib/esm/topology/SpaceTriangulation.js.map +1 -1
  889. package/lib/esm/topology/Triangulation.js +1 -1
  890. package/lib/esm/topology/Triangulation.js.map +1 -1
  891. package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
  892. package/package.json +6 -17
  893. package/lib/cjs/curve/ChainCollectorContext.d.ts.map +0 -1
  894. package/lib/cjs/curve/ChainCollectorContext.js.map +0 -1
  895. package/lib/esm/curve/ChainCollectorContext.d.ts.map +0 -1
  896. package/lib/esm/curve/ChainCollectorContext.js.map +0 -1
@@ -9,20 +9,25 @@ import { Clipper, ClipPlaneContainment } from "./ClipUtils";
9
9
  import { Arc3d } from "../curve/Arc3d";
10
10
  import { GrowableXYZArray } from "../geometry3d/GrowableXYZArray";
11
11
  import { GrowableXYZArrayCache } from "../geometry3d/ReusableObjectCache";
12
- /** Wire format describing a [[ClipVector]].
12
+ /**
13
+ * Wire format describing a [[ClipVector]].
13
14
  * @public
14
15
  */
15
16
  export type ClipVectorProps = ClipPrimitiveProps[];
16
- /** Class holding an array structure of shapes defined by `ClipPrimitive`
17
+ /**
18
+ * Class holding an array structure of shapes defined by `ClipPrimitive`
17
19
  * * The `ClipVector` defines an intersection of the member `ClipPrimitive` regions.
18
- * * In the most common usage, one of the `ClipPrimitive` will be an outer region, and all others are holes with marker flag indicating that the outside of each hole is live.
20
+ * * In the most common usage, one of the `ClipPrimitive` will be an outer region, and all others are holes with marker
21
+ * flag indicating that the outside of each hole is live.
19
22
  * @public
20
23
  */
21
24
  export declare class ClipVector implements Clipper {
22
25
  private _clips;
23
- /** range acting as first filter.
26
+ /**
27
+ * Range acting as first filter.
24
28
  * * This is understood as overall range limit, not as precise planes.
25
- * * applying any rotation to the whole ClipVector generally expands this range, rather than exactly transforming its planes.
29
+ * * Applying any rotation to the whole ClipVector generally expands this range, rather than exactly transforming
30
+ * its planes.
26
31
  */
27
32
  boundingRange: Range3d;
28
33
  /** Returns a reference to the array of ClipShapes. */
@@ -52,13 +57,15 @@ export declare class ClipVector implements Clipper {
52
57
  appendShape(shape: Point3d[], zLow?: number, zHigh?: number, transform?: Transform, isMask?: boolean, invisible?: boolean): boolean;
53
58
  /** Returns true if the given point lies inside all of this ClipVector's ClipShapes (by rule of intersection).*/
54
59
  pointInside(point: Point3d, onTolerance?: number): boolean;
55
- /** Method from [[Clipper]] interface.
60
+ /**
61
+ * Method from [[Clipper]] interface.
56
62
  * * Implement as dispatch to clipPlaneSets as supplied by derived class.
57
63
  */
58
64
  isPointOnOrInside(point: Point3d, onTolerance?: number): boolean;
59
65
  private _clipNodeProxy?;
60
66
  private ensureProxyClipNode;
61
- /** Method from [[Clipper]] interface.
67
+ /**
68
+ * Method from [[Clipper]] interface.
62
69
  * * Implement as dispatch to clipPlaneSets as supplied by derived class.
63
70
  */
64
71
  announceClippedSegmentIntervals(f0: number, f1: number, pointA: Point3d, pointB: Point3d, announce?: AnnounceNumberNumber): boolean;
@@ -68,28 +75,30 @@ export declare class ClipVector implements Clipper {
68
75
  announceClippedArcIntervals(arc: Arc3d, announce?: AnnounceNumberNumberCurvePrimitive): boolean;
69
76
  /** Execute polygon clip as intersection of the child primitives. */
70
77
  appendPolygonClip(xyz: GrowableXYZArray, insideFragments: GrowableXYZArray[], outsideFragments: GrowableXYZArray[], arrayCache: GrowableXYZArrayCache): void;
71
- /** Transforms this ClipVector to a new coordinate-system.
72
- * Note that if the transform has rotate and scale the boundingRange member expands.
73
- * Returns true if successful.
74
- */
78
+ /**
79
+ * Transforms this ClipVector to a new coordinate-system.
80
+ * Note that if the transform has rotate and scale the boundingRange member expands.
81
+ * Returns true if successful.
82
+ */
75
83
  transformInPlace(transform: Transform): boolean;
76
84
  /**
77
85
  * A simple way of packaging this ClipVector's ClipShape points into a multidimensional array, while also
78
86
  * taking into account each ClipPrimitive's individual transforms.
79
- *
80
87
  * ClipPrimitives OTHER THAN ClipShape are ignored.
81
- *
82
88
  * Information out:
83
- * - All of the loop points are stored in the multidimensional Point3d array given (will return unchanged upon failure)
84
- * - If given a transform, will be set from the transformFromClip of the first ClipPrimitive
85
- * - The ClipMask of the final ClipPrimitive is stored in the returned array at index 0
86
- * - The last valid zLow found is stored in the returned array at index 1
87
- * - The last valid zHigh found is stored in the returned array at index 2
89
+ * - All of the loop points are stored in the multidimensional Point3d array given (will return unchanged upon failure).
90
+ * - If given a transform, will be set from the transformFromClip of the first ClipPrimitive.
91
+ * - The ClipMask of the final ClipPrimitive is stored in the returned array at index 0.
92
+ * - The last valid zLow found is stored in the returned array at index 1.
93
+ * - The last valid zHigh found is stored in the returned array at index 2.
88
94
  */
89
95
  extractBoundaryLoops(loopPoints: Point3d[][], transform?: Transform): number[];
90
96
  /** Sets this ClipVector and all of its members to the visibility specified. */
91
97
  setInvisible(invisible: boolean): void;
92
- /** For every clip, parse the member point array into the member clip plane object (only for clipPlanes member, not the mask) */
98
+ /**
99
+ * For every clip, parse the member point array into the member clip plane object (only for clipPlanes member,
100
+ * not the mask)
101
+ */
93
102
  parseClipPlanes(): void;
94
103
  /**
95
104
  * Multiply all ClipPlanes DPoint4d by matrix.
@@ -104,8 +113,9 @@ export declare class ClipVector implements Clipper {
104
113
  */
105
114
  multiplyPlanesByMatrix4d(matrix: Matrix4d, invert?: boolean, transpose?: boolean): boolean;
106
115
  /**
107
- * Determines whether the given points fall inside or outside this set of ClipShapes. If any set is defined by masking planes,
108
- * checks the mask planes only, provided that ignoreMasks is false. Otherwise, checks the _clipPlanes member.
116
+ * Determines whether the given points fall inside or outside this set of ClipShapes. If any set is defined
117
+ * by masking planes, checks the mask planes only, provided that ignoreMasks is false. Otherwise, checks the
118
+ * _clipPlanes member.
109
119
  */
110
120
  classifyPointContainment(points: Point3d[], ignoreMasks?: boolean): ClipPlaneContainment;
111
121
  /**
@@ -114,7 +124,8 @@ export declare class ClipVector implements Clipper {
114
124
  */
115
125
  classifyRangeContainment(range: Range3d, ignoreMasks: boolean): ClipPlaneContainment;
116
126
  /**
117
- * For an array of points (making up a LineString), tests whether the segment between each point lies inside the ClipVector.
127
+ * For an array of points (making up a LineString), tests whether the segment between each point lies inside the
128
+ * ClipVector.
118
129
  * If true, returns true immediately.
119
130
  */
120
131
  isAnyLineStringPointInside(points: Point3d[]): boolean;
@@ -126,7 +137,8 @@ export declare class ClipVector implements Clipper {
126
137
  * and returns true if all segments lie inside this ClipVector.
127
138
  */
128
139
  isLineStringCompletelyContained(points: Point3d[]): boolean;
129
- /** Serializes this ClipVector to a compact string representation appropriate for transmission as part of a URL.
140
+ /**
141
+ * Serializes this ClipVector to a compact string representation appropriate for transmission as part of a URL.
130
142
  * Chiefly used for requesting [Tile]($frontend)s with section cut facets.
131
143
  * UnionOfConvexClipPlaneSets is obtained for each ClipPrimitive. The encoding is as follows:
132
144
  * ClipVector:
@@ -149,7 +161,8 @@ export declare class ClipVector implements Clipper {
149
161
  */
150
162
  toCompactString(): string;
151
163
  }
152
- /** Bundles a [[ClipVector]] with its compact string representation.
164
+ /**
165
+ * Bundles a [[ClipVector]] with its compact string representation.
153
166
  * @note The string representation is computed once; the ClipVector is assumed not to be subsequently modified.
154
167
  * @see [[StringifiedClipVector.fromClipVector]] to create from a ClipVector.
155
168
  * @see [[ClipVector.toCompactString]] for a description of the string representation.
@@ -158,7 +171,8 @@ export declare class ClipVector implements Clipper {
158
171
  export type StringifiedClipVector = ClipVector & {
159
172
  readonly clipString: string;
160
173
  };
161
- /** Bundles a ClipVector with its compact string representation.
174
+ /**
175
+ * Bundles a ClipVector with its compact string representation.
162
176
  * @note The string representation is computed once; the ClipVector is assumed not to be subsequently modified.
163
177
  * @alpha
164
178
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ClipVector.d.ts","sourceRoot":"","sources":["../../../src/clipping/ClipVector.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,OAAO,EAAY,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAE,oBAAoB,EAAE,kCAAkC,EAAC,MAAM,yBAAyB,CAAC;AAClG,OAAO,EAA0B,aAAa,EAAE,kBAAkB,EAAa,MAAM,iBAAiB,CAAC;AACvG,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAG5D,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CA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CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO;IAa7D,oGAAoG;IAC7F,QAAQ,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IAM3E,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAAc;IAC1D;;;OAGG;IACI,+BAA+B,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO;IAyBlE;;;;;;;;;;;;;;;;;;;;;OAqBG;IACI,eAAe,IAAI,MAAM;CAyCjC;AAED;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjF;;;;GAIG;AACH,yBAAiB,qBAAqB,CAAC;IACrC;;;;OAIG;IACH,SAAgB,cAAc,CAAC,IAAI,CAAC,EAAE,UAAU,GAAG,qBAAqB,GAAG,SAAS,CAWnF;CACF"}
@@ -13,18 +13,22 @@ import { Transform } from "../geometry3d/Transform";
13
13
  import { ClipMaskXYZRangePlanes, ClipPrimitive, ClipShape } from "./ClipPrimitive";
14
14
  import { ClipPlaneContainment } from "./ClipUtils";
15
15
  import { BooleanClipNodeIntersection } from "./BooleanClipNode";
16
- /** Class holding an array structure of shapes defined by `ClipPrimitive`
16
+ /**
17
+ * Class holding an array structure of shapes defined by `ClipPrimitive`
17
18
  * * The `ClipVector` defines an intersection of the member `ClipPrimitive` regions.
18
- * * In the most common usage, one of the `ClipPrimitive` will be an outer region, and all others are holes with marker flag indicating that the outside of each hole is live.
19
+ * * In the most common usage, one of the `ClipPrimitive` will be an outer region, and all others are holes with marker
20
+ * flag indicating that the outside of each hole is live.
19
21
  * @public
20
22
  */
21
23
  class ClipVector {
22
24
  /** Returns a reference to the array of ClipShapes. */
23
25
  get clips() { return this._clips; }
24
26
  constructor(clips) {
25
- /** range acting as first filter.
27
+ /**
28
+ * Range acting as first filter.
26
29
  * * This is understood as overall range limit, not as precise planes.
27
- * * applying any rotation to the whole ClipVector generally expands this range, rather than exactly transforming its planes.
30
+ * * Applying any rotation to the whole ClipVector generally expands this range, rather than exactly transforming
31
+ * its planes.
28
32
  */
29
33
  this.boundingRange = Range3d.createNull();
30
34
  this._clips = clips ? clips : [];
@@ -112,7 +116,8 @@ class ClipVector {
112
116
  pointInside(point, onTolerance = Geometry.smallMetricDistanceSquared) {
113
117
  return this.isPointOnOrInside(point, onTolerance);
114
118
  }
115
- /** Method from [[Clipper]] interface.
119
+ /**
120
+ * Method from [[Clipper]] interface.
116
121
  * * Implement as dispatch to clipPlaneSets as supplied by derived class.
117
122
  */
118
123
  isPointOnOrInside(point, onTolerance = Geometry.smallMetricDistanceSquared) {
@@ -138,7 +143,8 @@ class ClipVector {
138
143
  }
139
144
  return numChildren > 0;
140
145
  }
141
- /** Method from [[Clipper]] interface.
146
+ /**
147
+ * Method from [[Clipper]] interface.
142
148
  * * Implement as dispatch to clipPlaneSets as supplied by derived class.
143
149
  */
144
150
  announceClippedSegmentIntervals(f0, f1, pointA, pointB, announce) {
@@ -162,10 +168,11 @@ class ClipVector {
162
168
  if (this._clipNodeProxy)
163
169
  this._clipNodeProxy.appendPolygonClip(xyz, insideFragments, outsideFragments, arrayCache);
164
170
  }
165
- /** Transforms this ClipVector to a new coordinate-system.
166
- * Note that if the transform has rotate and scale the boundingRange member expands.
167
- * Returns true if successful.
168
- */
171
+ /**
172
+ * Transforms this ClipVector to a new coordinate-system.
173
+ * Note that if the transform has rotate and scale the boundingRange member expands.
174
+ * Returns true if successful.
175
+ */
169
176
  transformInPlace(transform) {
170
177
  for (const clip of this._clips)
171
178
  if (clip.transformInPlace(transform) === false)
@@ -177,15 +184,13 @@ class ClipVector {
177
184
  /**
178
185
  * A simple way of packaging this ClipVector's ClipShape points into a multidimensional array, while also
179
186
  * taking into account each ClipPrimitive's individual transforms.
180
- *
181
187
  * ClipPrimitives OTHER THAN ClipShape are ignored.
182
- *
183
188
  * Information out:
184
- * - All of the loop points are stored in the multidimensional Point3d array given (will return unchanged upon failure)
185
- * - If given a transform, will be set from the transformFromClip of the first ClipPrimitive
186
- * - The ClipMask of the final ClipPrimitive is stored in the returned array at index 0
187
- * - The last valid zLow found is stored in the returned array at index 1
188
- * - The last valid zHigh found is stored in the returned array at index 2
189
+ * - All of the loop points are stored in the multidimensional Point3d array given (will return unchanged upon failure).
190
+ * - If given a transform, will be set from the transformFromClip of the first ClipPrimitive.
191
+ * - The ClipMask of the final ClipPrimitive is stored in the returned array at index 0.
192
+ * - The last valid zLow found is stored in the returned array at index 1.
193
+ * - The last valid zHigh found is stored in the returned array at index 2.
189
194
  */
190
195
  extractBoundaryLoops(loopPoints, transform) {
191
196
  let clipM = ClipMaskXYZRangePlanes.None;
@@ -240,7 +245,10 @@ class ClipVector {
240
245
  for (const clip of this._clips)
241
246
  clip.setInvisible(invisible);
242
247
  }
243
- /** For every clip, parse the member point array into the member clip plane object (only for clipPlanes member, not the mask) */
248
+ /**
249
+ * For every clip, parse the member point array into the member clip plane object (only for clipPlanes member,
250
+ * not the mask)
251
+ */
244
252
  parseClipPlanes() {
245
253
  for (const clip of this._clips)
246
254
  clip.fetchClipPlanesRef();
@@ -269,8 +277,9 @@ class ClipVector {
269
277
  return true;
270
278
  }
271
279
  /**
272
- * Determines whether the given points fall inside or outside this set of ClipShapes. If any set is defined by masking planes,
273
- * checks the mask planes only, provided that ignoreMasks is false. Otherwise, checks the _clipPlanes member.
280
+ * Determines whether the given points fall inside or outside this set of ClipShapes. If any set is defined
281
+ * by masking planes, checks the mask planes only, provided that ignoreMasks is false. Otherwise, checks the
282
+ * _clipPlanes member.
274
283
  */
275
284
  classifyPointContainment(points, ignoreMasks = false) {
276
285
  let currentContainment = ClipPlaneContainment.Ambiguous;
@@ -294,7 +303,8 @@ class ClipVector {
294
303
  return this.classifyPointContainment(corners, ignoreMasks);
295
304
  }
296
305
  /**
297
- * For an array of points (making up a LineString), tests whether the segment between each point lies inside the ClipVector.
306
+ * For an array of points (making up a LineString), tests whether the segment between each point lies inside the
307
+ * ClipVector.
298
308
  * If true, returns true immediately.
299
309
  */
300
310
  isAnyLineStringPointInside(points) {
@@ -344,7 +354,8 @@ class ClipVector {
344
354
  }
345
355
  return true;
346
356
  }
347
- /** Serializes this ClipVector to a compact string representation appropriate for transmission as part of a URL.
357
+ /**
358
+ * Serializes this ClipVector to a compact string representation appropriate for transmission as part of a URL.
348
359
  * Chiefly used for requesting [Tile]($frontend)s with section cut facets.
349
360
  * UnionOfConvexClipPlaneSets is obtained for each ClipPrimitive. The encoding is as follows:
350
361
  * ClipVector:
@@ -407,7 +418,8 @@ class ClipVector {
407
418
  }
408
419
  ClipVector._TARGET_FRACTION_SUM = 0.99999999;
409
420
  export { ClipVector };
410
- /** Bundles a ClipVector with its compact string representation.
421
+ /**
422
+ * Bundles a ClipVector with its compact string representation.
411
423
  * @note The string representation is computed once; the ClipVector is assumed not to be subsequently modified.
412
424
  * @alpha
413
425
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ClipVector.js","sourceRoot":"","sources":["../../../src/clipping/ClipVector.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAIpD,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAsB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvG,OAAO,EAAW,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAE5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAUhE;;;;GAIG;AACH,MAAa,UAAU;IAQrB,sDAAs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YAChC,MAAM,GAAG,GAAG,MAAM,GAAG,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC;QAEpD,OAAO,GAAG,MAAM,GAAG,CAAC;IACtB,CAAC;;AApGuB,+BAAoB,GAAG,UAAU,AAAb,CAAc;SA5V/C,UAAU;AA2cvB;;;GAGG;AACH,MAAM,KAAW,qBAAqB,CAkBrC;AAlBD,WAAiB,qBAAqB;IACpC;;;;OAIG;IACH,SAAgB,cAAc,CAAC,IAAiB;QAC9C,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO;YACxB,OAAO,SAAS,CAAC;QAEnB,MAAM,GAAG,GAAG,IAAW,CAAC;QACxB,IAAI,SAAS,KAAK,GAAG,CAAC,UAAU;YAC9B,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAE1C,MAAM,WAAW,GAAG,GAA4B,CAAC;QACjD,MAAM,CAAC,SAAS,KAAK,WAAW,CAAC,UAAU,CAAC,CAAC;QAC7C,OAAO,WAAW,CAAC;IACrB,CAAC;IAXe,oCAAc,iBAW7B,CAAA;AACH,CAAC,EAlBgB,qBAAqB,KAArB,qBAAqB,QAkBrC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module CartesianGeometry\r\n */\r\n\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { LineSegment3d } from \"../curve/LineSegment3d\";\r\nimport { Geometry } from \"../Geometry\";\r\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { Range3d } from \"../geometry3d/Range\";\r\nimport { Segment1d } from \"../geometry3d/Segment1d\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { Matrix4d } from \"../geometry4d/Matrix4d\";\r\nimport { ClipPlane } from \"./ClipPlane\";\r\nimport { AnnounceNumberNumber, AnnounceNumberNumberCurvePrimitive} from \"../curve/CurvePrimitive\";\r\nimport { ClipMaskXYZRangePlanes, ClipPrimitive, ClipPrimitiveProps, ClipShape } from \"./ClipPrimitive\";\r\nimport { Clipper, ClipPlaneContainment } from \"./ClipUtils\";\r\nimport { ConvexClipPlaneSet } from \"./ConvexClipPlaneSet\";\r\nimport { BooleanClipNodeIntersection } from \"./BooleanClipNode\";\r\nimport { Arc3d } from \"../curve/Arc3d\";\r\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\r\nimport { GrowableXYZArrayCache } from \"../geometry3d/ReusableObjectCache\";\r\n\r\n/** Wire format describing a [[ClipVector]].\r\n * @public\r\n */\r\nexport type ClipVectorProps = ClipPrimitiveProps[];\r\n\r\n/** Class holding an array structure of shapes defined by `ClipPrimitive`\r\n * * The `ClipVector` defines an intersection of the member `ClipPrimitive` regions.\r\n * * In the most common usage, one of the `ClipPrimitive` will be an outer region, and all others are holes with marker flag indicating that the outside of each hole is live.\r\n * @public\r\n */\r\nexport class ClipVector implements Clipper {\r\n private _clips: ClipPrimitive[];\r\n /** range acting as first filter.\r\n * * This is understood as overall range limit, not as precise planes.\r\n * * applying any rotation to the whole ClipVector generally expands this range, rather than exactly transforming its planes.\r\n */\r\n public boundingRange: Range3d = Range3d.createNull();\r\n\r\n /** Returns a reference to the array of ClipShapes. */\r\n public get clips() { return this._clips; }\r\n\r\n private constructor(clips?: ClipPrimitive[]) {\r\n this._clips = clips ? clips : [];\r\n }\r\n\r\n /** Returns true if this ClipVector contains a ClipPrimitive. */\r\n public get isValid(): boolean { return this._clips.length > 0; }\r\n\r\n /** Create a ClipVector with an empty set of ClipShapes. */\r\n public static createEmpty(result?: ClipVector): ClipVector {\r\n if (result) {\r\n result._clips.length = 0;\r\n return result;\r\n }\r\n return new ClipVector();\r\n }\r\n\r\n /** Create a ClipVector from an array of ClipPrimitives (or derived classes) (capture the pointers) */\r\n public static createCapture(clips: ClipPrimitive[], result?: ClipVector): ClipVector {\r\n if (result) {\r\n result._clips = clips;\r\n return result;\r\n }\r\n return new ClipVector(clips);\r\n }\r\n\r\n /** Create a ClipVector from (clones of) an array of ClipPrimitives */\r\n public static create(clips: ClipPrimitive[], result?: ClipVector): ClipVector {\r\n const clipClones: ClipPrimitive[] = [];\r\n for (const clip of clips)\r\n clipClones.push(clip.clone());\r\n return ClipVector.createCapture(clipClones, result);\r\n }\r\n\r\n /** Create a deep copy of another ClipVector */\r\n public clone(result?: ClipVector): ClipVector {\r\n const retVal = result ? result : new ClipVector();\r\n retVal._clips.length = 0;\r\n for (const clip of this._clips) {\r\n retVal._clips.push(clip.clone());\r\n }\r\n retVal.boundingRange.setFrom(this.boundingRange);\r\n return retVal;\r\n }\r\n\r\n /** Parse this ClipVector into a JSON object. */\r\n public toJSON(): ClipVectorProps {\r\n if (!this.isValid)\r\n return [];\r\n\r\n return this.clips.map((clip) => clip.toJSON());\r\n }\r\n\r\n /** Parse a JSON object into a new ClipVector. */\r\n public static fromJSON(json: ClipVectorProps | undefined, result?: ClipVector): ClipVector {\r\n result = result ? result : new ClipVector();\r\n result.clear();\r\n if (!Array.isArray(json))\r\n return result;\r\n\r\n try {\r\n for (const clip of json) {\r\n const clipPrim = ClipPrimitive.fromJSON(clip);\r\n if (clipPrim)\r\n result._clips.push(clipPrim);\r\n }\r\n } catch (e) {\r\n result.clear();\r\n }\r\n\r\n return result;\r\n }\r\n\r\n /** Empties out the array of ClipShapes. */\r\n public clear() {\r\n this._clips.length = 0;\r\n }\r\n\r\n /** Append a deep copy of the given ClipPrimitive to this ClipVector. */\r\n public appendClone(clip: ClipPrimitive) {\r\n this._clips.push(clip.clone());\r\n }\r\n\r\n /** Append a reference of the given ClipPrimitive to this ClipVector. */\r\n public appendReference(clip: ClipPrimitive) {\r\n this._clips.push(clip);\r\n }\r\n\r\n /** Create and append a new ClipPrimitive to the array given a shape as an array of points. Returns true if successful. */\r\n public appendShape(shape: Point3d[], zLow?: number, zHigh?: number,\r\n transform?: Transform, isMask: boolean = false, invisible: boolean = false): boolean {\r\n const clip = ClipShape.createShape(shape, zLow, zHigh, transform, isMask, invisible);\r\n if (!clip)\r\n return false;\r\n this._clips.push(clip);\r\n return true;\r\n }\r\n\r\n /** Returns true if the given point lies inside all of this ClipVector's ClipShapes (by rule of intersection).*/\r\n public pointInside(point: Point3d, onTolerance: number = Geometry.smallMetricDistanceSquared): boolean {\r\n return this.isPointOnOrInside(point, onTolerance);\r\n }\r\n\r\n /** Method from [[Clipper]] interface.\r\n * * Implement as dispatch to clipPlaneSets as supplied by derived class.\r\n */\r\n public isPointOnOrInside(point: Point3d, onTolerance: number = Geometry.smallMetricDistanceSquared): boolean {\r\n if (!this.boundingRange.isNull && !this.boundingRange.containsPoint(point))\r\n return false;\r\n\r\n for (const clip of this._clips) {\r\n if (!clip.pointInside(point, onTolerance))\r\n return false;\r\n }\r\n return true;\r\n }\r\n // Proxy object to implement line and arc clip.\r\n private _clipNodeProxy?: BooleanClipNodeIntersection;\r\n private ensureProxyClipNode(): boolean{\r\n if (this._clipNodeProxy)\r\n return true;\r\n this._clipNodeProxy = new BooleanClipNodeIntersection(true);\r\n let numChildren = 0;\r\n for (const child of this._clips) {\r\n const q = child.fetchClipPlanesRef();\r\n if (q) {\r\n numChildren++;\r\n this._clipNodeProxy.captureChild(q);\r\n }\r\n }\r\n return numChildren > 0;\r\n }\r\n /** Method from [[Clipper]] interface.\r\n * * Implement as dispatch to clipPlaneSets as supplied by derived class.\r\n */\r\n public announceClippedSegmentIntervals(f0: number, f1: number, pointA: Point3d, pointB: Point3d, announce?: AnnounceNumberNumber): boolean {\r\n this.ensureProxyClipNode();\r\n if (this._clipNodeProxy)\r\n return this._clipNodeProxy.announceClippedSegmentIntervals(f0, f1, pointA, pointB, announce);\r\n return false;\r\n }\r\n /** Method from [[Clipper]] interface.\r\n * * Implement as dispatch to clipPlaneSets as supplied by derived class.\r\n */\r\n public announceClippedArcIntervals(arc: Arc3d, announce?: AnnounceNumberNumberCurvePrimitive): boolean {\r\n this.ensureProxyClipNode();\r\n if (this._clipNodeProxy)\r\n return this._clipNodeProxy.announceClippedArcIntervals(arc, announce);\r\n return false;\r\n }\r\n/** Execute polygon clip as intersection of the child primitives. */\r\n public appendPolygonClip(\r\n xyz: GrowableXYZArray,\r\n insideFragments: GrowableXYZArray[],\r\n outsideFragments: GrowableXYZArray[],\r\n arrayCache: GrowableXYZArrayCache) {\r\n this.ensureProxyClipNode();\r\n if (this._clipNodeProxy)\r\n this._clipNodeProxy.appendPolygonClip(xyz, insideFragments, outsideFragments, arrayCache);\r\n }\r\n /** Transforms this ClipVector to a new coordinate-system.\r\n * Note that if the transform has rotate and scale the boundingRange member expands.\r\n * Returns true if successful.\r\n */\r\n public transformInPlace(transform: Transform): boolean {\r\n for (const clip of this._clips)\r\n if (clip.transformInPlace(transform) === false)\r\n return false;\r\n\r\n if (!this.boundingRange.isNull)\r\n transform.multiplyRange(this.boundingRange, this.boundingRange);\r\n\r\n return true;\r\n }\r\n\r\n /**\r\n * A simple way of packaging this ClipVector's ClipShape points into a multidimensional array, while also\r\n * taking into account each ClipPrimitive's individual transforms.\r\n *\r\n * ClipPrimitives OTHER THAN ClipShape are ignored.\r\n *\r\n * Information out:\r\n * - All of the loop points are stored in the multidimensional Point3d array given (will return unchanged upon failure)\r\n * - If given a transform, will be set from the transformFromClip of the first ClipPrimitive\r\n * - The ClipMask of the final ClipPrimitive is stored in the returned array at index 0\r\n * - The last valid zLow found is stored in the returned array at index 1\r\n * - The last valid zHigh found is stored in the returned array at index 2\r\n */\r\n public extractBoundaryLoops(loopPoints: Point3d[][], transform?: Transform): number[] {\r\n let clipM = ClipMaskXYZRangePlanes.None;\r\n let zBack = -Number.MAX_VALUE;\r\n let zFront = Number.MAX_VALUE;\r\n const retVal: number[] = [];\r\n let nLoops = 0;\r\n\r\n if (this._clips.length === 0)\r\n return retVal;\r\n let firstClipShape: ClipShape | undefined;\r\n const deltaTrans = Transform.createIdentity();\r\n\r\n for (const clip of this._clips) {\r\n if (clip instanceof ClipShape) {\r\n if (firstClipShape !== undefined && clip !== firstClipShape) { // Is not the first iteration\r\n let fwdTrans = Transform.createIdentity();\r\n let invTrans = Transform.createIdentity();\r\n\r\n if (firstClipShape.transformValid && clip.transformValid) {\r\n fwdTrans = clip.transformFromClip!.clone();\r\n invTrans = firstClipShape.transformToClip!.clone();\r\n }\r\n deltaTrans.setFrom(invTrans.multiplyTransformTransform(fwdTrans));\r\n }\r\n if (!firstClipShape)\r\n firstClipShape = clip;\r\n loopPoints[nLoops] = [];\r\n\r\n if (clip.polygon !== undefined) {\r\n clipM = ClipMaskXYZRangePlanes.XAndY;\r\n\r\n if (clip.zHighValid) {\r\n clipM = clipM | ClipMaskXYZRangePlanes.ZHigh;\r\n zFront = clip.zHigh!;\r\n }\r\n if (clip.zLowValid) {\r\n clipM = clipM | ClipMaskXYZRangePlanes.ZLow;\r\n zBack = clip.zLow!;\r\n }\r\n\r\n for (const point of clip.polygon)\r\n loopPoints[nLoops].push(point.clone());\r\n deltaTrans.multiplyPoint3dArray(loopPoints[nLoops], loopPoints[nLoops]);\r\n nLoops++;\r\n }\r\n }\r\n }\r\n\r\n retVal.push(clipM);\r\n retVal.push(zBack);\r\n retVal.push(zFront);\r\n\r\n if (transform && firstClipShape)\r\n transform.setFrom(firstClipShape.transformFromClip!);\r\n\r\n return retVal;\r\n }\r\n\r\n /** Sets this ClipVector and all of its members to the visibility specified. */\r\n public setInvisible(invisible: boolean) {\r\n for (const clip of this._clips)\r\n clip.setInvisible(invisible);\r\n }\r\n\r\n /** For every clip, parse the member point array into the member clip plane object (only for clipPlanes member, not the mask) */\r\n public parseClipPlanes() {\r\n for (const clip of this._clips)\r\n clip.fetchClipPlanesRef();\r\n }\r\n\r\n /**\r\n * Multiply all ClipPlanes DPoint4d by matrix.\r\n * @param matrix matrix to apply.\r\n * @param invert if true, use in verse of the matrix.\r\n * @param transpose if true, use the transpose of the matrix (or inverse, per invert parameter)\r\n * * Note that if matrixA is applied to all of space, the matrix to send to this method to get a corresponding effect on the plane is the inverse transpose of matrixA\r\n * * Callers that will apply the same matrix to many planes should pre-invert the matrix for efficiency.\r\n * * Both params default to true to get the full effect of transforming space.\r\n * @param matrix matrix to apply\r\n * @returns false if matrix inversion fails.\r\n */\r\n public multiplyPlanesByMatrix4d(matrix: Matrix4d, invert: boolean = true, transpose: boolean = true): boolean {\r\n if (invert) { // form inverse once here, reuse for all planes\r\n const inverse = matrix.createInverse();\r\n if (!inverse)\r\n return false;\r\n return this.multiplyPlanesByMatrix4d(inverse, false, transpose);\r\n }\r\n // no inverse necessary -- lower level cannot fail.\r\n for (const clip of this._clips)\r\n clip.multiplyPlanesByMatrix4d(matrix, false, transpose);\r\n return true;\r\n }\r\n\r\n /**\r\n * Determines whether the given points fall inside or outside this set of ClipShapes. If any set is defined by masking planes,\r\n * checks the mask planes only, provided that ignoreMasks is false. Otherwise, checks the _clipPlanes member.\r\n */\r\n public classifyPointContainment(points: Point3d[], ignoreMasks: boolean = false): ClipPlaneContainment {\r\n let currentContainment = ClipPlaneContainment.Ambiguous;\r\n\r\n for (const primitive of this._clips) {\r\n const thisContainment = primitive.classifyPointContainment(points, ignoreMasks);\r\n\r\n if (ClipPlaneContainment.Ambiguous === thisContainment)\r\n return ClipPlaneContainment.Ambiguous;\r\n\r\n if (ClipPlaneContainment.Ambiguous === currentContainment)\r\n currentContainment = thisContainment;\r\n else if (currentContainment !== thisContainment)\r\n return ClipPlaneContainment.Ambiguous;\r\n }\r\n return currentContainment;\r\n }\r\n\r\n /**\r\n * Determines whether a 3D range lies inside or outside this set of ClipShapes. If any set is defined by masking planes,\r\n * checks the mask planes only, provided that ignoreMasks is false. Otherwise, checks the clip planes member.\r\n */\r\n public classifyRangeContainment(range: Range3d, ignoreMasks: boolean): ClipPlaneContainment {\r\n const corners: Point3d[] = range.corners();\r\n return this.classifyPointContainment(corners, ignoreMasks);\r\n }\r\n\r\n /**\r\n * For an array of points (making up a LineString), tests whether the segment between each point lies inside the ClipVector.\r\n * If true, returns true immediately.\r\n */\r\n public isAnyLineStringPointInside(points: Point3d[]): boolean {\r\n for (const clip of this._clips) {\r\n const clipPlaneSet = clip.fetchClipPlanesRef();\r\n if (clipPlaneSet !== undefined) {\r\n for (let i = 0; i + 1 < points.length; i++) {\r\n const segment = LineSegment3d.create(points[i], points[i + 1]);\r\n if (clipPlaneSet.isAnyPointInOrOnFromSegment(segment))\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /** Note: Line segments are used to represent 1 dimensional intervals here, rather than segments. */\r\n public sumSizes(intervals: Segment1d[], begin: number, end: number): number {\r\n let s = 0.0;\r\n for (let i = begin; i < end; i++)\r\n s += (intervals[i].x1 - intervals[i].x0);\r\n return s;\r\n }\r\n\r\n private static readonly _TARGET_FRACTION_SUM = 0.99999999;\r\n /**\r\n * For an array of points that make up a LineString, develops a line segment between each point pair,\r\n * and returns true if all segments lie inside this ClipVector.\r\n */\r\n public isLineStringCompletelyContained(points: Point3d[]): boolean {\r\n const clipIntervals: Segment1d[] = [];\r\n\r\n for (let i = 0; i + 1 < points.length; i++) {\r\n const segment = LineSegment3d.create(points[i], points[i + 1]);\r\n let fractionSum = 0.0;\r\n let index0 = 0;\r\n\r\n for (const clip of this._clips) {\r\n const clipPlaneSet = clip.fetchClipPlanesRef();\r\n if (clipPlaneSet !== undefined) {\r\n clipPlaneSet.appendIntervalsFromSegment(segment, clipIntervals);\r\n const index1 = clipIntervals.length;\r\n fractionSum += this.sumSizes(clipIntervals, index0, index1);\r\n index0 = index1;\r\n // ASSUME primitives are non-overlapping...\r\n if (fractionSum >= ClipVector._TARGET_FRACTION_SUM)\r\n break;\r\n }\r\n }\r\n if (fractionSum < ClipVector._TARGET_FRACTION_SUM)\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n /** Serializes this ClipVector to a compact string representation appropriate for transmission as part of a URL.\r\n * Chiefly used for requesting [Tile]($frontend)s with section cut facets.\r\n * UnionOfConvexClipPlaneSets is obtained for each ClipPrimitive. The encoding is as follows:\r\n * ClipVector:\r\n * ClipPrimitive[]\r\n * _\r\n * ClipPrimitive:\r\n * invisible: 0|1\r\n * ConvexClipPlaneSet[]\r\n * _\r\n * ConvexClipPlaneSet:\r\n * ClipPlane[]\r\n * _\r\n * ClipPlane:\r\n * flags: 0|1|2|3, where 1=invisible and 2=interior\r\n * inwardNormal: Number[3]\r\n * distance: Number\r\n * Number:\r\n * number\r\n * _\r\n */\r\n public toCompactString(): string {\r\n function formatNumber(num: number) {\r\n return `${num.toString()}_`;\r\n }\r\n\r\n function formatVector3d(vec: Vector3d) {\r\n return `${formatNumber(vec.x)}${formatNumber(vec.y)}${formatNumber(vec.z)}`;\r\n }\r\n\r\n function formatFlags(flags: number) {\r\n const f = flags.toString();\r\n assert(1 === f.length);\r\n return f;\r\n }\r\n\r\n function formatPlane(plane: ClipPlane) {\r\n let flags = plane.invisible ? 1 : 0;\r\n flags |= (plane.interior ? 2 : 0);\r\n return `${formatFlags(flags)}${formatVector3d(plane.inwardNormalRef)}${formatNumber(plane.distance)}`;\r\n }\r\n\r\n function formatPlaneSet(set: ConvexClipPlaneSet) {\r\n let planes = \"\";\r\n for (const plane of set.planes)\r\n planes = `${planes}${formatPlane(plane)}`;\r\n\r\n return `${planes}_`;\r\n }\r\n\r\n function formatPrimitive(prim: ClipPrimitive) {\r\n const flags = prim.invisible ? 1 : 0;\r\n let str = flags.toString();\r\n assert(1 === str.length);\r\n\r\n const union = prim.fetchClipPlanesRef();\r\n if (union) {\r\n for (const s of union.convexSets)\r\n str = `${str}${formatPlaneSet(s)}`;\r\n }\r\n\r\n return `${str}_`;\r\n }\r\n\r\n let result = \"\";\r\n for (const primitive of this.clips)\r\n result = `${result}${formatPrimitive(primitive)}`;\r\n\r\n return `${result}_`;\r\n }\r\n}\r\n\r\n/** Bundles a [[ClipVector]] with its compact string representation.\r\n * @note The string representation is computed once; the ClipVector is assumed not to be subsequently modified.\r\n * @see [[StringifiedClipVector.fromClipVector]] to create from a ClipVector.\r\n * @see [[ClipVector.toCompactString]] for a description of the string representation.\r\n * @alpha\r\n */\r\nexport type StringifiedClipVector = ClipVector & { readonly clipString: string };\r\n\r\n/** Bundles a ClipVector with its compact string representation.\r\n * @note The string representation is computed once; the ClipVector is assumed not to be subsequently modified.\r\n * @alpha\r\n */\r\nexport namespace StringifiedClipVector { // eslint-disable-line @typescript-eslint/no-redeclare\r\n /** Create from a ClipVector.\r\n * @param clip The ClipVector to stringify.\r\n * @returns The input ClipVector with its compact string representation, or undefined if the input is undefined or empty.\r\n * @note The string representation is computed once; the ClipVector is assumed not to be subsequently modified.\r\n */\r\n export function fromClipVector(clip?: ClipVector): StringifiedClipVector | undefined {\r\n if (!clip || !clip.isValid)\r\n return undefined;\r\n\r\n const ret = clip as any;\r\n if (undefined === ret.clipString)\r\n ret.clipString = clip.toCompactString();\r\n\r\n const stringified = ret as StringifiedClipVector;\r\n assert(undefined !== stringified.clipString);\r\n return stringified;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ClipVector.js","sourceRoot":"","sources":["../../../src/clipping/ClipVector.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAIpD,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAsB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvG,OAAO,EAAW,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAE5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAWhE;;;;;;GAMG;AACH,MAAa,UAAU;IASrB,sDAAsD;IAC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AAM,GAAG,GAAG,MAAM,GAAG,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC;QACpD,OAAO,GAAG,MAAM,GAAG,CAAC;IACtB,CAAC;;AA5FuB,+BAAoB,GAAG,UAAU,AAAb,CAAc;SAzU/C,UAAU;AAibvB;;;;GAIG;AACH,MAAM,KAAW,qBAAqB,CAkBrC;AAlBD,WAAiB,qBAAqB;IACpC;;;;OAIG;IACH,SAAgB,cAAc,CAAC,IAAiB;QAC9C,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO;YACxB,OAAO,SAAS,CAAC;QAEnB,MAAM,GAAG,GAAG,IAAW,CAAC;QACxB,IAAI,SAAS,KAAK,GAAG,CAAC,UAAU;YAC9B,GAAG,CAAC,UAAU,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAE1C,MAAM,WAAW,GAAG,GAA4B,CAAC;QACjD,MAAM,CAAC,SAAS,KAAK,WAAW,CAAC,UAAU,CAAC,CAAC;QAC7C,OAAO,WAAW,CAAC;IACrB,CAAC;IAXe,oCAAc,iBAW7B,CAAA;AACH,CAAC,EAlBgB,qBAAqB,KAArB,qBAAqB,QAkBrC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module CartesianGeometry\n */\n\nimport { assert } from \"@itwin/core-bentley\";\nimport { LineSegment3d } from \"../curve/LineSegment3d\";\nimport { Geometry } from \"../Geometry\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { Range3d } from \"../geometry3d/Range\";\nimport { Segment1d } from \"../geometry3d/Segment1d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { Matrix4d } from \"../geometry4d/Matrix4d\";\nimport { ClipPlane } from \"./ClipPlane\";\nimport { AnnounceNumberNumber, AnnounceNumberNumberCurvePrimitive } from \"../curve/CurvePrimitive\";\nimport { ClipMaskXYZRangePlanes, ClipPrimitive, ClipPrimitiveProps, ClipShape } from \"./ClipPrimitive\";\nimport { Clipper, ClipPlaneContainment } from \"./ClipUtils\";\nimport { ConvexClipPlaneSet } from \"./ConvexClipPlaneSet\";\nimport { BooleanClipNodeIntersection } from \"./BooleanClipNode\";\nimport { Arc3d } from \"../curve/Arc3d\";\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\nimport { GrowableXYZArrayCache } from \"../geometry3d/ReusableObjectCache\";\n\n/**\n * Wire format describing a [[ClipVector]].\n * @public\n */\nexport type ClipVectorProps = ClipPrimitiveProps[];\n\n/**\n * Class holding an array structure of shapes defined by `ClipPrimitive`\n * * The `ClipVector` defines an intersection of the member `ClipPrimitive` regions.\n * * In the most common usage, one of the `ClipPrimitive` will be an outer region, and all others are holes with marker\n * flag indicating that the outside of each hole is live.\n * @public\n */\nexport class ClipVector implements Clipper {\n private _clips: ClipPrimitive[];\n /**\n * Range acting as first filter.\n * * This is understood as overall range limit, not as precise planes.\n * * Applying any rotation to the whole ClipVector generally expands this range, rather than exactly transforming\n * its planes.\n */\n public boundingRange: Range3d = Range3d.createNull();\n /** Returns a reference to the array of ClipShapes. */\n public get clips() { return this._clips; }\n private constructor(clips?: ClipPrimitive[]) {\n this._clips = clips ? clips : [];\n }\n /** Returns true if this ClipVector contains a ClipPrimitive. */\n public get isValid(): boolean { return this._clips.length > 0; }\n /** Create a ClipVector with an empty set of ClipShapes. */\n public static createEmpty(result?: ClipVector): ClipVector {\n if (result) {\n result._clips.length = 0;\n return result;\n }\n return new ClipVector();\n }\n /** Create a ClipVector from an array of ClipPrimitives (or derived classes) (capture the pointers) */\n public static createCapture(clips: ClipPrimitive[], result?: ClipVector): ClipVector {\n if (result) {\n result._clips = clips;\n return result;\n }\n return new ClipVector(clips);\n }\n /** Create a ClipVector from (clones of) an array of ClipPrimitives */\n public static create(clips: ClipPrimitive[], result?: ClipVector): ClipVector {\n const clipClones: ClipPrimitive[] = [];\n for (const clip of clips)\n clipClones.push(clip.clone());\n return ClipVector.createCapture(clipClones, result);\n }\n /** Create a deep copy of another ClipVector */\n public clone(result?: ClipVector): ClipVector {\n const retVal = result ? result : new ClipVector();\n retVal._clips.length = 0;\n for (const clip of this._clips) {\n retVal._clips.push(clip.clone());\n }\n retVal.boundingRange.setFrom(this.boundingRange);\n return retVal;\n }\n /** Parse this ClipVector into a JSON object. */\n public toJSON(): ClipVectorProps {\n if (!this.isValid)\n return [];\n\n return this.clips.map((clip) => clip.toJSON());\n }\n /** Parse a JSON object into a new ClipVector. */\n public static fromJSON(json: ClipVectorProps | undefined, result?: ClipVector): ClipVector {\n result = result ? result : new ClipVector();\n result.clear();\n if (!Array.isArray(json))\n return result;\n try {\n for (const clip of json) {\n const clipPrim = ClipPrimitive.fromJSON(clip);\n if (clipPrim)\n result._clips.push(clipPrim);\n }\n } catch (e) {\n result.clear();\n }\n return result;\n }\n /** Empties out the array of ClipShapes. */\n public clear() {\n this._clips.length = 0;\n }\n /** Append a deep copy of the given ClipPrimitive to this ClipVector. */\n public appendClone(clip: ClipPrimitive) {\n this._clips.push(clip.clone());\n }\n /** Append a reference of the given ClipPrimitive to this ClipVector. */\n public appendReference(clip: ClipPrimitive) {\n this._clips.push(clip);\n }\n /** Create and append a new ClipPrimitive to the array given a shape as an array of points. Returns true if successful. */\n public appendShape(shape: Point3d[], zLow?: number, zHigh?: number,\n transform?: Transform, isMask: boolean = false, invisible: boolean = false): boolean {\n const clip = ClipShape.createShape(shape, zLow, zHigh, transform, isMask, invisible);\n if (!clip)\n return false;\n this._clips.push(clip);\n return true;\n }\n /** Returns true if the given point lies inside all of this ClipVector's ClipShapes (by rule of intersection).*/\n public pointInside(point: Point3d, onTolerance: number = Geometry.smallMetricDistanceSquared): boolean {\n return this.isPointOnOrInside(point, onTolerance);\n }\n /**\n * Method from [[Clipper]] interface.\n * * Implement as dispatch to clipPlaneSets as supplied by derived class.\n */\n public isPointOnOrInside(point: Point3d, onTolerance: number = Geometry.smallMetricDistanceSquared): boolean {\n if (!this.boundingRange.isNull && !this.boundingRange.containsPoint(point))\n return false;\n\n for (const clip of this._clips) {\n if (!clip.pointInside(point, onTolerance))\n return false;\n }\n return true;\n }\n // Proxy object to implement line and arc clip.\n private _clipNodeProxy?: BooleanClipNodeIntersection;\n private ensureProxyClipNode(): boolean {\n if (this._clipNodeProxy)\n return true;\n this._clipNodeProxy = new BooleanClipNodeIntersection(true);\n let numChildren = 0;\n for (const child of this._clips) {\n const q = child.fetchClipPlanesRef();\n if (q) {\n numChildren++;\n this._clipNodeProxy.captureChild(q);\n }\n }\n return numChildren > 0;\n }\n /**\n * Method from [[Clipper]] interface.\n * * Implement as dispatch to clipPlaneSets as supplied by derived class.\n */\n public announceClippedSegmentIntervals(\n f0: number, f1: number, pointA: Point3d, pointB: Point3d, announce?: AnnounceNumberNumber,\n ): boolean {\n this.ensureProxyClipNode();\n if (this._clipNodeProxy)\n return this._clipNodeProxy.announceClippedSegmentIntervals(f0, f1, pointA, pointB, announce);\n return false;\n }\n /** Method from [[Clipper]] interface.\n * * Implement as dispatch to clipPlaneSets as supplied by derived class.\n */\n public announceClippedArcIntervals(arc: Arc3d, announce?: AnnounceNumberNumberCurvePrimitive): boolean {\n this.ensureProxyClipNode();\n if (this._clipNodeProxy)\n return this._clipNodeProxy.announceClippedArcIntervals(arc, announce);\n return false;\n }\n /** Execute polygon clip as intersection of the child primitives. */\n public appendPolygonClip(\n xyz: GrowableXYZArray,\n insideFragments: GrowableXYZArray[],\n outsideFragments: GrowableXYZArray[],\n arrayCache: GrowableXYZArrayCache) {\n this.ensureProxyClipNode();\n if (this._clipNodeProxy)\n this._clipNodeProxy.appendPolygonClip(xyz, insideFragments, outsideFragments, arrayCache);\n }\n /**\n * Transforms this ClipVector to a new coordinate-system.\n * Note that if the transform has rotate and scale the boundingRange member expands.\n * Returns true if successful.\n */\n public transformInPlace(transform: Transform): boolean {\n for (const clip of this._clips)\n if (clip.transformInPlace(transform) === false)\n return false;\n\n if (!this.boundingRange.isNull)\n transform.multiplyRange(this.boundingRange, this.boundingRange);\n\n return true;\n }\n /**\n * A simple way of packaging this ClipVector's ClipShape points into a multidimensional array, while also\n * taking into account each ClipPrimitive's individual transforms.\n * ClipPrimitives OTHER THAN ClipShape are ignored.\n * Information out:\n * - All of the loop points are stored in the multidimensional Point3d array given (will return unchanged upon failure).\n * - If given a transform, will be set from the transformFromClip of the first ClipPrimitive.\n * - The ClipMask of the final ClipPrimitive is stored in the returned array at index 0.\n * - The last valid zLow found is stored in the returned array at index 1.\n * - The last valid zHigh found is stored in the returned array at index 2.\n */\n public extractBoundaryLoops(loopPoints: Point3d[][], transform?: Transform): number[] {\n let clipM = ClipMaskXYZRangePlanes.None;\n let zBack = -Number.MAX_VALUE;\n let zFront = Number.MAX_VALUE;\n const retVal: number[] = [];\n let nLoops = 0;\n\n if (this._clips.length === 0)\n return retVal;\n let firstClipShape: ClipShape | undefined;\n const deltaTrans = Transform.createIdentity();\n\n for (const clip of this._clips) {\n if (clip instanceof ClipShape) {\n if (firstClipShape !== undefined && clip !== firstClipShape) { // Is not the first iteration\n let fwdTrans = Transform.createIdentity();\n let invTrans = Transform.createIdentity();\n\n if (firstClipShape.transformValid && clip.transformValid) {\n fwdTrans = clip.transformFromClip!.clone();\n invTrans = firstClipShape.transformToClip!.clone();\n }\n deltaTrans.setFrom(invTrans.multiplyTransformTransform(fwdTrans));\n }\n if (!firstClipShape)\n firstClipShape = clip;\n loopPoints[nLoops] = [];\n\n if (clip.polygon !== undefined) {\n clipM = ClipMaskXYZRangePlanes.XAndY;\n\n if (clip.zHighValid) {\n clipM = clipM | ClipMaskXYZRangePlanes.ZHigh;\n zFront = clip.zHigh!;\n }\n if (clip.zLowValid) {\n clipM = clipM | ClipMaskXYZRangePlanes.ZLow;\n zBack = clip.zLow!;\n }\n\n for (const point of clip.polygon)\n loopPoints[nLoops].push(point.clone());\n deltaTrans.multiplyPoint3dArray(loopPoints[nLoops], loopPoints[nLoops]);\n nLoops++;\n }\n }\n }\n retVal.push(clipM);\n retVal.push(zBack);\n retVal.push(zFront);\n if (transform && firstClipShape)\n transform.setFrom(firstClipShape.transformFromClip!);\n return retVal;\n }\n /** Sets this ClipVector and all of its members to the visibility specified. */\n public setInvisible(invisible: boolean) {\n for (const clip of this._clips)\n clip.setInvisible(invisible);\n }\n /**\n * For every clip, parse the member point array into the member clip plane object (only for clipPlanes member,\n * not the mask)\n */\n public parseClipPlanes() {\n for (const clip of this._clips)\n clip.fetchClipPlanesRef();\n }\n /**\n * Multiply all ClipPlanes DPoint4d by matrix.\n * @param matrix matrix to apply.\n * @param invert if true, use in verse of the matrix.\n * @param transpose if true, use the transpose of the matrix (or inverse, per invert parameter)\n * * Note that if matrixA is applied to all of space, the matrix to send to this method to get a corresponding effect on the plane is the inverse transpose of matrixA\n * * Callers that will apply the same matrix to many planes should pre-invert the matrix for efficiency.\n * * Both params default to true to get the full effect of transforming space.\n * @param matrix matrix to apply\n * @returns false if matrix inversion fails.\n */\n public multiplyPlanesByMatrix4d(matrix: Matrix4d, invert: boolean = true, transpose: boolean = true): boolean {\n if (invert) { // form inverse once here, reuse for all planes\n const inverse = matrix.createInverse();\n if (!inverse)\n return false;\n return this.multiplyPlanesByMatrix4d(inverse, false, transpose);\n }\n // no inverse necessary -- lower level cannot fail.\n for (const clip of this._clips)\n clip.multiplyPlanesByMatrix4d(matrix, false, transpose);\n return true;\n }\n /**\n * Determines whether the given points fall inside or outside this set of ClipShapes. If any set is defined\n * by masking planes, checks the mask planes only, provided that ignoreMasks is false. Otherwise, checks the\n * _clipPlanes member.\n */\n public classifyPointContainment(points: Point3d[], ignoreMasks: boolean = false): ClipPlaneContainment {\n let currentContainment = ClipPlaneContainment.Ambiguous;\n\n for (const primitive of this._clips) {\n const thisContainment = primitive.classifyPointContainment(points, ignoreMasks);\n\n if (ClipPlaneContainment.Ambiguous === thisContainment)\n return ClipPlaneContainment.Ambiguous;\n\n if (ClipPlaneContainment.Ambiguous === currentContainment)\n currentContainment = thisContainment;\n else if (currentContainment !== thisContainment)\n return ClipPlaneContainment.Ambiguous;\n }\n return currentContainment;\n }\n /**\n * Determines whether a 3D range lies inside or outside this set of ClipShapes. If any set is defined by masking planes,\n * checks the mask planes only, provided that ignoreMasks is false. Otherwise, checks the clip planes member.\n */\n public classifyRangeContainment(range: Range3d, ignoreMasks: boolean): ClipPlaneContainment {\n const corners: Point3d[] = range.corners();\n return this.classifyPointContainment(corners, ignoreMasks);\n }\n /**\n * For an array of points (making up a LineString), tests whether the segment between each point lies inside the\n * ClipVector.\n * If true, returns true immediately.\n */\n public isAnyLineStringPointInside(points: Point3d[]): boolean {\n for (const clip of this._clips) {\n const clipPlaneSet = clip.fetchClipPlanesRef();\n if (clipPlaneSet !== undefined) {\n for (let i = 0; i + 1 < points.length; i++) {\n const segment = LineSegment3d.create(points[i], points[i + 1]);\n if (clipPlaneSet.isAnyPointInOrOnFromSegment(segment))\n return true;\n }\n }\n }\n return false;\n }\n /** Note: Line segments are used to represent 1 dimensional intervals here, rather than segments. */\n public sumSizes(intervals: Segment1d[], begin: number, end: number): number {\n let s = 0.0;\n for (let i = begin; i < end; i++)\n s += (intervals[i].x1 - intervals[i].x0);\n return s;\n }\n private static readonly _TARGET_FRACTION_SUM = 0.99999999;\n /**\n * For an array of points that make up a LineString, develops a line segment between each point pair,\n * and returns true if all segments lie inside this ClipVector.\n */\n public isLineStringCompletelyContained(points: Point3d[]): boolean {\n const clipIntervals: Segment1d[] = [];\n\n for (let i = 0; i + 1 < points.length; i++) {\n const segment = LineSegment3d.create(points[i], points[i + 1]);\n let fractionSum = 0.0;\n let index0 = 0;\n\n for (const clip of this._clips) {\n const clipPlaneSet = clip.fetchClipPlanesRef();\n if (clipPlaneSet !== undefined) {\n clipPlaneSet.appendIntervalsFromSegment(segment, clipIntervals);\n const index1 = clipIntervals.length;\n fractionSum += this.sumSizes(clipIntervals, index0, index1);\n index0 = index1;\n // ASSUME primitives are non-overlapping...\n if (fractionSum >= ClipVector._TARGET_FRACTION_SUM)\n break;\n }\n }\n if (fractionSum < ClipVector._TARGET_FRACTION_SUM)\n return false;\n }\n return true;\n }\n /**\n * Serializes this ClipVector to a compact string representation appropriate for transmission as part of a URL.\n * Chiefly used for requesting [Tile]($frontend)s with section cut facets.\n * UnionOfConvexClipPlaneSets is obtained for each ClipPrimitive. The encoding is as follows:\n * ClipVector:\n * ClipPrimitive[]\n * _\n * ClipPrimitive:\n * invisible: 0|1\n * ConvexClipPlaneSet[]\n * _\n * ConvexClipPlaneSet:\n * ClipPlane[]\n * _\n * ClipPlane:\n * flags: 0|1|2|3, where 1=invisible and 2=interior\n * inwardNormal: Number[3]\n * distance: Number\n * Number:\n * number\n * _\n */\n public toCompactString(): string {\n function formatNumber(num: number) {\n return `${num.toString()}_`;\n }\n function formatVector3d(vec: Vector3d) {\n return `${formatNumber(vec.x)}${formatNumber(vec.y)}${formatNumber(vec.z)}`;\n }\n function formatFlags(flags: number) {\n const f = flags.toString();\n assert(1 === f.length);\n return f;\n }\n function formatPlane(plane: ClipPlane) {\n let flags = plane.invisible ? 1 : 0;\n flags |= (plane.interior ? 2 : 0);\n return `${formatFlags(flags)}${formatVector3d(plane.inwardNormalRef)}${formatNumber(plane.distance)}`;\n }\n function formatPlaneSet(set: ConvexClipPlaneSet) {\n let planes = \"\";\n for (const plane of set.planes)\n planes = `${planes}${formatPlane(plane)}`;\n\n return `${planes}_`;\n }\n function formatPrimitive(prim: ClipPrimitive) {\n const flags = prim.invisible ? 1 : 0;\n let str = flags.toString();\n assert(1 === str.length);\n\n const union = prim.fetchClipPlanesRef();\n if (union) {\n for (const s of union.convexSets)\n str = `${str}${formatPlaneSet(s)}`;\n }\n return `${str}_`;\n }\n let result = \"\";\n for (const primitive of this.clips)\n result = `${result}${formatPrimitive(primitive)}`;\n return `${result}_`;\n }\n}\n\n/**\n * Bundles a [[ClipVector]] with its compact string representation.\n * @note The string representation is computed once; the ClipVector is assumed not to be subsequently modified.\n * @see [[StringifiedClipVector.fromClipVector]] to create from a ClipVector.\n * @see [[ClipVector.toCompactString]] for a description of the string representation.\n * @alpha\n */\nexport type StringifiedClipVector = ClipVector & { readonly clipString: string };\n\n/**\n * Bundles a ClipVector with its compact string representation.\n * @note The string representation is computed once; the ClipVector is assumed not to be subsequently modified.\n * @alpha\n */\nexport namespace StringifiedClipVector { // eslint-disable-line @typescript-eslint/no-redeclare\n /** Create from a ClipVector.\n * @param clip The ClipVector to stringify.\n * @returns The input ClipVector with its compact string representation, or undefined if the input is undefined or empty.\n * @note The string representation is computed once; the ClipVector is assumed not to be subsequently modified.\n */\n export function fromClipVector(clip?: ClipVector): StringifiedClipVector | undefined {\n if (!clip || !clip.isValid)\n return undefined;\n\n const ret = clip as any;\n if (undefined === ret.clipString)\n ret.clipString = clip.toCompactString();\n\n const stringified = ret as StringifiedClipVector;\n assert(undefined !== stringified.clipString);\n return stringified;\n }\n}\n"]}