@itwin/core-geometry 4.3.0-dev.9 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (336) hide show
  1. package/CHANGELOG.md +52 -1
  2. package/lib/cjs/Geometry.d.ts +14 -2
  3. package/lib/cjs/Geometry.d.ts.map +1 -1
  4. package/lib/cjs/Geometry.js +20 -9
  5. package/lib/cjs/Geometry.js.map +1 -1
  6. package/lib/cjs/bspline/BSpline1dNd.d.ts +12 -2
  7. package/lib/cjs/bspline/BSpline1dNd.d.ts.map +1 -1
  8. package/lib/cjs/bspline/BSpline1dNd.js +27 -17
  9. package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
  10. package/lib/cjs/bspline/BSplineCurve.d.ts +30 -16
  11. package/lib/cjs/bspline/BSplineCurve.d.ts.map +1 -1
  12. package/lib/cjs/bspline/BSplineCurve.js +68 -44
  13. package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
  14. package/lib/cjs/bspline/BSplineCurve3dH.d.ts +27 -20
  15. package/lib/cjs/bspline/BSplineCurve3dH.d.ts.map +1 -1
  16. package/lib/cjs/bspline/BSplineCurve3dH.js +136 -87
  17. package/lib/cjs/bspline/BSplineCurve3dH.js.map +1 -1
  18. package/lib/cjs/bspline/BSplineSurface.d.ts +138 -74
  19. package/lib/cjs/bspline/BSplineSurface.d.ts.map +1 -1
  20. package/lib/cjs/bspline/BSplineSurface.js +242 -119
  21. package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
  22. package/lib/cjs/bspline/Bezier1dNd.d.ts +18 -4
  23. package/lib/cjs/bspline/Bezier1dNd.d.ts.map +1 -1
  24. package/lib/cjs/bspline/Bezier1dNd.js +19 -5
  25. package/lib/cjs/bspline/Bezier1dNd.js.map +1 -1
  26. package/lib/cjs/bspline/BezierCurve3dH.d.ts.map +1 -1
  27. package/lib/cjs/bspline/BezierCurve3dH.js +2 -1
  28. package/lib/cjs/bspline/BezierCurve3dH.js.map +1 -1
  29. package/lib/cjs/bspline/KnotVector.d.ts +30 -33
  30. package/lib/cjs/bspline/KnotVector.d.ts.map +1 -1
  31. package/lib/cjs/bspline/KnotVector.js +76 -69
  32. package/lib/cjs/bspline/KnotVector.js.map +1 -1
  33. package/lib/cjs/clipping/ClipUtils.d.ts +32 -5
  34. package/lib/cjs/clipping/ClipUtils.d.ts.map +1 -1
  35. package/lib/cjs/clipping/ClipUtils.js +92 -11
  36. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  37. package/lib/cjs/core-geometry.d.ts +0 -2
  38. package/lib/cjs/core-geometry.d.ts.map +1 -1
  39. package/lib/cjs/core-geometry.js +0 -2
  40. package/lib/cjs/core-geometry.js.map +1 -1
  41. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  42. package/lib/cjs/curve/Arc3d.js +5 -5
  43. package/lib/cjs/curve/Arc3d.js.map +1 -1
  44. package/lib/cjs/curve/CurveLocationDetail.d.ts +1 -4
  45. package/lib/cjs/curve/CurveLocationDetail.d.ts.map +1 -1
  46. package/lib/cjs/curve/CurveLocationDetail.js +4 -10
  47. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  48. package/lib/cjs/curve/CurveOps.d.ts +4 -5
  49. package/lib/cjs/curve/CurveOps.d.ts.map +1 -1
  50. package/lib/cjs/curve/CurveOps.js +1 -1
  51. package/lib/cjs/curve/CurveOps.js.map +1 -1
  52. package/lib/cjs/curve/CurveTypes.d.ts +14 -2
  53. package/lib/cjs/curve/CurveTypes.d.ts.map +1 -1
  54. package/lib/cjs/curve/CurveTypes.js.map +1 -1
  55. package/lib/cjs/curve/LineString3d.d.ts +3 -2
  56. package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
  57. package/lib/cjs/curve/LineString3d.js +1 -0
  58. package/lib/cjs/curve/LineString3d.js.map +1 -1
  59. package/lib/cjs/curve/PointString3d.d.ts +2 -1
  60. package/lib/cjs/curve/PointString3d.d.ts.map +1 -1
  61. package/lib/cjs/curve/PointString3d.js.map +1 -1
  62. package/lib/cjs/curve/RegionOps.d.ts +5 -11
  63. package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
  64. package/lib/cjs/curve/RegionOps.js.map +1 -1
  65. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +15 -9
  66. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
  67. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +68 -56
  68. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  69. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts +14 -16
  70. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  71. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +51 -69
  72. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  73. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.d.ts.map +1 -1
  74. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js +3 -2
  75. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  76. package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts +2 -3
  77. package/lib/cjs/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
  78. package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
  79. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts +4 -4
  80. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
  81. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +38 -36
  82. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  83. package/lib/cjs/geometry3d/Angle.d.ts +0 -1
  84. package/lib/cjs/geometry3d/Angle.d.ts.map +1 -1
  85. package/lib/cjs/geometry3d/Angle.js +0 -1
  86. package/lib/cjs/geometry3d/Angle.js.map +1 -1
  87. package/lib/cjs/geometry3d/CoincidentGeometryOps.d.ts +21 -5
  88. package/lib/cjs/geometry3d/CoincidentGeometryOps.d.ts.map +1 -1
  89. package/lib/cjs/geometry3d/CoincidentGeometryOps.js +71 -45
  90. package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
  91. package/lib/cjs/geometry3d/Matrix3d.d.ts +20 -13
  92. package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
  93. package/lib/cjs/geometry3d/Matrix3d.js +28 -21
  94. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  95. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +11 -2
  96. package/lib/cjs/geometry3d/Point3dVector3d.d.ts.map +1 -1
  97. package/lib/cjs/geometry3d/Point3dVector3d.js +16 -5
  98. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  99. package/lib/cjs/geometry3d/PointHelpers.d.ts +58 -20
  100. package/lib/cjs/geometry3d/PointHelpers.d.ts.map +1 -1
  101. package/lib/cjs/geometry3d/PointHelpers.js +213 -62
  102. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  103. package/lib/cjs/geometry3d/Segment1d.d.ts +5 -1
  104. package/lib/cjs/geometry3d/Segment1d.d.ts.map +1 -1
  105. package/lib/cjs/geometry3d/Segment1d.js +11 -7
  106. package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
  107. package/lib/cjs/geometry3d/Transform.d.ts +4 -5
  108. package/lib/cjs/geometry3d/Transform.d.ts.map +1 -1
  109. package/lib/cjs/geometry3d/Transform.js +4 -5
  110. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  111. package/lib/cjs/geometry4d/Point4d.d.ts +13 -0
  112. package/lib/cjs/geometry4d/Point4d.d.ts.map +1 -1
  113. package/lib/cjs/geometry4d/Point4d.js +21 -0
  114. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  115. package/lib/cjs/numerics/BezierPolynomials.d.ts +88 -64
  116. package/lib/cjs/numerics/BezierPolynomials.d.ts.map +1 -1
  117. package/lib/cjs/numerics/BezierPolynomials.js +92 -73
  118. package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
  119. package/lib/cjs/numerics/Newton.d.ts +143 -61
  120. package/lib/cjs/numerics/Newton.d.ts.map +1 -1
  121. package/lib/cjs/numerics/Newton.js +233 -66
  122. package/lib/cjs/numerics/Newton.js.map +1 -1
  123. package/lib/cjs/numerics/PascalCoefficients.d.ts +8 -12
  124. package/lib/cjs/numerics/PascalCoefficients.d.ts.map +1 -1
  125. package/lib/cjs/numerics/PascalCoefficients.js +10 -12
  126. package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
  127. package/lib/cjs/numerics/Polynomials.d.ts +6 -10
  128. package/lib/cjs/numerics/Polynomials.d.ts.map +1 -1
  129. package/lib/cjs/numerics/Polynomials.js +6 -10
  130. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  131. package/lib/cjs/polyface/PolyfaceBuilder.d.ts +3 -0
  132. package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
  133. package/lib/cjs/polyface/PolyfaceBuilder.js +13 -2
  134. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  135. package/lib/cjs/polyface/PolyfaceData.d.ts +1 -1
  136. package/lib/cjs/polyface/PolyfaceData.js +1 -1
  137. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  138. package/lib/cjs/polyface/PolyfaceQuery.d.ts +38 -11
  139. package/lib/cjs/polyface/PolyfaceQuery.d.ts.map +1 -1
  140. package/lib/cjs/polyface/PolyfaceQuery.js +93 -16
  141. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  142. package/lib/cjs/serialization/BGFBReader.d.ts +10 -10
  143. package/lib/cjs/serialization/BGFBReader.d.ts.map +1 -1
  144. package/lib/cjs/serialization/BGFBReader.js +69 -42
  145. package/lib/cjs/serialization/BGFBReader.js.map +1 -1
  146. package/lib/cjs/serialization/BGFBWriter.d.ts +8 -8
  147. package/lib/cjs/serialization/BGFBWriter.d.ts.map +1 -1
  148. package/lib/cjs/serialization/BGFBWriter.js +80 -55
  149. package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
  150. package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
  151. package/lib/cjs/serialization/GeometrySamples.js +6 -8
  152. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  153. package/lib/cjs/serialization/IModelJsonSchema.d.ts +8 -14
  154. package/lib/cjs/serialization/IModelJsonSchema.d.ts.map +1 -1
  155. package/lib/cjs/serialization/IModelJsonSchema.js +85 -259
  156. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  157. package/lib/cjs/serialization/SerializationHelpers.d.ts +109 -0
  158. package/lib/cjs/serialization/SerializationHelpers.d.ts.map +1 -0
  159. package/lib/cjs/serialization/SerializationHelpers.js +591 -0
  160. package/lib/cjs/serialization/SerializationHelpers.js.map +1 -0
  161. package/lib/cjs/topology/Graph.d.ts +399 -366
  162. package/lib/cjs/topology/Graph.d.ts.map +1 -1
  163. package/lib/cjs/topology/Graph.js +531 -464
  164. package/lib/cjs/topology/Graph.js.map +1 -1
  165. package/lib/cjs/topology/MaskManager.d.ts +8 -9
  166. package/lib/cjs/topology/MaskManager.d.ts.map +1 -1
  167. package/lib/cjs/topology/MaskManager.js +11 -12
  168. package/lib/cjs/topology/MaskManager.js.map +1 -1
  169. package/lib/esm/Geometry.d.ts +14 -2
  170. package/lib/esm/Geometry.d.ts.map +1 -1
  171. package/lib/esm/Geometry.js +20 -9
  172. package/lib/esm/Geometry.js.map +1 -1
  173. package/lib/esm/bspline/BSpline1dNd.d.ts +12 -2
  174. package/lib/esm/bspline/BSpline1dNd.d.ts.map +1 -1
  175. package/lib/esm/bspline/BSpline1dNd.js +27 -17
  176. package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
  177. package/lib/esm/bspline/BSplineCurve.d.ts +30 -16
  178. package/lib/esm/bspline/BSplineCurve.d.ts.map +1 -1
  179. package/lib/esm/bspline/BSplineCurve.js +68 -44
  180. package/lib/esm/bspline/BSplineCurve.js.map +1 -1
  181. package/lib/esm/bspline/BSplineCurve3dH.d.ts +27 -20
  182. package/lib/esm/bspline/BSplineCurve3dH.d.ts.map +1 -1
  183. package/lib/esm/bspline/BSplineCurve3dH.js +137 -88
  184. package/lib/esm/bspline/BSplineCurve3dH.js.map +1 -1
  185. package/lib/esm/bspline/BSplineSurface.d.ts +138 -74
  186. package/lib/esm/bspline/BSplineSurface.d.ts.map +1 -1
  187. package/lib/esm/bspline/BSplineSurface.js +242 -119
  188. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  189. package/lib/esm/bspline/Bezier1dNd.d.ts +18 -4
  190. package/lib/esm/bspline/Bezier1dNd.d.ts.map +1 -1
  191. package/lib/esm/bspline/Bezier1dNd.js +19 -5
  192. package/lib/esm/bspline/Bezier1dNd.js.map +1 -1
  193. package/lib/esm/bspline/BezierCurve3dH.d.ts.map +1 -1
  194. package/lib/esm/bspline/BezierCurve3dH.js +2 -1
  195. package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
  196. package/lib/esm/bspline/KnotVector.d.ts +30 -33
  197. package/lib/esm/bspline/KnotVector.d.ts.map +1 -1
  198. package/lib/esm/bspline/KnotVector.js +76 -69
  199. package/lib/esm/bspline/KnotVector.js.map +1 -1
  200. package/lib/esm/clipping/ClipUtils.d.ts +32 -5
  201. package/lib/esm/clipping/ClipUtils.d.ts.map +1 -1
  202. package/lib/esm/clipping/ClipUtils.js +92 -11
  203. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  204. package/lib/esm/core-geometry.d.ts +0 -2
  205. package/lib/esm/core-geometry.d.ts.map +1 -1
  206. package/lib/esm/core-geometry.js +0 -2
  207. package/lib/esm/core-geometry.js.map +1 -1
  208. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  209. package/lib/esm/curve/Arc3d.js +5 -5
  210. package/lib/esm/curve/Arc3d.js.map +1 -1
  211. package/lib/esm/curve/CurveLocationDetail.d.ts +1 -4
  212. package/lib/esm/curve/CurveLocationDetail.d.ts.map +1 -1
  213. package/lib/esm/curve/CurveLocationDetail.js +4 -10
  214. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  215. package/lib/esm/curve/CurveOps.d.ts +4 -5
  216. package/lib/esm/curve/CurveOps.d.ts.map +1 -1
  217. package/lib/esm/curve/CurveOps.js +1 -1
  218. package/lib/esm/curve/CurveOps.js.map +1 -1
  219. package/lib/esm/curve/CurveTypes.d.ts +14 -2
  220. package/lib/esm/curve/CurveTypes.d.ts.map +1 -1
  221. package/lib/esm/curve/CurveTypes.js.map +1 -1
  222. package/lib/esm/curve/LineString3d.d.ts +3 -2
  223. package/lib/esm/curve/LineString3d.d.ts.map +1 -1
  224. package/lib/esm/curve/LineString3d.js +1 -0
  225. package/lib/esm/curve/LineString3d.js.map +1 -1
  226. package/lib/esm/curve/PointString3d.d.ts +2 -1
  227. package/lib/esm/curve/PointString3d.d.ts.map +1 -1
  228. package/lib/esm/curve/PointString3d.js.map +1 -1
  229. package/lib/esm/curve/RegionOps.d.ts +5 -11
  230. package/lib/esm/curve/RegionOps.d.ts.map +1 -1
  231. package/lib/esm/curve/RegionOps.js.map +1 -1
  232. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts +15 -9
  233. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.d.ts.map +1 -1
  234. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +69 -57
  235. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  236. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts +14 -16
  237. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.d.ts.map +1 -1
  238. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +51 -68
  239. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  240. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.d.ts.map +1 -1
  241. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js +3 -2
  242. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  243. package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts +2 -3
  244. package/lib/esm/curve/internalContexts/MultiChainCollector.d.ts.map +1 -1
  245. package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
  246. package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts +4 -4
  247. package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
  248. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +38 -36
  249. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  250. package/lib/esm/geometry3d/Angle.d.ts +0 -1
  251. package/lib/esm/geometry3d/Angle.d.ts.map +1 -1
  252. package/lib/esm/geometry3d/Angle.js +0 -1
  253. package/lib/esm/geometry3d/Angle.js.map +1 -1
  254. package/lib/esm/geometry3d/CoincidentGeometryOps.d.ts +21 -5
  255. package/lib/esm/geometry3d/CoincidentGeometryOps.d.ts.map +1 -1
  256. package/lib/esm/geometry3d/CoincidentGeometryOps.js +71 -45
  257. package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
  258. package/lib/esm/geometry3d/Matrix3d.d.ts +20 -13
  259. package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
  260. package/lib/esm/geometry3d/Matrix3d.js +28 -21
  261. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  262. package/lib/esm/geometry3d/Point3dVector3d.d.ts +11 -2
  263. package/lib/esm/geometry3d/Point3dVector3d.d.ts.map +1 -1
  264. package/lib/esm/geometry3d/Point3dVector3d.js +16 -5
  265. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  266. package/lib/esm/geometry3d/PointHelpers.d.ts +58 -20
  267. package/lib/esm/geometry3d/PointHelpers.d.ts.map +1 -1
  268. package/lib/esm/geometry3d/PointHelpers.js +213 -62
  269. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  270. package/lib/esm/geometry3d/Segment1d.d.ts +5 -1
  271. package/lib/esm/geometry3d/Segment1d.d.ts.map +1 -1
  272. package/lib/esm/geometry3d/Segment1d.js +11 -7
  273. package/lib/esm/geometry3d/Segment1d.js.map +1 -1
  274. package/lib/esm/geometry3d/Transform.d.ts +4 -5
  275. package/lib/esm/geometry3d/Transform.d.ts.map +1 -1
  276. package/lib/esm/geometry3d/Transform.js +4 -5
  277. package/lib/esm/geometry3d/Transform.js.map +1 -1
  278. package/lib/esm/geometry4d/Point4d.d.ts +13 -0
  279. package/lib/esm/geometry4d/Point4d.d.ts.map +1 -1
  280. package/lib/esm/geometry4d/Point4d.js +21 -0
  281. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  282. package/lib/esm/numerics/BezierPolynomials.d.ts +88 -64
  283. package/lib/esm/numerics/BezierPolynomials.d.ts.map +1 -1
  284. package/lib/esm/numerics/BezierPolynomials.js +92 -73
  285. package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
  286. package/lib/esm/numerics/Newton.d.ts +143 -61
  287. package/lib/esm/numerics/Newton.d.ts.map +1 -1
  288. package/lib/esm/numerics/Newton.js +229 -65
  289. package/lib/esm/numerics/Newton.js.map +1 -1
  290. package/lib/esm/numerics/PascalCoefficients.d.ts +8 -12
  291. package/lib/esm/numerics/PascalCoefficients.d.ts.map +1 -1
  292. package/lib/esm/numerics/PascalCoefficients.js +10 -12
  293. package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
  294. package/lib/esm/numerics/Polynomials.d.ts +6 -10
  295. package/lib/esm/numerics/Polynomials.d.ts.map +1 -1
  296. package/lib/esm/numerics/Polynomials.js +6 -10
  297. package/lib/esm/numerics/Polynomials.js.map +1 -1
  298. package/lib/esm/polyface/PolyfaceBuilder.d.ts +3 -0
  299. package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
  300. package/lib/esm/polyface/PolyfaceBuilder.js +13 -2
  301. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  302. package/lib/esm/polyface/PolyfaceData.d.ts +1 -1
  303. package/lib/esm/polyface/PolyfaceData.js +1 -1
  304. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  305. package/lib/esm/polyface/PolyfaceQuery.d.ts +38 -11
  306. package/lib/esm/polyface/PolyfaceQuery.d.ts.map +1 -1
  307. package/lib/esm/polyface/PolyfaceQuery.js +93 -16
  308. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  309. package/lib/esm/serialization/BGFBReader.d.ts +10 -10
  310. package/lib/esm/serialization/BGFBReader.d.ts.map +1 -1
  311. package/lib/esm/serialization/BGFBReader.js +69 -42
  312. package/lib/esm/serialization/BGFBReader.js.map +1 -1
  313. package/lib/esm/serialization/BGFBWriter.d.ts +8 -8
  314. package/lib/esm/serialization/BGFBWriter.d.ts.map +1 -1
  315. package/lib/esm/serialization/BGFBWriter.js +80 -55
  316. package/lib/esm/serialization/BGFBWriter.js.map +1 -1
  317. package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
  318. package/lib/esm/serialization/GeometrySamples.js +7 -9
  319. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  320. package/lib/esm/serialization/IModelJsonSchema.d.ts +8 -14
  321. package/lib/esm/serialization/IModelJsonSchema.d.ts.map +1 -1
  322. package/lib/esm/serialization/IModelJsonSchema.js +86 -260
  323. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  324. package/lib/esm/serialization/SerializationHelpers.d.ts +109 -0
  325. package/lib/esm/serialization/SerializationHelpers.d.ts.map +1 -0
  326. package/lib/esm/serialization/SerializationHelpers.js +588 -0
  327. package/lib/esm/serialization/SerializationHelpers.js.map +1 -0
  328. package/lib/esm/topology/Graph.d.ts +399 -366
  329. package/lib/esm/topology/Graph.d.ts.map +1 -1
  330. package/lib/esm/topology/Graph.js +531 -464
  331. package/lib/esm/topology/Graph.js.map +1 -1
  332. package/lib/esm/topology/MaskManager.d.ts +8 -9
  333. package/lib/esm/topology/MaskManager.d.ts.map +1 -1
  334. package/lib/esm/topology/MaskManager.js +11 -12
  335. package/lib/esm/topology/MaskManager.js.map +1 -1
  336. package/package.json +3 -4
@@ -11,566 +11,599 @@ import { XAndY, XYAndZ } from "../geometry3d/XYZProps";
11
11
  * * The mask member is a number which is used as set of single bit boolean values.
12
12
  * * Particular meanings of the various bits are HIGHLY application dependent.
13
13
  * * The EXTERIOR mask bit is widely used to mark nodes that are "outside" the active areas
14
- * * The PRIMARY_EDGE bit is widely used to indicate linework created directly from input data, hence protected from triangle edge flipping.
14
+ * * The PRIMARY_EDGE bit is widely used to indicate linework created directly from input data, hence protected from
15
+ * triangle edge flipping.
15
16
  * * The BOUNDARY bit is widely used to indicate that crossing this edge is a transition from outside to inside.
16
17
  * * VISITED is used locally in many searches.
17
18
  * * Never use VISITED unless the search logic is highly self contained.
18
19
  * @internal
19
20
  */
20
21
  export declare enum HalfEdgeMask {
21
- /** Mask commonly set consistently around exterior faces.
22
- * * A boundary edge with interior to one side, exterior to the other will have EXTERIOR only on the outside.
22
+ /**
23
+ * Mask commonly set consistently around exterior faces.
24
+ * * A boundary edge with interior to one side, exterior to the other, will have EXTERIOR only on the outside.
23
25
  * * An an edge inserted "within a purely exterior face" can have EXTERIOR on both sides.
24
26
  * * An interior edge (such as added during triangulation) will have no EXTERIOR bits.
25
27
  */
26
28
  EXTERIOR = 1,
27
- /** Mask commonly set (on both sides) of original geometry edges that are transition from outside from to inside.
28
- * * At the moment of creating an edge from primary user boundary loop coordinates, the fact that an edge is BOUNDARY is often clear even though
29
- * there is uncertainty about which side should be EXTERIOR.
29
+ /**
30
+ * Mask commonly set (on both sides) of original geometry edges that are transition from outside from to inside.
31
+ * * At the moment of creating an edge from primary user boundary loop coordinates, the fact that an edge is BOUNDARY
32
+ * is often clear even though there is uncertainty about which side should be EXTERIOR.
30
33
  */
31
34
  BOUNDARY_EDGE = 2,
32
- /** Mask commonly set (on both sides) of original geometry edges, but NOT indicating that the edge is certainly a boundary between outside and inside.
33
- * * For instance, if geometry is provided as stray sticks (not loops), it can be marked PRIMARY_EDGE but neither BOUNDARY_EDGE nor EXTERIOR_EDGE
35
+ /**
36
+ * Mask commonly set (on both sides) of original geometry edges, but NOT indicating that the edge is certainly a
37
+ * boundary between outside and inside.
38
+ * * For instance, if geometry is provided as stray sticks (not loops), it can be marked PRIMARY_EDGE but neither
39
+ * BOUNDARY_EDGE nor EXTERIOR_EDGE.
34
40
  */
35
41
  PRIMARY_EDGE = 4,
36
- /** Mask used for low level searches to identify previously-visited nodes */
42
+ /** Mask used for low level searches to identify previously-visited nodes. */
37
43
  VISITED = 16,
38
- /** Mask applied to triangles by earcut triangulator */
44
+ /** Mask applied to triangles by earcut triangulator. */
39
45
  TRIANGULATED_FACE = 256,
40
- /** mask applied in a face with 2 edges. */
46
+ /** Mask applied in a face with 2 edges. */
41
47
  NULL_FACE = 512,
42
- /** no mask bits */
48
+ /** No mask bits. */
43
49
  NULL_MASK = 0,
44
- /** The "upper 12 " bits of 32 bit integer. */
50
+ /** The "upper 12" bits of 32 bit integer reserved for grab/drop. */
45
51
  ALL_GRAB_DROP_MASKS = 4293918720,
46
- /** all mask bits */
52
+ /** All mask bits */
47
53
  ALL_MASK = 4294967295
48
54
  }
49
- /** function signature for function of one node with no return type restrictions
55
+ /**
56
+ * Function signature for function of one node with no return type restrictions.
50
57
  * @internal
51
58
  */
52
59
  export type NodeFunction = (node: HalfEdge) => any;
53
- /** function signature for function of one node, returning a number
60
+ /**
61
+ * Function signature for function of one node, returning a number.
54
62
  * @internal
55
63
  */
56
64
  export type NodeToNumberFunction = (node: HalfEdge) => number;
57
- /** function signature for function of one node, returning a boolean
65
+ /**
66
+ * Function signature for function of one node, returning a boolean.
58
67
  * @internal
59
68
  */
60
69
  export type HalfEdgeToBooleanFunction = (node: HalfEdge) => boolean;
61
- /** function signature for function of a node and a mask, returning a number
70
+ /**
71
+ * Function signature for function of a node and a mask, returning a number.
62
72
  * @internal
63
73
  */
64
74
  export type HalfEdgeAndMaskToBooleanFunction = (node: HalfEdge, mask: HalfEdgeMask) => boolean;
65
- /** function signature for function of a graph and a node, returning a boolean
75
+ /**
76
+ * Function signature for function of a graph and a node, returning a boolean.
66
77
  * @internal
67
78
  */
68
79
  export type GraphNodeFunction = (graph: HalfEdgeGraph, node: HalfEdge) => boolean;
69
- /** Non-topological data members in a half edge.
80
+ /**
81
+ * Non-topological data members in a half edge.
70
82
  * These are not part of adjacency and masking logic.
71
- */
72
- /** member fields for a half edge (which is also commonly called a node)
83
+ * Member fields for a half edge (which is also commonly called a node).
73
84
  * @internal
74
85
  */
75
86
  export interface HalfEdgeUserData {
76
- /** Vertex x coordinate */
87
+ /** Vertex x coordinate. */
77
88
  x: number;
78
- /** Vertex y coordinate */
89
+ /** Vertex y coordinate. */
79
90
  y: number;
80
- /** Vertex z coordinate */
91
+ /** Vertex z coordinate. */
81
92
  z: number;
82
- /** angle used for sort-around-vertex */
93
+ /** Angle used for sort-around-vertex. */
83
94
  sortAngle?: number;
84
- /** numeric value for application-specific tagging (e.g. sorting) */
95
+ /** Numeric value for application-specific tagging (e.g. sorting). */
85
96
  sortData?: number;
86
- /** application-specific data for the edge identifier.
87
- * * edge split operations are expected to copy this to new sub-edges.
97
+ /**
98
+ * Application-specific data for the edge identifier.
99
+ * * Edge split operations are expected to copy this to new sub-edges.
88
100
  */
89
101
  edgeTag?: any;
90
- /** application-specific data for the face loop
91
- * * edge split operations are expected to copy this to new sub-edges.
102
+ /**
103
+ * Application-specific data for the face loop.
104
+ * * Face split operations are expected to copy this to new nodes in the face.
92
105
  */
93
106
  faceTag?: any;
94
107
  }
95
108
  /**
109
+ * A HalfEdge is "one side of an edge" in a structure of faces, edges and vertices. From a node there are
110
+ * navigational links to:
111
+ * * "faceSuccessor" -- the next half edge in a loop around a face.
112
+ * * "facePredecessor" -- the previous half edge in a loop around a face.
113
+ * * "edgeMate" -- the node's partner on the other side of the edge.
114
+ *
115
+ * The next, prev, and mate are the essential connectivity. Additional node content is for application-specific
116
+ * uses. The most useful ones are:
117
+ * * x,y -- coordinates in the xy plane
118
+ * * z -- z coordinate. This is normally ignored during planar setup, but used for output.
119
+ * * maskBits -- an integer value manipulated as individual bits.
96
120
  *
97
- * * A HalfEdge is "one side of an edge" in a structure of faces, edges and vertices. From a node there are navigational links to:
98
- * ** "faceSuccessor" -- the next half edge in a loop around a face.
99
- * ** "facePredecessor" -- the previous half edge in a loop around a face.
100
- * ** "edgeMate" -- the node's partner on the other side of the edge.
101
- * * The next, prev, and mate are the essential connectivity. Additional node content is for application-specific
102
- * uses. The most useful ones are:
103
- * ** x,y -- coordinates in the xy plane
104
- * ** z -- z coordinate. This is normally ignored during planar setup, but used for output.
105
- * ** buffer -- a integer value manipulated as individual bits.
106
- * * In properly connected planar graph, interior face loops are counterclockwise. But that property (along with
107
- * expected masking) is a result of extensive validation of inputs, and is not true in intermediate phases
108
- * of graph manipulation.
121
+ * In properly connected planar graph, interior face loops are counterclockwise. But that property (along with
122
+ * expected masking) is a result of extensive validation of inputs, and is not true in intermediate phases of
123
+ * graph manipulation.
109
124
  * @internal
110
125
  */
111
126
  export declare class HalfEdge implements HalfEdgeUserData {
112
127
  /** Vertex index in some parent object's numbering. */
113
128
  i: number;
114
- /** bitmask bits, used to mark nodes as part of a triangle(idx 0) or visited when flipping(idx 1) */
129
+ /**
130
+ * Bitmask bits, used to set multiple flags on a node, indicating e.g., nodes on boundary edges, or in
131
+ * an exterior face, or nodes visited during graph computations.
132
+ * * See [[HalfEdgeMask]] for mask values.
133
+ */
115
134
  maskBits: number;
116
- /** Vertex x coordinate */
135
+ /** Vertex x coordinate. */
117
136
  x: number;
118
- /** Vertex y coordinate */
137
+ /** Vertex y coordinate. */
119
138
  y: number;
120
- /** Vertex z coordinate */
139
+ /** Vertex z coordinate. */
121
140
  z: number;
122
- /** angle used for sort-around-vertex */
141
+ /** Angle used for sort-around-vertex */
123
142
  sortAngle?: number;
124
- /** numeric value for application-specific tagging (e.g. sorting) */
143
+ /** Numeric value for application-specific tagging (e.g. sorting) */
125
144
  sortData?: number;
126
- /** application-specific data for the edge identifier.
145
+ /**
146
+ * Application-specific data for the edge identifier.
127
147
  * * edge split operations are expected to copy this to new sub-edges.
128
148
  */
129
149
  edgeTag?: any;
130
- /** application-specific data for the face loop
131
- * * edge split operations are expected to copy this to new sub-edges.
150
+ /**
151
+ * Application-specific data for the face loop.
152
+ * * Face split operations are expected to copy this to new nodes in the face.
132
153
  */
133
154
  faceTag?: any;
134
155
  private _id;
135
- /** id assigned sequentially during construction --- useful for debugging. */
136
- get id(): any;
156
+ /** Immutable ID assigned sequentially during construction --- useful for debugging. */
157
+ get id(): number;
137
158
  private _facePredecessor;
138
159
  private _faceSuccessor;
139
160
  private _edgeMate;
140
- /** previous half edge "around the face"
141
- */
161
+ /** Previous half edge "around the face" */
142
162
  get facePredecessor(): HalfEdge;
143
- /** next half edge "around the face" */
163
+ /** Next half edge "around the face" */
144
164
  get faceSuccessor(): HalfEdge;
145
- /** Half edge on the other side of this edge.
146
- */
165
+ /** Half edge on the other side of this edge. */
147
166
  get edgeMate(): HalfEdge;
148
- /** Take numStep face steps and return y coordinate
149
- * * positive steps are through faceSuccessor
150
- * * negative steps are through facePredecessor
167
+ private static _totalNodesCreated;
168
+ constructor(x?: number, y?: number, z?: number, i?: number);
169
+ /**
170
+ * Take numStep face steps and return y coordinate.
171
+ * * Positive steps are through faceSuccessor.
172
+ * * Negative steps are through facePredecessor.
151
173
  */
152
174
  faceStepY(numStep: number): number;
153
175
  /**
154
- * * Create 2 half edges.
176
+ * Create 2 half edges.
155
177
  * * The two edges are joined as edgeMate pair.
156
178
  * * The two edges are a 2-half-edge face loop in both the faceSuccessor and facePredecessor directions.
157
- * @returns Returns the reference to the first half edge created
179
+ * @returns the reference to the first half edge created.
158
180
  */
159
181
  static createHalfEdgePair(heArray: HalfEdge[] | undefined): HalfEdge;
160
182
  /**
161
183
  * * Create 2 half edges.
162
184
  * * The two edges are joined as edgeMate pair.
163
185
  * * The two edges are a 2-half-edge face loop in both the faceSuccessor and facePredecessor directions.
164
- * * Properties x,y,z,i are inserted in each
165
- * @returns Returns the reference to the first half edge created
186
+ * * Properties x,y,z,i are inserted in each half edge.
187
+ * @returns the reference to the first half edge created.
166
188
  */
167
189
  static createHalfEdgePairWithCoordinates(xA: number | undefined, yA: number | undefined, zA: number | undefined, iA: number | undefined, xB: number | undefined, yB: number | undefined, zB: number | undefined, iB: number | undefined, heArray: HalfEdge[] | undefined): HalfEdge;
168
190
  /**
169
- * * set heA <==> heB pointer relation through heA._faceSuccessor and heB._facePredecessor
191
+ * * Set heA <==> heB pointer relation through heA._faceSuccessor and heB._facePredecessor.
170
192
  * * This changes heA._faceSuccessor and heB._facePredecessor, but not heA._facePredecessor and heB._faceSuccessor.
171
- * * this must always be done with another call to reestablish the entire double-linked list.
193
+ * * This must always be done with another call to setFaceLinks(heB,heA) in order to re-establish the entire
194
+ * double-linked list.
172
195
  */
173
196
  private static setFaceLinks;
174
- /**
175
- * * set heA <==> heB pointer relation edgeMate
176
- */
197
+ /** set heA <==> heB pointer relation edgeMate. */
177
198
  private static setEdgeMates;
178
199
  /**
179
- * * Create a new vertex within the edge from base.
180
- * * Insert it "within" the base edge.
181
- * * This requires two new half edges.
182
- * * if the base is undefined, create a single-edge loop.
183
- * * This (unlike pinch) breaks the edgeMate pairing of the base edge.
184
- * * This preserves xyz and i properties at all existing vertices.
185
- * * on each side, if edgeTag is present it is copied to the new edge.
186
- * @returns Returns the reference to the half edge created.
200
+ * Create a new vertex within the edge beginning at `baseA`.
201
+ * * This creates two new nodes in their own vertex loop.
202
+ * * If the base is undefined, create a single-edge loop.
203
+ * * Existing nodes stay in their face and vertex loops and retain xyz and i values.
204
+ * * Unlike [[pinch]], this breaks the edgeMate pairing of the input edge:
205
+ * each node of the input edge gets a new node as its edge mate.
206
+ * * On each side of the edge, if edgeTag is present, it is copied to the new node on that side.
207
+ * @returns reference to the half edge created, the new face successor of `baseA`.
187
208
  */
188
209
  static splitEdge(baseA: undefined | HalfEdge, xA: number | undefined, yA: number | undefined, zA: number | undefined, iA: number | undefined, heArray: HalfEdge[] | undefined): HalfEdge;
189
210
  /**
190
- * * Create a new sliver face "inside" an existing edge.
191
- * * Insert it "within" the base edge.
192
- * * This requires two new half edges.
193
- * * if the base is undefined, create a single-edge loop.
194
- * * This (unlike pinch) breaks the edgeMate pairing of the base edge.
195
- * * This preserves xyz and i properties at all existing vertices.
196
- * * The two new half edges are a sliver face (via their predecessor and successor)
197
- * * Each new edge mates to one existing edge.
198
- * @returns Returns the reference to the half edge created.
211
+ * Create a new sliver face "inside" an existing edge.
212
+ * * This creates two nodes that are each face predecessor and successor to the other.
213
+ * * Existing nodes stay in their face and vertex loops and retain xyz and i values.
214
+ * * Unlike [[pinch]], this breaks the edgeMate pairing of the input edge:
215
+ * each node of the input edge gets a new node as its edge mate.
216
+ * * New nodes get the xyz and i values shared by the nodes in the vertex loops into which they are placed.
217
+ * * New nodes' faceTag and edgeTag are `undefined`.
218
+ * @returns reference to the half edge created in the vertex loop of baseA.
199
219
  */
200
220
  static splitEdgeCreateSliverFace(baseA: HalfEdge, heArray: HalfEdge[] | undefined): HalfEdge;
221
+ /** Edge property masks. */
201
222
  private static _edgePropertyMasks;
202
223
  /**
203
- * Copy "edge based" content of fromNode to toNode
224
+ * Copy "edge based" content of `fromNode` to `toNode`:
204
225
  * * edgeTag
205
- * * masks in _edgePropertyMasks: EXTERIOR, BOUNDARY_EDGE, NULL_FACE, PRIMARY_EDGE
206
- * @param fromNode
207
- * @param toNode
226
+ * * masks EXTERIOR, BOUNDARY_EDGE, NULL_FACE, PRIMARY_EDGE
208
227
  */
209
228
  static transferEdgeProperties(fromNode: HalfEdge, toNode: HalfEdge): void;
210
- private static _totalNodesCreated;
211
- constructor(x?: number, y?: number, z?: number, i?: number);
212
- /**
213
- * Return the next outbound half edge around this vertex in the CCW direction
214
- */
229
+ /** Return the next half edge around this vertex in the CCW direction. */
215
230
  get vertexSuccessor(): HalfEdge;
216
- /**
217
- * Return the next outbound half edge around this vertex in the CW direction
218
- */
231
+ /** Return the next half edge around this vertex in the CW direction. */
219
232
  get vertexPredecessor(): HalfEdge;
220
233
  /**
221
- * Set mask bits on this HalfEdge
222
- * @param mask mask to apply
234
+ * Set mask bits on this HalfEdge.
235
+ * @param mask mask bits to apply
223
236
  */
224
237
  setMask(mask: HalfEdgeMask): void;
225
238
  /**
226
- * Get mask bits from this HalfEdge
227
- * @param mask mask to query
239
+ * Get mask bits from this HalfEdge.
240
+ * @param mask mask bits to query
228
241
  */
229
242
  getMask(mask: HalfEdgeMask): number;
230
243
  /**
231
- * Clear mask bits from this HalfEdge
232
- * @param mask mask to clear
244
+ * Clear mask bits from this HalfEdge.
245
+ * @param mask mask bits to clear
233
246
  */
234
247
  clearMask(mask: HalfEdgeMask): void;
235
248
  /**
236
249
  * Set a mask at all nodes around a vertex.
237
- * @param mask mask to apply to the half edges around this HalfEdge's vertex loop
250
+ * @param mask mask to apply to the half edges around this HalfEdge's vertex loop.
238
251
  */
239
252
  setMaskAroundVertex(mask: HalfEdgeMask): void;
240
- /**
241
- * Set x,y,z at all nodes around a vertex.
242
- * @param mask mask to apply to the half edges around this HalfEdge's vertex loop
243
- */
253
+ /** Set x,y,z at all nodes around a vertex. */
244
254
  setXYZAroundVertex(x: number, y: number, z: number): void;
245
255
  /**
246
256
  * Apply a mask to all edges around a face.
247
- * @param mask mask to apply to the half edges around this HalfEdge's face loop
257
+ * @param mask mask to apply to the half edges around this HalfEdge's face loop.
248
258
  */
249
259
  setMaskAroundFace(mask: HalfEdgeMask): void;
250
260
  /**
251
261
  * Apply a mask to both sides of an edge.
252
- * @param mask mask to apply to this edge and its `edgeMate`
262
+ * @param mask mask to apply to this edge and its edgeMate.
253
263
  */
254
264
  setMaskAroundEdge(mask: HalfEdgeMask): void;
255
265
  /**
256
266
  * Clear a mask on both sides of an edge.
257
- * @param mask mask to clear on this edge and its `edgeMate`
267
+ * @param mask mask to clear on this edge and its edgeMate.
258
268
  */
259
269
  clearMaskAroundEdge(mask: HalfEdgeMask): void;
260
270
  /** Returns the number of edges around this face. */
261
271
  countEdgesAroundFace(): number;
262
- /** Return true if other is in the vertex loop around this. */
272
+ /** Return true if `other` node is in the vertex loop around `this` node. */
263
273
  findAroundVertex(other: HalfEdge): boolean;
264
- /** Return true if other is in the face loop around this. */
274
+ /** Return true if `other` node is in the face loop around `this` node. */
265
275
  findAroundFace(other: HalfEdge): boolean;
266
276
  /**
267
- * @return whether the mask is set (or unset) on all nodes of the face loop
277
+ * Returns whether the mask is set or unset on all nodes of the face loop.
278
+ * @param mask the mask to check.
279
+ * @param value true for mask set and false for mask unset.
268
280
  */
269
281
  isMaskedAroundFace(mask: HalfEdgeMask, value?: boolean): boolean;
270
282
  /**
271
- * Apply a edgeTag and mask to all edges around a face.
272
- * optionally apply it to all edge mates.
273
- * @param edgeTag tag to apply
274
- * @param bothSides If true, also apply the tag to the mates around the face.
283
+ * Apply a mask and edgeTag to all edges around a face. Optionally apply it to all edge mates.
284
+ * @param mask mask to apply.
285
+ * @param tag edgeTag to apply
286
+ * @param applyToMate If true, also apply the tag to the edge mates around the face.
275
287
  */
276
288
  setMaskAndEdgeTagAroundFace(mask: HalfEdgeMask, tag: any, applyToMate?: boolean): void;
277
289
  /** Returns the number of edges around vertex. */
278
290
  countEdgesAroundVertex(): number;
279
- /** Returns the number of nodes found with the given mask value around this vertex loop. */
291
+ /**
292
+ * Returns the number of nodes that match (or do not match) the given mask value around this face loop.
293
+ * @param mask the mask to check.
294
+ * @param value true for mask match and false for mask not match.
295
+ */
280
296
  countMaskAroundFace(mask: HalfEdgeMask, value?: boolean): number;
281
- /** Returns the number of nodes found with the given mask value around this vertex loop. */
297
+ /**
298
+ * Returns the number of nodes that match (or do not match) the given mask value around this vertex loop.
299
+ * @param mask the mask to check.
300
+ * @param value true for mask match and false for mask not match.
301
+ */
282
302
  countMaskAroundVertex(mask: HalfEdgeMask, value?: boolean): number;
283
- /** Returns the first node with given mask value around this vertex loop. */
303
+ /**
304
+ * Returns the first node that matches (or does not match) the given mask value around this vertex loop, starting
305
+ * with the instance node and proceeding via vertex successors.
306
+ * @param mask the mask to check.
307
+ * @param value true for mask match and false for mask not match.
308
+ */
284
309
  findMaskAroundVertex(mask: HalfEdgeMask, value?: boolean): HalfEdge | undefined;
285
- /** Returns the first node with given mask value around this face loop. */
310
+ /**
311
+ * Returns the first node that matches (or does not match) the given mask value around this face loop, starting
312
+ * with the instance node and proceeding via face successors.
313
+ * @param mask the mask to check.
314
+ * @param value true for mask match and false for mask not match.
315
+ */
286
316
  findMaskAroundFace(mask: HalfEdgeMask, value?: boolean): HalfEdge | undefined;
287
- /** Returns the first node with given mask value on this edge (i.e. examining this and this.mate) */
317
+ /**
318
+ * Returns the first node that matches (or does not match) the given mask value around this edge, starting
319
+ * with the instance node and then checking its edge mate.
320
+ * @param mask the mask to check.
321
+ * @param value true for mask match and false for mask not match.
322
+ */
288
323
  findMaskAroundEdge(mask: HalfEdgeMask, value?: boolean): HalfEdge | undefined;
289
- /** Set a mask, and return prior value.
290
- * @param mask mask to apply
324
+ /**
325
+ * Set a mask and return prior value.
326
+ * @param mask mask to apply.
291
327
  */
292
328
  testAndSetMask(mask: HalfEdgeMask): number;
293
329
  /**
294
- * Set (copy) the this.x, this.y, this.z from node.x, node.y, node.z
295
- * @param node node containing xyz
330
+ * Set `this.x`, `this.y`, `this.z` from `node.x`, `node.y`, `node.z`.
331
+ * @param node node containing xyz.
296
332
  */
297
333
  setXYZFrom(node: HalfEdge): void;
298
334
  /**
299
- * Set (copy) the this.x, this.y, this.z from xyz.x, xyz.y, xyz.z
335
+ * Set `this.x`, `this.y`, `this.z` from `xyz.x`, `xyz.y`, `xyz.z`.
300
336
  * @param node source with x,y,z properties
301
337
  */
302
338
  setXYZ(xyz: XYAndZ): void;
303
339
  /**
304
- * Test if mask bits are set in the node's bitMask.
305
- * @return Return true (as a simple boolean, not a mask) if any bits of the mask parameter match bits of the node's bitMask
340
+ * Test if any of the `mask` bits are set in the node's bitMask.
341
+ * @return true (as a simple boolean, not a mask) if any bits of the `mask` match bits of the node's bitMask.
306
342
  */
307
343
  isMaskSet(mask: HalfEdgeMask): boolean;
308
- /** (static!) method to test if a mask is set on a node.
309
- * This is used as filter in searches.
310
- * @returns true iff `node.isMaskSet (mask)`
344
+ /**
345
+ * Static method to test if any of the `mask` bits are set in the `node`'s bitMask.
346
+ * * This is used as filter in searches.
347
+ * @returns `node.isMaskSet(mask)`
311
348
  */
312
349
  static filterIsMaskOn(node: HalfEdge, mask: HalfEdgeMask): boolean;
313
- /** (static!) method to test if a mask is set on a node.
314
- * This is used as filter in searches.
315
- * @returns true iff `!node.isMaskSet (mask)`
350
+ /**
351
+ * Static method to test if any of the `mask` bits are set in the `node`'s bitMask.
352
+ * * This is used as filter in searches.
353
+ * @returns `!node.isMaskSet(mask)`
316
354
  */
317
355
  static filterIsMaskOff(node: HalfEdge, mask: HalfEdgeMask): boolean;
318
356
  /**
319
357
  * Create an edge with initial id,x,y at each end.
320
- * @param id0 id for first node
321
- * @param x0 x coordinate for first node
322
- * @param y0 y coordinate for first node
323
- * @param id1 id for second node
324
- * @param x1 x coordinate for second node
325
- * @param y1 y coordinate for second node
326
- */
327
- static createEdgeXYXY(id0: any, x0: number, y0: number, id1: any, x1: number, y1: number): HalfEdge;
328
- /** "pinch" ...
329
- *
330
- * * is the universal manipulator for manipulating a node's next and prev pointers
331
- * * swaps face predecessors of nodeA and nodeB.
332
- * * is its own inverse.
333
- * * if nodeA, nodeB are in different face loops, the loops join to one loop.
334
- * * if nodeA, nodeB are in the same face loop, the loop splits into two loops.
358
+ * @param id0 id for first node.
359
+ * @param x0 x coordinate for first node.
360
+ * @param y0 y coordinate for first node.
361
+ * @param id1 id for second node.
362
+ * @param x1 x coordinate for second node.
363
+ * @param y1 y coordinate for second node.
364
+ * @returns the reference to the new node at (x0,y0).
365
+ */
366
+ static createEdgeXYXY(id0: number, x0: number, y0: number, id1: number, x1: number, y1: number): HalfEdge;
367
+ /**
368
+ *"Pinch" is the universal operator for manipulating a node's next and previous pointers.
369
+ * * It is its own inverse: applying it twice on the same inputs (i.e., `pinch(a,b); pinch(a,b);`) gets back to
370
+ * where you started.
371
+ * * If the inputs are in different face loops, the loops join to one face loop after the pinch.
372
+ * * If the inputs are in the same face loop, the loop splits into two face loops after the pinch.
335
373
  */
336
374
  static pinch(nodeA: HalfEdge, nodeB: HalfEdge): void;
337
375
  /**
338
376
  * Pinch this half edge out of its base vertex loop.
339
- * @return the surviving HalfEdge in the vertex loop, or undefined if the instance HalfEdge is already dangling
377
+ * @return the surviving HalfEdge in the vertex loop or `undefined` if the instance HalfEdge is already dangling.
340
378
  */
341
379
  yankFromVertexLoop(): HalfEdge | undefined;
342
- /** Turn all pointers to undefined so garbage collector can reuse the object.
343
- * This is to be called only by a Graph object that is being decommissioned.
380
+ /**
381
+ * Turn all pointers to `undefined` so garbage collector can reuse the object.
382
+ * * This is to be called only by a Graph object that is being decommissioned.
344
383
  */
345
384
  decommission(): void;
346
385
  /** Return the node. This identity function is useful as the NodeFunction in collector methods. */
347
386
  static nodeToSelf(node: HalfEdge): any;
348
- /** Return the id of a node. Useful for collector methods. */
349
- static nodeToId(node: HalfEdge): any;
350
- /** Return the id of a node.Useful for collector methods. */
351
- static nodeToIdString(node: HalfEdge): any;
352
- /** Return the [id, [x,y]] of a node. Useful for collector methods. */
387
+ /** Return the id of a node. Useful for collector methods. */
388
+ static nodeToId(node: HalfEdge): number;
389
+ /** Return the id of a node as string. Useful for collector methods. */
390
+ static nodeToIdString(node: HalfEdge): string;
391
+ /** Return the [id, mask, [x,y]] of a node. Useful for collector methods. */
353
392
  static nodeToIdMaskXY(node: HalfEdge): {
354
- id: any;
355
- mask: any;
393
+ id: number;
394
+ mask: string;
356
395
  xy: number[];
357
396
  };
358
- /** Return the [id, [x,y]] of a node. Useful for collector methods. */
397
+ /** Return the [id, mask, [x,y]] of a node as string. Useful for collector methods. */
359
398
  static nodeToIdXYString(node: HalfEdge): string;
360
- /** Return the [id, [x,y],z] of a node. Useful for collector methods. */
399
+ /** Return the [id, [x,y,z]] of a node as string. Useful for collector methods. */
361
400
  static nodeToIdXYZString(node: HalfEdge): string;
362
- /** Create a string representation of the mask
401
+ /**
402
+ * Create a string representation of the mask.
363
403
  * * Null mask is empty string.
364
- * * Appended characters B,P,X for Boundary, Primary, Exterior mask bits.
404
+ * * Appended characters B,P,X,N are for BOUNDARY_EDGE, PRIMARY_EDGE, EXTERIOR, and NULL_FACE mask bits.
365
405
  */
366
406
  static nodeToMaskString(node: HalfEdge): string;
367
- /** Return [x,y] with coordinates of node */
407
+ /** Return [x,y] with coordinates of node. */
368
408
  static nodeToXY(node: HalfEdge): number[];
369
- /** Return Vector2d to face successor, with only xy coordinates */
409
+ /** Return Vector2d from `this` to face successor (with only xy coordinates). */
370
410
  vectorToFaceSuccessorXY(result?: Vector2d): Vector2d;
371
- /** Return Vector3d to face successor */
411
+ /** Return Vector3d from `this` to face successor. */
372
412
  vectorToFaceSuccessor(result?: Vector3d): Vector3d;
373
- /** Return Vector3d to face successor */
413
+ /** Return Vector3d from `this` to face successor. */
374
414
  vectorToFacePredecessor(result?: Vector3d): Vector3d;
375
- /** test if spaceNode is in the sector at sectorNode */
415
+ /** Test if `spaceNode` is in the sector at `sectorNode`. */
376
416
  static isNodeVisibleInSector(spaceNode: HalfEdge, sectorNode: HalfEdge): boolean;
377
- /** Returns Return cross product (2d) of vectors from baseA to targetA and baseB to targetB */
417
+ /** Returns 2D cross product of vectors from `base` to `targetA` and from `base` to `targetB`. */
378
418
  static crossProductXYToTargets(base: HalfEdge, targetA: HalfEdge, targetB: HalfEdge): number;
379
- /** Returns Return dot product (2d) of vectors along two edges. */
419
+ /** Returns 2D dot product of vectors from `baseA` to `targetA` and from `baseB` to `targetB`. */
380
420
  static dotProductNodeToNodeVectorsXY(baseA: HalfEdge, targetA: HalfEdge, baseB: HalfEdge, targetB: HalfEdge): number;
381
- /** Return cross product (2d) of vectors from nodeA to nodeB and nodeB to nodeC
382
- */
421
+ /** Return 2D cross product of vectors from `nodeA` to `nodeB` and from `nodeB` to `nodeC`. */
383
422
  static crossProductXYAlongChain(nodeA: HalfEdge, nodeB: HalfEdge, nodeC: HalfEdge): number;
384
423
  /**
385
424
  * Compute whether the sector defined by the chain of nodes is convex.
425
+ * * This function is determining if, in the traversal of the HalfEdges in a face loop, a corner makes a left turn
426
+ * (convex) or a right turn (not-convex). Note that if we have a convex face, then to traverse it in ccw orientation,
427
+ * we always do left turns. However, if the face is not convex, we make both left and right turns.
386
428
  * * This computation ignores z-coordinates and connectivity, so the nodes are not required to be in the same face loop.
387
- * @param nodeA the first node in the chain, nominally the face predecessor of nodeB
388
- * @param nodeB the second node in the chain; the node at the sector vertex
389
- * @param nodeC the third node in the chain, nominally the face successor of nodeB
390
- * @param signedAreaTol optional signed area tolerance to use in test for parallel vectors.
391
- * Typically this is a fraction of the sector's face's signed area. We can't compute area here, so if undefined, zero tolerance is used.
392
- * @returns true iff the sector is convex
429
+ * @param nodeA the first node in the chain, nominally the face predecessor of nodeB.
430
+ * @param nodeB the second node in the chain; the node at the sector vertex.
431
+ * @param nodeC the third node in the chain, nominally the face successor of nodeB.
432
+ * @param signedAreaTol optional signed area tolerance to use in test for parallel vectors. Typically this is a
433
+ * fraction of the sector's face's signed area. We can't compute area here, so if undefined, zero tolerance is used.
434
+ * @returns true iff the sector is convex. A degenerate sector, where the incident edges overlap, returns false.
393
435
  */
394
436
  static isSectorConvex(nodeA: HalfEdge, nodeB: HalfEdge, nodeC: HalfEdge, signedAreaTol?: number): boolean;
395
437
  /**
396
438
  * Compute whether the sector at this node is convex.
439
+ * * This function is determining if, in the traversal of the HalfEdges in a face loop, a corner makes a left turn
440
+ * (convex) or a right turn (not-convex). Note that if we have a convex face, then to traverse it in ccw orientation,
441
+ * we always do left turns. However, if the face is not convex, we make both left and right turns.
397
442
  * * This computation ignores z-coordinates.
398
- * @param signedAreaTol optional signed area tolerance to use in test for parallel vectors.
399
- * If undefined, a fraction ([[Geometry.smallMetricDistanceSquared]]) of the computed signed area is used.
400
- * Pass zero to skip toleranced computation.
401
- * @returns true iff the sector is convex and its two edges are not antiparallel.
443
+ * @param signedAreaTol optional signed area tolerance to use in test for parallel vectors. If undefined, a fraction
444
+ * (`Geometry.smallMetricDistanceSquared`) of the computed signed area is used. Pass 0 to skip toleranced computation.
445
+ * @returns true iff the sector is convex. A degenerate sector, where the incident edges overlap, returns false.
402
446
  */
403
447
  isSectorConvex(signedAreaTol?: number): boolean;
404
448
  /**
405
449
  * Compute whether this face is convex.
450
+ * * Note that if we have a convex face, then to traverse it in ccw orientation, we always do left turns.
451
+ * However, if the face is not convex, we make both left and right turns.
406
452
  * * This computation ignores z-coordinates.
407
- * @param tolerance optional relative tolerance to use in test for parallel vectors.
408
- * Default value is [[Geometry.smallMetricDistanceSquared]].
409
- * Pass zero to skip toleranced computation.
453
+ * @param tolerance optional relative tolerance to use in test for parallel vectors. Default value is
454
+ * `Geometry.smallMetricDistanceSquared`. Pass 0 to skip toleranced computation.
410
455
  * @returns true iff this face is convex.
411
456
  */
412
457
  isFaceConvex(tolerance?: number): boolean;
413
- /**
414
- * Isolate the edge from the graph by yanking each end from its vertex loop.
415
- */
458
+ /** Isolate the edge from the graph by yanking each end from its vertex loop. */
416
459
  isolateEdge(): void;
417
- /**
418
- * @return whether this edge is isolated from the rest of the graph.
419
- */
460
+ /** Specify whether this edge is isolated from the rest of the graph. */
420
461
  get isIsolatedEdge(): boolean;
421
- /** Return true if `this` is lexically below `other`, comparing y first then x. */
462
+ /** Return true if `this` is lexically below `other`. We compare y first, then x, and ignore z. */
422
463
  belowYX(other: HalfEdge): boolean;
423
- /** Returns Returns true if the node does NOT have Mask.EXTERIOR_MASK set. */
464
+ /** Returns `true` if the node does NOT have `Mask.EXTERIOR_MASK` set. */
424
465
  static testNodeMaskNotExterior(node: HalfEdge): boolean;
425
- /** Returns Returns true if the edge mate has Mask.EXTERIOR_MASK set. */
466
+ /** Returns `true` if the edge mate has `Mask.EXTERIOR_MASK` set. */
426
467
  static testMateMaskExterior(node: HalfEdge): boolean;
427
- /** Returns radians between this edge and its face predecessor edge, using all three coordinates x,y,z and given normal to resolve sweep direction.
428
- * * The returned angle is positive, i.e. may be larger than PI radians.
429
- */
468
+ /**
469
+ * Returns radians between this edge and its face predecessor edge, using all three coordinates x,y,z and
470
+ * given normal to resolve sweep direction.
471
+ * * The returned angle is non-negative: 0 <= radians < 2*PI.
472
+ */
430
473
  static sectorSweepRadiansXYZ(node: HalfEdge, normal: Vector3d): number;
431
- /** Returns Returns true if the face has positive area in xy parts. */
474
+ /** Returns true if the face has positive area in xy parts. */
432
475
  static testFacePositiveAreaXY(node: HalfEdge): boolean;
433
- /** Return true if x and y coordinates of this and other are exactly equal */
476
+ /** Return true if x and y coordinates of `this` and `other` are exactly equal .*/
434
477
  isEqualXY(other: XAndY | HalfEdge): boolean;
435
- /** Return distance between xy coordinates of this and other node */
478
+ /** Return distance between xy coordinates of `this` and `other` node. */
436
479
  distanceXY(other: HalfEdge): number;
437
- /** Return distance between xyz coordinates of this and other node */
480
+ /** Return distance between xyz coordinates of `this` and `other` node. */
438
481
  distanceXYZ(other: HalfEdge): number;
439
482
  /**
440
- *
441
- * * Evaluate f(node) at each node around a face loop.
442
- * * Collect the function values.
443
- * @returns Return the array of function values.
483
+ * Evaluate `f(node)` at each node around `this` node's face loop. Collect the function values.
484
+ * @param f optional node function. If `undefined`, collect the nodes themselves.
485
+ * @returns the array of function values.
444
486
  */
445
487
  collectAroundFace(f?: NodeFunction): any[];
446
488
  /**
447
- * search around a vertex for nodes that have a specified mask setting.
448
- * @param vertexSeed first node to search
449
- * @param mask target mask
450
- * @param value target value for mask on half edges.
451
- * @param collectedNodes optional array to be cleared and receive masked nodes
489
+ * Search around `this` node's vertex loop for nodes with the specified mask value.
490
+ * * Returned nodes satisfy `node.isMaskSet(mask) === value`.
491
+ * @param mask target mask.
492
+ * @param value target boolean value for mask on half edges.
493
+ * @param result optional array to be cleared and receive masked nodes.
452
494
  */
453
495
  collectMaskedEdgesAroundVertex(mask: HalfEdgeMask, value?: boolean, result?: HalfEdge[]): HalfEdge[];
454
496
  /**
455
- *
456
- * * Evaluate f(node) at each outbound node around this node's vertex loop.
457
- * * Collect the function values.
458
- * @returns Return the array of function values.
497
+ * Evaluate `f(node)` at each node around `this` node's vertex loop. Collect the function values.
498
+ * @param f optional node function. If `undefined`, collect the nodes themselves.
499
+ * @returns the array of function values.
459
500
  */
460
501
  collectAroundVertex(f?: NodeFunction): any[];
461
502
  /**
462
- *
463
- * * Evaluate f(node) at each node around a face loop.
464
- * * Sum the function values
465
- * @returns Return the sum
503
+ * Evaluate `f(node)` at each node around `this` node's face loop. Sum the function values.
504
+ * @param f node to number function.
505
+ * @returns the sum of function values.
466
506
  */
467
507
  sumAroundFace(f: NodeToNumberFunction): number;
468
508
  /**
469
- *
470
- * * Evaluate f(node) at each outbound node around this node's vertex loop.
471
- * * Sum the function values
472
- * @returns Return the sum
509
+ * Evaluate `f(node)` at each node around `this` node's vertex loop. Sum the function values.
510
+ * @param f node to number function.
511
+ * @returns the sum of function values.
473
512
  */
474
513
  sumAroundVertex(f: NodeToNumberFunction): number;
475
- /** For all the nodes in the face loop of the given node, clear out the mask given */
514
+ /** Clear the given mask bits for all nodes in `this` node's face loop. */
476
515
  clearMaskAroundFace(mask: HalfEdgeMask): void;
477
- /** For all the nodes in the vertex loop of the given node, clear out the mask given */
516
+ /** Clear out the given mask bits for all nodes in `this` node's vertex loop. */
478
517
  clearMaskAroundVertex(mask: HalfEdgeMask): void;
479
518
  /**
480
- * Compute the signed sum of xy areas of triangles from first node to edges.
519
+ * Compute the signed xy area of `this` node's face.
481
520
  * * A positive area is counterclockwise.
482
521
  * * A negative area is clockwise.
483
- * @returns signed area of this node's face
522
+ * @returns signed area of `this` node's face.
484
523
  */
485
524
  signedFaceArea(): number;
486
525
  /**
487
- * interpolate xy coordinates between this node and its face successor.
526
+ * Interpolate xy coordinates between `this` node and its face successor.
488
527
  * @param fraction fractional position along this edge.
489
- * @param result xy coordinates
528
+ * @param result optional point to populate and return.
490
529
  */
491
530
  fractionToPoint2d(fraction: number, result?: Point2d): Point2d;
492
531
  /**
493
- * interpolate xy coordinates between this node and its face successor.
532
+ * Interpolate xyz coordinates between `this` node and its face successor.
494
533
  * @param fraction fractional position along this edge.
495
- * @param result xy coordinates
534
+ * @param result optional point to populate and return.
496
535
  */
497
536
  fractionToPoint3d(fraction: number, result?: Point3d): Point3d;
498
537
  /**
499
- * * interpolate xy coordinates at fractionAlong between this node and its face successor.
500
- * * shift to left by fractionPerpendicular
501
- * @param fraction fractional position along this edge.
502
- * @param result xy coordinates
538
+ * Interpolate xy coordinates at `fractionAlong` between this node and its face successor. Then shift perpendicular
539
+ * to the left of this edge by `fractionPerpendicular`.
540
+ * @param fractionAlong fractional position along this edge.
541
+ * @param fractionPerpendicular fractional position along the left perpendicular with the same length as this edge.
542
+ * @param result optional xy coordinates.
503
543
  */
504
544
  fractionAlongAndPerpendicularToPoint2d(fractionAlong: number, fractionPerpendicular: number, result?: Point2d): Point2d;
505
- /**
506
- * return the 3d coordinates at this half edge base
507
- */
545
+ /** Return the 3d coordinates at this half edge. */
508
546
  getPoint3d(result?: Point3d): Point3d;
509
- /**
510
- * return the 2d coordinates at this half edge base
511
- */
547
+ /** Return the 2d coordinates at this half edge. */
512
548
  getPoint2d(result?: Point2d): Point2d;
513
- /**
514
- * return a 3d vector from start to end of this half edge.
515
- */
549
+ /** Return a 3d vector from start to end of this half edge. */
516
550
  getVector3dAlongEdge(result?: Vector3d): Vector3d;
517
- /**
518
- * return a 2d vector from start to end of this half edge
519
- */
551
+ /** Return a 2d vector from start to end of this half edge. */
520
552
  getVector2dAlongEdge(result?: Vector2d): Vector2d;
521
553
  /**
522
- * Return the interpolated x coordinate between this node and its face successor.
554
+ * Return the interpolated x coordinate between `this` node and its face successor.
523
555
  * @param fraction fractional position along this edge.
524
556
  */
525
557
  fractionToX(fraction: number): number;
526
558
  /**
527
- * Return the interpolated y coordinate between this node and its face successor.
559
+ * Return the interpolated y coordinate between `this` node and its face successor.
528
560
  * @param fraction fractional position along this edge.
529
561
  */
530
562
  fractionToY(fraction: number): number;
531
563
  /**
532
- * Return the interpolated z coordinate between this node and its face successor.
564
+ * Return the interpolated z coordinate between `this` node and its face successor.
533
565
  * @param fraction fractional position along this edge.
534
566
  */
535
567
  fractionToZ(fraction: number): number;
536
568
  /**
537
- * * Compute fractional coordinates of the intersection of edges from given base nodes
569
+ * Compute fractional coordinates of the intersection of edges from given base nodes.
538
570
  * * If parallel or colinear, return undefined.
539
571
  * * If (possibly extended) lines intersect, return the fractions of intersection as x,y in the result.
540
- * @param nodeA0 Base node of edge A
541
- * @param nodeB0 Base node of edge B
542
- * @param result optional preallocated result
572
+ * @param nodeA0 base node of edge A.
573
+ * @param nodeB0 base node of edge B.
574
+ * @param result optional preallocated result.
543
575
  */
544
576
  static transverseIntersectionFractions(nodeA0: HalfEdge, nodeB0: HalfEdge, result?: Vector2d): Vector2d | undefined;
545
577
  /**
546
- * * Compute fractional coordinates of the intersection of a horizontal line with an edge.
578
+ * Compute fractional position (possibly outside 0..1) of the intersection of a horizontal line with an edge.
547
579
  * * If the edge is horizontal with (approximate) identical y, return the node.
548
- * * If the edge is horizontal with different y, return undefined.
549
- * * If the edge is not horizontal, return the fractional position (possibly outside 0..1) of the intersection.
550
- * @param node0 Base node of edge
580
+ * * If the edge is horizontal with different y, return `undefined`.
581
+ * @param node0 base node of edge.
582
+ * @param y y coordinate of the horizontal line.
551
583
  */
552
584
  static horizontalScanFraction(node0: HalfEdge, y: number): number | undefined | HalfEdge;
553
585
  /**
554
- * * Compute fractional coordinates of the intersection of a horizontal line with an edge.
555
- * * If the edge is horizontal return undefined (no test for horizontal at y!!!)
556
- * * If the edge is not horizontal and y is between its end y's, return the fraction
557
- * @param node0 Base node of edge
586
+ * Compute fractional position (inside 0..1) of the intersection of a horizontal line with an edge.
587
+ * * If fractional position is outside 0..1, return `undefined`.
588
+ * * If the edge is horizontal return `undefined` (no test for horizontal at y).
589
+ * @param node0 base node of edge.
590
+ * @param y y coordinate of the horizontal line.
558
591
  */
559
592
  static horizontalScanFraction01(node0: HalfEdge, y: number): number | undefined;
560
593
  /**
561
- * Copy various data from source to this.
562
- * @param source other half edge.
563
- * @param XYZ copy simple coordinates
564
- * @param copyVertexData true to copy data belonging to the vertex. (i.e. the "i" member)
565
- * @param copyVertexData true to copy data belonging to the edge. (i.e. call transferEdgeData)
566
- * @param copyFaceData true to copy faceTag
594
+ * Copy various data from source to `this`.
595
+ * @param source source half edge.
596
+ * @param copyXYZ true to copy xyz coordinates.
597
+ * @param copyVertexData true to copy data belonging to the vertex (i.e. the `i` member).
598
+ * @param copyEdgeData true to copy data belonging to the edge (i.e. edge masks, `edgeTag`).
599
+ * @param copyFaceData true to copy `faceTag`.
567
600
  */
568
601
  copyDataFrom(source: HalfEdge, copyXYZ: boolean, copyVertexData: boolean, copyEdgeData: boolean, copyFaceData: boolean): void;
569
602
  }
570
603
  /**
571
604
  * A HalfEdgeGraph has:
572
- * * An array of (pointers to ) HalfEdge objects.
573
- * * A pool of masks for grab/drop use by algorithms.
605
+ * * An array of (pointers to) HalfEdge objects.
606
+ * * A pool of masks for grab/drop used by algorithms.
574
607
  * @internal
575
608
  */
576
609
  export declare class HalfEdgeGraph {
@@ -579,159 +612,159 @@ export declare class HalfEdgeGraph {
579
612
  private _maskManager;
580
613
  private _numNodesCreated;
581
614
  constructor();
582
- /** Ask for a mask (from the graph's free pool.) for caller's use.
615
+ /**
616
+ * Ask for a mask (from the graph's free pool) for caller's use.
583
617
  * * Optionally clear the mask throughout the graph.
584
618
  */
585
619
  grabMask(clearInAllHalfEdges?: boolean): HalfEdgeMask;
586
- /**
587
- * Return `mask` to the free pool.
588
- */
620
+ /** Return `mask` to the free pool. */
589
621
  dropMask(mask: HalfEdgeMask): void;
590
622
  /**
591
- * * Create 2 half edges forming 2 vertices, 1 edge, and 1 face
592
- * * The two edges are joined as edgeMate pair.
593
- * * The two edges are a 2-half-edge face loop in both the faceSuccessor and facePredecessor directions.
594
- * * The two edges are added to the graph's HalfEdge set
595
- * @returns Return pointer to the first half edge created.
623
+ * Create 2 half edges forming 2 vertices, 1 edge, and 1 face.
624
+ * * The two half edges are joined as edgeMate pair.
625
+ * * The two half edges are a 2-half-edge face loop in both the faceSuccessor and facePredecessor directions.
626
+ * * The two half edges are added to the graph's HalfEdge set.
627
+ * @returns pointer to the first half edge created.
596
628
  */
597
629
  createEdgeXYZXYZ(xA?: number, yA?: number, zA?: number, iA?: number, xB?: number, yB?: number, zB?: number, iB?: number): HalfEdge;
598
630
  /**
599
- * * Create 2 half edges forming 2 vertices, 1 edge, and 1 face
600
- * * The two edges are joined as edgeMate pair.
601
- * * The two edges are a 2-half-edge face loop in both the faceSuccessor and facePredecessor directions.
602
- * * The two edges are added to the graph's HalfEdge set
631
+ * Create 2 half edges forming 2 vertices, 1 edge, and 1 face.
632
+ * * The two half edges are joined as edgeMate pair.
633
+ * * The two half edges are a 2-half-edge face loop in both the faceSuccessor and facePredecessor directions.
634
+ * * The two half edges are added to the graph's HalfEdge set.
603
635
  * * Coordinates are set to zero.
604
- * * ids are installed in the two half edges.
605
- * @returns Return pointer to the first half edge created. (This has idA as its id.)
636
+ * * IDs are installed in the two half edges.
637
+ * @returns pointer to the first half edge created, with ID set to iA.
606
638
  */
607
639
  createEdgeIdId(iA?: number, iB?: number): HalfEdge;
608
640
  /**
609
- * * create an edge from coordinates x,y,z to (the tail of) an existing half edge.
610
- * @returns Return pointer to the half edge with tail at x,y,z
641
+ * Create an edge from coordinates x,y,z connected to the graph at the vertex of the given `node`.
642
+ * @returns pointer to the dangling node at x,y,z.
611
643
  */
612
644
  createEdgeXYZHalfEdge(xA: number | undefined, yA: number | undefined, zA: number | undefined, iA: number | undefined, node: HalfEdge, iB?: number): HalfEdge;
613
645
  /**
614
- * * create an edge from coordinates x,y,z to (the tail of) an existing half edge.
615
- * @returns Return pointer to the half edge with tail at x,y,z
646
+ * Create an edge from the vertex of `nodeA` to the vertex of `nodeB`.
647
+ * @returns pointer to the new half edge at the vertex of `nodeA`.
616
648
  */
617
649
  createEdgeHalfEdgeHalfEdge(nodeA: HalfEdge, idA: number, nodeB: HalfEdge, idB?: number): HalfEdge;
618
650
  /**
619
- * * Create 2 half edges forming 2 vertices, 1 edge, and 1 face
620
- * * The two edges are joined as edgeMate pair.
621
- * * The two edges are a 2-half-edge face loop in both the faceSuccessor and facePredecessor directions.
622
- * * The two edges are added to the graph's HalfEdge set
623
- * @returns Return pointer to the first half edge created.
651
+ * Create 2 half edges forming 2 vertices, 1 edge, and 1 face
652
+ * * The two half edges are joined as edgeMate pair.
653
+ * * The two half edges are a 2-half-edge face loop in both the faceSuccessor and facePredecessor directions.
654
+ * * The two half edges are added to the graph's HalfEdge set.
655
+ * @returns pointer to the first half edge created, with coordinates `xyz0`.
624
656
  */
625
657
  createEdgeXYAndZ(xyz0: XYAndZ, id0: number, xyz1: XYAndZ, id1: number): HalfEdge;
626
658
  /**
627
- * * Insert a vertex in the edge beginning at base.
628
- * * this creates two half edges.
629
- * * The base of the new edge is 'after' the (possibly undefined) start node in its face loop.
630
- * * The existing mate retains its base xyz and i properties but is no longer the mate of base.
631
- * * The base and existing mate each become mates with a new half edge.
632
- * @returns Returns the reference to the half edge created.
659
+ * Create a new vertex within the edge beginning at `base`.
660
+ * * This creates two new nodes in their own vertex loop.
661
+ * * If the base is undefined, create a single-edge loop.
662
+ * * Existing nodes stay in their face and vertex loops and retain xyz and i values.
663
+ * * Unlike [[pinch]], this breaks the edgeMate pairing of the input edge:
664
+ * each node of the input edge gets a new node as its edge mate.
665
+ * * On each side of the edge, if edgeTag is present, it is copied to the new node on that side.
666
+ * @returns reference to the half edge created, the new face successor of `base`.
633
667
  */
634
668
  splitEdge(base: undefined | HalfEdge, xA?: number, yA?: number, zA?: number, iA?: number): HalfEdge;
635
669
  /**
636
- * * Create a sliver face "within" an edge.
637
- * * this creates two half edges.
638
- * * The existing edges both stay in their same face loops and retain coordinates and i value.
639
- * * Each existing edge's mate is a new edge (rather than original mate)
640
- * * Coordinates are copied to the new edges at respective vertices.
641
- * * New faceTag and edgeTag undefined.
642
- * * i members are copied around their respective vertices.
643
- * @returns Returns the reference to the half edge created.
670
+ * Create a new sliver face "inside" an existing edge.
671
+ * * This creates two nodes that are each face predecessor and successor to the other.
672
+ * * Existing nodes stay in their face and vertex loops and retain xyz and i values.
673
+ * * Unlike [[pinch]], this breaks the edgeMate pairing of the input edge:
674
+ * each node of the input edge gets a new node as its edge mate.
675
+ * * New nodes get the xyz and i values shared by the nodes in the vertex loops into which they are placed.
676
+ * * New nodes' faceTag and edgeTag are `undefined`.
677
+ * @returns reference to the half edge created in the vertex loop of baseA.
644
678
  */
645
679
  splitEdgeCreateSliverFace(base: HalfEdge): HalfEdge;
646
680
  /**
647
- * * Insert a vertex in the edge beginning at base, with coordinates specified as a fraction along the existing edge.
648
- * * this creates two half edges.
649
- * * The base of the new edge is 'after' the (possibly undefined) start node in its face loop.
650
- * * The existing mate retains its base xyz and i properties but is no longer the mate of base.
651
- * * The base and existing mate each become mates with a new half edge.
652
- * @returns Returns the reference to the half edge created.
681
+ * Create a new vertex within the edge beginning at `base`, with coordinates specified by a fraction along the edge.
682
+ * * This creates two new nodes in their own vertex loop.
683
+ * * Existing nodes stay in their face and vertex loops and retain xyz and i values.
684
+ * * Unlike [[pinch]], this breaks the edgeMate pairing of the input edge:
685
+ * each node of the input edge gets a new node as its edge mate.
686
+ * * On each side of the edge, if edgeTag is present, it is copied to the new node on that side.
687
+ * @returns reference to the half edge created, the new face successor of `base`.
653
688
  */
654
689
  splitEdgeAtFraction(base: HalfEdge, fraction: number): HalfEdge;
655
- /** This is a destructor-like action that eliminates all interconnection among the graph's nodes.
656
- * After this is called the graph is unusable.
690
+ /**
691
+ * This is a destructor-like action that eliminates all inter-connections among the graph's nodes.
692
+ * After this is called, the graph is unusable.
657
693
  */
658
694
  decommission(): void;
659
- /** create two nodes of a new edge.
660
- * @returns Return one of the two nodes, which the caller may consider as the start of the edge.
695
+ /**
696
+ * Create two nodes of a new edge.
697
+ * @returns the reference to the new node at (x0,y0).
661
698
  */
662
699
  addEdgeXY(x0: number, y0: number, x1: number, y1: number): HalfEdge;
663
- /** Clear selected bits in all nodes of the graph. */
700
+ /** Clear selected `mask` bits in all nodes of the graph. */
664
701
  clearMask(mask: HalfEdgeMask): void;
665
- /** Set selected bits in all nodes of the graph. */
702
+ /** Set selected `mask` bits in all nodes of the graph. */
666
703
  setMask(mask: HalfEdgeMask): void;
667
- /** toggle selected bits in all nodes of the graph. */
704
+ /** Toggle selected `mask` bits in all nodes of the graph. */
668
705
  reverseMask(mask: HalfEdgeMask): void;
669
706
  /**
670
707
  * Return the number of nodes that have a specified mask bit set.
671
708
  * @param mask mask to count
672
709
  */
673
710
  countMask(mask: HalfEdgeMask): number;
674
- /** Return an array LineSegment3d.
675
- * * The array has one segment per edge
711
+ /**
712
+ * Return an array of LineSegment3d.
713
+ * * The array has one segment per edge.
676
714
  * * The coordinates are taken from a node and its face successor.
677
- * * On each edge, the line segment start at the HalfEdge with lower id than its edgeMate.
715
+ * * On each edge, the line segment starts at the HalfEdge with lower ID than its edgeMate.
678
716
  */
679
717
  collectSegments(): LineSegment3d[];
680
- /** Returns the number of vertex loops in a graph structure */
718
+ /** Returns the number of vertex loops in a graph structure. */
681
719
  countVertexLoops(): number;
682
- /** Returns the number of face loops */
720
+ /** Returns the number of face loops in a graph structure. */
683
721
  countFaceLoops(): number;
684
- /**
685
- * Returns the number of face loops satisfying a filter function with mask argument.
686
- *
687
- */
722
+ /** Returns the number of face loops satisfying a filter function with mask argument. */
688
723
  countFaceLoopsWithMaskFilter(filter: HalfEdgeAndMaskToBooleanFunction, mask: HalfEdgeMask): number;
689
- /** Returns an array of nodes, where each node represents a starting point of a face loop.
690
- */
724
+ /** Returns an array of nodes, where each node represents a starting point of a vertex loop. */
725
+ collectVertexLoops(): HalfEdge[];
726
+ /** Returns an array of nodes, where each node represents a starting point of a face loop. */
691
727
  collectFaceLoops(): HalfEdge[];
692
- /** Returns an array of nodes, where each node represents a starting point of a vertex loop.
728
+ /**
729
+ * Visit each vertex loop of the graph once.
730
+ * * Call the `announceVertex` function.
731
+ * * Continue search if `announceVertex(graph, node)` returns `true`.
732
+ * * Terminate search if `announceVertex(graph, node)` returns `false`.
733
+ * @param announceVertex function to apply at one node of each vertex.
693
734
  */
694
- collectVertexLoops(): HalfEdge[];
735
+ announceVertexLoops(announceVertex: GraphNodeFunction): void;
695
736
  /**
696
- * * Visit each facet of the graph once.
697
- * * Call the announceFace function
698
- * * continue search if announceFace(graph, node) returns true
699
- * * terminate search if announce face (graph, node) returns false
700
- * @param announceFace function to apply at one node of each face.
737
+ * Visit each facet of the graph once.
738
+ * * Call the `announceFace` function.
739
+ * * Continue search if `announceFace(graph, node)` returns `true`.
740
+ * * Terminate search if `announceFace(graph, node)` returns `false`.
741
+ * @param announceFace function to apply at one node of each face.
701
742
  */
702
743
  announceFaceLoops(announceFace: GraphNodeFunction): void;
703
744
  /**
704
- * * Visit each edge of the graph once.
705
- * * Call the announceEdge function.
706
- * * the edge mate will NOT appear in an announceEdge call.
707
- * * continue search if announceEdge(graph, node) returns true
708
- * * terminate search if announceEdge (graph, node) returns false
709
- * @param announceEdge function to apply at one node of each edge.
710
- */
711
- announceEdges(announceEdge: GraphNodeFunction): void;
712
- /**
713
- * * Visit each vertex loop of the graph once.
714
- * * Call the announceVertex function
715
- * * continue search if announceVertex(graph, node) returns true
716
- * * terminate search if announce vertex (graph, node) returns false
717
- * @param announceVertex function to apply at one node of each face.
745
+ * Visit each edge of the graph once.
746
+ * * Call the `announceEdge` function.
747
+ * * The edge mate will NOT appear in an announceEdge call.
748
+ * * Continue search if `announceEdge(graph, node)` returns `true`.
749
+ * * Terminate search if `announceEdge(graph, node)` returns `false`.
750
+ * @param announceEdge function to apply at one node of each edge.
718
751
  */
719
- announceVertexLoops(announceVertex: GraphNodeFunction): void;
752
+ announceEdges(announceEdge: GraphNodeFunction): void;
720
753
  /**
721
- * * Visit each half edge (node) of the graph once.
722
- * * Call the announceNode function
723
- * * continue search if announceNode(graph, node) returns true
724
- * * terminate search if announce face (graph, node) returns false
725
- * @param announceNode function to apply at one node of each face.
754
+ * Visit each half edge (node) of the graph once.
755
+ * * Call the `announceNode` function.
756
+ * * Continue search if `announceNode(graph, node)` returns `true`.
757
+ * * Terminate search if `announceFace(graph, node)` returns `false`.
758
+ * @param announceNode function to apply at each node.
726
759
  */
727
760
  announceNodes(announceNode: GraphNodeFunction): void;
728
- /** Return the number of nodes in the graph */
761
+ /** Return the number of nodes in the graph. */
729
762
  countNodes(): number;
730
763
  /** Apply transform to the xyz coordinates in the graph. */
731
764
  transformInPlace(transform: Transform): void;
732
765
  /**
733
- * disconnect and delete all nodes that satisfy a filter condition.
734
- * @param deleteThisNode returns true to delete the corresponding edge. Should act symmetrically on the edgeMate.
766
+ * Disconnect and delete all nodes that satisfy a filter condition.
767
+ * @param deleteThisNode returns true to delete the corresponding node. Should act symmetrically on the edgeMate.
735
768
  * @returns the number of nodes deleted (twice the number of deleted edges).
736
769
  */
737
770
  yankAndDeleteEdges(deleteThisNode: NodeFunction): number;