@itwin/core-geometry 5.1.0-dev.9 → 5.2.0-dev.2

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 (598) hide show
  1. package/CHANGELOG.md +63 -1
  2. package/lib/cjs/Geometry.d.ts +18 -10
  3. package/lib/cjs/Geometry.d.ts.map +1 -1
  4. package/lib/cjs/Geometry.js +13 -3
  5. package/lib/cjs/Geometry.js.map +1 -1
  6. package/lib/cjs/bspline/BSpline1dNd.d.ts +1 -1
  7. package/lib/cjs/bspline/BSpline1dNd.js +1 -1
  8. package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
  9. package/lib/cjs/bspline/BSplineCurve.d.ts.map +1 -1
  10. package/lib/cjs/bspline/BSplineCurve.js +7 -1
  11. package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
  12. package/lib/cjs/bspline/BSplineSurface.d.ts +4 -3
  13. package/lib/cjs/bspline/BSplineSurface.d.ts.map +1 -1
  14. package/lib/cjs/bspline/BSplineSurface.js +4 -5
  15. package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
  16. package/lib/cjs/clipping/ClipPlane.d.ts +7 -5
  17. package/lib/cjs/clipping/ClipPlane.d.ts.map +1 -1
  18. package/lib/cjs/clipping/ClipPlane.js +9 -5
  19. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  20. package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
  21. package/lib/cjs/clipping/ClipUtils.js +5 -3
  22. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  23. package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts +1 -2
  24. package/lib/cjs/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  25. package/lib/cjs/clipping/ConvexClipPlaneSet.js +13 -25
  26. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  27. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts +1 -2
  28. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
  29. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js +1 -2
  30. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  31. package/lib/cjs/core-geometry.d.ts +2 -0
  32. package/lib/cjs/core-geometry.d.ts.map +1 -1
  33. package/lib/cjs/core-geometry.js +2 -0
  34. package/lib/cjs/core-geometry.js.map +1 -1
  35. package/lib/cjs/curve/Arc3d.d.ts +54 -32
  36. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  37. package/lib/cjs/curve/Arc3d.js +56 -37
  38. package/lib/cjs/curve/Arc3d.js.map +1 -1
  39. package/lib/cjs/curve/CurveCollection.d.ts +40 -1
  40. package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
  41. package/lib/cjs/curve/CurveCollection.js +90 -0
  42. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  43. package/lib/cjs/curve/CurveFactory.d.ts +3 -2
  44. package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
  45. package/lib/cjs/curve/CurveFactory.js +6 -5
  46. package/lib/cjs/curve/CurveFactory.js.map +1 -1
  47. package/lib/cjs/curve/CurveLocationDetail.d.ts +27 -25
  48. package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
  49. package/lib/cjs/curve/CurveLocationDetail.js +30 -25
  50. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  51. package/lib/cjs/curve/CurvePrimitive.d.ts +9 -2
  52. package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
  53. package/lib/cjs/curve/CurvePrimitive.js +11 -0
  54. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  55. package/lib/cjs/curve/CurveTypes.d.ts +1 -1
  56. package/lib/cjs/curve/CurveTypes.js.map +1 -1
  57. package/lib/cjs/curve/LineSegment3d.d.ts +2 -0
  58. package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
  59. package/lib/cjs/curve/LineSegment3d.js +4 -0
  60. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  61. package/lib/cjs/curve/LineString3d.d.ts +7 -0
  62. package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
  63. package/lib/cjs/curve/LineString3d.js +15 -3
  64. package/lib/cjs/curve/LineString3d.js.map +1 -1
  65. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  66. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js +37 -8
  67. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  68. package/lib/cjs/curve/Query/PlanarSubdivision.d.ts +34 -8
  69. package/lib/cjs/curve/Query/PlanarSubdivision.d.ts.map +1 -1
  70. package/lib/cjs/curve/Query/PlanarSubdivision.js +129 -33
  71. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  72. package/lib/cjs/curve/Query/StrokeCountChain.d.ts +4 -3
  73. package/lib/cjs/curve/Query/StrokeCountChain.d.ts.map +1 -1
  74. package/lib/cjs/curve/Query/StrokeCountChain.js +20 -9
  75. package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
  76. package/lib/cjs/curve/RegionMomentsXY.d.ts +2 -1
  77. package/lib/cjs/curve/RegionMomentsXY.d.ts.map +1 -1
  78. package/lib/cjs/curve/RegionMomentsXY.js +26 -41
  79. package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
  80. package/lib/cjs/curve/RegionOps.d.ts +74 -39
  81. package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
  82. package/lib/cjs/curve/RegionOps.js +146 -46
  83. package/lib/cjs/curve/RegionOps.js.map +1 -1
  84. package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts +36 -27
  85. package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
  86. package/lib/cjs/curve/RegionOpsClassificationSweeps.js +161 -55
  87. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  88. package/lib/cjs/curve/StrokeOptions.d.ts +1 -1
  89. package/lib/cjs/curve/StrokeOptions.js +1 -1
  90. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  91. package/lib/cjs/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
  92. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +2 -2
  93. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +6 -6
  94. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  95. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts +0 -1
  96. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  97. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +58 -32
  98. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  99. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
  100. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +0 -1
  101. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  102. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
  103. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
  104. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js +34 -0
  105. package/lib/cjs/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
  106. package/lib/cjs/geometry3d/AngleSweep.d.ts +25 -18
  107. package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
  108. package/lib/cjs/geometry3d/AngleSweep.js +32 -18
  109. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  110. package/lib/cjs/geometry3d/CoincidentGeometryOps.d.ts +8 -7
  111. package/lib/cjs/geometry3d/CoincidentGeometryOps.d.ts.map +1 -1
  112. package/lib/cjs/geometry3d/CoincidentGeometryOps.js +19 -25
  113. package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
  114. package/lib/cjs/geometry3d/Ellipsoid.js +1 -1
  115. package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
  116. package/lib/cjs/geometry3d/GrowableXYArray.d.ts +1 -1
  117. package/lib/cjs/geometry3d/GrowableXYArray.js +1 -1
  118. package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
  119. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +8 -3
  120. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  121. package/lib/cjs/geometry3d/GrowableXYZArray.js +21 -3
  122. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  123. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +11 -1
  124. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  125. package/lib/cjs/geometry3d/IndexedXYZCollection.js +21 -3
  126. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  127. package/lib/cjs/geometry3d/Plane3d.d.ts +2 -0
  128. package/lib/cjs/geometry3d/Plane3d.d.ts.map +1 -1
  129. package/lib/cjs/geometry3d/Plane3d.js +6 -1
  130. package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
  131. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
  132. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
  133. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
  134. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  135. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
  136. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  137. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js +18 -10
  138. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  139. package/lib/cjs/geometry3d/Point2dVector2d.d.ts.map +1 -1
  140. package/lib/cjs/geometry3d/Point2dVector2d.js +0 -2
  141. package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
  142. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +4 -4
  143. package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
  144. package/lib/cjs/geometry3d/Point3dVector3d.js +4 -5
  145. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  146. package/lib/cjs/geometry3d/PointHelpers.d.ts +7 -7
  147. package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
  148. package/lib/cjs/geometry3d/PointHelpers.js +66 -26
  149. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  150. package/lib/cjs/geometry3d/PolygonOps.d.ts +49 -2
  151. package/lib/cjs/geometry3d/PolygonOps.d.ts.map +1 -1
  152. package/lib/cjs/geometry3d/PolygonOps.js +38 -2
  153. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  154. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
  155. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
  156. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
  157. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  158. package/lib/cjs/geometry3d/PolylineOps.d.ts +5 -4
  159. package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
  160. package/lib/cjs/geometry3d/PolylineOps.js +5 -4
  161. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  162. package/lib/cjs/geometry3d/Range.d.ts +18 -10
  163. package/lib/cjs/geometry3d/Range.d.ts.map +1 -1
  164. package/lib/cjs/geometry3d/Range.js +32 -10
  165. package/lib/cjs/geometry3d/Range.js.map +1 -1
  166. package/lib/cjs/geometry3d/Ray2d.d.ts.map +1 -1
  167. package/lib/cjs/geometry3d/Ray2d.js +0 -1
  168. package/lib/cjs/geometry3d/Ray2d.js.map +1 -1
  169. package/lib/cjs/geometry3d/Ray3d.d.ts +7 -9
  170. package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
  171. package/lib/cjs/geometry3d/Ray3d.js +23 -45
  172. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  173. package/lib/cjs/geometry3d/ReusableObjectCache.d.ts +39 -29
  174. package/lib/cjs/geometry3d/ReusableObjectCache.d.ts.map +1 -1
  175. package/lib/cjs/geometry3d/ReusableObjectCache.js +49 -35
  176. package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
  177. package/lib/cjs/geometry3d/SortablePolygon.d.ts +1 -4
  178. package/lib/cjs/geometry3d/SortablePolygon.d.ts.map +1 -1
  179. package/lib/cjs/geometry3d/SortablePolygon.js +48 -43
  180. package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
  181. package/lib/cjs/geometry3d/Transform.d.ts +21 -2
  182. package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
  183. package/lib/cjs/geometry3d/Transform.js +32 -13
  184. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  185. package/lib/cjs/geometry4d/Point4d.d.ts +8 -5
  186. package/lib/cjs/geometry4d/Point4d.d.ts.map +1 -1
  187. package/lib/cjs/geometry4d/Point4d.js +27 -16
  188. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  189. package/lib/cjs/numerics/BezierPolynomials.d.ts +2 -0
  190. package/lib/cjs/numerics/BezierPolynomials.d.ts.map +1 -1
  191. package/lib/cjs/numerics/BezierPolynomials.js +11 -0
  192. package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
  193. package/lib/cjs/numerics/SmallSystem.d.ts +77 -36
  194. package/lib/cjs/numerics/SmallSystem.d.ts.map +1 -1
  195. package/lib/cjs/numerics/SmallSystem.js +129 -73
  196. package/lib/cjs/numerics/SmallSystem.js.map +1 -1
  197. package/lib/cjs/polyface/FacetOrientation.d.ts +1 -1
  198. package/lib/cjs/polyface/FacetOrientation.js +1 -1
  199. package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
  200. package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts +55 -40
  201. package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
  202. package/lib/cjs/polyface/IndexedEdgeMatcher.js +83 -75
  203. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  204. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
  205. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  206. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +47 -38
  207. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  208. package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts +26 -19
  209. package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
  210. package/lib/cjs/polyface/IndexedPolyfaceWalker.js +51 -32
  211. package/lib/cjs/polyface/IndexedPolyfaceWalker.js.map +1 -1
  212. package/lib/cjs/polyface/Polyface.d.ts +19 -5
  213. package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
  214. package/lib/cjs/polyface/Polyface.js +18 -2
  215. package/lib/cjs/polyface/Polyface.js.map +1 -1
  216. package/lib/cjs/polyface/PolyfaceBuilder.d.ts +1 -1
  217. package/lib/cjs/polyface/PolyfaceBuilder.js +6 -6
  218. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  219. package/lib/cjs/polyface/PolyfaceClip.d.ts +19 -18
  220. package/lib/cjs/polyface/PolyfaceClip.d.ts.map +1 -1
  221. package/lib/cjs/polyface/PolyfaceClip.js +39 -42
  222. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  223. package/lib/cjs/polyface/PolyfaceData.d.ts +1 -1
  224. package/lib/cjs/polyface/PolyfaceData.js +1 -1
  225. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  226. package/lib/cjs/polyface/PolyfaceQuery.d.ts +119 -78
  227. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  228. package/lib/cjs/polyface/PolyfaceQuery.js +315 -231
  229. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  230. package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
  231. package/lib/cjs/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
  232. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js +3 -3
  233. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  234. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
  235. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
  236. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
  237. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  238. package/lib/cjs/serialization/BGFBReader.d.ts.map +1 -1
  239. package/lib/cjs/serialization/BGFBReader.js +2 -3
  240. package/lib/cjs/serialization/BGFBReader.js.map +1 -1
  241. package/lib/cjs/serialization/BGFBWriter.d.ts.map +1 -1
  242. package/lib/cjs/serialization/BGFBWriter.js +2 -4
  243. package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
  244. package/lib/cjs/serialization/GeometrySamples.d.ts +1 -1
  245. package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
  246. package/lib/cjs/serialization/GeometrySamples.js +3 -3
  247. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  248. package/lib/cjs/serialization/IModelJsonSchema.d.ts +3 -3
  249. package/lib/cjs/serialization/IModelJsonSchema.d.ts.map +1 -1
  250. package/lib/cjs/serialization/IModelJsonSchema.js +5 -5
  251. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  252. package/lib/cjs/solid/Box.d.ts.map +1 -1
  253. package/lib/cjs/solid/Box.js +7 -0
  254. package/lib/cjs/solid/Box.js.map +1 -1
  255. package/lib/cjs/solid/Cone.d.ts.map +1 -1
  256. package/lib/cjs/solid/Cone.js +6 -0
  257. package/lib/cjs/solid/Cone.js.map +1 -1
  258. package/lib/cjs/solid/LinearSweep.d.ts +2 -3
  259. package/lib/cjs/solid/LinearSweep.d.ts.map +1 -1
  260. package/lib/cjs/solid/LinearSweep.js +11 -7
  261. package/lib/cjs/solid/LinearSweep.js.map +1 -1
  262. package/lib/cjs/solid/RotationalSweep.d.ts +2 -2
  263. package/lib/cjs/solid/RotationalSweep.js +2 -2
  264. package/lib/cjs/solid/RotationalSweep.js.map +1 -1
  265. package/lib/cjs/solid/RuledSweep.d.ts +1 -1
  266. package/lib/cjs/solid/RuledSweep.d.ts.map +1 -1
  267. package/lib/cjs/solid/RuledSweep.js +5 -1
  268. package/lib/cjs/solid/RuledSweep.js.map +1 -1
  269. package/lib/cjs/solid/Sphere.d.ts.map +1 -1
  270. package/lib/cjs/solid/Sphere.js +6 -3
  271. package/lib/cjs/solid/Sphere.js.map +1 -1
  272. package/lib/cjs/solid/SweepContour.d.ts +1 -1
  273. package/lib/cjs/solid/SweepContour.js +1 -1
  274. package/lib/cjs/solid/SweepContour.js.map +1 -1
  275. package/lib/cjs/solid/TorusPipe.d.ts.map +1 -1
  276. package/lib/cjs/solid/TorusPipe.js +4 -0
  277. package/lib/cjs/solid/TorusPipe.js.map +1 -1
  278. package/lib/cjs/topology/ChainMerge.d.ts +1 -1
  279. package/lib/cjs/topology/ChainMerge.js +1 -1
  280. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  281. package/lib/cjs/topology/Graph.d.ts +64 -14
  282. package/lib/cjs/topology/Graph.d.ts.map +1 -1
  283. package/lib/cjs/topology/Graph.js +149 -32
  284. package/lib/cjs/topology/Graph.js.map +1 -1
  285. package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts +3 -2
  286. package/lib/cjs/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
  287. package/lib/cjs/topology/HalfEdgeGraphSearch.js +3 -2
  288. package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
  289. package/lib/cjs/topology/Merging.d.ts +0 -1
  290. package/lib/cjs/topology/Merging.d.ts.map +1 -1
  291. package/lib/cjs/topology/Merging.js +49 -46
  292. package/lib/cjs/topology/Merging.js.map +1 -1
  293. package/lib/cjs/topology/RegularizeFace.d.ts.map +1 -1
  294. package/lib/cjs/topology/RegularizeFace.js +2 -1
  295. package/lib/cjs/topology/RegularizeFace.js.map +1 -1
  296. package/lib/cjs/topology/Triangulation.d.ts +9 -14
  297. package/lib/cjs/topology/Triangulation.d.ts.map +1 -1
  298. package/lib/cjs/topology/Triangulation.js +29 -22
  299. package/lib/cjs/topology/Triangulation.js.map +1 -1
  300. package/lib/esm/Geometry.d.ts +18 -10
  301. package/lib/esm/Geometry.d.ts.map +1 -1
  302. package/lib/esm/Geometry.js +13 -3
  303. package/lib/esm/Geometry.js.map +1 -1
  304. package/lib/esm/bspline/BSpline1dNd.d.ts +1 -1
  305. package/lib/esm/bspline/BSpline1dNd.js +1 -1
  306. package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
  307. package/lib/esm/bspline/BSplineCurve.d.ts.map +1 -1
  308. package/lib/esm/bspline/BSplineCurve.js +7 -1
  309. package/lib/esm/bspline/BSplineCurve.js.map +1 -1
  310. package/lib/esm/bspline/BSplineSurface.d.ts +4 -3
  311. package/lib/esm/bspline/BSplineSurface.d.ts.map +1 -1
  312. package/lib/esm/bspline/BSplineSurface.js +4 -5
  313. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  314. package/lib/esm/clipping/ClipPlane.d.ts +7 -5
  315. package/lib/esm/clipping/ClipPlane.d.ts.map +1 -1
  316. package/lib/esm/clipping/ClipPlane.js +9 -5
  317. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  318. package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
  319. package/lib/esm/clipping/ClipUtils.js +5 -3
  320. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  321. package/lib/esm/clipping/ConvexClipPlaneSet.d.ts +1 -2
  322. package/lib/esm/clipping/ConvexClipPlaneSet.d.ts.map +1 -1
  323. package/lib/esm/clipping/ConvexClipPlaneSet.js +13 -25
  324. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  325. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts +1 -2
  326. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.d.ts.map +1 -1
  327. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js +1 -2
  328. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  329. package/lib/esm/core-geometry.d.ts +2 -0
  330. package/lib/esm/core-geometry.d.ts.map +1 -1
  331. package/lib/esm/core-geometry.js +2 -0
  332. package/lib/esm/core-geometry.js.map +1 -1
  333. package/lib/esm/curve/Arc3d.d.ts +54 -32
  334. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  335. package/lib/esm/curve/Arc3d.js +56 -37
  336. package/lib/esm/curve/Arc3d.js.map +1 -1
  337. package/lib/esm/curve/CurveCollection.d.ts +40 -1
  338. package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
  339. package/lib/esm/curve/CurveCollection.js +90 -0
  340. package/lib/esm/curve/CurveCollection.js.map +1 -1
  341. package/lib/esm/curve/CurveFactory.d.ts +3 -2
  342. package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
  343. package/lib/esm/curve/CurveFactory.js +6 -5
  344. package/lib/esm/curve/CurveFactory.js.map +1 -1
  345. package/lib/esm/curve/CurveLocationDetail.d.ts +27 -25
  346. package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
  347. package/lib/esm/curve/CurveLocationDetail.js +30 -25
  348. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  349. package/lib/esm/curve/CurvePrimitive.d.ts +9 -2
  350. package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
  351. package/lib/esm/curve/CurvePrimitive.js +11 -0
  352. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  353. package/lib/esm/curve/CurveTypes.d.ts +1 -1
  354. package/lib/esm/curve/CurveTypes.js.map +1 -1
  355. package/lib/esm/curve/LineSegment3d.d.ts +2 -0
  356. package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
  357. package/lib/esm/curve/LineSegment3d.js +4 -0
  358. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  359. package/lib/esm/curve/LineString3d.d.ts +7 -0
  360. package/lib/esm/curve/LineString3d.d.ts.map +1 -1
  361. package/lib/esm/curve/LineString3d.js +15 -3
  362. package/lib/esm/curve/LineString3d.js.map +1 -1
  363. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.d.ts.map +1 -1
  364. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js +37 -8
  365. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  366. package/lib/esm/curve/Query/PlanarSubdivision.d.ts +34 -8
  367. package/lib/esm/curve/Query/PlanarSubdivision.d.ts.map +1 -1
  368. package/lib/esm/curve/Query/PlanarSubdivision.js +131 -35
  369. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  370. package/lib/esm/curve/Query/StrokeCountChain.d.ts +4 -3
  371. package/lib/esm/curve/Query/StrokeCountChain.d.ts.map +1 -1
  372. package/lib/esm/curve/Query/StrokeCountChain.js +20 -9
  373. package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
  374. package/lib/esm/curve/RegionMomentsXY.d.ts +2 -1
  375. package/lib/esm/curve/RegionMomentsXY.d.ts.map +1 -1
  376. package/lib/esm/curve/RegionMomentsXY.js +26 -41
  377. package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
  378. package/lib/esm/curve/RegionOps.d.ts +74 -39
  379. package/lib/esm/curve/RegionOps.d.ts.map +1 -1
  380. package/lib/esm/curve/RegionOps.js +146 -46
  381. package/lib/esm/curve/RegionOps.js.map +1 -1
  382. package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts +36 -27
  383. package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
  384. package/lib/esm/curve/RegionOpsClassificationSweeps.js +161 -56
  385. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  386. package/lib/esm/curve/StrokeOptions.d.ts +1 -1
  387. package/lib/esm/curve/StrokeOptions.js +1 -1
  388. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  389. package/lib/esm/curve/internalContexts/AnnounceTangentStrokeHandler.js.map +1 -1
  390. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +2 -2
  391. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +6 -6
  392. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  393. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts +0 -1
  394. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  395. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +58 -32
  396. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  397. package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
  398. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +0 -1
  399. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  400. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts +14 -0
  401. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.d.ts.map +1 -0
  402. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js +30 -0
  403. package/lib/esm/curve/internalContexts/TransferWithSplitArcs.js.map +1 -0
  404. package/lib/esm/geometry3d/AngleSweep.d.ts +25 -18
  405. package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
  406. package/lib/esm/geometry3d/AngleSweep.js +32 -18
  407. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  408. package/lib/esm/geometry3d/CoincidentGeometryOps.d.ts +8 -7
  409. package/lib/esm/geometry3d/CoincidentGeometryOps.d.ts.map +1 -1
  410. package/lib/esm/geometry3d/CoincidentGeometryOps.js +19 -25
  411. package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
  412. package/lib/esm/geometry3d/Ellipsoid.js +1 -1
  413. package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
  414. package/lib/esm/geometry3d/GrowableXYArray.d.ts +1 -1
  415. package/lib/esm/geometry3d/GrowableXYArray.js +1 -1
  416. package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
  417. package/lib/esm/geometry3d/GrowableXYZArray.d.ts +8 -3
  418. package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  419. package/lib/esm/geometry3d/GrowableXYZArray.js +21 -3
  420. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  421. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +11 -1
  422. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  423. package/lib/esm/geometry3d/IndexedXYZCollection.js +21 -3
  424. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  425. package/lib/esm/geometry3d/Plane3d.d.ts +2 -0
  426. package/lib/esm/geometry3d/Plane3d.d.ts.map +1 -1
  427. package/lib/esm/geometry3d/Plane3d.js +6 -1
  428. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  429. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts +2 -0
  430. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.d.ts.map +1 -1
  431. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js +6 -1
  432. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  433. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts +8 -2
  434. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.d.ts.map +1 -1
  435. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js +18 -10
  436. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  437. package/lib/esm/geometry3d/Point2dVector2d.d.ts.map +1 -1
  438. package/lib/esm/geometry3d/Point2dVector2d.js +0 -2
  439. package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
  440. package/lib/esm/geometry3d/Point3dVector3d.d.ts +4 -4
  441. package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
  442. package/lib/esm/geometry3d/Point3dVector3d.js +4 -5
  443. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  444. package/lib/esm/geometry3d/PointHelpers.d.ts +7 -7
  445. package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
  446. package/lib/esm/geometry3d/PointHelpers.js +66 -26
  447. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  448. package/lib/esm/geometry3d/PolygonOps.d.ts +49 -2
  449. package/lib/esm/geometry3d/PolygonOps.d.ts.map +1 -1
  450. package/lib/esm/geometry3d/PolygonOps.js +38 -2
  451. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  452. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts +13 -6
  453. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.d.ts.map +1 -1
  454. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +16 -9
  455. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  456. package/lib/esm/geometry3d/PolylineOps.d.ts +5 -4
  457. package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
  458. package/lib/esm/geometry3d/PolylineOps.js +5 -4
  459. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  460. package/lib/esm/geometry3d/Range.d.ts +18 -10
  461. package/lib/esm/geometry3d/Range.d.ts.map +1 -1
  462. package/lib/esm/geometry3d/Range.js +32 -10
  463. package/lib/esm/geometry3d/Range.js.map +1 -1
  464. package/lib/esm/geometry3d/Ray2d.d.ts.map +1 -1
  465. package/lib/esm/geometry3d/Ray2d.js +0 -1
  466. package/lib/esm/geometry3d/Ray2d.js.map +1 -1
  467. package/lib/esm/geometry3d/Ray3d.d.ts +7 -9
  468. package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
  469. package/lib/esm/geometry3d/Ray3d.js +23 -45
  470. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  471. package/lib/esm/geometry3d/ReusableObjectCache.d.ts +39 -29
  472. package/lib/esm/geometry3d/ReusableObjectCache.d.ts.map +1 -1
  473. package/lib/esm/geometry3d/ReusableObjectCache.js +47 -33
  474. package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
  475. package/lib/esm/geometry3d/SortablePolygon.d.ts +1 -4
  476. package/lib/esm/geometry3d/SortablePolygon.d.ts.map +1 -1
  477. package/lib/esm/geometry3d/SortablePolygon.js +48 -43
  478. package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
  479. package/lib/esm/geometry3d/Transform.d.ts +21 -2
  480. package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
  481. package/lib/esm/geometry3d/Transform.js +32 -13
  482. package/lib/esm/geometry3d/Transform.js.map +1 -1
  483. package/lib/esm/geometry4d/Point4d.d.ts +8 -5
  484. package/lib/esm/geometry4d/Point4d.d.ts.map +1 -1
  485. package/lib/esm/geometry4d/Point4d.js +27 -16
  486. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  487. package/lib/esm/numerics/BezierPolynomials.d.ts +2 -0
  488. package/lib/esm/numerics/BezierPolynomials.d.ts.map +1 -1
  489. package/lib/esm/numerics/BezierPolynomials.js +11 -0
  490. package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
  491. package/lib/esm/numerics/SmallSystem.d.ts +77 -36
  492. package/lib/esm/numerics/SmallSystem.d.ts.map +1 -1
  493. package/lib/esm/numerics/SmallSystem.js +129 -73
  494. package/lib/esm/numerics/SmallSystem.js.map +1 -1
  495. package/lib/esm/polyface/FacetOrientation.d.ts +1 -1
  496. package/lib/esm/polyface/FacetOrientation.js +1 -1
  497. package/lib/esm/polyface/FacetOrientation.js.map +1 -1
  498. package/lib/esm/polyface/IndexedEdgeMatcher.d.ts +55 -40
  499. package/lib/esm/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
  500. package/lib/esm/polyface/IndexedEdgeMatcher.js +83 -75
  501. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  502. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +15 -14
  503. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  504. package/lib/esm/polyface/IndexedPolyfaceVisitor.js +47 -38
  505. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  506. package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts +26 -19
  507. package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts.map +1 -1
  508. package/lib/esm/polyface/IndexedPolyfaceWalker.js +51 -32
  509. package/lib/esm/polyface/IndexedPolyfaceWalker.js.map +1 -1
  510. package/lib/esm/polyface/Polyface.d.ts +19 -5
  511. package/lib/esm/polyface/Polyface.d.ts.map +1 -1
  512. package/lib/esm/polyface/Polyface.js +18 -2
  513. package/lib/esm/polyface/Polyface.js.map +1 -1
  514. package/lib/esm/polyface/PolyfaceBuilder.d.ts +1 -1
  515. package/lib/esm/polyface/PolyfaceBuilder.js +6 -6
  516. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  517. package/lib/esm/polyface/PolyfaceClip.d.ts +19 -18
  518. package/lib/esm/polyface/PolyfaceClip.d.ts.map +1 -1
  519. package/lib/esm/polyface/PolyfaceClip.js +39 -42
  520. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  521. package/lib/esm/polyface/PolyfaceData.d.ts +1 -1
  522. package/lib/esm/polyface/PolyfaceData.js +1 -1
  523. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  524. package/lib/esm/polyface/PolyfaceQuery.d.ts +119 -78
  525. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  526. package/lib/esm/polyface/PolyfaceQuery.js +316 -232
  527. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  528. package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts +3 -3
  529. package/lib/esm/polyface/RangeTree/RangeTreeNode.d.ts.map +1 -1
  530. package/lib/esm/polyface/RangeTree/RangeTreeNode.js +3 -3
  531. package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  532. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts +7 -6
  533. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.d.ts.map +1 -1
  534. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js +8 -9
  535. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  536. package/lib/esm/serialization/BGFBReader.d.ts.map +1 -1
  537. package/lib/esm/serialization/BGFBReader.js +2 -3
  538. package/lib/esm/serialization/BGFBReader.js.map +1 -1
  539. package/lib/esm/serialization/BGFBWriter.d.ts.map +1 -1
  540. package/lib/esm/serialization/BGFBWriter.js +2 -4
  541. package/lib/esm/serialization/BGFBWriter.js.map +1 -1
  542. package/lib/esm/serialization/GeometrySamples.d.ts +1 -1
  543. package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
  544. package/lib/esm/serialization/GeometrySamples.js +3 -3
  545. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  546. package/lib/esm/serialization/IModelJsonSchema.d.ts +3 -3
  547. package/lib/esm/serialization/IModelJsonSchema.d.ts.map +1 -1
  548. package/lib/esm/serialization/IModelJsonSchema.js +5 -5
  549. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  550. package/lib/esm/solid/Box.d.ts.map +1 -1
  551. package/lib/esm/solid/Box.js +7 -0
  552. package/lib/esm/solid/Box.js.map +1 -1
  553. package/lib/esm/solid/Cone.d.ts.map +1 -1
  554. package/lib/esm/solid/Cone.js +6 -0
  555. package/lib/esm/solid/Cone.js.map +1 -1
  556. package/lib/esm/solid/LinearSweep.d.ts +2 -3
  557. package/lib/esm/solid/LinearSweep.d.ts.map +1 -1
  558. package/lib/esm/solid/LinearSweep.js +11 -7
  559. package/lib/esm/solid/LinearSweep.js.map +1 -1
  560. package/lib/esm/solid/RotationalSweep.d.ts +2 -2
  561. package/lib/esm/solid/RotationalSweep.js +2 -2
  562. package/lib/esm/solid/RotationalSweep.js.map +1 -1
  563. package/lib/esm/solid/RuledSweep.d.ts +1 -1
  564. package/lib/esm/solid/RuledSweep.d.ts.map +1 -1
  565. package/lib/esm/solid/RuledSweep.js +5 -1
  566. package/lib/esm/solid/RuledSweep.js.map +1 -1
  567. package/lib/esm/solid/Sphere.d.ts.map +1 -1
  568. package/lib/esm/solid/Sphere.js +6 -3
  569. package/lib/esm/solid/Sphere.js.map +1 -1
  570. package/lib/esm/solid/SweepContour.d.ts +1 -1
  571. package/lib/esm/solid/SweepContour.js +1 -1
  572. package/lib/esm/solid/SweepContour.js.map +1 -1
  573. package/lib/esm/solid/TorusPipe.d.ts.map +1 -1
  574. package/lib/esm/solid/TorusPipe.js +4 -0
  575. package/lib/esm/solid/TorusPipe.js.map +1 -1
  576. package/lib/esm/topology/ChainMerge.d.ts +1 -1
  577. package/lib/esm/topology/ChainMerge.js +1 -1
  578. package/lib/esm/topology/ChainMerge.js.map +1 -1
  579. package/lib/esm/topology/Graph.d.ts +64 -14
  580. package/lib/esm/topology/Graph.d.ts.map +1 -1
  581. package/lib/esm/topology/Graph.js +149 -32
  582. package/lib/esm/topology/Graph.js.map +1 -1
  583. package/lib/esm/topology/HalfEdgeGraphSearch.d.ts +3 -2
  584. package/lib/esm/topology/HalfEdgeGraphSearch.d.ts.map +1 -1
  585. package/lib/esm/topology/HalfEdgeGraphSearch.js +3 -2
  586. package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
  587. package/lib/esm/topology/Merging.d.ts +0 -1
  588. package/lib/esm/topology/Merging.d.ts.map +1 -1
  589. package/lib/esm/topology/Merging.js +49 -46
  590. package/lib/esm/topology/Merging.js.map +1 -1
  591. package/lib/esm/topology/RegularizeFace.d.ts.map +1 -1
  592. package/lib/esm/topology/RegularizeFace.js +2 -1
  593. package/lib/esm/topology/RegularizeFace.js.map +1 -1
  594. package/lib/esm/topology/Triangulation.d.ts +9 -14
  595. package/lib/esm/topology/Triangulation.d.ts.map +1 -1
  596. package/lib/esm/topology/Triangulation.js +29 -22
  597. package/lib/esm/topology/Triangulation.js.map +1 -1
  598. package/package.json +7 -6
@@ -39,7 +39,6 @@ const SpaceTriangulation_1 = require("../topology/SpaceTriangulation");
39
39
  const FacetLocationDetail_1 = require("./FacetLocationDetail");
40
40
  const FacetOrientation_1 = require("./FacetOrientation");
41
41
  const IndexedEdgeMatcher_1 = require("./IndexedEdgeMatcher");
42
- const IndexedPolyfaceVisitor_1 = require("./IndexedPolyfaceVisitor");
43
42
  const BuildAverageNormalsContext_1 = require("./multiclip/BuildAverageNormalsContext");
44
43
  const OffsetMeshContext_1 = require("./multiclip/OffsetMeshContext");
45
44
  const SweepLineStringToFacetContext_1 = require("./multiclip/SweepLineStringToFacetContext");
@@ -72,14 +71,27 @@ class SweepLineStringToFacetsOptions {
72
71
  sideAngle;
73
72
  /** Option to assemble lines into chains. */
74
73
  assembleChains;
74
+ /**
75
+ * Optional searcher object for vertical sweep speedup. If provided, `vectorToEye` must be the positive Z vector.
76
+ * @example To construct a 5x5 indexed search grid:
77
+ * ````
78
+ * const xyRange = Range2d.createFrom(myPolyface.range());
79
+ * const searcher = GriddedRaggedRange2dSetWithOverflow.create<number>(xyRange, 5, 5)!;
80
+ * for (const visitor = myPolyface.createVisitor(0); visitor.moveToNextFacet();) {
81
+ * searcher.addRange(visitor.point.getRange(), visitor.currentReadIndex());
82
+ * }
83
+ * ````
84
+ */
85
+ searcher;
75
86
  /** Constructor. Captures fully-checked parameters from static create method. */
76
- constructor(vectorToEye, sideAngle, assembleChains, collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets) {
87
+ constructor(vectorToEye, sideAngle, assembleChains, collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets, searcher) {
77
88
  this.vectorToEye = vectorToEye;
78
89
  this.sideAngle = sideAngle;
79
90
  this.assembleChains = assembleChains;
80
91
  this.collectOnForwardFacets = collectOnForwardFacets;
81
92
  this.collectOnSideFacets = collectOnSideFacets;
82
93
  this.collectOnRearFacets = collectOnRearFacets;
94
+ this.searcher = searcher;
83
95
  }
84
96
  /**
85
97
  * Create an options structure.
@@ -88,14 +100,12 @@ class SweepLineStringToFacetsOptions {
88
100
  * * Default `assembleChains` is `true`.
89
101
  * * Default `collectOnForwardFacets`, `collectOnSideFacets`, `collectOnRearFacets` are all `true`.
90
102
  */
91
- static create(vectorToEye, sideAngle, assembleChains, collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets) {
92
- return new SweepLineStringToFacetsOptions(vectorToEye === undefined ? Point3dVector3d_1.Vector3d.unitZ() : vectorToEye.clone(), sideAngle === undefined ? Angle_1.Angle.createRadians(Geometry_1.Geometry.smallAngleRadians) : sideAngle.clone(), Geometry_1.Geometry.resolveValue(assembleChains, true), Geometry_1.Geometry.resolveValue(collectOnForwardFacets, true), Geometry_1.Geometry.resolveValue(collectOnSideFacets, true), Geometry_1.Geometry.resolveValue(collectOnRearFacets, true));
103
+ static create(vectorToEye, sideAngle, assembleChains, collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets, searcher) {
104
+ return new SweepLineStringToFacetsOptions((!vectorToEye || searcher) ? Point3dVector3d_1.Vector3d.unitZ() : vectorToEye.clone(), sideAngle?.clone() ?? Angle_1.Angle.createRadians(Geometry_1.Geometry.smallAngleRadians), assembleChains ?? true, collectOnForwardFacets ?? true, collectOnSideFacets ?? true, collectOnRearFacets ?? true, searcher);
93
105
  }
94
106
  /** Return `true` if all outputs are requested. */
95
107
  get collectAll() {
96
- return this.collectOnForwardFacets === true &&
97
- this.collectOnSideFacets === true &&
98
- this.collectOnRearFacets === true;
108
+ return this.collectOnForwardFacets && this.collectOnSideFacets && this.collectOnRearFacets;
99
109
  }
100
110
  /**
101
111
  * Decide if the instance collector flags accept a facet with the given normal.
@@ -208,21 +218,21 @@ class PolyfaceQuery {
208
218
  * @param source polyface or visitor.
209
219
  * @param vectorToEye compute sum of (signed) facet areas projected to a view plane perpendicular to `vectorToEye`.
210
220
  * If `vectorToEye` is not provided, actual facet areas are calculated (without any projection).
211
- * @returns the sum of all facet areas. Return 0 if `source` is `undefined`.
221
+ * @returns the sum of all facet areas.
212
222
  */
213
223
  static sumFacetAreas(source, vectorToEye) {
214
224
  let sum = 0;
215
- if (source !== undefined) {
216
- if (source instanceof Polyface_1.Polyface)
217
- return PolyfaceQuery.sumFacetAreas(source.createVisitor(1), vectorToEye);
218
- let unitVectorToEye;
219
- if (vectorToEye !== undefined)
220
- unitVectorToEye = vectorToEye.normalize();
221
- source.reset();
222
- while (source.moveToNextFacet()) {
223
- const areaNormal = PolygonOps_1.PolygonOps.areaNormal(source.point.getPoint3dArray());
224
- sum += unitVectorToEye ? areaNormal.dotProduct(unitVectorToEye) : areaNormal.magnitude();
225
- }
225
+ if (source instanceof Polyface_1.Polyface)
226
+ source = source.createVisitor(1);
227
+ else
228
+ source.setNumWrap(1);
229
+ let unitVectorToEye;
230
+ if (vectorToEye !== undefined)
231
+ unitVectorToEye = vectorToEye.normalize();
232
+ source.reset();
233
+ while (source.moveToNextFacet()) {
234
+ const areaNormal = PolygonOps_1.PolygonOps.areaNormal(source.point.getPoint3dArray());
235
+ sum += unitVectorToEye ? areaNormal.dotProduct(unitVectorToEye) : areaNormal.magnitude();
226
236
  }
227
237
  return sum;
228
238
  }
@@ -256,68 +266,46 @@ class PolyfaceQuery {
256
266
  }
257
267
  /**
258
268
  * Sum (signed) volumes between facets and a plane.
259
- * Return a structure with multiple sums:
260
- * * volume = the sum of (signed) volumes between facets and the plane.
261
- * * positiveProjectedFacetAreaMoments, negativeProjectedFacetAreaMoments = moment data with centroid, area, and second
262
- * moments with respect to the centroid.
269
+ * @param source facet set
270
+ * @param plane infinite plane bounding volume between the input facets and (virtual) side facets perpendicular to the plane.
271
+ * @param skipMoments whether to skip computation of the area moments. Set to `true` if only volume is needed. Default is `false`.
272
+ * @returns a structure with multiple sums:
273
+ * * volume: the sum of (signed) volumes between facets and the plane.
274
+ * * positiveProjectedFacetAreaMoments, negativeProjectedFacetAreaMoments: area moment data (centroid, signed area,
275
+ * and second moments with respect to the centroid), separately computed for the input facets that project with
276
+ * positive/negative area onto the plane.
263
277
  */
264
- static sumVolumeBetweenFacetsAndPlane(source, plane) {
265
- if (source instanceof Polyface_1.Polyface)
266
- return PolyfaceQuery.sumVolumeBetweenFacetsAndPlane(source.createVisitor(0), plane);
267
- const facetOrigin = Point3dVector3d_1.Point3d.create();
268
- const targetA = Point3dVector3d_1.Point3d.create();
269
- const targetB = Point3dVector3d_1.Point3d.create();
270
- const triangleNormal = Point3dVector3d_1.Vector3d.create();
271
- const planeNormal = plane.getNormalRef();
272
- let h0, hA, hB;
273
- let signedVolumeSum = 0.0;
274
- let signedTriangleArea;
275
- let singleFacetArea;
276
- const positiveAreaMomentSums = MomentData_1.MomentData.create(undefined, true);
277
- const negativeAreaMomentSums = MomentData_1.MomentData.create(undefined, true);
278
- const singleFacetProducts = Matrix4d_1.Matrix4d.createZero();
279
- const projectToPlane = plane.getProjectionToPlane();
280
- source.reset();
278
+ static sumVolumeBetweenFacetsAndPlane(source, plane, skipMoments) {
279
+ const visitor = source instanceof Polyface_1.Polyface ? source.createVisitor(0) : source;
280
+ visitor.setNumWrap(0);
281
+ const workPoint0 = Point3dVector3d_1.Point3d.create();
282
+ const workPoint1 = Point3dVector3d_1.Point3d.create();
283
+ const workVector = Point3dVector3d_1.Vector3d.create();
284
+ const workMatrix = Matrix4d_1.Matrix4d.createZero();
285
+ let signedVolumeTimes6 = 0.0;
286
+ const posSums = skipMoments ? undefined : MomentData_1.MomentData.create(undefined, true);
287
+ const negSums = skipMoments ? undefined : MomentData_1.MomentData.create(undefined, true);
281
288
  // For each facet:
282
289
  // - form triangles from facet origin to each far edge.
283
- // - sum signed area and volume contributions.
284
- // each projected area contribution is twice the area of a triangle.
285
- // each volume contribution is 3 times the actual volume -- (1/3) of the altitude sums was the centroid altitude.
286
- while (source.moveToNextFacet()) {
287
- source.point.getPoint3dAtUncheckedPointIndex(0, facetOrigin);
288
- h0 = plane.altitude(facetOrigin);
289
- singleFacetArea = 0;
290
- // within a single facets, the singleFacetArea sum is accumulated with signs of individual triangles.
291
- // for a non-convex facet, this can be a mixture of positive and negative areas.
292
- // the absoluteProjectedAreaSum contribution is forced positive after the sum for the facet.
293
- for (let i = 1; i + 1 < source.point.length; i++) {
294
- source.point.getPoint3dAtUncheckedPointIndex(i, targetA);
295
- source.point.getPoint3dAtUncheckedPointIndex(i + 1, targetB);
296
- facetOrigin.crossProductToPoints(targetA, targetB, triangleNormal);
297
- hA = plane.altitude(targetA);
298
- hB = plane.altitude(targetB);
299
- signedTriangleArea = planeNormal.dotProduct(triangleNormal);
300
- singleFacetArea += signedTriangleArea;
301
- signedVolumeSum += signedTriangleArea * (h0 + hA + hB);
302
- }
303
- singleFacetProducts.setZero();
304
- source.point.multiplyTransformInPlace(projectToPlane);
305
- PolygonOps_1.PolygonOps.addSecondMomentAreaProducts(source.point, facetOrigin, singleFacetProducts);
306
- if (singleFacetArea > 0) {
307
- positiveAreaMomentSums.accumulateProductsFromOrigin(facetOrigin, singleFacetProducts, 1.0);
308
- }
309
- else {
310
- negativeAreaMomentSums.accumulateProductsFromOrigin(facetOrigin, singleFacetProducts, 1.0);
290
+ // - sum signed area and volume contributions (for non-convex facet, signs can be mixed).
291
+ // - each projected area contribution is twice the area of a triangle.
292
+ // - each volume contribution is 3 times the actual volume -- a third of the altitude sum is the centroid altitude.
293
+ const options = { skipMoments, p0: workPoint0, p1: workPoint1, v0: workVector, m0: workMatrix };
294
+ for (visitor.reset(); visitor.moveToNextFacet();) {
295
+ const facetData = PolygonOps_1.PolygonOps.volumeBetweenPolygonAndPlane(visitor.point, plane, options);
296
+ signedVolumeTimes6 += facetData.volume6;
297
+ if (!skipMoments) {
298
+ (0, core_bentley_1.assert)(posSums !== undefined && negSums !== undefined && facetData.origin !== undefined && facetData.products !== undefined);
299
+ if (facetData.area2 > 0)
300
+ posSums.accumulateProductsFromOrigin(facetData.origin, facetData.products, 1.0);
301
+ else
302
+ negSums.accumulateProductsFromOrigin(facetData.origin, facetData.products, 1.0);
311
303
  }
312
304
  }
313
- positiveAreaMomentSums.shiftOriginAndSumsToCentroidOfSums();
314
- negativeAreaMomentSums.shiftOriginAndSumsToCentroidOfSums();
315
- const positiveAreaMoments = MomentData_1.MomentData.inertiaProductsToPrincipalAxes(positiveAreaMomentSums.origin, positiveAreaMomentSums.sums);
316
- const negativeAreaMoments = MomentData_1.MomentData.inertiaProductsToPrincipalAxes(negativeAreaMomentSums.origin, negativeAreaMomentSums.sums);
317
305
  return {
318
- volume: signedVolumeSum / 6.0,
319
- positiveProjectedFacetAreaMoments: positiveAreaMoments,
320
- negativeProjectedFacetAreaMoments: negativeAreaMoments,
306
+ volume: signedVolumeTimes6 / 6.0,
307
+ positiveProjectedFacetAreaMoments: posSums ? MomentData_1.MomentData.inertiaProductsToPrincipalAxes(posSums.origin, posSums.sums) : undefined,
308
+ negativeProjectedFacetAreaMoments: negSums ? MomentData_1.MomentData.inertiaProductsToPrincipalAxes(negSums.origin, negSums.sums) : undefined,
321
309
  };
322
310
  }
323
311
  /** Return the inertia products [xx,xy,xz,xw,yw, etc] integrated over all all facets as viewed from origin. */
@@ -392,7 +380,7 @@ class PolyfaceQuery {
392
380
  * Compute a number summarizing the dihedral angles in the mesh.
393
381
  * * A dihedral angle is the signed angle between adjacent facets' normals. This angle is positive when the cross
394
382
  * product `normalA x normalB` has the same direction as facetA's traversal of the facets' shared edge.
395
- * @param source mesh.
383
+ * @param source facets.
396
384
  * @param ignoreBoundaries if `true` ignore simple boundary edges, i.e., allow unclosed meshes. Default is `false`.
397
385
  * See [[isConvexByDihedralAngleCount]] for comments about passing true when there are multiple
398
386
  * connected components.
@@ -408,19 +396,21 @@ class PolyfaceQuery {
408
396
  static dihedralAngleSummary(source, ignoreBoundaries = false) {
409
397
  // more info can be found at geometry/internaldocs/Polyface.md
410
398
  const edges = new IndexedEdgeMatcher_1.IndexedEdgeMatcher();
411
- const visitor = source.createVisitor(1);
412
- visitor.reset();
413
- // find centroid normals of all facets
399
+ const vertices = source instanceof Polyface_1.Polyface ? source.data.point : undefined;
400
+ const visitor = source instanceof Polyface_1.Polyface ? source.createVisitor(1) : source;
401
+ visitor.setNumWrap(1);
414
402
  const centroidNormal = [];
415
403
  let normalCounter = 0;
416
- while (visitor.moveToNextFacet()) {
404
+ for (visitor.reset(); visitor.moveToNextFacet();) {
417
405
  const numEdges = visitor.pointCount - 1;
418
406
  const normal = PolygonOps_1.PolygonOps.centroidAreaNormal(visitor.point);
419
407
  if (normal === undefined)
420
408
  return -2;
421
409
  centroidNormal.push(normal);
422
410
  for (let i = 0; i < numEdges; i++) {
423
- edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), normalCounter);
411
+ const edge = edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), normalCounter);
412
+ if (!vertices) // decorate if we don't have vertices to query later
413
+ edge.edgeVector = Point3dVector3d_1.Vector3d.createStartEnd(visitor.point.getPoint3dAtUncheckedPointIndex(i), visitor.point.getPoint3dAtUncheckedPointIndex(i + 1));
424
414
  }
425
415
  normalCounter++;
426
416
  }
@@ -438,11 +428,16 @@ class PolyfaceQuery {
438
428
  let numNegative = 0;
439
429
  const edgeVector = Point3dVector3d_1.Vector3d.create();
440
430
  for (const cluster of manifoldClusters) {
441
- const sideA = cluster[0];
442
- const sideB = cluster[1];
443
- if (sideA instanceof IndexedEdgeMatcher_1.SortableEdge && sideB instanceof IndexedEdgeMatcher_1.SortableEdge
444
- && source.data.point.vectorIndexIndex(sideA.vertexIndexA, sideA.vertexIndexB, edgeVector)) {
445
- const dihedralAngle = centroidNormal[sideA.facetIndex].direction.signedAngleTo(centroidNormal[sideB.facetIndex].direction, edgeVector);
431
+ if (Array.isArray(cluster) && cluster.length === 2) {
432
+ const sideA = cluster[0];
433
+ const sideB = cluster[1];
434
+ if (vertices)
435
+ vertices.vectorIndexIndex(sideA.startVertex, sideA.endVertex, edgeVector);
436
+ else
437
+ edgeVector.setFrom(sideA.edgeVector);
438
+ const facetNormalA = centroidNormal[sideA.facetIndex].direction;
439
+ const facetNormalB = centroidNormal[sideB.facetIndex].direction;
440
+ const dihedralAngle = facetNormalA.signedAngleTo(facetNormalB, edgeVector);
446
441
  if (dihedralAngle.isAlmostZero)
447
442
  numPlanar++;
448
443
  else if (dihedralAngle.radians > 0.0)
@@ -478,26 +473,50 @@ class PolyfaceQuery {
478
473
  static isConvexByDihedralAngleCount(source, ignoreBoundaries = false) {
479
474
  return this.dihedralAngleSummary(source, ignoreBoundaries) > 0;
480
475
  }
476
+ /** Helper function to detect a subset visitor. */
477
+ static isSubsetVisitor(visitor) {
478
+ if (visitor instanceof Polyface_1.Polyface)
479
+ return false;
480
+ const parentFacetCount = visitor.clientPolyface()?.facetCount;
481
+ const visitableFacetCount = visitor.getVisitableFacetCount?.();
482
+ if (parentFacetCount === undefined || visitableFacetCount === undefined)
483
+ return false;
484
+ return parentFacetCount > visitableFacetCount;
485
+ }
481
486
  /**
482
- * Test edges pairing in `source` mesh.
483
- * * For `allowSimpleBoundaries === false`, a return value of `true` means this is a closed 2-manifold surface.
484
- * * For `allowSimpleBoundaries === true`, a return value of `true` means this is a 2-manifold surface which may have
485
- * a boundary, but is still properly matched internally.
487
+ * Faster version of isPolyfaceManifold for specific input.
488
+ * @returns whether the mesh is manifold, or undefined if unsuccessful.
489
+ */
490
+ static isPolyfaceManifoldFast(source, allowSimpleBoundaries) {
491
+ if (allowSimpleBoundaries)
492
+ return undefined; // edgeMateIndex does not distinguish boundary edges from non-manifold edges so we can only speed things up if we search for both
493
+ if (this.isSubsetVisitor(source))
494
+ return false; // edgeMateIndex doesn't capture the facet subset boundary
495
+ const parentData = Polyface_1.IndexedPolyface.hasEdgeMateIndex(source);
496
+ if (!parentData)
497
+ return undefined;
498
+ for (const edgeMate of parentData.edgeMateIndex) {
499
+ if (edgeMate === undefined)
500
+ return false; // found a boundary or non-manifold edge
501
+ }
502
+ return true; // this is a 2-manifold closed surface
503
+ }
504
+ /**
505
+ * Test edge pairing in `source` mesh.
486
506
  * * Any edge with 3 or more adjacent facets triggers `false` return.
487
- * * Any edge with 2 adjacent facets in the same direction triggers a `false` return.
507
+ * * Any edge with 2 adjacent facets in the same direction triggers `false` return.
508
+ * * Null edges are ignored.
509
+ * @param source facet set to examine
510
+ * @param allowSimpleBoundaries if `false` (default), a return value of `true` means the facets form a closed
511
+ * 2-manifold surface; if `true`, a return value of `true` means the facets form a 2-manifold surface which may
512
+ * have a boundary, but is still properly matched internally.
488
513
  */
489
514
  static isPolyfaceManifold(source, allowSimpleBoundaries = false) {
490
- const edges = new IndexedEdgeMatcher_1.IndexedEdgeMatcher();
491
- const visitor = source.createVisitor(1);
492
- visitor.reset();
493
- while (visitor.moveToNextFacet()) {
494
- const numEdges = visitor.pointCount - 1;
495
- for (let i = 0; i < numEdges; i++) {
496
- edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), visitor.currentReadIndex());
497
- }
498
- }
515
+ const isManifold = this.isPolyfaceManifoldFast(source, allowSimpleBoundaries);
516
+ if (isManifold !== undefined)
517
+ return isManifold;
499
518
  const badClusters = [];
500
- edges.sortAndCollectClusters(undefined, allowSimpleBoundaries ? undefined : badClusters, undefined, badClusters);
519
+ this.createIndexedEdges(source).sortAndCollectClusters(undefined, allowSimpleBoundaries ? undefined : badClusters, undefined, badClusters);
501
520
  return badClusters.length === 0;
502
521
  }
503
522
  /** Test if the facets in `source` occur in perfectly mated pairs, as is required for a closed manifold volume. */
@@ -505,50 +524,107 @@ class PolyfaceQuery {
505
524
  return this.isPolyfaceManifold(source, false);
506
525
  }
507
526
  /**
508
- * Test if the facets in `source` occur in perfectly mated pairs, as is required for a closed manifold volume.
509
- * If not, extract the boundary edges as lines.
527
+ * Faster version of announceBoundaryEdges for specific input.
528
+ * @returns true if successfully announced boundary edges.
529
+ */
530
+ static announceBoundaryEdgesFast(source, announceEdge, includeTypical, includeMismatch, includeNull) {
531
+ if (includeTypical !== includeMismatch)
532
+ return false; // edgeMateIndex does not distinguish boundary edges from non-manifold edges
533
+ if (!includeTypical && !includeNull)
534
+ return true;
535
+ if (this.isSubsetVisitor(source))
536
+ return false; // edgeMateIndex doesn't capture the facet subset boundary
537
+ const parentData = Polyface_1.IndexedPolyface.hasEdgeMateIndex(source);
538
+ if (!parentData)
539
+ return false;
540
+ const pointA = Point3dVector3d_1.Point3d.create();
541
+ const pointB = Point3dVector3d_1.Point3d.create();
542
+ for (let edgeIndex = 0; edgeIndex < parentData.edgeMateIndex.length; edgeIndex++) {
543
+ const edgeMate = parentData.edgeMateIndex[edgeIndex];
544
+ const announceBoundaryOrNonManifoldEdge = includeTypical && edgeMate === undefined;
545
+ const announceNullEdge = includeNull && edgeMate === edgeIndex;
546
+ if (announceBoundaryOrNonManifoldEdge || announceNullEdge) {
547
+ const facetIndex = parentData.parent.edgeIndexToFacetIndex(edgeIndex);
548
+ if (facetIndex !== undefined) { // should always be defined
549
+ const pointIndexA = parentData.parent.data.pointIndex[edgeIndex];
550
+ let nextEdgeIndex = edgeIndex + 1;
551
+ if (nextEdgeIndex >= parentData.parent.facetIndex1(facetIndex))
552
+ nextEdgeIndex = parentData.parent.facetIndex0(facetIndex);
553
+ const pointIndexB = parentData.parent.data.pointIndex[nextEdgeIndex];
554
+ parentData.parent.data.getPoint(pointIndexA, pointA);
555
+ parentData.parent.data.getPoint(pointIndexB, pointB);
556
+ announceEdge(pointA, pointB, pointIndexA, pointIndexB, facetIndex);
557
+ }
558
+ }
559
+ }
560
+ return true;
561
+ }
562
+ /**
563
+ * Announce boundary edges of the facet set as line segments.
510
564
  * @param source polyface or visitor.
511
565
  * @param announceEdge function to be called with each boundary edge. The announcement is start and end points,
512
- * start and end indices, and facet index.
513
- * @param includeTypical true to announce typical boundary edges with a single adjacent facet.
514
- * @param includeMismatch true to announce edges with more than 2 adjacent facets.
515
- * @param includeNull true to announce edges with identical start and end vertex indices.
566
+ * start and end vertex indices, and facet index.
567
+ * @param includeTypical true to announce typical boundary edges with a single adjacent facet. Default is true.
568
+ * @param includeMismatch true to announce non-manifold edges (more than 2 adjacent facets, or mismatched
569
+ * orientations). Default is true.
570
+ * @param includeNull true to announce edges with identical start and end vertex indices. Default is true.
571
+ * @see [[announceBoundaryChainsAsLineString3d]] for boundary linestring announcement
572
+ * @see [[collectBoundaryEdges]] for boundary chain collection
573
+ * @see [[boundaryEdges]] for boundary edge collection
516
574
  */
517
575
  static announceBoundaryEdges(source, announceEdge, includeTypical = true, includeMismatch = true, includeNull = true) {
518
- if (source === undefined || (!includeTypical && !includeMismatch && !includeNull))
576
+ if (this.announceBoundaryEdgesFast(source, announceEdge, includeTypical, includeMismatch, includeNull))
519
577
  return;
520
- const edges = new IndexedEdgeMatcher_1.IndexedEdgeMatcher();
578
+ if (!includeTypical && !includeMismatch && !includeNull)
579
+ return;
580
+ const vertices = source instanceof Polyface_1.Polyface ? source.data.point : undefined;
521
581
  const visitor = source instanceof Polyface_1.Polyface ? source.createVisitor(1) : source;
522
582
  visitor.setNumWrap(1);
523
- visitor.reset();
524
- while (visitor.moveToNextFacet()) {
583
+ const edges = new IndexedEdgeMatcher_1.IndexedEdgeMatcher();
584
+ for (visitor.reset(); visitor.moveToNextFacet();) {
525
585
  const numEdges = visitor.pointCount - 1;
526
586
  for (let i = 0; i < numEdges; i++) {
527
- edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), visitor.currentReadIndex());
587
+ const edge = edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), visitor.currentReadIndex());
588
+ if (!vertices) { // decorate if we don't have vertices to query later
589
+ edge.pointA = visitor.point.getPoint3dAtUncheckedPointIndex(i);
590
+ edge.pointB = visitor.point.getPoint3dAtUncheckedPointIndex(i + 1);
591
+ }
528
592
  }
529
593
  }
530
594
  const boundaryEdges = [];
531
- edges.sortAndCollectClusters(undefined, includeTypical ? boundaryEdges : undefined, includeNull ? boundaryEdges : undefined, includeMismatch ? boundaryEdges : undefined);
595
+ const typicalEdges = includeTypical ? boundaryEdges : undefined;
596
+ const nullEdges = includeNull ? boundaryEdges : undefined;
597
+ const mismatchEdges = includeMismatch ? boundaryEdges : undefined;
598
+ edges.sortAndCollectClusters(undefined, typicalEdges, nullEdges, mismatchEdges);
532
599
  if (boundaryEdges.length === 0)
533
600
  return;
534
- const sourcePolyface = visitor.clientPolyface();
535
601
  const pointA = Point3dVector3d_1.Point3d.create();
536
602
  const pointB = Point3dVector3d_1.Point3d.create();
537
603
  for (const e of boundaryEdges) {
538
- const e1 = e instanceof IndexedEdgeMatcher_1.SortableEdge ? e : e[0];
539
- const indexA = e1.vertexIndexA;
540
- const indexB = e1.vertexIndexB;
541
- if (sourcePolyface.data.getPoint(indexA, pointA) && sourcePolyface.data.getPoint(indexB, pointB))
542
- announceEdge(pointA, pointB, indexA, indexB, e1.facetIndex);
604
+ const e1 = e instanceof IndexedEdgeMatcher_1.SortableEdge ? e : e[0]; // only report the first edge in a cluster!
605
+ const indexA = e1.startVertex;
606
+ const indexB = e1.endVertex;
607
+ if (vertices) {
608
+ vertices.getPoint3dAtUncheckedPointIndex(indexA, pointA);
609
+ vertices.getPoint3dAtUncheckedPointIndex(indexB, pointB);
610
+ }
611
+ else {
612
+ pointA.setFrom(e1.pointA);
613
+ pointB.setFrom(e1.pointB);
614
+ }
615
+ announceEdge(pointA, pointB, indexA, indexB, e1.facetIndex);
543
616
  }
544
617
  }
545
618
  /**
546
- * Construct a CurveCollection containing boundary edges.
547
- * * Each edge is a LineSegment3d.
619
+ * Collect boundary edges of the facet set as an unordered collection of line segments.
548
620
  * @param source polyface or visitor.
549
- * @param includeTypical true to in include typical boundary edges with a single adjacent facet.
550
- * @param includeMismatch true to include edges with more than 2 adjacent facets.
551
- * @param includeNull true to include edges with identical start and end vertex indices.
621
+ * @param includeTypical true to include typical boundary edges with a single adjacent facet. Default is true.
622
+ * @param includeMismatch true to include non-manifold edges (more than 2 adjacent facets, or mismatched
623
+ * orientations). Default is true.
624
+ * @param includeNull true to include edges with identical start and end vertex indices. Default is true.
625
+ * @see [[announceBoundaryChainsAsLineString3d]] for boundary linestring announcement
626
+ * @see [[collectBoundaryEdges]] for boundary chain collection
627
+ * @see [[announceBoundaryEdges]] for boundary edge announcement
552
628
  */
553
629
  static boundaryEdges(source, includeTypical = true, includeMismatch = true, includeNull = true) {
554
630
  const result = new CurveCollection_1.BagOfCurves();
@@ -561,33 +637,32 @@ class PolyfaceQuery {
561
637
  return result;
562
638
  }
563
639
  /**
564
- * Collect boundary edges.
565
- * * Return the edges as the simplest collection of chains of line segments.
640
+ * Collect boundary edges of the facet set as the simplest collection of chains of line segments.
566
641
  * @param source polyface or visitor.
567
- * @param includeTypical true to include typical boundary edges with a single adjacent facet.
568
- * @param includeMismatch true to include edges with more than 2 adjacent facets.
569
- * @param includeNull true to include edges with identical start and end vertex indices.
642
+ * @param includeTypical true to include typical boundary edges with a single adjacent facet. Default is true.
643
+ * @param includeMismatch true to include non-manifold edges (more than 2 adjacent facets, or mismatched
644
+ * orientations). Default is true.
645
+ * @param includeNull true to include edges with identical start and end vertex indices. Default is true.
646
+ * @see [[announceBoundaryChainsAsLineString3d]] for boundary linestring announcement
647
+ * @see [[announceBoundaryEdges]] for boundary edge announcement
648
+ * @see [[boundaryEdges]] for boundary edge collection
570
649
  */
571
650
  static collectBoundaryEdges(source, includeTypical = true, includeMismatch = true, includeNull = true) {
572
651
  const collector = new MultiChainCollector_1.MultiChainCollector(Geometry_1.Geometry.smallMetricDistance, Geometry_1.Geometry.smallMetricDistance);
573
- PolyfaceQuery.announceBoundaryEdges(source, (ptA, ptB) => collector.captureCurve(LineSegment3d_1.LineSegment3d.create(ptA, ptB)), includeTypical, includeMismatch, includeNull);
652
+ const announceEdge = (ptA, ptB) => collector.captureCurve(LineSegment3d_1.LineSegment3d.create(ptA, ptB));
653
+ PolyfaceQuery.announceBoundaryEdges(source, announceEdge, includeTypical, includeMismatch, includeNull);
574
654
  return collector.grabResult(true);
575
655
  }
576
656
  /**
577
- * Load all half edges from a mesh to an IndexedEdgeMatcher.
578
- * @param polyface a mesh or a visitor assumed to have numWrap === 1.
579
- */
657
+ * Load an IndexedEdgeMatcher from the edges of a mesh.
658
+ * @param polyface a mesh or visitor
659
+ */
580
660
  static createIndexedEdges(polyface) {
581
- if (polyface instanceof Polyface_1.Polyface)
582
- return this.createIndexedEdges(polyface.createVisitor(1));
583
661
  const edges = new IndexedEdgeMatcher_1.IndexedEdgeMatcher();
584
- polyface.reset();
585
- while (polyface.moveToNextFacet()) {
586
- const numEdges = polyface.pointCount - 1;
587
- for (let i = 0; i < numEdges; i++) {
588
- edges.addEdge(polyface.clientPointIndex(i), polyface.clientPointIndex(i + 1), polyface.currentReadIndex());
589
- }
590
- }
662
+ const visitor = polyface instanceof Polyface_1.Polyface ? polyface.createVisitor(1) : polyface;
663
+ visitor.setNumWrap(1);
664
+ for (visitor.reset(); visitor.moveToNextFacet();)
665
+ edges.addPath(visitor.pointIndex, visitor.currentReadIndex(), false);
591
666
  return edges;
592
667
  }
593
668
  /**
@@ -623,8 +698,8 @@ class PolyfaceQuery {
623
698
  for (const pair of manifoldEdges) {
624
699
  if (!Array.isArray(pair) || pair.length !== 2)
625
700
  continue;
626
- const indexA = pair[0].vertexIndexA;
627
- const indexB = pair[0].vertexIndexB;
701
+ const indexA = pair[0].startVertex;
702
+ const indexB = pair[0].endVertex;
628
703
  if (!mesh.data.getPoint(indexA, pointA) || !mesh.data.getPoint(indexB, pointB))
629
704
  continue;
630
705
  const face0 = analyzeFace(pair[0].facetIndex);
@@ -799,7 +874,7 @@ class PolyfaceQuery {
799
874
  }
800
875
  /**
801
876
  * Return the boundary of facets that are facing the eye.
802
- * @param polyface the indexed polyface
877
+ * @param source polyface or visitor. Must be capable of constructing a subset visitor.
803
878
  * @param visibilitySubset selector among the visible facet sets extracted by partitionFacetIndicesByVisibilityVector
804
879
  * * 0 ==> forward facing
805
880
  * * 1 ==> rear facing
@@ -807,21 +882,29 @@ class PolyfaceQuery {
807
882
  * @param vectorToEye the vector to eye
808
883
  * @param sideAngleTolerance the tolerance of side angle
809
884
  */
810
- static boundaryOfVisibleSubset(polyface, visibilitySelect, vectorToEye, sideAngleTolerance = Angle_1.Angle.createDegrees(1.0e-3)) {
811
- const partitionedIndices = this.partitionFacetIndicesByVisibilityVector(polyface, vectorToEye, sideAngleTolerance);
885
+ static boundaryOfVisibleSubset(source, visibilitySelect, vectorToEye, sideAngleTolerance = Angle_1.Angle.createDegrees(1.0e-3)) {
886
+ const visitor = source instanceof Polyface_1.Polyface ? source.createVisitor(0) : source;
887
+ if (!visitor.createSubsetVisitor)
888
+ return undefined;
889
+ const partitionedIndices = this.partitionFacetIndicesByVisibilityVector(source, vectorToEye, sideAngleTolerance);
812
890
  if (partitionedIndices[visibilitySelect].length === 0)
813
891
  return undefined;
814
- const visitor = IndexedPolyfaceVisitor_1.IndexedPolyfaceSubsetVisitor.createSubsetVisitor(polyface, partitionedIndices[visibilitySelect], 1);
815
- return this.boundaryEdges(visitor, true, false, false);
892
+ const subsetVisitor = visitor.createSubsetVisitor(partitionedIndices[visibilitySelect], 1);
893
+ return this.boundaryEdges(subsetVisitor, true, false, false);
816
894
  }
817
895
  /**
818
- * Search for edges with only 1 adjacent facet.
819
- * * Accumulate them into chains.
820
- * * Emit the chains to the `announceChain` callback.
896
+ * Announce boundary edges of the facet set as linestrings.
897
+ * * Ignores non-manifold interior edges and null edges.
898
+ * @param source polyface or visitor.
899
+ * @param announceChain function to be called with each chain of boundary edges.
900
+ * @see [[collectBoundaryEdges]] for boundary chain collection
901
+ * @see [[announceBoundaryEdges]] for boundary edge announcement
902
+ * @see [[boundaryEdges]] for boundary edge collection
821
903
  */
822
- static announceBoundaryChainsAsLineString3d(mesh, announceChain) {
904
+ static announceBoundaryChainsAsLineString3d(source, announceChain) {
823
905
  const collector = new MultiChainCollector_1.MultiChainCollector(Geometry_1.Geometry.smallMetricDistance); // no planarity tolerance needed
824
- PolyfaceQuery.announceBoundaryEdges(mesh, (pointA, pointB, _indexA, _indexB) => collector.captureCurve(LineSegment3d_1.LineSegment3d.create(pointA, pointB)), true, false, false);
906
+ const announceEdge = (ptA, ptB) => collector.captureCurve(LineSegment3d_1.LineSegment3d.create(ptA, ptB));
907
+ PolyfaceQuery.announceBoundaryEdges(source, announceEdge, true, false, false);
825
908
  collector.announceChainsAsLineString3d(announceChain);
826
909
  }
827
910
  /**
@@ -1166,94 +1249,99 @@ class PolyfaceQuery {
1166
1249
  });
1167
1250
  return builder.claimPolyface(true);
1168
1251
  }
1169
- /** @deprecated in 4.x. Use [[sweepLineStringToFacetsXYReturnSweptFacets]] instead. */
1252
+ /** @deprecated in 4.7.0 - will not be removed until after 2026-06-13. Use [[sweepLineStringToFacetsXYReturnSweptFacets]] instead. */
1170
1253
  static sweepLinestringToFacetsXYreturnSweptFacets(linestringPoints, polyface) {
1171
1254
  return this.sweepLineStringToFacetsXYReturnSweptFacets(linestringPoints, polyface);
1172
1255
  }
1173
1256
  /**
1174
- * Sweep the line string to intersections with a mesh.
1175
- * * Return collected line segments.
1176
- * * If no options are given, the default sweep direction is the z-axis, and chains are assembled and returned.
1177
- * * See [[SweepLineStringToFacetsOptions]] for input and output options, including filtering by forward/side/rear facets.
1257
+ * Sweep the line string to intersections with a mesh and return collected line segments.
1178
1258
  * * Facets are ASSUMED to be convex and planar, and not overlap in the sweep direction.
1259
+ * @param points the linestring to drape onto the mesh.
1260
+ * @param source target facet set. For best results, facets should be convex and planar.
1261
+ * @param options input, filtering, search, and output options.
1262
+ * * If `undefined`, the default sweep direction is the positive z-axis, and chains are assembled and returned.
1263
+ * * For faster _vertical_ sweep, a pre-computed range tree can be supplied in `options.searcher`.
1264
+ * * For faster _non-vertical_ sweep, first transform inputs with the inverse of the transform
1265
+ * `T = Transform.createRigidFromOriginAndVector(undefined, options.vectorToEye)`, construct the searcher on these
1266
+ * local facets, call `sweepLineStringToFacets/XY` with these local inputs (and default sweep direction), and lastly,
1267
+ * transform the returned draped linework back to world coordinates with `T`.
1179
1268
  */
1180
- static sweepLineStringToFacets(linestringPoints, polyfaceOrVisitor, options) {
1269
+ static sweepLineStringToFacets(points, source, options) {
1181
1270
  let result = [];
1182
- // setup default options
1183
1271
  if (options === undefined)
1184
- options = SweepLineStringToFacetsOptions.create(Point3dVector3d_1.Vector3d.unitZ(), Angle_1.Angle.createRadians(Geometry_1.Geometry.smallAngleRadians), // tight geometry tolerance for vertical side facets
1185
- true, true, true, true);
1272
+ options = SweepLineStringToFacetsOptions.create();
1186
1273
  let chainContext;
1187
1274
  if (options.assembleChains)
1188
1275
  chainContext = ChainMerge_1.ChainMergeContext.create();
1189
- const context = SweepLineStringToFacetContext_1.ClipSweptLineStringContext.create(linestringPoints, options.vectorToEye);
1190
- if (context) {
1191
- let visitor;
1192
- if (polyfaceOrVisitor instanceof Polyface_1.Polyface)
1193
- visitor = polyfaceOrVisitor.createVisitor(0);
1194
- else
1195
- visitor = polyfaceOrVisitor;
1196
- const workNormal = Point3dVector3d_1.Vector3d.createZero();
1197
- for (visitor.reset(); visitor.moveToNextFacet();) {
1198
- if (options.collectFromThisFacetNormal(PolygonOps_1.PolygonOps.areaNormalGo(visitor.point, workNormal))) {
1199
- context.processPolygon(visitor.point.getArray(), (pointA, pointB) => {
1200
- if (chainContext !== undefined)
1201
- chainContext.addSegment(pointA, pointB);
1202
- else
1203
- result.push(LineSegment3d_1.LineSegment3d.create(pointA, pointB));
1204
- });
1276
+ const addSegment = chainContext ? (ptA, ptB) => chainContext.addSegment(ptA, ptB) : (ptA, ptB) => result.push(LineSegment3d_1.LineSegment3d.create(ptA, ptB));
1277
+ const workNormal = Point3dVector3d_1.Vector3d.createZero();
1278
+ const visitor = source instanceof Polyface_1.Polyface ? source.createVisitor(0) : source;
1279
+ visitor.setNumWrap(0);
1280
+ if (options.searcher && options.vectorToEye.isParallelTo(Point3dVector3d_1.Vector3d.unitZ())) {
1281
+ const searchRange = Range_1.Range3d.createNull();
1282
+ const workPoint0 = Point3dVector3d_1.Point3d.createZero();
1283
+ const workPoint1 = Point3dVector3d_1.Point3d.createZero();
1284
+ let edgeClipper;
1285
+ const clipEdgeToConvexPolygon = (_facetRange, readIndex) => {
1286
+ if (visitor.moveToReadIndex(readIndex) && (options.collectAll || options.collectFromThisFacetNormal(PolygonOps_1.PolygonOps.areaNormalGo(visitor.point, workNormal))))
1287
+ edgeClipper?.processPolygon(visitor.point, (ptA, ptB) => addSegment(ptA, ptB));
1288
+ return true;
1289
+ };
1290
+ for (let i = 1; i < points.length; i++) {
1291
+ points.getPoint3dAtUncheckedPointIndex(i - 1, workPoint0);
1292
+ points.getPoint3dAtUncheckedPointIndex(i, workPoint1);
1293
+ if (edgeClipper = SweepLineStringToFacetContext_1.EdgeClipData.createPointPointSweep(workPoint0, workPoint1, options.vectorToEye)) {
1294
+ searchRange.setNull();
1295
+ searchRange.extend(workPoint0, workPoint1);
1296
+ options.searcher.searchRange2d(searchRange, clipEdgeToConvexPolygon);
1205
1297
  }
1206
1298
  }
1207
- if (chainContext !== undefined) {
1208
- chainContext.clusterAndMergeVerticesXYZ();
1209
- result = chainContext.collectMaximalChains();
1299
+ }
1300
+ else {
1301
+ const context = SweepLineStringToFacetContext_1.ClipSweptLineStringContext.create(points, options.vectorToEye);
1302
+ if (context) {
1303
+ for (visitor.reset(); visitor.moveToNextFacet();) {
1304
+ if (options.collectAll || options.collectFromThisFacetNormal(PolygonOps_1.PolygonOps.areaNormalGo(visitor.point, workNormal)))
1305
+ context.processPolygon(visitor.point.getArray(), addSegment);
1306
+ }
1210
1307
  }
1211
1308
  }
1309
+ if (chainContext) {
1310
+ chainContext.clusterAndMergeVerticesXYZ();
1311
+ result = chainContext.collectMaximalChains();
1312
+ }
1212
1313
  return result;
1213
1314
  }
1214
1315
  /**
1215
1316
  * Sweep the line string in the z-direction to intersections with a mesh, using a search object for speedup.
1216
- * @param lineStringPoints input line string to drape on the mesh.
1217
- * @param polyfaceOrVisitor mesh, or mesh visitor to traverse only part of a mesh.
1218
- * @param searchByReadIndex object for searching facet 2D ranges tagged by mesh read index.
1219
- * @example Using a 5x5 indexed search grid:
1220
- * ```
1221
- * const xyRange = Range2d.createFrom(myPolyface.range());
1222
- * const searcher = GriddedRaggedRange2dSetWithOverflow.create<number>(xyRange, 5, 5)!;
1223
- * for (const visitor = myPolyface.createVisitor(0); visitor.moveToNextFacet();) {
1224
- * searcher.addRange(visitor.point.getRange(), visitor.currentReadIndex());
1225
- * }
1226
- * const drapedLineStrings = PolyfaceQuery.sweepLineStringToFacetsXY(lineString, myPolyface, searcher);
1227
- * ```
1317
+ * @param points the linestring to drape onto the mesh.
1318
+ * @param source target facet set. For best results, facets should be convex and planar.
1319
+ * @param searcher object for searching facet 2D ranges tagged by mesh read index.
1228
1320
  * @returns the collected line strings.
1321
+ * @see [[sweepLineStringToFacets]] for further options.
1229
1322
  */
1230
- static sweepLineStringToFacetsXY(lineStringPoints, polyfaceOrVisitor, searchByReadIndex) {
1323
+ static sweepLineStringToFacetsXY(points, source, searcher) {
1231
1324
  const chainContext = ChainMerge_1.ChainMergeContext.create();
1232
- const sweepVector = Point3dVector3d_1.Vector3d.create(0, 0, 1);
1325
+ const vectorToEye = Point3dVector3d_1.Vector3d.unitZ();
1233
1326
  const searchRange = Range_1.Range3d.create();
1234
- let visitor;
1235
- if (polyfaceOrVisitor instanceof Polyface_1.Polyface)
1236
- visitor = polyfaceOrVisitor.createVisitor(0);
1237
- else
1238
- visitor = polyfaceOrVisitor;
1239
- let lineStringSource;
1240
- if (Array.isArray(lineStringPoints))
1241
- lineStringSource = new Point3dArrayCarrier_1.Point3dArrayCarrier(lineStringPoints);
1242
- else
1243
- lineStringSource = lineStringPoints;
1327
+ const workPoint0 = Point3dVector3d_1.Point3d.createZero();
1328
+ const workPoint1 = Point3dVector3d_1.Point3d.createZero();
1329
+ const visitor = source instanceof Polyface_1.Polyface ? source.createVisitor(0) : source;
1330
+ visitor.setNumWrap(0);
1331
+ let edgeClipper;
1332
+ const clipEdgeToConvexPolygon = (_facetRange, readIndex) => {
1333
+ if (visitor.moveToReadIndex(readIndex))
1334
+ edgeClipper?.processPolygon(visitor.point, (ptA, ptB) => chainContext.addSegment(ptA, ptB));
1335
+ return true;
1336
+ };
1337
+ const lineStringSource = Array.isArray(points) ? new Point3dArrayCarrier_1.Point3dArrayCarrier(points) : points;
1244
1338
  for (let i = 1; i < lineStringSource.length; i++) {
1245
- const point0 = lineStringSource.getPoint3dAtUncheckedPointIndex(i - 1);
1246
- const point1 = lineStringSource.getPoint3dAtUncheckedPointIndex(i);
1247
- const edgeClipper = SweepLineStringToFacetContext_1.EdgeClipData.createPointPointSweep(point0, point1, sweepVector);
1248
- if (edgeClipper !== undefined) {
1249
- Range_1.Range3d.createNull(searchRange);
1250
- searchRange.extendPoint(point0);
1251
- searchRange.extendPoint(point1);
1252
- searchByReadIndex.searchRange2d(searchRange, (_facetRange, readIndex) => {
1253
- if (visitor.moveToReadIndex(readIndex))
1254
- edgeClipper.processPolygon(visitor.point, (pointA, pointB) => chainContext.addSegment(pointA, pointB));
1255
- return true;
1256
- });
1339
+ lineStringSource.getPoint3dAtUncheckedPointIndex(i - 1, workPoint0);
1340
+ lineStringSource.getPoint3dAtUncheckedPointIndex(i, workPoint1);
1341
+ if (edgeClipper = SweepLineStringToFacetContext_1.EdgeClipData.createPointPointSweep(workPoint0, workPoint1, vectorToEye)) {
1342
+ searchRange.setNull();
1343
+ searchRange.extend(workPoint0, workPoint1);
1344
+ searcher.searchRange2d(searchRange, clipEdgeToConvexPolygon);
1257
1345
  }
1258
1346
  }
1259
1347
  chainContext.clusterAndMergeVerticesXYZ();
@@ -1264,24 +1352,20 @@ class PolyfaceQuery {
1264
1352
  * * Return collected line segments.
1265
1353
  * * This calls [[sweepLineStringToFacets]] with options created by
1266
1354
  * `const options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createSmallAngle(), false, true, true, true);`
1267
- * @deprecated in 4.x. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
1355
+ * @deprecated in 4.7.0 - will not be removed until after 2026-06-13. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
1268
1356
  */
1269
1357
  static sweepLinestringToFacetsXYReturnLines(linestringPoints, polyface) {
1270
1358
  const options = SweepLineStringToFacetsOptions.create(Point3dVector3d_1.Vector3d.unitZ(), Angle_1.Angle.createSmallAngle(), false, true, true, true);
1271
- const result = PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface, options);
1272
- return result;
1359
+ return PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface, options);
1273
1360
  }
1274
1361
  /**
1275
1362
  * Find segments (within the linestring) which project to facets.
1276
1363
  * * Return chains.
1277
- * * This calls [[sweepLineStringToFacets]] with options created by
1278
- * `const options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createSmallAngle(),true, true, true, true);`
1279
- * @deprecated in 4.x. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
1364
+ * * This calls [[sweepLineStringToFacets]] with default options.
1365
+ * @deprecated in 4.7.0 - will not be removed until after 2026-06-13. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
1280
1366
  */
1281
1367
  static sweepLinestringToFacetsXYReturnChains(linestringPoints, polyface) {
1282
- const options = SweepLineStringToFacetsOptions.create(Point3dVector3d_1.Vector3d.unitZ(), Angle_1.Angle.createSmallAngle(), true, true, true, true);
1283
- const result = PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface, options);
1284
- return result;
1368
+ return PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface);
1285
1369
  }
1286
1370
  /**
1287
1371
  * Find segments (within the linestring) which project to facets.
@@ -1533,11 +1617,11 @@ class PolyfaceQuery {
1533
1617
  static setEdgeVisibility(polyface, clusters, value) {
1534
1618
  for (const cluster of clusters) {
1535
1619
  if (cluster instanceof IndexedEdgeMatcher_1.SortableEdge) {
1536
- this.setSingleEdgeVisibility(polyface, cluster.facetIndex, cluster.vertexIndexA, value);
1620
+ this.setSingleEdgeVisibility(polyface, cluster.facetIndex, cluster.startVertex, value);
1537
1621
  }
1538
1622
  else if (Array.isArray(cluster)) {
1539
1623
  for (const e1 of cluster)
1540
- this.setSingleEdgeVisibility(polyface, e1.facetIndex, e1.vertexIndexA, value);
1624
+ this.setSingleEdgeVisibility(polyface, e1.facetIndex, e1.startVertex, value);
1541
1625
  }
1542
1626
  }
1543
1627
  }
@@ -1639,8 +1723,8 @@ class PolyfaceQuery {
1639
1723
  && undefined !== PolyfaceQuery.computeFacetUnitNormal(visitor, e1.facetIndex, normal1)) {
1640
1724
  const edgeAngle = normal0.smallerUnorientedAngleTo(normal1);
1641
1725
  if (edgeAngle.radians > sharpEdgeAngle.radians) {
1642
- this.setSingleEdgeVisibility(mesh, e0.facetIndex, e0.vertexIndexA, true);
1643
- this.setSingleEdgeVisibility(mesh, e1.facetIndex, e1.vertexIndexA, true);
1726
+ this.setSingleEdgeVisibility(mesh, e0.facetIndex, e0.startVertex, true);
1727
+ this.setSingleEdgeVisibility(mesh, e1.facetIndex, e1.startVertex, true);
1644
1728
  }
1645
1729
  }
1646
1730
  }