@itwin/core-geometry 5.0.0-dev.6 → 5.0.0-dev.61

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 (928) hide show
  1. package/CHANGELOG.md +39 -1
  2. package/lib/cjs/Constant.js +17 -17
  3. package/lib/cjs/Constant.js.map +1 -1
  4. package/lib/cjs/Geometry.js +35 -35
  5. package/lib/cjs/Geometry.js.map +1 -1
  6. package/lib/cjs/bspline/AkimaCurve3d.js +3 -1
  7. package/lib/cjs/bspline/AkimaCurve3d.js.map +1 -1
  8. package/lib/cjs/bspline/BSpline1dNd.js +18 -0
  9. package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
  10. package/lib/cjs/bspline/BSplineCurve.js +6 -2
  11. package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
  12. package/lib/cjs/bspline/BSplineCurve3dH.js +1 -0
  13. package/lib/cjs/bspline/BSplineCurve3dH.js.map +1 -1
  14. package/lib/cjs/bspline/BSplineCurveOps.d.ts.map +1 -1
  15. package/lib/cjs/bspline/BSplineCurveOps.js +18 -21
  16. package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
  17. package/lib/cjs/bspline/BSplineSurface.js +22 -2
  18. package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
  19. package/lib/cjs/bspline/Bezier1dNd.js +6 -0
  20. package/lib/cjs/bspline/Bezier1dNd.js.map +1 -1
  21. package/lib/cjs/bspline/BezierCurve3d.js +2 -0
  22. package/lib/cjs/bspline/BezierCurve3d.js.map +1 -1
  23. package/lib/cjs/bspline/BezierCurve3dH.js +2 -0
  24. package/lib/cjs/bspline/BezierCurve3dH.js.map +1 -1
  25. package/lib/cjs/bspline/BezierCurveBase.d.ts.map +1 -1
  26. package/lib/cjs/bspline/BezierCurveBase.js +21 -2
  27. package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
  28. package/lib/cjs/bspline/InterpolationCurve3d.js +12 -1
  29. package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
  30. package/lib/cjs/bspline/KnotVector.d.ts +8 -6
  31. package/lib/cjs/bspline/KnotVector.d.ts.map +1 -1
  32. package/lib/cjs/bspline/KnotVector.js +21 -8
  33. package/lib/cjs/bspline/KnotVector.js.map +1 -1
  34. package/lib/cjs/bspline/SurfaceLocationDetail.js +12 -0
  35. package/lib/cjs/bspline/SurfaceLocationDetail.js.map +1 -1
  36. package/lib/cjs/clipping/AlternatingConvexClipTree.js +14 -13
  37. package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
  38. package/lib/cjs/clipping/BooleanClipNode.js +4 -0
  39. package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
  40. package/lib/cjs/clipping/ClipPlane.js +10 -1
  41. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  42. package/lib/cjs/clipping/ClipPrimitive.js +19 -0
  43. package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
  44. package/lib/cjs/clipping/ClipUtils.js +5 -1
  45. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  46. package/lib/cjs/clipping/ClipVector.js +11 -8
  47. package/lib/cjs/clipping/ClipVector.js.map +1 -1
  48. package/lib/cjs/clipping/ConvexClipPlaneSet.js +5 -3
  49. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  50. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js +2 -1
  51. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  52. package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js +3 -0
  53. package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  54. package/lib/cjs/core-geometry.d.ts +1 -0
  55. package/lib/cjs/core-geometry.d.ts.map +1 -1
  56. package/lib/cjs/core-geometry.js +1 -0
  57. package/lib/cjs/core-geometry.js.map +1 -1
  58. package/lib/cjs/curve/Arc3d.d.ts +15 -3
  59. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  60. package/lib/cjs/curve/Arc3d.js +47 -20
  61. package/lib/cjs/curve/Arc3d.js.map +1 -1
  62. package/lib/cjs/curve/ConstructCurveBetweenCurves.js +3 -0
  63. package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
  64. package/lib/cjs/curve/CoordinateXYZ.js +3 -2
  65. package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
  66. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +0 -2
  67. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
  68. package/lib/cjs/curve/CurveChainWithDistanceIndex.js +25 -10
  69. package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
  70. package/lib/cjs/curve/CurveCollection.d.ts +10 -0
  71. package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
  72. package/lib/cjs/curve/CurveCollection.js +35 -9
  73. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  74. package/lib/cjs/curve/CurveFactory.d.ts +87 -53
  75. package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
  76. package/lib/cjs/curve/CurveFactory.js +213 -135
  77. package/lib/cjs/curve/CurveFactory.js.map +1 -1
  78. package/lib/cjs/curve/CurveLocationDetail.js +44 -0
  79. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  80. package/lib/cjs/curve/CurvePrimitive.d.ts +7 -10
  81. package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
  82. package/lib/cjs/curve/CurvePrimitive.js +27 -12
  83. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  84. package/lib/cjs/curve/CurveProcessor.js +2 -0
  85. package/lib/cjs/curve/CurveProcessor.js.map +1 -1
  86. package/lib/cjs/curve/CurveWireMomentsXYZ.js +2 -0
  87. package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
  88. package/lib/cjs/curve/LineSegment3d.js +6 -2
  89. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  90. package/lib/cjs/curve/LineString3d.js +27 -7
  91. package/lib/cjs/curve/LineString3d.js.map +1 -1
  92. package/lib/cjs/curve/Loop.js +12 -4
  93. package/lib/cjs/curve/Loop.js.map +1 -1
  94. package/lib/cjs/curve/OffsetOptions.js +25 -21
  95. package/lib/cjs/curve/OffsetOptions.js.map +1 -1
  96. package/lib/cjs/curve/ParityRegion.js +4 -2
  97. package/lib/cjs/curve/ParityRegion.js.map +1 -1
  98. package/lib/cjs/curve/Path.js +2 -2
  99. package/lib/cjs/curve/Path.js.map +1 -1
  100. package/lib/cjs/curve/PointString3d.js +3 -2
  101. package/lib/cjs/curve/PointString3d.js.map +1 -1
  102. package/lib/cjs/curve/ProxyCurve.js +1 -0
  103. package/lib/cjs/curve/ProxyCurve.js.map +1 -1
  104. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js +1 -0
  105. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  106. package/lib/cjs/curve/Query/CurveSplitContext.js +3 -0
  107. package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
  108. package/lib/cjs/curve/Query/CylindricalRange.js +6 -2
  109. package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
  110. package/lib/cjs/curve/Query/PlanarSubdivision.js +4 -6
  111. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  112. package/lib/cjs/curve/Query/StrokeCountChain.js +12 -0
  113. package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
  114. package/lib/cjs/curve/Query/StrokeCountMap.js +14 -0
  115. package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
  116. package/lib/cjs/curve/RegionMomentsXY.js +4 -5
  117. package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
  118. package/lib/cjs/curve/RegionOps.js +9 -10
  119. package/lib/cjs/curve/RegionOps.js.map +1 -1
  120. package/lib/cjs/curve/RegionOpsClassificationSweeps.js +24 -1
  121. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  122. package/lib/cjs/curve/StrokeOptions.d.ts +4 -4
  123. package/lib/cjs/curve/StrokeOptions.d.ts.map +1 -1
  124. package/lib/cjs/curve/StrokeOptions.js +23 -6
  125. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  126. package/lib/cjs/curve/UnionRegion.js +4 -2
  127. package/lib/cjs/curve/UnionRegion.js.map +1 -1
  128. package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js +13 -7
  129. package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  130. package/lib/cjs/curve/internalContexts/ChainCollectorContext.js +6 -0
  131. package/lib/cjs/curve/internalContexts/ChainCollectorContext.js.map +1 -1
  132. package/lib/cjs/curve/internalContexts/CloneCurvesContext.js +2 -0
  133. package/lib/cjs/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  134. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js +13 -5
  135. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  136. package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js +3 -0
  137. package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  138. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js +18 -5
  139. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  140. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js +26 -13
  141. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  142. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js +11 -5
  143. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  144. package/lib/cjs/curve/internalContexts/CurveLengthContext.js +6 -0
  145. package/lib/cjs/curve/internalContexts/CurveLengthContext.js.map +1 -1
  146. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js +8 -6
  147. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  148. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js +38 -5
  149. package/lib/cjs/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
  150. package/lib/cjs/curve/internalContexts/GapSearchContext.js +1 -0
  151. package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
  152. package/lib/cjs/curve/internalContexts/MultiChainCollector.js +12 -0
  153. package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
  154. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js +1 -0
  155. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  156. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js +7 -0
  157. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  158. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +22 -4
  159. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  160. package/lib/cjs/curve/internalContexts/SumLengthsContext.js +1 -0
  161. package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
  162. package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js +3 -0
  163. package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  164. package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js +2 -0
  165. package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  166. package/lib/cjs/curve/spiral/ClothoidSeries.js +4 -0
  167. package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
  168. package/lib/cjs/curve/spiral/CubicEvaluator.js +2 -0
  169. package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
  170. package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js +4 -0
  171. package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  172. package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js +5 -0
  173. package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  174. package/lib/cjs/curve/spiral/DirectSpiral3d.js +12 -2
  175. package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
  176. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js +24 -4
  177. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  178. package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js +2 -0
  179. package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  180. package/lib/cjs/curve/spiral/NormalizedTransition.js +5 -0
  181. package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
  182. package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js +2 -0
  183. package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  184. package/lib/cjs/curve/spiral/TransitionConditionalProperties.js +10 -0
  185. package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  186. package/lib/cjs/curve/spiral/TransitionSpiral3d.js +10 -0
  187. package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
  188. package/lib/cjs/curve/spiral/XYCurveEvaluator.js +6 -0
  189. package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
  190. package/lib/cjs/geometry3d/Angle.js +18 -16
  191. package/lib/cjs/geometry3d/Angle.js.map +1 -1
  192. package/lib/cjs/geometry3d/AngleSweep.d.ts +1 -1
  193. package/lib/cjs/geometry3d/AngleSweep.d.ts.map +1 -1
  194. package/lib/cjs/geometry3d/AngleSweep.js +3 -1
  195. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  196. package/lib/cjs/geometry3d/BarycentricTriangle.js +25 -0
  197. package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
  198. package/lib/cjs/geometry3d/BilinearPatch.js +8 -0
  199. package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
  200. package/lib/cjs/geometry3d/CoincidentGeometryOps.js +5 -0
  201. package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
  202. package/lib/cjs/geometry3d/Ellipsoid.js +48 -0
  203. package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
  204. package/lib/cjs/geometry3d/FrameBuilder.js +12 -4
  205. package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
  206. package/lib/cjs/geometry3d/FrustumAnimation.js +7 -0
  207. package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
  208. package/lib/cjs/geometry3d/GrowableBlockedArray.js +12 -0
  209. package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
  210. package/lib/cjs/geometry3d/GrowableFloat64Array.js +3 -0
  211. package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
  212. package/lib/cjs/geometry3d/GrowableXYArray.d.ts +0 -5
  213. package/lib/cjs/geometry3d/GrowableXYArray.d.ts.map +1 -1
  214. package/lib/cjs/geometry3d/GrowableXYArray.js +16 -7
  215. package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
  216. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts +32 -10
  217. package/lib/cjs/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  218. package/lib/cjs/geometry3d/GrowableXYZArray.js +70 -16
  219. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  220. package/lib/cjs/geometry3d/IndexedCollectionInterval.js +6 -0
  221. package/lib/cjs/geometry3d/IndexedCollectionInterval.js.map +1 -1
  222. package/lib/cjs/geometry3d/IndexedXYCollection.js +1 -0
  223. package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
  224. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts +13 -2
  225. package/lib/cjs/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  226. package/lib/cjs/geometry3d/IndexedXYZCollection.js +26 -11
  227. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  228. package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.js +3 -0
  229. package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  230. package/lib/cjs/geometry3d/Matrix3d.d.ts +3 -4
  231. package/lib/cjs/geometry3d/Matrix3d.d.ts.map +1 -1
  232. package/lib/cjs/geometry3d/Matrix3d.js +34 -12
  233. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  234. package/lib/cjs/geometry3d/OrderedRotationAngles.js +10 -2
  235. package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
  236. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js +2 -0
  237. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  238. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js +7 -0
  239. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  240. package/lib/cjs/geometry3d/Point2dArrayCarrier.js +2 -0
  241. package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
  242. package/lib/cjs/geometry3d/Point2dVector2d.js +4 -0
  243. package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
  244. package/lib/cjs/geometry3d/Point3dArrayCarrier.js +3 -1
  245. package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
  246. package/lib/cjs/geometry3d/Point3dVector3d.d.ts +6 -6
  247. package/lib/cjs/geometry3d/Point3dVector3d.js +12 -6
  248. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  249. package/lib/cjs/geometry3d/PointHelpers.js +5 -5
  250. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  251. package/lib/cjs/geometry3d/PointStreaming.js +12 -4
  252. package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
  253. package/lib/cjs/geometry3d/PolygonOps.d.ts +2 -2
  254. package/lib/cjs/geometry3d/PolygonOps.js +62 -25
  255. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  256. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js +7 -3
  257. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  258. package/lib/cjs/geometry3d/PolylineOps.d.ts +9 -5
  259. package/lib/cjs/geometry3d/PolylineOps.d.ts.map +1 -1
  260. package/lib/cjs/geometry3d/PolylineOps.js +12 -5
  261. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  262. package/lib/cjs/geometry3d/Range.js +21 -4
  263. package/lib/cjs/geometry3d/Range.js.map +1 -1
  264. package/lib/cjs/geometry3d/Ray2d.js +2 -0
  265. package/lib/cjs/geometry3d/Ray2d.js.map +1 -1
  266. package/lib/cjs/geometry3d/Ray3d.js +12 -0
  267. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  268. package/lib/cjs/geometry3d/ReusableObjectCache.js +4 -0
  269. package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
  270. package/lib/cjs/geometry3d/Segment1d.js +4 -0
  271. package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
  272. package/lib/cjs/geometry3d/SortablePolygon.js +11 -0
  273. package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
  274. package/lib/cjs/geometry3d/Transform.js +3 -0
  275. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  276. package/lib/cjs/geometry3d/YawPitchRollAngles.js +6 -0
  277. package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
  278. package/lib/cjs/geometry4d/Map4d.js +2 -0
  279. package/lib/cjs/geometry4d/Map4d.js.map +1 -1
  280. package/lib/cjs/geometry4d/Matrix4d.js +1 -0
  281. package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
  282. package/lib/cjs/geometry4d/MomentData.d.ts +72 -73
  283. package/lib/cjs/geometry4d/MomentData.d.ts.map +1 -1
  284. package/lib/cjs/geometry4d/MomentData.js +90 -66
  285. package/lib/cjs/geometry4d/MomentData.js.map +1 -1
  286. package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js +6 -0
  287. package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  288. package/lib/cjs/geometry4d/Point4d.js +2 -0
  289. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  290. package/lib/cjs/numerics/BezierPolynomials.js +8 -0
  291. package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
  292. package/lib/cjs/numerics/ClusterableArray.js +29 -13
  293. package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
  294. package/lib/cjs/numerics/Complex.js +2 -0
  295. package/lib/cjs/numerics/Complex.js.map +1 -1
  296. package/lib/cjs/numerics/ConvexPolygon2d.js +3 -0
  297. package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
  298. package/lib/cjs/numerics/Newton.js +59 -4
  299. package/lib/cjs/numerics/Newton.js.map +1 -1
  300. package/lib/cjs/numerics/PascalCoefficients.js +1 -1
  301. package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
  302. package/lib/cjs/numerics/PolarData.js +13 -1
  303. package/lib/cjs/numerics/PolarData.js.map +1 -1
  304. package/lib/cjs/numerics/Polynomials.js +64 -26
  305. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  306. package/lib/cjs/numerics/Quadrature.js +26 -20
  307. package/lib/cjs/numerics/Quadrature.js.map +1 -1
  308. package/lib/cjs/numerics/TriDiagonalSystem.js +11 -0
  309. package/lib/cjs/numerics/TriDiagonalSystem.js.map +1 -1
  310. package/lib/cjs/numerics/UnionFind.js +1 -0
  311. package/lib/cjs/numerics/UnionFind.js.map +1 -1
  312. package/lib/cjs/numerics/UsageSums.js +10 -0
  313. package/lib/cjs/numerics/UsageSums.js.map +1 -1
  314. package/lib/cjs/polyface/AuxData.js +16 -0
  315. package/lib/cjs/polyface/AuxData.js.map +1 -1
  316. package/lib/cjs/polyface/BoxTopology.js +67 -67
  317. package/lib/cjs/polyface/BoxTopology.js.map +1 -1
  318. package/lib/cjs/polyface/FacetFaceData.d.ts +1 -1
  319. package/lib/cjs/polyface/FacetFaceData.js +3 -1
  320. package/lib/cjs/polyface/FacetFaceData.js.map +1 -1
  321. package/lib/cjs/polyface/FacetLocationDetail.js +30 -0
  322. package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
  323. package/lib/cjs/polyface/FacetOrientation.js +12 -1
  324. package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
  325. package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js +18 -2
  326. package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  327. package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts +33 -23
  328. package/lib/cjs/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
  329. package/lib/cjs/polyface/IndexedEdgeMatcher.js +63 -33
  330. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  331. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts +3 -2
  332. package/lib/cjs/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  333. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js +11 -2
  334. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  335. package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts +233 -0
  336. package/lib/cjs/polyface/IndexedPolyfaceWalker.d.ts.map +1 -0
  337. package/lib/cjs/polyface/IndexedPolyfaceWalker.js +353 -0
  338. package/lib/cjs/polyface/IndexedPolyfaceWalker.js.map +1 -0
  339. package/lib/cjs/polyface/Polyface.d.ts +35 -10
  340. package/lib/cjs/polyface/Polyface.d.ts.map +1 -1
  341. package/lib/cjs/polyface/Polyface.js +73 -12
  342. package/lib/cjs/polyface/Polyface.js.map +1 -1
  343. package/lib/cjs/polyface/PolyfaceBuilder.d.ts +14 -27
  344. package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
  345. package/lib/cjs/polyface/PolyfaceBuilder.js +47 -79
  346. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  347. package/lib/cjs/polyface/PolyfaceClip.js +8 -0
  348. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  349. package/lib/cjs/polyface/PolyfaceData.d.ts +28 -0
  350. package/lib/cjs/polyface/PolyfaceData.d.ts.map +1 -1
  351. package/lib/cjs/polyface/PolyfaceData.js +87 -5
  352. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  353. package/lib/cjs/polyface/PolyfaceQuery.js +47 -7
  354. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  355. package/lib/cjs/polyface/RangeLengthData.js +7 -0
  356. package/lib/cjs/polyface/RangeLengthData.js.map +1 -1
  357. package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js +12 -0
  358. package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
  359. package/lib/cjs/polyface/RangeTree/MinimumValueTester.js +5 -2
  360. package/lib/cjs/polyface/RangeTree/MinimumValueTester.js.map +1 -1
  361. package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js +12 -0
  362. package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
  363. package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js +14 -0
  364. package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
  365. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js +5 -0
  366. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  367. package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js +43 -0
  368. package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
  369. package/lib/cjs/polyface/TaggedNumericData.js +8 -0
  370. package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
  371. package/lib/cjs/polyface/TriangleCandidate.js +3 -0
  372. package/lib/cjs/polyface/TriangleCandidate.js.map +1 -1
  373. package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js +7 -0
  374. package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  375. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js +6 -0
  376. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  377. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js +3 -0
  378. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  379. package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js +3 -0
  380. package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  381. package/lib/cjs/polyface/multiclip/OffsetMeshContext.js +32 -0
  382. package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  383. package/lib/cjs/polyface/multiclip/RangeSearch.js +5 -5
  384. package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
  385. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js +21 -8
  386. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  387. package/lib/cjs/polyface/multiclip/XYPointBuckets.js +6 -0
  388. package/lib/cjs/polyface/multiclip/XYPointBuckets.js.map +1 -1
  389. package/lib/cjs/serialization/BGFBAccessors.js +82 -164
  390. package/lib/cjs/serialization/BGFBAccessors.js.map +1 -1
  391. package/lib/cjs/serialization/BGFBReader.js +22 -22
  392. package/lib/cjs/serialization/BGFBReader.js.map +1 -1
  393. package/lib/cjs/serialization/BGFBWriter.js +1 -0
  394. package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
  395. package/lib/cjs/serialization/DeepCompare.js +17 -17
  396. package/lib/cjs/serialization/DeepCompare.js.map +1 -1
  397. package/lib/cjs/serialization/GeometrySamples.d.ts +5 -5
  398. package/lib/cjs/serialization/GeometrySamples.d.ts.map +1 -1
  399. package/lib/cjs/serialization/GeometrySamples.js +113 -112
  400. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  401. package/lib/cjs/serialization/IModelJsonSchema.d.ts +1 -2
  402. package/lib/cjs/serialization/IModelJsonSchema.d.ts.map +1 -1
  403. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  404. package/lib/cjs/solid/Box.js +7 -2
  405. package/lib/cjs/solid/Box.js.map +1 -1
  406. package/lib/cjs/solid/Cone.js +6 -2
  407. package/lib/cjs/solid/Cone.js.map +1 -1
  408. package/lib/cjs/solid/LinearSweep.js +4 -2
  409. package/lib/cjs/solid/LinearSweep.js.map +1 -1
  410. package/lib/cjs/solid/RotationalSweep.js +5 -2
  411. package/lib/cjs/solid/RotationalSweep.js.map +1 -1
  412. package/lib/cjs/solid/RuledSweep.d.ts +26 -23
  413. package/lib/cjs/solid/RuledSweep.d.ts.map +1 -1
  414. package/lib/cjs/solid/RuledSweep.js +32 -24
  415. package/lib/cjs/solid/RuledSweep.js.map +1 -1
  416. package/lib/cjs/solid/SolidPrimitive.d.ts +12 -11
  417. package/lib/cjs/solid/SolidPrimitive.d.ts.map +1 -1
  418. package/lib/cjs/solid/SolidPrimitive.js +11 -6
  419. package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
  420. package/lib/cjs/solid/Sphere.js +4 -2
  421. package/lib/cjs/solid/Sphere.js.map +1 -1
  422. package/lib/cjs/solid/SweepContour.d.ts +24 -15
  423. package/lib/cjs/solid/SweepContour.d.ts.map +1 -1
  424. package/lib/cjs/solid/SweepContour.js +33 -15
  425. package/lib/cjs/solid/SweepContour.js.map +1 -1
  426. package/lib/cjs/solid/TorusPipe.js +7 -2
  427. package/lib/cjs/solid/TorusPipe.js.map +1 -1
  428. package/lib/cjs/topology/ChainMerge.js +16 -4
  429. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  430. package/lib/cjs/topology/Graph.js +41 -6
  431. package/lib/cjs/topology/Graph.js.map +1 -1
  432. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +1 -1
  433. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js +5 -1
  434. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  435. package/lib/cjs/topology/HalfEdgeGraphSearch.js +2 -0
  436. package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
  437. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js +9 -2
  438. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  439. package/lib/cjs/topology/HalfEdgeGraphValidation.js +7 -9
  440. package/lib/cjs/topology/HalfEdgeGraphValidation.js.map +1 -1
  441. package/lib/cjs/topology/HalfEdgeMarkSet.js +5 -0
  442. package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
  443. package/lib/cjs/topology/HalfEdgeNodeXYZUV.js +6 -0
  444. package/lib/cjs/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  445. package/lib/cjs/topology/HalfEdgePointInGraphSearch.js +1 -0
  446. package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  447. package/lib/cjs/topology/HalfEdgePositionDetail.js +16 -0
  448. package/lib/cjs/topology/HalfEdgePositionDetail.js.map +1 -1
  449. package/lib/cjs/topology/HalfEdgePriorityQueue.js +2 -0
  450. package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
  451. package/lib/cjs/topology/InsertAndRetriangulateContext.js +4 -0
  452. package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
  453. package/lib/cjs/topology/MaskManager.js +3 -0
  454. package/lib/cjs/topology/MaskManager.js.map +1 -1
  455. package/lib/cjs/topology/Merging.js +11 -6
  456. package/lib/cjs/topology/Merging.js.map +1 -1
  457. package/lib/cjs/topology/RegularizeFace.js +22 -0
  458. package/lib/cjs/topology/RegularizeFace.js.map +1 -1
  459. package/lib/cjs/topology/SignedDataSummary.js +22 -0
  460. package/lib/cjs/topology/SignedDataSummary.js.map +1 -1
  461. package/lib/cjs/topology/Triangulation.js +21 -11
  462. package/lib/cjs/topology/Triangulation.js.map +1 -1
  463. package/lib/cjs/topology/XYParitySearchContext.js +13 -0
  464. package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
  465. package/lib/esm/Constant.js +17 -17
  466. package/lib/esm/Constant.js.map +1 -1
  467. package/lib/esm/Geometry.js +35 -35
  468. package/lib/esm/Geometry.js.map +1 -1
  469. package/lib/esm/bspline/AkimaCurve3d.js +3 -1
  470. package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
  471. package/lib/esm/bspline/BSpline1dNd.js +18 -0
  472. package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
  473. package/lib/esm/bspline/BSplineCurve.js +6 -2
  474. package/lib/esm/bspline/BSplineCurve.js.map +1 -1
  475. package/lib/esm/bspline/BSplineCurve3dH.js +1 -0
  476. package/lib/esm/bspline/BSplineCurve3dH.js.map +1 -1
  477. package/lib/esm/bspline/BSplineCurveOps.d.ts.map +1 -1
  478. package/lib/esm/bspline/BSplineCurveOps.js +18 -21
  479. package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
  480. package/lib/esm/bspline/BSplineSurface.js +22 -2
  481. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  482. package/lib/esm/bspline/Bezier1dNd.js +6 -0
  483. package/lib/esm/bspline/Bezier1dNd.js.map +1 -1
  484. package/lib/esm/bspline/BezierCurve3d.js +2 -0
  485. package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
  486. package/lib/esm/bspline/BezierCurve3dH.js +2 -0
  487. package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
  488. package/lib/esm/bspline/BezierCurveBase.d.ts.map +1 -1
  489. package/lib/esm/bspline/BezierCurveBase.js +21 -2
  490. package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
  491. package/lib/esm/bspline/InterpolationCurve3d.js +12 -1
  492. package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
  493. package/lib/esm/bspline/KnotVector.d.ts +8 -6
  494. package/lib/esm/bspline/KnotVector.d.ts.map +1 -1
  495. package/lib/esm/bspline/KnotVector.js +21 -8
  496. package/lib/esm/bspline/KnotVector.js.map +1 -1
  497. package/lib/esm/bspline/SurfaceLocationDetail.js +12 -0
  498. package/lib/esm/bspline/SurfaceLocationDetail.js.map +1 -1
  499. package/lib/esm/clipping/AlternatingConvexClipTree.js +14 -13
  500. package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
  501. package/lib/esm/clipping/BooleanClipNode.js +4 -0
  502. package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
  503. package/lib/esm/clipping/ClipPlane.js +10 -1
  504. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  505. package/lib/esm/clipping/ClipPrimitive.js +19 -0
  506. package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
  507. package/lib/esm/clipping/ClipUtils.js +5 -1
  508. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  509. package/lib/esm/clipping/ClipVector.js +11 -8
  510. package/lib/esm/clipping/ClipVector.js.map +1 -1
  511. package/lib/esm/clipping/ConvexClipPlaneSet.js +5 -3
  512. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  513. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js +2 -1
  514. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  515. package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js +3 -0
  516. package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  517. package/lib/esm/core-geometry.d.ts +1 -0
  518. package/lib/esm/core-geometry.d.ts.map +1 -1
  519. package/lib/esm/core-geometry.js +1 -0
  520. package/lib/esm/core-geometry.js.map +1 -1
  521. package/lib/esm/curve/Arc3d.d.ts +15 -3
  522. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  523. package/lib/esm/curve/Arc3d.js +47 -20
  524. package/lib/esm/curve/Arc3d.js.map +1 -1
  525. package/lib/esm/curve/ConstructCurveBetweenCurves.js +3 -0
  526. package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
  527. package/lib/esm/curve/CoordinateXYZ.js +3 -2
  528. package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
  529. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +0 -2
  530. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
  531. package/lib/esm/curve/CurveChainWithDistanceIndex.js +25 -10
  532. package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
  533. package/lib/esm/curve/CurveCollection.d.ts +10 -0
  534. package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
  535. package/lib/esm/curve/CurveCollection.js +35 -9
  536. package/lib/esm/curve/CurveCollection.js.map +1 -1
  537. package/lib/esm/curve/CurveFactory.d.ts +87 -53
  538. package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
  539. package/lib/esm/curve/CurveFactory.js +213 -135
  540. package/lib/esm/curve/CurveFactory.js.map +1 -1
  541. package/lib/esm/curve/CurveLocationDetail.js +44 -0
  542. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  543. package/lib/esm/curve/CurvePrimitive.d.ts +7 -10
  544. package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
  545. package/lib/esm/curve/CurvePrimitive.js +27 -12
  546. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  547. package/lib/esm/curve/CurveProcessor.js +2 -0
  548. package/lib/esm/curve/CurveProcessor.js.map +1 -1
  549. package/lib/esm/curve/CurveWireMomentsXYZ.js +2 -0
  550. package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
  551. package/lib/esm/curve/LineSegment3d.js +6 -2
  552. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  553. package/lib/esm/curve/LineString3d.js +27 -7
  554. package/lib/esm/curve/LineString3d.js.map +1 -1
  555. package/lib/esm/curve/Loop.js +12 -4
  556. package/lib/esm/curve/Loop.js.map +1 -1
  557. package/lib/esm/curve/OffsetOptions.js +25 -21
  558. package/lib/esm/curve/OffsetOptions.js.map +1 -1
  559. package/lib/esm/curve/ParityRegion.js +4 -2
  560. package/lib/esm/curve/ParityRegion.js.map +1 -1
  561. package/lib/esm/curve/Path.js +2 -2
  562. package/lib/esm/curve/Path.js.map +1 -1
  563. package/lib/esm/curve/PointString3d.js +3 -2
  564. package/lib/esm/curve/PointString3d.js.map +1 -1
  565. package/lib/esm/curve/ProxyCurve.js +1 -0
  566. package/lib/esm/curve/ProxyCurve.js.map +1 -1
  567. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js +1 -0
  568. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  569. package/lib/esm/curve/Query/CurveSplitContext.js +3 -0
  570. package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
  571. package/lib/esm/curve/Query/CylindricalRange.js +6 -2
  572. package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
  573. package/lib/esm/curve/Query/PlanarSubdivision.js +4 -6
  574. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  575. package/lib/esm/curve/Query/StrokeCountChain.js +12 -0
  576. package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
  577. package/lib/esm/curve/Query/StrokeCountMap.js +14 -0
  578. package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
  579. package/lib/esm/curve/RegionMomentsXY.js +4 -5
  580. package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
  581. package/lib/esm/curve/RegionOps.js +9 -10
  582. package/lib/esm/curve/RegionOps.js.map +1 -1
  583. package/lib/esm/curve/RegionOpsClassificationSweeps.js +24 -1
  584. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  585. package/lib/esm/curve/StrokeOptions.d.ts +4 -4
  586. package/lib/esm/curve/StrokeOptions.d.ts.map +1 -1
  587. package/lib/esm/curve/StrokeOptions.js +23 -6
  588. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  589. package/lib/esm/curve/UnionRegion.js +4 -2
  590. package/lib/esm/curve/UnionRegion.js.map +1 -1
  591. package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js +13 -7
  592. package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  593. package/lib/esm/curve/internalContexts/ChainCollectorContext.js +6 -0
  594. package/lib/esm/curve/internalContexts/ChainCollectorContext.js.map +1 -1
  595. package/lib/esm/curve/internalContexts/CloneCurvesContext.js +2 -0
  596. package/lib/esm/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  597. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js +13 -5
  598. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  599. package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js +3 -0
  600. package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  601. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js +18 -5
  602. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  603. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js +26 -13
  604. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  605. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js +11 -5
  606. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  607. package/lib/esm/curve/internalContexts/CurveLengthContext.js +6 -0
  608. package/lib/esm/curve/internalContexts/CurveLengthContext.js.map +1 -1
  609. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js +8 -6
  610. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  611. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js +38 -5
  612. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
  613. package/lib/esm/curve/internalContexts/GapSearchContext.js +1 -0
  614. package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
  615. package/lib/esm/curve/internalContexts/MultiChainCollector.js +12 -0
  616. package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
  617. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js +1 -0
  618. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  619. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js +7 -0
  620. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  621. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +22 -4
  622. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  623. package/lib/esm/curve/internalContexts/SumLengthsContext.js +1 -0
  624. package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
  625. package/lib/esm/curve/internalContexts/TransformInPlaceContext.js +3 -0
  626. package/lib/esm/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  627. package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js +2 -0
  628. package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  629. package/lib/esm/curve/spiral/ClothoidSeries.js +4 -0
  630. package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
  631. package/lib/esm/curve/spiral/CubicEvaluator.js +2 -0
  632. package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
  633. package/lib/esm/curve/spiral/CzechSpiralEvaluator.js +4 -0
  634. package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  635. package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js +5 -0
  636. package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  637. package/lib/esm/curve/spiral/DirectSpiral3d.js +12 -2
  638. package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
  639. package/lib/esm/curve/spiral/IntegratedSpiral3d.js +24 -4
  640. package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  641. package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js +2 -0
  642. package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  643. package/lib/esm/curve/spiral/NormalizedTransition.js +5 -0
  644. package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
  645. package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js +2 -0
  646. package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  647. package/lib/esm/curve/spiral/TransitionConditionalProperties.js +10 -0
  648. package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  649. package/lib/esm/curve/spiral/TransitionSpiral3d.js +10 -0
  650. package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
  651. package/lib/esm/curve/spiral/XYCurveEvaluator.js +6 -0
  652. package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
  653. package/lib/esm/geometry3d/Angle.js +18 -16
  654. package/lib/esm/geometry3d/Angle.js.map +1 -1
  655. package/lib/esm/geometry3d/AngleSweep.d.ts +1 -1
  656. package/lib/esm/geometry3d/AngleSweep.d.ts.map +1 -1
  657. package/lib/esm/geometry3d/AngleSweep.js +3 -1
  658. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  659. package/lib/esm/geometry3d/BarycentricTriangle.js +25 -0
  660. package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
  661. package/lib/esm/geometry3d/BilinearPatch.js +8 -0
  662. package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
  663. package/lib/esm/geometry3d/CoincidentGeometryOps.js +5 -0
  664. package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
  665. package/lib/esm/geometry3d/Ellipsoid.js +48 -0
  666. package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
  667. package/lib/esm/geometry3d/FrameBuilder.js +12 -4
  668. package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
  669. package/lib/esm/geometry3d/FrustumAnimation.js +7 -0
  670. package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
  671. package/lib/esm/geometry3d/GrowableBlockedArray.js +12 -0
  672. package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
  673. package/lib/esm/geometry3d/GrowableFloat64Array.js +3 -0
  674. package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
  675. package/lib/esm/geometry3d/GrowableXYArray.d.ts +0 -5
  676. package/lib/esm/geometry3d/GrowableXYArray.d.ts.map +1 -1
  677. package/lib/esm/geometry3d/GrowableXYArray.js +16 -7
  678. package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
  679. package/lib/esm/geometry3d/GrowableXYZArray.d.ts +32 -10
  680. package/lib/esm/geometry3d/GrowableXYZArray.d.ts.map +1 -1
  681. package/lib/esm/geometry3d/GrowableXYZArray.js +70 -16
  682. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  683. package/lib/esm/geometry3d/IndexedCollectionInterval.js +6 -0
  684. package/lib/esm/geometry3d/IndexedCollectionInterval.js.map +1 -1
  685. package/lib/esm/geometry3d/IndexedXYCollection.js +1 -0
  686. package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
  687. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts +13 -2
  688. package/lib/esm/geometry3d/IndexedXYZCollection.d.ts.map +1 -1
  689. package/lib/esm/geometry3d/IndexedXYZCollection.js +26 -11
  690. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  691. package/lib/esm/geometry3d/LongitudeLatitudeAltitude.js +3 -0
  692. package/lib/esm/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  693. package/lib/esm/geometry3d/Matrix3d.d.ts +3 -4
  694. package/lib/esm/geometry3d/Matrix3d.d.ts.map +1 -1
  695. package/lib/esm/geometry3d/Matrix3d.js +34 -12
  696. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  697. package/lib/esm/geometry3d/OrderedRotationAngles.js +10 -2
  698. package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
  699. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js +2 -0
  700. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  701. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js +7 -0
  702. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  703. package/lib/esm/geometry3d/Point2dArrayCarrier.js +2 -0
  704. package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
  705. package/lib/esm/geometry3d/Point2dVector2d.js +4 -0
  706. package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
  707. package/lib/esm/geometry3d/Point3dArrayCarrier.js +3 -1
  708. package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
  709. package/lib/esm/geometry3d/Point3dVector3d.d.ts +6 -6
  710. package/lib/esm/geometry3d/Point3dVector3d.js +12 -6
  711. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  712. package/lib/esm/geometry3d/PointHelpers.js +5 -5
  713. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  714. package/lib/esm/geometry3d/PointStreaming.js +12 -4
  715. package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
  716. package/lib/esm/geometry3d/PolygonOps.d.ts +2 -2
  717. package/lib/esm/geometry3d/PolygonOps.js +62 -25
  718. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  719. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js +7 -3
  720. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  721. package/lib/esm/geometry3d/PolylineOps.d.ts +9 -5
  722. package/lib/esm/geometry3d/PolylineOps.d.ts.map +1 -1
  723. package/lib/esm/geometry3d/PolylineOps.js +12 -5
  724. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  725. package/lib/esm/geometry3d/Range.js +21 -4
  726. package/lib/esm/geometry3d/Range.js.map +1 -1
  727. package/lib/esm/geometry3d/Ray2d.js +2 -0
  728. package/lib/esm/geometry3d/Ray2d.js.map +1 -1
  729. package/lib/esm/geometry3d/Ray3d.js +12 -0
  730. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  731. package/lib/esm/geometry3d/ReusableObjectCache.js +4 -0
  732. package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
  733. package/lib/esm/geometry3d/Segment1d.js +4 -0
  734. package/lib/esm/geometry3d/Segment1d.js.map +1 -1
  735. package/lib/esm/geometry3d/SortablePolygon.js +11 -0
  736. package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
  737. package/lib/esm/geometry3d/Transform.js +3 -0
  738. package/lib/esm/geometry3d/Transform.js.map +1 -1
  739. package/lib/esm/geometry3d/YawPitchRollAngles.js +6 -0
  740. package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
  741. package/lib/esm/geometry4d/Map4d.js +2 -0
  742. package/lib/esm/geometry4d/Map4d.js.map +1 -1
  743. package/lib/esm/geometry4d/Matrix4d.js +1 -0
  744. package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
  745. package/lib/esm/geometry4d/MomentData.d.ts +72 -73
  746. package/lib/esm/geometry4d/MomentData.d.ts.map +1 -1
  747. package/lib/esm/geometry4d/MomentData.js +90 -66
  748. package/lib/esm/geometry4d/MomentData.js.map +1 -1
  749. package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js +6 -0
  750. package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  751. package/lib/esm/geometry4d/Point4d.js +2 -0
  752. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  753. package/lib/esm/numerics/BezierPolynomials.js +8 -0
  754. package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
  755. package/lib/esm/numerics/ClusterableArray.js +29 -13
  756. package/lib/esm/numerics/ClusterableArray.js.map +1 -1
  757. package/lib/esm/numerics/Complex.js +2 -0
  758. package/lib/esm/numerics/Complex.js.map +1 -1
  759. package/lib/esm/numerics/ConvexPolygon2d.js +3 -0
  760. package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
  761. package/lib/esm/numerics/Newton.js +59 -4
  762. package/lib/esm/numerics/Newton.js.map +1 -1
  763. package/lib/esm/numerics/PascalCoefficients.js +1 -1
  764. package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
  765. package/lib/esm/numerics/PolarData.js +13 -1
  766. package/lib/esm/numerics/PolarData.js.map +1 -1
  767. package/lib/esm/numerics/Polynomials.js +64 -26
  768. package/lib/esm/numerics/Polynomials.js.map +1 -1
  769. package/lib/esm/numerics/Quadrature.js +26 -20
  770. package/lib/esm/numerics/Quadrature.js.map +1 -1
  771. package/lib/esm/numerics/TriDiagonalSystem.js +11 -0
  772. package/lib/esm/numerics/TriDiagonalSystem.js.map +1 -1
  773. package/lib/esm/numerics/UnionFind.js +1 -0
  774. package/lib/esm/numerics/UnionFind.js.map +1 -1
  775. package/lib/esm/numerics/UsageSums.js +10 -0
  776. package/lib/esm/numerics/UsageSums.js.map +1 -1
  777. package/lib/esm/polyface/AuxData.js +16 -0
  778. package/lib/esm/polyface/AuxData.js.map +1 -1
  779. package/lib/esm/polyface/BoxTopology.js +67 -67
  780. package/lib/esm/polyface/BoxTopology.js.map +1 -1
  781. package/lib/esm/polyface/FacetFaceData.d.ts +1 -1
  782. package/lib/esm/polyface/FacetFaceData.js +3 -1
  783. package/lib/esm/polyface/FacetFaceData.js.map +1 -1
  784. package/lib/esm/polyface/FacetLocationDetail.js +30 -0
  785. package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
  786. package/lib/esm/polyface/FacetOrientation.js +12 -1
  787. package/lib/esm/polyface/FacetOrientation.js.map +1 -1
  788. package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js +18 -2
  789. package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  790. package/lib/esm/polyface/IndexedEdgeMatcher.d.ts +33 -23
  791. package/lib/esm/polyface/IndexedEdgeMatcher.d.ts.map +1 -1
  792. package/lib/esm/polyface/IndexedEdgeMatcher.js +63 -33
  793. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  794. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts +3 -2
  795. package/lib/esm/polyface/IndexedPolyfaceVisitor.d.ts.map +1 -1
  796. package/lib/esm/polyface/IndexedPolyfaceVisitor.js +11 -2
  797. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  798. package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts +233 -0
  799. package/lib/esm/polyface/IndexedPolyfaceWalker.d.ts.map +1 -0
  800. package/lib/esm/polyface/IndexedPolyfaceWalker.js +349 -0
  801. package/lib/esm/polyface/IndexedPolyfaceWalker.js.map +1 -0
  802. package/lib/esm/polyface/Polyface.d.ts +35 -10
  803. package/lib/esm/polyface/Polyface.d.ts.map +1 -1
  804. package/lib/esm/polyface/Polyface.js +73 -12
  805. package/lib/esm/polyface/Polyface.js.map +1 -1
  806. package/lib/esm/polyface/PolyfaceBuilder.d.ts +14 -27
  807. package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
  808. package/lib/esm/polyface/PolyfaceBuilder.js +48 -80
  809. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  810. package/lib/esm/polyface/PolyfaceClip.js +8 -0
  811. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  812. package/lib/esm/polyface/PolyfaceData.d.ts +28 -0
  813. package/lib/esm/polyface/PolyfaceData.d.ts.map +1 -1
  814. package/lib/esm/polyface/PolyfaceData.js +87 -5
  815. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  816. package/lib/esm/polyface/PolyfaceQuery.js +47 -7
  817. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  818. package/lib/esm/polyface/RangeLengthData.js +7 -0
  819. package/lib/esm/polyface/RangeLengthData.js.map +1 -1
  820. package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js +12 -0
  821. package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
  822. package/lib/esm/polyface/RangeTree/MinimumValueTester.js +5 -2
  823. package/lib/esm/polyface/RangeTree/MinimumValueTester.js.map +1 -1
  824. package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js +12 -0
  825. package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
  826. package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js +14 -0
  827. package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
  828. package/lib/esm/polyface/RangeTree/RangeTreeNode.js +5 -0
  829. package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  830. package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js +43 -0
  831. package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
  832. package/lib/esm/polyface/TaggedNumericData.js +8 -0
  833. package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
  834. package/lib/esm/polyface/TriangleCandidate.js +3 -0
  835. package/lib/esm/polyface/TriangleCandidate.js.map +1 -1
  836. package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js +7 -0
  837. package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  838. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js +6 -0
  839. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  840. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js +3 -0
  841. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  842. package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js +3 -0
  843. package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  844. package/lib/esm/polyface/multiclip/OffsetMeshContext.js +32 -0
  845. package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  846. package/lib/esm/polyface/multiclip/RangeSearch.js +5 -5
  847. package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
  848. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js +21 -8
  849. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  850. package/lib/esm/polyface/multiclip/XYPointBuckets.js +6 -0
  851. package/lib/esm/polyface/multiclip/XYPointBuckets.js.map +1 -1
  852. package/lib/esm/serialization/BGFBAccessors.js +82 -164
  853. package/lib/esm/serialization/BGFBAccessors.js.map +1 -1
  854. package/lib/esm/serialization/BGFBReader.js +22 -22
  855. package/lib/esm/serialization/BGFBReader.js.map +1 -1
  856. package/lib/esm/serialization/BGFBWriter.js +1 -0
  857. package/lib/esm/serialization/BGFBWriter.js.map +1 -1
  858. package/lib/esm/serialization/DeepCompare.js +17 -17
  859. package/lib/esm/serialization/DeepCompare.js.map +1 -1
  860. package/lib/esm/serialization/GeometrySamples.d.ts +5 -5
  861. package/lib/esm/serialization/GeometrySamples.d.ts.map +1 -1
  862. package/lib/esm/serialization/GeometrySamples.js +113 -112
  863. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  864. package/lib/esm/serialization/IModelJsonSchema.d.ts +1 -2
  865. package/lib/esm/serialization/IModelJsonSchema.d.ts.map +1 -1
  866. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  867. package/lib/esm/solid/Box.js +7 -2
  868. package/lib/esm/solid/Box.js.map +1 -1
  869. package/lib/esm/solid/Cone.js +6 -2
  870. package/lib/esm/solid/Cone.js.map +1 -1
  871. package/lib/esm/solid/LinearSweep.js +4 -2
  872. package/lib/esm/solid/LinearSweep.js.map +1 -1
  873. package/lib/esm/solid/RotationalSweep.js +5 -2
  874. package/lib/esm/solid/RotationalSweep.js.map +1 -1
  875. package/lib/esm/solid/RuledSweep.d.ts +26 -23
  876. package/lib/esm/solid/RuledSweep.d.ts.map +1 -1
  877. package/lib/esm/solid/RuledSweep.js +32 -24
  878. package/lib/esm/solid/RuledSweep.js.map +1 -1
  879. package/lib/esm/solid/SolidPrimitive.d.ts +12 -11
  880. package/lib/esm/solid/SolidPrimitive.d.ts.map +1 -1
  881. package/lib/esm/solid/SolidPrimitive.js +11 -6
  882. package/lib/esm/solid/SolidPrimitive.js.map +1 -1
  883. package/lib/esm/solid/Sphere.js +4 -2
  884. package/lib/esm/solid/Sphere.js.map +1 -1
  885. package/lib/esm/solid/SweepContour.d.ts +24 -15
  886. package/lib/esm/solid/SweepContour.d.ts.map +1 -1
  887. package/lib/esm/solid/SweepContour.js +33 -15
  888. package/lib/esm/solid/SweepContour.js.map +1 -1
  889. package/lib/esm/solid/TorusPipe.js +7 -2
  890. package/lib/esm/solid/TorusPipe.js.map +1 -1
  891. package/lib/esm/topology/ChainMerge.js +16 -4
  892. package/lib/esm/topology/ChainMerge.js.map +1 -1
  893. package/lib/esm/topology/Graph.js +41 -6
  894. package/lib/esm/topology/Graph.js.map +1 -1
  895. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.d.ts +1 -1
  896. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js +5 -1
  897. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  898. package/lib/esm/topology/HalfEdgeGraphSearch.js +2 -0
  899. package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
  900. package/lib/esm/topology/HalfEdgeGraphSpineContext.js +9 -2
  901. package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  902. package/lib/esm/topology/HalfEdgeGraphValidation.js +7 -9
  903. package/lib/esm/topology/HalfEdgeGraphValidation.js.map +1 -1
  904. package/lib/esm/topology/HalfEdgeMarkSet.js +5 -0
  905. package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
  906. package/lib/esm/topology/HalfEdgeNodeXYZUV.js +6 -0
  907. package/lib/esm/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  908. package/lib/esm/topology/HalfEdgePointInGraphSearch.js +1 -0
  909. package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  910. package/lib/esm/topology/HalfEdgePositionDetail.js +16 -0
  911. package/lib/esm/topology/HalfEdgePositionDetail.js.map +1 -1
  912. package/lib/esm/topology/HalfEdgePriorityQueue.js +2 -0
  913. package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
  914. package/lib/esm/topology/InsertAndRetriangulateContext.js +4 -0
  915. package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
  916. package/lib/esm/topology/MaskManager.js +3 -0
  917. package/lib/esm/topology/MaskManager.js.map +1 -1
  918. package/lib/esm/topology/Merging.js +11 -6
  919. package/lib/esm/topology/Merging.js.map +1 -1
  920. package/lib/esm/topology/RegularizeFace.js +22 -0
  921. package/lib/esm/topology/RegularizeFace.js.map +1 -1
  922. package/lib/esm/topology/SignedDataSummary.js +22 -0
  923. package/lib/esm/topology/SignedDataSummary.js.map +1 -1
  924. package/lib/esm/topology/Triangulation.js +21 -11
  925. package/lib/esm/topology/Triangulation.js.map +1 -1
  926. package/lib/esm/topology/XYParitySearchContext.js +13 -0
  927. package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
  928. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"IndexedPolyfaceVisitor.js","sourceRoot":"","sources":["../../../src/polyface/IndexedPolyfaceVisitor.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,0CAAuC;AACvC,+CAA4C;AAE5C,mEAAyD;AACzD,yDAAsD;AACtD,yCAA8D;AAC9D,iDAA8C;AAE9C;;;;GAIG;AACH,MAAa,sBAAuB,SAAQ,2BAAY;IAMtD,sEAAsE;IACtE,YAAsB,QAAyB,EAAE,OAAe;QAC9D,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC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ACxE,CAAC;IACD;;;;;;;;;;;;MAYE;IACK,MAAM,CAAC,sBAAsB,CAAC,IAA8C,EAAE,gBAA0B,0BAAQ,CAAC,KAAK,EAAE,EAAE,YAAmB,aAAK,CAAC,gBAAgB,EAAE,EAAE,UAAkB,CAAC;QAC/L,IAAI,IAAI,YAAY,0BAAe;YACjC,OAAO,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;QAC9F,MAAM,OAAO,GAAG,IAAI,CAAC;QACrB,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,MAAM,WAAW,GAAG,0BAAQ,CAAC,UAAU,EAAE,CAAC;QAC1C,KAAK,OAAO,CAAC,KAAK,EAAE,EAAE,OAAO,CAAC,eAAe,EAAE,GAAI,CAAC;YAClD,IAAI,CAAC,uBAAU,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC;gBACpD,SAAS,CAAC,mBAAmB;YAC/B,IAAI,WAAW,CAAC,UAAU,CAAC,aAAa,CAAC,GAAG,GAAG;gBAC7C,SAAS,CAAC,uCAAuC;YACnD,IAAI,WAAW,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,0BAA0B,CAAC,SAAS,CAAC;gBACzF,SAAS,CAAC,oBAAoB;YAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,4BAA4B,CAAC,mBAAmB,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACrG,CAAC;CACF;AA/FD,oEA+FC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Polyface\r\n */\r\n\r\nimport { Geometry } from \"../Geometry\";\r\nimport { Angle } from \"../geometry3d/Angle\";\r\nimport { Point2d } from \"../geometry3d/Point2dVector2d\";\r\nimport { Vector3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { PolygonOps } from \"../geometry3d/PolygonOps\";\r\nimport { IndexedPolyface, PolyfaceVisitor } from \"./Polyface\";\r\nimport { PolyfaceData } from \"./PolyfaceData\";\r\n\r\n/**\r\n * An `IndexedPolyfaceVisitor` is an iterator-like object that \"visits\" facets of a mesh.\r\n * * The visitor extends `PolyfaceData`, so it can at any time hold all the data of a single facet.\r\n * @public\r\n */\r\nexport class IndexedPolyfaceVisitor extends PolyfaceData implements PolyfaceVisitor {\r\n private _currentFacetIndex: number;\r\n private _nextFacetIndex: number;\r\n private _numWrap: number;\r\n private _numEdges: number;\r\n private _polyface: IndexedPolyface;\r\n // to be called from static factory method that validates the polyface\r\n protected constructor(polyface: IndexedPolyface, numWrap: number) {\r\n super(polyface.data.normalCount > 0, polyface.data.paramCount > 0, polyface.data.colorCount > 0, polyface.twoSided);\r\n this._polyface = polyface;\r\n this._numWrap = numWrap;\r\n if (polyface.data.auxData)\r\n this.auxData = polyface.data.auxData.createForVisitor();\r\n this.reset();\r\n this._numEdges = 0;\r\n this._nextFacetIndex = 0;\r\n this._currentFacetIndex = -1;\r\n\r\n }\r\n /** Return the client polyface object. */\r\n public clientPolyface(): IndexedPolyface {\r\n return this._polyface;\r\n }\r\n /** Return the number of facets this visitor is able to visit. */\r\n public getVisitableFacetCount(): number {\r\n return this._polyface.facetCount;\r\n }\r\n /**\r\n * Set the number of vertices replicated in visitor arrays (both data and index arrays).\r\n * * 0,1,2 are the most common as numWrap.\r\n * * Example: suppose `[6,7,8]` is the pointIndex array representing a triangle. First edge would be `6,7`. Second\r\n * edge is `7,8`. Third edge is `8,6`. To access `6` for the third edge, we have to go back to the start of array.\r\n * Therefore, it is useful to store `6` at the end of pointIndex array, i.e., `[6,7,8,6]` meaning `numWrap = 1`.\r\n * Continuing this example, `numWrap = 2` (i.e., `[6,7,8,6,7]`) is useful when each vertex visit requires the next\r\n * two points, e.g., to form two adjacent vectors for a cross product.\r\n */\r\n public setNumWrap(numWrap: number) {\r\n this._numWrap = numWrap;\r\n }\r\n /**\r\n * Return the number of edges in the current facet.\r\n * * If `numWrap > 0` for this visitor, the number of edges is smaller than the number of points.\r\n */\r\n public get numEdgesThisFacet(): number {\r\n return this._numEdges;\r\n }\r\n /** Create a visitor for iterating the facets of `polyface`. */\r\n public static create(polyface: IndexedPolyface, numWrap: number): IndexedPolyfaceVisitor {\r\n return new IndexedPolyfaceVisitor(polyface, numWrap);\r\n }\r\n /** Advance the iterator to a particular facet in the client polyface. */\r\n public moveToReadIndex(facetIndex: number): boolean {\r\n if (!this._polyface.isValidFacetIndex(facetIndex))\r\n return false;\r\n this._currentFacetIndex = facetIndex;\r\n this._nextFacetIndex = facetIndex + 1;\r\n this._numEdges = this._polyface.numEdgeInFacet(facetIndex);\r\n this.resizeAllArrays(this._numEdges + this._numWrap);\r\n this.gatherIndexedData(\r\n this._polyface.data,\r\n this._polyface.facetIndex0(this._currentFacetIndex),\r\n this._polyface.facetIndex1(this._currentFacetIndex),\r\n this._numWrap,\r\n );\r\n return true;\r\n }\r\n /** Advance the iterator to a the 'next' facet in the client polyface. */\r\n public moveToNextFacet(): boolean {\r\n if (this._nextFacetIndex !== this._currentFacetIndex)\r\n return this.moveToReadIndex(this._nextFacetIndex);\r\n this._nextFacetIndex++;\r\n return true;\r\n }\r\n /** Reset the iterator to start at the first facet of the polyface. */\r\n public reset(): void {\r\n this.moveToReadIndex(0);\r\n this._nextFacetIndex = 0; // so immediate moveToNextFacet stays here.\r\n }\r\n /**\r\n * Attempts to extract the distance parameter for the given vertex `index` on the current facet.\r\n * Returns the distance parameter as a point. Returns `undefined` on failure.\r\n */\r\n public tryGetDistanceParameter(index: number, result?: Point2d): Point2d | undefined {\r\n if (index < 0 || index >= this.numEdgesThisFacet)\r\n return undefined;\r\n if (this.param === undefined || this._polyface.data.face.length === 0)\r\n return undefined;\r\n const faceData = this._polyface.tryGetFaceData(this._currentFacetIndex);\r\n if (!faceData)\r\n return undefined;\r\n return faceData.convertParamXYToDistance(\r\n this.param.getXAtUncheckedPointIndex(index),\r\n this.param.getYAtUncheckedPointIndex(index),\r\n result,\r\n );\r\n }\r\n /**\r\n * Attempts to extract the normalized parameter (0,1) for the given vertex `index` on the current facet.\r\n * Returns the normalized parameter as a point. Returns `undefined` on failure.\r\n */\r\n public tryGetNormalizedParameter(index: number, result?: Point2d): Point2d | undefined {\r\n if (index < 0 || index >= this.numEdgesThisFacet)\r\n return undefined;\r\n if (this.param === undefined || this._polyface.data.face.length === 0)\r\n return undefined;\r\n const faceData = this._polyface.tryGetFaceData(this._currentFacetIndex);\r\n if (!faceData)\r\n return undefined;\r\n return faceData.convertParamXYToNormalized(\r\n this.param.getXAtUncheckedPointIndex(index),\r\n this.param.getYAtUncheckedPointIndex(index),\r\n result,\r\n );\r\n }\r\n /** Return the index (in the client polyface) of the current facet. */\r\n public currentReadIndex(): number {\r\n return this._currentFacetIndex;\r\n }\r\n /** Return the point index of vertex `i` within the currently loaded facet. */\r\n public clientPointIndex(i: number): number {\r\n return this.pointIndex[i];\r\n }\r\n /** Return the param index of vertex `i` within the currently loaded facet. */\r\n public clientParamIndex(i: number): number {\r\n return this.paramIndex ? this.paramIndex[i] : -1;\r\n }\r\n /** Return the normal index of vertex `i` within the currently loaded facet. */\r\n public clientNormalIndex(i: number): number {\r\n return this.normalIndex ? this.normalIndex[i] : -1;\r\n }\r\n /** Return the color index of vertex `i` within the currently loaded facet. */\r\n public clientColorIndex(i: number): number {\r\n return this.colorIndex ? this.colorIndex[i] : -1;\r\n }\r\n /** Return the aux data index of vertex `i` within the currently loaded facet. */\r\n public clientAuxIndex(i: number): number {\r\n return this.auxData ? this.auxData.indices[i] : -1;\r\n }\r\n /** Clear the contents of all arrays. */\r\n public clearArrays(): void {\r\n this.point.length = 0;\r\n this.edgeVisible.length = 0;\r\n if (this.param !== undefined)\r\n this.param.length = 0;\r\n if (this.normal !== undefined)\r\n this.normal.length = 0;\r\n if (this.color !== undefined)\r\n this.color.length = 0;\r\n // TODO: indices? auxData? taggedNumericData?\r\n }\r\n /** Transfer data from a specified `index` of the `other` visitor as new data in this visitor. */\r\n public pushDataFrom(other: PolyfaceVisitor, index: number): void {\r\n this.point.pushFromGrowableXYZArray(other.point, index);\r\n this.edgeVisible.push(other.edgeVisible[index]);\r\n if (this.param && other.param && index < other.param.length)\r\n this.param.pushFromGrowableXYArray(other.param, index);\r\n if (this.normal && other.normal && index < other.normal.length)\r\n this.normal.pushFromGrowableXYZArray(other.normal, index);\r\n if (this.color && other.color && index < other.color.length)\r\n this.color.push(other.color[index]);\r\n // TODO: indices? auxData? taggedNumericData?\r\n }\r\n /**\r\n * Transfer interpolated data from the other visitor.\r\n * * All data values are interpolated at `fraction` between `other` values at `index0` and `index1`.\r\n */\r\n public pushInterpolatedDataFrom(other: PolyfaceVisitor, index0: number, fraction: number, index1: number): void {\r\n if (index0 > index1)\r\n this.pushInterpolatedDataFrom(other, index1, 1.0 - fraction, index0);\r\n this.point.pushInterpolatedFromGrowableXYZArray(other.point, index0, fraction, index1);\r\n const newVisibility = (((index0 + 1) % other.edgeVisible.length) === index1) ? other.edgeVisible[index0] : false;\r\n this.edgeVisible.push(newVisibility); // interpolation along an edge preserves visibility of original edge\r\n if (this.param && other.param && index0 < other.param.length && index1 < other.param.length)\r\n this.param.pushInterpolatedFromGrowableXYArray(other.param, index0, fraction, index1);\r\n if (this.normal && other.normal && index0 < other.normal.length && index1 < other.normal.length)\r\n this.normal.pushInterpolatedFromGrowableXYZArray(other.normal, index0, fraction, index1);\r\n if (this.color && other.color && index0 < other.color.length && index1 < other.color.length)\r\n this.color.push(Geometry.interpolateColor(other.color[index0], fraction, other.color[index1]));\r\n // TODO: auxData? taggedNumericData?\r\n }\r\n}\r\n/**\r\n * An `IndexedPolyfaceSubsetVisitor` is an `IndexedPolyfaceVisitor` which only visits a subset of facets in the polyface.\r\n * * The subset is defined by an array of facet indices provided when this visitor is created.\r\n * * Input indices (e.g., for `moveToReadIndex`) are understood to be indices into the subset array.\r\n * @public\r\n */\r\nexport class IndexedPolyfaceSubsetVisitor extends IndexedPolyfaceVisitor {\r\n private _parentFacetIndices?: number[]; // only undefined during super constructor!\r\n private _currentActiveIndex: number; // index within _parentFacetIndices, or -1 after construction\r\n private _nextActiveIndex: number; // index within _parentFacetIndices\r\n\r\n private constructor(polyface: IndexedPolyface, activeFacetIndices: number[], numWrap: number) {\r\n super(polyface, numWrap);\r\n this._parentFacetIndices = activeFacetIndices.slice();\r\n this._currentActiveIndex = -1;\r\n this._nextActiveIndex = 0;\r\n }\r\n private isValidSubsetIndex(index: number): boolean {\r\n return (undefined !== this._parentFacetIndices) && index >= 0 && index < this._parentFacetIndices.length;\r\n }\r\n /**\r\n * Create a visitor for iterating a subset of the facets of `polyface`.\r\n * @param polyface reference to the client polyface, supplying facets\r\n * @param activeFacetIndices array of indices of facets in the client polyface to visit. This array is cloned.\r\n * @param numWrap number of vertices replicated in the visitor arrays to facilitate simpler caller code. Default is zero.\r\n */\r\n public static createSubsetVisitor(polyface: IndexedPolyface, activeFacetIndices: number[], numWrap: number = 0): IndexedPolyfaceSubsetVisitor {\r\n return new IndexedPolyfaceSubsetVisitor(polyface, activeFacetIndices, numWrap);\r\n }\r\n /**\r\n * Advance the iterator to a particular facet in the subset of client polyface facets.\r\n * @param activeIndex the index of the facet within the subset, not to be confused with the index of the facet within the client polyface.\r\n * @return whether the iterator was successfully moved.\r\n */\r\n public override moveToReadIndex(activeIndex: number): boolean {\r\n if (this.isValidSubsetIndex(activeIndex)) {\r\n this._currentActiveIndex = activeIndex;\r\n this._nextActiveIndex = activeIndex + 1;\r\n return super.moveToReadIndex(this._parentFacetIndices![activeIndex]);\r\n }\r\n return false;\r\n }\r\n /**\r\n * Advance the iterator to the next facet in the subset of client polyface facets.\r\n * @return whether the iterator was successfully moved.\r\n */\r\n public override moveToNextFacet(): boolean {\r\n if (this._nextActiveIndex !== this._currentActiveIndex)\r\n return this.moveToReadIndex(this._nextActiveIndex);\r\n this._nextActiveIndex++;\r\n return true;\r\n }\r\n /** Reset the iterator to start at the first active facet in the subset of client polyface facets. */\r\n public override reset(): void {\r\n this.moveToReadIndex(0);\r\n this._nextActiveIndex = 0; // so immediate moveToNextFacet stays here.\r\n }\r\n /**\r\n * Return the parent facet index of the indicated index within the subset of client polyface facets.\r\n * @param activeIndex index of the facet within the subset. Default is the active facet.\r\n * @return valid client polyface facet index, or `undefined` if invalid input index.\r\n */\r\n public parentFacetIndex(activeIndex?: number): number | undefined {\r\n if (undefined === activeIndex)\r\n activeIndex = this._currentActiveIndex;\r\n return this.isValidSubsetIndex(activeIndex) ? this._parentFacetIndices![activeIndex] : undefined;\r\n }\r\n /** Return the number of facets this visitor is able to visit. */\r\n public override getVisitableFacetCount(): number {\r\n return this._parentFacetIndices ? this._parentFacetIndices.length : 0;\r\n }\r\n /**\r\n * Create a visitor for those mesh facets with normal in the same half-space as the given vector.\r\n * * For example, to visit the top facets of a tiled terrain mesh but skip the \"skirt\" facets, pass\r\n * `compareVector = Vector3d.unitZ()` and a suitable `sideAngle` tolerance. Note that this will also\r\n * filter out *interior* facets that are nearly vertical, not just the \"skirt\" facets on the boundary.\r\n * @param mesh the mesh from which to select facets\r\n * @param compareVector vector to which to compare facet normals. The visitor will visit only those facets\r\n * with normals in the same half-space as this vector. Default is 001.\r\n * @param sideAngle optional angular tolerance to filter the facets near the border between half-spaces.\r\n * The visitor will *not* visit facets whose normals are nearly perpendicular to `compareVector`.\r\n * Default is [[Geometry.smallAngleRadians]].\r\n * @param numWrap optional number of entries replicated in visitor arrays. Default is 0.\r\n */\r\n public static createNormalComparison(mesh: IndexedPolyface | IndexedPolyfaceVisitor, compareVector: Vector3d = Vector3d.unitZ(), sideAngle: Angle = Angle.createSmallAngle(), numWrap: number = 0): IndexedPolyfaceSubsetVisitor {\r\n if (mesh instanceof IndexedPolyface)\r\n return this.createNormalComparison(mesh.createVisitor(), compareVector, sideAngle, numWrap);\r\n const visitor = mesh;\r\n const facets: number[] = [];\r\n const facetNormal = Vector3d.createZero();\r\n for (visitor.reset(); visitor.moveToNextFacet(); ) {\r\n if (!PolygonOps.unitNormal(visitor.point, facetNormal))\r\n continue; // degenerate facet\r\n if (facetNormal.dotProduct(compareVector) < 0.0)\r\n continue; // ignore facet facing other half-space\r\n if (facetNormal.angleFromPerpendicular(compareVector).isMagnitudeLessThanOrEqual(sideAngle))\r\n continue; // ignore side facet\r\n facets.push(visitor.currentReadIndex());\r\n }\r\n return IndexedPolyfaceSubsetVisitor.createSubsetVisitor(visitor.clientPolyface(), facets, numWrap);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"IndexedPolyfaceVisitor.js","sourceRoot":"","sources":["../../../src/polyface/IndexedPolyfaceVisitor.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F;;GAEG;AAEH,0CAAuC;AACvC,+CAA4C;AAE5C,mEAAyD;AACzD,yDAAsD;AACtD,yCAA8D;AAC9D,iDAA8C;AAE9C;;;;GAIG;AACH,MAAa,sBAAuB,SAAQ,2BAAY;IAC9C,kBAAkB,CAAS;IAC3B,eAAe,CAAS;IACxB,QAAQ,CAAS;IACjB,SAAS,CAAS;IAClB,SAAS,CAAkB;IACnC,sEAAsE;IACtE,YAAsB,QAAyB,EAAE,OAAe;QAC9D,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,GAAG,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACpH,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,IAAI,QAAQ,CAAC,IAAI,CAAC,OAAO;YACvB,IAAI,CA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AM,CAAC,sBAAsB,CAClC,IAA8C,EAC9C,gBAA0B,0BAAQ,CAAC,KAAK,EAAE,EAC1C,YAAmB,aAAK,CAAC,gBAAgB,EAAE,EAC3C,UAAkB,CAAC;QAEnB,IAAI,IAAI,YAAY,0BAAe;YACjC,OAAO,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;QAC9F,MAAM,OAAO,GAAG,IAAI,CAAC;QACrB,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,MAAM,WAAW,GAAG,0BAAQ,CAAC,UAAU,EAAE,CAAC;QAC1C,KAAK,OAAO,CAAC,KAAK,EAAE,EAAE,OAAO,CAAC,eAAe,EAAE,GAAG,CAAC;YACjD,IAAI,CAAC,uBAAU,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,WAAW,CAAC;gBACpD,SAAS,CAAC,mBAAmB;YAC/B,IAAI,WAAW,CAAC,UAAU,CAAC,aAAa,CAAC,GAAG,GAAG;gBAC7C,SAAS,CAAC,uCAAuC;YACnD,IAAI,WAAW,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC,0BAA0B,CAAC,SAAS,CAAC;gBACzF,SAAS,CAAC,oBAAoB;YAChC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,4BAA4B,CAAC,mBAAmB,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACrG,CAAC;CACF;AAvGD,oEAuGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\n/** @packageDocumentation\r\n * @module Polyface\r\n */\r\n\r\nimport { Geometry } from \"../Geometry\";\r\nimport { Angle } from \"../geometry3d/Angle\";\r\nimport { Point2d } from \"../geometry3d/Point2dVector2d\";\r\nimport { Vector3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { PolygonOps } from \"../geometry3d/PolygonOps\";\r\nimport { IndexedPolyface, PolyfaceVisitor } from \"./Polyface\";\r\nimport { PolyfaceData } from \"./PolyfaceData\";\r\n\r\n/**\r\n * An `IndexedPolyfaceVisitor` is an iterator-like object that \"visits\" facets of a mesh.\r\n * * The visitor extends `PolyfaceData`, so it can at any time hold all the data of a single facet.\r\n * @public\r\n */\r\nexport class IndexedPolyfaceVisitor extends PolyfaceData implements PolyfaceVisitor {\r\n private _currentFacetIndex: number;\r\n private _nextFacetIndex: number;\r\n private _numWrap: number;\r\n private _numEdges: number;\r\n private _polyface: IndexedPolyface;\r\n // to be called from static factory method that validates the polyface\r\n protected constructor(polyface: IndexedPolyface, numWrap: number) {\r\n super(polyface.data.normalCount > 0, polyface.data.paramCount > 0, polyface.data.colorCount > 0, polyface.twoSided);\r\n this._polyface = polyface;\r\n this._numWrap = numWrap;\r\n if (polyface.data.auxData)\r\n this.auxData = polyface.data.auxData.createForVisitor();\r\n this.reset();\r\n this._numEdges = 0;\r\n this._nextFacetIndex = 0;\r\n this._currentFacetIndex = -1;\r\n\r\n }\r\n /** Return the client polyface object. */\r\n public clientPolyface(): IndexedPolyface {\r\n return this._polyface;\r\n }\r\n /** Return the number of facets this visitor is able to visit. */\r\n public getVisitableFacetCount(): number {\r\n return this._polyface.facetCount;\r\n }\r\n /**\r\n * Set the number of vertices replicated in visitor arrays (both data and index arrays).\r\n * * 0,1,2 are the most common as numWrap.\r\n * * Example: suppose `[6,7,8]` is the pointIndex array representing a triangle. First edge would be `6,7`. Second\r\n * edge is `7,8`. Third edge is `8,6`. To access `6` for the third edge, we have to go back to the start of array.\r\n * Therefore, it is useful to store `6` at the end of pointIndex array, i.e., `[6,7,8,6]` meaning `numWrap = 1`.\r\n * Continuing this example, `numWrap = 2` (i.e., `[6,7,8,6,7]`) is useful when each vertex visit requires the next\r\n * two points, e.g., to form two adjacent vectors for a cross product.\r\n */\r\n public setNumWrap(numWrap: number) {\r\n this._numWrap = numWrap;\r\n }\r\n /**\r\n * Return the number of edges in the current facet.\r\n * * If `numWrap > 0` for this visitor, the number of edges is smaller than the number of points.\r\n */\r\n public get numEdgesThisFacet(): number {\r\n return this._numEdges;\r\n }\r\n /** Create a visitor for iterating the facets of `polyface`. */\r\n public static create(polyface: IndexedPolyface, numWrap: number): IndexedPolyfaceVisitor {\r\n return new IndexedPolyfaceVisitor(polyface, numWrap);\r\n }\r\n /** Advance the iterator to a particular facet in the client polyface. */\r\n public moveToReadIndex(facetIndex: number): boolean {\r\n if (!this._polyface.isValidFacetIndex(facetIndex))\r\n return false;\r\n this._currentFacetIndex = facetIndex;\r\n this._nextFacetIndex = facetIndex + 1;\r\n this._numEdges = this._polyface.numEdgeInFacet(facetIndex);\r\n this.resizeAllArrays(this._numEdges + this._numWrap);\r\n this.gatherIndexedData(\r\n this._polyface.data,\r\n this._polyface.facetIndex0(this._currentFacetIndex),\r\n this._polyface.facetIndex1(this._currentFacetIndex),\r\n this._numWrap,\r\n );\r\n return true;\r\n }\r\n /** Advance the iterator to a the 'next' facet in the client polyface. */\r\n public moveToNextFacet(): boolean {\r\n if (this._nextFacetIndex !== this._currentFacetIndex)\r\n return this.moveToReadIndex(this._nextFacetIndex);\r\n this._nextFacetIndex++;\r\n return true;\r\n }\r\n /** Reset the iterator to start at the first facet of the polyface. */\r\n public reset(): void {\r\n this.moveToReadIndex(0);\r\n this._nextFacetIndex = 0; // so immediate moveToNextFacet stays here.\r\n }\r\n /**\r\n * Attempts to extract the distance parameter for the given vertex `index` on the current facet.\r\n * Returns the distance parameter as a point. Returns `undefined` on failure.\r\n */\r\n public tryGetDistanceParameter(index: number, result?: Point2d): Point2d | undefined {\r\n if (index < 0 || index >= this.numEdgesThisFacet)\r\n return undefined;\r\n if (this.param === undefined || this._polyface.data.face.length === 0)\r\n return undefined;\r\n const faceData = this._polyface.tryGetFaceData(this._currentFacetIndex);\r\n if (!faceData)\r\n return undefined;\r\n return faceData.convertParamXYToDistance(\r\n this.param.getXAtUncheckedPointIndex(index),\r\n this.param.getYAtUncheckedPointIndex(index),\r\n result,\r\n );\r\n }\r\n /**\r\n * Attempts to extract the normalized parameter (0,1) for the given vertex `index` on the current facet.\r\n * Returns the normalized parameter as a point. Returns `undefined` on failure.\r\n */\r\n public tryGetNormalizedParameter(index: number, result?: Point2d): Point2d | undefined {\r\n if (index < 0 || index >= this.numEdgesThisFacet)\r\n return undefined;\r\n if (this.param === undefined || this._polyface.data.face.length === 0)\r\n return undefined;\r\n const faceData = this._polyface.tryGetFaceData(this._currentFacetIndex);\r\n if (!faceData)\r\n return undefined;\r\n return faceData.convertParamXYToNormalized(\r\n this.param.getXAtUncheckedPointIndex(index),\r\n this.param.getYAtUncheckedPointIndex(index),\r\n result,\r\n );\r\n }\r\n /** Return the facetIndex of the currently referenced facet in the client polyface. */\r\n public currentReadIndex(): number {\r\n return this._currentFacetIndex;\r\n }\r\n /** Return the point index of vertex `i` within the currently loaded facet. */\r\n public clientPointIndex(i: number): number {\r\n return this.pointIndex[i];\r\n }\r\n /** Return the param index of vertex `i` within the currently loaded facet. */\r\n public clientParamIndex(i: number): number {\r\n return this.paramIndex ? this.paramIndex[i] : -1;\r\n }\r\n /** Return the normal index of vertex `i` within the currently loaded facet. */\r\n public clientNormalIndex(i: number): number {\r\n return this.normalIndex ? this.normalIndex[i] : -1;\r\n }\r\n /** Return the color index of vertex `i` within the currently loaded facet. */\r\n public clientColorIndex(i: number): number {\r\n return this.colorIndex ? this.colorIndex[i] : -1;\r\n }\r\n /** Return the aux data index of vertex `i` within the currently loaded facet. */\r\n public clientAuxIndex(i: number): number {\r\n return this.auxData ? this.auxData.indices[i] : -1;\r\n }\r\n /** Clear the contents of all arrays. */\r\n public clearArrays(): void {\r\n this.point.length = 0;\r\n this.edgeVisible.length = 0;\r\n if (this.param !== undefined)\r\n this.param.length = 0;\r\n if (this.normal !== undefined)\r\n this.normal.length = 0;\r\n if (this.color !== undefined)\r\n this.color.length = 0;\r\n // TODO: indices? auxData? taggedNumericData?\r\n }\r\n /** Transfer data from a specified `index` of the `other` visitor as new data in this visitor. */\r\n public pushDataFrom(other: PolyfaceVisitor, index: number): void {\r\n this.point.pushFromGrowableXYZArray(other.point, index);\r\n this.edgeVisible.push(other.edgeVisible[index]);\r\n if (this.param && other.param && index < other.param.length)\r\n this.param.pushFromGrowableXYArray(other.param, index);\r\n if (this.normal && other.normal && index < other.normal.length)\r\n this.normal.pushFromGrowableXYZArray(other.normal, index);\r\n if (this.color && other.color && index < other.color.length)\r\n this.color.push(other.color[index]);\r\n // TODO: indices? auxData? taggedNumericData?\r\n }\r\n /**\r\n * Transfer interpolated data from the other visitor.\r\n * * All data values are interpolated at `fraction` between `other` values at `index0` and `index1`.\r\n */\r\n public pushInterpolatedDataFrom(other: PolyfaceVisitor, index0: number, fraction: number, index1: number): void {\r\n if (index0 > index1)\r\n this.pushInterpolatedDataFrom(other, index1, 1.0 - fraction, index0);\r\n this.point.pushInterpolatedFromGrowableXYZArray(other.point, index0, fraction, index1);\r\n const newVisibility = (((index0 + 1) % other.edgeVisible.length) === index1) ? other.edgeVisible[index0] : false;\r\n this.edgeVisible.push(newVisibility); // interpolation along an edge preserves visibility of original edge\r\n if (this.param && other.param && index0 < other.param.length && index1 < other.param.length)\r\n this.param.pushInterpolatedFromGrowableXYArray(other.param, index0, fraction, index1);\r\n if (this.normal && other.normal && index0 < other.normal.length && index1 < other.normal.length)\r\n this.normal.pushInterpolatedFromGrowableXYZArray(other.normal, index0, fraction, index1);\r\n if (this.color && other.color && index0 < other.color.length && index1 < other.color.length)\r\n this.color.push(Geometry.interpolateColor(other.color[index0], fraction, other.color[index1]));\r\n // TODO: auxData? taggedNumericData?\r\n }\r\n}\r\n/**\r\n * An `IndexedPolyfaceSubsetVisitor` is an `IndexedPolyfaceVisitor` which only visits a subset of facets in the polyface.\r\n * * The subset is defined by an array of facet indices provided when this visitor is created.\r\n * * Input indices (e.g., for `moveToReadIndex`) are understood to be indices into the subset array.\r\n * @public\r\n */\r\nexport class IndexedPolyfaceSubsetVisitor extends IndexedPolyfaceVisitor {\r\n private _parentFacetIndices?: number[]; // only undefined during super constructor!\r\n private _currentActiveIndex: number; // index within _parentFacetIndices, or -1 after construction\r\n private _nextActiveIndex: number; // index within _parentFacetIndices\r\n\r\n private constructor(polyface: IndexedPolyface, activeFacetIndices: number[], numWrap: number) {\r\n super(polyface, numWrap);\r\n this._parentFacetIndices = activeFacetIndices.slice();\r\n this._currentActiveIndex = -1;\r\n this._nextActiveIndex = 0;\r\n }\r\n private isValidSubsetIndex(index: number): boolean {\r\n return (undefined !== this._parentFacetIndices) && index >= 0 && index < this._parentFacetIndices.length;\r\n }\r\n /**\r\n * Create a visitor for iterating a subset of the facets of `polyface`.\r\n * @param polyface reference to the client polyface, supplying facets\r\n * @param activeFacetIndices array of indices of facets in the client polyface to visit. This array is cloned.\r\n * @param numWrap number of vertices replicated in the visitor arrays to facilitate simpler caller code. Default is zero.\r\n */\r\n public static createSubsetVisitor(\r\n polyface: IndexedPolyface, activeFacetIndices: number[], numWrap: number = 0,\r\n ): IndexedPolyfaceSubsetVisitor {\r\n return new IndexedPolyfaceSubsetVisitor(polyface, activeFacetIndices, numWrap);\r\n }\r\n /**\r\n * Advance the iterator to a particular facet in the subset of client polyface facets.\r\n * @param activeIndex the index of the facet within the subset, not to be confused with the index of the facet within\r\n * the client polyface.\r\n * @return whether the iterator was successfully moved.\r\n */\r\n public override moveToReadIndex(activeIndex: number): boolean {\r\n if (this.isValidSubsetIndex(activeIndex)) {\r\n this._currentActiveIndex = activeIndex;\r\n this._nextActiveIndex = activeIndex + 1;\r\n return super.moveToReadIndex(this._parentFacetIndices![activeIndex]);\r\n }\r\n return false;\r\n }\r\n /**\r\n * Advance the iterator to the next facet in the subset of client polyface facets.\r\n * @return whether the iterator was successfully moved.\r\n */\r\n public override moveToNextFacet(): boolean {\r\n if (this._nextActiveIndex !== this._currentActiveIndex)\r\n return this.moveToReadIndex(this._nextActiveIndex);\r\n this._nextActiveIndex++;\r\n return true;\r\n }\r\n /** Reset the iterator to start at the first active facet in the subset of client polyface facets. */\r\n public override reset(): void {\r\n this.moveToReadIndex(0);\r\n this._nextActiveIndex = 0; // so immediate moveToNextFacet stays here.\r\n }\r\n /**\r\n * Return the parent facet index of the indicated index within the subset of client polyface facets.\r\n * @param activeIndex index of the facet within the subset. Default is the active facet.\r\n * @return valid client polyface facet index, or `undefined` if invalid input index.\r\n */\r\n public parentFacetIndex(activeIndex?: number): number | undefined {\r\n if (undefined === activeIndex)\r\n activeIndex = this._currentActiveIndex;\r\n return this.isValidSubsetIndex(activeIndex) ? this._parentFacetIndices![activeIndex] : undefined;\r\n }\r\n /** Return the number of facets this visitor is able to visit. */\r\n public override getVisitableFacetCount(): number {\r\n return this._parentFacetIndices ? this._parentFacetIndices.length : 0;\r\n }\r\n /**\r\n * Create a visitor for those mesh facets with normal in the same half-space as the given vector.\r\n * * For example, to visit the top facets of a tiled terrain mesh but skip the \"skirt\" facets, pass\r\n * `compareVector = Vector3d.unitZ()` and a suitable `sideAngle` tolerance. Note that this will also\r\n * filter out *interior* facets that are nearly vertical, not just the \"skirt\" facets on the boundary.\r\n * @param mesh the mesh from which to select facets\r\n * @param compareVector vector to which to compare facet normals. The visitor will visit only those facets\r\n * with normals in the same half-space as this vector. Default is 001.\r\n * @param sideAngle optional angular tolerance to filter the facets near the border between half-spaces.\r\n * The visitor will *not* visit facets whose normals are nearly perpendicular to `compareVector`.\r\n * Default is [[Geometry.smallAngleRadians]].\r\n * @param numWrap optional number of entries replicated in visitor arrays. Default is 0.\r\n */\r\n public static createNormalComparison(\r\n mesh: IndexedPolyface | IndexedPolyfaceVisitor,\r\n compareVector: Vector3d = Vector3d.unitZ(),\r\n sideAngle: Angle = Angle.createSmallAngle(),\r\n numWrap: number = 0,\r\n ): IndexedPolyfaceSubsetVisitor {\r\n if (mesh instanceof IndexedPolyface)\r\n return this.createNormalComparison(mesh.createVisitor(), compareVector, sideAngle, numWrap);\r\n const visitor = mesh;\r\n const facets: number[] = [];\r\n const facetNormal = Vector3d.createZero();\r\n for (visitor.reset(); visitor.moveToNextFacet();) {\r\n if (!PolygonOps.unitNormal(visitor.point, facetNormal))\r\n continue; // degenerate facet\r\n if (facetNormal.dotProduct(compareVector) < 0.0)\r\n continue; // ignore facet facing other half-space\r\n if (facetNormal.angleFromPerpendicular(compareVector).isMagnitudeLessThanOrEqual(sideAngle))\r\n continue; // ignore side facet\r\n facets.push(visitor.currentReadIndex());\r\n }\r\n return IndexedPolyfaceSubsetVisitor.createSubsetVisitor(visitor.clientPolyface(), facets, numWrap);\r\n }\r\n}\r\n"]}
@@ -0,0 +1,233 @@
1
+ import { IndexedPolyfaceVisitor } from "./IndexedPolyfaceVisitor";
2
+ import { IndexedPolyface } from "./Polyface";
3
+ /**
4
+ * The `IndexedPolyfaceWalker` class supports navigation around facets, across edges, and around vertices in an
5
+ * [[IndexedPolyface]].
6
+ * * Compare to the [[IndexedPolyfaceVisitor]] class, which supports the iteration of facets in an `IndexedPolyface`.
7
+ * * A one-time call to [[buildEdgeMateIndices]] creates and populates the `data.edgeMateIndex` array on the input.
8
+ * * This array essentially completes the topology of the `IndexedPolyface` by storing facet adjacency.
9
+ * * After this setup, caller code can create `IndexedPolyfaceWalker` objects via:
10
+ * * `walker = IndexedPolyfaceWalker.createAtFacetIndex(polyface, facetIndex, offsetWithinFacet)`
11
+ * * `walker = IndexedPolyfaceWalker.createAtEdgeIndex(polyface, edgeIndex)`
12
+ * * `walker = IndexedPolyfaceWalker.createAtVisitor(visitor, offsetWithinFacet)`
13
+ * * Once you have a walker object, you can traverse the facet, edge, and vertex loops it references. For
14
+ * example, if `walker.edgeIndex === A`, referring to the right edge of the upper left facet pictured below, then
15
+ * the following are true:
16
+ * * `walker.nextAroundFacet().edgeIndex === B`
17
+ * * `walker.previousAroundFacet().edgeIndex === C`
18
+ * * `walker.edgeMate().edgeIndex === F`
19
+ * * `walker.nextAroundVertex().edgeIndex === E`
20
+ * * `walker.previousAroundVertex().edgeIndex === D`
21
+ * ```
22
+ * # --------- # --------- #
23
+ * | < < < B | F |
24
+ * | ^ | v |
25
+ * | ^ | v |
26
+ * | ^ | v |
27
+ * | C > > > A | D > > > |
28
+ * # --------- # --------- #
29
+ * | < < < E | |
30
+ * | | |
31
+ * | | |
32
+ * | | |
33
+ * # --------- # --------- #
34
+ * ```
35
+ * * When facets are viewed so that the face loops stored in the [[PolyfaceData]] `pointIndex` array have
36
+ * counterclockwise ordering, an edge "from A to B" has facet area to the left and the edge to the right. Likewise,
37
+ * the edges "out of" locations B, C, E, F, D are directed as depicted above.
38
+ * * With this conventional counterclockwise ordering of face loops, "next" is counterclockwise, and "previous" is
39
+ * clockwise:
40
+ * * The [[nextAroundFacet]] step is counterclockwise around the facet.
41
+ * * The [[previousAroundFacet]] step is clockwise around the facet.
42
+ * * The [[nextAroundVertex]] step is counterclockwise around the vertex.
43
+ * * The [[previousAroundVertex]] step is clockwise around the vertex.
44
+ * * The `nextAroundFacet` steps for a walker and its [[edgeMate]] are in opposite directions along their shared edge,
45
+ * when that edge is interior. Thus the `edgeMate` step can be seen to iterate an "edge loop" of two locations for an
46
+ * interior edges.
47
+ * * Invalid Walkers:
48
+ * * An invalid walker has undefined [[edgeIndex]]. For these walkers, [[isUndefined]] returns true, and [[isValid]]
49
+ * returns false. Traversal operations on an invalid walker return an invalid walker.
50
+ * * Invalid walkers are expected during traversals of a mesh with boundary edges, so calling code must be prepared.
51
+ * Boundary edges have exactly one adjacent facet, so for these edges the `edgeMate` step returns an invalid walker.
52
+ * In the diagram above, the `edgeMate` of boundary edge B is undefined.
53
+ * * Invalid walkers can occur while traversing boundary vertices as well. If an edge lacks an `edgeMate`, then the
54
+ * `previousAroundVertex` step yields an invalid walker, because `previousAroundVertex` is implemented as `edgeMate`
55
+ * followed by `nextAroundFacet`. In the diagram above, the `previousAroundVertex` step at boundary edge B yields
56
+ * undefined walker. Similarly, the `nextAroundVertex` step at edge F yields undefined walker.
57
+ * * Invalid walkers can also occur while traversing a non-manifold mesh. Such meshes feature edge(s) with more than
58
+ * two adjacent facets, or with two adjacent facets that have opposite orientations. These meshes are uncommon, and
59
+ * usually indicate a construction problem.
60
+ * * See [[buildEdgeMateIndices]] for further description of the topological relations.
61
+ * @public
62
+ */
63
+ export declare class IndexedPolyfaceWalker {
64
+ /** The polyface being traversed. */
65
+ private _polyface;
66
+ /** The current edgeIndex into the polyface. */
67
+ private _edgeIndex;
68
+ /** Constructor */
69
+ private constructor();
70
+ /**
71
+ * Return the edge index of this walker.
72
+ * * This is an index into the polyface's `data.pointIndex` array.
73
+ * * Can be undefined.
74
+ */
75
+ get edgeIndex(): number | undefined;
76
+ /** Return the polyface of this walker. */
77
+ get polyface(): IndexedPolyface | undefined;
78
+ /**
79
+ * Return true if the walker's edgeIndex is defined.
80
+ * * This method is the opposite of [[isUndefined]].
81
+ */
82
+ get isValid(): boolean;
83
+ /**
84
+ * Return true if the walker's edgeIndex is undefined.
85
+ * * This method is the opposite of [[isValid]].
86
+ * * This can happen during a walk when the walker `w` reaches an exterior edge, for then
87
+ * `w.edgeMate(w).isUndefined === true`.
88
+ * * This can also happen when methods that return a walker receive invalid input.
89
+ */
90
+ get isUndefined(): boolean;
91
+ /**
92
+ * Create a walker for a given polyface at an optional edge.
93
+ * @param polyface reference to the client polyface. This reference is captured (the polyface is not copied).
94
+ * @param edgeIndex optional indication of where to start the walker within the mesh.
95
+ * * If the edgeIndex is valid for the input polyface, the new walker is started there.
96
+ * * If the edgeIndex is undefined or invalid for the input polyface, the walker returns true for [[isUndefined]].
97
+ */
98
+ static createAtEdgeIndex(polyface: IndexedPolyface, edgeIndex?: number): IndexedPolyfaceWalker;
99
+ /**
100
+ * Create a walker for a given polyface at a specified facet.
101
+ * * If `facetIndex` or `offsetWithinFacet` is invalid for the input polyface, the walker returns true for
102
+ * [[isUndefined]].
103
+ * @param polyface the polyface to reference
104
+ * @param facetIndex index of the facet to reference
105
+ * @param offsetWithinFacet optional 0-based offset within the face loop of the facet (default 0). This allows
106
+ * the caller to start the walker at a particular edge of the facet.
107
+ */
108
+ static createAtFacetIndex(polyface: IndexedPolyface, facetIndex: number, offsetWithinFacet?: number): IndexedPolyfaceWalker;
109
+ /**
110
+ * Create a walker at the facet specified by a visitor.
111
+ * @param visitor visitor whose currentReadIndex identifies the facet.
112
+ * @param offsetWithinFacet optional 0-based offset within the face loop of the facet (default 0). This allows
113
+ * the caller to start the walker at a particular edge of the facet.
114
+ */
115
+ static createAtVisitor(visitor: IndexedPolyfaceVisitor, offsetWithinFacet?: number): IndexedPolyfaceWalker;
116
+ /**
117
+ * Create a new IndexedPolyfaceWalker from the instance.
118
+ * * The returned walker refers to the same polyface.
119
+ * * If `edgeIndex` is undefined, the returned walker refers to the same edge as the instance.
120
+ * * If `edgeIndex` is defined and valid, the returned walker refers to this edge.
121
+ * * If `edgeIndex` is defined but invalid, return undefined.
122
+ */
123
+ clone(edgeIndex?: number): IndexedPolyfaceWalker | undefined;
124
+ /**
125
+ * Load the walker's facet into the given visitor.
126
+ * @returns true if the visitor and walker reference the same polyface and the walker has a valid edge index.
127
+ */
128
+ loadVisitor(visitor: IndexedPolyfaceVisitor): boolean;
129
+ /**
130
+ * Test if two walkers are at different edges in the same polyface.
131
+ * * If either has undefined edge, return false.
132
+ * * If they are in different polyfaces, return false.
133
+ * * If they are the same edge in the same polyface, return false.
134
+ * * Otherwise return true.
135
+ */
136
+ isDifferentEdgeInSamePolyface(other: IndexedPolyfaceWalker): boolean;
137
+ /**
138
+ * Test if two walkers are in the same polyface at the same edge.
139
+ * * If either has undefined edge, return false.
140
+ * * If they are in different polyfaces, return false.
141
+ * * If they are the same edge in the same polyface, return true.
142
+ */
143
+ isSameEdge(other: IndexedPolyfaceWalker): boolean;
144
+ /**
145
+ * Return a walker with given edgeIndex and polyface from the calling instance.
146
+ * * If `result` is supplied, that walker is filled and returned.
147
+ * * If `result` is not supplied, a new walker is created.
148
+ */
149
+ private createResult;
150
+ /**
151
+ * Return a walker (new or reused) at the next edge around the facet.
152
+ * * "Next" is in the order of indices in the face loop of this facet.
153
+ * * If the instance has undefined edgeIndex, the result also has undefined edgeIndex.
154
+ * @param result optional receiver to modify and return. May be the same as `this` to move the instance walker
155
+ * to the new location and return it.
156
+ */
157
+ nextAroundFacet(result?: IndexedPolyfaceWalker): IndexedPolyfaceWalker;
158
+ /**
159
+ * Return a walker (new or reused) at the previous edge around the facet.
160
+ * * "Previous" is in the reverse order of indices in the face loop of this facet.
161
+ * * If the instance has undefined edgeIndex, the result also has undefined edgeIndex.
162
+ * @param result optional receiver to modify and return. May be the same as `this` to move the instance walker
163
+ * to the new location and return it.
164
+ */
165
+ previousAroundFacet(result?: IndexedPolyfaceWalker): IndexedPolyfaceWalker;
166
+ /**
167
+ * Return a walker (new or reused) at the edge mate of this walker's edge.
168
+ * * The returned walker has undefined edgeIndex if:
169
+ * * the instance is at a boundary edge, i.e., there is no facet on the other side, or
170
+ * * the instance has undefined edgeIndex.
171
+ * @param result optional receiver to modify and return. May be the same as `this` to move the instance walker
172
+ * to the new location and return it.
173
+ */
174
+ edgeMate(result?: IndexedPolyfaceWalker): IndexedPolyfaceWalker;
175
+ /**
176
+ * Return a walker (new or reused) at the next outbound edge around the vertex at the base of this walker's edge.
177
+ * * If the facet is viewed so that its "nextAroundFacet" direction appears counterclockwise, then the "next"
178
+ * outbound edge is counterclockwise around the base vertex.
179
+ * * The returned walker has undefined edgeIndex if:
180
+ * * the previous edge around the facet is a boundary edge, i.e., there is no facet on the other side, or
181
+ * * the instance has undefined edgeIndex.
182
+ * @param result optional receiver to modify and return. May be the same as `this` to move the instance walker
183
+ * to the new location and return it.
184
+ */
185
+ nextAroundVertex(result?: IndexedPolyfaceWalker): IndexedPolyfaceWalker;
186
+ /**
187
+ * Return a walker (new or reused) at the previous outbound edge around the vertex at the base of this walker's edge.
188
+ * * If the facet is viewed so that its "nextAroundFacet" direction appears counterclockwise, then the "previous"
189
+ * outbound edge is clockwise around the base vertex.
190
+ * * The returned walker has undefined edgeIndex if:
191
+ * * the instance edge is a boundary edge, i.e., there is no facet on the other side, or
192
+ * * the instance has undefined edgeIndex.
193
+ * @param result optional receiver to modify and return. May be the same as `this` to move the instance walker
194
+ * to the new location and return it.
195
+ */
196
+ previousAroundVertex(result?: IndexedPolyfaceWalker): IndexedPolyfaceWalker;
197
+ /**
198
+ * Build the edgeMate index array into the polyface's [[PolyfaceData]].
199
+ * After this method:
200
+ * * The array `polyface.data.edgeMateIndex` is defined with the same length as the other PolyfaceData index arrays.
201
+ * * For each interior edge, `polyface.data.edgeIndexToEdgeMateIndex` returns the edgeIndex on the other side of the
202
+ * edge in the adjacent facet.
203
+ * * The conditions for edgeMate matching are:
204
+ * * Given facetIndex f, let `k0 = polyface.facetIndex0(f)` and `k1 = polyface.facetIndex1(f)`.
205
+ * * Every edgeIndex k in the face loop of facet f satisfies `k0 <= k < k1`.
206
+ * * The edge with edgeIndex k starts at the point with index `polyface.data.pointIndex[k]`.
207
+ * * Let kA be an edgeIndex in this range [k0,k1), and let kB be its in-range successor with cyclic wrap, i.e.,
208
+ * `kB === (kA + 1 === k1) ? k0 : kA + 1`.
209
+ * * Then `polyface.data.pointIndex[kA]` and `polyface.data.pointIndex[kB]` are the indices of the points at the
210
+ * start and end of an edge of that facet.
211
+ * * We call kA the _edgeIndex_ for that edge, and kB the _edgeIndex_ for the next edge around the facet.
212
+ * * If kA is an interior edge in a 2-manifold mesh with properly oriented facets, then there is an adjacent facet
213
+ * whose face loop contains edgeIndices kC and kD referencing the same edge vertices in reverse order, i.e.,
214
+ * * `polyface.data.pointIndex[kA] === polyface.data.pointIndex[kD]`
215
+ * * `polyface.data.pointIndex[kB] === polyface.data.pointIndex[kC]`
216
+ * * Given this relationship, we say that edgeIndices kA and kC are _edge mates_.
217
+ * * A non-interior edge either lies on the boundary of the mesh or is non-manifold (having more than two adjacent
218
+ * facets, or one with the wrong orientation). These edges have no edge mate.
219
+ * * These conditions define a conventional manifold mesh where each edge of a facet has at most one partner edge with
220
+ * opposite orientation in an adjacent facet.
221
+ * * After calling this method, the caller can construct `IndexedPolyfaceWalker` objects to traverse the mesh by
222
+ * walking across edges, around faces, and around vertices. Let walkerA have edgeIndex value kA. Then with the
223
+ * aforementioned edgeIndices:
224
+ * * `walkerC = walkerA.edgeMate()` moves across the edge to its other end, at kC.
225
+ * * `walkerB = walkerA.nextAroundFacet()` moves around the facet to the next edge, at kB.
226
+ * * `walkerB.previousAroundFacet()` moves from kB back to kA.
227
+ * * `walkerD = walkerA.previousAroundVertex()` moves around the vertex to the next edge kD.
228
+ * * `walkerD1 = walkerC.nextAroundFacet()` also moves to kD.
229
+ * * `walkerD.nextAroundVertex()` moves from kD back to kA.
230
+ */
231
+ static buildEdgeMateIndices(polyface: IndexedPolyface): void;
232
+ }
233
+ //# sourceMappingURL=IndexedPolyfaceWalker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IndexedPolyfaceWalker.d.ts","sourceRoot":"","sources":["../../../src/polyface/IndexedPolyfaceWalker.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,qBAAa,qBAAqB;IAChC,oCAAoC;IACpC,OAAO,CAAC,SAAS,CAAkB;IACnC,+CAA+C;IAC/C,OAAO,CAAC,UAAU,CAAqB;IACvC,kBAAkB;IAClB,OAAO;IAIP;;;;OAIG;IACH,IAAW,SAAS,IAAI,MAAM,GAAG,SAAS,CAEzC;IAED,0CAA0C;IAC1C,IAAW,QAAQ,IAAI,eAAe,GAAG,SAAS,CAEjD;IACD;;;OAGG;IACH,IAAW,OAAO,IAAI,OAAO,CAE5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