@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
@@ -36,12 +36,11 @@ import { SpacePolygonTriangulation } from "../topology/SpaceTriangulation";
36
36
  import { ConvexFacetLocationDetail, NonConvexFacetLocationDetail, TriangularFacetLocationDetail, } from "./FacetLocationDetail";
37
37
  import { FacetOrientationFixup } from "./FacetOrientation";
38
38
  import { IndexedEdgeMatcher, SortableEdge } from "./IndexedEdgeMatcher";
39
- import { IndexedPolyfaceSubsetVisitor } from "./IndexedPolyfaceVisitor";
40
39
  import { BuildAverageNormalsContext } from "./multiclip/BuildAverageNormalsContext";
41
40
  import { OffsetMeshContext } from "./multiclip/OffsetMeshContext";
42
41
  import { ClipSweptLineStringContext, EdgeClipData, SweepLineStringToFacetContext } from "./multiclip/SweepLineStringToFacetContext";
43
42
  import { XYPointBuckets } from "./multiclip/XYPointBuckets";
44
- import { Polyface } from "./Polyface";
43
+ import { IndexedPolyface, Polyface } from "./Polyface";
45
44
  import { PolyfaceBuilder } from "./PolyfaceBuilder";
46
45
  import { RangeLengthData } from "./RangeLengthData";
47
46
  /**
@@ -69,14 +68,27 @@ export class SweepLineStringToFacetsOptions {
69
68
  sideAngle;
70
69
  /** Option to assemble lines into chains. */
71
70
  assembleChains;
71
+ /**
72
+ * Optional searcher object for vertical sweep speedup. If provided, `vectorToEye` must be the positive Z vector.
73
+ * @example To construct a 5x5 indexed search grid:
74
+ * ````
75
+ * const xyRange = Range2d.createFrom(myPolyface.range());
76
+ * const searcher = GriddedRaggedRange2dSetWithOverflow.create<number>(xyRange, 5, 5)!;
77
+ * for (const visitor = myPolyface.createVisitor(0); visitor.moveToNextFacet();) {
78
+ * searcher.addRange(visitor.point.getRange(), visitor.currentReadIndex());
79
+ * }
80
+ * ````
81
+ */
82
+ searcher;
72
83
  /** Constructor. Captures fully-checked parameters from static create method. */
73
- constructor(vectorToEye, sideAngle, assembleChains, collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets) {
84
+ constructor(vectorToEye, sideAngle, assembleChains, collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets, searcher) {
74
85
  this.vectorToEye = vectorToEye;
75
86
  this.sideAngle = sideAngle;
76
87
  this.assembleChains = assembleChains;
77
88
  this.collectOnForwardFacets = collectOnForwardFacets;
78
89
  this.collectOnSideFacets = collectOnSideFacets;
79
90
  this.collectOnRearFacets = collectOnRearFacets;
91
+ this.searcher = searcher;
80
92
  }
81
93
  /**
82
94
  * Create an options structure.
@@ -85,14 +97,12 @@ export class SweepLineStringToFacetsOptions {
85
97
  * * Default `assembleChains` is `true`.
86
98
  * * Default `collectOnForwardFacets`, `collectOnSideFacets`, `collectOnRearFacets` are all `true`.
87
99
  */
88
- static create(vectorToEye, sideAngle, assembleChains, collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets) {
89
- return new SweepLineStringToFacetsOptions(vectorToEye === undefined ? Vector3d.unitZ() : vectorToEye.clone(), sideAngle === undefined ? Angle.createRadians(Geometry.smallAngleRadians) : sideAngle.clone(), Geometry.resolveValue(assembleChains, true), Geometry.resolveValue(collectOnForwardFacets, true), Geometry.resolveValue(collectOnSideFacets, true), Geometry.resolveValue(collectOnRearFacets, true));
100
+ static create(vectorToEye, sideAngle, assembleChains, collectOnForwardFacets, collectOnSideFacets, collectOnRearFacets, searcher) {
101
+ return new SweepLineStringToFacetsOptions((!vectorToEye || searcher) ? Vector3d.unitZ() : vectorToEye.clone(), sideAngle?.clone() ?? Angle.createRadians(Geometry.smallAngleRadians), assembleChains ?? true, collectOnForwardFacets ?? true, collectOnSideFacets ?? true, collectOnRearFacets ?? true, searcher);
90
102
  }
91
103
  /** Return `true` if all outputs are requested. */
92
104
  get collectAll() {
93
- return this.collectOnForwardFacets === true &&
94
- this.collectOnSideFacets === true &&
95
- this.collectOnRearFacets === true;
105
+ return this.collectOnForwardFacets && this.collectOnSideFacets && this.collectOnRearFacets;
96
106
  }
97
107
  /**
98
108
  * Decide if the instance collector flags accept a facet with the given normal.
@@ -203,21 +213,21 @@ export class PolyfaceQuery {
203
213
  * @param source polyface or visitor.
204
214
  * @param vectorToEye compute sum of (signed) facet areas projected to a view plane perpendicular to `vectorToEye`.
205
215
  * If `vectorToEye` is not provided, actual facet areas are calculated (without any projection).
206
- * @returns the sum of all facet areas. Return 0 if `source` is `undefined`.
216
+ * @returns the sum of all facet areas.
207
217
  */
208
218
  static sumFacetAreas(source, vectorToEye) {
209
219
  let sum = 0;
210
- if (source !== undefined) {
211
- if (source instanceof Polyface)
212
- return PolyfaceQuery.sumFacetAreas(source.createVisitor(1), vectorToEye);
213
- let unitVectorToEye;
214
- if (vectorToEye !== undefined)
215
- unitVectorToEye = vectorToEye.normalize();
216
- source.reset();
217
- while (source.moveToNextFacet()) {
218
- const areaNormal = PolygonOps.areaNormal(source.point.getPoint3dArray());
219
- sum += unitVectorToEye ? areaNormal.dotProduct(unitVectorToEye) : areaNormal.magnitude();
220
- }
220
+ if (source instanceof Polyface)
221
+ source = source.createVisitor(1);
222
+ else
223
+ source.setNumWrap(1);
224
+ let unitVectorToEye;
225
+ if (vectorToEye !== undefined)
226
+ unitVectorToEye = vectorToEye.normalize();
227
+ source.reset();
228
+ while (source.moveToNextFacet()) {
229
+ const areaNormal = PolygonOps.areaNormal(source.point.getPoint3dArray());
230
+ sum += unitVectorToEye ? areaNormal.dotProduct(unitVectorToEye) : areaNormal.magnitude();
221
231
  }
222
232
  return sum;
223
233
  }
@@ -251,68 +261,46 @@ export class PolyfaceQuery {
251
261
  }
252
262
  /**
253
263
  * Sum (signed) volumes between facets and a plane.
254
- * Return a structure with multiple sums:
255
- * * volume = the sum of (signed) volumes between facets and the plane.
256
- * * positiveProjectedFacetAreaMoments, negativeProjectedFacetAreaMoments = moment data with centroid, area, and second
257
- * moments with respect to the centroid.
264
+ * @param source facet set
265
+ * @param plane infinite plane bounding volume between the input facets and (virtual) side facets perpendicular to the plane.
266
+ * @param skipMoments whether to skip computation of the area moments. Set to `true` if only volume is needed. Default is `false`.
267
+ * @returns a structure with multiple sums:
268
+ * * volume: the sum of (signed) volumes between facets and the plane.
269
+ * * positiveProjectedFacetAreaMoments, negativeProjectedFacetAreaMoments: area moment data (centroid, signed area,
270
+ * and second moments with respect to the centroid), separately computed for the input facets that project with
271
+ * positive/negative area onto the plane.
258
272
  */
259
- static sumVolumeBetweenFacetsAndPlane(source, plane) {
260
- if (source instanceof Polyface)
261
- return PolyfaceQuery.sumVolumeBetweenFacetsAndPlane(source.createVisitor(0), plane);
262
- const facetOrigin = Point3d.create();
263
- const targetA = Point3d.create();
264
- const targetB = Point3d.create();
265
- const triangleNormal = Vector3d.create();
266
- const planeNormal = plane.getNormalRef();
267
- let h0, hA, hB;
268
- let signedVolumeSum = 0.0;
269
- let signedTriangleArea;
270
- let singleFacetArea;
271
- const positiveAreaMomentSums = MomentData.create(undefined, true);
272
- const negativeAreaMomentSums = MomentData.create(undefined, true);
273
- const singleFacetProducts = Matrix4d.createZero();
274
- const projectToPlane = plane.getProjectionToPlane();
275
- source.reset();
273
+ static sumVolumeBetweenFacetsAndPlane(source, plane, skipMoments) {
274
+ const visitor = source instanceof Polyface ? source.createVisitor(0) : source;
275
+ visitor.setNumWrap(0);
276
+ const workPoint0 = Point3d.create();
277
+ const workPoint1 = Point3d.create();
278
+ const workVector = Vector3d.create();
279
+ const workMatrix = Matrix4d.createZero();
280
+ let signedVolumeTimes6 = 0.0;
281
+ const posSums = skipMoments ? undefined : MomentData.create(undefined, true);
282
+ const negSums = skipMoments ? undefined : MomentData.create(undefined, true);
276
283
  // For each facet:
277
284
  // - form triangles from facet origin to each far edge.
278
- // - sum signed area and volume contributions.
279
- // each projected area contribution is twice the area of a triangle.
280
- // each volume contribution is 3 times the actual volume -- (1/3) of the altitude sums was the centroid altitude.
281
- while (source.moveToNextFacet()) {
282
- source.point.getPoint3dAtUncheckedPointIndex(0, facetOrigin);
283
- h0 = plane.altitude(facetOrigin);
284
- singleFacetArea = 0;
285
- // within a single facets, the singleFacetArea sum is accumulated with signs of individual triangles.
286
- // for a non-convex facet, this can be a mixture of positive and negative areas.
287
- // the absoluteProjectedAreaSum contribution is forced positive after the sum for the facet.
288
- for (let i = 1; i + 1 < source.point.length; i++) {
289
- source.point.getPoint3dAtUncheckedPointIndex(i, targetA);
290
- source.point.getPoint3dAtUncheckedPointIndex(i + 1, targetB);
291
- facetOrigin.crossProductToPoints(targetA, targetB, triangleNormal);
292
- hA = plane.altitude(targetA);
293
- hB = plane.altitude(targetB);
294
- signedTriangleArea = planeNormal.dotProduct(triangleNormal);
295
- singleFacetArea += signedTriangleArea;
296
- signedVolumeSum += signedTriangleArea * (h0 + hA + hB);
297
- }
298
- singleFacetProducts.setZero();
299
- source.point.multiplyTransformInPlace(projectToPlane);
300
- PolygonOps.addSecondMomentAreaProducts(source.point, facetOrigin, singleFacetProducts);
301
- if (singleFacetArea > 0) {
302
- positiveAreaMomentSums.accumulateProductsFromOrigin(facetOrigin, singleFacetProducts, 1.0);
303
- }
304
- else {
305
- negativeAreaMomentSums.accumulateProductsFromOrigin(facetOrigin, singleFacetProducts, 1.0);
285
+ // - sum signed area and volume contributions (for non-convex facet, signs can be mixed).
286
+ // - each projected area contribution is twice the area of a triangle.
287
+ // - each volume contribution is 3 times the actual volume -- a third of the altitude sum is the centroid altitude.
288
+ const options = { skipMoments, p0: workPoint0, p1: workPoint1, v0: workVector, m0: workMatrix };
289
+ for (visitor.reset(); visitor.moveToNextFacet();) {
290
+ const facetData = PolygonOps.volumeBetweenPolygonAndPlane(visitor.point, plane, options);
291
+ signedVolumeTimes6 += facetData.volume6;
292
+ if (!skipMoments) {
293
+ assert(posSums !== undefined && negSums !== undefined && facetData.origin !== undefined && facetData.products !== undefined);
294
+ if (facetData.area2 > 0)
295
+ posSums.accumulateProductsFromOrigin(facetData.origin, facetData.products, 1.0);
296
+ else
297
+ negSums.accumulateProductsFromOrigin(facetData.origin, facetData.products, 1.0);
306
298
  }
307
299
  }
308
- positiveAreaMomentSums.shiftOriginAndSumsToCentroidOfSums();
309
- negativeAreaMomentSums.shiftOriginAndSumsToCentroidOfSums();
310
- const positiveAreaMoments = MomentData.inertiaProductsToPrincipalAxes(positiveAreaMomentSums.origin, positiveAreaMomentSums.sums);
311
- const negativeAreaMoments = MomentData.inertiaProductsToPrincipalAxes(negativeAreaMomentSums.origin, negativeAreaMomentSums.sums);
312
300
  return {
313
- volume: signedVolumeSum / 6.0,
314
- positiveProjectedFacetAreaMoments: positiveAreaMoments,
315
- negativeProjectedFacetAreaMoments: negativeAreaMoments,
301
+ volume: signedVolumeTimes6 / 6.0,
302
+ positiveProjectedFacetAreaMoments: posSums ? MomentData.inertiaProductsToPrincipalAxes(posSums.origin, posSums.sums) : undefined,
303
+ negativeProjectedFacetAreaMoments: negSums ? MomentData.inertiaProductsToPrincipalAxes(negSums.origin, negSums.sums) : undefined,
316
304
  };
317
305
  }
318
306
  /** Return the inertia products [xx,xy,xz,xw,yw, etc] integrated over all all facets as viewed from origin. */
@@ -387,7 +375,7 @@ export class PolyfaceQuery {
387
375
  * Compute a number summarizing the dihedral angles in the mesh.
388
376
  * * A dihedral angle is the signed angle between adjacent facets' normals. This angle is positive when the cross
389
377
  * product `normalA x normalB` has the same direction as facetA's traversal of the facets' shared edge.
390
- * @param source mesh.
378
+ * @param source facets.
391
379
  * @param ignoreBoundaries if `true` ignore simple boundary edges, i.e., allow unclosed meshes. Default is `false`.
392
380
  * See [[isConvexByDihedralAngleCount]] for comments about passing true when there are multiple
393
381
  * connected components.
@@ -403,19 +391,21 @@ export class PolyfaceQuery {
403
391
  static dihedralAngleSummary(source, ignoreBoundaries = false) {
404
392
  // more info can be found at geometry/internaldocs/Polyface.md
405
393
  const edges = new IndexedEdgeMatcher();
406
- const visitor = source.createVisitor(1);
407
- visitor.reset();
408
- // find centroid normals of all facets
394
+ const vertices = source instanceof Polyface ? source.data.point : undefined;
395
+ const visitor = source instanceof Polyface ? source.createVisitor(1) : source;
396
+ visitor.setNumWrap(1);
409
397
  const centroidNormal = [];
410
398
  let normalCounter = 0;
411
- while (visitor.moveToNextFacet()) {
399
+ for (visitor.reset(); visitor.moveToNextFacet();) {
412
400
  const numEdges = visitor.pointCount - 1;
413
401
  const normal = PolygonOps.centroidAreaNormal(visitor.point);
414
402
  if (normal === undefined)
415
403
  return -2;
416
404
  centroidNormal.push(normal);
417
405
  for (let i = 0; i < numEdges; i++) {
418
- edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), normalCounter);
406
+ const edge = edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), normalCounter);
407
+ if (!vertices) // decorate if we don't have vertices to query later
408
+ edge.edgeVector = Vector3d.createStartEnd(visitor.point.getPoint3dAtUncheckedPointIndex(i), visitor.point.getPoint3dAtUncheckedPointIndex(i + 1));
419
409
  }
420
410
  normalCounter++;
421
411
  }
@@ -433,11 +423,16 @@ export class PolyfaceQuery {
433
423
  let numNegative = 0;
434
424
  const edgeVector = Vector3d.create();
435
425
  for (const cluster of manifoldClusters) {
436
- const sideA = cluster[0];
437
- const sideB = cluster[1];
438
- if (sideA instanceof SortableEdge && sideB instanceof SortableEdge
439
- && source.data.point.vectorIndexIndex(sideA.vertexIndexA, sideA.vertexIndexB, edgeVector)) {
440
- const dihedralAngle = centroidNormal[sideA.facetIndex].direction.signedAngleTo(centroidNormal[sideB.facetIndex].direction, edgeVector);
426
+ if (Array.isArray(cluster) && cluster.length === 2) {
427
+ const sideA = cluster[0];
428
+ const sideB = cluster[1];
429
+ if (vertices)
430
+ vertices.vectorIndexIndex(sideA.startVertex, sideA.endVertex, edgeVector);
431
+ else
432
+ edgeVector.setFrom(sideA.edgeVector);
433
+ const facetNormalA = centroidNormal[sideA.facetIndex].direction;
434
+ const facetNormalB = centroidNormal[sideB.facetIndex].direction;
435
+ const dihedralAngle = facetNormalA.signedAngleTo(facetNormalB, edgeVector);
441
436
  if (dihedralAngle.isAlmostZero)
442
437
  numPlanar++;
443
438
  else if (dihedralAngle.radians > 0.0)
@@ -473,26 +468,50 @@ export class PolyfaceQuery {
473
468
  static isConvexByDihedralAngleCount(source, ignoreBoundaries = false) {
474
469
  return this.dihedralAngleSummary(source, ignoreBoundaries) > 0;
475
470
  }
471
+ /** Helper function to detect a subset visitor. */
472
+ static isSubsetVisitor(visitor) {
473
+ if (visitor instanceof Polyface)
474
+ return false;
475
+ const parentFacetCount = visitor.clientPolyface()?.facetCount;
476
+ const visitableFacetCount = visitor.getVisitableFacetCount?.();
477
+ if (parentFacetCount === undefined || visitableFacetCount === undefined)
478
+ return false;
479
+ return parentFacetCount > visitableFacetCount;
480
+ }
476
481
  /**
477
- * Test edges pairing in `source` mesh.
478
- * * For `allowSimpleBoundaries === false`, a return value of `true` means this is a closed 2-manifold surface.
479
- * * For `allowSimpleBoundaries === true`, a return value of `true` means this is a 2-manifold surface which may have
480
- * a boundary, but is still properly matched internally.
482
+ * Faster version of isPolyfaceManifold for specific input.
483
+ * @returns whether the mesh is manifold, or undefined if unsuccessful.
484
+ */
485
+ static isPolyfaceManifoldFast(source, allowSimpleBoundaries) {
486
+ if (allowSimpleBoundaries)
487
+ return undefined; // edgeMateIndex does not distinguish boundary edges from non-manifold edges so we can only speed things up if we search for both
488
+ if (this.isSubsetVisitor(source))
489
+ return false; // edgeMateIndex doesn't capture the facet subset boundary
490
+ const parentData = IndexedPolyface.hasEdgeMateIndex(source);
491
+ if (!parentData)
492
+ return undefined;
493
+ for (const edgeMate of parentData.edgeMateIndex) {
494
+ if (edgeMate === undefined)
495
+ return false; // found a boundary or non-manifold edge
496
+ }
497
+ return true; // this is a 2-manifold closed surface
498
+ }
499
+ /**
500
+ * Test edge pairing in `source` mesh.
481
501
  * * Any edge with 3 or more adjacent facets triggers `false` return.
482
- * * Any edge with 2 adjacent facets in the same direction triggers a `false` return.
502
+ * * Any edge with 2 adjacent facets in the same direction triggers `false` return.
503
+ * * Null edges are ignored.
504
+ * @param source facet set to examine
505
+ * @param allowSimpleBoundaries if `false` (default), a return value of `true` means the facets form a closed
506
+ * 2-manifold surface; if `true`, a return value of `true` means the facets form a 2-manifold surface which may
507
+ * have a boundary, but is still properly matched internally.
483
508
  */
484
509
  static isPolyfaceManifold(source, allowSimpleBoundaries = false) {
485
- const edges = new IndexedEdgeMatcher();
486
- const visitor = source.createVisitor(1);
487
- visitor.reset();
488
- while (visitor.moveToNextFacet()) {
489
- const numEdges = visitor.pointCount - 1;
490
- for (let i = 0; i < numEdges; i++) {
491
- edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), visitor.currentReadIndex());
492
- }
493
- }
510
+ const isManifold = this.isPolyfaceManifoldFast(source, allowSimpleBoundaries);
511
+ if (isManifold !== undefined)
512
+ return isManifold;
494
513
  const badClusters = [];
495
- edges.sortAndCollectClusters(undefined, allowSimpleBoundaries ? undefined : badClusters, undefined, badClusters);
514
+ this.createIndexedEdges(source).sortAndCollectClusters(undefined, allowSimpleBoundaries ? undefined : badClusters, undefined, badClusters);
496
515
  return badClusters.length === 0;
497
516
  }
498
517
  /** Test if the facets in `source` occur in perfectly mated pairs, as is required for a closed manifold volume. */
@@ -500,50 +519,107 @@ export class PolyfaceQuery {
500
519
  return this.isPolyfaceManifold(source, false);
501
520
  }
502
521
  /**
503
- * Test if the facets in `source` occur in perfectly mated pairs, as is required for a closed manifold volume.
504
- * If not, extract the boundary edges as lines.
522
+ * Faster version of announceBoundaryEdges for specific input.
523
+ * @returns true if successfully announced boundary edges.
524
+ */
525
+ static announceBoundaryEdgesFast(source, announceEdge, includeTypical, includeMismatch, includeNull) {
526
+ if (includeTypical !== includeMismatch)
527
+ return false; // edgeMateIndex does not distinguish boundary edges from non-manifold edges
528
+ if (!includeTypical && !includeNull)
529
+ return true;
530
+ if (this.isSubsetVisitor(source))
531
+ return false; // edgeMateIndex doesn't capture the facet subset boundary
532
+ const parentData = IndexedPolyface.hasEdgeMateIndex(source);
533
+ if (!parentData)
534
+ return false;
535
+ const pointA = Point3d.create();
536
+ const pointB = Point3d.create();
537
+ for (let edgeIndex = 0; edgeIndex < parentData.edgeMateIndex.length; edgeIndex++) {
538
+ const edgeMate = parentData.edgeMateIndex[edgeIndex];
539
+ const announceBoundaryOrNonManifoldEdge = includeTypical && edgeMate === undefined;
540
+ const announceNullEdge = includeNull && edgeMate === edgeIndex;
541
+ if (announceBoundaryOrNonManifoldEdge || announceNullEdge) {
542
+ const facetIndex = parentData.parent.edgeIndexToFacetIndex(edgeIndex);
543
+ if (facetIndex !== undefined) { // should always be defined
544
+ const pointIndexA = parentData.parent.data.pointIndex[edgeIndex];
545
+ let nextEdgeIndex = edgeIndex + 1;
546
+ if (nextEdgeIndex >= parentData.parent.facetIndex1(facetIndex))
547
+ nextEdgeIndex = parentData.parent.facetIndex0(facetIndex);
548
+ const pointIndexB = parentData.parent.data.pointIndex[nextEdgeIndex];
549
+ parentData.parent.data.getPoint(pointIndexA, pointA);
550
+ parentData.parent.data.getPoint(pointIndexB, pointB);
551
+ announceEdge(pointA, pointB, pointIndexA, pointIndexB, facetIndex);
552
+ }
553
+ }
554
+ }
555
+ return true;
556
+ }
557
+ /**
558
+ * Announce boundary edges of the facet set as line segments.
505
559
  * @param source polyface or visitor.
506
560
  * @param announceEdge function to be called with each boundary edge. The announcement is start and end points,
507
- * start and end indices, and facet index.
508
- * @param includeTypical true to announce typical boundary edges with a single adjacent facet.
509
- * @param includeMismatch true to announce edges with more than 2 adjacent facets.
510
- * @param includeNull true to announce edges with identical start and end vertex indices.
561
+ * start and end vertex indices, and facet index.
562
+ * @param includeTypical true to announce typical boundary edges with a single adjacent facet. Default is true.
563
+ * @param includeMismatch true to announce non-manifold edges (more than 2 adjacent facets, or mismatched
564
+ * orientations). Default is true.
565
+ * @param includeNull true to announce edges with identical start and end vertex indices. Default is true.
566
+ * @see [[announceBoundaryChainsAsLineString3d]] for boundary linestring announcement
567
+ * @see [[collectBoundaryEdges]] for boundary chain collection
568
+ * @see [[boundaryEdges]] for boundary edge collection
511
569
  */
512
570
  static announceBoundaryEdges(source, announceEdge, includeTypical = true, includeMismatch = true, includeNull = true) {
513
- if (source === undefined || (!includeTypical && !includeMismatch && !includeNull))
571
+ if (this.announceBoundaryEdgesFast(source, announceEdge, includeTypical, includeMismatch, includeNull))
514
572
  return;
515
- const edges = new IndexedEdgeMatcher();
573
+ if (!includeTypical && !includeMismatch && !includeNull)
574
+ return;
575
+ const vertices = source instanceof Polyface ? source.data.point : undefined;
516
576
  const visitor = source instanceof Polyface ? source.createVisitor(1) : source;
517
577
  visitor.setNumWrap(1);
518
- visitor.reset();
519
- while (visitor.moveToNextFacet()) {
578
+ const edges = new IndexedEdgeMatcher();
579
+ for (visitor.reset(); visitor.moveToNextFacet();) {
520
580
  const numEdges = visitor.pointCount - 1;
521
581
  for (let i = 0; i < numEdges; i++) {
522
- edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), visitor.currentReadIndex());
582
+ const edge = edges.addEdge(visitor.clientPointIndex(i), visitor.clientPointIndex(i + 1), visitor.currentReadIndex());
583
+ if (!vertices) { // decorate if we don't have vertices to query later
584
+ edge.pointA = visitor.point.getPoint3dAtUncheckedPointIndex(i);
585
+ edge.pointB = visitor.point.getPoint3dAtUncheckedPointIndex(i + 1);
586
+ }
523
587
  }
524
588
  }
525
589
  const boundaryEdges = [];
526
- edges.sortAndCollectClusters(undefined, includeTypical ? boundaryEdges : undefined, includeNull ? boundaryEdges : undefined, includeMismatch ? boundaryEdges : undefined);
590
+ const typicalEdges = includeTypical ? boundaryEdges : undefined;
591
+ const nullEdges = includeNull ? boundaryEdges : undefined;
592
+ const mismatchEdges = includeMismatch ? boundaryEdges : undefined;
593
+ edges.sortAndCollectClusters(undefined, typicalEdges, nullEdges, mismatchEdges);
527
594
  if (boundaryEdges.length === 0)
528
595
  return;
529
- const sourcePolyface = visitor.clientPolyface();
530
596
  const pointA = Point3d.create();
531
597
  const pointB = Point3d.create();
532
598
  for (const e of boundaryEdges) {
533
- const e1 = e instanceof SortableEdge ? e : e[0];
534
- const indexA = e1.vertexIndexA;
535
- const indexB = e1.vertexIndexB;
536
- if (sourcePolyface.data.getPoint(indexA, pointA) && sourcePolyface.data.getPoint(indexB, pointB))
537
- announceEdge(pointA, pointB, indexA, indexB, e1.facetIndex);
599
+ const e1 = e instanceof SortableEdge ? e : e[0]; // only report the first edge in a cluster!
600
+ const indexA = e1.startVertex;
601
+ const indexB = e1.endVertex;
602
+ if (vertices) {
603
+ vertices.getPoint3dAtUncheckedPointIndex(indexA, pointA);
604
+ vertices.getPoint3dAtUncheckedPointIndex(indexB, pointB);
605
+ }
606
+ else {
607
+ pointA.setFrom(e1.pointA);
608
+ pointB.setFrom(e1.pointB);
609
+ }
610
+ announceEdge(pointA, pointB, indexA, indexB, e1.facetIndex);
538
611
  }
539
612
  }
540
613
  /**
541
- * Construct a CurveCollection containing boundary edges.
542
- * * Each edge is a LineSegment3d.
614
+ * Collect boundary edges of the facet set as an unordered collection of line segments.
543
615
  * @param source polyface or visitor.
544
- * @param includeTypical true to in include typical boundary edges with a single adjacent facet.
545
- * @param includeMismatch true to include edges with more than 2 adjacent facets.
546
- * @param includeNull true to include edges with identical start and end vertex indices.
616
+ * @param includeTypical true to include typical boundary edges with a single adjacent facet. Default is true.
617
+ * @param includeMismatch true to include non-manifold edges (more than 2 adjacent facets, or mismatched
618
+ * orientations). Default is true.
619
+ * @param includeNull true to include edges with identical start and end vertex indices. Default is true.
620
+ * @see [[announceBoundaryChainsAsLineString3d]] for boundary linestring announcement
621
+ * @see [[collectBoundaryEdges]] for boundary chain collection
622
+ * @see [[announceBoundaryEdges]] for boundary edge announcement
547
623
  */
548
624
  static boundaryEdges(source, includeTypical = true, includeMismatch = true, includeNull = true) {
549
625
  const result = new BagOfCurves();
@@ -556,33 +632,32 @@ export class PolyfaceQuery {
556
632
  return result;
557
633
  }
558
634
  /**
559
- * Collect boundary edges.
560
- * * Return the edges as the simplest collection of chains of line segments.
635
+ * Collect boundary edges of the facet set as the simplest collection of chains of line segments.
561
636
  * @param source polyface or visitor.
562
- * @param includeTypical true to include typical boundary edges with a single adjacent facet.
563
- * @param includeMismatch true to include edges with more than 2 adjacent facets.
564
- * @param includeNull true to include edges with identical start and end vertex indices.
637
+ * @param includeTypical true to include typical boundary edges with a single adjacent facet. Default is true.
638
+ * @param includeMismatch true to include non-manifold edges (more than 2 adjacent facets, or mismatched
639
+ * orientations). Default is true.
640
+ * @param includeNull true to include edges with identical start and end vertex indices. Default is true.
641
+ * @see [[announceBoundaryChainsAsLineString3d]] for boundary linestring announcement
642
+ * @see [[announceBoundaryEdges]] for boundary edge announcement
643
+ * @see [[boundaryEdges]] for boundary edge collection
565
644
  */
566
645
  static collectBoundaryEdges(source, includeTypical = true, includeMismatch = true, includeNull = true) {
567
646
  const collector = new MultiChainCollector(Geometry.smallMetricDistance, Geometry.smallMetricDistance);
568
- PolyfaceQuery.announceBoundaryEdges(source, (ptA, ptB) => collector.captureCurve(LineSegment3d.create(ptA, ptB)), includeTypical, includeMismatch, includeNull);
647
+ const announceEdge = (ptA, ptB) => collector.captureCurve(LineSegment3d.create(ptA, ptB));
648
+ PolyfaceQuery.announceBoundaryEdges(source, announceEdge, includeTypical, includeMismatch, includeNull);
569
649
  return collector.grabResult(true);
570
650
  }
571
651
  /**
572
- * Load all half edges from a mesh to an IndexedEdgeMatcher.
573
- * @param polyface a mesh or a visitor assumed to have numWrap === 1.
574
- */
652
+ * Load an IndexedEdgeMatcher from the edges of a mesh.
653
+ * @param polyface a mesh or visitor
654
+ */
575
655
  static createIndexedEdges(polyface) {
576
- if (polyface instanceof Polyface)
577
- return this.createIndexedEdges(polyface.createVisitor(1));
578
656
  const edges = new IndexedEdgeMatcher();
579
- polyface.reset();
580
- while (polyface.moveToNextFacet()) {
581
- const numEdges = polyface.pointCount - 1;
582
- for (let i = 0; i < numEdges; i++) {
583
- edges.addEdge(polyface.clientPointIndex(i), polyface.clientPointIndex(i + 1), polyface.currentReadIndex());
584
- }
585
- }
657
+ const visitor = polyface instanceof Polyface ? polyface.createVisitor(1) : polyface;
658
+ visitor.setNumWrap(1);
659
+ for (visitor.reset(); visitor.moveToNextFacet();)
660
+ edges.addPath(visitor.pointIndex, visitor.currentReadIndex(), false);
586
661
  return edges;
587
662
  }
588
663
  /**
@@ -618,8 +693,8 @@ export class PolyfaceQuery {
618
693
  for (const pair of manifoldEdges) {
619
694
  if (!Array.isArray(pair) || pair.length !== 2)
620
695
  continue;
621
- const indexA = pair[0].vertexIndexA;
622
- const indexB = pair[0].vertexIndexB;
696
+ const indexA = pair[0].startVertex;
697
+ const indexB = pair[0].endVertex;
623
698
  if (!mesh.data.getPoint(indexA, pointA) || !mesh.data.getPoint(indexB, pointB))
624
699
  continue;
625
700
  const face0 = analyzeFace(pair[0].facetIndex);
@@ -794,7 +869,7 @@ export class PolyfaceQuery {
794
869
  }
795
870
  /**
796
871
  * Return the boundary of facets that are facing the eye.
797
- * @param polyface the indexed polyface
872
+ * @param source polyface or visitor. Must be capable of constructing a subset visitor.
798
873
  * @param visibilitySubset selector among the visible facet sets extracted by partitionFacetIndicesByVisibilityVector
799
874
  * * 0 ==> forward facing
800
875
  * * 1 ==> rear facing
@@ -802,21 +877,29 @@ export class PolyfaceQuery {
802
877
  * @param vectorToEye the vector to eye
803
878
  * @param sideAngleTolerance the tolerance of side angle
804
879
  */
805
- static boundaryOfVisibleSubset(polyface, visibilitySelect, vectorToEye, sideAngleTolerance = Angle.createDegrees(1.0e-3)) {
806
- const partitionedIndices = this.partitionFacetIndicesByVisibilityVector(polyface, vectorToEye, sideAngleTolerance);
880
+ static boundaryOfVisibleSubset(source, visibilitySelect, vectorToEye, sideAngleTolerance = Angle.createDegrees(1.0e-3)) {
881
+ const visitor = source instanceof Polyface ? source.createVisitor(0) : source;
882
+ if (!visitor.createSubsetVisitor)
883
+ return undefined;
884
+ const partitionedIndices = this.partitionFacetIndicesByVisibilityVector(source, vectorToEye, sideAngleTolerance);
807
885
  if (partitionedIndices[visibilitySelect].length === 0)
808
886
  return undefined;
809
- const visitor = IndexedPolyfaceSubsetVisitor.createSubsetVisitor(polyface, partitionedIndices[visibilitySelect], 1);
810
- return this.boundaryEdges(visitor, true, false, false);
887
+ const subsetVisitor = visitor.createSubsetVisitor(partitionedIndices[visibilitySelect], 1);
888
+ return this.boundaryEdges(subsetVisitor, true, false, false);
811
889
  }
812
890
  /**
813
- * Search for edges with only 1 adjacent facet.
814
- * * Accumulate them into chains.
815
- * * Emit the chains to the `announceChain` callback.
891
+ * Announce boundary edges of the facet set as linestrings.
892
+ * * Ignores non-manifold interior edges and null edges.
893
+ * @param source polyface or visitor.
894
+ * @param announceChain function to be called with each chain of boundary edges.
895
+ * @see [[collectBoundaryEdges]] for boundary chain collection
896
+ * @see [[announceBoundaryEdges]] for boundary edge announcement
897
+ * @see [[boundaryEdges]] for boundary edge collection
816
898
  */
817
- static announceBoundaryChainsAsLineString3d(mesh, announceChain) {
899
+ static announceBoundaryChainsAsLineString3d(source, announceChain) {
818
900
  const collector = new MultiChainCollector(Geometry.smallMetricDistance); // no planarity tolerance needed
819
- PolyfaceQuery.announceBoundaryEdges(mesh, (pointA, pointB, _indexA, _indexB) => collector.captureCurve(LineSegment3d.create(pointA, pointB)), true, false, false);
901
+ const announceEdge = (ptA, ptB) => collector.captureCurve(LineSegment3d.create(ptA, ptB));
902
+ PolyfaceQuery.announceBoundaryEdges(source, announceEdge, true, false, false);
820
903
  collector.announceChainsAsLineString3d(announceChain);
821
904
  }
822
905
  /**
@@ -1161,94 +1244,99 @@ export class PolyfaceQuery {
1161
1244
  });
1162
1245
  return builder.claimPolyface(true);
1163
1246
  }
1164
- /** @deprecated in 4.x. Use [[sweepLineStringToFacetsXYReturnSweptFacets]] instead. */
1247
+ /** @deprecated in 4.7.0 - will not be removed until after 2026-06-13. Use [[sweepLineStringToFacetsXYReturnSweptFacets]] instead. */
1165
1248
  static sweepLinestringToFacetsXYreturnSweptFacets(linestringPoints, polyface) {
1166
1249
  return this.sweepLineStringToFacetsXYReturnSweptFacets(linestringPoints, polyface);
1167
1250
  }
1168
1251
  /**
1169
- * Sweep the line string to intersections with a mesh.
1170
- * * Return collected line segments.
1171
- * * If no options are given, the default sweep direction is the z-axis, and chains are assembled and returned.
1172
- * * See [[SweepLineStringToFacetsOptions]] for input and output options, including filtering by forward/side/rear facets.
1252
+ * Sweep the line string to intersections with a mesh and return collected line segments.
1173
1253
  * * Facets are ASSUMED to be convex and planar, and not overlap in the sweep direction.
1254
+ * @param points the linestring to drape onto the mesh.
1255
+ * @param source target facet set. For best results, facets should be convex and planar.
1256
+ * @param options input, filtering, search, and output options.
1257
+ * * If `undefined`, the default sweep direction is the positive z-axis, and chains are assembled and returned.
1258
+ * * For faster _vertical_ sweep, a pre-computed range tree can be supplied in `options.searcher`.
1259
+ * * For faster _non-vertical_ sweep, first transform inputs with the inverse of the transform
1260
+ * `T = Transform.createRigidFromOriginAndVector(undefined, options.vectorToEye)`, construct the searcher on these
1261
+ * local facets, call `sweepLineStringToFacets/XY` with these local inputs (and default sweep direction), and lastly,
1262
+ * transform the returned draped linework back to world coordinates with `T`.
1174
1263
  */
1175
- static sweepLineStringToFacets(linestringPoints, polyfaceOrVisitor, options) {
1264
+ static sweepLineStringToFacets(points, source, options) {
1176
1265
  let result = [];
1177
- // setup default options
1178
1266
  if (options === undefined)
1179
- options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createRadians(Geometry.smallAngleRadians), // tight geometry tolerance for vertical side facets
1180
- true, true, true, true);
1267
+ options = SweepLineStringToFacetsOptions.create();
1181
1268
  let chainContext;
1182
1269
  if (options.assembleChains)
1183
1270
  chainContext = ChainMergeContext.create();
1184
- const context = ClipSweptLineStringContext.create(linestringPoints, options.vectorToEye);
1185
- if (context) {
1186
- let visitor;
1187
- if (polyfaceOrVisitor instanceof Polyface)
1188
- visitor = polyfaceOrVisitor.createVisitor(0);
1189
- else
1190
- visitor = polyfaceOrVisitor;
1191
- const workNormal = Vector3d.createZero();
1192
- for (visitor.reset(); visitor.moveToNextFacet();) {
1193
- if (options.collectFromThisFacetNormal(PolygonOps.areaNormalGo(visitor.point, workNormal))) {
1194
- context.processPolygon(visitor.point.getArray(), (pointA, pointB) => {
1195
- if (chainContext !== undefined)
1196
- chainContext.addSegment(pointA, pointB);
1197
- else
1198
- result.push(LineSegment3d.create(pointA, pointB));
1199
- });
1271
+ const addSegment = chainContext ? (ptA, ptB) => chainContext.addSegment(ptA, ptB) : (ptA, ptB) => result.push(LineSegment3d.create(ptA, ptB));
1272
+ const workNormal = Vector3d.createZero();
1273
+ const visitor = source instanceof Polyface ? source.createVisitor(0) : source;
1274
+ visitor.setNumWrap(0);
1275
+ if (options.searcher && options.vectorToEye.isParallelTo(Vector3d.unitZ())) {
1276
+ const searchRange = Range3d.createNull();
1277
+ const workPoint0 = Point3d.createZero();
1278
+ const workPoint1 = Point3d.createZero();
1279
+ let edgeClipper;
1280
+ const clipEdgeToConvexPolygon = (_facetRange, readIndex) => {
1281
+ if (visitor.moveToReadIndex(readIndex) && (options.collectAll || options.collectFromThisFacetNormal(PolygonOps.areaNormalGo(visitor.point, workNormal))))
1282
+ edgeClipper?.processPolygon(visitor.point, (ptA, ptB) => addSegment(ptA, ptB));
1283
+ return true;
1284
+ };
1285
+ for (let i = 1; i < points.length; i++) {
1286
+ points.getPoint3dAtUncheckedPointIndex(i - 1, workPoint0);
1287
+ points.getPoint3dAtUncheckedPointIndex(i, workPoint1);
1288
+ if (edgeClipper = EdgeClipData.createPointPointSweep(workPoint0, workPoint1, options.vectorToEye)) {
1289
+ searchRange.setNull();
1290
+ searchRange.extend(workPoint0, workPoint1);
1291
+ options.searcher.searchRange2d(searchRange, clipEdgeToConvexPolygon);
1200
1292
  }
1201
1293
  }
1202
- if (chainContext !== undefined) {
1203
- chainContext.clusterAndMergeVerticesXYZ();
1204
- result = chainContext.collectMaximalChains();
1294
+ }
1295
+ else {
1296
+ const context = ClipSweptLineStringContext.create(points, options.vectorToEye);
1297
+ if (context) {
1298
+ for (visitor.reset(); visitor.moveToNextFacet();) {
1299
+ if (options.collectAll || options.collectFromThisFacetNormal(PolygonOps.areaNormalGo(visitor.point, workNormal)))
1300
+ context.processPolygon(visitor.point.getArray(), addSegment);
1301
+ }
1205
1302
  }
1206
1303
  }
1304
+ if (chainContext) {
1305
+ chainContext.clusterAndMergeVerticesXYZ();
1306
+ result = chainContext.collectMaximalChains();
1307
+ }
1207
1308
  return result;
1208
1309
  }
1209
1310
  /**
1210
1311
  * Sweep the line string in the z-direction to intersections with a mesh, using a search object for speedup.
1211
- * @param lineStringPoints input line string to drape on the mesh.
1212
- * @param polyfaceOrVisitor mesh, or mesh visitor to traverse only part of a mesh.
1213
- * @param searchByReadIndex object for searching facet 2D ranges tagged by mesh read index.
1214
- * @example Using a 5x5 indexed search grid:
1215
- * ```
1216
- * const xyRange = Range2d.createFrom(myPolyface.range());
1217
- * const searcher = GriddedRaggedRange2dSetWithOverflow.create<number>(xyRange, 5, 5)!;
1218
- * for (const visitor = myPolyface.createVisitor(0); visitor.moveToNextFacet();) {
1219
- * searcher.addRange(visitor.point.getRange(), visitor.currentReadIndex());
1220
- * }
1221
- * const drapedLineStrings = PolyfaceQuery.sweepLineStringToFacetsXY(lineString, myPolyface, searcher);
1222
- * ```
1312
+ * @param points the linestring to drape onto the mesh.
1313
+ * @param source target facet set. For best results, facets should be convex and planar.
1314
+ * @param searcher object for searching facet 2D ranges tagged by mesh read index.
1223
1315
  * @returns the collected line strings.
1316
+ * @see [[sweepLineStringToFacets]] for further options.
1224
1317
  */
1225
- static sweepLineStringToFacetsXY(lineStringPoints, polyfaceOrVisitor, searchByReadIndex) {
1318
+ static sweepLineStringToFacetsXY(points, source, searcher) {
1226
1319
  const chainContext = ChainMergeContext.create();
1227
- const sweepVector = Vector3d.create(0, 0, 1);
1320
+ const vectorToEye = Vector3d.unitZ();
1228
1321
  const searchRange = Range3d.create();
1229
- let visitor;
1230
- if (polyfaceOrVisitor instanceof Polyface)
1231
- visitor = polyfaceOrVisitor.createVisitor(0);
1232
- else
1233
- visitor = polyfaceOrVisitor;
1234
- let lineStringSource;
1235
- if (Array.isArray(lineStringPoints))
1236
- lineStringSource = new Point3dArrayCarrier(lineStringPoints);
1237
- else
1238
- lineStringSource = lineStringPoints;
1322
+ const workPoint0 = Point3d.createZero();
1323
+ const workPoint1 = Point3d.createZero();
1324
+ const visitor = source instanceof Polyface ? source.createVisitor(0) : source;
1325
+ visitor.setNumWrap(0);
1326
+ let edgeClipper;
1327
+ const clipEdgeToConvexPolygon = (_facetRange, readIndex) => {
1328
+ if (visitor.moveToReadIndex(readIndex))
1329
+ edgeClipper?.processPolygon(visitor.point, (ptA, ptB) => chainContext.addSegment(ptA, ptB));
1330
+ return true;
1331
+ };
1332
+ const lineStringSource = Array.isArray(points) ? new Point3dArrayCarrier(points) : points;
1239
1333
  for (let i = 1; i < lineStringSource.length; i++) {
1240
- const point0 = lineStringSource.getPoint3dAtUncheckedPointIndex(i - 1);
1241
- const point1 = lineStringSource.getPoint3dAtUncheckedPointIndex(i);
1242
- const edgeClipper = EdgeClipData.createPointPointSweep(point0, point1, sweepVector);
1243
- if (edgeClipper !== undefined) {
1244
- Range3d.createNull(searchRange);
1245
- searchRange.extendPoint(point0);
1246
- searchRange.extendPoint(point1);
1247
- searchByReadIndex.searchRange2d(searchRange, (_facetRange, readIndex) => {
1248
- if (visitor.moveToReadIndex(readIndex))
1249
- edgeClipper.processPolygon(visitor.point, (pointA, pointB) => chainContext.addSegment(pointA, pointB));
1250
- return true;
1251
- });
1334
+ lineStringSource.getPoint3dAtUncheckedPointIndex(i - 1, workPoint0);
1335
+ lineStringSource.getPoint3dAtUncheckedPointIndex(i, workPoint1);
1336
+ if (edgeClipper = EdgeClipData.createPointPointSweep(workPoint0, workPoint1, vectorToEye)) {
1337
+ searchRange.setNull();
1338
+ searchRange.extend(workPoint0, workPoint1);
1339
+ searcher.searchRange2d(searchRange, clipEdgeToConvexPolygon);
1252
1340
  }
1253
1341
  }
1254
1342
  chainContext.clusterAndMergeVerticesXYZ();
@@ -1259,24 +1347,20 @@ export class PolyfaceQuery {
1259
1347
  * * Return collected line segments.
1260
1348
  * * This calls [[sweepLineStringToFacets]] with options created by
1261
1349
  * `const options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createSmallAngle(), false, true, true, true);`
1262
- * @deprecated in 4.x. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
1350
+ * @deprecated in 4.7.0 - will not be removed until after 2026-06-13. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
1263
1351
  */
1264
1352
  static sweepLinestringToFacetsXYReturnLines(linestringPoints, polyface) {
1265
1353
  const options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createSmallAngle(), false, true, true, true);
1266
- const result = PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface, options);
1267
- return result;
1354
+ return PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface, options);
1268
1355
  }
1269
1356
  /**
1270
1357
  * Find segments (within the linestring) which project to facets.
1271
1358
  * * Return chains.
1272
- * * This calls [[sweepLineStringToFacets]] with options created by
1273
- * `const options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createSmallAngle(),true, true, true, true);`
1274
- * @deprecated in 4.x. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
1359
+ * * This calls [[sweepLineStringToFacets]] with default options.
1360
+ * @deprecated in 4.7.0 - will not be removed until after 2026-06-13. Use [[PolyfaceQuery.sweepLineStringToFacets]] to get further options.
1275
1361
  */
1276
1362
  static sweepLinestringToFacetsXYReturnChains(linestringPoints, polyface) {
1277
- const options = SweepLineStringToFacetsOptions.create(Vector3d.unitZ(), Angle.createSmallAngle(), true, true, true, true);
1278
- const result = PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface, options);
1279
- return result;
1363
+ return PolyfaceQuery.sweepLineStringToFacets(linestringPoints, polyface);
1280
1364
  }
1281
1365
  /**
1282
1366
  * Find segments (within the linestring) which project to facets.
@@ -1528,11 +1612,11 @@ export class PolyfaceQuery {
1528
1612
  static setEdgeVisibility(polyface, clusters, value) {
1529
1613
  for (const cluster of clusters) {
1530
1614
  if (cluster instanceof SortableEdge) {
1531
- this.setSingleEdgeVisibility(polyface, cluster.facetIndex, cluster.vertexIndexA, value);
1615
+ this.setSingleEdgeVisibility(polyface, cluster.facetIndex, cluster.startVertex, value);
1532
1616
  }
1533
1617
  else if (Array.isArray(cluster)) {
1534
1618
  for (const e1 of cluster)
1535
- this.setSingleEdgeVisibility(polyface, e1.facetIndex, e1.vertexIndexA, value);
1619
+ this.setSingleEdgeVisibility(polyface, e1.facetIndex, e1.startVertex, value);
1536
1620
  }
1537
1621
  }
1538
1622
  }
@@ -1634,8 +1718,8 @@ export class PolyfaceQuery {
1634
1718
  && undefined !== PolyfaceQuery.computeFacetUnitNormal(visitor, e1.facetIndex, normal1)) {
1635
1719
  const edgeAngle = normal0.smallerUnorientedAngleTo(normal1);
1636
1720
  if (edgeAngle.radians > sharpEdgeAngle.radians) {
1637
- this.setSingleEdgeVisibility(mesh, e0.facetIndex, e0.vertexIndexA, true);
1638
- this.setSingleEdgeVisibility(mesh, e1.facetIndex, e1.vertexIndexA, true);
1721
+ this.setSingleEdgeVisibility(mesh, e0.facetIndex, e0.startVertex, true);
1722
+ this.setSingleEdgeVisibility(mesh, e1.facetIndex, e1.startVertex, true);
1639
1723
  }
1640
1724
  }
1641
1725
  }