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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (320) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/lib/cjs/bspline/BSplineSurface.d.ts +2 -1
  3. package/lib/cjs/bspline/BSplineSurface.d.ts.map +1 -1
  4. package/lib/cjs/bspline/BSplineSurface.js +2 -1
  5. package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
  6. package/lib/cjs/clipping/ClipPlane.d.ts +7 -5
  7. package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
  8. package/lib/cjs/clipping/ClipPlane.js +9 -5
  9. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  10. package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
  11. package/lib/cjs/clipping/ClipUtils.js +5 -3
  12. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  13. package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  14. package/lib/cjs/clipping/ConvexClipPlaneSet.js +12 -23
  15. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  16. package/lib/cjs/core-geometry.d.ts +1 -0
  17. package/lib/cjs/core-geometry.d.ts.map +1 -1
  18. package/lib/cjs/core-geometry.js +1 -0
  19. package/lib/cjs/core-geometry.js.map +1 -1
  20. package/lib/cjs/curve/Arc3d.d.ts +53 -31
  21. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  22. package/lib/cjs/curve/Arc3d.js +55 -36
  23. package/lib/cjs/curve/Arc3d.js.map +1 -1
  24. package/lib/cjs/curve/CurveCollection.d.ts +2 -0
  25. package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
  26. package/lib/cjs/curve/CurveCollection.js +14 -0
  27. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  28. package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
  29. package/lib/cjs/curve/LineSegment3d.js +1 -0
  30. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  31. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  32. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js +10 -5
  33. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  34. package/lib/cjs/curve/Query/PlanarSubdivision.d.ts.map +1 -1
  35. package/lib/cjs/curve/Query/PlanarSubdivision.js +7 -2
  36. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  37. package/lib/cjs/curve/RegionMomentsXY.d.ts +15 -21
  38. package/lib/cjs/curve/RegionMomentsXY.d.ts.map +1 -1
  39. package/lib/cjs/curve/RegionMomentsXY.js +38 -58
  40. package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
  41. package/lib/cjs/curve/RegionOps.d.ts +70 -38
  42. package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
  43. package/lib/cjs/curve/RegionOps.js +115 -45
  44. package/lib/cjs/curve/RegionOps.js.map +1 -1
  45. package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts +12 -13
  46. package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
  47. package/lib/cjs/curve/RegionOpsClassificationSweeps.js +23 -23
  48. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  49. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  50. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +36 -12
  51. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  52. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
  53. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
  54. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js +34 -0
  55. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
  56. package/lib/cjs/geometry3d/AngleSweep.d.ts +24 -17
  57. package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
  58. package/lib/cjs/geometry3d/AngleSweep.js +31 -17
  59. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  60. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +7 -2
  61. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  62. package/lib/cjs/geometry3d/GrowableXYZArray.js +20 -2
  63. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  64. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +2 -1
  65. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  66. package/lib/cjs/geometry3d/IndexedXYZCollection.js +7 -3
  67. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  68. package/lib/cjs/geometry3d/Plane3d.d.ts +2 -0
  69. package/lib/cjs/geometry3d/Plane3d.d.ts.map +1 -1
  70. package/lib/cjs/geometry3d/Plane3d.js +6 -1
  71. package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
  72. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
  73. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
  74. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
  75. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  76. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
  77. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  78. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js +18 -10
  79. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  80. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +4 -4
  81. package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
  82. package/lib/cjs/geometry3d/Point3dVector3d.js +6 -6
  83. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  84. package/lib/cjs/geometry3d/PointHelpers.d.ts +7 -7
  85. package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
  86. package/lib/cjs/geometry3d/PointHelpers.js +66 -26
  87. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  88. package/lib/cjs/geometry3d/PolygonOps.d.ts +57 -9
  89. package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
  90. package/lib/cjs/geometry3d/PolygonOps.js +57 -17
  91. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  92. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
  93. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
  94. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
  95. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  96. package/lib/cjs/geometry3d/PolylineOps.d.ts +5 -4
  97. package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
  98. package/lib/cjs/geometry3d/PolylineOps.js +5 -4
  99. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  100. package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
  101. package/lib/cjs/geometry3d/Ray3d.js +11 -23
  102. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  103. package/lib/cjs/geometry3d/Transform.d.ts +21 -2
  104. package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
  105. package/lib/cjs/geometry3d/Transform.js +32 -13
  106. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  107. package/lib/cjs/geometry4d/Matrix4d.d.ts +7 -7
  108. package/lib/cjs/geometry4d/Matrix4d.d.ts.map +1 -1
  109. package/lib/cjs/geometry4d/Matrix4d.js +9 -9
  110. package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
  111. package/lib/cjs/geometry4d/MomentData.d.ts +32 -34
  112. package/lib/cjs/geometry4d/MomentData.d.ts.map +1 -1
  113. package/lib/cjs/geometry4d/MomentData.js +56 -57
  114. package/lib/cjs/geometry4d/MomentData.js.map +1 -1
  115. package/lib/cjs/geometry4d/Point4d.d.ts +7 -4
  116. package/lib/cjs/geometry4d/Point4d.d.ts.map +1 -1
  117. package/lib/cjs/geometry4d/Point4d.js +26 -15
  118. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  119. package/lib/cjs/polyface/FacetOrientation.d.ts +1 -1
  120. package/lib/cjs/polyface/FacetOrientation.js +1 -1
  121. package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
  122. package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts +55 -40
  123. package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
  124. package/lib/cjs/polyface/IndexedEdgeMatcher.js +83 -75
  125. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  126. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
  127. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  128. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +47 -38
  129. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  130. package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts +26 -19
  131. package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
  132. package/lib/cjs/polyface/IndexedPolyfaceWalker.js +47 -32
  133. package/lib/cjs/polyface/IndexedPolyfaceWalker.js.map +1 -1
  134. package/lib/cjs/polyface/Polyface.d.ts +17 -3
  135. package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
  136. package/lib/cjs/polyface/Polyface.js +16 -0
  137. package/lib/cjs/polyface/Polyface.js.map +1 -1
  138. package/lib/cjs/polyface/PolyfaceBuilder.js +2 -2
  139. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  140. package/lib/cjs/polyface/PolyfaceClip.d.ts +19 -18
  141. package/lib/cjs/polyface/PolyfaceClip.d.ts.map +1 -1
  142. package/lib/cjs/polyface/PolyfaceClip.js +39 -42
  143. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  144. package/lib/cjs/polyface/PolyfaceQuery.d.ts +116 -75
  145. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  146. package/lib/cjs/polyface/PolyfaceQuery.js +312 -228
  147. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  148. package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
  149. package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
  150. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js +3 -3
  151. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  152. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
  153. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
  154. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
  155. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  156. package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
  157. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  158. package/lib/cjs/topology/ChainMerge.d.ts +1 -1
  159. package/lib/cjs/topology/ChainMerge.js +1 -1
  160. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  161. package/lib/esm/bspline/BSplineSurface.d.ts +2 -1
  162. package/lib/esm/bspline/BSplineSurface.d.ts.map +1 -1
  163. package/lib/esm/bspline/BSplineSurface.js +2 -1
  164. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  165. package/lib/esm/clipping/ClipPlane.d.ts +7 -5
  166. package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
  167. package/lib/esm/clipping/ClipPlane.js +9 -5
  168. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  169. package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
  170. package/lib/esm/clipping/ClipUtils.js +5 -3
  171. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  172. package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  173. package/lib/esm/clipping/ConvexClipPlaneSet.js +12 -23
  174. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  175. package/lib/esm/core-geometry.d.ts +1 -0
  176. package/lib/esm/core-geometry.d.ts.map +1 -1
  177. package/lib/esm/core-geometry.js +1 -0
  178. package/lib/esm/core-geometry.js.map +1 -1
  179. package/lib/esm/curve/Arc3d.d.ts +53 -31
  180. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  181. package/lib/esm/curve/Arc3d.js +55 -36
  182. package/lib/esm/curve/Arc3d.js.map +1 -1
  183. package/lib/esm/curve/CurveCollection.d.ts +2 -0
  184. package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
  185. package/lib/esm/curve/CurveCollection.js +14 -0
  186. package/lib/esm/curve/CurveCollection.js.map +1 -1
  187. package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
  188. package/lib/esm/curve/LineSegment3d.js +1 -0
  189. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  190. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  191. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js +10 -5
  192. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  193. package/lib/esm/curve/Query/PlanarSubdivision.d.ts.map +1 -1
  194. package/lib/esm/curve/Query/PlanarSubdivision.js +7 -2
  195. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  196. package/lib/esm/curve/RegionMomentsXY.d.ts +15 -21
  197. package/lib/esm/curve/RegionMomentsXY.d.ts.map +1 -1
  198. package/lib/esm/curve/RegionMomentsXY.js +38 -58
  199. package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
  200. package/lib/esm/curve/RegionOps.d.ts +70 -38
  201. package/lib/esm/curve/RegionOps.d.ts.map +1 -1
  202. package/lib/esm/curve/RegionOps.js +116 -46
  203. package/lib/esm/curve/RegionOps.js.map +1 -1
  204. package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts +12 -13
  205. package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
  206. package/lib/esm/curve/RegionOpsClassificationSweeps.js +23 -23
  207. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  208. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  209. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +36 -12
  210. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  211. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
  212. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
  213. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js +30 -0
  214. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
  215. package/lib/esm/geometry3d/AngleSweep.d.ts +24 -17
  216. package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
  217. package/lib/esm/geometry3d/AngleSweep.js +31 -17
  218. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  219. package/lib/esm/geometry3d/GrowableXYZArray.d.ts +7 -2
  220. package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  221. package/lib/esm/geometry3d/GrowableXYZArray.js +20 -2
  222. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  223. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +2 -1
  224. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  225. package/lib/esm/geometry3d/IndexedXYZCollection.js +7 -3
  226. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  227. package/lib/esm/geometry3d/Plane3d.d.ts +2 -0
  228. package/lib/esm/geometry3d/Plane3d.d.ts.map +1 -1
  229. package/lib/esm/geometry3d/Plane3d.js +6 -1
  230. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  231. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
  232. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
  233. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
  234. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  235. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
  236. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  237. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js +18 -10
  238. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  239. package/lib/esm/geometry3d/Point3dVector3d.d.ts +4 -4
  240. package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
  241. package/lib/esm/geometry3d/Point3dVector3d.js +6 -6
  242. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  243. package/lib/esm/geometry3d/PointHelpers.d.ts +7 -7
  244. package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
  245. package/lib/esm/geometry3d/PointHelpers.js +66 -26
  246. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  247. package/lib/esm/geometry3d/PolygonOps.d.ts +57 -9
  248. package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
  249. package/lib/esm/geometry3d/PolygonOps.js +57 -17
  250. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  251. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
  252. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
  253. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
  254. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  255. package/lib/esm/geometry3d/PolylineOps.d.ts +5 -4
  256. package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
  257. package/lib/esm/geometry3d/PolylineOps.js +5 -4
  258. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  259. package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
  260. package/lib/esm/geometry3d/Ray3d.js +11 -23
  261. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  262. package/lib/esm/geometry3d/Transform.d.ts +21 -2
  263. package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
  264. package/lib/esm/geometry3d/Transform.js +32 -13
  265. package/lib/esm/geometry3d/Transform.js.map +1 -1
  266. package/lib/esm/geometry4d/Matrix4d.d.ts +7 -7
  267. package/lib/esm/geometry4d/Matrix4d.d.ts.map +1 -1
  268. package/lib/esm/geometry4d/Matrix4d.js +9 -9
  269. package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
  270. package/lib/esm/geometry4d/MomentData.d.ts +32 -34
  271. package/lib/esm/geometry4d/MomentData.d.ts.map +1 -1
  272. package/lib/esm/geometry4d/MomentData.js +56 -57
  273. package/lib/esm/geometry4d/MomentData.js.map +1 -1
  274. package/lib/esm/geometry4d/Point4d.d.ts +7 -4
  275. package/lib/esm/geometry4d/Point4d.d.ts.map +1 -1
  276. package/lib/esm/geometry4d/Point4d.js +26 -15
  277. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  278. package/lib/esm/polyface/FacetOrientation.d.ts +1 -1
  279. package/lib/esm/polyface/FacetOrientation.js +1 -1
  280. package/lib/esm/polyface/FacetOrientation.js.map +1 -1
  281. package/lib/esm/polyface/IndexedEdgeMatcher.d.ts +55 -40
  282. package/lib/esm/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
  283. package/lib/esm/polyface/IndexedEdgeMatcher.js +83 -75
  284. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  285. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
  286. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  287. package/lib/esm/polyface/IndexedPolyfaceVisitor.js +47 -38
  288. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  289. package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts +26 -19
  290. package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
  291. package/lib/esm/polyface/IndexedPolyfaceWalker.js +47 -32
  292. package/lib/esm/polyface/IndexedPolyfaceWalker.js.map +1 -1
  293. package/lib/esm/polyface/Polyface.d.ts +17 -3
  294. package/lib/esm/polyface/Polyface.d.ts.map +1 -1
  295. package/lib/esm/polyface/Polyface.js +16 -0
  296. package/lib/esm/polyface/Polyface.js.map +1 -1
  297. package/lib/esm/polyface/PolyfaceBuilder.js +2 -2
  298. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  299. package/lib/esm/polyface/PolyfaceClip.d.ts +19 -18
  300. package/lib/esm/polyface/PolyfaceClip.d.ts.map +1 -1
  301. package/lib/esm/polyface/PolyfaceClip.js +39 -42
  302. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  303. package/lib/esm/polyface/PolyfaceQuery.d.ts +116 -75
  304. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  305. package/lib/esm/polyface/PolyfaceQuery.js +313 -229
  306. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  307. package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
  308. package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
  309. package/lib/esm/polyface/RangeTree/RangeTreeNode.js +3 -3
  310. package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  311. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
  312. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
  313. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
  314. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  315. package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
  316. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  317. package/lib/esm/topology/ChainMerge.d.ts +1 -1
  318. package/lib/esm/topology/ChainMerge.js +1 -1
  319. package/lib/esm/topology/ChainMerge.js.map +1 -1
  320. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"CurveCollection.js","sourceRoot":"","sources":["../../../src/curve/CurveCollection.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAQvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,iDAAiD,CAAC;AAC/F,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAoB1C;;;;;;;;;;;;GAYG;AACH,MAAM,OAAgB,eAAgB,SAAQ,aAAa;IACzD,wCAAwC;IACxB,gBAAgB,GAAG,iBAAiB,CAAC;IAGrD,uDAAuD;IAChD,OAAO,GAAY,KAAK,CAAC;IAGhC,6DAA6D;IACtD,UAA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,WAAW,EAAE,CAAC;IAC3B,CAAC;IACD,mBAAmB;IACZ,WAAW,CAAC,KAA2B;QAC5C,IAAI,KAAK;YACP,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,2BAA2B;IACpB,QAAQ,CAAC,CAAS;QACvB,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM;YAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAC3B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,8EAA8E;IACvE,yBAAyB,CAAC,OAAwB;QACvD,OAAO,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACzC,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\n/** @packageDocumentation\n * @module Curve\n */\nimport { Geometry } from \"../Geometry\";\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { VariantCurveExtendParameter } from \"./CurveExtendMode\";\nimport { CurveLocationDetail } from \"./CurveLocationDetail\";\nimport { CurvePrimitive } from \"./CurvePrimitive\";\nimport { RecursiveCurveProcessor } from \"./CurveProcessor\";\nimport { AnyCurve, type AnyRegion } from \"./CurveTypes\";\nimport { GeometryQuery } from \"./GeometryQuery\";\nimport { CloneCurvesContext } from \"./internalContexts/CloneCurvesContext\";\nimport { CloneWithExpandedLineStrings } from \"./internalContexts/CloneWithExpandedLineStrings\";\nimport { CountLinearPartsSearchContext } from \"./internalContexts/CountLinearPartsSearchContext\";\nimport { GapSearchContext } from \"./internalContexts/GapSearchContext\";\nimport { PlaneAltitudeRangeContext } from \"./internalContexts/PlaneAltitudeRangeContext\";\nimport { SumLengthsContext } from \"./internalContexts/SumLengthsContext\";\nimport { TransformInPlaceContext } from \"./internalContexts/TransformInPlaceContext\";\nimport { LineString3d } from \"./LineString3d\";\nimport { ProxyCurve } from \"./ProxyCurve\";\nimport { StrokeOptions } from \"./StrokeOptions\";\n\nimport type { Path } from \"./Path\";\nimport type { Loop } from \"./Loop\";\n\n/** Note: CurveChain and BagOfCurves classes are located in this file to prevent circular dependency. */\n\n/**\n * Describes the concrete type of a [[CurveCollection]]. Each type name maps to a specific subclass and can be\n * used in conditional statements for type-switching.\n * - \"loop\" => [[Loop]]\n * - \"path\" => [[Path]]\n * - \"unionRegion\" => [[UnionRegion]]\n * - \"parityRegion\" => [[ParityRegion]]\n * - \"bagOfCurves\" => [[BagOfCurves]]\n * @public\n */\nexport type CurveCollectionType = \"loop\" | \"path\" | \"unionRegion\" | \"parityRegion\" | \"bagOfCurves\";\n\n/**\n * A `CurveCollection` is an abstract (non-instantiable) class for various sets of curves with particular structures:\n * - [[CurveChain]] - a non-instantiable intermediate class for a sequence of [[CurvePrimitive]] joining head-to-tail.\n * The two instantiable forms of `CurveChain` are:\n * - [[Path]] - a chain of curves. Does not have to be closed or planar. A closed `Path` is not treated as bounding a surface.\n * - [[Loop]] - a closed and planar chain of curves. A `Loop` is treated as bounding a planar area.\n * - [[ParityRegion]] - a collection of coplanar `Loop`, with \"in/out\" classification by parity rules.\n * - [[UnionRegion]] - a collection of coplanar `Loop` and/or `ParityRegion`, with \"in/out\" classification by union rules.\n * - [[BagOfCurves]] - a collection of [[AnyCurve]] with no implied structure.\n *\n * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.\n * @public\n */\nexport abstract class CurveCollection extends GeometryQuery {\n /** String name for schema properties */\n public readonly geometryCategory = \"curveCollection\";\n /** Type discriminator. */\n public abstract readonly curveCollectionType: CurveCollectionType;\n /** Flag for inner loop status. Only used by `Loop`. */\n public isInner: boolean = false;\n /** Return the curve children. */\n public abstract override get children(): AnyCurve[];\n /** Return the sum of the lengths of all contained curves. */\n public sumLengths(): number {\n return SumLengthsContext.sumLengths(this);\n }\n /**\n * Return the closest point on the contained curves.\n * @param spacePoint point in space.\n * @param _extend unused here (pass false), but applicable to overrides in [[Path]] and [[BagOfCurves]].\n * @param result optional pre-allocated detail to populate and return.\n * @returns details of the closest point.\n */\n public closestPoint(\n spacePoint: Point3d, _extend: VariantCurveExtendParameter = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n let detailA: CurveLocationDetail | undefined;\n const detailB = new CurveLocationDetail();\n if (this.children !== undefined) {\n for (const child of this.children) {\n if (child.closestPoint(spacePoint, false, detailB))\n detailA = result = CurveLocationDetail.chooseSmallerA(detailA, detailB)!.clone(result);\n }\n }\n return detailA;\n }\n /** Reverse the collection's data so that each child curve's fractional stroking moves in the opposite direction. */\n public reverseInPlace(): void {\n for (const curve of this.children)\n curve.reverseInPlace();\n }\n /**\n * Return the max gap between adjacent primitives in Path and Loop collections.\n * * In a Path, gaps are computed between consecutive primitives.\n * * In a Loop, gaps are computed between consecutive primitives and between last and first.\n * * Gaps are NOT computed between consecutive CurvePrimitives in \"unstructured\" collections. The type is\n * \"unstructured\" so gaps should not be semantically meaningful.\n */\n public maxGap(): number {\n return GapSearchContext.maxGap(this);\n }\n /** Return true if the curve collection has any primitives other than LineSegment3d and LineString3d */\n public checkForNonLinearPrimitives(): boolean {\n return CountLinearPartsSearchContext.hasNonLinearPrimitives(this);\n }\n /** Apply transform recursively to children */\n public tryTransformInPlace(transform: Transform): boolean {\n return TransformInPlaceContext.tryTransformInPlace(this, transform);\n }\n /** Return a deep copy. */\n public override clone(): CurveCollection {\n return CloneCurvesContext.clone(this) as CurveCollection;\n }\n /** Create a deep copy of transformed curves. */\n public override cloneTransformed(transform: Transform): CurveCollection | undefined {\n return CloneCurvesContext.clone(this, transform);\n }\n /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */\n public cloneWithExpandedLineStrings(): CurveCollection {\n return CloneWithExpandedLineStrings.clone(this);\n }\n /**\n * Push all CurvePrimitives contained in the instance onto the `results` array.\n * * This method is recursive. For example, if the CurveCollection contains a Loop, all CurvePrimitives\n * of the Loop are pushed onto `results`.\n */\n private collectCurvePrimitivesGo(\n results: CurvePrimitive[], smallestPossiblePrimitives: boolean, explodeLinestrings: boolean = false,\n ): void {\n if (this.children) {\n for (const child of this.children) {\n if (child instanceof CurvePrimitive)\n child.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLinestrings);\n else if (child instanceof CurveCollection)\n child.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLinestrings);\n }\n }\n }\n /**\n * Return an array containing all CurvePrimitives in the instance.\n * * This method is recursive. For example, if the CurveCollection contains a Loop, all CurvePrimitives of\n * the Loop are pushed onto the returned array.\n * @param collectorArray optional array to receive primitives. If present, new primitives are ADDED (without\n * clearing the array).\n * @param smallestPossiblePrimitives if false, CurvePrimitiveWithDistanceIndex returns only itself. If true,\n * it recurses to its (otherwise hidden) children.\n */\n public collectCurvePrimitives(\n collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLineStrings: boolean = false,\n ): CurvePrimitive[] {\n const results: CurvePrimitive[] = collectorArray === undefined ? [] : collectorArray;\n this.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLineStrings);\n return results;\n }\n /**\n * Return true for planar region types:\n * * `Loop`\n * * `ParityRegion`\n * * `UnionRegion`\n * @see isAnyRegion\n */\n public get isAnyRegionType(): boolean {\n return this.dgnBoundaryType() === 2 || this.dgnBoundaryType() === 4 || this.dgnBoundaryType() === 5;\n }\n /** Type guard for AnyRegion */\n public isAnyRegion(): this is AnyRegion {\n return this.isAnyRegionType;\n }\n /**\n * Return true for a `Path`, i.e. a chain of curves joined head-to-tail\n * @see isPath\n */\n public get isOpenPath(): boolean {\n return this.dgnBoundaryType() === 1;\n }\n /** Type guard for Path */\n public isPath(): this is Path {\n return this.isOpenPath;\n }\n /**\n * Return true for a single-loop planar region type, i.e. `Loop`.\n * * This is NOT a test for physical closure of a `Path`.\n * @see isLoop\n */\n public get isClosedPath(): boolean {\n return this.dgnBoundaryType() === 2;\n }\n /** Type guard for Loop */\n public isLoop(): this is Loop {\n return this.isClosedPath;\n }\n\n /** Return a CurveCollection with the same structure but all curves replaced by strokes. */\n public abstract cloneStroked(options?: StrokeOptions): CurveCollection;\n /** Support method for ICurvePrimitive ... one line call to specific announce method . . */\n public abstract announceToCurveProcessor(processor: RecursiveCurveProcessor): void;\n /** Clone an empty collection. */\n public abstract cloneEmptyPeer(): CurveCollection;\n /**\n * Return the boundary type of a corresponding MicroStation CurveVector.\n * * Derived class must implement.\n */\n public abstract dgnBoundaryType(): number;\n /**\n * Try to add a child.\n * @param child child to add.\n * @return true if child is an acceptable type for this collection.\n */\n public abstract tryAddChild(child: AnyCurve | undefined): boolean;\n /** Return a child identified by by index */\n public abstract getChild(i: number): AnyCurve | undefined;\n /**\n * Extend (increase) the given range as needed to encompass all curves in the curve collection.\n * @param rangeToExtend the given range.\n * @param transform if supplied, the range is extended with transformed curves.\n */\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\n const children = this.children;\n if (children) {\n for (const c of children) {\n c.extendRange(rangeToExtend, transform);\n }\n }\n }\n /**\n * Find any CurvePrimitive in the source and evaluate it at the given fraction.\n * * The first CurvePrimitive found is evaluated. Any other CurvePrimitives are ignored.\n * @param source containing `CurvePrimitive` or `CurveCollection`\n * @param fraction fraction to use in `curve.fractionToPoint(fraction)`\n */\n public static createCurveLocationDetailOnAnyCurvePrimitive(\n source: GeometryQuery | undefined, fraction: number = 0.5,\n ): CurveLocationDetail | undefined {\n if (!source)\n return undefined;\n if (source instanceof CurvePrimitive) {\n return CurveLocationDetail.createCurveEvaluatedFraction(source, fraction);\n } else if (source instanceof CurveCollection && source.children !== undefined)\n for (const child of source.children) {\n const detail = this.createCurveLocationDetailOnAnyCurvePrimitive(child, fraction);\n if (detail)\n return detail;\n }\n return undefined;\n }\n /**\n * Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters\n * of projection.\n * @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.\n * @param lowHigh optional receiver for output\n * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the\n * end of the ray.\n */\n public projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined {\n return PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);\n }\n}\n\n/**\n * Shared base class for use by both open and closed paths.\n * * A `CurveChain` contains only CurvePrimitives. No other paths, loops, or regions allowed.\n * * The specific derived classes are `Path` and `Loop`.\n * * `CurveChain` is an intermediate class. It is not instantiable on its own.\n * * The related class `CurveChainWithDistanceIndex` is a `CurvePrimitive` whose API presents well-defined mappings\n * from fraction to xyz over the entire chain, but in fact does all the calculations over multiple primitives.\n * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.\n * @public\n */\nexport abstract class CurveChain extends CurveCollection {\n /** The curve primitives in the chain. */\n protected _curves: CurvePrimitive[];\n /** Constructor */\n protected constructor() {\n super();\n this._curves = [];\n }\n /** Return the array of `CurvePrimitive` */\n public override get children(): CurvePrimitive[] {\n return this._curves;\n }\n /** Return the start point of the curve chain (start point of the first child). */\n public startPoint(result?: Point3d): Point3d | undefined {\n const firstChild = this.getChild(0);\n if (firstChild)\n return firstChild.fractionToPoint(0.0, result);\n else\n return undefined;\n }\n /** Return the end point of the curve chain (end point of the last child). */\n public endPoint(result?: Point3d): Point3d | undefined {\n const lastChild = this.getChild(this._curves.length - 1);\n if (lastChild)\n return lastChild.fractionToPoint(1.0, result);\n else\n return undefined;\n }\n /**\n * Return the start point and derivative of the first child of the curve chain.\n * * For queries interior to the chain, use [[CurveChainWithDistanceIndex.fractionToPointAndDerivative]].\n */\n public startPointAndDerivative(result?: Ray3d): Ray3d | undefined {\n const firstChild = this.getChild(0);\n if (firstChild)\n return firstChild.fractionToPointAndDerivative(0.0, result);\n else\n return undefined;\n }\n /**\n * Return the end point and derivative of the last child of the curve chain.\n * * For queries interior to the chain, use [[CurveChainWithDistanceIndex.fractionToPointAndDerivative]].\n */\n public endPointAndDerivative(result?: Ray3d): Ray3d | undefined {\n const lastChild = this.getChild(this._curves.length - 1);\n if (lastChild)\n return lastChild.fractionToPointAndDerivative(1.0, result);\n else\n return undefined;\n }\n /**\n * Return the curve primitive at the given `index`, optionally using `modulo` to map `index` to the cyclic indexing.\n * * In particular, `-1` is the final curve.\n * @param index cyclic index\n */\n public cyclicCurvePrimitive(index: number, cyclic: boolean = true): CurvePrimitive | undefined {\n const n = this.children.length;\n if (n === 0)\n return undefined;\n if (index >= 0 && index < n) // try simplest non-cyclic access first\n return this.children[index];\n if (cyclic) {\n const index2 = Geometry.modulo(index, n);\n return this.children[index2];\n }\n return undefined;\n }\n /**\n * Stroke the chain into a simple xyz array.\n * @param options tolerance parameters controlling the stroking.\n */\n public getPackedStrokes(options?: StrokeOptions): GrowableXYZArray | undefined {\n /**\n * The object returned by \"cloneStroked\" has the same type (Loop or Path) but instead of a chain of\n * CurvePrimitives as children, it has a single LineString3d child. \"getPackedStrokes\" just returns\n * the points of that LineString3d using \"packedPoints\".\n */\n const tree = this.cloneStroked(options);\n if (tree instanceof CurveChain) {\n const children = tree.children;\n if (children.length === 1) {\n const ls = children[0];\n if (ls instanceof LineString3d)\n return ls.packedPoints;\n }\n }\n return undefined;\n }\n /** Return a structural clone, with CurvePrimitive objects stroked. */\n public abstract override cloneStroked(options?: StrokeOptions): CurveChain;\n /**\n * Add a child curve.\n * @param child curve to add to the chain. The curve is captured by this instance.\n * @return whether the child was added\n */\n public tryAddChild(child: AnyCurve | undefined): boolean {\n if (child && child instanceof CurvePrimitive) {\n this._curves.push(child);\n return true;\n }\n return false;\n }\n /** Return a child by index */\n public getChild(i: number): CurvePrimitive | undefined {\n if (i < this._curves.length) return this._curves[i];\n return undefined;\n }\n /** Invoke `curve.extendRange(range, transform)` for each child */\n public override extendRange(range: Range3d, transform?: Transform): void {\n for (const curve of this._curves)\n curve.extendRange(range, transform);\n }\n /**\n * Reverse each child curve (in place).\n * Reverse the order of the children array.\n */\n public reverseChildrenInPlace(): void {\n for (const curve of this._curves)\n curve.reverseInPlace();\n this._curves.reverse();\n }\n /** Same as [[reverseChildrenInPlace]]. */\n public override reverseInPlace(): void {\n this.reverseChildrenInPlace();\n }\n /**\n * Return the index where target is found in the array of children.\n * @param alsoSearchProxies whether to also check proxy curves of the children\n */\n public childIndex(target: CurvePrimitive | undefined, alsoSearchProxies?: boolean): number | undefined {\n for (let i = 0; i < this._curves.length; i++) {\n if (this._curves[i] === target)\n return i;\n }\n if (alsoSearchProxies ?? false) {\n for (let i = 0; i < this._curves.length; i++) {\n const childCurve = this._curves[i];\n if (childCurve instanceof ProxyCurve) {\n if (childCurve.proxyCurve === target)\n return i;\n }\n }\n }\n return undefined;\n }\n /** Evaluate an indexed curve at a fraction. Return as a CurveLocationDetail that indicates the primitive. */\n public primitiveIndexAndFractionToCurveLocationDetailPointAndDerivative(\n index: number, fraction: number, cyclic: boolean = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n const primitive = this.cyclicCurvePrimitive(index, cyclic);\n if (primitive) {\n return CurveLocationDetail.createCurveEvaluatedFractionPointAndDerivative(primitive, fraction, result);\n }\n return undefined;\n }\n}\n\n/**\n * * A `BagOfCurves` object is a collection of `AnyCurve` objects.\n * * A `BagOfCurves` has no implied properties such as being planar.\n * @public\n */\nexport class BagOfCurves extends CurveCollection {\n /** String name for schema properties */\n public readonly curveCollectionType = \"bagOfCurves\";\n /** Test if `other` is an instance of `BagOfCurves` */\n public isSameGeometryClass(other: GeometryQuery): boolean {\n return other instanceof BagOfCurves;\n }\n /**\n * Array of children.\n * * No restrictions on type.\n */\n protected _children: AnyCurve[];\n /** Construct an empty `BagOfCurves` */\n public constructor() {\n super();\n this._children = [];\n }\n /** Return the (reference to) array of children */\n public override get children(): AnyCurve[] {\n return this._children;\n }\n /** Create with given curves. */\n public static create(...data: AnyCurve[]): BagOfCurves {\n const result = new BagOfCurves();\n for (const child of data) {\n result.tryAddChild(child);\n }\n return result;\n }\n /** Return the boundary type (0) of a corresponding MicroStation CurveVector */\n public dgnBoundaryType(): number {\n return 0;\n }\n /** Invoke `processor.announceBagOfCurves(this, indexInParent);` */\n public announceToCurveProcessor(processor: RecursiveCurveProcessor, indexInParent: number = -1): void {\n return processor.announceBagOfCurves(this, indexInParent);\n }\n /** Clone all children in stroked form. */\n public cloneStroked(options?: StrokeOptions): BagOfCurves {\n const clone = new BagOfCurves();\n let child;\n for (child of this.children) {\n if (child instanceof CurvePrimitive) {\n const ls = LineString3d.create();\n child.emitStrokes(ls, options);\n if (ls)\n clone.children.push(ls);\n } else if (child instanceof CurveCollection) {\n const childStrokes = child.cloneStroked(options);\n if (childStrokes)\n clone.children.push(childStrokes);\n }\n }\n return clone;\n }\n /**\n * Return the closest point on the contained curves.\n * @param spacePoint point in space.\n * @param extend applicable only to children of type [[CurvePrimitive]], [[Path]], or [[BagOfCurves]]\n * @param result optional pre-allocated detail to populate and return.\n * @returns details of the closest point.\n */\n public override closestPoint(\n spacePoint: Point3d, extend: VariantCurveExtendParameter = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n let detailA: CurveLocationDetail | undefined;\n const detailB = new CurveLocationDetail();\n if (this.children !== undefined) {\n for (const child of this.children) {\n if (child.closestPoint(spacePoint, extend, detailB))\n detailA = result = CurveLocationDetail.chooseSmallerA(detailA, detailB)!.clone(result);\n }\n }\n return detailA;\n }\n /** Return an empty `BagOfCurves` */\n public cloneEmptyPeer(): BagOfCurves {\n return new BagOfCurves();\n }\n /** Add a child */\n public tryAddChild(child: AnyCurve | undefined): boolean {\n if (child)\n this._children.push(child);\n return true;\n }\n /** Get a child by index */\n public getChild(i: number): AnyCurve | undefined {\n if (i < this._children.length)\n return this._children[i];\n return undefined;\n }\n /** Second step of double dispatch: call `handler.handleBagOfCurves(this)` */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleBagOfCurves(this);\n }\n}\n"]}
1
+ {"version":3,"file":"CurveCollection.js","sourceRoot":"","sources":["../../../src/curve/CurveCollection.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAQvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,iDAAiD,CAAC;AAC/F,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAoB1C;;;;;;;;;;;;GAYG;AACH,MAAM,OAAgB,eAAgB,SAAQ,aAAa;IACzD,wCAAwC;IACxB,gBAAgB,GAAG,iBAAiB,CAAC;IAGrD,uDAAuD;IAChD,OAAO,GAAY,KAAK,CAAC;IAGhC,6DAA6D;IACtD,UAAU;QACf,OAAO,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IACD;;;;;;OAMG;IAC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AClC,IAAI,KAAK,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC;oBACjD,OAAO,GAAG,MAAM,GAAG,mBAAmB,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAC3F,CAAC;QACH,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,oCAAoC;IAC7B,cAAc;QACnB,OAAO,IAAI,WAAW,EAAE,CAAC;IAC3B,CAAC;IACD,mBAAmB;IACZ,WAAW,CAAC,KAA2B;QAC5C,IAAI,KAAK;YACP,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,2BAA2B;IACpB,QAAQ,CAAC,CAAS;QACvB,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM;YAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAC3B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,8EAA8E;IACvE,yBAAyB,CAAC,OAAwB;QACvD,OAAO,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACzC,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\n/** @packageDocumentation\n * @module Curve\n */\nimport { Geometry } from \"../Geometry\";\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\nimport { GrowableXYZArray } from \"../geometry3d/GrowableXYZArray\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { VariantCurveExtendParameter } from \"./CurveExtendMode\";\nimport { CurveLocationDetail } from \"./CurveLocationDetail\";\nimport { CurvePrimitive } from \"./CurvePrimitive\";\nimport { RecursiveCurveProcessor } from \"./CurveProcessor\";\nimport { AnyCurve, type AnyRegion } from \"./CurveTypes\";\nimport { GeometryQuery } from \"./GeometryQuery\";\nimport { CloneCurvesContext } from \"./internalContexts/CloneCurvesContext\";\nimport { CloneWithExpandedLineStrings } from \"./internalContexts/CloneWithExpandedLineStrings\";\nimport { CountLinearPartsSearchContext } from \"./internalContexts/CountLinearPartsSearchContext\";\nimport { GapSearchContext } from \"./internalContexts/GapSearchContext\";\nimport { PlaneAltitudeRangeContext } from \"./internalContexts/PlaneAltitudeRangeContext\";\nimport { SumLengthsContext } from \"./internalContexts/SumLengthsContext\";\nimport { TransformInPlaceContext } from \"./internalContexts/TransformInPlaceContext\";\nimport { LineString3d } from \"./LineString3d\";\nimport { ProxyCurve } from \"./ProxyCurve\";\nimport { StrokeOptions } from \"./StrokeOptions\";\n\nimport type { Path } from \"./Path\";\nimport type { Loop } from \"./Loop\";\n\n/** Note: CurveChain and BagOfCurves classes are located in this file to prevent circular dependency. */\n\n/**\n * Describes the concrete type of a [[CurveCollection]]. Each type name maps to a specific subclass and can be\n * used in conditional statements for type-switching.\n * - \"loop\" => [[Loop]]\n * - \"path\" => [[Path]]\n * - \"unionRegion\" => [[UnionRegion]]\n * - \"parityRegion\" => [[ParityRegion]]\n * - \"bagOfCurves\" => [[BagOfCurves]]\n * @public\n */\nexport type CurveCollectionType = \"loop\" | \"path\" | \"unionRegion\" | \"parityRegion\" | \"bagOfCurves\";\n\n/**\n * A `CurveCollection` is an abstract (non-instantiable) class for various sets of curves with particular structures:\n * - [[CurveChain]] - a non-instantiable intermediate class for a sequence of [[CurvePrimitive]] joining head-to-tail.\n * The two instantiable forms of `CurveChain` are:\n * - [[Path]] - a chain of curves. Does not have to be closed or planar. A closed `Path` is not treated as bounding a surface.\n * - [[Loop]] - a closed and planar chain of curves. A `Loop` is treated as bounding a planar area.\n * - [[ParityRegion]] - a collection of coplanar `Loop`, with \"in/out\" classification by parity rules.\n * - [[UnionRegion]] - a collection of coplanar `Loop` and/or `ParityRegion`, with \"in/out\" classification by union rules.\n * - [[BagOfCurves]] - a collection of [[AnyCurve]] with no implied structure.\n *\n * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.\n * @public\n */\nexport abstract class CurveCollection extends GeometryQuery {\n /** String name for schema properties */\n public readonly geometryCategory = \"curveCollection\";\n /** Type discriminator. */\n public abstract readonly curveCollectionType: CurveCollectionType;\n /** Flag for inner loop status. Only used by `Loop`. */\n public isInner: boolean = false;\n /** Return the curve children. */\n public abstract override get children(): AnyCurve[];\n /** Return the sum of the lengths of all contained curves. */\n public sumLengths(): number {\n return SumLengthsContext.sumLengths(this);\n }\n /**\n * Return the closest point on the contained curves.\n * @param spacePoint point in space.\n * @param _extend unused here (pass false), but applicable to overrides in [[Path]] and [[BagOfCurves]].\n * @param result optional pre-allocated detail to populate and return.\n * @returns details of the closest point.\n */\n public closestPoint(\n spacePoint: Point3d, _extend: VariantCurveExtendParameter = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n let detailA: CurveLocationDetail | undefined;\n const detailB = new CurveLocationDetail();\n if (this.children !== undefined) {\n for (const child of this.children) {\n if (child.closestPoint(spacePoint, false, detailB))\n detailA = result = CurveLocationDetail.chooseSmallerA(detailA, detailB)!.clone(result);\n }\n }\n return detailA;\n }\n /** Reverse the collection's data so that each child curve's fractional stroking moves in the opposite direction. */\n public reverseInPlace(): void {\n for (const curve of this.children)\n curve.reverseInPlace();\n }\n /**\n * Return the max gap between adjacent primitives in Path and Loop collections.\n * * In a Path, gaps are computed between consecutive primitives.\n * * In a Loop, gaps are computed between consecutive primitives and between last and first.\n * * Gaps are NOT computed between consecutive CurvePrimitives in \"unstructured\" collections. The type is\n * \"unstructured\" so gaps should not be semantically meaningful.\n */\n public maxGap(): number {\n return GapSearchContext.maxGap(this);\n }\n /** Return true if the curve collection has any primitives other than LineSegment3d and LineString3d */\n public checkForNonLinearPrimitives(): boolean {\n return CountLinearPartsSearchContext.hasNonLinearPrimitives(this);\n }\n /** Apply transform recursively to children */\n public tryTransformInPlace(transform: Transform): boolean {\n return TransformInPlaceContext.tryTransformInPlace(this, transform);\n }\n /** Return a deep copy. */\n public override clone(): CurveCollection {\n return CloneCurvesContext.clone(this) as CurveCollection;\n }\n /** Create a deep copy of transformed curves. */\n public override cloneTransformed(transform: Transform): CurveCollection | undefined {\n return CloneCurvesContext.clone(this, transform);\n }\n /** Create a deep copy with all linestrings broken down into multiple LineSegment3d. */\n public cloneWithExpandedLineStrings(): CurveCollection {\n return CloneWithExpandedLineStrings.clone(this);\n }\n /**\n * Push all CurvePrimitives contained in the instance onto the `results` array.\n * * This method is recursive. For example, if the CurveCollection contains a Loop, all CurvePrimitives\n * of the Loop are pushed onto `results`.\n */\n private collectCurvePrimitivesGo(\n results: CurvePrimitive[], smallestPossiblePrimitives: boolean, explodeLinestrings: boolean = false,\n ): void {\n if (this.children) {\n for (const child of this.children) {\n if (child instanceof CurvePrimitive)\n child.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLinestrings);\n else if (child instanceof CurveCollection)\n child.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLinestrings);\n }\n }\n }\n /**\n * Return an array containing all CurvePrimitives in the instance.\n * * This method is recursive. For example, if the CurveCollection contains a Loop, all CurvePrimitives of\n * the Loop are pushed onto the returned array.\n * @param collectorArray optional array to receive primitives. If present, new primitives are ADDED (without\n * clearing the array).\n * @param smallestPossiblePrimitives if false, CurvePrimitiveWithDistanceIndex returns only itself. If true,\n * it recurses to its (otherwise hidden) children.\n */\n public collectCurvePrimitives(\n collectorArray?: CurvePrimitive[], smallestPossiblePrimitives: boolean = false, explodeLineStrings: boolean = false,\n ): CurvePrimitive[] {\n const results: CurvePrimitive[] = collectorArray === undefined ? [] : collectorArray;\n this.collectCurvePrimitivesGo(results, smallestPossiblePrimitives, explodeLineStrings);\n return results;\n }\n /**\n * Return true for planar region types:\n * * `Loop`\n * * `ParityRegion`\n * * `UnionRegion`\n * @see isAnyRegion\n */\n public get isAnyRegionType(): boolean {\n return this.dgnBoundaryType() === 2 || this.dgnBoundaryType() === 4 || this.dgnBoundaryType() === 5;\n }\n /** Type guard for AnyRegion */\n public isAnyRegion(): this is AnyRegion {\n return this.isAnyRegionType;\n }\n /**\n * Return true for a `Path`, i.e. a chain of curves joined head-to-tail\n * @see isPath\n */\n public get isOpenPath(): boolean {\n return this.dgnBoundaryType() === 1;\n }\n /** Type guard for Path */\n public isPath(): this is Path {\n return this.isOpenPath;\n }\n /**\n * Return true for a single-loop planar region type, i.e. `Loop`.\n * * This is NOT a test for physical closure of a `Path`.\n * @see isLoop\n */\n public get isClosedPath(): boolean {\n return this.dgnBoundaryType() === 2;\n }\n /** Type guard for Loop */\n public isLoop(): this is Loop {\n return this.isClosedPath;\n }\n\n /** Return a CurveCollection with the same structure but all curves replaced by strokes. */\n public abstract cloneStroked(options?: StrokeOptions): CurveCollection;\n /** Support method for ICurvePrimitive ... one line call to specific announce method . . */\n public abstract announceToCurveProcessor(processor: RecursiveCurveProcessor): void;\n /** Clone an empty collection. */\n public abstract cloneEmptyPeer(): CurveCollection;\n /**\n * Return the boundary type of a corresponding MicroStation CurveVector.\n * * Derived class must implement.\n */\n public abstract dgnBoundaryType(): number;\n /**\n * Try to add a child.\n * @param child child to add.\n * @return true if child is an acceptable type for this collection.\n */\n public abstract tryAddChild(child: AnyCurve | undefined): boolean;\n /** Return a child identified by by index */\n public abstract getChild(i: number): AnyCurve | undefined;\n /**\n * Extend (increase) the given range as needed to encompass all curves in the curve collection.\n * @param rangeToExtend the given range.\n * @param transform if supplied, the range is extended with transformed curves.\n */\n public extendRange(rangeToExtend: Range3d, transform?: Transform): void {\n const children = this.children;\n if (children) {\n for (const c of children) {\n c.extendRange(rangeToExtend, transform);\n }\n }\n }\n /**\n * Find any CurvePrimitive in the source and evaluate it at the given fraction.\n * * The first CurvePrimitive found is evaluated. Any other CurvePrimitives are ignored.\n * @param source containing `CurvePrimitive` or `CurveCollection`\n * @param fraction fraction to use in `curve.fractionToPoint(fraction)`\n */\n public static createCurveLocationDetailOnAnyCurvePrimitive(\n source: GeometryQuery | undefined, fraction: number = 0.5,\n ): CurveLocationDetail | undefined {\n if (!source)\n return undefined;\n if (source instanceof CurvePrimitive) {\n return CurveLocationDetail.createCurveEvaluatedFraction(source, fraction);\n } else if (source instanceof CurveCollection && source.children !== undefined)\n for (const child of source.children) {\n const detail = this.createCurveLocationDetailOnAnyCurvePrimitive(child, fraction);\n if (detail)\n return detail;\n }\n return undefined;\n }\n /**\n * Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters\n * of projection.\n * @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.\n * @param lowHigh optional receiver for output\n * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the\n * end of the ray.\n */\n public projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined {\n return PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);\n }\n /** Return the immediate parent of the input curve in the instance, or undefined if it is not a descendant. */\n public findParentOfDescendant(descendant: AnyCurve): CurveCollection | undefined {\n for (const child of this.children) {\n if (child === descendant)\n return this;\n if (child instanceof CurveCollection) {\n const parent = child.findParentOfDescendant(descendant);\n if (parent)\n return parent;\n }\n }\n return undefined;\n };\n}\n\n/**\n * Shared base class for use by both open and closed paths.\n * * A `CurveChain` contains only CurvePrimitives. No other paths, loops, or regions allowed.\n * * The specific derived classes are `Path` and `Loop`.\n * * `CurveChain` is an intermediate class. It is not instantiable on its own.\n * * The related class `CurveChainWithDistanceIndex` is a `CurvePrimitive` whose API presents well-defined mappings\n * from fraction to xyz over the entire chain, but in fact does all the calculations over multiple primitives.\n * @see [Curve Collections]($docs/learning/geometry/CurveCollection.md) learning article.\n * @public\n */\nexport abstract class CurveChain extends CurveCollection {\n /** The curve primitives in the chain. */\n protected _curves: CurvePrimitive[];\n /** Constructor */\n protected constructor() {\n super();\n this._curves = [];\n }\n /** Return the array of `CurvePrimitive` */\n public override get children(): CurvePrimitive[] {\n return this._curves;\n }\n /** Return the start point of the curve chain (start point of the first child). */\n public startPoint(result?: Point3d): Point3d | undefined {\n const firstChild = this.getChild(0);\n if (firstChild)\n return firstChild.fractionToPoint(0.0, result);\n else\n return undefined;\n }\n /** Return the end point of the curve chain (end point of the last child). */\n public endPoint(result?: Point3d): Point3d | undefined {\n const lastChild = this.getChild(this._curves.length - 1);\n if (lastChild)\n return lastChild.fractionToPoint(1.0, result);\n else\n return undefined;\n }\n /**\n * Return the start point and derivative of the first child of the curve chain.\n * * For queries interior to the chain, use [[CurveChainWithDistanceIndex.fractionToPointAndDerivative]].\n */\n public startPointAndDerivative(result?: Ray3d): Ray3d | undefined {\n const firstChild = this.getChild(0);\n if (firstChild)\n return firstChild.fractionToPointAndDerivative(0.0, result);\n else\n return undefined;\n }\n /**\n * Return the end point and derivative of the last child of the curve chain.\n * * For queries interior to the chain, use [[CurveChainWithDistanceIndex.fractionToPointAndDerivative]].\n */\n public endPointAndDerivative(result?: Ray3d): Ray3d | undefined {\n const lastChild = this.getChild(this._curves.length - 1);\n if (lastChild)\n return lastChild.fractionToPointAndDerivative(1.0, result);\n else\n return undefined;\n }\n /**\n * Return the curve primitive at the given `index`, optionally using `modulo` to map `index` to the cyclic indexing.\n * * In particular, `-1` is the final curve.\n * @param index cyclic index\n */\n public cyclicCurvePrimitive(index: number, cyclic: boolean = true): CurvePrimitive | undefined {\n const n = this.children.length;\n if (n === 0)\n return undefined;\n if (index >= 0 && index < n) // try simplest non-cyclic access first\n return this.children[index];\n if (cyclic) {\n const index2 = Geometry.modulo(index, n);\n return this.children[index2];\n }\n return undefined;\n }\n /**\n * Stroke the chain into a simple xyz array.\n * @param options tolerance parameters controlling the stroking.\n */\n public getPackedStrokes(options?: StrokeOptions): GrowableXYZArray | undefined {\n /**\n * The object returned by \"cloneStroked\" has the same type (Loop or Path) but instead of a chain of\n * CurvePrimitives as children, it has a single LineString3d child. \"getPackedStrokes\" just returns\n * the points of that LineString3d using \"packedPoints\".\n */\n const tree = this.cloneStroked(options);\n if (tree instanceof CurveChain) {\n const children = tree.children;\n if (children.length === 1) {\n const ls = children[0];\n if (ls instanceof LineString3d)\n return ls.packedPoints;\n }\n }\n return undefined;\n }\n /** Return a structural clone, with CurvePrimitive objects stroked. */\n public abstract override cloneStroked(options?: StrokeOptions): CurveChain;\n /**\n * Add a child curve.\n * @param child curve to add to the chain. The curve is captured by this instance.\n * @return whether the child was added\n */\n public tryAddChild(child: AnyCurve | undefined): boolean {\n if (child && child instanceof CurvePrimitive) {\n this._curves.push(child);\n return true;\n }\n return false;\n }\n /** Return a child by index */\n public getChild(i: number): CurvePrimitive | undefined {\n if (i < this._curves.length) return this._curves[i];\n return undefined;\n }\n /** Invoke `curve.extendRange(range, transform)` for each child */\n public override extendRange(range: Range3d, transform?: Transform): void {\n for (const curve of this._curves)\n curve.extendRange(range, transform);\n }\n /**\n * Reverse each child curve (in place).\n * Reverse the order of the children array.\n */\n public reverseChildrenInPlace(): void {\n for (const curve of this._curves)\n curve.reverseInPlace();\n this._curves.reverse();\n }\n /** Same as [[reverseChildrenInPlace]]. */\n public override reverseInPlace(): void {\n this.reverseChildrenInPlace();\n }\n /**\n * Return the index where target is found in the array of children.\n * @param alsoSearchProxies whether to also check proxy curves of the children\n */\n public childIndex(target: CurvePrimitive | undefined, alsoSearchProxies?: boolean): number | undefined {\n for (let i = 0; i < this._curves.length; i++) {\n if (this._curves[i] === target)\n return i;\n }\n if (alsoSearchProxies ?? false) {\n for (let i = 0; i < this._curves.length; i++) {\n const childCurve = this._curves[i];\n if (childCurve instanceof ProxyCurve) {\n if (childCurve.proxyCurve === target)\n return i;\n }\n }\n }\n return undefined;\n }\n /** Evaluate an indexed curve at a fraction. Return as a CurveLocationDetail that indicates the primitive. */\n public primitiveIndexAndFractionToCurveLocationDetailPointAndDerivative(\n index: number, fraction: number, cyclic: boolean = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n const primitive = this.cyclicCurvePrimitive(index, cyclic);\n if (primitive) {\n return CurveLocationDetail.createCurveEvaluatedFractionPointAndDerivative(primitive, fraction, result);\n }\n return undefined;\n }\n}\n\n/**\n * * A `BagOfCurves` object is a collection of `AnyCurve` objects.\n * * A `BagOfCurves` has no implied properties such as being planar.\n * @public\n */\nexport class BagOfCurves extends CurveCollection {\n /** String name for schema properties */\n public readonly curveCollectionType = \"bagOfCurves\";\n /** Test if `other` is an instance of `BagOfCurves` */\n public isSameGeometryClass(other: GeometryQuery): boolean {\n return other instanceof BagOfCurves;\n }\n /**\n * Array of children.\n * * No restrictions on type.\n */\n protected _children: AnyCurve[];\n /** Construct an empty `BagOfCurves` */\n public constructor() {\n super();\n this._children = [];\n }\n /** Return the (reference to) array of children */\n public override get children(): AnyCurve[] {\n return this._children;\n }\n /** Create with given curves. */\n public static create(...data: AnyCurve[]): BagOfCurves {\n const result = new BagOfCurves();\n for (const child of data) {\n result.tryAddChild(child);\n }\n return result;\n }\n /** Return the boundary type (0) of a corresponding MicroStation CurveVector */\n public dgnBoundaryType(): number {\n return 0;\n }\n /** Invoke `processor.announceBagOfCurves(this, indexInParent);` */\n public announceToCurveProcessor(processor: RecursiveCurveProcessor, indexInParent: number = -1): void {\n return processor.announceBagOfCurves(this, indexInParent);\n }\n /** Clone all children in stroked form. */\n public cloneStroked(options?: StrokeOptions): BagOfCurves {\n const clone = new BagOfCurves();\n let child;\n for (child of this.children) {\n if (child instanceof CurvePrimitive) {\n const ls = LineString3d.create();\n child.emitStrokes(ls, options);\n if (ls)\n clone.children.push(ls);\n } else if (child instanceof CurveCollection) {\n const childStrokes = child.cloneStroked(options);\n if (childStrokes)\n clone.children.push(childStrokes);\n }\n }\n return clone;\n }\n /**\n * Return the closest point on the contained curves.\n * @param spacePoint point in space.\n * @param extend applicable only to children of type [[CurvePrimitive]], [[Path]], or [[BagOfCurves]]\n * @param result optional pre-allocated detail to populate and return.\n * @returns details of the closest point.\n */\n public override closestPoint(\n spacePoint: Point3d, extend: VariantCurveExtendParameter = false, result?: CurveLocationDetail,\n ): CurveLocationDetail | undefined {\n let detailA: CurveLocationDetail | undefined;\n const detailB = new CurveLocationDetail();\n if (this.children !== undefined) {\n for (const child of this.children) {\n if (child.closestPoint(spacePoint, extend, detailB))\n detailA = result = CurveLocationDetail.chooseSmallerA(detailA, detailB)!.clone(result);\n }\n }\n return detailA;\n }\n /** Return an empty `BagOfCurves` */\n public cloneEmptyPeer(): BagOfCurves {\n return new BagOfCurves();\n }\n /** Add a child */\n public tryAddChild(child: AnyCurve | undefined): boolean {\n if (child)\n this._children.push(child);\n return true;\n }\n /** Get a child by index */\n public getChild(i: number): AnyCurve | undefined {\n if (i < this._children.length)\n return this._children[i];\n return undefined;\n }\n /** Second step of double dispatch: call `handler.handleBagOfCurves(this)` */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleBagOfCurves(this);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"LineSegment3d.d.ts","sourceRoot":"","sources":["../../../src/curve/LineSegment3d.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAY,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAEpF,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGpD,OAAO,EAAs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QAAQ,CAAC,EAAE,kCAAkC,GAAG,OAAO;IAM/G;;;;OAIG;IACa,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,aAAa;IAGtF;;;OAGG;IACa,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO;IAgB3G;;;OAGG;IACa,iBAAiB,CAC/B,uBAAuB,EAAE,MAAM,GAAG,aAAa,GAC9C,cAAc,GAAG,cAAc,EAAE,GAAG,SAAS;IAWhD;;;;;;;OAOG;IACa,uBAAuB,CAAC,GAAG,EAAE,QAAQ,GAAG,KAAK,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS;CAGvG"}
@@ -19,6 +19,7 @@ import { CurveIntervalRole, CurveLocationDetail, CurveLocationDetailPair } from
19
19
  import { CurvePrimitive } from "./CurvePrimitive";
20
20
  import { PlaneAltitudeRangeContext } from "./internalContexts/PlaneAltitudeRangeContext";
21
21
  import { OffsetOptions } from "./OffsetOptions";
22
+ // cspell:words CCWXY
22
23
  /**
23
24
  * A LineSegment3d is:
24
25
  * * A 3d line segment represented by its start and end coordinates
@@ -1 +1 @@
1
- {"version":3,"file":"LineSegment3d.js","sourceRoot":"","sources":["../../../src/curve/LineSegment3d.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAmB,QAAQ,EAA0B,MAAM,aAAa,CAAC;AAEhF,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAW,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,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AAC,CAAC;YACnC,MAAM,UAAU,GAAG,aAAa,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,CAAC;YAC5E,OAAO,aAAa,CAAC,MAAM,CACzB,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,CAC/F,CAAC;QACJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD;;;;;;;OAOG;IACa,uBAAuB,CAAC,GAAqB,EAAE,OAAiB;QAC9E,OAAO,yBAAyB,CAAC,kCAAkC,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAC1F,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\n/** @packageDocumentation\n * @module Curve\n */\n\nimport { assert } from \"@itwin/core-bentley\";\nimport { Clipper } from \"../clipping/ClipUtils\";\nimport { BeJSONFunctions, Geometry, PlaneAltitudeEvaluator } from \"../Geometry\";\nimport { GeometryHandler, IStrokeHandler } from \"../geometry3d/GeometryHandler\";\nimport { Plane3dByOriginAndVectors } from \"../geometry3d/Plane3dByOriginAndVectors\";\nimport { Vector2d } from \"../geometry3d/Point2dVector2d\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { Order2Bezier } from \"../numerics/BezierPolynomials\";\nimport { SmallSystem } from \"../numerics/SmallSystem\";\nimport { CurveExtendOptions, VariantCurveExtendParameter } from \"./CurveExtendMode\";\nimport { CurveIntervalRole, CurveLocationDetail, CurveLocationDetailPair } from \"./CurveLocationDetail\";\nimport { AnnounceNumberNumberCurvePrimitive, CurvePrimitive } from \"./CurvePrimitive\";\nimport { GeometryQuery } from \"./GeometryQuery\";\nimport { PlaneAltitudeRangeContext } from \"./internalContexts/PlaneAltitudeRangeContext\";\nimport { LineString3d } from \"./LineString3d\";\nimport { OffsetOptions } from \"./OffsetOptions\";\nimport { StrokeOptions } from \"./StrokeOptions\";\n\n/**\n * A LineSegment3d is:\n * * A 3d line segment represented by its start and end coordinates\n * * startPoint\n * * endPoint\n * * The segment is parameterized with fraction 0 at the start and fraction 1 at the end, i.e. each of these\n * equivalent forms maps fraction `f` to a point `X(f)`:\n * ```\n * equation\n * X(f) = P_0 + f*(P_1 - P_0)\\newline\n * X(f) = (1-f)*P_0 + f*P_1\n * ```\n * @public\n */\nexport class LineSegment3d extends CurvePrimitive implements BeJSONFunctions {\n /** String name for schema properties */\n public readonly curvePrimitiveType = \"lineSegment\";\n /** Test if `other` is of class `LineSegment3d` */\n public isSameGeometryClass(other: GeometryQuery): boolean {\n return other instanceof LineSegment3d;\n }\n /** Start point of the segment */\n private _point0: Point3d;\n /** End point of the segment */\n private _point1: Point3d;\n /**\n * Return REFERENCE to the start point of this segment.\n * * This is distinct from the `CurvePrimitive` abstract method `startPoint()` which creates a returned point.\n */\n public get point0Ref(): Point3d {\n return this._point0;\n }\n /**\n * Return REFERENCE to the end point of this segment.\n * * This is distinct from the `CurvePrimitive` abstract method `endPoint()` which creates a returned point.\n */\n public get point1Ref(): Point3d {\n return this._point1;\n }\n /** A LineSegment3d extends along its infinite line. */\n public override get isExtensibleFractionSpace(): boolean {\n return true;\n }\n /**\n * CAPTURE point references as a `LineSegment3d`\n * @param point0\n * @param point1\n */\n protected constructor(point0: Point3d, point1: Point3d) {\n super();\n this._point0 = point0;\n this._point1 = point1;\n }\n /** Set the start and endpoints by capturing input references. */\n public setRefs(point0: Point3d, point1: Point3d) {\n this._point0 = point0;\n this._point1 = point1;\n }\n /** Set the start and endpoints by cloning the input parameters. */\n public set(point0: Point3d, point1: Point3d) {\n this._point0 = point0.clone();\n this._point1 = point1.clone();\n }\n /** Copy (clone) data from other */\n public setFrom(other: LineSegment3d) {\n this._point0.setFrom(other._point0);\n this._point1.setFrom(other._point1);\n }\n /** Return a (clone of) the start point (This is NOT a reference to the stored start point) */\n public override startPoint(result?: Point3d): Point3d {\n if (result) { result.setFrom(this._point0); return result; }\n return this._point0.clone();\n }\n /** Return a (clone of) the end point (This is NOT a reference to the stored end point) */\n public override endPoint(result?: Point3d): Point3d {\n if (result) { result.setFrom(this._point1); return result; }\n return this._point1.clone();\n }\n /** Return the point and derivative vector at fractional position along the line segment. */\n public fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d {\n result = result ? result : Ray3d.createZero();\n result.direction.setStartEnd(this._point0, this._point1);\n this._point0.interpolate(fraction, this._point1, result.origin);\n return result;\n }\n /**\n * Construct a plane with\n * * origin at the fractional position along the line segment\n * * x axis is the first derivative, i.e. along the line segment\n * * y axis is the second derivative, i.e. 000\n */\n public fractionToPointAnd2Derivatives(fraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\n result = result ? result : Plane3dByOriginAndVectors.createXYPlane();\n result.vectorU.setStartEnd(this._point0, this._point1);\n result.vectorV.set(0, 0, 0);\n this._point0.interpolate(fraction, this._point1, result.origin);\n return result;\n }\n /** Clone the LineSegment3d */\n public clone(): LineSegment3d {\n return LineSegment3d.create(this._point0, this._point1);\n }\n /** Clone and apply transform to the clone. */\n public cloneTransformed(transform: Transform): LineSegment3d { // we know tryTransformInPlace succeeds.\n const c = this.clone();\n c.tryTransformInPlace(transform);\n return c;\n }\n /** Create with start and end points. The point contents are cloned into the LineSegment3d. */\n public static create(point0: Point3d, point1: Point3d, result?: LineSegment3d): LineSegment3d {\n if (result) {\n result.set(point0, point1); // and this will clone them !!\n return result;\n }\n return new LineSegment3d(point0.clone(), point1.clone());\n }\n /** Create with start and end points. The point contents are CAPTURED into the result */\n public static createCapture(point0: Point3d, point1: Point3d): LineSegment3d {\n return new LineSegment3d(point0, point1);\n }\n /**\n * Create a LineSegment3d from xy coordinates of start and end, with common z.\n * @param x0 start point x coordinate.\n * @param y0 start point y coordinate.\n * @param x1 end point x coordinate.\n * @param y1 end point y coordinate.\n * @param z z coordinate to use for both points.\n * @param result optional existing LineSegment to be reinitialized.\n */\n public static createXYXY(x0: number, y0: number, x1: number, y1: number, z: number = 0, result?: LineSegment3d) {\n if (result) {\n result._point0.set(x0, y0, z);\n result._point1.set(x1, y1, z);\n return result;\n }\n return new LineSegment3d(Point3d.create(x0, y0, z), Point3d.create(x1, y1, z));\n }\n /**\n * Create a LineSegment3d from xy coordinates of start and end, with common z.\n * @param x0 start point x coordinate.\n * @param y0 start point y coordinate.\n * @param x1 end point x coordinate.\n * @param y1 end point y coordinate.\n * @param z z coordinate to use for both points.\n * @param result optional existing LineSegment to be reinitialized.\n */\n public static createXYZXYZ(\n x0: number, y0: number, z0: number, x1: number, y1: number, z1: number, result?: LineSegment3d,\n ): LineSegment3d {\n if (result) {\n result._point0.set(x0, y0, z0);\n result._point1.set(x1, y1, z1);\n return result;\n }\n return new LineSegment3d(Point3d.create(x0, y0, z0), Point3d.create(x1, y1, z1));\n }\n /** Return the point at fractional position along the line segment. */\n public fractionToPoint(fraction: number, result?: Point3d): Point3d {\n return this._point0.interpolate(fraction, this._point1, result);\n }\n /** Return the length of the segment. */\n public override curveLength(): number {\n return this._point0.distance(this._point1);\n }\n /** Return the length of the partial segment between fractions. */\n public override curveLengthBetweenFractions(fraction0: number, fraction1: number): number {\n return Math.abs(fraction1 - fraction0) * this._point0.distance(this._point1);\n }\n /** Return the length of the segment. */\n public quickLength(): number {\n return this.curveLength();\n }\n /**\n * Returns a curve location detail with both xyz and fractional coordinates of the closest point.\n * @param spacePoint point in space\n * @param extend if false, only return points within the bounded line segment. If true, allow the point to be on\n * the unbounded line that contains the bounded segment.\n * @param result optional pre-allocated object to populate and return\n * @returns detail, with `a` field set to the distance from `spacePoint` to the closest point\n */\n public override closestPoint(\n spacePoint: Point3d, extend: VariantCurveExtendParameter, result?: CurveLocationDetail,\n ): CurveLocationDetail {\n let fraction = spacePoint.fractionOfProjectionToLine(this._point0, this._point1, 0.0);\n fraction = CurveExtendOptions.correctFraction(extend, fraction);\n result = CurveLocationDetail.create(this, result);\n result.fraction = fraction;\n this._point0.interpolate(fraction, this._point1, result.point);\n result.vectorInCurveLocationDetail = undefined;\n result.a = result.point.distance(spacePoint);\n return result;\n }\n /**\n * Compute the closest approach between a pair of line segments.\n * * The approach distance is returned in the `a` fields of the details.\n * @param segmentA first line segment\n * @param extendA how to extend segmentA forward/backward\n * @param segmentB second line segment\n * @param extendB how to extend segmentB forward/backward\n * @param result optional pre-allocated object to populate and return\n * @returns pair of details, one per segment, each with `a` field set to the closest approach distance\n */\n public static closestApproach(\n segmentA: LineSegment3d,\n extendA: VariantCurveExtendParameter,\n segmentB: LineSegment3d,\n extendB: VariantCurveExtendParameter,\n result?: CurveLocationDetailPair,\n ): CurveLocationDetailPair | undefined {\n const unboundedFractions = Vector2d.create();\n if (result === undefined)\n result = CurveLocationDetailPair.createCapture(CurveLocationDetail.create(), CurveLocationDetail.create());\n if (SmallSystem.lineSegment3dClosestApproachUnbounded(segmentA._point0, segmentA._point1, segmentB._point0, segmentB._point1, unboundedFractions)) {\n // There is a simple approach between the unbounded segments. Maybe its a really easy case ...\n const fractionA = CurveExtendOptions.correctFraction(extendA, unboundedFractions.x);\n const fractionB = CurveExtendOptions.correctFraction(extendB, unboundedFractions.y);\n // if neither fraction was corrected, just accept !!!\n if (fractionA === unboundedFractions.x && fractionB === unboundedFractions.y) {\n CurveLocationDetail.createCurveEvaluatedFraction(segmentA, fractionA, result.detailA);\n CurveLocationDetail.createCurveEvaluatedFraction(segmentB, fractionB, result.detailB);\n result.detailA.a = result.detailB.a = result.detailA.point.distance(result.detailB.point);\n return result;\n }\n // One or both of the fractions were clamped back to an endpoint.\n // Claim: (????!!!????) The only proximity candidates that matter are from clamped point onto the other.\n if (fractionA !== unboundedFractions.x && fractionB !== unboundedFractions.y) {\n // Fill in (in the result) both individual details with \"projected\" points and distance.\n // The \"loser\" will have its contents replaced.\n const clampedPointOnA = fractionA < 0.5 ? segmentA._point0 : segmentA._point1;\n const clampedPointOnB = fractionB < 0.5 ? segmentB._point0 : segmentB._point1;\n segmentB.closestPoint(clampedPointOnA, extendB, result.detailB);\n segmentA.closestPoint(clampedPointOnB, extendA, result.detailA);\n if (result.detailA.a <= result.detailB.a) {\n CurveLocationDetail.createCurveFractionPoint(segmentB, fractionB, clampedPointOnB, result.detailB);\n } else {\n CurveLocationDetail.createCurveFractionPoint(segmentA, fractionA, clampedPointOnA, result.detailA);\n }\n } else if (fractionB !== unboundedFractions.y) {\n // B (only) was clamped.\n const clampedPointOnB = fractionB < 0.5 ? segmentB._point0 : segmentB._point1;\n segmentA.closestPoint(clampedPointOnB, extendA, result.detailA);\n result.detailB.setCurve(segmentB);\n result.detailB.point.setFrom(clampedPointOnB);\n result.detailB.fraction = fractionB;\n } else {\n // fractionA was clamped.\n const clampedPointOnA = fractionA < 0.5 ? segmentA._point0 : segmentA._point1;\n segmentB.closestPoint(clampedPointOnA, extendB, result.detailB);\n result.detailA.setCurve(segmentA);\n result.detailA.point.setFrom(clampedPointOnA);\n result.detailA.fraction = fractionA;\n }\n result.detailA.a = result.detailB.a = result.detailA.point.distance(result.detailB.point);\n return result;\n }\n // (probably? certainly?) parallel (possibly coincident) lines.\n // run all 4 endpoint-to-other cases . . . reassemble carefully ...\n const resultSet = [\n segmentA.closestPoint(segmentB._point0, extendA),\n segmentA.closestPoint(segmentB._point1, extendA),\n segmentB.closestPoint(segmentA._point0, extendB),\n segmentB.closestPoint(segmentA._point1, extendB),\n ];\n let dMin = resultSet[0].a;\n let iMin = 0;\n for (let i = 1; i < 4; i++) {\n if (resultSet[i].a < dMin) {\n iMin = i;\n dMin = resultSet[i].a;\n }\n }\n if (iMin === 0) {\n resultSet[0].clone(result.detailA);\n CurveLocationDetail.createCurveEvaluatedFraction(segmentB, 0.0, result.detailB);\n result.detailB.a = result.detailA.a;\n } else if (iMin === 1) {\n resultSet[1].clone(result.detailA);\n CurveLocationDetail.createCurveEvaluatedFraction(segmentB, 1.0, result.detailB);\n result.detailB.a = result.detailA.a;\n } else if (iMin === 2) {\n resultSet[2].clone(result.detailB);\n CurveLocationDetail.createCurveEvaluatedFraction(segmentA, 0.0, result.detailA);\n result.detailA.a = result.detailB.a;\n } else {\n assert(iMin === 3);\n resultSet[3].clone(result.detailB);\n CurveLocationDetail.createCurveEvaluatedFraction(segmentA, 1.0, result.detailA);\n result.detailA.a = result.detailB.a;\n }\n return result;\n }\n /** Swap the endpoint references. */\n public reverseInPlace(): void {\n const a = this._point0;\n this._point0 = this._point1;\n this._point1 = a;\n }\n /** Transform the two endpoints of this LinSegment. */\n public tryTransformInPlace(transform: Transform): boolean {\n this._point0 = transform.multiplyPoint3d(this._point0, this._point0);\n this._point1 = transform.multiplyPoint3d(this._point1, this._point1);\n return true;\n }\n /** Test if both endpoints are in a plane (within tolerance) */\n public isInPlane(plane: PlaneAltitudeEvaluator): boolean {\n return Geometry.isSmallMetricDistance(plane.altitude(this._point0))\n && Geometry.isSmallMetricDistance(plane.altitude(this._point1));\n }\n /**\n * Compute points of simple (transverse) with a plane.\n * * Use isInPlane to test if the line segment is completely in the plane.\n */\n public override appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number {\n const h0 = plane.altitude(this._point0);\n const h1 = plane.altitude(this._point1);\n const fraction = Order2Bezier.solveCoffs(h0, h1);\n let numIntersection = 0;\n if (fraction !== undefined) {\n numIntersection++;\n const detail = CurveLocationDetail.createCurveFractionPoint(this, fraction, this.fractionToPoint(fraction));\n detail.intervalRole = CurveIntervalRole.isolated;\n result.push(detail);\n }\n return numIntersection;\n }\n /**\n * Extend a range to include the (optionally transformed) line segment\n * @param range range to extend\n * @param transform optional transform to apply to the end points\n */\n public extendRange(range: Range3d, transform?: Transform): void {\n if (transform) {\n range.extendTransformedPoint(transform, this._point0);\n range.extendTransformedPoint(transform, this._point1);\n } else {\n range.extendPoint(this._point0);\n range.extendPoint(this._point1);\n }\n }\n /**\n * Construct a line from either of these json forms:\n *\n * * object with named start and end:\n * `{startPoint: pointValue, endPoint: pointValue}`\n * * array of two point values:\n * `[pointValue, pointValue]`\n * The point values are any values accepted by the Point3d method setFromJSON.\n * @param json data to parse.\n */\n public setFromJSON(json?: any) {\n if (!json) {\n this._point0.set(0, 0, 0);\n this._point1.set(1, 0, 0);\n return;\n } else if (json.startPoint && json.endPoint) { // {startPoint:json point, endPoint:json point}\n this._point0.setFromJSON(json.startPoint);\n this._point1.setFromJSON(json.endPoint);\n } else if (Array.isArray(json)\n && json.length > 1) { // [json point, json point]\n this._point0.setFromJSON(json[0]);\n this._point1.setFromJSON(json[1]);\n }\n }\n /** A simple line segment's fraction and distance are proportional. */\n public override getFractionToDistanceScale(): number | undefined {\n return this.curveLength();\n }\n /**\n * Place the lineSegment3d start and points in a json object\n * @return {*} [[x,y,z],[x,y,z]]\n */\n public toJSON(): any {\n return [this._point0.toJSON(), this._point1.toJSON()];\n }\n /** Create a new `LineSegment3d` with coordinates from json object. See `setFromJSON` for object layout description. */\n public static fromJSON(json?: any): LineSegment3d {\n const result = new LineSegment3d(Point3d.createZero(), Point3d.create());\n result.setFromJSON(json);\n return result;\n }\n /** Near equality test with `other`. */\n public override isAlmostEqual(other: GeometryQuery): boolean {\n if (other instanceof LineSegment3d) {\n const ls = other;\n return this._point0.isAlmostEqual(ls._point0) && this._point1.isAlmostEqual(ls._point1);\n }\n return false;\n }\n /** Emit strokes to caller-supplied linestring */\n public emitStrokes(dest: LineString3d, options?: StrokeOptions): void {\n const numStroke = this.computeStrokeCountForOptions(options);\n dest.appendFractionalStrokePoints(this, numStroke, 0.0, 1.0);\n }\n /** Emit strokes to caller-supplied handler */\n public emitStrokableParts(handler: IStrokeHandler, options?: StrokeOptions): void {\n handler.startCurvePrimitive(this);\n const numStroke = this.computeStrokeCountForOptions(options);\n handler.announceSegmentInterval(this, this._point0, this._point1, numStroke, 0.0, 1.0);\n handler.endCurvePrimitive(this);\n }\n /**\n * Return the stroke count required for given options.\n * @param options StrokeOptions that determine count\n */\n public computeStrokeCountForOptions(options?: StrokeOptions): number {\n let numStroke = 1;\n if (options) {\n if (options.maxEdgeLength)\n numStroke = options.applyMaxEdgeLength(numStroke, this.curveLength());\n numStroke = options.applyMinStrokesPerPrimitive(numStroke);\n }\n return numStroke;\n }\n /** Second step of double dispatch: call `handler.handleLineSegment3d(this)` */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleLineSegment3d(this);\n }\n /**\n * Find intervals of this curve primitive that are interior to a clipper\n * @param clipper clip structure (e.g. clip planes)\n * @param announce function to be called announcing fractional intervals `announce(fraction0, fraction1, curvePrimitive)`\n */\n public override announceClipIntervals(clipper: Clipper, announce?: AnnounceNumberNumberCurvePrimitive): boolean {\n return clipper.announceClippedSegmentIntervals(\n 0.0, 1.0, this._point0, this._point1,\n announce ? (fraction0: number, fraction1: number) => announce(fraction0, fraction1, this) : undefined,\n );\n }\n /**\n * Return (if possible) a curve primitive which is a portion of this curve.\n * @param fractionA [in] start fraction\n * @param fractionB [in] end fraction\n */\n public override clonePartialCurve(fractionA: number, fractionB: number): LineSegment3d {\n return LineSegment3d.create(this.fractionToPoint(fractionA), this.fractionToPoint(fractionB));\n }\n /**\n * Returns a (high accuracy) range of the curve between fractional positions\n * * Default implementation returns teh range of the curve from clonePartialCurve\n */\n public override rangeBetweenFractions(fraction0: number, fraction1: number, transform?: Transform): Range3d {\n // (This is cheap -- don't bother testing for fraction0===fraction1)\n if (!transform) {\n const range = Range3d.create();\n range.extendInterpolated(this._point0, fraction0, this._point1);\n range.extendInterpolated(this._point0, fraction1, this._point1);\n return range;\n }\n const point0 = this.fractionToPoint(fraction0);\n const point1 = this.fractionToPoint(fraction1);\n if (transform) {\n transform.multiplyPoint3d(point0, point0);\n transform.multiplyPoint3d(point1, point1);\n }\n return Range3d.create(point0, point1);\n }\n /**\n * Construct an offset of the instance curve as viewed in the xy-plane (ignoring z).\n * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object\n */\n public override constructOffsetXY(\n offsetDistanceOrOptions: number | OffsetOptions,\n ): CurvePrimitive | CurvePrimitive[] | undefined {\n const offsetVec = Vector3d.createStartEnd(this._point0, this._point1);\n if (offsetVec.normalizeInPlace()) {\n offsetVec.rotate90CCWXY(offsetVec);\n const offsetDist = OffsetOptions.getOffsetDistance(offsetDistanceOrOptions);\n return LineSegment3d.create(\n this._point0.plusScaled(offsetVec, offsetDist), this._point1.plusScaled(offsetVec, offsetDist),\n );\n }\n return undefined;\n }\n /**\n * Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of\n * projection.\n * @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.\n * @param lowHigh optional receiver for output\n * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the\n * end of the ray.\n */\n public override projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined {\n return PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);\n }\n}\n"]}
1
+ {"version":3,"file":"LineSegment3d.js","sourceRoot":"","sources":["../../../src/curve/LineSegment3d.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAE/F;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAmB,QAAQ,EAA0B,MAAM,aAAa,CAAC;AAEhF,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAW,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,E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G,aAAa,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,CAAC;YAC5E,OAAO,aAAa,CAAC,MAAM,CACzB,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,CAC/F,CAAC;QACJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD;;;;;;;OAOG;IACa,uBAAuB,CAAC,GAAqB,EAAE,OAAiB;QAC9E,OAAO,yBAAyB,CAAC,kCAAkC,CAAC,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IAC1F,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\n/** @packageDocumentation\n * @module Curve\n */\n\nimport { assert } from \"@itwin/core-bentley\";\nimport { Clipper } from \"../clipping/ClipUtils\";\nimport { BeJSONFunctions, Geometry, PlaneAltitudeEvaluator } from \"../Geometry\";\nimport { GeometryHandler, IStrokeHandler } from \"../geometry3d/GeometryHandler\";\nimport { Plane3dByOriginAndVectors } from \"../geometry3d/Plane3dByOriginAndVectors\";\nimport { Vector2d } from \"../geometry3d/Point2dVector2d\";\nimport { Point3d, Vector3d } from \"../geometry3d/Point3dVector3d\";\nimport { Range1d, Range3d } from \"../geometry3d/Range\";\nimport { Ray3d } from \"../geometry3d/Ray3d\";\nimport { Transform } from \"../geometry3d/Transform\";\nimport { Order2Bezier } from \"../numerics/BezierPolynomials\";\nimport { SmallSystem } from \"../numerics/SmallSystem\";\nimport { CurveExtendOptions, VariantCurveExtendParameter } from \"./CurveExtendMode\";\nimport { CurveIntervalRole, CurveLocationDetail, CurveLocationDetailPair } from \"./CurveLocationDetail\";\nimport { AnnounceNumberNumberCurvePrimitive, CurvePrimitive } from \"./CurvePrimitive\";\nimport { GeometryQuery } from \"./GeometryQuery\";\nimport { PlaneAltitudeRangeContext } from \"./internalContexts/PlaneAltitudeRangeContext\";\nimport { LineString3d } from \"./LineString3d\";\nimport { OffsetOptions } from \"./OffsetOptions\";\nimport { StrokeOptions } from \"./StrokeOptions\";\n\n// cspell:words CCWXY\n\n/**\n * A LineSegment3d is:\n * * A 3d line segment represented by its start and end coordinates\n * * startPoint\n * * endPoint\n * * The segment is parameterized with fraction 0 at the start and fraction 1 at the end, i.e. each of these\n * equivalent forms maps fraction `f` to a point `X(f)`:\n * ```\n * equation\n * X(f) = P_0 + f*(P_1 - P_0)\\newline\n * X(f) = (1-f)*P_0 + f*P_1\n * ```\n * @public\n */\nexport class LineSegment3d extends CurvePrimitive implements BeJSONFunctions {\n /** String name for schema properties */\n public readonly curvePrimitiveType = \"lineSegment\";\n /** Test if `other` is of class `LineSegment3d` */\n public isSameGeometryClass(other: GeometryQuery): boolean {\n return other instanceof LineSegment3d;\n }\n /** Start point of the segment */\n private _point0: Point3d;\n /** End point of the segment */\n private _point1: Point3d;\n /**\n * Return REFERENCE to the start point of this segment.\n * * This is distinct from the `CurvePrimitive` abstract method `startPoint()` which creates a returned point.\n */\n public get point0Ref(): Point3d {\n return this._point0;\n }\n /**\n * Return REFERENCE to the end point of this segment.\n * * This is distinct from the `CurvePrimitive` abstract method `endPoint()` which creates a returned point.\n */\n public get point1Ref(): Point3d {\n return this._point1;\n }\n /** A LineSegment3d extends along its infinite line. */\n public override get isExtensibleFractionSpace(): boolean {\n return true;\n }\n /**\n * CAPTURE point references as a `LineSegment3d`\n * @param point0\n * @param point1\n */\n protected constructor(point0: Point3d, point1: Point3d) {\n super();\n this._point0 = point0;\n this._point1 = point1;\n }\n /** Set the start and endpoints by capturing input references. */\n public setRefs(point0: Point3d, point1: Point3d) {\n this._point0 = point0;\n this._point1 = point1;\n }\n /** Set the start and endpoints by cloning the input parameters. */\n public set(point0: Point3d, point1: Point3d) {\n this._point0 = point0.clone();\n this._point1 = point1.clone();\n }\n /** Copy (clone) data from other */\n public setFrom(other: LineSegment3d) {\n this._point0.setFrom(other._point0);\n this._point1.setFrom(other._point1);\n }\n /** Return a (clone of) the start point (This is NOT a reference to the stored start point) */\n public override startPoint(result?: Point3d): Point3d {\n if (result) { result.setFrom(this._point0); return result; }\n return this._point0.clone();\n }\n /** Return a (clone of) the end point (This is NOT a reference to the stored end point) */\n public override endPoint(result?: Point3d): Point3d {\n if (result) { result.setFrom(this._point1); return result; }\n return this._point1.clone();\n }\n /** Return the point and derivative vector at fractional position along the line segment. */\n public fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d {\n result = result ? result : Ray3d.createZero();\n result.direction.setStartEnd(this._point0, this._point1);\n this._point0.interpolate(fraction, this._point1, result.origin);\n return result;\n }\n /**\n * Construct a plane with\n * * origin at the fractional position along the line segment\n * * x axis is the first derivative, i.e. along the line segment\n * * y axis is the second derivative, i.e. 000\n */\n public fractionToPointAnd2Derivatives(fraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors {\n result = result ? result : Plane3dByOriginAndVectors.createXYPlane();\n result.vectorU.setStartEnd(this._point0, this._point1);\n result.vectorV.set(0, 0, 0);\n this._point0.interpolate(fraction, this._point1, result.origin);\n return result;\n }\n /** Clone the LineSegment3d */\n public clone(): LineSegment3d {\n return LineSegment3d.create(this._point0, this._point1);\n }\n /** Clone and apply transform to the clone. */\n public cloneTransformed(transform: Transform): LineSegment3d { // we know tryTransformInPlace succeeds.\n const c = this.clone();\n c.tryTransformInPlace(transform);\n return c;\n }\n /** Create with start and end points. The point contents are cloned into the LineSegment3d. */\n public static create(point0: Point3d, point1: Point3d, result?: LineSegment3d): LineSegment3d {\n if (result) {\n result.set(point0, point1); // and this will clone them !!\n return result;\n }\n return new LineSegment3d(point0.clone(), point1.clone());\n }\n /** Create with start and end points. The point contents are CAPTURED into the result */\n public static createCapture(point0: Point3d, point1: Point3d): LineSegment3d {\n return new LineSegment3d(point0, point1);\n }\n /**\n * Create a LineSegment3d from xy coordinates of start and end, with common z.\n * @param x0 start point x coordinate.\n * @param y0 start point y coordinate.\n * @param x1 end point x coordinate.\n * @param y1 end point y coordinate.\n * @param z z coordinate to use for both points.\n * @param result optional existing LineSegment to be reinitialized.\n */\n public static createXYXY(x0: number, y0: number, x1: number, y1: number, z: number = 0, result?: LineSegment3d) {\n if (result) {\n result._point0.set(x0, y0, z);\n result._point1.set(x1, y1, z);\n return result;\n }\n return new LineSegment3d(Point3d.create(x0, y0, z), Point3d.create(x1, y1, z));\n }\n /**\n * Create a LineSegment3d from xy coordinates of start and end, with common z.\n * @param x0 start point x coordinate.\n * @param y0 start point y coordinate.\n * @param x1 end point x coordinate.\n * @param y1 end point y coordinate.\n * @param z z coordinate to use for both points.\n * @param result optional existing LineSegment to be reinitialized.\n */\n public static createXYZXYZ(\n x0: number, y0: number, z0: number, x1: number, y1: number, z1: number, result?: LineSegment3d,\n ): LineSegment3d {\n if (result) {\n result._point0.set(x0, y0, z0);\n result._point1.set(x1, y1, z1);\n return result;\n }\n return new LineSegment3d(Point3d.create(x0, y0, z0), Point3d.create(x1, y1, z1));\n }\n /** Return the point at fractional position along the line segment. */\n public fractionToPoint(fraction: number, result?: Point3d): Point3d {\n return this._point0.interpolate(fraction, this._point1, result);\n }\n /** Return the length of the segment. */\n public override curveLength(): number {\n return this._point0.distance(this._point1);\n }\n /** Return the length of the partial segment between fractions. */\n public override curveLengthBetweenFractions(fraction0: number, fraction1: number): number {\n return Math.abs(fraction1 - fraction0) * this._point0.distance(this._point1);\n }\n /** Return the length of the segment. */\n public quickLength(): number {\n return this.curveLength();\n }\n /**\n * Returns a curve location detail with both xyz and fractional coordinates of the closest point.\n * @param spacePoint point in space\n * @param extend if false, only return points within the bounded line segment. If true, allow the point to be on\n * the unbounded line that contains the bounded segment.\n * @param result optional pre-allocated object to populate and return\n * @returns detail, with `a` field set to the distance from `spacePoint` to the closest point\n */\n public override closestPoint(\n spacePoint: Point3d, extend: VariantCurveExtendParameter, result?: CurveLocationDetail,\n ): CurveLocationDetail {\n let fraction = spacePoint.fractionOfProjectionToLine(this._point0, this._point1, 0.0);\n fraction = CurveExtendOptions.correctFraction(extend, fraction);\n result = CurveLocationDetail.create(this, result);\n result.fraction = fraction;\n this._point0.interpolate(fraction, this._point1, result.point);\n result.vectorInCurveLocationDetail = undefined;\n result.a = result.point.distance(spacePoint);\n return result;\n }\n /**\n * Compute the closest approach between a pair of line segments.\n * * The approach distance is returned in the `a` fields of the details.\n * @param segmentA first line segment\n * @param extendA how to extend segmentA forward/backward\n * @param segmentB second line segment\n * @param extendB how to extend segmentB forward/backward\n * @param result optional pre-allocated object to populate and return\n * @returns pair of details, one per segment, each with `a` field set to the closest approach distance\n */\n public static closestApproach(\n segmentA: LineSegment3d,\n extendA: VariantCurveExtendParameter,\n segmentB: LineSegment3d,\n extendB: VariantCurveExtendParameter,\n result?: CurveLocationDetailPair,\n ): CurveLocationDetailPair | undefined {\n const unboundedFractions = Vector2d.create();\n if (result === undefined)\n result = CurveLocationDetailPair.createCapture(CurveLocationDetail.create(), CurveLocationDetail.create());\n if (SmallSystem.lineSegment3dClosestApproachUnbounded(segmentA._point0, segmentA._point1, segmentB._point0, segmentB._point1, unboundedFractions)) {\n // There is a simple approach between the unbounded segments. Maybe its a really easy case ...\n const fractionA = CurveExtendOptions.correctFraction(extendA, unboundedFractions.x);\n const fractionB = CurveExtendOptions.correctFraction(extendB, unboundedFractions.y);\n // if neither fraction was corrected, just accept !!!\n if (fractionA === unboundedFractions.x && fractionB === unboundedFractions.y) {\n CurveLocationDetail.createCurveEvaluatedFraction(segmentA, fractionA, result.detailA);\n CurveLocationDetail.createCurveEvaluatedFraction(segmentB, fractionB, result.detailB);\n result.detailA.a = result.detailB.a = result.detailA.point.distance(result.detailB.point);\n return result;\n }\n // One or both of the fractions were clamped back to an endpoint.\n // Claim: (????!!!????) The only proximity candidates that matter are from clamped point onto the other.\n if (fractionA !== unboundedFractions.x && fractionB !== unboundedFractions.y) {\n // Fill in (in the result) both individual details with \"projected\" points and distance.\n // The \"loser\" will have its contents replaced.\n const clampedPointOnA = fractionA < 0.5 ? segmentA._point0 : segmentA._point1;\n const clampedPointOnB = fractionB < 0.5 ? segmentB._point0 : segmentB._point1;\n segmentB.closestPoint(clampedPointOnA, extendB, result.detailB);\n segmentA.closestPoint(clampedPointOnB, extendA, result.detailA);\n if (result.detailA.a <= result.detailB.a) {\n CurveLocationDetail.createCurveFractionPoint(segmentB, fractionB, clampedPointOnB, result.detailB);\n } else {\n CurveLocationDetail.createCurveFractionPoint(segmentA, fractionA, clampedPointOnA, result.detailA);\n }\n } else if (fractionB !== unboundedFractions.y) {\n // B (only) was clamped.\n const clampedPointOnB = fractionB < 0.5 ? segmentB._point0 : segmentB._point1;\n segmentA.closestPoint(clampedPointOnB, extendA, result.detailA);\n result.detailB.setCurve(segmentB);\n result.detailB.point.setFrom(clampedPointOnB);\n result.detailB.fraction = fractionB;\n } else {\n // fractionA was clamped.\n const clampedPointOnA = fractionA < 0.5 ? segmentA._point0 : segmentA._point1;\n segmentB.closestPoint(clampedPointOnA, extendB, result.detailB);\n result.detailA.setCurve(segmentA);\n result.detailA.point.setFrom(clampedPointOnA);\n result.detailA.fraction = fractionA;\n }\n result.detailA.a = result.detailB.a = result.detailA.point.distance(result.detailB.point);\n return result;\n }\n // (probably? certainly?) parallel (possibly coincident) lines.\n // run all 4 endpoint-to-other cases . . . reassemble carefully ...\n const resultSet = [\n segmentA.closestPoint(segmentB._point0, extendA),\n segmentA.closestPoint(segmentB._point1, extendA),\n segmentB.closestPoint(segmentA._point0, extendB),\n segmentB.closestPoint(segmentA._point1, extendB),\n ];\n let dMin = resultSet[0].a;\n let iMin = 0;\n for (let i = 1; i < 4; i++) {\n if (resultSet[i].a < dMin) {\n iMin = i;\n dMin = resultSet[i].a;\n }\n }\n if (iMin === 0) {\n resultSet[0].clone(result.detailA);\n CurveLocationDetail.createCurveEvaluatedFraction(segmentB, 0.0, result.detailB);\n result.detailB.a = result.detailA.a;\n } else if (iMin === 1) {\n resultSet[1].clone(result.detailA);\n CurveLocationDetail.createCurveEvaluatedFraction(segmentB, 1.0, result.detailB);\n result.detailB.a = result.detailA.a;\n } else if (iMin === 2) {\n resultSet[2].clone(result.detailB);\n CurveLocationDetail.createCurveEvaluatedFraction(segmentA, 0.0, result.detailA);\n result.detailA.a = result.detailB.a;\n } else {\n assert(iMin === 3);\n resultSet[3].clone(result.detailB);\n CurveLocationDetail.createCurveEvaluatedFraction(segmentA, 1.0, result.detailA);\n result.detailA.a = result.detailB.a;\n }\n return result;\n }\n /** Swap the endpoint references. */\n public reverseInPlace(): void {\n const a = this._point0;\n this._point0 = this._point1;\n this._point1 = a;\n }\n /** Transform the two endpoints of this LinSegment. */\n public tryTransformInPlace(transform: Transform): boolean {\n this._point0 = transform.multiplyPoint3d(this._point0, this._point0);\n this._point1 = transform.multiplyPoint3d(this._point1, this._point1);\n return true;\n }\n /** Test if both endpoints are in a plane (within tolerance) */\n public isInPlane(plane: PlaneAltitudeEvaluator): boolean {\n return Geometry.isSmallMetricDistance(plane.altitude(this._point0))\n && Geometry.isSmallMetricDistance(plane.altitude(this._point1));\n }\n /**\n * Compute points of simple (transverse) with a plane.\n * * Use isInPlane to test if the line segment is completely in the plane.\n */\n public override appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number {\n const h0 = plane.altitude(this._point0);\n const h1 = plane.altitude(this._point1);\n const fraction = Order2Bezier.solveCoffs(h0, h1);\n let numIntersection = 0;\n if (fraction !== undefined) {\n numIntersection++;\n const detail = CurveLocationDetail.createCurveFractionPoint(this, fraction, this.fractionToPoint(fraction));\n detail.intervalRole = CurveIntervalRole.isolated;\n result.push(detail);\n }\n return numIntersection;\n }\n /**\n * Extend a range to include the (optionally transformed) line segment\n * @param range range to extend\n * @param transform optional transform to apply to the end points\n */\n public extendRange(range: Range3d, transform?: Transform): void {\n if (transform) {\n range.extendTransformedPoint(transform, this._point0);\n range.extendTransformedPoint(transform, this._point1);\n } else {\n range.extendPoint(this._point0);\n range.extendPoint(this._point1);\n }\n }\n /**\n * Construct a line from either of these json forms:\n *\n * * object with named start and end:\n * `{startPoint: pointValue, endPoint: pointValue}`\n * * array of two point values:\n * `[pointValue, pointValue]`\n * The point values are any values accepted by the Point3d method setFromJSON.\n * @param json data to parse.\n */\n public setFromJSON(json?: any) {\n if (!json) {\n this._point0.set(0, 0, 0);\n this._point1.set(1, 0, 0);\n return;\n } else if (json.startPoint && json.endPoint) { // {startPoint:json point, endPoint:json point}\n this._point0.setFromJSON(json.startPoint);\n this._point1.setFromJSON(json.endPoint);\n } else if (Array.isArray(json)\n && json.length > 1) { // [json point, json point]\n this._point0.setFromJSON(json[0]);\n this._point1.setFromJSON(json[1]);\n }\n }\n /** A simple line segment's fraction and distance are proportional. */\n public override getFractionToDistanceScale(): number | undefined {\n return this.curveLength();\n }\n /**\n * Place the lineSegment3d start and points in a json object\n * @return {*} [[x,y,z],[x,y,z]]\n */\n public toJSON(): any {\n return [this._point0.toJSON(), this._point1.toJSON()];\n }\n /** Create a new `LineSegment3d` with coordinates from json object. See `setFromJSON` for object layout description. */\n public static fromJSON(json?: any): LineSegment3d {\n const result = new LineSegment3d(Point3d.createZero(), Point3d.create());\n result.setFromJSON(json);\n return result;\n }\n /** Near equality test with `other`. */\n public override isAlmostEqual(other: GeometryQuery): boolean {\n if (other instanceof LineSegment3d) {\n const ls = other;\n return this._point0.isAlmostEqual(ls._point0) && this._point1.isAlmostEqual(ls._point1);\n }\n return false;\n }\n /** Emit strokes to caller-supplied linestring */\n public emitStrokes(dest: LineString3d, options?: StrokeOptions): void {\n const numStroke = this.computeStrokeCountForOptions(options);\n dest.appendFractionalStrokePoints(this, numStroke, 0.0, 1.0);\n }\n /** Emit strokes to caller-supplied handler */\n public emitStrokableParts(handler: IStrokeHandler, options?: StrokeOptions): void {\n handler.startCurvePrimitive(this);\n const numStroke = this.computeStrokeCountForOptions(options);\n handler.announceSegmentInterval(this, this._point0, this._point1, numStroke, 0.0, 1.0);\n handler.endCurvePrimitive(this);\n }\n /**\n * Return the stroke count required for given options.\n * @param options StrokeOptions that determine count\n */\n public computeStrokeCountForOptions(options?: StrokeOptions): number {\n let numStroke = 1;\n if (options) {\n if (options.maxEdgeLength)\n numStroke = options.applyMaxEdgeLength(numStroke, this.curveLength());\n numStroke = options.applyMinStrokesPerPrimitive(numStroke);\n }\n return numStroke;\n }\n /** Second step of double dispatch: call `handler.handleLineSegment3d(this)` */\n public dispatchToGeometryHandler(handler: GeometryHandler): any {\n return handler.handleLineSegment3d(this);\n }\n /**\n * Find intervals of this curve primitive that are interior to a clipper\n * @param clipper clip structure (e.g. clip planes)\n * @param announce function to be called announcing fractional intervals `announce(fraction0, fraction1, curvePrimitive)`\n */\n public override announceClipIntervals(clipper: Clipper, announce?: AnnounceNumberNumberCurvePrimitive): boolean {\n return clipper.announceClippedSegmentIntervals(\n 0.0, 1.0, this._point0, this._point1,\n announce ? (fraction0: number, fraction1: number) => announce(fraction0, fraction1, this) : undefined,\n );\n }\n /**\n * Return (if possible) a curve primitive which is a portion of this curve.\n * @param fractionA [in] start fraction\n * @param fractionB [in] end fraction\n */\n public override clonePartialCurve(fractionA: number, fractionB: number): LineSegment3d {\n return LineSegment3d.create(this.fractionToPoint(fractionA), this.fractionToPoint(fractionB));\n }\n /**\n * Returns a (high accuracy) range of the curve between fractional positions\n * * Default implementation returns teh range of the curve from clonePartialCurve\n */\n public override rangeBetweenFractions(fraction0: number, fraction1: number, transform?: Transform): Range3d {\n // (This is cheap -- don't bother testing for fraction0===fraction1)\n if (!transform) {\n const range = Range3d.create();\n range.extendInterpolated(this._point0, fraction0, this._point1);\n range.extendInterpolated(this._point0, fraction1, this._point1);\n return range;\n }\n const point0 = this.fractionToPoint(fraction0);\n const point1 = this.fractionToPoint(fraction1);\n if (transform) {\n transform.multiplyPoint3d(point0, point0);\n transform.multiplyPoint3d(point1, point1);\n }\n return Range3d.create(point0, point1);\n }\n /**\n * Construct an offset of the instance curve as viewed in the xy-plane (ignoring z).\n * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object\n */\n public override constructOffsetXY(\n offsetDistanceOrOptions: number | OffsetOptions,\n ): CurvePrimitive | CurvePrimitive[] | undefined {\n const offsetVec = Vector3d.createStartEnd(this._point0, this._point1);\n if (offsetVec.normalizeInPlace()) {\n offsetVec.rotate90CCWXY(offsetVec);\n const offsetDist = OffsetOptions.getOffsetDistance(offsetDistanceOrOptions);\n return LineSegment3d.create(\n this._point0.plusScaled(offsetVec, offsetDist), this._point1.plusScaled(offsetVec, offsetDist),\n );\n }\n return undefined;\n }\n /**\n * Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of\n * projection.\n * @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.\n * @param lowHigh optional receiver for output\n * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the\n * end of the ray.\n */\n public override projectedParameterRange(ray: Vector3d | Ray3d, lowHigh?: Range1d): Range1d | undefined {\n return PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ConsolidateAdjacentPrimitivesContext.d.ts","sourceRoot":"","sources":["../../../../src/curve/Query/ConsolidateAdjacentPrimitivesContext.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAKvE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIhD,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,yCAAyC,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;GA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CAIvD"}
@@ -5,6 +5,7 @@
5
5
  /** @packageDocumentation
6
6
  * @module Curve
7
7
  */
8
+ import { Geometry } from "../../Geometry";
8
9
  import { NullGeometryHandler } from "../../geometry3d/GeometryHandler";
9
10
  import { PolylineCompressionContext } from "../../geometry3d/PolylineCompressionByEdgeOffset";
10
11
  import { PolylineOps } from "../../geometry3d/PolylineOps";
@@ -54,7 +55,14 @@ export class ConsolidateAdjacentCurvePrimitivesContext extends NullGeometryHandl
54
55
  break;
55
56
  }
56
57
  }
57
- if (points.length > 1) {
58
+ if (points.length <= 1) {
59
+ g.children[numAccept++] = basePrimitive;
60
+ }
61
+ else if (this._options.disableLinearCompression) {
62
+ const pointsDeduped = PolylineOps.compressShortEdges(points, Geometry.smallFloatingPoint); // remove only exact duplicate interior points
63
+ g.children[numAccept++] = LineString3d.createPoints(pointsDeduped);
64
+ }
65
+ else { // compress points
58
66
  const compressedPointsA = PolylineOps.compressShortEdges(points, this._options.duplicatePointTolerance);
59
67
  const compressedPointsB = PolylineOps.compressByPerpendicularDistance(compressedPointsA, this._options.colinearPointTolerance);
60
68
  if (i0 === 0 && i1 === numOriginal) {
@@ -72,9 +80,6 @@ export class ConsolidateAdjacentCurvePrimitivesContext extends NullGeometryHandl
72
80
  g.children[numAccept++] = LineString3d.createPoints(compressedPointsB);
73
81
  }
74
82
  }
75
- else {
76
- g.children[numAccept++] = basePrimitive;
77
- }
78
83
  i0 = i1;
79
84
  }
80
85
  else if (this._options.consolidateCompatibleArcs && basePrimitive instanceof Arc3d) {
@@ -84,7 +89,7 @@ export class ConsolidateAdjacentCurvePrimitivesContext extends NullGeometryHandl
84
89
  const nextPrimitive = g.children[i0];
85
90
  if (!(nextPrimitive instanceof Arc3d))
86
91
  break;
87
- if (!CurveFactory.appendToArcInPlace(basePrimitive, nextPrimitive))
92
+ if (!CurveFactory.appendToArcInPlace(basePrimitive, nextPrimitive)) // TODO: use this._options.duplicatePointTolerance
88
93
  break;
89
94
  }
90
95
  // i0 has already advanced
@@ -1 +1 @@
1
- {"version":3,"file":"ConsolidateAdjacentPrimitivesContext.js","sourceRoot":"","sources":["../../../../src/curve/Query/ConsolidateAdjacentPrimitivesContext.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAC9F,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,OAAO,EAAE,yCAAyC,EAAE,MAAM,cAAc,CAAC;AAGzE;;;;GAIG;AACH,MAAM,OAAO,yCAA0C,SAAQ,mBAAmB;IACxE,QAAQ,CAA4C;IAC5D,YAAmB,OAAmD;QACpE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,yCAAyC,EAAE,CAAC;IACtF,CAAC;IACD,iEAAiE;IAC1D,gBAAgB,CAAC,CAAa;QACnC,MAAM,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC;QAC5B,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC;QACpC,MAAM,MAAM,GAAc,EAAE,CAAC;QAC7B,IAAI,SAAS,GAAG,CAAC,CAAC;QAClB,2CAA2C;QAC3C,mFAAmF;QACnF,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,WAAW,GAAG,CAAC;YACnC,MAAM,aAAa,GAAG,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;YACrC,IAAI,IAAI,CAAC,QAA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AkB,CAAC,aAAa,EAAE,aAAa,CAAC;wBAChE,MAAM;gBACV,CAAC;gBACD,0BAA0B;gBAC1B,CAAC,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC,GAAG,aAAa,CAAC,CAAI,2CAA2C;YACzF,CAAC;iBAAM,CAAC;gBACN,CAAC,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC,GAAG,aAAa,CAAC;gBACxC,EAAE,EAAE,CAAC;YACP,CAAC;QACH,CAAC;QACD,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;IAChC,CAAC;IAEe,UAAU,CAAC,CAAO,IAAS,OAAO,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7D,UAAU,CAAC,CAAO,IAAS,OAAO,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7D,kBAAkB,CAAC,CAAe;QAChD,KAAK,MAAM,KAAK,IAAI,CAAC,CAAC,QAAQ;YAC5B,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IACe,iBAAiB,CAAC,CAAc;QAC9C,KAAK,MAAM,KAAK,IAAI,CAAC,CAAC,QAAQ;YAC5B,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAC1C,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 Curve\n */\n\nimport { NullGeometryHandler } from \"../../geometry3d/GeometryHandler\";\nimport { Point3d } from \"../../geometry3d/Point3dVector3d\";\nimport { PolylineCompressionContext } from \"../../geometry3d/PolylineCompressionByEdgeOffset\";\nimport { PolylineOps } from \"../../geometry3d/PolylineOps\";\nimport { Arc3d } from \"../Arc3d\";\nimport { CurveChain } from \"../CurveCollection\";\nimport { CurveFactory } from \"../CurveFactory\";\nimport { LineSegment3d } from \"../LineSegment3d\";\nimport { LineString3d } from \"../LineString3d\";\nimport { Loop } from \"../Loop\";\nimport { ParityRegion } from \"../ParityRegion\";\nimport { Path } from \"../Path\";\nimport { ConsolidateAdjacentCurvePrimitivesOptions } from \"../RegionOps\";\nimport { UnionRegion } from \"../UnionRegion\";\n\n/**\n * * Implementation class for ConsolidateAdjacentCurvePrimitives.\n *\n * @internal\n */\nexport class ConsolidateAdjacentCurvePrimitivesContext extends NullGeometryHandler {\n private _options: ConsolidateAdjacentCurvePrimitivesOptions;\n public constructor(options?: ConsolidateAdjacentCurvePrimitivesOptions) {\n super();\n this._options = options ? options : new ConsolidateAdjacentCurvePrimitivesOptions();\n }\n /** look for adjacent compatible primitives in a path or loop. */\n public handleCurveChain(g: CurveChain) {\n const children = g.children;\n const numOriginal = children.length;\n const points: Point3d[] = [];\n let numAccept = 0;\n // i0 <=i < i1 is a range of child indices.\n // numAccept is the number of children accepted (contiguously at front of children)\n for (let i0 = 0; i0 < numOriginal;) {\n const basePrimitive = g.children[i0];\n if (this._options.consolidateLinearGeometry && (basePrimitive instanceof LineSegment3d || basePrimitive instanceof LineString3d)) {\n points.length = 0;\n let i1 = i0;\n // on exit, i1 is beyond the block of linear primitives . ..\n for (; i1 < g.children.length; i1++) {\n const nextPrimitive = g.children[i1];\n if (nextPrimitive instanceof LineSegment3d) {\n points.push(nextPrimitive.startPoint());\n points.push(nextPrimitive.endPoint());\n } else if (nextPrimitive instanceof LineString3d) {\n const source = nextPrimitive.packedPoints;\n for (let k = 0; k < source.length; k++) {\n points.push(source.getPoint3dAtUncheckedPointIndex(k));\n }\n } else {\n break;\n }\n }\n if (points.length > 1) {\n const compressedPointsA = PolylineOps.compressShortEdges(points, this._options.duplicatePointTolerance);\n const compressedPointsB = PolylineOps.compressByPerpendicularDistance(compressedPointsA, this._options.colinearPointTolerance);\n if (i0 === 0 && i1 === numOriginal) {\n // points is the entire curve, and the curve is closed. Maybe the first and last segments are colinear.\n PolylineCompressionContext.compressColinearWrapInPlace(compressedPointsB, this._options.duplicatePointTolerance, this._options.colinearPointTolerance);\n }\n if (compressedPointsB.length < 2) {\n // Collapsed to a point? Make a single point linestring\n g.children[numAccept++] = LineString3d.create(compressedPointsB[0]);\n } else if (compressedPointsB.length === 2) {\n g.children[numAccept++] = LineSegment3d.create(compressedPointsB[0], compressedPointsB[1]);\n } else {\n g.children[numAccept++] = LineString3d.createPoints(compressedPointsB);\n }\n } else {\n g.children[numAccept++] = basePrimitive;\n }\n i0 = i1;\n } else if (this._options.consolidateCompatibleArcs && basePrimitive instanceof Arc3d) {\n // subsume subsequent arcs into basePrimitive.\n // always accept base primitive.\n for (; ++i0 < g.children.length;) {\n const nextPrimitive = g.children[i0];\n if (!(nextPrimitive instanceof Arc3d))\n break;\n if (!CurveFactory.appendToArcInPlace(basePrimitive, nextPrimitive))\n break;\n }\n // i0 has already advanced\n g.children[numAccept++] = basePrimitive; // which has been extended 0 or more times.\n } else {\n g.children[numAccept++] = basePrimitive;\n i0++;\n }\n }\n g.children.length = numAccept;\n }\n\n public override handlePath(g: Path): any { return this.handleCurveChain(g); }\n public override handleLoop(g: Loop): any { return this.handleCurveChain(g); }\n public override handleParityRegion(g: ParityRegion): any {\n for (const child of g.children)\n child.dispatchToGeometryHandler(this);\n }\n public override handleUnionRegion(g: UnionRegion): any {\n for (const child of g.children)\n child.dispatchToGeometryHandler(this);\n }\n}\n"]}
1
+ {"version":3,"file":"ConsolidateAdjacentPrimitivesContext.js","sourceRoot":"","sources":["../../../../src/curve/Query/ConsolidateAdjacentPrimitivesContext.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAC9F,OAAO,EAAE,WAAW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BAAkB,CAAC,aAAa,EAAE,aAAa,CAAC,EAAE,kDAAkD;wBACpH,MAAM;gBACV,CAAC;gBACD,0BAA0B;gBAC1B,CAAC,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC,GAAG,aAAa,CAAC,CAAC,2CAA2C;YACtF,CAAC;iBAAM,CAAC;gBACN,CAAC,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC,GAAG,aAAa,CAAC;gBACxC,EAAE,EAAE,CAAC;YACP,CAAC;QACH,CAAC;QACD,CAAC,CAAC,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC;IAChC,CAAC;IAEe,UAAU,CAAC,CAAO,IAAS,OAAO,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7D,UAAU,CAAC,CAAO,IAAS,OAAO,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7D,kBAAkB,CAAC,CAAe;QAChD,KAAK,MAAM,KAAK,IAAI,CAAC,CAAC,QAAQ;YAC5B,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IACe,iBAAiB,CAAC,CAAc;QAC9C,KAAK,MAAM,KAAK,IAAI,CAAC,CAAC,QAAQ;YAC5B,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAC1C,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 Curve\n */\n\nimport { Geometry } from \"../../Geometry\";\nimport { NullGeometryHandler } from \"../../geometry3d/GeometryHandler\";\nimport { Point3d } from \"../../geometry3d/Point3dVector3d\";\nimport { PolylineCompressionContext } from \"../../geometry3d/PolylineCompressionByEdgeOffset\";\nimport { PolylineOps } from \"../../geometry3d/PolylineOps\";\nimport { Arc3d } from \"../Arc3d\";\nimport { CurveChain } from \"../CurveCollection\";\nimport { CurveFactory } from \"../CurveFactory\";\nimport { LineSegment3d } from \"../LineSegment3d\";\nimport { LineString3d } from \"../LineString3d\";\nimport { Loop } from \"../Loop\";\nimport { ParityRegion } from \"../ParityRegion\";\nimport { Path } from \"../Path\";\nimport { ConsolidateAdjacentCurvePrimitivesOptions } from \"../RegionOps\";\nimport { UnionRegion } from \"../UnionRegion\";\n\n/**\n * * Implementation class for ConsolidateAdjacentCurvePrimitives.\n *\n * @internal\n */\nexport class ConsolidateAdjacentCurvePrimitivesContext extends NullGeometryHandler {\n private _options: ConsolidateAdjacentCurvePrimitivesOptions;\n public constructor(options?: ConsolidateAdjacentCurvePrimitivesOptions) {\n super();\n this._options = options ? options : new ConsolidateAdjacentCurvePrimitivesOptions();\n }\n /** look for adjacent compatible primitives in a path or loop. */\n public handleCurveChain(g: CurveChain) {\n const children = g.children;\n const numOriginal = children.length;\n const points: Point3d[] = [];\n let numAccept = 0;\n // i0 <=i < i1 is a range of child indices.\n // numAccept is the number of children accepted (contiguously at front of children)\n for (let i0 = 0; i0 < numOriginal;) {\n const basePrimitive = g.children[i0];\n if (this._options.consolidateLinearGeometry && (basePrimitive instanceof LineSegment3d || basePrimitive instanceof LineString3d)) {\n points.length = 0;\n let i1 = i0;\n // on exit, i1 is beyond the block of linear primitives . ..\n for (; i1 < g.children.length; i1++) {\n const nextPrimitive = g.children[i1];\n if (nextPrimitive instanceof LineSegment3d) {\n points.push(nextPrimitive.startPoint());\n points.push(nextPrimitive.endPoint());\n } else if (nextPrimitive instanceof LineString3d) {\n const source = nextPrimitive.packedPoints;\n for (let k = 0; k < source.length; k++) {\n points.push(source.getPoint3dAtUncheckedPointIndex(k));\n }\n } else {\n break;\n }\n }\n if (points.length <= 1) {\n g.children[numAccept++] = basePrimitive;\n } else if (this._options.disableLinearCompression) {\n const pointsDeduped = PolylineOps.compressShortEdges(points, Geometry.smallFloatingPoint); // remove only exact duplicate interior points\n g.children[numAccept++] = LineString3d.createPoints(pointsDeduped);\n } else { // compress points\n const compressedPointsA = PolylineOps.compressShortEdges(points, this._options.duplicatePointTolerance);\n const compressedPointsB = PolylineOps.compressByPerpendicularDistance(compressedPointsA, this._options.colinearPointTolerance);\n if (i0 === 0 && i1 === numOriginal) {\n // points is the entire curve, and the curve is closed. Maybe the first and last segments are colinear.\n PolylineCompressionContext.compressColinearWrapInPlace(compressedPointsB, this._options.duplicatePointTolerance, this._options.colinearPointTolerance);\n }\n if (compressedPointsB.length < 2) {\n // Collapsed to a point? Make a single point linestring\n g.children[numAccept++] = LineString3d.create(compressedPointsB[0]);\n } else if (compressedPointsB.length === 2) {\n g.children[numAccept++] = LineSegment3d.create(compressedPointsB[0], compressedPointsB[1]);\n } else {\n g.children[numAccept++] = LineString3d.createPoints(compressedPointsB);\n }\n }\n i0 = i1;\n } else if (this._options.consolidateCompatibleArcs && basePrimitive instanceof Arc3d) {\n // subsume subsequent arcs into basePrimitive.\n // always accept base primitive.\n for (; ++i0 < g.children.length;) {\n const nextPrimitive = g.children[i0];\n if (!(nextPrimitive instanceof Arc3d))\n break;\n if (!CurveFactory.appendToArcInPlace(basePrimitive, nextPrimitive)) // TODO: use this._options.duplicatePointTolerance\n break;\n }\n // i0 has already advanced\n g.children[numAccept++] = basePrimitive; // which has been extended 0 or more times.\n } else {\n g.children[numAccept++] = basePrimitive;\n i0++;\n }\n }\n g.children.length = numAccept;\n }\n\n public override handlePath(g: Path): any { return this.handleCurveChain(g); }\n public override handleLoop(g: Loop): any { return this.handleCurveChain(g); }\n public override handleParityRegion(g: ParityRegion): any {\n for (const child of g.children)\n child.dispatchToGeometryHandler(this);\n }\n public override handleUnionRegion(g: UnionRegion): any {\n for (const child of g.children)\n child.dispatchToGeometryHandler(this);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"PlanarSubdivision.d.ts","sourceRoot":"","sources":["../../../../src/curve/Query/PlanarSubdivision.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,Q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AAE,MAAM,SAAS,CAAC;AAgEhE;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,gIAAgI;WAClH,qBAAqB,CAAC,UAAU,EAAE,cAAc,EAAE,EAAE,QAAQ,EAAE,uBAAuB,EAAE,EAAE,cAAc,GAAE,MAAqC,GAAG,aAAa;IAmC5K;;;;;;;;;;OAUG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IAc1B;;;;;OAKG;WACW,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,iBAAiB,GAAE,MAAgB,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM;WAezH,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAC/C,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,KAAK,IAAI,GAAG,IAAI;IAsB7E,OAAO,CAAC,MAAM,CAAC,UAAU;IAYzB,OAAO,CAAC,MAAM,CAAC,eAAe;WAWhB,oCAAoC,CAAC,KAAK,EAAE,aAAa,EAAE,iBAAiB,GAAE,MAAgB,GAAG,WAAW,EAAE;CAkC7H"}
@@ -48,13 +48,18 @@ class MapCurvePrimitiveToCurveLocationDetailPairArray {
48
48
  if (primitiveB)
49
49
  this.insertPrimitiveToPair(primitiveB, pair);
50
50
  }
51
- /** Split closed missing primitives in half and add new intersection pairs */
51
+ /**
52
+ * Split closed missing primitives in half and add new intersection pairs.
53
+ * * When bridge edges aren't included in the primitives array, a closed primitive with no intersections will not be
54
+ * added to the graph because it isn't in the `primitiveToPair` map. By splitting such a missing primitive in two, we
55
+ * introduce two intersections for each half, which allows the primitive to be represented in the map.
56
+ */
52
57
  splitAndAppendMissingClosedPrimitives(primitives, tolerance = Geometry.smallMetricDistance) {
53
58
  for (const p of primitives) {
54
59
  let closedCurveSplitCandidate = false;
55
60
  if (p instanceof Arc3d)
56
61
  closedCurveSplitCandidate = p.sweep.isFullCircle;
57
- else if (!(p instanceof LineSegment3d) && !(p instanceof LineString3d))
62
+ else if (!(p instanceof LineSegment3d) && !(p instanceof LineString3d)) // TODO: probably should do this for all types. Lots of spline-type primitives can be closed.
58
63
  closedCurveSplitCandidate = p.startPoint().isAlmostEqualXY(p.endPoint(), tolerance);
59
64
  if (closedCurveSplitCandidate && !this.primitiveToPair.has(p)) {
60
65
  const p0 = p.clonePartialCurve(0.0, 0.5);