@itwin/core-geometry 5.0.0-dev.99 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (444) hide show
  1. package/CHANGELOG.md +48 -1
  2. package/lib/cjs/Geometry.d.ts +15 -4
  3. package/lib/cjs/Geometry.d.ts.map +1 -1
  4. package/lib/cjs/Geometry.js +17 -3
  5. package/lib/cjs/Geometry.js.map +1 -1
  6. package/lib/cjs/bspline/BSpline1dNd.d.ts +1 -1
  7. package/lib/cjs/bspline/BSpline1dNd.js +1 -1
  8. package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
  9. package/lib/cjs/bspline/BSplineSurface.d.ts +4 -3
  10. package/lib/cjs/bspline/BSplineSurface.d.ts.map +1 -1
  11. package/lib/cjs/bspline/BSplineSurface.js +6 -5
  12. package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
  13. package/lib/cjs/clipping/ClipPlane.d.ts +7 -5
  14. package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
  15. package/lib/cjs/clipping/ClipPlane.js +9 -5
  16. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  17. package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
  18. package/lib/cjs/clipping/ClipUtils.js +5 -3
  19. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  20. package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  21. package/lib/cjs/clipping/ConvexClipPlaneSet.js +12 -23
  22. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  23. package/lib/cjs/core-geometry.d.ts +1 -0
  24. package/lib/cjs/core-geometry.d.ts.map +1 -1
  25. package/lib/cjs/core-geometry.js +1 -0
  26. package/lib/cjs/core-geometry.js.map +1 -1
  27. package/lib/cjs/curve/Arc3d.d.ts +56 -32
  28. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  29. package/lib/cjs/curve/Arc3d.js +91 -36
  30. package/lib/cjs/curve/Arc3d.js.map +1 -1
  31. package/lib/cjs/curve/CurveCollection.d.ts +2 -0
  32. package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
  33. package/lib/cjs/curve/CurveCollection.js +14 -0
  34. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  35. package/lib/cjs/curve/CurveExtendMode.d.ts +13 -5
  36. package/lib/cjs/curve/CurveExtendMode.d.ts.map +1 -1
  37. package/lib/cjs/curve/CurveExtendMode.js +19 -15
  38. package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
  39. package/lib/cjs/curve/CurveLocationDetail.d.ts +1 -1
  40. package/lib/cjs/curve/CurveLocationDetail.js +1 -1
  41. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  42. package/lib/cjs/curve/CurvePrimitive.d.ts +67 -8
  43. package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
  44. package/lib/cjs/curve/CurvePrimitive.js +59 -6
  45. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  46. package/lib/cjs/curve/CurveTypes.d.ts +1 -1
  47. package/lib/cjs/curve/CurveTypes.js.map +1 -1
  48. package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
  49. package/lib/cjs/curve/LineSegment3d.js +1 -0
  50. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  51. package/lib/cjs/curve/LineString3d.d.ts +8 -7
  52. package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
  53. package/lib/cjs/curve/LineString3d.js +25 -22
  54. package/lib/cjs/curve/LineString3d.js.map +1 -1
  55. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  56. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js +10 -5
  57. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  58. package/lib/cjs/curve/Query/PlanarSubdivision.d.ts.map +1 -1
  59. package/lib/cjs/curve/Query/PlanarSubdivision.js +7 -2
  60. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  61. package/lib/cjs/curve/RegionMomentsXY.d.ts +15 -21
  62. package/lib/cjs/curve/RegionMomentsXY.d.ts.map +1 -1
  63. package/lib/cjs/curve/RegionMomentsXY.js +38 -58
  64. package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
  65. package/lib/cjs/curve/RegionOps.d.ts +70 -38
  66. package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
  67. package/lib/cjs/curve/RegionOps.js +115 -45
  68. package/lib/cjs/curve/RegionOps.js.map +1 -1
  69. package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts +12 -13
  70. package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
  71. package/lib/cjs/curve/RegionOpsClassificationSweeps.js +23 -23
  72. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  73. package/lib/cjs/curve/StrokeOptions.d.ts +1 -1
  74. package/lib/cjs/curve/StrokeOptions.js +1 -1
  75. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  76. package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.d.ts +71 -0
  77. package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.d.ts.map +1 -0
  78. package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.js +181 -0
  79. package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -0
  80. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.d.ts +21 -5
  81. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.d.ts.map +1 -1
  82. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js +42 -17
  83. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  84. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  85. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +36 -12
  86. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  87. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts +5 -3
  88. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts.map +1 -1
  89. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js +5 -3
  90. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  91. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
  92. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
  93. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js +34 -0
  94. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
  95. package/lib/cjs/geometry3d/AngleSweep.d.ts +25 -18
  96. package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
  97. package/lib/cjs/geometry3d/AngleSweep.js +39 -25
  98. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  99. package/lib/cjs/geometry3d/GeometryHandler.d.ts +15 -16
  100. package/lib/cjs/geometry3d/GeometryHandler.d.ts.map +1 -1
  101. package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
  102. package/lib/cjs/geometry3d/GrowableXYArray.d.ts +1 -1
  103. package/lib/cjs/geometry3d/GrowableXYArray.js +1 -1
  104. package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
  105. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +7 -2
  106. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  107. package/lib/cjs/geometry3d/GrowableXYZArray.js +20 -2
  108. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  109. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +2 -1
  110. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  111. package/lib/cjs/geometry3d/IndexedXYZCollection.js +7 -3
  112. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  113. package/lib/cjs/geometry3d/Matrix3d.d.ts +10 -11
  114. package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
  115. package/lib/cjs/geometry3d/Matrix3d.js +11 -12
  116. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  117. package/lib/cjs/geometry3d/Plane3d.d.ts +2 -0
  118. package/lib/cjs/geometry3d/Plane3d.d.ts.map +1 -1
  119. package/lib/cjs/geometry3d/Plane3d.js +6 -1
  120. package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
  121. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
  122. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
  123. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
  124. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  125. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
  126. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  127. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js +18 -10
  128. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  129. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +4 -4
  130. package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
  131. package/lib/cjs/geometry3d/Point3dVector3d.js +6 -6
  132. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  133. package/lib/cjs/geometry3d/PointHelpers.d.ts +7 -7
  134. package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
  135. package/lib/cjs/geometry3d/PointHelpers.js +66 -26
  136. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  137. package/lib/cjs/geometry3d/PolygonOps.d.ts +57 -9
  138. package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
  139. package/lib/cjs/geometry3d/PolygonOps.js +57 -17
  140. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  141. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
  142. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
  143. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
  144. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  145. package/lib/cjs/geometry3d/PolylineOps.d.ts +5 -4
  146. package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
  147. package/lib/cjs/geometry3d/PolylineOps.js +5 -4
  148. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  149. package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
  150. package/lib/cjs/geometry3d/Ray3d.js +11 -23
  151. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  152. package/lib/cjs/geometry3d/Transform.d.ts +21 -2
  153. package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
  154. package/lib/cjs/geometry3d/Transform.js +32 -13
  155. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  156. package/lib/cjs/geometry4d/Matrix4d.d.ts +7 -7
  157. package/lib/cjs/geometry4d/Matrix4d.d.ts.map +1 -1
  158. package/lib/cjs/geometry4d/Matrix4d.js +9 -9
  159. package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
  160. package/lib/cjs/geometry4d/MomentData.d.ts +32 -34
  161. package/lib/cjs/geometry4d/MomentData.d.ts.map +1 -1
  162. package/lib/cjs/geometry4d/MomentData.js +56 -57
  163. package/lib/cjs/geometry4d/MomentData.js.map +1 -1
  164. package/lib/cjs/geometry4d/Point4d.d.ts +8 -5
  165. package/lib/cjs/geometry4d/Point4d.d.ts.map +1 -1
  166. package/lib/cjs/geometry4d/Point4d.js +27 -16
  167. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  168. package/lib/cjs/polyface/FacetOrientation.d.ts +1 -1
  169. package/lib/cjs/polyface/FacetOrientation.js +2 -2
  170. package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
  171. package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts +55 -40
  172. package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
  173. package/lib/cjs/polyface/IndexedEdgeMatcher.js +83 -75
  174. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  175. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
  176. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  177. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +47 -38
  178. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  179. package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts +26 -19
  180. package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
  181. package/lib/cjs/polyface/IndexedPolyfaceWalker.js +47 -32
  182. package/lib/cjs/polyface/IndexedPolyfaceWalker.js.map +1 -1
  183. package/lib/cjs/polyface/Polyface.d.ts +19 -5
  184. package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
  185. package/lib/cjs/polyface/Polyface.js +18 -2
  186. package/lib/cjs/polyface/Polyface.js.map +1 -1
  187. package/lib/cjs/polyface/PolyfaceBuilder.d.ts +1 -1
  188. package/lib/cjs/polyface/PolyfaceBuilder.js +3 -3
  189. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  190. package/lib/cjs/polyface/PolyfaceClip.d.ts +19 -18
  191. package/lib/cjs/polyface/PolyfaceClip.d.ts.map +1 -1
  192. package/lib/cjs/polyface/PolyfaceClip.js +39 -42
  193. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  194. package/lib/cjs/polyface/PolyfaceData.d.ts +1 -1
  195. package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
  196. package/lib/cjs/polyface/PolyfaceData.js +3 -1
  197. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  198. package/lib/cjs/polyface/PolyfaceQuery.d.ts +119 -78
  199. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  200. package/lib/cjs/polyface/PolyfaceQuery.js +315 -231
  201. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  202. package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
  203. package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
  204. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js +3 -3
  205. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  206. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
  207. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
  208. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
  209. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  210. package/lib/cjs/serialization/GeometrySamples.d.ts +1 -1
  211. package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
  212. package/lib/cjs/serialization/GeometrySamples.js +1 -1
  213. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  214. package/lib/cjs/serialization/IModelJsonSchema.d.ts +3 -3
  215. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  216. package/lib/cjs/topology/ChainMerge.d.ts +1 -1
  217. package/lib/cjs/topology/ChainMerge.js +1 -1
  218. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  219. package/lib/cjs/topology/Triangulation.d.ts +3 -3
  220. package/lib/cjs/topology/Triangulation.d.ts.map +1 -1
  221. package/lib/cjs/topology/Triangulation.js +7 -7
  222. package/lib/cjs/topology/Triangulation.js.map +1 -1
  223. package/lib/esm/Geometry.d.ts +15 -4
  224. package/lib/esm/Geometry.d.ts.map +1 -1
  225. package/lib/esm/Geometry.js +17 -3
  226. package/lib/esm/Geometry.js.map +1 -1
  227. package/lib/esm/bspline/BSpline1dNd.d.ts +1 -1
  228. package/lib/esm/bspline/BSpline1dNd.js +1 -1
  229. package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
  230. package/lib/esm/bspline/BSplineSurface.d.ts +4 -3
  231. package/lib/esm/bspline/BSplineSurface.d.ts.map +1 -1
  232. package/lib/esm/bspline/BSplineSurface.js +6 -5
  233. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  234. package/lib/esm/clipping/ClipPlane.d.ts +7 -5
  235. package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
  236. package/lib/esm/clipping/ClipPlane.js +9 -5
  237. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  238. package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
  239. package/lib/esm/clipping/ClipUtils.js +5 -3
  240. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  241. package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  242. package/lib/esm/clipping/ConvexClipPlaneSet.js +12 -23
  243. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  244. package/lib/esm/core-geometry.d.ts +1 -0
  245. package/lib/esm/core-geometry.d.ts.map +1 -1
  246. package/lib/esm/core-geometry.js +1 -0
  247. package/lib/esm/core-geometry.js.map +1 -1
  248. package/lib/esm/curve/Arc3d.d.ts +56 -32
  249. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  250. package/lib/esm/curve/Arc3d.js +91 -36
  251. package/lib/esm/curve/Arc3d.js.map +1 -1
  252. package/lib/esm/curve/CurveCollection.d.ts +2 -0
  253. package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
  254. package/lib/esm/curve/CurveCollection.js +14 -0
  255. package/lib/esm/curve/CurveCollection.js.map +1 -1
  256. package/lib/esm/curve/CurveExtendMode.d.ts +13 -5
  257. package/lib/esm/curve/CurveExtendMode.d.ts.map +1 -1
  258. package/lib/esm/curve/CurveExtendMode.js +19 -15
  259. package/lib/esm/curve/CurveExtendMode.js.map +1 -1
  260. package/lib/esm/curve/CurveLocationDetail.d.ts +1 -1
  261. package/lib/esm/curve/CurveLocationDetail.js +1 -1
  262. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  263. package/lib/esm/curve/CurvePrimitive.d.ts +67 -8
  264. package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
  265. package/lib/esm/curve/CurvePrimitive.js +59 -6
  266. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  267. package/lib/esm/curve/CurveTypes.d.ts +1 -1
  268. package/lib/esm/curve/CurveTypes.js.map +1 -1
  269. package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
  270. package/lib/esm/curve/LineSegment3d.js +1 -0
  271. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  272. package/lib/esm/curve/LineString3d.d.ts +8 -7
  273. package/lib/esm/curve/LineString3d.d.ts.map +1 -1
  274. package/lib/esm/curve/LineString3d.js +25 -22
  275. package/lib/esm/curve/LineString3d.js.map +1 -1
  276. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  277. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js +10 -5
  278. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  279. package/lib/esm/curve/Query/PlanarSubdivision.d.ts.map +1 -1
  280. package/lib/esm/curve/Query/PlanarSubdivision.js +7 -2
  281. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  282. package/lib/esm/curve/RegionMomentsXY.d.ts +15 -21
  283. package/lib/esm/curve/RegionMomentsXY.d.ts.map +1 -1
  284. package/lib/esm/curve/RegionMomentsXY.js +38 -58
  285. package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
  286. package/lib/esm/curve/RegionOps.d.ts +70 -38
  287. package/lib/esm/curve/RegionOps.d.ts.map +1 -1
  288. package/lib/esm/curve/RegionOps.js +116 -46
  289. package/lib/esm/curve/RegionOps.js.map +1 -1
  290. package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts +12 -13
  291. package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
  292. package/lib/esm/curve/RegionOpsClassificationSweeps.js +23 -23
  293. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  294. package/lib/esm/curve/StrokeOptions.d.ts +1 -1
  295. package/lib/esm/curve/StrokeOptions.js +1 -1
  296. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  297. package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.d.ts +71 -0
  298. package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.d.ts.map +1 -0
  299. package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js +177 -0
  300. package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -0
  301. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.d.ts +21 -5
  302. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.d.ts.map +1 -1
  303. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js +42 -17
  304. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  305. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  306. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +36 -12
  307. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  308. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts +5 -3
  309. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.d.ts.map +1 -1
  310. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js +5 -3
  311. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  312. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
  313. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
  314. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js +30 -0
  315. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
  316. package/lib/esm/geometry3d/AngleSweep.d.ts +25 -18
  317. package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
  318. package/lib/esm/geometry3d/AngleSweep.js +39 -25
  319. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  320. package/lib/esm/geometry3d/GeometryHandler.d.ts +15 -16
  321. package/lib/esm/geometry3d/GeometryHandler.d.ts.map +1 -1
  322. package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
  323. package/lib/esm/geometry3d/GrowableXYArray.d.ts +1 -1
  324. package/lib/esm/geometry3d/GrowableXYArray.js +1 -1
  325. package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
  326. package/lib/esm/geometry3d/GrowableXYZArray.d.ts +7 -2
  327. package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  328. package/lib/esm/geometry3d/GrowableXYZArray.js +20 -2
  329. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  330. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +2 -1
  331. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  332. package/lib/esm/geometry3d/IndexedXYZCollection.js +7 -3
  333. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  334. package/lib/esm/geometry3d/Matrix3d.d.ts +10 -11
  335. package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
  336. package/lib/esm/geometry3d/Matrix3d.js +11 -12
  337. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  338. package/lib/esm/geometry3d/Plane3d.d.ts +2 -0
  339. package/lib/esm/geometry3d/Plane3d.d.ts.map +1 -1
  340. package/lib/esm/geometry3d/Plane3d.js +6 -1
  341. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  342. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
  343. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
  344. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
  345. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  346. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
  347. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  348. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js +18 -10
  349. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  350. package/lib/esm/geometry3d/Point3dVector3d.d.ts +4 -4
  351. package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
  352. package/lib/esm/geometry3d/Point3dVector3d.js +6 -6
  353. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  354. package/lib/esm/geometry3d/PointHelpers.d.ts +7 -7
  355. package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
  356. package/lib/esm/geometry3d/PointHelpers.js +66 -26
  357. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  358. package/lib/esm/geometry3d/PolygonOps.d.ts +57 -9
  359. package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
  360. package/lib/esm/geometry3d/PolygonOps.js +57 -17
  361. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  362. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
  363. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
  364. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
  365. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  366. package/lib/esm/geometry3d/PolylineOps.d.ts +5 -4
  367. package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
  368. package/lib/esm/geometry3d/PolylineOps.js +5 -4
  369. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  370. package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
  371. package/lib/esm/geometry3d/Ray3d.js +11 -23
  372. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  373. package/lib/esm/geometry3d/Transform.d.ts +21 -2
  374. package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
  375. package/lib/esm/geometry3d/Transform.js +32 -13
  376. package/lib/esm/geometry3d/Transform.js.map +1 -1
  377. package/lib/esm/geometry4d/Matrix4d.d.ts +7 -7
  378. package/lib/esm/geometry4d/Matrix4d.d.ts.map +1 -1
  379. package/lib/esm/geometry4d/Matrix4d.js +9 -9
  380. package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
  381. package/lib/esm/geometry4d/MomentData.d.ts +32 -34
  382. package/lib/esm/geometry4d/MomentData.d.ts.map +1 -1
  383. package/lib/esm/geometry4d/MomentData.js +56 -57
  384. package/lib/esm/geometry4d/MomentData.js.map +1 -1
  385. package/lib/esm/geometry4d/Point4d.d.ts +8 -5
  386. package/lib/esm/geometry4d/Point4d.d.ts.map +1 -1
  387. package/lib/esm/geometry4d/Point4d.js +27 -16
  388. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  389. package/lib/esm/polyface/FacetOrientation.d.ts +1 -1
  390. package/lib/esm/polyface/FacetOrientation.js +2 -2
  391. package/lib/esm/polyface/FacetOrientation.js.map +1 -1
  392. package/lib/esm/polyface/IndexedEdgeMatcher.d.ts +55 -40
  393. package/lib/esm/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
  394. package/lib/esm/polyface/IndexedEdgeMatcher.js +83 -75
  395. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  396. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
  397. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  398. package/lib/esm/polyface/IndexedPolyfaceVisitor.js +47 -38
  399. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  400. package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts +26 -19
  401. package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
  402. package/lib/esm/polyface/IndexedPolyfaceWalker.js +47 -32
  403. package/lib/esm/polyface/IndexedPolyfaceWalker.js.map +1 -1
  404. package/lib/esm/polyface/Polyface.d.ts +19 -5
  405. package/lib/esm/polyface/Polyface.d.ts.map +1 -1
  406. package/lib/esm/polyface/Polyface.js +18 -2
  407. package/lib/esm/polyface/Polyface.js.map +1 -1
  408. package/lib/esm/polyface/PolyfaceBuilder.d.ts +1 -1
  409. package/lib/esm/polyface/PolyfaceBuilder.js +3 -3
  410. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  411. package/lib/esm/polyface/PolyfaceClip.d.ts +19 -18
  412. package/lib/esm/polyface/PolyfaceClip.d.ts.map +1 -1
  413. package/lib/esm/polyface/PolyfaceClip.js +39 -42
  414. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  415. package/lib/esm/polyface/PolyfaceData.d.ts +1 -1
  416. package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
  417. package/lib/esm/polyface/PolyfaceData.js +3 -1
  418. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  419. package/lib/esm/polyface/PolyfaceQuery.d.ts +119 -78
  420. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  421. package/lib/esm/polyface/PolyfaceQuery.js +316 -232
  422. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  423. package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
  424. package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
  425. package/lib/esm/polyface/RangeTree/RangeTreeNode.js +3 -3
  426. package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  427. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
  428. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
  429. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
  430. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  431. package/lib/esm/serialization/GeometrySamples.d.ts +1 -1
  432. package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
  433. package/lib/esm/serialization/GeometrySamples.js +1 -1
  434. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  435. package/lib/esm/serialization/IModelJsonSchema.d.ts +3 -3
  436. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  437. package/lib/esm/topology/ChainMerge.d.ts +1 -1
  438. package/lib/esm/topology/ChainMerge.js +1 -1
  439. package/lib/esm/topology/ChainMerge.js.map +1 -1
  440. package/lib/esm/topology/Triangulation.d.ts +3 -3
  441. package/lib/esm/topology/Triangulation.d.ts.map +1 -1
  442. package/lib/esm/topology/Triangulation.js +7 -7
  443. package/lib/esm/topology/Triangulation.js.map +1 -1
  444. package/package.json +3 -3
@@ -7,17 +7,20 @@ import { GrowableFloat64Array } from "./GrowableFloat64Array";
7
7
  /**
8
8
  * An `AngleSweep` is a pair of angles at start and end of an interval.
9
9
  *
10
- * * For stroking purposes, the "included interval" is all angles numerically reached
11
- * by theta = start + f*(end-start), where f is between 0 and 1.
12
- * * This stroking formula is simple numbers -- 2PI shifts are not involved.
13
- * * 2PI shifts do become important in the reverse mapping of an angle to a fraction.
14
- * * If "start < end" the angle proceeds CCW around the unit circle.
15
- * * If "end < start" the angle proceeds CW around the unit circle.
16
- * * Angles beyond 360 are fine as endpoints.
17
- * * (350,370) covers the same unit angles as (-10,10).
18
- * * (370,350) covers the same unit angles as (10,-10).
19
- * * math details related fraction API can be found at docs/learning/geometry/Angle.md
20
- * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/AngleSweep
10
+ * * For stroking purposes, the "included interval" is all angles numerically reached
11
+ * by `theta = start + f * (end - start)`, where `0 <= f <= 1`.
12
+ * * This stroking formula is simple numbers -- 2PI shifts are not involved.
13
+ * * 2PI shifts do become important in the reverse mapping of an angle to a fraction.
14
+ * * Angles greater than 360 and less than 0 are fine as endpoints.
15
+ * * An AngleSweep determines orientation only _in concert with a reference vector_, e.g., a plane normal like (0,0,1).
16
+ * * Be careful reading orientation from an AngleSweep without a reference vector!
17
+ * * If "start < end" the angles in the sweep proceed counterclockwise around the reference vector.
18
+ * * If "start > end" the angles in the sweep proceed clockwise around the reference vector.
19
+ * * (350,370) covers the same angles as (-10,10), and both sweeps are counterclockwise around the reference vector.
20
+ * * (370,350) covers the same angles as (10,-10), and both sweeps are clockwise around the reference vector.
21
+ * * (370,350) covers the same angles as (-10,10), but the sweeps have opposite orientation.
22
+ * * Math details can be found at docs/learning/geometry/Angle.md .
23
+ * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/AngleSweep .
21
24
  * @public
22
25
  */
23
26
  export declare class AngleSweep implements BeJSONFunctions {
@@ -119,7 +122,7 @@ export declare class AngleSweep implements BeJSONFunctions {
119
122
  /** Convert fractional position in the sweep to strongly typed Angle object. */
120
123
  fractionToAngle(fraction: number): Angle;
121
124
  /**
122
- * Return 2PI divided by the sweep radians (i.e. 360 degrees divided by sweep angle).
125
+ * Return 2PI divided by the sweep radians.
123
126
  * * This is the number of fractional intervals required to cover a whole circle.
124
127
  * @returns period of the sweep, or 1 if sweep is empty.
125
128
  */
@@ -144,22 +147,26 @@ export declare class AngleSweep implements BeJSONFunctions {
144
147
  * @param fraction fraction of the sweep.
145
148
  * @param radians0 start angle of sweep (in radians).
146
149
  * @param radians1 end angle of sweep (in radians).
147
- * @param toNegativeFraction return an exterior fraction period-shifted to within one period of the start (true) or
148
- * end (false) of the sweep.
150
+ * @param toNegativeFraction exterior fraction handling:
151
+ * * if true, return `fraction` period-shifted to within one period of the start
152
+ * * if false, return `fraction` period-shifted to within one period of the end
153
+ * * if undefined, return the period-shift of `fraction` closest to [0,1].
149
154
  * @returns period-shifted fraction. If `fraction` is already in [0,1], or the sweep is empty, then `fraction` is
150
155
  * returned unchanged.
151
156
  */
152
- static fractionToSignedPeriodicFractionStartEnd(fraction: number, radians0: number, radians1: number, toNegativeFraction: boolean): number;
157
+ static fractionToSignedPeriodicFractionStartEnd(fraction: number, radians0: number, radians1: number, toNegativeFraction?: boolean): number;
153
158
  /**
154
159
  * Convert a sweep fraction to the equivalent period-shifted fraction inside this sweep, or within one period of
155
160
  * zero on the desired side.
156
161
  * @param fraction fraction of the sweep.
157
- * @param toNegativeFraction return an exterior fraction period-shifted to within one period of the start (true) or
158
- * end (false) of the sweep.
162
+ * @param toNegativeFraction exterior fraction handling:
163
+ * * if true, return `fraction` period-shifted to within one period of the start
164
+ * * if false, return `fraction` period-shifted to within one period of the end
165
+ * * if undefined, return the period-shift of `fraction` closest to [0,1].
159
166
  * @returns period-shifted fraction. If `fraction` is already in [0,1], or the sweep is empty, then `fraction` is
160
167
  * returned unchanged.
161
168
  */
162
- fractionToSignedPeriodicFraction(fraction: number, toNegativeFraction: boolean): number;
169
+ fractionToSignedPeriodicFraction(fraction: number, toNegativeFraction?: boolean): number;
163
170
  /**
164
171
  * Return the fractionalized position of the given angle (as radians), computed with consideration of 2PI period.
165
172
  * * consider radians0 as `start` angle of the sweep and radians1 as `end` angle of the sweep
@@ -1 +1 @@
1
- {"version":3,"file":"AngleSweep.d.ts","sourceRoot":"","sources":["../../../src/geometry3d/AngleSweep.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,eAAe,EAAY,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,UAAW,YAAW,eAAe;IAChD,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,SAAS,CAAS;IAC1B,iEAAiE;IACjE,IAAW,YAAY,WAEtB;IACD,+DAA+D;IAC/D,IAAW,UAAU,WAEpB;IACD,8DAA8D;IAC9D,IAAW,YAAY,WAEtB;IACD,iEAAiE;IACjE,IAAW,YAAY,WAEtB;IACD,+DAA+D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AE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,gBAAgB,GAAE,OAAc,GAAG,OAAO;IASjI,4DAA4D;IACrD,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,GAAE,OAAc,GAAG,OAAO;IAGnF,6DAA6D;IACtD,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO;IAG5C;;;;;;;;OAQG;IACI,WAAW,CAAC,IAAI,CAAC,EAAE,GAAG;IAc7B,+CAA+C;WACjC,QAAQ,CAAC,IAAI,CAAC,EAAE,eAAe,GAAG,UAAU;IAK1D;;;OAGG;IACI,MAAM,IAAI,GAAG;IAGpB;;;;;OAKG;IACI,6BAA6B,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,GAAE,MAAmC,GAAG,OAAO;IAKhH;;;;;OAKG;IACI,0BAA0B,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,GAAE,MAAmC,GAAG,OAAO;IAI7G;;;;;OAKG;IACI,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO;CAGjD"}
@@ -10,17 +10,20 @@ import { Angle } from "./Angle";
10
10
  /**
11
11
  * An `AngleSweep` is a pair of angles at start and end of an interval.
12
12
  *
13
- * * For stroking purposes, the "included interval" is all angles numerically reached
14
- * by theta = start + f*(end-start), where f is between 0 and 1.
15
- * * This stroking formula is simple numbers -- 2PI shifts are not involved.
16
- * * 2PI shifts do become important in the reverse mapping of an angle to a fraction.
17
- * * If "start < end" the angle proceeds CCW around the unit circle.
18
- * * If "end < start" the angle proceeds CW around the unit circle.
19
- * * Angles beyond 360 are fine as endpoints.
20
- * * (350,370) covers the same unit angles as (-10,10).
21
- * * (370,350) covers the same unit angles as (10,-10).
22
- * * math details related fraction API can be found at docs/learning/geometry/Angle.md
23
- * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/AngleSweep
13
+ * * For stroking purposes, the "included interval" is all angles numerically reached
14
+ * by `theta = start + f * (end - start)`, where `0 <= f <= 1`.
15
+ * * This stroking formula is simple numbers -- 2PI shifts are not involved.
16
+ * * 2PI shifts do become important in the reverse mapping of an angle to a fraction.
17
+ * * Angles greater than 360 and less than 0 are fine as endpoints.
18
+ * * An AngleSweep determines orientation only _in concert with a reference vector_, e.g., a plane normal like (0,0,1).
19
+ * * Be careful reading orientation from an AngleSweep without a reference vector!
20
+ * * If "start < end" the angles in the sweep proceed counterclockwise around the reference vector.
21
+ * * If "start > end" the angles in the sweep proceed clockwise around the reference vector.
22
+ * * (350,370) covers the same angles as (-10,10), and both sweeps are counterclockwise around the reference vector.
23
+ * * (370,350) covers the same angles as (10,-10), and both sweeps are clockwise around the reference vector.
24
+ * * (370,350) covers the same angles as (-10,10), but the sweeps have opposite orientation.
25
+ * * Math details can be found at docs/learning/geometry/Angle.md .
26
+ * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/AngleSweep .
24
27
  * @public
25
28
  */
26
29
  export class AngleSweep {
@@ -36,7 +39,7 @@ export class AngleSweep {
36
39
  }
37
40
  /** Read-property for signed start-to-end sweep in degrees. */
38
41
  get sweepDegrees() {
39
- return Angle.radiansToDegrees(this._radians1 - this._radians0);
42
+ return Angle.radiansToDegrees(this.sweepRadians);
40
43
  }
41
44
  /** Read-property for degrees at the start of this AngleSweep. */
42
45
  get startRadians() {
@@ -215,20 +218,20 @@ export class AngleSweep {
215
218
  /** Convert fractional position in the sweep to radians. */
216
219
  fractionToRadians(fraction) {
217
220
  return fraction < 0.5 ?
218
- this._radians0 + fraction * (this._radians1 - this._radians0) :
219
- this._radians1 + (fraction - 1.0) * (this._radians1 - this._radians0);
221
+ this._radians0 + fraction * this.sweepRadians :
222
+ this._radians1 + (fraction - 1.0) * this.sweepRadians;
220
223
  }
221
224
  /** Convert fractional position in the sweep to strongly typed Angle object. */
222
225
  fractionToAngle(fraction) {
223
226
  return Angle.createRadians(this.fractionToRadians(fraction));
224
227
  }
225
228
  /**
226
- * Return 2PI divided by the sweep radians (i.e. 360 degrees divided by sweep angle).
229
+ * Return 2PI divided by the sweep radians.
227
230
  * * This is the number of fractional intervals required to cover a whole circle.
228
231
  * @returns period of the sweep, or 1 if sweep is empty.
229
232
  */
230
233
  fractionPeriod() {
231
- return this.isEmpty ? 1.0 : Angle.pi2Radians / Math.abs(this._radians1 - this._radians0);
234
+ return this.isEmpty ? 1.0 : Angle.pi2Radians / Math.abs(this.sweepRadians);
232
235
  }
233
236
  /**
234
237
  * Return the fractionalized position of the given angle (as Angle) computed without consideration of
@@ -244,7 +247,7 @@ export class AngleSweep {
244
247
  * @returns unbounded fraction, or 1 if sweep is empty.
245
248
  */
246
249
  angleToUnboundedFraction(theta) {
247
- return this.isEmpty ? 1.0 : (theta.radians - this._radians0) / (this._radians1 - this._radians0);
250
+ return this.isEmpty ? 1.0 : (theta.radians - this._radians0) / this.sweepRadians;
248
251
  }
249
252
  /**
250
253
  * Convert a sweep fraction to the equivalent period-shifted fraction inside the sweep, or within one period of zero
@@ -252,8 +255,10 @@ export class AngleSweep {
252
255
  * @param fraction fraction of the sweep.
253
256
  * @param radians0 start angle of sweep (in radians).
254
257
  * @param radians1 end angle of sweep (in radians).
255
- * @param toNegativeFraction return an exterior fraction period-shifted to within one period of the start (true) or
256
- * end (false) of the sweep.
258
+ * @param toNegativeFraction exterior fraction handling:
259
+ * * if true, return `fraction` period-shifted to within one period of the start
260
+ * * if false, return `fraction` period-shifted to within one period of the end
261
+ * * if undefined, return the period-shift of `fraction` closest to [0,1].
257
262
  * @returns period-shifted fraction. If `fraction` is already in [0,1], or the sweep is empty, then `fraction` is
258
263
  * returned unchanged.
259
264
  */
@@ -267,16 +272,25 @@ export class AngleSweep {
267
272
  fraction = fraction % period; // period-shifted equivalent fraction closest to 0 with same sign as fraction
268
273
  if (fraction + period < 1)
269
274
  fraction += period; // it's really an interior fraction
270
- if (Geometry.isIn01(fraction) || (toNegativeFraction && fraction < 0) || (!toNegativeFraction && fraction > 1))
275
+ if (Geometry.isIn01(fraction))
271
276
  return fraction;
272
- return toNegativeFraction ? fraction - period : fraction + period; // shift to other side of sweep
277
+ if (toNegativeFraction === true)
278
+ return fraction < 0 ? fraction : fraction - period;
279
+ if (toNegativeFraction === false)
280
+ return fraction > 1 ? fraction : fraction + period;
281
+ const fractionDistFrom01 = fraction < 0 ? -fraction : fraction - 1;
282
+ const fraction2 = fraction < 0 ? fraction + period : fraction - period; // period-shift with opposite sign
283
+ const fraction2DistFrom01 = fraction2 < 0 ? -fraction2 : fraction2 - 1;
284
+ return fractionDistFrom01 < fraction2DistFrom01 ? fraction : fraction2; // choose the period-shift closer to [0,1]
273
285
  }
274
286
  /**
275
287
  * Convert a sweep fraction to the equivalent period-shifted fraction inside this sweep, or within one period of
276
288
  * zero on the desired side.
277
289
  * @param fraction fraction of the sweep.
278
- * @param toNegativeFraction return an exterior fraction period-shifted to within one period of the start (true) or
279
- * end (false) of the sweep.
290
+ * @param toNegativeFraction exterior fraction handling:
291
+ * * if true, return `fraction` period-shifted to within one period of the start
292
+ * * if false, return `fraction` period-shifted to within one period of the end
293
+ * * if undefined, return the period-shift of `fraction` closest to [0,1].
280
294
  * @returns period-shifted fraction. If `fraction` is already in [0,1], or the sweep is empty, then `fraction` is
281
295
  * returned unchanged.
282
296
  */
@@ -538,7 +552,7 @@ export class AngleSweep {
538
552
  isAlmostEqualAllowPeriodShift(other, radianTol = Geometry.smallAngleRadians) {
539
553
  return this.isCCW === other.isCCW // this rules out equating opposite sweeps like [0,-100] and [0,260]
540
554
  && Angle.isAlmostEqualRadiansAllowPeriodShift(this._radians0, other._radians0, radianTol)
541
- && Angle.isAlmostEqualRadiansAllowPeriodShift(this._radians1 - this._radians0, other._radians1 - other._radians0, radianTol);
555
+ && Angle.isAlmostEqualRadiansAllowPeriodShift(this.sweepRadians, other.sweepRadians, radianTol);
542
556
  }
543
557
  /**
544
558
  * Test if two angle sweeps match within the given tolerance.
@@ -548,7 +562,7 @@ export class AngleSweep {
548
562
  */
549
563
  isAlmostEqualNoPeriodShift(other, radianTol = Geometry.smallAngleRadians) {
550
564
  return Angle.isAlmostEqualRadiansNoPeriodShift(this._radians0, other._radians0, radianTol)
551
- && Angle.isAlmostEqualRadiansNoPeriodShift(this._radians1 - this._radians0, other._radians1 - other._radians0, radianTol);
565
+ && Angle.isAlmostEqualRadiansNoPeriodShift(this.sweepRadians, other.sweepRadians, radianTol);
552
566
  }
553
567
  /**
554
568
  * Test if start and end angles match with radians tolerance.
@@ -1 +1 @@
1
- {"version":3,"file":"AngleSweep.js","sourceRoot":"","sources":["../../../src/geometry3d/AngleSweep.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAoC,QAAQ,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,UAAU;IACb,SAAS,CAAS;IAClB,SAAS,CAAS;IAC1B,iEAAiE;IACjE,IAAW,YAAY;QACrB,OAAO,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAChD,CAAC;IACD,+DAA+D;IAC/D,IAAW,UAAU;QACnB,OAAO,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAChD,CAAC;IACD,8DAA8D;IAC9D,IAAW,YAAY;QACrB,OAAO,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC;IACjE,CAAC;IACD,iEAAiE;IACjE,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IACD,+DAA+D;IAC/D,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IACD,8DAA8D;IAC9D,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;IACzC,CAAC;IACD,sFAAsF;IACtF,IAAW,OA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AAM,CAAC,QAAQ,CAAC,IAAsB;QAC3C,MAAM,MAAM,GAAG,UAAU,CAAC,SAAS,EAAE,CAAC;QACtC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACzB,OAAO,MAAM,CAAC;IAChB,CAAC;IACD;;;OAGG;IACI,MAAM;QACX,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;IAC9C,CAAC;IACD;;;;;OAKG;IACI,6BAA6B,CAAC,KAAiB,EAAE,YAAoB,QAAQ,CAAC,iBAAiB;QACpG,OAAO,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC,oEAAoE;eACjG,KAAK,CAAC,oCAAoC,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC;eACtF,KAAK,CAAC,oCAAoC,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACjI,CAAC;IACD;;;;;OAKG;IACI,0BAA0B,CAAC,KAAiB,EAAE,YAAoB,QAAQ,CAAC,iBAAiB;QACjG,OAAO,KAAK,CAAC,iCAAiC,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC;eACrF,KAAK,CAAC,iCAAiC,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAC9H,CAAC;IACD;;;;;OAKG;IACI,aAAa,CAAC,KAAiB;QACpC,OAAO,IAAI,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module CartesianGeometry\n */\n\nimport { AngleSweepProps, BeJSONFunctions, Geometry } from \"../Geometry\";\nimport { Angle } from \"./Angle\";\nimport { GrowableFloat64Array } from \"./GrowableFloat64Array\";\n\n/**\n * An `AngleSweep` is a pair of angles at start and end of an interval.\n *\n * * For stroking purposes, the \"included interval\" is all angles numerically reached\n * by theta = start + f*(end-start), where f is between 0 and 1.\n * * This stroking formula is simple numbers -- 2PI shifts are not involved.\n * * 2PI shifts do become important in the reverse mapping of an angle to a fraction.\n * * If \"start < end\" the angle proceeds CCW around the unit circle.\n * * If \"end < start\" the angle proceeds CW around the unit circle.\n * * Angles beyond 360 are fine as endpoints.\n * * (350,370) covers the same unit angles as (-10,10).\n * * (370,350) covers the same unit angles as (10,-10).\n * * math details related fraction API can be found at docs/learning/geometry/Angle.md\n * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/AngleSweep\n * @public\n */\nexport class AngleSweep implements BeJSONFunctions {\n private _radians0: number;\n private _radians1: number;\n /** Read-property for degrees at the start of this AngleSweep. */\n public get startDegrees() {\n return Angle.radiansToDegrees(this._radians0);\n }\n /** Read-property for degrees at the end of this AngleSweep. */\n public get endDegrees() {\n return Angle.radiansToDegrees(this._radians1);\n }\n /** Read-property for signed start-to-end sweep in degrees. */\n public get sweepDegrees() {\n return Angle.radiansToDegrees(this._radians1 - this._radians0);\n }\n /** Read-property for degrees at the start of this AngleSweep. */\n public get startRadians() {\n return this._radians0;\n }\n /** Read-property for degrees at the end of this AngleSweep. */\n public get endRadians() {\n return this._radians1;\n }\n /** Read-property for signed start-to-end sweep in radians. */\n public get sweepRadians() {\n return this._radians1 - this._radians0;\n }\n /** Whether the sweep angles are within smallAngle tolerance, without period shift. */\n public get isEmpty() {\n return Angle.isAlmostEqualRadiansNoPeriodShift(0, this.sweepRadians);\n }\n /** Return the (strongly typed) start angle */\n public get startAngle() {\n return Angle.createRadians(this._radians0);\n }\n /** Return the (strongly typed) end angle */\n public get endAngle() {\n return Angle.createRadians(this._radians1);\n }\n /**\n * Create a sweep as one of\n * * A clone of a given sweep\n * * 0 to given angle\n * * full circle if no arg given (sweep 0 to 360 degrees)\n */\n public static create(data?: AngleSweep | Angle): AngleSweep {\n if (data instanceof AngleSweep)\n return data.clone();\n if (data instanceof Angle)\n return new AngleSweep(0, data.radians);\n return AngleSweep.create360();\n }\n /**\n * (private) constructor with start and end angles in radians.\n * * Use explicitly named static methods to clarify intent and units of inputs:\n *\n * * createStartEndRadians (startRadians:number, endRadians:number)\n * * createStartEndDegrees (startDegrees:number, endDegrees:number)\n * * createStartEnd (startAngle:Angle, endAngle:Angle)\n * * createStartSweepRadians (startRadians:number, sweepRadians:number)\n * * createStartSweepDegrees (startDegrees:number, sweepDegrees:number)\n * * createStartSweep (startAngle:Angle, sweepAngle:Angle)\n */\n private constructor(startRadians: number = 0, endRadians: number = 0) {\n this._radians0 = startRadians;\n this._radians1 = endRadians;\n }\n /**\n * Directly set the start and end angles in radians\n * * If the difference between startRadians and endRadians is greater than 360, the function limits the angle sweep to 360.\n */\n public setStartEndRadians(startRadians: number = 0, endRadians: number = 2.0 * Math.PI) {\n const delta = endRadians - startRadians;\n if (Angle.isFullCircleRadians(delta)) {\n endRadians = startRadians + (delta > 0 ? 2.0 : -2.0) * Math.PI;\n }\n this._radians0 = startRadians;\n this._radians1 = endRadians;\n }\n /** Directly set the start and end angles in degrees */\n public setStartEndDegrees(startDegrees: number = 0, endDegrees: number = 360.0) {\n this.setStartEndRadians(Angle.degreesToRadians(startDegrees), Angle.degreesToRadians(endDegrees));\n }\n /**\n * Create an AngleSweep from start and end angles given in radians.\n * * If the difference between startRadians and endRadians is greater than 360, the function limits the angle sweep to 360.\n */\n public static createStartEndRadians(startRadians: number = 0, endRadians: number = 2.0 * Math.PI, result?: AngleSweep): AngleSweep {\n result = result ? result : new AngleSweep();\n result.setStartEndRadians(startRadians, endRadians);\n return result;\n }\n /** Return the angle obtained by subtracting radians from this angle. */\n public cloneMinusRadians(radians: number): AngleSweep {\n return new AngleSweep(this._radians0 - radians, this._radians1 - radians);\n }\n /** Create an AngleSweep from start and end angles given in degrees. */\n public static createStartEndDegrees(startDegrees: number = 0, endDegrees: number = 360, result?: AngleSweep): AngleSweep {\n return AngleSweep.createStartEndRadians(Angle.degreesToRadians(startDegrees), Angle.degreesToRadians(endDegrees), result);\n }\n /** Create an angle sweep from strongly typed start and end angles */\n public static createStartEnd(startAngle: Angle, endAngle: Angle, result?: AngleSweep): AngleSweep {\n result = result ? result : new AngleSweep();\n result.setStartEndRadians(startAngle.radians, endAngle.radians);\n return result;\n }\n /** Create an AngleSweep from start and end angles given in radians. */\n public static createStartSweepRadians(startRadians: number = 0, sweepRadians: number = Math.PI, result?: AngleSweep): AngleSweep {\n result = result ? result : new AngleSweep();\n result.setStartEndRadians(startRadians, startRadians + sweepRadians);\n return result;\n }\n /** Create an AngleSweep from start and sweep given in degrees. */\n public static createStartSweepDegrees(startDegrees: number = 0, sweepDegrees: number = 360, result?: AngleSweep): AngleSweep {\n return AngleSweep.createStartEndRadians(Angle.degreesToRadians(startDegrees), Angle.degreesToRadians(startDegrees + sweepDegrees), result);\n }\n /** Create an angle sweep with limits given as (strongly typed) angles for start and sweep */\n public static createStartSweep(startAngle: Angle, sweepAngle: Angle, result?: AngleSweep): AngleSweep {\n return AngleSweep.createStartSweepRadians(startAngle.radians, sweepAngle.radians, result);\n }\n /** Return a sweep with limits interpolated between this and other. */\n public interpolate(fraction: number, other: AngleSweep): AngleSweep {\n return new AngleSweep(\n Geometry.interpolate(this._radians0, fraction, other._radians0),\n Geometry.interpolate(this._radians1, fraction, other._radians1),\n );\n }\n /** Copy from other AngleSweep. */\n public setFrom(other: AngleSweep) {\n this._radians0 = other._radians0;\n this._radians1 = other._radians1;\n }\n /** Create a full circle sweep (CCW). startRadians defaults to 0 */\n public static create360(startRadians?: number): AngleSweep {\n startRadians = startRadians ? startRadians : 0.0;\n return new AngleSweep(startRadians, startRadians + 2.0 * Math.PI);\n }\n /** Create a sweep from the south pole to the north pole (-90 to +90). */\n public static createFullLatitude() {\n return AngleSweep.createStartEndRadians(-0.5 * Math.PI, 0.5 * Math.PI);\n }\n /** Reverse the start and end angle in place. */\n public reverseInPlace() {\n const tmp = this._radians0;\n this._radians0 = this._radians1;\n this._radians1 = tmp;\n }\n /**\n * Return a sweep for the \"other\" part of the circle.\n * @param reverseDirection true to move backwards (CW) from start to end, false to more forwards (CCW) from start to end.\n */\n public cloneComplement(reverseDirection: boolean = false, result?: AngleSweep): AngleSweep {\n const s = this.sweepRadians >= 0 ? 2.0 : -2.0;\n if (reverseDirection)\n return AngleSweep.createStartEndRadians(this.startRadians, this.endRadians - s * Math.PI, result);\n else\n return AngleSweep.createStartEndRadians(this.endRadians, this.startRadians + s * Math.PI, result);\n }\n /** Restrict start and end angles to the degree range [-90,+90]. */\n public capLatitudeInPlace(): void {\n const limit = 0.5 * Math.PI;\n this._radians0 = Geometry.clampToStartEnd(this._radians0, -limit, limit);\n this._radians1 = Geometry.clampToStartEnd(this._radians1, -limit, limit);\n }\n /**\n * Restrict [[sweepDegrees]] to the range [-360, 360].\n * The start angle and sign of the sweep angle are unchanged.\n */\n public clampToFullCircle(result?: AngleSweep): AngleSweep {\n result = result ?? new AngleSweep();\n const sweepRadians = Geometry.clampToStartEnd(this.sweepRadians, -Angle.pi2Radians, Angle.pi2Radians);\n result.setStartEndRadians(this._radians0, this._radians0 + sweepRadians);\n return result;\n }\n /** Ask if the sweep is counterclockwise, i.e. positive sweep. */\n public get isCCW(): boolean {\n return this._radians1 >= this._radians0;\n }\n /** Ask if the sweep is a full circle. */\n public get isFullCircle(): boolean {\n return Angle.isFullCircleRadians(this.sweepRadians);\n }\n /** Ask if the sweep is a full sweep from south pole to north pole. */\n public get isFullLatitudeSweep(): boolean {\n const a = Math.PI * 0.5;\n return Angle.isAlmostEqualRadiansNoPeriodShift(this._radians0, -a)\n && Angle.isAlmostEqualRadiansNoPeriodShift(this._radians1, a);\n }\n /** Return a clone of this sweep. */\n public clone(): AngleSweep {\n return new AngleSweep(this._radians0, this._radians1);\n }\n /** Convert fractional position in the sweep to radians. */\n public fractionToRadians(fraction: number): number {\n return fraction < 0.5 ?\n this._radians0 + fraction * (this._radians1 - this._radians0) :\n this._radians1 + (fraction - 1.0) * (this._radians1 - this._radians0);\n }\n /** Convert fractional position in the sweep to strongly typed Angle object. */\n public fractionToAngle(fraction: number) {\n return Angle.createRadians(this.fractionToRadians(fraction));\n }\n /**\n * Return 2PI divided by the sweep radians (i.e. 360 degrees divided by sweep angle).\n * * This is the number of fractional intervals required to cover a whole circle.\n * @returns period of the sweep, or 1 if sweep is empty.\n */\n public fractionPeriod(): number {\n return this.isEmpty ? 1.0 : Angle.pi2Radians / Math.abs(this._radians1 - this._radians0);\n }\n /**\n * Return the fractionalized position of the given angle (as Angle) computed without consideration of\n * 2PI period and without consideration of angle sweep direction (CW or CCW).\n * * the start angle is at fraction 0\n * * the end angle is at fraction 1\n * * interior angles are between 0 and 1\n * * negative fraction for angles \"before\" the start angle if start < end\n * * fraction larger than one for angles \"after\" the end angle if start < end\n * * fraction larger than one for angles \"before\" the start angle if start > end\n * * negative fraction for angles \"after\" the end angle if start > end\n * * does not allow period shift\n * @returns unbounded fraction, or 1 if sweep is empty.\n */\n public angleToUnboundedFraction(theta: Angle): number {\n return this.isEmpty ? 1.0 : (theta.radians - this._radians0) / (this._radians1 - this._radians0);\n }\n\n /**\n * Convert a sweep fraction to the equivalent period-shifted fraction inside the sweep, or within one period of zero\n * on the desired side.\n * @param fraction fraction of the sweep.\n * @param radians0 start angle of sweep (in radians).\n * @param radians1 end angle of sweep (in radians).\n * @param toNegativeFraction return an exterior fraction period-shifted to within one period of the start (true) or\n * end (false) of the sweep.\n * @returns period-shifted fraction. If `fraction` is already in [0,1], or the sweep is empty, then `fraction` is\n * returned unchanged.\n */\n public static fractionToSignedPeriodicFractionStartEnd(fraction: number, radians0: number, radians1: number, toNegativeFraction: boolean): number {\n const sweep = radians1 - radians0;\n if (Angle.isAlmostEqualRadiansNoPeriodShift(0, sweep))\n return fraction; // empty sweep\n if (Geometry.isIn01(fraction))\n return fraction;\n const period = Angle.pi2Radians / Math.abs(sweep);\n fraction = fraction % period; // period-shifted equivalent fraction closest to 0 with same sign as fraction\n if (fraction + period < 1)\n fraction += period; // it's really an interior fraction\n if (Geometry.isIn01(fraction) || (toNegativeFraction && fraction < 0) || (!toNegativeFraction && fraction > 1))\n return fraction;\n return toNegativeFraction ? fraction - period : fraction + period; // shift to other side of sweep\n }\n /**\n * Convert a sweep fraction to the equivalent period-shifted fraction inside this sweep, or within one period of\n * zero on the desired side.\n * @param fraction fraction of the sweep.\n * @param toNegativeFraction return an exterior fraction period-shifted to within one period of the start (true) or\n * end (false) of the sweep.\n * @returns period-shifted fraction. If `fraction` is already in [0,1], or the sweep is empty, then `fraction` is\n * returned unchanged.\n */\n public fractionToSignedPeriodicFraction(fraction: number, toNegativeFraction: boolean): number {\n return AngleSweep.fractionToSignedPeriodicFractionStartEnd(fraction, this._radians0, this._radians1, toNegativeFraction);\n }\n\n /**\n * Return the fractionalized position of the given angle (as radians), computed with consideration of 2PI period.\n * * consider radians0 as `start` angle of the sweep and radians1 as `end` angle of the sweep\n * * the start angle is at fraction 0\n * * the end angle is at fraction 1\n * * interior angles are between 0 and 1\n * * all exterior angles are at fractions greater than 1\n * * allows period shift\n * @param radians input angle (in radians)\n * @param radians0 start angle of sweep (in radians)\n * @param radians1 end angle of sweep (in radians)\n * @param zeroSweepDefault return value when the sweep is empty (default 0)\n * @returns nonnegative fraction, or `zeroSweepDefault` if the sweep is empty.\n */\n public static radiansToPositivePeriodicFractionStartEnd(radians: number, radians0: number, radians1: number, zeroSweepDefault: number = 0.0): number {\n const zeroSweepMarker = Geometry.largeCoordinateResult;\n let fraction = this.radiansToSignedPeriodicFractionStartEnd(radians, radians0, radians1, zeroSweepMarker);\n if (fraction === zeroSweepMarker)\n return zeroSweepDefault;\n if (fraction < 0) {\n const period = Angle.pi2Radians / Math.abs(radians1 - radians0);\n fraction += period;\n }\n return fraction;\n }\n /**\n * Return the fractionalized position of the given angle (as radians), computed with consideration of 2PI period.\n * * the start angle is at fraction 0\n * * the end angle is at fraction 1\n * * interior angles are between 0 and 1\n * * all exterior angles are at fractions greater than 1\n * * allows period shift\n * @param radians input angle (in radians)\n * @param zeroSweepDefault return value when this sweep is empty (default 0)\n * @returns nonnegative fraction, or `zeroSweepDefault` if the sweep is empty.\n */\n public radiansToPositivePeriodicFraction(radians: number, zeroSweepDefault: number = 0.0): number {\n return AngleSweep.radiansToPositivePeriodicFractionStartEnd(radians, this._radians0, this._radians1, zeroSweepDefault);\n }\n /**\n * Return the fractionalized position of the given angle (as Angle), computed with consideration of 2PI period.\n * * the start angle is at fraction 0\n * * the end angle is at fraction 1\n * * interior angles are between 0 and 1\n * * all exterior angles are at fractions greater than 1\n * * allows period shift\n * @param theta input angle\n * @param zeroSweepDefault return value when this sweep is empty (default 0)\n * @returns nonnegative fraction, or `zeroSweepDefault` if the sweep is empty.\n */\n public angleToPositivePeriodicFraction(theta: Angle, zeroSweepDefault: number = 0.0): number {\n return this.radiansToPositivePeriodicFraction(theta.radians, zeroSweepDefault);\n }\n /**\n * Return the fractionalized position of the given array of angles (as radian), computed with consideration of 2PI period.\n * * fraction is always positive\n * * the start angle is at fraction 0\n * * the end angle is at fraction 1\n * * interior angles are between 0 and 1\n * * all exterior angles are at fractions greater than 1\n * * allows period shift\n */\n public radiansArrayToPositivePeriodicFractions(data: GrowableFloat64Array) {\n const n = data.length;\n for (let i = 0; i < n; i++) {\n data.reassign(i, this.radiansToPositivePeriodicFraction(data.atUncheckedIndex(i)));\n }\n }\n /**\n * Return the fractionalized position of the given angle (as radians) computed with consideration of\n * 2PI period and with consideration of angle sweep direction (CW or CCW).\n * * the start angle is at fraction 0\n * * the end angle is at fraction 1\n * * interior angles are between 0 and 1\n * * negative fraction for angles \"before\" the start angle\n * * fraction larger than one for angles \"after\" the end angle\n * * allows period shift\n * @param radians input angle (in radians)\n * @param radians0 start angle of sweep (in radians)\n * @param radians1 end angle of sweep (in radians)\n * @param zeroSweepDefault return value when the sweep is empty (default 0)\n * @returns fraction, or `zeroSweepDefault` if the sweep is empty.\n */\n public static radiansToSignedPeriodicFractionStartEnd(radians: number, radians0: number, radians1: number, zeroSweepDefault: number = 0.0): number {\n const sweep = radians1 - radians0;\n if (Angle.isAlmostEqualRadiansNoPeriodShift(0, sweep))\n return zeroSweepDefault;\n if (Angle.isAlmostEqualRadiansAllowPeriodShift(radians0, radians1)) {\n // for sweep = 2nPi !== 0, allow matching without period shift, else we never return 1.0\n if (Angle.isAlmostEqualRadiansNoPeriodShift(radians, radians0))\n return 0.0;\n if (Angle.isAlmostEqualRadiansNoPeriodShift(radians, radians1))\n return 1.0;\n } else {\n if (Angle.isAlmostEqualRadiansAllowPeriodShift(radians, radians0))\n return 0.0;\n if (Angle.isAlmostEqualRadiansAllowPeriodShift(radians, radians1))\n return 1.0;\n }\n const fraction = (radians - radians0) / sweep;\n return this.fractionToSignedPeriodicFractionStartEnd(fraction, radians0, radians1, fraction < 0);\n }\n /**\n * Return the fractionalized position of the given angle (as radians) computed with consideration of\n * 2PI period and with consideration of angle sweep direction (CW or CCW).\n * * the start angle is at fraction 0\n * * the end angle is at fraction 1\n * * interior angles are between 0 and 1\n * * negative fraction for angles \"before\" the start angle\n * * fraction larger than one for angles \"after\" the end angle\n * * allows period shift\n * @param radians input angle (in radians)\n * @param zeroSweepDefault return value when this sweep is empty (default 0)\n * @returns fraction, or `zeroSweepDefault` if this sweep is empty.\n */\n public radiansToSignedPeriodicFraction(radians: number, zeroSweepDefault: number = 0.0): number {\n return AngleSweep.radiansToSignedPeriodicFractionStartEnd(radians, this._radians0, this._radians1, zeroSweepDefault);\n }\n /**\n * Return the fractionalized position of the given angle (as Angle) computed with consideration of\n * 2PI period and with consideration of angle sweep direction (CW or CCW).\n * * the start angle is at fraction 0\n * * the end angle is at fraction 1\n * * interior angles are between 0 and 1\n * * negative fraction for angles \"before\" the start angle\n * * fraction larger than one for angles \"after\" the end angle\n * * allows period shift\n * @param theta input angle\n * @param zeroSweepDefault return value when this sweep is empty (default 0)\n * @returns fraction, or `zeroSweepDefault` if this sweep is empty.\n */\n public angleToSignedPeriodicFraction(theta: Angle, zeroSweepDefault: number = 0.0): number {\n return this.radiansToSignedPeriodicFraction(theta.radians, zeroSweepDefault);\n }\n\n /**\n * Return the fractionalized position of the given radian angle with respect to the sweep.\n * * The start angle returns fraction 0\n * * The end angle returns fraction 1\n * * Interior angles (and their multiples of 2PI) return fractions in [0,1].\n * * Exterior angles return fractions outside [0,1] according to `toNegativeFraction`.\n * @param radians input angle (in radians)\n * @param radians0 start angle of sweep (in radians)\n * @param radians1 end angle of sweep (in radians)\n * @param toNegativeFraction convert an exterior angle to a negative number (true), or to\n * a number greater than one (false, default). If false, this is just [[radiansToPositivePeriodicFractionStartEnd]].\n * @param zeroSweepDefault return value when the sweep is empty (default 0).\n * @returns fraction, or `zeroSweepDefault` if the sweep is empty\n */\n public static radiansToSignedFractionStartEnd(radians: number, radians0: number, radians1: number, toNegativeFraction: boolean = false, zeroSweepDefault: number = 0.0): number {\n const zeroSweepMarker = Geometry.largeCoordinateResult;\n let fraction = this.radiansToSignedPeriodicFractionStartEnd(radians, radians0, radians1, zeroSweepMarker);\n if (fraction === zeroSweepMarker)\n return zeroSweepDefault;\n if ((toNegativeFraction && fraction > 1) || (!toNegativeFraction && fraction < 0)) {\n let period = Angle.pi2Radians / Math.abs(radians1 - radians0);\n if (toNegativeFraction)\n period = -period;\n fraction += period;\n }\n return fraction;\n }\n /**\n * Return the fractionalized position of the given radian angle with respect to this sweep.\n * * The start angle returns fraction 0\n * * The end angle returns fraction 1\n * * Interior angles (and their multiples of 2PI) return fractions in [0,1].\n * * Exterior angles return fractions outside [0,1] according to `toNegativeFraction`.\n * @param radians input angle (in radians)\n * @param toNegativeFraction convert an exterior angle to a negative number (true), or to\n * a number greater than one (false, default). If false, this is just [[radiansToPositivePeriodicFraction]].\n * @param zeroSweepDefault return value when this sweep is empty (default 0).\n * @returns fraction, or `zeroSweepDefault` if this sweep is empty\n */\n public radiansToSignedFraction(radians: number, toNegativeFraction: boolean = false, zeroSweepDefault: number = 0.0): number {\n return AngleSweep.radiansToSignedFractionStartEnd(radians, this._radians0, this._radians1, toNegativeFraction, zeroSweepDefault);\n }\n /**\n * Return the fractionalized position of the given angle with respect to this sweep.\n * * The start angle returns fraction 0\n * * The end angle returns fraction 1\n * * Interior angles (and their multiples of 2PI) return fractions in [0,1].\n * * Exterior angles return fractions outside [0,1] according to `toNegativeFraction`.\n * @param theta input angle\n * @param toNegativeFraction convert an exterior angle to a negative number (true), or to\n * a number greater than one (false, default). If false, this is just [[angleToPositivePeriodicFraction]].\n * @param zeroSweepDefault return value when this sweep is empty (default 0).\n * @returns fraction, or `zeroSweepDefault` if this sweep is empty\n */\n public angleToSignedFraction(theta: Angle, toNegativeFraction: boolean = false, zeroSweepDefault: number = 0.0): number {\n return this.radiansToSignedFraction(theta.radians, toNegativeFraction, zeroSweepDefault);\n }\n\n /** Test if the given angle (as radians) is within sweep (between radians0 and radians1) */\n public static isRadiansInStartEnd(radians: number, radians0: number, radians1: number, allowPeriodShift: boolean = true): boolean {\n const delta0 = radians - radians0;\n const delta1 = radians - radians1;\n if (delta0 * delta1 <= 0.0)\n return true;\n if (radians0 === radians1)\n return allowPeriodShift ? Angle.isAlmostEqualRadiansAllowPeriodShift(radians, radians0) : Angle.isAlmostEqualRadiansNoPeriodShift(radians, radians0);\n return allowPeriodShift ? this.radiansToPositivePeriodicFractionStartEnd(radians, radians0, radians1, 1000.0) <= 1.0 : false;\n }\n /** Test if the given angle (as radians) is within sweep */\n public isRadiansInSweep(radians: number, allowPeriodShift: boolean = true): boolean {\n return AngleSweep.isRadiansInStartEnd(radians, this.startRadians, this.endRadians, allowPeriodShift);\n }\n /** Test if the given angle (as Angle) is within the sweep */\n public isAngleInSweep(angle: Angle): boolean {\n return this.isRadiansInSweep(angle.radians);\n }\n /**\n * Set this AngleSweep from various sources:\n * * if json is undefined, a full-circle sweep is returned.\n * * If json is an AngleSweep object, it is cloned\n * * If json is an array of 2 numbers, those numbers are start and end angles in degrees.\n * * If `json.degrees` is an array of 2 numbers, those numbers are start and end angles in degrees.\n * * If `json.radians` is an array of 2 numbers, those numbers are start and end angles in radians.\n * * Otherwise, a full-circle sweep is returned.\n */\n public setFromJSON(json?: any) {\n if (!json)\n this.setStartEndRadians(); // default full circle\n else if (json instanceof AngleSweep)\n this.setFrom(json);\n else if (Geometry.isNumberArray(json.degrees, 2))\n this.setStartEndDegrees(json.degrees[0], json.degrees[1]);\n else if (Geometry.isNumberArray(json.radians, 2))\n this.setStartEndRadians(json.radians[0], json.radians[1]);\n else if (Geometry.isNumberArray(json, 2))\n this.setStartEndDegrees(json[0], json[1]);\n else\n this.setStartEndRadians(); // default full circle\n }\n /** Create an AngleSweep from a json object. */\n public static fromJSON(json?: AngleSweepProps): AngleSweep {\n const result = AngleSweep.create360();\n result.setFromJSON(json);\n return result;\n }\n /**\n * Convert an AngleSweep to a JSON object.\n * @return {*} [startAngleInDegrees, endAngleInDegrees]\n */\n public toJSON(): any {\n return [this.startDegrees, this.endDegrees];\n }\n /**\n * Test if two angle sweeps match within the given tolerance.\n * * Period shifts are allowed, but orientations must be the same.\n * @param other sweep to compare to this instance\n * @param radianTol optional radian tolerance, default value `Geometry.smallAngleRadians`\n */\n public isAlmostEqualAllowPeriodShift(other: AngleSweep, radianTol: number = Geometry.smallAngleRadians): boolean {\n return this.isCCW === other.isCCW // this rules out equating opposite sweeps like [0,-100] and [0,260]\n && Angle.isAlmostEqualRadiansAllowPeriodShift(this._radians0, other._radians0, radianTol)\n && Angle.isAlmostEqualRadiansAllowPeriodShift(this._radians1 - this._radians0, other._radians1 - other._radians0, radianTol);\n }\n /**\n * Test if two angle sweeps match within the given tolerance.\n * * Period shifts are not allowed.\n * @param other sweep to compare to this instance\n * @param radianTol optional radian tolerance, default value `Geometry.smallAngleRadians`\n */\n public isAlmostEqualNoPeriodShift(other: AngleSweep, radianTol: number = Geometry.smallAngleRadians): boolean {\n return Angle.isAlmostEqualRadiansNoPeriodShift(this._radians0, other._radians0, radianTol)\n && Angle.isAlmostEqualRadiansNoPeriodShift(this._radians1 - this._radians0, other._radians1 - other._radians0, radianTol);\n }\n /**\n * Test if start and end angles match with radians tolerance.\n * * Period shifts are not allowed.\n * * This function is equivalent to isAlmostEqualNoPeriodShift. It is present for consistency with other classes.\n * However, it is recommended to use isAlmostEqualNoPeriodShift which has a clearer name.\n */\n public isAlmostEqual(other: AngleSweep): boolean {\n return this.isAlmostEqualNoPeriodShift(other);\n }\n}\n"]}
1
+ {"version":3,"file":"AngleSweep.js","sourceRoot":"","sources":["../../../src/geometry3d/AngleSweep.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAoC,QAAQ,EAAE,MAAM,aAAa,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,OAAO,UAAU;IACb,SAAS,CAAS;IAClB,SAAS,CAAS;IAC1B,iEAAiE;IACjE,IAAW,YAAY;QACrB,OAAO,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAChD,CAAC;IACD,+DAA+D;IAC/D,IAAW,UAAU;QACnB,OAAO,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAChD,CAAC;IACD,8DAA8D;IAC9D,IAAW,YAAY;QACrB,OAAO,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACnD,CAAC;IACD,iEAAiE;IACjE,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IACD,+DAA+D;IAC/D,IAAW,UAAU;QACnB,OAAO,IAAI,CAAC,SAAS,CAA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,CAAC,iBAAiB;QACjG,OAAO,KAAK,CAAC,iCAAiC,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC;eACrF,KAAK,CAAC,iCAAiC,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IACjG,CAAC;IACD;;;;;OAKG;IACI,aAAa,CAAC,KAAiB;QACpC,OAAO,IAAI,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module CartesianGeometry\n */\n\nimport { AngleSweepProps, BeJSONFunctions, Geometry } from \"../Geometry\";\nimport { Angle } from \"./Angle\";\nimport { GrowableFloat64Array } from \"./GrowableFloat64Array\";\n\n/**\n * An `AngleSweep` is a pair of angles at start and end of an interval.\n *\n * * For stroking purposes, the \"included interval\" is all angles numerically reached\n * by `theta = start + f * (end - start)`, where `0 <= f <= 1`.\n * * This stroking formula is simple numbers -- 2PI shifts are not involved.\n * * 2PI shifts do become important in the reverse mapping of an angle to a fraction.\n * * Angles greater than 360 and less than 0 are fine as endpoints.\n * * An AngleSweep determines orientation only _in concert with a reference vector_, e.g., a plane normal like (0,0,1).\n * * Be careful reading orientation from an AngleSweep without a reference vector!\n * * If \"start < end\" the angles in the sweep proceed counterclockwise around the reference vector.\n * * If \"start > end\" the angles in the sweep proceed clockwise around the reference vector.\n * * (350,370) covers the same angles as (-10,10), and both sweeps are counterclockwise around the reference vector.\n * * (370,350) covers the same angles as (10,-10), and both sweeps are clockwise around the reference vector.\n * * (370,350) covers the same angles as (-10,10), but the sweeps have opposite orientation.\n * * Math details can be found at docs/learning/geometry/Angle.md .\n * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/AngleSweep .\n * @public\n */\nexport class AngleSweep implements BeJSONFunctions {\n private _radians0: number;\n private _radians1: number;\n /** Read-property for degrees at the start of this AngleSweep. */\n public get startDegrees() {\n return Angle.radiansToDegrees(this._radians0);\n }\n /** Read-property for degrees at the end of this AngleSweep. */\n public get endDegrees() {\n return Angle.radiansToDegrees(this._radians1);\n }\n /** Read-property for signed start-to-end sweep in degrees. */\n public get sweepDegrees() {\n return Angle.radiansToDegrees(this.sweepRadians);\n }\n /** Read-property for degrees at the start of this AngleSweep. */\n public get startRadians() {\n return this._radians0;\n }\n /** Read-property for degrees at the end of this AngleSweep. */\n public get endRadians() {\n return this._radians1;\n }\n /** Read-property for signed start-to-end sweep in radians. */\n public get sweepRadians() {\n return this._radians1 - this._radians0;\n }\n /** Whether the sweep angles are within smallAngle tolerance, without period shift. */\n public get isEmpty() {\n return Angle.isAlmostEqualRadiansNoPeriodShift(0, this.sweepRadians);\n }\n /** Return the (strongly typed) start angle */\n public get startAngle() {\n return Angle.createRadians(this._radians0);\n }\n /** Return the (strongly typed) end angle */\n public get endAngle() {\n return Angle.createRadians(this._radians1);\n }\n /**\n * Create a sweep as one of\n * * A clone of a given sweep\n * * 0 to given angle\n * * full circle if no arg given (sweep 0 to 360 degrees)\n */\n public static create(data?: AngleSweep | Angle): AngleSweep {\n if (data instanceof AngleSweep)\n return data.clone();\n if (data instanceof Angle)\n return new AngleSweep(0, data.radians);\n return AngleSweep.create360();\n }\n /**\n * (private) constructor with start and end angles in radians.\n * * Use explicitly named static methods to clarify intent and units of inputs:\n *\n * * createStartEndRadians (startRadians:number, endRadians:number)\n * * createStartEndDegrees (startDegrees:number, endDegrees:number)\n * * createStartEnd (startAngle:Angle, endAngle:Angle)\n * * createStartSweepRadians (startRadians:number, sweepRadians:number)\n * * createStartSweepDegrees (startDegrees:number, sweepDegrees:number)\n * * createStartSweep (startAngle:Angle, sweepAngle:Angle)\n */\n private constructor(startRadians: number = 0, endRadians: number = 0) {\n this._radians0 = startRadians;\n this._radians1 = endRadians;\n }\n /**\n * Directly set the start and end angles in radians\n * * If the difference between startRadians and endRadians is greater than 360, the function limits the angle sweep to 360.\n */\n public setStartEndRadians(startRadians: number = 0, endRadians: number = 2.0 * Math.PI) {\n const delta = endRadians - startRadians;\n if (Angle.isFullCircleRadians(delta)) {\n endRadians = startRadians + (delta > 0 ? 2.0 : -2.0) * Math.PI;\n }\n this._radians0 = startRadians;\n this._radians1 = endRadians;\n }\n /** Directly set the start and end angles in degrees */\n public setStartEndDegrees(startDegrees: number = 0, endDegrees: number = 360.0) {\n this.setStartEndRadians(Angle.degreesToRadians(startDegrees), Angle.degreesToRadians(endDegrees));\n }\n /**\n * Create an AngleSweep from start and end angles given in radians.\n * * If the difference between startRadians and endRadians is greater than 360, the function limits the angle sweep to 360.\n */\n public static createStartEndRadians(startRadians: number = 0, endRadians: number = 2.0 * Math.PI, result?: AngleSweep): AngleSweep {\n result = result ? result : new AngleSweep();\n result.setStartEndRadians(startRadians, endRadians);\n return result;\n }\n /** Return the angle obtained by subtracting radians from this angle. */\n public cloneMinusRadians(radians: number): AngleSweep {\n return new AngleSweep(this._radians0 - radians, this._radians1 - radians);\n }\n /** Create an AngleSweep from start and end angles given in degrees. */\n public static createStartEndDegrees(startDegrees: number = 0, endDegrees: number = 360, result?: AngleSweep): AngleSweep {\n return AngleSweep.createStartEndRadians(Angle.degreesToRadians(startDegrees), Angle.degreesToRadians(endDegrees), result);\n }\n /** Create an angle sweep from strongly typed start and end angles */\n public static createStartEnd(startAngle: Angle, endAngle: Angle, result?: AngleSweep): AngleSweep {\n result = result ? result : new AngleSweep();\n result.setStartEndRadians(startAngle.radians, endAngle.radians);\n return result;\n }\n /** Create an AngleSweep from start and end angles given in radians. */\n public static createStartSweepRadians(startRadians: number = 0, sweepRadians: number = Math.PI, result?: AngleSweep): AngleSweep {\n result = result ? result : new AngleSweep();\n result.setStartEndRadians(startRadians, startRadians + sweepRadians);\n return result;\n }\n /** Create an AngleSweep from start and sweep given in degrees. */\n public static createStartSweepDegrees(startDegrees: number = 0, sweepDegrees: number = 360, result?: AngleSweep): AngleSweep {\n return AngleSweep.createStartEndRadians(Angle.degreesToRadians(startDegrees), Angle.degreesToRadians(startDegrees + sweepDegrees), result);\n }\n /** Create an angle sweep with limits given as (strongly typed) angles for start and sweep */\n public static createStartSweep(startAngle: Angle, sweepAngle: Angle, result?: AngleSweep): AngleSweep {\n return AngleSweep.createStartSweepRadians(startAngle.radians, sweepAngle.radians, result);\n }\n /** Return a sweep with limits interpolated between this and other. */\n public interpolate(fraction: number, other: AngleSweep): AngleSweep {\n return new AngleSweep(\n Geometry.interpolate(this._radians0, fraction, other._radians0),\n Geometry.interpolate(this._radians1, fraction, other._radians1),\n );\n }\n /** Copy from other AngleSweep. */\n public setFrom(other: AngleSweep) {\n this._radians0 = other._radians0;\n this._radians1 = other._radians1;\n }\n /** Create a full circle sweep (CCW). startRadians defaults to 0 */\n public static create360(startRadians?: number): AngleSweep {\n startRadians = startRadians ? startRadians : 0.0;\n return new AngleSweep(startRadians, startRadians + 2.0 * Math.PI);\n }\n /** Create a sweep from the south pole to the north pole (-90 to +90). */\n public static createFullLatitude() {\n return AngleSweep.createStartEndRadians(-0.5 * Math.PI, 0.5 * Math.PI);\n }\n /** Reverse the start and end angle in place. */\n public reverseInPlace() {\n const tmp = this._radians0;\n this._radians0 = this._radians1;\n this._radians1 = tmp;\n }\n /**\n * Return a sweep for the \"other\" part of the circle.\n * @param reverseDirection true to move backwards (CW) from start to end, false to more forwards (CCW) from start to end.\n */\n public cloneComplement(reverseDirection: boolean = false, result?: AngleSweep): AngleSweep {\n const s = this.sweepRadians >= 0 ? 2.0 : -2.0;\n if (reverseDirection)\n return AngleSweep.createStartEndRadians(this.startRadians, this.endRadians - s * Math.PI, result);\n else\n return AngleSweep.createStartEndRadians(this.endRadians, this.startRadians + s * Math.PI, result);\n }\n /** Restrict start and end angles to the degree range [-90,+90]. */\n public capLatitudeInPlace(): void {\n const limit = 0.5 * Math.PI;\n this._radians0 = Geometry.clampToStartEnd(this._radians0, -limit, limit);\n this._radians1 = Geometry.clampToStartEnd(this._radians1, -limit, limit);\n }\n /**\n * Restrict [[sweepDegrees]] to the range [-360, 360].\n * The start angle and sign of the sweep angle are unchanged.\n */\n public clampToFullCircle(result?: AngleSweep): AngleSweep {\n result = result ?? new AngleSweep();\n const sweepRadians = Geometry.clampToStartEnd(this.sweepRadians, -Angle.pi2Radians, Angle.pi2Radians);\n result.setStartEndRadians(this._radians0, this._radians0 + sweepRadians);\n return result;\n }\n /** Ask if the sweep is counterclockwise, i.e. positive sweep. */\n public get isCCW(): boolean {\n return this._radians1 >= this._radians0;\n }\n /** Ask if the sweep is a full circle. */\n public get isFullCircle(): boolean {\n return Angle.isFullCircleRadians(this.sweepRadians);\n }\n /** Ask if the sweep is a full sweep from south pole to north pole. */\n public get isFullLatitudeSweep(): boolean {\n const a = Math.PI * 0.5;\n return Angle.isAlmostEqualRadiansNoPeriodShift(this._radians0, -a)\n && Angle.isAlmostEqualRadiansNoPeriodShift(this._radians1, a);\n }\n /** Return a clone of this sweep. */\n public clone(): AngleSweep {\n return new AngleSweep(this._radians0, this._radians1);\n }\n /** Convert fractional position in the sweep to radians. */\n public fractionToRadians(fraction: number): number {\n return fraction < 0.5 ?\n this._radians0 + fraction * this.sweepRadians :\n this._radians1 + (fraction - 1.0) * this.sweepRadians;\n }\n /** Convert fractional position in the sweep to strongly typed Angle object. */\n public fractionToAngle(fraction: number) {\n return Angle.createRadians(this.fractionToRadians(fraction));\n }\n /**\n * Return 2PI divided by the sweep radians.\n * * This is the number of fractional intervals required to cover a whole circle.\n * @returns period of the sweep, or 1 if sweep is empty.\n */\n public fractionPeriod(): number {\n return this.isEmpty ? 1.0 : Angle.pi2Radians / Math.abs(this.sweepRadians);\n }\n /**\n * Return the fractionalized position of the given angle (as Angle) computed without consideration of\n * 2PI period and without consideration of angle sweep direction (CW or CCW).\n * * the start angle is at fraction 0\n * * the end angle is at fraction 1\n * * interior angles are between 0 and 1\n * * negative fraction for angles \"before\" the start angle if start < end\n * * fraction larger than one for angles \"after\" the end angle if start < end\n * * fraction larger than one for angles \"before\" the start angle if start > end\n * * negative fraction for angles \"after\" the end angle if start > end\n * * does not allow period shift\n * @returns unbounded fraction, or 1 if sweep is empty.\n */\n public angleToUnboundedFraction(theta: Angle): number {\n return this.isEmpty ? 1.0 : (theta.radians - this._radians0) / this.sweepRadians;\n }\n\n /**\n * Convert a sweep fraction to the equivalent period-shifted fraction inside the sweep, or within one period of zero\n * on the desired side.\n * @param fraction fraction of the sweep.\n * @param radians0 start angle of sweep (in radians).\n * @param radians1 end angle of sweep (in radians).\n * @param toNegativeFraction exterior fraction handling:\n * * if true, return `fraction` period-shifted to within one period of the start\n * * if false, return `fraction` period-shifted to within one period of the end\n * * if undefined, return the period-shift of `fraction` closest to [0,1].\n * @returns period-shifted fraction. If `fraction` is already in [0,1], or the sweep is empty, then `fraction` is\n * returned unchanged.\n */\n public static fractionToSignedPeriodicFractionStartEnd(fraction: number, radians0: number, radians1: number, toNegativeFraction?: boolean): number {\n const sweep = radians1 - radians0;\n if (Angle.isAlmostEqualRadiansNoPeriodShift(0, sweep))\n return fraction; // empty sweep\n if (Geometry.isIn01(fraction))\n return fraction;\n const period = Angle.pi2Radians / Math.abs(sweep);\n fraction = fraction % period; // period-shifted equivalent fraction closest to 0 with same sign as fraction\n if (fraction + period < 1)\n fraction += period; // it's really an interior fraction\n if (Geometry.isIn01(fraction))\n return fraction;\n if (toNegativeFraction === true)\n return fraction < 0 ? fraction : fraction - period;\n if (toNegativeFraction === false)\n return fraction > 1 ? fraction : fraction + period;\n const fractionDistFrom01 = fraction < 0 ? -fraction : fraction - 1;\n const fraction2 = fraction < 0 ? fraction + period : fraction - period; // period-shift with opposite sign\n const fraction2DistFrom01 = fraction2 < 0 ? -fraction2 : fraction2 - 1;\n return fractionDistFrom01 < fraction2DistFrom01 ? fraction : fraction2; // choose the period-shift closer to [0,1]\n }\n /**\n * Convert a sweep fraction to the equivalent period-shifted fraction inside this sweep, or within one period of\n * zero on the desired side.\n * @param fraction fraction of the sweep.\n * @param toNegativeFraction exterior fraction handling:\n * * if true, return `fraction` period-shifted to within one period of the start\n * * if false, return `fraction` period-shifted to within one period of the end\n * * if undefined, return the period-shift of `fraction` closest to [0,1].\n * @returns period-shifted fraction. If `fraction` is already in [0,1], or the sweep is empty, then `fraction` is\n * returned unchanged.\n */\n public fractionToSignedPeriodicFraction(fraction: number, toNegativeFraction?: boolean): number {\n return AngleSweep.fractionToSignedPeriodicFractionStartEnd(fraction, this._radians0, this._radians1, toNegativeFraction);\n }\n\n /**\n * Return the fractionalized position of the given angle (as radians), computed with consideration of 2PI period.\n * * consider radians0 as `start` angle of the sweep and radians1 as `end` angle of the sweep\n * * the start angle is at fraction 0\n * * the end angle is at fraction 1\n * * interior angles are between 0 and 1\n * * all exterior angles are at fractions greater than 1\n * * allows period shift\n * @param radians input angle (in radians)\n * @param radians0 start angle of sweep (in radians)\n * @param radians1 end angle of sweep (in radians)\n * @param zeroSweepDefault return value when the sweep is empty (default 0)\n * @returns nonnegative fraction, or `zeroSweepDefault` if the sweep is empty.\n */\n public static radiansToPositivePeriodicFractionStartEnd(radians: number, radians0: number, radians1: number, zeroSweepDefault: number = 0.0): number {\n const zeroSweepMarker = Geometry.largeCoordinateResult;\n let fraction = this.radiansToSignedPeriodicFractionStartEnd(radians, radians0, radians1, zeroSweepMarker);\n if (fraction === zeroSweepMarker)\n return zeroSweepDefault;\n if (fraction < 0) {\n const period = Angle.pi2Radians / Math.abs(radians1 - radians0);\n fraction += period;\n }\n return fraction;\n }\n /**\n * Return the fractionalized position of the given angle (as radians), computed with consideration of 2PI period.\n * * the start angle is at fraction 0\n * * the end angle is at fraction 1\n * * interior angles are between 0 and 1\n * * all exterior angles are at fractions greater than 1\n * * allows period shift\n * @param radians input angle (in radians)\n * @param zeroSweepDefault return value when this sweep is empty (default 0)\n * @returns nonnegative fraction, or `zeroSweepDefault` if the sweep is empty.\n */\n public radiansToPositivePeriodicFraction(radians: number, zeroSweepDefault: number = 0.0): number {\n return AngleSweep.radiansToPositivePeriodicFractionStartEnd(radians, this._radians0, this._radians1, zeroSweepDefault);\n }\n /**\n * Return the fractionalized position of the given angle (as Angle), computed with consideration of 2PI period.\n * * the start angle is at fraction 0\n * * the end angle is at fraction 1\n * * interior angles are between 0 and 1\n * * all exterior angles are at fractions greater than 1\n * * allows period shift\n * @param theta input angle\n * @param zeroSweepDefault return value when this sweep is empty (default 0)\n * @returns nonnegative fraction, or `zeroSweepDefault` if the sweep is empty.\n */\n public angleToPositivePeriodicFraction(theta: Angle, zeroSweepDefault: number = 0.0): number {\n return this.radiansToPositivePeriodicFraction(theta.radians, zeroSweepDefault);\n }\n /**\n * Return the fractionalized position of the given array of angles (as radian), computed with consideration of 2PI period.\n * * fraction is always positive\n * * the start angle is at fraction 0\n * * the end angle is at fraction 1\n * * interior angles are between 0 and 1\n * * all exterior angles are at fractions greater than 1\n * * allows period shift\n */\n public radiansArrayToPositivePeriodicFractions(data: GrowableFloat64Array) {\n const n = data.length;\n for (let i = 0; i < n; i++) {\n data.reassign(i, this.radiansToPositivePeriodicFraction(data.atUncheckedIndex(i)));\n }\n }\n /**\n * Return the fractionalized position of the given angle (as radians) computed with consideration of\n * 2PI period and with consideration of angle sweep direction (CW or CCW).\n * * the start angle is at fraction 0\n * * the end angle is at fraction 1\n * * interior angles are between 0 and 1\n * * negative fraction for angles \"before\" the start angle\n * * fraction larger than one for angles \"after\" the end angle\n * * allows period shift\n * @param radians input angle (in radians)\n * @param radians0 start angle of sweep (in radians)\n * @param radians1 end angle of sweep (in radians)\n * @param zeroSweepDefault return value when the sweep is empty (default 0)\n * @returns fraction, or `zeroSweepDefault` if the sweep is empty.\n */\n public static radiansToSignedPeriodicFractionStartEnd(radians: number, radians0: number, radians1: number, zeroSweepDefault: number = 0.0): number {\n const sweep = radians1 - radians0;\n if (Angle.isAlmostEqualRadiansNoPeriodShift(0, sweep))\n return zeroSweepDefault;\n if (Angle.isAlmostEqualRadiansAllowPeriodShift(radians0, radians1)) {\n // for sweep = 2nPi !== 0, allow matching without period shift, else we never return 1.0\n if (Angle.isAlmostEqualRadiansNoPeriodShift(radians, radians0))\n return 0.0;\n if (Angle.isAlmostEqualRadiansNoPeriodShift(radians, radians1))\n return 1.0;\n } else {\n if (Angle.isAlmostEqualRadiansAllowPeriodShift(radians, radians0))\n return 0.0;\n if (Angle.isAlmostEqualRadiansAllowPeriodShift(radians, radians1))\n return 1.0;\n }\n const fraction = (radians - radians0) / sweep;\n return this.fractionToSignedPeriodicFractionStartEnd(fraction, radians0, radians1, fraction < 0);\n }\n /**\n * Return the fractionalized position of the given angle (as radians) computed with consideration of\n * 2PI period and with consideration of angle sweep direction (CW or CCW).\n * * the start angle is at fraction 0\n * * the end angle is at fraction 1\n * * interior angles are between 0 and 1\n * * negative fraction for angles \"before\" the start angle\n * * fraction larger than one for angles \"after\" the end angle\n * * allows period shift\n * @param radians input angle (in radians)\n * @param zeroSweepDefault return value when this sweep is empty (default 0)\n * @returns fraction, or `zeroSweepDefault` if this sweep is empty.\n */\n public radiansToSignedPeriodicFraction(radians: number, zeroSweepDefault: number = 0.0): number {\n return AngleSweep.radiansToSignedPeriodicFractionStartEnd(radians, this._radians0, this._radians1, zeroSweepDefault);\n }\n /**\n * Return the fractionalized position of the given angle (as Angle) computed with consideration of\n * 2PI period and with consideration of angle sweep direction (CW or CCW).\n * * the start angle is at fraction 0\n * * the end angle is at fraction 1\n * * interior angles are between 0 and 1\n * * negative fraction for angles \"before\" the start angle\n * * fraction larger than one for angles \"after\" the end angle\n * * allows period shift\n * @param theta input angle\n * @param zeroSweepDefault return value when this sweep is empty (default 0)\n * @returns fraction, or `zeroSweepDefault` if this sweep is empty.\n */\n public angleToSignedPeriodicFraction(theta: Angle, zeroSweepDefault: number = 0.0): number {\n return this.radiansToSignedPeriodicFraction(theta.radians, zeroSweepDefault);\n }\n\n /**\n * Return the fractionalized position of the given radian angle with respect to the sweep.\n * * The start angle returns fraction 0\n * * The end angle returns fraction 1\n * * Interior angles (and their multiples of 2PI) return fractions in [0,1].\n * * Exterior angles return fractions outside [0,1] according to `toNegativeFraction`.\n * @param radians input angle (in radians)\n * @param radians0 start angle of sweep (in radians)\n * @param radians1 end angle of sweep (in radians)\n * @param toNegativeFraction convert an exterior angle to a negative number (true), or to\n * a number greater than one (false, default). If false, this is just [[radiansToPositivePeriodicFractionStartEnd]].\n * @param zeroSweepDefault return value when the sweep is empty (default 0).\n * @returns fraction, or `zeroSweepDefault` if the sweep is empty\n */\n public static radiansToSignedFractionStartEnd(radians: number, radians0: number, radians1: number, toNegativeFraction: boolean = false, zeroSweepDefault: number = 0.0): number {\n const zeroSweepMarker = Geometry.largeCoordinateResult;\n let fraction = this.radiansToSignedPeriodicFractionStartEnd(radians, radians0, radians1, zeroSweepMarker);\n if (fraction === zeroSweepMarker)\n return zeroSweepDefault;\n if ((toNegativeFraction && fraction > 1) || (!toNegativeFraction && fraction < 0)) {\n let period = Angle.pi2Radians / Math.abs(radians1 - radians0);\n if (toNegativeFraction)\n period = -period;\n fraction += period;\n }\n return fraction;\n }\n /**\n * Return the fractionalized position of the given radian angle with respect to this sweep.\n * * The start angle returns fraction 0\n * * The end angle returns fraction 1\n * * Interior angles (and their multiples of 2PI) return fractions in [0,1].\n * * Exterior angles return fractions outside [0,1] according to `toNegativeFraction`.\n * @param radians input angle (in radians)\n * @param toNegativeFraction convert an exterior angle to a negative number (true), or to\n * a number greater than one (false, default). If false, this is just [[radiansToPositivePeriodicFraction]].\n * @param zeroSweepDefault return value when this sweep is empty (default 0).\n * @returns fraction, or `zeroSweepDefault` if this sweep is empty\n */\n public radiansToSignedFraction(radians: number, toNegativeFraction: boolean = false, zeroSweepDefault: number = 0.0): number {\n return AngleSweep.radiansToSignedFractionStartEnd(radians, this._radians0, this._radians1, toNegativeFraction, zeroSweepDefault);\n }\n /**\n * Return the fractionalized position of the given angle with respect to this sweep.\n * * The start angle returns fraction 0\n * * The end angle returns fraction 1\n * * Interior angles (and their multiples of 2PI) return fractions in [0,1].\n * * Exterior angles return fractions outside [0,1] according to `toNegativeFraction`.\n * @param theta input angle\n * @param toNegativeFraction convert an exterior angle to a negative number (true), or to\n * a number greater than one (false, default). If false, this is just [[angleToPositivePeriodicFraction]].\n * @param zeroSweepDefault return value when this sweep is empty (default 0).\n * @returns fraction, or `zeroSweepDefault` if this sweep is empty\n */\n public angleToSignedFraction(theta: Angle, toNegativeFraction: boolean = false, zeroSweepDefault: number = 0.0): number {\n return this.radiansToSignedFraction(theta.radians, toNegativeFraction, zeroSweepDefault);\n }\n\n /** Test if the given angle (as radians) is within sweep (between radians0 and radians1) */\n public static isRadiansInStartEnd(radians: number, radians0: number, radians1: number, allowPeriodShift: boolean = true): boolean {\n const delta0 = radians - radians0;\n const delta1 = radians - radians1;\n if (delta0 * delta1 <= 0.0)\n return true;\n if (radians0 === radians1)\n return allowPeriodShift ? Angle.isAlmostEqualRadiansAllowPeriodShift(radians, radians0) : Angle.isAlmostEqualRadiansNoPeriodShift(radians, radians0);\n return allowPeriodShift ? this.radiansToPositivePeriodicFractionStartEnd(radians, radians0, radians1, 1000.0) <= 1.0 : false;\n }\n /** Test if the given angle (as radians) is within sweep */\n public isRadiansInSweep(radians: number, allowPeriodShift: boolean = true): boolean {\n return AngleSweep.isRadiansInStartEnd(radians, this.startRadians, this.endRadians, allowPeriodShift);\n }\n /** Test if the given angle (as Angle) is within the sweep */\n public isAngleInSweep(angle: Angle): boolean {\n return this.isRadiansInSweep(angle.radians);\n }\n /**\n * Set this AngleSweep from various sources:\n * * if json is undefined, a full-circle sweep is returned.\n * * If json is an AngleSweep object, it is cloned\n * * If json is an array of 2 numbers, those numbers are start and end angles in degrees.\n * * If `json.degrees` is an array of 2 numbers, those numbers are start and end angles in degrees.\n * * If `json.radians` is an array of 2 numbers, those numbers are start and end angles in radians.\n * * Otherwise, a full-circle sweep is returned.\n */\n public setFromJSON(json?: any) {\n if (!json)\n this.setStartEndRadians(); // default full circle\n else if (json instanceof AngleSweep)\n this.setFrom(json);\n else if (Geometry.isNumberArray(json.degrees, 2))\n this.setStartEndDegrees(json.degrees[0], json.degrees[1]);\n else if (Geometry.isNumberArray(json.radians, 2))\n this.setStartEndRadians(json.radians[0], json.radians[1]);\n else if (Geometry.isNumberArray(json, 2))\n this.setStartEndDegrees(json[0], json[1]);\n else\n this.setStartEndRadians(); // default full circle\n }\n /** Create an AngleSweep from a json object. */\n public static fromJSON(json?: AngleSweepProps): AngleSweep {\n const result = AngleSweep.create360();\n result.setFromJSON(json);\n return result;\n }\n /**\n * Convert an AngleSweep to a JSON object.\n * @return {*} [startAngleInDegrees, endAngleInDegrees]\n */\n public toJSON(): any {\n return [this.startDegrees, this.endDegrees];\n }\n /**\n * Test if two angle sweeps match within the given tolerance.\n * * Period shifts are allowed, but orientations must be the same.\n * @param other sweep to compare to this instance\n * @param radianTol optional radian tolerance, default value `Geometry.smallAngleRadians`\n */\n public isAlmostEqualAllowPeriodShift(other: AngleSweep, radianTol: number = Geometry.smallAngleRadians): boolean {\n return this.isCCW === other.isCCW // this rules out equating opposite sweeps like [0,-100] and [0,260]\n && Angle.isAlmostEqualRadiansAllowPeriodShift(this._radians0, other._radians0, radianTol)\n && Angle.isAlmostEqualRadiansAllowPeriodShift(this.sweepRadians, other.sweepRadians, radianTol);\n }\n /**\n * Test if two angle sweeps match within the given tolerance.\n * * Period shifts are not allowed.\n * @param other sweep to compare to this instance\n * @param radianTol optional radian tolerance, default value `Geometry.smallAngleRadians`\n */\n public isAlmostEqualNoPeriodShift(other: AngleSweep, radianTol: number = Geometry.smallAngleRadians): boolean {\n return Angle.isAlmostEqualRadiansNoPeriodShift(this._radians0, other._radians0, radianTol)\n && Angle.isAlmostEqualRadiansNoPeriodShift(this.sweepRadians, other.sweepRadians, radianTol);\n }\n /**\n * Test if start and end angles match with radians tolerance.\n * * Period shifts are not allowed.\n * * This function is equivalent to isAlmostEqualNoPeriodShift. It is present for consistency with other classes.\n * However, it is recommended to use isAlmostEqualNoPeriodShift which has a clearer name.\n */\n public isAlmostEqual(other: AngleSweep): boolean {\n return this.isAlmostEqualNoPeriodShift(other);\n }\n}\n"]}
@@ -230,26 +230,25 @@ export declare class RecurseToCurvesGeometryHandler extends GeometryHandler {
230
230
  }
231
231
  /**
232
232
  * IStrokeHandler is an interface with methods to receive data about curves being stroked.
233
- * CurvePrimitives emitStrokes () methods emit calls to a handler object with these methods.
233
+ * CurvePrimitives emitStrokes() methods emit calls to a handler object with these methods.
234
234
  * The various CurvePrimitive types are free to announce either single points (announcePoint), linear fragments,
235
235
  * or fractional intervals of the parent curve.
236
- * * handler.startCurvePrimitive (cp) -- announce the curve primitive whose strokes will follow.
237
- * * announcePointTangent (xyz, fraction, tangent) -- announce a single point on the curve.
238
- * * announceIntervalForUniformStepStrokes (cp, numStrokes, fraction0, fraction1) -- announce a fraction
239
- * interval in which the curve can be evaluated (e.g. the handler can call cp->fractionToPointAndDerivative ())
240
- * * announceSegmentInterval (cp, point0, point1, numStrokes, fraction0, fraction1) -- announce
241
- * that the fractional interval fraction0, fraction1 is a straight line which should be broken into
242
- * numStrokes strokes.
236
+ * * startCurvePrimitive(cp) -- announce the curve primitive whose strokes will follow.
237
+ * * announcePointTangent(xyz, fraction, tangent) -- announce a single point on the curve.
238
+ * * announceIntervalForUniformStepStrokes(cp, numStrokes, fraction0, fraction1) -- announce a fraction
239
+ * interval in which the curve can be evaluated (e.g., the handler can call cp->fractionToPointAndDerivative())
240
+ * * announceSegmentInterval(cp, point0, point1, numStrokes, fraction0, fraction1) -- announce that the
241
+ * fractional interval fraction0, fraction1 is a straight line which should be broken into numStrokes strokes.
243
242
  * * A LineSegment would make a single call to this.
244
243
  * * A LineString would make one call to this for each of its segments, with fractions indicating position
245
244
  * within the linestring.
246
- * * endCurvePrimitive (cp) -- announce the end of the curve primitive.
245
+ * * endCurvePrimitive(cp) -- announce the end of the curve primitive.
247
246
  * @public
248
247
  */
249
248
  export interface IStrokeHandler {
250
249
  /**
251
- * Announce a parent curve primitive
252
- * * startParentCurvePrimitive() ...endParentCurvePrimitive() are wrapped around startCurvePrimitive and
250
+ * Announce a parent curve primitive.
251
+ * * startParentCurvePrimitive() and endParentCurvePrimitive() are wrapped around startCurvePrimitive and
253
252
  * endCurvePrimitive when the interior primitive is a proxy.
254
253
  */
255
254
  startParentCurvePrimitive(cp: CurvePrimitive): void;
@@ -263,10 +262,10 @@ export interface IStrokeHandler {
263
262
  */
264
263
  announcePointTangent(xyz: Point3d, fraction: number, tangent: Vector3d): void;
265
264
  /**
266
- * Announce that curve primitive cp should be evaluated in the specified fraction interval.
265
+ * Announce that curve primitive `cp` should be evaluated in the specified fraction interval.
267
266
  * * Note that this method is permitted (expected) to provide pre-stroked data if available.
268
- * * In th pre-stroked case, the cp passed to the handler will be the stroked image, not the original.
269
- * * Callers that want summary data should implement (and return true from) needPrimaryDataForStrokes
267
+ * * In the pre-stroked case, the `cp` passed to the handler will be the stroked image, not the original.
268
+ * * Callers that want summary data should implement (and return true from) needPrimaryDataForStrokes.
270
269
  */
271
270
  announceIntervalForUniformStepStrokes(cp: CurvePrimitive, numStrokes: number, fraction0: number, fraction1: number): void;
272
271
  /**
@@ -281,8 +280,8 @@ export interface IStrokeHandler {
281
280
  /** Announce that all data about the parent primitive has been announced. */
282
281
  endParentCurvePrimitive(cp: CurvePrimitive): void;
283
282
  /**
284
- * Announce a bezier curve fragment.
285
- * * this is usually a section of BsplineCurve
283
+ * OPTIONAL method to announce a bezier curve fragment.
284
+ * * This is usually a section of BsplineCurve.
286
285
  * * If this function is missing, the same interval will be passed to announceIntervalForUniformSteps.
287
286
  * @param bezier bezier fragment
288
287
  * @param numStrokes suggested number of strokes (uniform in bezier interval 0..1)
@@ -1 +1 @@
1
- {"version":3,"file":"GeometryHandler.d.ts","sourceRoot":"","sources":["../../../src/geometry3d/GeometryHandler.ts"],"names":[],"mappings":"AAKA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,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