@itwin/core-geometry 4.1.0-dev.77 → 4.1.0-dev.80

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 (461) hide show
  1. package/lib/cjs/Constant.js.map +1 -1
  2. package/lib/cjs/Geometry.js.map +1 -1
  3. package/lib/cjs/bspline/AkimaCurve3d.js.map +1 -1
  4. package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
  5. package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
  6. package/lib/cjs/bspline/BSplineCurve3dH.js.map +1 -1
  7. package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
  8. package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
  9. package/lib/cjs/bspline/Bezier1dNd.js.map +1 -1
  10. package/lib/cjs/bspline/BezierCurve3d.js.map +1 -1
  11. package/lib/cjs/bspline/BezierCurve3dH.js.map +1 -1
  12. package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
  13. package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
  14. package/lib/cjs/bspline/KnotVector.js.map +1 -1
  15. package/lib/cjs/bspline/SurfaceLocationDetail.js.map +1 -1
  16. package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
  17. package/lib/cjs/clipping/BooleanClipFactory.js.map +1 -1
  18. package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
  19. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  20. package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
  21. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  22. package/lib/cjs/clipping/ClipVector.js.map +1 -1
  23. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  24. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  25. package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  26. package/lib/cjs/core-geometry.js.map +1 -1
  27. package/lib/cjs/curve/Arc3d.d.ts +2 -2
  28. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  29. package/lib/cjs/curve/Arc3d.js +4 -3
  30. package/lib/cjs/curve/Arc3d.js.map +1 -1
  31. package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
  32. package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
  33. package/lib/cjs/curve/CurveChain.js.map +1 -1
  34. package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
  35. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  36. package/lib/cjs/curve/CurveCurve.d.ts +6 -2
  37. package/lib/cjs/curve/CurveCurve.d.ts.map +1 -1
  38. package/lib/cjs/curve/CurveCurve.js +13 -9
  39. package/lib/cjs/curve/CurveCurve.js.map +1 -1
  40. package/lib/cjs/curve/CurveCurveCloseApproachXY.d.ts +74 -68
  41. package/lib/cjs/curve/CurveCurveCloseApproachXY.d.ts.map +1 -1
  42. package/lib/cjs/curve/CurveCurveCloseApproachXY.js +100 -108
  43. package/lib/cjs/curve/CurveCurveCloseApproachXY.js.map +1 -1
  44. package/lib/cjs/curve/CurveCurveIntersectXY.d.ts +46 -48
  45. package/lib/cjs/curve/CurveCurveIntersectXY.d.ts.map +1 -1
  46. package/lib/cjs/curve/CurveCurveIntersectXY.js +72 -61
  47. package/lib/cjs/curve/CurveCurveIntersectXY.js.map +1 -1
  48. package/lib/cjs/curve/CurveCurveIntersectXYZ.d.ts +32 -38
  49. package/lib/cjs/curve/CurveCurveIntersectXYZ.d.ts.map +1 -1
  50. package/lib/cjs/curve/CurveCurveIntersectXYZ.js +86 -97
  51. package/lib/cjs/curve/CurveCurveIntersectXYZ.js.map +1 -1
  52. package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
  53. package/lib/cjs/curve/CurveFactory.js.map +1 -1
  54. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  55. package/lib/cjs/curve/CurveOps.js.map +1 -1
  56. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  57. package/lib/cjs/curve/CurveProcessor.js.map +1 -1
  58. package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
  59. package/lib/cjs/curve/GeometryQuery.js.map +1 -1
  60. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  61. package/lib/cjs/curve/LineString3d.js.map +1 -1
  62. package/lib/cjs/curve/Loop.js.map +1 -1
  63. package/lib/cjs/curve/OffsetOptions.js.map +1 -1
  64. package/lib/cjs/curve/ParityRegion.js.map +1 -1
  65. package/lib/cjs/curve/Path.js.map +1 -1
  66. package/lib/cjs/curve/PointString3d.js.map +1 -1
  67. package/lib/cjs/curve/ProxyCurve.js.map +1 -1
  68. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  69. package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
  70. package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
  71. package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
  72. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  73. package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
  74. package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
  75. package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
  76. package/lib/cjs/curve/RegionOps.js.map +1 -1
  77. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  78. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  79. package/lib/cjs/curve/UnionRegion.js.map +1 -1
  80. package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  81. package/lib/cjs/curve/internalContexts/ChainCollectorContext.js.map +1 -1
  82. package/lib/cjs/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  83. package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  84. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  85. package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  86. package/lib/cjs/curve/internalContexts/CurveLengthContext.js.map +1 -1
  87. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  88. package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
  89. package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
  90. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  91. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  92. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  93. package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
  94. package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  95. package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  96. package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
  97. package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
  98. package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  99. package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  100. package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
  101. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  102. package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  103. package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
  104. package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  105. package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  106. package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
  107. package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
  108. package/lib/cjs/geometry3d/Angle.js.map +1 -1
  109. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  110. package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
  111. package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
  112. package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
  113. package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
  114. package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
  115. package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
  116. package/lib/cjs/geometry3d/GeometryHandler.d.ts +98 -92
  117. package/lib/cjs/geometry3d/GeometryHandler.d.ts.map +1 -1
  118. package/lib/cjs/geometry3d/GeometryHandler.js +247 -124
  119. package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
  120. package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
  121. package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
  122. package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
  123. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  124. package/lib/cjs/geometry3d/IndexedCollectionInterval.js.map +1 -1
  125. package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
  126. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  127. package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  128. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  129. package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
  130. package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
  131. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  132. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  133. package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
  134. package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
  135. package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
  136. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  137. package/lib/cjs/geometry3d/PointHelpers.js.map +1 -1
  138. package/lib/cjs/geometry3d/PointStreaming.js.map +1 -1
  139. package/lib/cjs/geometry3d/PolygonOps.js.map +1 -1
  140. package/lib/cjs/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  141. package/lib/cjs/geometry3d/PolylineOps.js.map +1 -1
  142. package/lib/cjs/geometry3d/Range.js.map +1 -1
  143. package/lib/cjs/geometry3d/Ray2d.js.map +1 -1
  144. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  145. package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
  146. package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
  147. package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
  148. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  149. package/lib/cjs/geometry3d/UVSurfaceOps.js.map +1 -1
  150. package/lib/cjs/geometry3d/XYZProps.js.map +1 -1
  151. package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
  152. package/lib/cjs/geometry4d/Map4d.js.map +1 -1
  153. package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
  154. package/lib/cjs/geometry4d/MomentData.js.map +1 -1
  155. package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  156. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  157. package/lib/cjs/numerics/BandedSystem.js.map +1 -1
  158. package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
  159. package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
  160. package/lib/cjs/numerics/Complex.js.map +1 -1
  161. package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
  162. package/lib/cjs/numerics/Newton.js.map +1 -1
  163. package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
  164. package/lib/cjs/numerics/PolarData.js.map +1 -1
  165. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  166. package/lib/cjs/numerics/Quadrature.js.map +1 -1
  167. package/lib/cjs/numerics/Range1dArray.js.map +1 -1
  168. package/lib/cjs/numerics/TriDiagonalSystem.js.map +1 -1
  169. package/lib/cjs/numerics/UnionFind.js.map +1 -1
  170. package/lib/cjs/numerics/UsageSums.js.map +1 -1
  171. package/lib/cjs/polyface/AuxData.js.map +1 -1
  172. package/lib/cjs/polyface/BoxTopology.js.map +1 -1
  173. package/lib/cjs/polyface/FacetFaceData.js.map +1 -1
  174. package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
  175. package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
  176. package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  177. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  178. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  179. package/lib/cjs/polyface/Polyface.js.map +1 -1
  180. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  181. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  182. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  183. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  184. package/lib/cjs/polyface/RangeLengthData.js.map +1 -1
  185. package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
  186. package/lib/cjs/polyface/TriangleCandidate.js.map +1 -1
  187. package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  188. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  189. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  190. package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  191. package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  192. package/lib/cjs/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  193. package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
  194. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  195. package/lib/cjs/polyface/multiclip/XYPointBuckets.js.map +1 -1
  196. package/lib/cjs/serialization/BGFBAccessors.js.map +1 -1
  197. package/lib/cjs/serialization/BGFBReader.js.map +1 -1
  198. package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
  199. package/lib/cjs/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  200. package/lib/cjs/serialization/DeepCompare.js.map +1 -1
  201. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  202. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  203. package/lib/cjs/solid/Box.js.map +1 -1
  204. package/lib/cjs/solid/Cone.js.map +1 -1
  205. package/lib/cjs/solid/LinearSweep.js.map +1 -1
  206. package/lib/cjs/solid/RotationalSweep.js.map +1 -1
  207. package/lib/cjs/solid/RuledSweep.js.map +1 -1
  208. package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
  209. package/lib/cjs/solid/Sphere.js.map +1 -1
  210. package/lib/cjs/solid/SweepContour.js.map +1 -1
  211. package/lib/cjs/solid/TorusPipe.js.map +1 -1
  212. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  213. package/lib/cjs/topology/Graph.js.map +1 -1
  214. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  215. package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
  216. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  217. package/lib/cjs/topology/HalfEdgeGraphValidation.js.map +1 -1
  218. package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
  219. package/lib/cjs/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  220. package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  221. package/lib/cjs/topology/HalfEdgePositionDetail.js.map +1 -1
  222. package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
  223. package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
  224. package/lib/cjs/topology/MaskManager.js.map +1 -1
  225. package/lib/cjs/topology/Merging.js.map +1 -1
  226. package/lib/cjs/topology/RegularizeFace.js.map +1 -1
  227. package/lib/cjs/topology/SignedDataSummary.js.map +1 -1
  228. package/lib/cjs/topology/SpaceTriangulation.js.map +1 -1
  229. package/lib/cjs/topology/Triangulation.js.map +1 -1
  230. package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
  231. package/lib/esm/Constant.js.map +1 -1
  232. package/lib/esm/Geometry.js.map +1 -1
  233. package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
  234. package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
  235. package/lib/esm/bspline/BSplineCurve.js.map +1 -1
  236. package/lib/esm/bspline/BSplineCurve3dH.js.map +1 -1
  237. package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
  238. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  239. package/lib/esm/bspline/Bezier1dNd.js.map +1 -1
  240. package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
  241. package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
  242. package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
  243. package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
  244. package/lib/esm/bspline/KnotVector.js.map +1 -1
  245. package/lib/esm/bspline/SurfaceLocationDetail.js.map +1 -1
  246. package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
  247. package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
  248. package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
  249. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  250. package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
  251. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  252. package/lib/esm/clipping/ClipVector.js.map +1 -1
  253. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  254. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  255. package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  256. package/lib/esm/core-geometry.js.map +1 -1
  257. package/lib/esm/curve/Arc3d.d.ts +2 -2
  258. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  259. package/lib/esm/curve/Arc3d.js +4 -3
  260. package/lib/esm/curve/Arc3d.js.map +1 -1
  261. package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
  262. package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
  263. package/lib/esm/curve/CurveChain.js.map +1 -1
  264. package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
  265. package/lib/esm/curve/CurveCollection.js.map +1 -1
  266. package/lib/esm/curve/CurveCurve.d.ts +6 -2
  267. package/lib/esm/curve/CurveCurve.d.ts.map +1 -1
  268. package/lib/esm/curve/CurveCurve.js +13 -9
  269. package/lib/esm/curve/CurveCurve.js.map +1 -1
  270. package/lib/esm/curve/CurveCurveCloseApproachXY.d.ts +74 -68
  271. package/lib/esm/curve/CurveCurveCloseApproachXY.d.ts.map +1 -1
  272. package/lib/esm/curve/CurveCurveCloseApproachXY.js +100 -108
  273. package/lib/esm/curve/CurveCurveCloseApproachXY.js.map +1 -1
  274. package/lib/esm/curve/CurveCurveIntersectXY.d.ts +46 -48
  275. package/lib/esm/curve/CurveCurveIntersectXY.d.ts.map +1 -1
  276. package/lib/esm/curve/CurveCurveIntersectXY.js +72 -61
  277. package/lib/esm/curve/CurveCurveIntersectXY.js.map +1 -1
  278. package/lib/esm/curve/CurveCurveIntersectXYZ.d.ts +32 -38
  279. package/lib/esm/curve/CurveCurveIntersectXYZ.d.ts.map +1 -1
  280. package/lib/esm/curve/CurveCurveIntersectXYZ.js +86 -97
  281. package/lib/esm/curve/CurveCurveIntersectXYZ.js.map +1 -1
  282. package/lib/esm/curve/CurveExtendMode.js.map +1 -1
  283. package/lib/esm/curve/CurveFactory.js.map +1 -1
  284. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  285. package/lib/esm/curve/CurveOps.js.map +1 -1
  286. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  287. package/lib/esm/curve/CurveProcessor.js.map +1 -1
  288. package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
  289. package/lib/esm/curve/GeometryQuery.js.map +1 -1
  290. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  291. package/lib/esm/curve/LineString3d.js.map +1 -1
  292. package/lib/esm/curve/Loop.js.map +1 -1
  293. package/lib/esm/curve/OffsetOptions.js.map +1 -1
  294. package/lib/esm/curve/ParityRegion.js.map +1 -1
  295. package/lib/esm/curve/Path.js.map +1 -1
  296. package/lib/esm/curve/PointString3d.js.map +1 -1
  297. package/lib/esm/curve/ProxyCurve.js.map +1 -1
  298. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  299. package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
  300. package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
  301. package/lib/esm/curve/Query/InOutTests.js.map +1 -1
  302. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  303. package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
  304. package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
  305. package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
  306. package/lib/esm/curve/RegionOps.js.map +1 -1
  307. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  308. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  309. package/lib/esm/curve/UnionRegion.js.map +1 -1
  310. package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  311. package/lib/esm/curve/internalContexts/ChainCollectorContext.js.map +1 -1
  312. package/lib/esm/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  313. package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  314. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  315. package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  316. package/lib/esm/curve/internalContexts/CurveLengthContext.js.map +1 -1
  317. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  318. package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
  319. package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
  320. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  321. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  322. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  323. package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
  324. package/lib/esm/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  325. package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  326. package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
  327. package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
  328. package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  329. package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  330. package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
  331. package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  332. package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  333. package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
  334. package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  335. package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  336. package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
  337. package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
  338. package/lib/esm/geometry3d/Angle.js.map +1 -1
  339. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  340. package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
  341. package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
  342. package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
  343. package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
  344. package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
  345. package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
  346. package/lib/esm/geometry3d/GeometryHandler.d.ts +98 -92
  347. package/lib/esm/geometry3d/GeometryHandler.d.ts.map +1 -1
  348. package/lib/esm/geometry3d/GeometryHandler.js +247 -124
  349. package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
  350. package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
  351. package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
  352. package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
  353. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  354. package/lib/esm/geometry3d/IndexedCollectionInterval.js.map +1 -1
  355. package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
  356. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  357. package/lib/esm/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  358. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  359. package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
  360. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  361. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  362. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  363. package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
  364. package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
  365. package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
  366. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  367. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  368. package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
  369. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  370. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  371. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  372. package/lib/esm/geometry3d/Range.js.map +1 -1
  373. package/lib/esm/geometry3d/Ray2d.js.map +1 -1
  374. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  375. package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
  376. package/lib/esm/geometry3d/Segment1d.js.map +1 -1
  377. package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
  378. package/lib/esm/geometry3d/Transform.js.map +1 -1
  379. package/lib/esm/geometry3d/UVSurfaceOps.js.map +1 -1
  380. package/lib/esm/geometry3d/XYZProps.js.map +1 -1
  381. package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
  382. package/lib/esm/geometry4d/Map4d.js.map +1 -1
  383. package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
  384. package/lib/esm/geometry4d/MomentData.js.map +1 -1
  385. package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  386. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  387. package/lib/esm/numerics/BandedSystem.js.map +1 -1
  388. package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
  389. package/lib/esm/numerics/ClusterableArray.js.map +1 -1
  390. package/lib/esm/numerics/Complex.js.map +1 -1
  391. package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
  392. package/lib/esm/numerics/Newton.js.map +1 -1
  393. package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
  394. package/lib/esm/numerics/PolarData.js.map +1 -1
  395. package/lib/esm/numerics/Polynomials.js.map +1 -1
  396. package/lib/esm/numerics/Quadrature.js.map +1 -1
  397. package/lib/esm/numerics/Range1dArray.js.map +1 -1
  398. package/lib/esm/numerics/TriDiagonalSystem.js.map +1 -1
  399. package/lib/esm/numerics/UnionFind.js.map +1 -1
  400. package/lib/esm/numerics/UsageSums.js.map +1 -1
  401. package/lib/esm/polyface/AuxData.js.map +1 -1
  402. package/lib/esm/polyface/BoxTopology.js.map +1 -1
  403. package/lib/esm/polyface/FacetFaceData.js.map +1 -1
  404. package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
  405. package/lib/esm/polyface/FacetOrientation.js.map +1 -1
  406. package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  407. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  408. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  409. package/lib/esm/polyface/Polyface.js.map +1 -1
  410. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  411. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  412. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  413. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  414. package/lib/esm/polyface/RangeLengthData.js.map +1 -1
  415. package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
  416. package/lib/esm/polyface/TriangleCandidate.js.map +1 -1
  417. package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  418. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  419. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  420. package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  421. package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  422. package/lib/esm/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  423. package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
  424. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  425. package/lib/esm/polyface/multiclip/XYPointBuckets.js.map +1 -1
  426. package/lib/esm/serialization/BGFBAccessors.js.map +1 -1
  427. package/lib/esm/serialization/BGFBReader.js.map +1 -1
  428. package/lib/esm/serialization/BGFBWriter.js.map +1 -1
  429. package/lib/esm/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  430. package/lib/esm/serialization/DeepCompare.js.map +1 -1
  431. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  432. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  433. package/lib/esm/solid/Box.js.map +1 -1
  434. package/lib/esm/solid/Cone.js.map +1 -1
  435. package/lib/esm/solid/LinearSweep.js.map +1 -1
  436. package/lib/esm/solid/RotationalSweep.js.map +1 -1
  437. package/lib/esm/solid/RuledSweep.js.map +1 -1
  438. package/lib/esm/solid/SolidPrimitive.js.map +1 -1
  439. package/lib/esm/solid/Sphere.js.map +1 -1
  440. package/lib/esm/solid/SweepContour.js.map +1 -1
  441. package/lib/esm/solid/TorusPipe.js.map +1 -1
  442. package/lib/esm/topology/ChainMerge.js.map +1 -1
  443. package/lib/esm/topology/Graph.js.map +1 -1
  444. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  445. package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
  446. package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  447. package/lib/esm/topology/HalfEdgeGraphValidation.js.map +1 -1
  448. package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
  449. package/lib/esm/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  450. package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  451. package/lib/esm/topology/HalfEdgePositionDetail.js.map +1 -1
  452. package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
  453. package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
  454. package/lib/esm/topology/MaskManager.js.map +1 -1
  455. package/lib/esm/topology/Merging.js.map +1 -1
  456. package/lib/esm/topology/RegularizeFace.js.map +1 -1
  457. package/lib/esm/topology/SignedDataSummary.js.map +1 -1
  458. package/lib/esm/topology/SpaceTriangulation.js.map +1 -1
  459. package/lib/esm/topology/Triangulation.js.map +1 -1
  460. package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
  461. package/package.json +3 -3
@@ -3,128 +3,219 @@
3
3
  * See LICENSE.md in the project root for license terms and full copyright notice.
4
4
  *--------------------------------------------------------------------------------------------*/
5
5
  /**
6
- * * `GeometryHandler` defines the base abstract methods for double-dispatch geometry computation.
6
+ * `GeometryHandler` defines the base abstract methods for double-dispatch geometry computation.
7
7
  * * User code that wants to handle one or all of the commonly known geometry types implements a handler class.
8
- * * User code that does not handle all types is most likely to start with `NullGeometryHandler`, which will provide no-action implementations for all types.
8
+ * * User code that does not handle all types is most likely to start with `NullGeometryHandler`, which will provide
9
+ * No-action implementations for all types.
9
10
  * @public
10
11
  */
11
12
  export class GeometryHandler {
12
- /** handle strongly typed [[CurveCollection]] */
13
+ /** Handle strongly typed [[CurveCollection]] */
13
14
  handleCurveCollection(_g) { }
14
- /** handle strongly typed Path (base class method calls handleCurveCollection) */
15
- handlePath(g) { return this.handleCurveCollection(g); }
16
- /** handle strongly typed Loop (base class method calls handleCurveCollection) */
17
- handleLoop(g) { return this.handleCurveCollection(g); }
18
- /** handle strongly typed ParityRegion (base class method calls handleCurveCollection) */
19
- handleParityRegion(g) { return this.handleCurveCollection(g); }
20
- /** handle strongly typed UnionRegion (base class method calls handleCurveCollection) */
21
- handleUnionRegion(g) { return this.handleCurveCollection(g); }
22
- /** handle strongly typed BagOfCurves (base class method calls handleCurveCollection) */
23
- handleBagOfCurves(g) { return this.handleCurveCollection(g); }
15
+ /** Handle strongly typed Path (base class method calls handleCurveCollection) */
16
+ handlePath(g) {
17
+ return this.handleCurveCollection(g);
18
+ }
19
+ /** Handle strongly typed Loop (base class method calls handleCurveCollection) */
20
+ handleLoop(g) {
21
+ return this.handleCurveCollection(g);
22
+ }
23
+ /** Handle strongly typed ParityRegion (base class method calls handleCurveCollection) */
24
+ handleParityRegion(g) {
25
+ return this.handleCurveCollection(g);
26
+ }
27
+ /** Handle strongly typed UnionRegion (base class method calls handleCurveCollection) */
28
+ handleUnionRegion(g) {
29
+ return this.handleCurveCollection(g);
30
+ }
31
+ /** Handle strongly typed BagOfCurves (base class method calls handleCurveCollection) */
32
+ handleBagOfCurves(g) {
33
+ return this.handleCurveCollection(g);
34
+ }
24
35
  }
25
36
  /**
26
- * `NullGeometryHandler` is a base class for dispatching various geometry types to
27
- * application specific implementation of some service.
28
- *
37
+ * `NullGeometryHandler` is a base class for dispatching various geometry types to application specific implementation
38
+ * of some service.
29
39
  * To use:
30
40
  * * Derive a class from `NullGeometryHandler`
31
- * * Reimplement any or all of the specific `handleXXXX` methods
41
+ * * Re-implement any or all of the specific `handleXXXX` methods
32
42
  * * Create a handler instance `myHandler`
33
- * * To send a `GeometryQuery` object `candidateGeometry` through the (fast) dispatch, invoke `candidateGeometry.dispatchToHandler (myHandler)
43
+ * * To send a `GeometryQuery` object `candidateGeometry` through the (fast) dispatch, invoke
44
+ * `candidateGeometry.dispatchToHandler (myHandler).
34
45
  * * The appropriate method or methods will get called with a strongly typed `_g ` value.
35
46
  * @public
36
47
  */
37
48
  export class NullGeometryHandler extends GeometryHandler {
38
- /** no-action implementation */
39
- handleLineSegment3d(_g) { return undefined; }
40
- /** no-action implementation */
41
- handleLineString3d(_g) { return undefined; }
42
- /** no-action implementation */
43
- handleArc3d(_g) { return undefined; }
44
- /** no-action implementation */
45
- handleCurveCollection(_g) { return undefined; }
46
- /** no-action implementation */
47
- handleBSplineCurve3d(_g) { return undefined; }
48
- /** no-action implementation */
49
- handleInterpolationCurve3d(_g) { return undefined; }
50
- /** no-action implementation */
51
- handleAkimaCurve3d(_g) { return undefined; }
52
- /** no-action implementation */
53
- handleBSplineCurve3dH(_g) { return undefined; }
54
- /** no-action implementation */
55
- handleBSplineSurface3d(_g) { return undefined; }
56
- /** no-action implementation */
57
- handleCoordinateXYZ(_g) { return undefined; }
58
- /** no-action implementation */
59
- handleBSplineSurface3dH(_g) { return undefined; }
60
- /** no-action implementation */
61
- handleIndexedPolyface(_g) { return undefined; }
62
- /** no-action implementation
49
+ /** No-action implementation */
50
+ handleLineSegment3d(_g) {
51
+ return undefined;
52
+ }
53
+ /** No-action implementation */
54
+ handleLineString3d(_g) {
55
+ return undefined;
56
+ }
57
+ /** No-action implementation */
58
+ handleArc3d(_g) {
59
+ return undefined;
60
+ }
61
+ /** No-action implementation */
62
+ handleCurveCollection(_g) {
63
+ return undefined;
64
+ }
65
+ /** No-action implementation */
66
+ handleBSplineCurve3d(_g) {
67
+ return undefined;
68
+ }
69
+ /** No-action implementation */
70
+ handleInterpolationCurve3d(_g) {
71
+ return undefined;
72
+ }
73
+ /** No-action implementation */
74
+ handleAkimaCurve3d(_g) {
75
+ return undefined;
76
+ }
77
+ /** No-action implementation */
78
+ handleBSplineCurve3dH(_g) {
79
+ return undefined;
80
+ }
81
+ /** No-action implementation */
82
+ handleBSplineSurface3d(_g) {
83
+ return undefined;
84
+ }
85
+ /** No-action implementation */
86
+ handleCoordinateXYZ(_g) {
87
+ return undefined;
88
+ }
89
+ /** No-action implementation */
90
+ handleBSplineSurface3dH(_g) {
91
+ return undefined;
92
+ }
93
+ /** No-action implementation */
94
+ handleIndexedPolyface(_g) {
95
+ return undefined;
96
+ }
97
+ /** No-action implementation
63
98
  * @alpha
64
99
  */
65
- handleTransitionSpiral(_g) { return undefined; }
66
- /** no-action implementation */
67
- handlePath(_g) { return undefined; }
68
- /** no-action implementation */
69
- handleLoop(_g) { return undefined; }
70
- /** no-action implementation */
71
- handleParityRegion(_g) { return undefined; }
72
- /** no-action implementation */
73
- handleUnionRegion(_g) { return undefined; }
74
- /** no-action implementation */
75
- handleBagOfCurves(_g) { return undefined; }
76
- /** no-action implementation */
77
- handleSphere(_g) { return undefined; }
78
- /** no-action implementation */
79
- handleCone(_g) { return undefined; }
80
- /** no-action implementation */
81
- handleBox(_g) { return undefined; }
82
- /** no-action implementation */
83
- handleTorusPipe(_g) { return undefined; }
84
- /** no-action implementation */
85
- handleLinearSweep(_g) { return undefined; }
86
- /** no-action implementation */
87
- handleRotationalSweep(_g) { return undefined; }
88
- /** no-action implementation */
89
- handleRuledSweep(_g) { return undefined; }
90
- /** no-action implementation */
91
- handlePointString3d(_g) { return undefined; }
92
- /** no-action implementation */
93
- handleBezierCurve3d(_g) { return undefined; }
94
- /** no-action implementation */
95
- handleBezierCurve3dH(_g) { return undefined; }
100
+ handleTransitionSpiral(_g) {
101
+ return undefined;
102
+ }
103
+ /** No-action implementation */
104
+ handlePath(_g) {
105
+ return undefined;
106
+ }
107
+ /** No-action implementation */
108
+ handleLoop(_g) {
109
+ return undefined;
110
+ }
111
+ /** No-action implementation */
112
+ handleParityRegion(_g) {
113
+ return undefined;
114
+ }
115
+ /** No-action implementation */
116
+ handleUnionRegion(_g) {
117
+ return undefined;
118
+ }
119
+ /** No-action implementation */
120
+ handleBagOfCurves(_g) {
121
+ return undefined;
122
+ }
123
+ /** No-action implementation */
124
+ handleSphere(_g) {
125
+ return undefined;
126
+ }
127
+ /** No-action implementation */
128
+ handleCone(_g) {
129
+ return undefined;
130
+ }
131
+ /** No-action implementation */
132
+ handleBox(_g) {
133
+ return undefined;
134
+ }
135
+ /** No-action implementation */
136
+ handleTorusPipe(_g) {
137
+ return undefined;
138
+ }
139
+ /** No-action implementation */
140
+ handleLinearSweep(_g) {
141
+ return undefined;
142
+ }
143
+ /** No-action implementation */
144
+ handleRotationalSweep(_g) {
145
+ return undefined;
146
+ }
147
+ /** No-action implementation */
148
+ handleRuledSweep(_g) {
149
+ return undefined;
150
+ }
151
+ /** No-action implementation */
152
+ handlePointString3d(_g) {
153
+ return undefined;
154
+ }
155
+ /** No-action implementation */
156
+ handleBezierCurve3d(_g) {
157
+ return undefined;
158
+ }
159
+ /** No-action implementation */
160
+ handleBezierCurve3dH(_g) {
161
+ return undefined;
162
+ }
96
163
  }
97
164
  /**
98
165
  * Implement GeometryHandler methods, with all curve collection methods recursing to children.
99
166
  * @public
100
167
  */
101
168
  export class RecurseToCurvesGeometryHandler extends GeometryHandler {
102
- /** no-action implementation */
103
- handleLineSegment3d(_g) { return undefined; }
104
- /** no-action implementation */
105
- handleLineString3d(_g) { return undefined; }
106
- /** no-action implementation */
107
- handleArc3d(_g) { return undefined; }
108
- /** no-action implementation */
109
- handleBSplineCurve3d(_g) { return undefined; }
110
- /** no-action implementation */
111
- handleInterpolationCurve3d(_g) { return undefined; }
112
- /** no-action implementation */
113
- handleAkimaCurve3d(_g) { return undefined; }
114
- /** no-action implementation */
115
- handleBSplineCurve3dH(_g) { return undefined; }
116
- /** no-action implementation */
117
- handleBSplineSurface3d(_g) { return undefined; }
118
- /** no-action implementation */
119
- handleCoordinateXYZ(_g) { return undefined; }
120
- /** no-action implementation */
121
- handleBSplineSurface3dH(_g) { return undefined; }
122
- /** no-action implementation */
123
- handleIndexedPolyface(_g) { return undefined; }
124
- /** no-action implementation
169
+ /** No-action implementation */
170
+ handleLineSegment3d(_g) {
171
+ return undefined;
172
+ }
173
+ /** No-action implementation */
174
+ handleLineString3d(_g) {
175
+ return undefined;
176
+ }
177
+ /** No-action implementation */
178
+ handleArc3d(_g) {
179
+ return undefined;
180
+ }
181
+ /** No-action implementation */
182
+ handleBSplineCurve3d(_g) {
183
+ return undefined;
184
+ }
185
+ /** No-action implementation */
186
+ handleInterpolationCurve3d(_g) {
187
+ return undefined;
188
+ }
189
+ /** No-action implementation */
190
+ handleAkimaCurve3d(_g) {
191
+ return undefined;
192
+ }
193
+ /** No-action implementation */
194
+ handleBSplineCurve3dH(_g) {
195
+ return undefined;
196
+ }
197
+ /** No-action implementation */
198
+ handleBSplineSurface3d(_g) {
199
+ return undefined;
200
+ }
201
+ /** No-action implementation */
202
+ handleCoordinateXYZ(_g) {
203
+ return undefined;
204
+ }
205
+ /** No-action implementation */
206
+ handleBSplineSurface3dH(_g) {
207
+ return undefined;
208
+ }
209
+ /** No-action implementation */
210
+ handleIndexedPolyface(_g) {
211
+ return undefined;
212
+ }
213
+ /** No-action implementation
125
214
  * @alpha
126
215
  */
127
- handleTransitionSpiral(_g) { return undefined; }
216
+ handleTransitionSpiral(_g) {
217
+ return undefined;
218
+ }
128
219
  /** Invoke `child.dispatchToGeometryHandler(this)` for each child in the array returned by the query `g.children` */
129
220
  handleChildren(g) {
130
221
  const children = g.children;
@@ -134,36 +225,68 @@ export class RecurseToCurvesGeometryHandler extends GeometryHandler {
134
225
  }
135
226
  }
136
227
  /** Recurse to children */
137
- handleCurveCollection(g) { return this.handleChildren(g); }
228
+ handleCurveCollection(g) {
229
+ return this.handleChildren(g);
230
+ }
138
231
  /** Recurse to children */
139
- handlePath(g) { return this.handleChildren(g); }
232
+ handlePath(g) {
233
+ return this.handleChildren(g);
234
+ }
140
235
  /** Recurse to children */
141
- handleLoop(g) { return this.handleChildren(g); }
236
+ handleLoop(g) {
237
+ return this.handleChildren(g);
238
+ }
142
239
  /** Recurse to children */
143
- handleParityRegion(g) { return this.handleChildren(g); }
240
+ handleParityRegion(g) {
241
+ return this.handleChildren(g);
242
+ }
144
243
  /** Recurse to children */
145
- handleUnionRegion(g) { return this.handleChildren(g); }
244
+ handleUnionRegion(g) {
245
+ return this.handleChildren(g);
246
+ }
146
247
  /** Recurse to children */
147
- handleBagOfCurves(g) { return this.handleChildren(g); }
148
- /** no-action implementation */
149
- handleSphere(_g) { return undefined; }
150
- /** no-action implementation */
151
- handleCone(_g) { return undefined; }
152
- /** no-action implementation */
153
- handleBox(_g) { return undefined; }
154
- /** no-action implementation */
155
- handleTorusPipe(_g) { return undefined; }
156
- /** no-action implementation */
157
- handleLinearSweep(_g) { return undefined; }
158
- /** no-action implementation */
159
- handleRotationalSweep(_g) { return undefined; }
160
- /** no-action implementation */
161
- handleRuledSweep(_g) { return undefined; }
162
- /** no-action implementation */
163
- handlePointString3d(_g) { return undefined; }
164
- /** no-action implementation */
165
- handleBezierCurve3d(_g) { return undefined; }
166
- /** no-action implementation */
167
- handleBezierCurve3dH(_g) { return undefined; }
248
+ handleBagOfCurves(g) {
249
+ return this.handleChildren(g);
250
+ }
251
+ /** No-action implementation */
252
+ handleSphere(_g) {
253
+ return undefined;
254
+ }
255
+ /** No-action implementation */
256
+ handleCone(_g) {
257
+ return undefined;
258
+ }
259
+ /** No-action implementation */
260
+ handleBox(_g) {
261
+ return undefined;
262
+ }
263
+ /** No-action implementation */
264
+ handleTorusPipe(_g) {
265
+ return undefined;
266
+ }
267
+ /** No-action implementation */
268
+ handleLinearSweep(_g) {
269
+ return undefined;
270
+ }
271
+ /** No-action implementation */
272
+ handleRotationalSweep(_g) {
273
+ return undefined;
274
+ }
275
+ /** No-action implementation */
276
+ handleRuledSweep(_g) {
277
+ return undefined;
278
+ }
279
+ /** No-action implementation */
280
+ handlePointString3d(_g) {
281
+ return undefined;
282
+ }
283
+ /** No-action implementation */
284
+ handleBezierCurve3d(_g) {
285
+ return undefined;
286
+ }
287
+ /** No-action implementation */
288
+ handleBezierCurve3dH(_g) {
289
+ return undefined;
290
+ }
168
291
  }
169
292
  //# sourceMappingURL=GeometryHandler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GeometryHandler.js","sourceRoot":"","sources":["../../../src/geometry3d/GeometryHandler.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAuC/F;;;;;GAKG;AACH,MAAM,OAAgB,eAAe;IAOnC,kDAAkD;IAC3C,qBAAqB,CAAC,EAAmB,IAAS,CAAC;IAsB1D,iFAAiF;IAC1E,UAAU,CAAC,CAAO,IAAS,OAAO,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACzE,kFAAkF;IAC3E,UAAU,CAAC,CAAO,IAAS,OAAO,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACzE,0FAA0F;IACnF,kBAAkB,CAAC,CAAe,IAAS,OAAO,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACzF,yFAAyF;IAClF,iBAAiB,CAAC,CAAc,IAAS,OAAO,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACvF,yFAAyF;IAClF,iBAAiB,CAAC,CAAc,IAAS,OAAO,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAsBxF;AACD;;;;;;;;;;;GAWG;AACH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cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3E,0BAA0B;IACV,kBAAkB,CAAC,CAAe,IAAS,OAAO,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3F,0BAA0B;IACV,iBAAiB,CAAC,CAAc,IAAS,OAAO,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACzF,0BAA0B;IACV,iBAAiB,CAAC,CAAc,IAAS,OAAO,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEzF,+BAA+B;IACxB,YAAY,CAAC,EAAU,IAAS,OAAO,SAAS,CAAC,CAAC,CAAC;IAC1D,+BAA+B;IACxB,UAAU,CAAC,EAAQ,IAAS,OAAO,SAAS,CAAC,CAAC,CAAC;IACtD,+BAA+B;IACxB,SAAS,CAAC,EAAO,IAAS,OAAO,SAAS,CAAC,CAAC,CAAC;IACpD,+BAA+B;IACxB,eAAe,CAAC,EAAa,IAAS,OAAO,SAAS,CAAC,CAAC,CAAC;IAChE,+BAA+B;IACxB,iBAAiB,CAAC,EAAe,IAAS,OAAO,SAAS,CAAC,CAAC,CAAC;IACpE,+BAA+B;IACxB,qBAAqB,CAAC,EAAmB,IAAS,OAAO,SAAS,CAAC,CAAC,CAAC;IAC5E,+BAA+B;IACxB,gBAAgB,CAAC,EAAc,IAAS,OAAO,SAAS,CAAC,CAAC,CAAC;IAClE,+BAA+B;IACxB,mBAAmB,CAAC,EAAiB,IAAS,OAAO,SAAS,CAAC,CAAC,CAAC;IACxE,+BAA+B;IACxB,mBAAmB,CAAC,EAAiB,IAAS,OAAO,SAAS,CAAC,CAAC,CAAC;IACxE,+BAA+B;IACxB,oBAAoB,CAAC,EAAkB,IAAS,OAAO,SAAS,CAAC,CAAC,CAAC;CAC3E","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 ArraysAndInterfaces\r\n */\r\n\r\nimport { AkimaCurve3d } from \"../bspline/AkimaCurve3d\";\r\nimport { BezierCurve3d } from \"../bspline/BezierCurve3d\";\r\nimport { BezierCurve3dH } from \"../bspline/BezierCurve3dH\";\r\nimport { BezierCurveBase } from \"../bspline/BezierCurveBase\";\r\nimport { BSplineCurve3d } from \"../bspline/BSplineCurve\";\r\nimport { BSplineCurve3dH } from \"../bspline/BSplineCurve3dH\";\r\nimport { BSplineSurface3d, BSplineSurface3dH } from \"../bspline/BSplineSurface\";\r\nimport { InterpolationCurve3d } from \"../bspline/InterpolationCurve3d\";\r\nimport { Arc3d } from \"../curve/Arc3d\";\r\nimport { CoordinateXYZ } from \"../curve/CoordinateXYZ\";\r\nimport { BagOfCurves, CurveCollection } from \"../curve/CurveCollection\";\r\nimport { CurvePrimitive } from \"../curve/CurvePrimitive\";\r\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\r\nimport { LineSegment3d } from \"../curve/LineSegment3d\";\r\nimport { LineString3d } from \"../curve/LineString3d\";\r\nimport { Loop } from \"../curve/Loop\";\r\nimport { ParityRegion } from \"../curve/ParityRegion\";\r\nimport { Path } from \"../curve/Path\";\r\nimport { PointString3d } from \"../curve/PointString3d\";\r\nimport { TransitionSpiral3d } from \"../curve/spiral/TransitionSpiral3d\";\r\nimport { UnionRegion } from \"../curve/UnionRegion\";\r\nimport { IndexedPolyface } from \"../polyface/Polyface\";\r\nimport { Box } from \"../solid/Box\";\r\nimport { Cone } from \"../solid/Cone\";\r\nimport { LinearSweep } from \"../solid/LinearSweep\";\r\nimport { RotationalSweep } from \"../solid/RotationalSweep\";\r\nimport { RuledSweep } from \"../solid/RuledSweep\";\r\nimport { Sphere } from \"../solid/Sphere\";\r\nimport { TorusPipe } from \"../solid/TorusPipe\";\r\nimport { Plane3dByOriginAndVectors } from \"./Plane3dByOriginAndVectors\";\r\nimport { Vector2d } from \"./Point2dVector2d\";\r\nimport { Point3d, Vector3d } from \"./Point3dVector3d\";\r\n\r\n/**\r\n * * `GeometryHandler` defines the base abstract methods for double-dispatch geometry computation.\r\n * * User code that wants to handle one or all of the commonly known geometry types implements a handler class.\r\n * * User code that does not handle all types is most likely to start with `NullGeometryHandler`, which will provide no-action implementations for all types.\r\n * @public\r\n */\r\nexport abstract class GeometryHandler {\r\n /** handle strongly typed [[LineSegment3d]] */\r\n public abstract handleLineSegment3d(g: LineSegment3d): any;\r\n /** handle strongly typed [[LineString3d]] */\r\n public abstract handleLineString3d(g: LineString3d): any;\r\n /** handle strongly typed [[Arc3d]] */\r\n public abstract handleArc3d(g: Arc3d): any;\r\n /** handle strongly typed [[CurveCollection]] */\r\n public handleCurveCollection(_g: CurveCollection): any { }\r\n /** handle strongly typed [[BSplineCurve3d]] */\r\n public abstract handleBSplineCurve3d(g: BSplineCurve3d): any;\r\n /** handle strongly typed [[InterpolationCurve3d]] */\r\n public abstract handleInterpolationCurve3d(g: InterpolationCurve3d): any;\r\n /** handle strongly typed [[AkimaCurve3d]] */\r\n public abstract handleAkimaCurve3d(g: AkimaCurve3d): any;\r\n /** handle strongly typed [[BSplineCurve3dH]] */\r\n public abstract handleBSplineCurve3dH(g: BSplineCurve3dH): any;\r\n /** handle strongly typed [[BSplineSurface3d]] */\r\n public abstract handleBSplineSurface3d(g: BSplineSurface3d): any;\r\n /** handle strongly typed [[CoordinateXYZ]] */\r\n public abstract handleCoordinateXYZ(g: CoordinateXYZ): any;\r\n /** handle strongly typed [[BSplineSurface3dH]] */\r\n public abstract handleBSplineSurface3dH(g: BSplineSurface3dH): any;\r\n /** handle strongly typed [[IndexedPolyface]] */\r\n public abstract handleIndexedPolyface(g: IndexedPolyface): any;\r\n /** handle strongly typed [[TransitionSpiral3d]]\r\n * @alpha\r\n */\r\n public abstract handleTransitionSpiral(g: TransitionSpiral3d): any;\r\n\r\n /** handle strongly typed Path (base class method calls handleCurveCollection) */\r\n public handlePath(g: Path): any { return this.handleCurveCollection(g); }\r\n /** handle strongly typed Loop (base class method calls handleCurveCollection) */\r\n public handleLoop(g: Loop): any { return this.handleCurveCollection(g); }\r\n /** handle strongly typed ParityRegion (base class method calls handleCurveCollection) */\r\n public handleParityRegion(g: ParityRegion): any { return this.handleCurveCollection(g); }\r\n /** handle strongly typed UnionRegion (base class method calls handleCurveCollection) */\r\n public handleUnionRegion(g: UnionRegion): any { return this.handleCurveCollection(g); }\r\n /** handle strongly typed BagOfCurves (base class method calls handleCurveCollection) */\r\n public handleBagOfCurves(g: BagOfCurves): any { return this.handleCurveCollection(g); }\r\n /** handle strongly typed BagOfCurves (base class method calls handleCurveCollection) */\r\n /** handle strongly typed Sphere */\r\n public abstract handleSphere(g: Sphere): any;\r\n /** handle strongly typed Cone */\r\n public abstract handleCone(g: Cone): any;\r\n /** handle strongly typed Box */\r\n public abstract handleBox(g: Box): any;\r\n /** handle strongly typed TorusPipe */\r\n public abstract handleTorusPipe(g: TorusPipe): any;\r\n /** handle strongly typed LinearSweep */\r\n public abstract handleLinearSweep(g: LinearSweep): any;\r\n /** handle strongly typed RotationalSweep */\r\n public abstract handleRotationalSweep(g: RotationalSweep): any;\r\n /** handle strongly typed RuledSweep */\r\n public abstract handleRuledSweep(g: RuledSweep): any;\r\n /** handle strongly typed PointString3d */\r\n public abstract handlePointString3d(g: PointString3d): any;\r\n /** handle strongly typed BezierCurve3d */\r\n public abstract handleBezierCurve3d(g: BezierCurve3d): any;\r\n /** handle strongly typed BezierCurve3dH */\r\n public abstract handleBezierCurve3dH(g: BezierCurve3dH): any;\r\n}\r\n/**\r\n * `NullGeometryHandler` is a base class for dispatching various geometry types to\r\n * application specific implementation of some service.\r\n *\r\n * To use:\r\n * * Derive a class from `NullGeometryHandler`\r\n * * Reimplement any or all of the specific `handleXXXX` methods\r\n * * Create a handler instance `myHandler`\r\n * * To send a `GeometryQuery` object `candidateGeometry` through the (fast) dispatch, invoke `candidateGeometry.dispatchToHandler (myHandler)\r\n * * The appropriate method or methods will get called with a strongly typed `_g ` value.\r\n * @public\r\n */\r\nexport class NullGeometryHandler extends GeometryHandler {\r\n /** no-action implementation */\r\n public handleLineSegment3d(_g: LineSegment3d): any { return undefined; }\r\n /** no-action implementation */\r\n public handleLineString3d(_g: LineString3d): any { return undefined; }\r\n /** no-action implementation */\r\n public handleArc3d(_g: Arc3d): any { return undefined; }\r\n /** no-action implementation */\r\n public override handleCurveCollection(_g: CurveCollection): any { return undefined; }\r\n /** no-action implementation */\r\n public handleBSplineCurve3d(_g: BSplineCurve3d): any { return undefined; }\r\n /** no-action implementation */\r\n public handleInterpolationCurve3d(_g: InterpolationCurve3d): any { return undefined; }\r\n /** no-action implementation */\r\n public handleAkimaCurve3d(_g: AkimaCurve3d): any { return undefined; }\r\n /** no-action implementation */\r\n public handleBSplineCurve3dH(_g: BSplineCurve3dH): any { return undefined; }\r\n /** no-action implementation */\r\n public handleBSplineSurface3d(_g: BSplineSurface3d): any { return undefined; }\r\n\r\n /** no-action implementation */\r\n public handleCoordinateXYZ(_g: CoordinateXYZ): any { return undefined; }\r\n /** no-action implementation */\r\n public handleBSplineSurface3dH(_g: BSplineSurface3dH): any { return undefined; }\r\n /** no-action implementation */\r\n public handleIndexedPolyface(_g: IndexedPolyface): any { return undefined; }\r\n /** no-action implementation\r\n * @alpha\r\n */\r\n public handleTransitionSpiral(_g: TransitionSpiral3d): any { return undefined; }\r\n\r\n /** no-action implementation */\r\n public override handlePath(_g: Path): any { return undefined; }\r\n /** no-action implementation */\r\n public override handleLoop(_g: Loop): any { return undefined; }\r\n /** no-action implementation */\r\n public override handleParityRegion(_g: ParityRegion): any { return undefined; }\r\n /** no-action implementation */\r\n public override handleUnionRegion(_g: UnionRegion): any { return undefined; }\r\n /** no-action implementation */\r\n public override handleBagOfCurves(_g: BagOfCurves): any { return undefined; }\r\n\r\n /** no-action implementation */\r\n public handleSphere(_g: Sphere): any { return undefined; }\r\n /** no-action implementation */\r\n public handleCone(_g: Cone): any { return undefined; }\r\n /** no-action implementation */\r\n public handleBox(_g: Box): any { return undefined; }\r\n /** no-action implementation */\r\n public handleTorusPipe(_g: TorusPipe): any { return undefined; }\r\n /** no-action implementation */\r\n public handleLinearSweep(_g: LinearSweep): any { return undefined; }\r\n /** no-action implementation */\r\n public handleRotationalSweep(_g: RotationalSweep): any { return undefined; }\r\n /** no-action implementation */\r\n public handleRuledSweep(_g: RuledSweep): any { return undefined; }\r\n /** no-action implementation */\r\n public handlePointString3d(_g: PointString3d): any { return undefined; }\r\n /** no-action implementation */\r\n public handleBezierCurve3d(_g: BezierCurve3d): any { return undefined; }\r\n /** no-action implementation */\r\n public handleBezierCurve3dH(_g: BezierCurve3dH): any { return undefined; }\r\n}\r\n/**\r\n * Implement GeometryHandler methods, with all curve collection methods recursing to children.\r\n * @public\r\n */\r\nexport class RecurseToCurvesGeometryHandler extends GeometryHandler {\r\n /** no-action implementation */\r\n public handleLineSegment3d(_g: LineSegment3d): any { return undefined; }\r\n /** no-action implementation */\r\n public handleLineString3d(_g: LineString3d): any { return undefined; }\r\n /** no-action implementation */\r\n public handleArc3d(_g: Arc3d): any { return undefined; }\r\n /** no-action implementation */\r\n public handleBSplineCurve3d(_g: BSplineCurve3d): any { return undefined; }\r\n /** no-action implementation */\r\n public handleInterpolationCurve3d(_g: InterpolationCurve3d): any { return undefined; }\r\n /** no-action implementation */\r\n public handleAkimaCurve3d(_g: AkimaCurve3d): any { return undefined; }\r\n /** no-action implementation */\r\n public handleBSplineCurve3dH(_g: BSplineCurve3dH): any { return undefined; }\r\n /** no-action implementation */\r\n public handleBSplineSurface3d(_g: BSplineSurface3d): any { return undefined; }\r\n\r\n /** no-action implementation */\r\n public handleCoordinateXYZ(_g: CoordinateXYZ): any { return undefined; }\r\n /** no-action implementation */\r\n public handleBSplineSurface3dH(_g: BSplineSurface3dH): any { return undefined; }\r\n /** no-action implementation */\r\n public handleIndexedPolyface(_g: IndexedPolyface): any { return undefined; }\r\n /** no-action implementation\r\n * @alpha\r\n */\r\n public handleTransitionSpiral(_g: TransitionSpiral3d): any { return undefined; }\r\n /** Invoke `child.dispatchToGeometryHandler(this)` for each child in the array returned by the query `g.children` */\r\n public handleChildren(g: GeometryQuery): any {\r\n const children = g.children;\r\n if (children)\r\n for (const child of children) {\r\n child.dispatchToGeometryHandler(this);\r\n }\r\n }\r\n /** Recurse to children */\r\n public override handleCurveCollection(g: CurveCollection): any { return this.handleChildren(g); }\r\n\r\n /** Recurse to children */\r\n public override handlePath(g: Path): any { return this.handleChildren(g); }\r\n /** Recurse to children */\r\n public override handleLoop(g: Loop): any { return this.handleChildren(g); }\r\n /** Recurse to children */\r\n public override handleParityRegion(g: ParityRegion): any { return this.handleChildren(g); }\r\n /** Recurse to children */\r\n public override handleUnionRegion(g: UnionRegion): any { return this.handleChildren(g); }\r\n /** Recurse to children */\r\n public override handleBagOfCurves(g: BagOfCurves): any { return this.handleChildren(g); }\r\n\r\n /** no-action implementation */\r\n public handleSphere(_g: Sphere): any { return undefined; }\r\n /** no-action implementation */\r\n public handleCone(_g: Cone): any { return undefined; }\r\n /** no-action implementation */\r\n public handleBox(_g: Box): any { return undefined; }\r\n /** no-action implementation */\r\n public handleTorusPipe(_g: TorusPipe): any { return undefined; }\r\n /** no-action implementation */\r\n public handleLinearSweep(_g: LinearSweep): any { return undefined; }\r\n /** no-action implementation */\r\n public handleRotationalSweep(_g: RotationalSweep): any { return undefined; }\r\n /** no-action implementation */\r\n public handleRuledSweep(_g: RuledSweep): any { return undefined; }\r\n /** no-action implementation */\r\n public handlePointString3d(_g: PointString3d): any { return undefined; }\r\n /** no-action implementation */\r\n public handleBezierCurve3d(_g: BezierCurve3d): any { return undefined; }\r\n /** no-action implementation */\r\n public handleBezierCurve3dH(_g: BezierCurve3dH): any { return undefined; }\r\n}\r\n\r\n/** IStrokeHandler is an interface with methods to receive data about curves being stroked.\r\n * CurvePrimitives emitStrokes () methods emit calls to a handler object with these methods.\r\n * The various CurvePrimitive types are free to announce either single points (announcePoint), linear fragments,\r\n * or fractional intervals of the parent curve.\r\n * * handler.startCurvePrimitive (cp) -- announce the curve primitive whose strokes will follow.\r\n * * announcePointTangent (xyz, fraction, tangent) -- announce a single point on the curve.\r\n * * announceIntervalForUniformStepStrokes (cp, numStrokes, fraction0, fraction1) -- announce a fraction\r\n * interval in which the curve can be evaluated (e.g. the handler can call cp->fractionToPointAndDerivative ())\r\n * * announceSegmentInterval (cp, point0, point1, numStrokes, fraction0, fraction1) -- announce\r\n * that the fractional interval fraction0, fraction1 is a straight line which should be broken into\r\n * numStrokes strokes.\r\n * * A LineSegment would make a single call to this.\r\n * * A LineString would make one call to this for each of its segments, with fractions indicating position\r\n * within the linestring.\r\n * * endCurvePrimitive (cp) -- announce the end of the curve primitive.\r\n * @public\r\n */\r\nexport interface IStrokeHandler {\r\n /** announce a parent curve primitive\r\n * * startParentCurvePrimitive() ...endParentCurvePrimitive() are wrapped around startCurvePrimitive and endCurvePrimitive when the interior primitive is a proxy.\r\n */\r\n startParentCurvePrimitive(cp: CurvePrimitive): void;\r\n /** Announce the curve primitive that will be described in subsequent calls. */\r\n startCurvePrimitive(cp: CurvePrimitive): void;\r\n /**\r\n * announce a single point with its fraction and tangent.\r\n * * (IMPORTANT) the same Point3d and Vector3d will be reset and passed on multiple calls.\r\n * * (THEREFORE) if the implementation is saving coordinates, it must copy the xyz data out into its own data structure rather than save the references.\r\n */\r\n announcePointTangent(xyz: Point3d, fraction: number, tangent: Vector3d): void;\r\n\r\n /** Announce that curve primitive cp should be evaluated in the specified fraction interval.\r\n * * Note that this method is permitted (expected) to provide pre-stroked data if available.\r\n * * In th pre-stroked case, the cp passed to the handler will be the stroked image, not the original.\r\n * * Callers that want summary data should implement (and return true from) needPrimaryDataForStrokes\r\n */\r\n announceIntervalForUniformStepStrokes(\r\n cp: CurvePrimitive,\r\n numStrokes: number,\r\n fraction0: number,\r\n fraction1: number): void;\r\n /**\r\n * OPTIONAL method for a handler to indicate that it wants primary geometry (e.g. spirals) rather than strokes.\r\n * @returns true if primary geometry should be passed (rather than stroked or otherwise simplified)\r\n */\r\n needPrimaryGeometryForStrokes?(): boolean;\r\n /** Announce numPoints interpolated between point0 and point1, with associated fractions */\r\n announceSegmentInterval(\r\n cp: CurvePrimitive,\r\n point0: Point3d,\r\n point1: Point3d,\r\n numStrokes: number,\r\n fraction0: number,\r\n fraction1: number): void;\r\n /** Announce that all data about `cp` has been announced. */\r\n endCurvePrimitive(cp: CurvePrimitive): void;\r\n /** Announce that all data about the parent primitive has been announced. */\r\n endParentCurvePrimitive(cp: CurvePrimitive): void;\r\n /**\r\n * Announce a bezier curve fragment.\r\n * * this is usually a section of BsplineCurve\r\n * * If this function is missing, the same interval will be passed to announceIntervalForUniformSteps.\r\n * @param bezier bezier fragment\r\n * @param numStrokes suggested number of strokes (uniform in bezier interval 0..1)\r\n * @param parent parent curve\r\n * @param spanIndex spanIndex within parent\r\n * @param fraction0 start fraction on parent curve\r\n * @param fraction1 end fraction on parent curve\r\n */\r\n announceBezierCurve?(\r\n bezier: BezierCurveBase,\r\n numStrokes: number,\r\n parent: CurvePrimitive,\r\n spandex: number,\r\n fraction0: number,\r\n fraction1: number): void;\r\n}\r\n\r\n/**\r\n * Interface with methods for mapping (u,v) fractional coordinates to surface xyz and derivatives.\r\n * @public\r\n */\r\nexport interface UVSurface {\r\n /**\r\n * Convert fractional u and v coordinates to surface point.\r\n * @param uFraction fractional coordinate in u direction\r\n * @param vFraction fractional coordinate in v direction\r\n * @param result optional pre-allocated point\r\n */\r\n uvFractionToPoint(uFraction: number, vFraction: number, result?: Point3d): Point3d;\r\n /**\r\n * Convert fractional u and v coordinates to surface point and in-surface tangent directions.\r\n * * The vectors are expected to be non-zero tangents which can be crossed to get a normal.\r\n * * Hence they are not necessarily (a) partial derivatives or (b) Frenet vectors.\r\n * @param uFraction fractional coordinate in u direction\r\n * @param vFraction fractional coordinate in v direction\r\n * @param result optional pre-allocated carrier for point and vectors\r\n */\r\n uvFractionToPointAndTangents(uFraction: number, vFraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors;\r\n}\r\n/**\r\n * Interface for queries of distance-along in u and v directions\r\n * @public\r\n */\r\nexport interface UVSurfaceIsoParametricDistance {\r\n /**\r\n * * Return a vector whose x and y parts are \"size\" of the surface in the u and v directions.\r\n * * Sizes are use for applying scaling to mesh parameters\r\n * * These sizes are (reasonable approximations of) the max curve length along u and v isoparameter lines.\r\n * * e.g. for a sphere, these are:\r\n * * u direction = distance around the equator\r\n * * v direction = distance from south pole to north pole.\r\n */\r\n maxIsoParametricDistance(): Vector2d;\r\n}\r\n"]}
1
+ {"version":3,"file":"GeometryHandler.js","sourceRoot":"","sources":["../../../src/geometry3d/GeometryHandler.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAuC/F;;;;;;GAMG;AACH,MAAM,OAAgB,eAAe;IAOnC,kDAAkD;IAC3C,qBAAqB,CAAC,EAAmB,IAAS,CAAC;IAsB1D,iFAAiF;IAC1E,UAAU,CAAC,CAAO;QACvB,OAAO,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC;IACD,kFAAkF;IAC3E,UAAU,CAAC,CAAO;QACvB,OAAO,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC;IACD,0FAA0F;IACnF,kBAAkB,CAAC,CAAe;QACvC,OAAO,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC;IACD,yFAAyF;IAClF,iBAAiB,CAAC,CAAc;QACrC,OAAO,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC;IACD,yFAAyF;IAClF,iBAAiB,CAAC,CAAc;QACrC,OAAO,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC;CAqBF;AACD;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,mBAAoB,SAAQ,eAAe;IACtD,+BAA+B;IACxB,mBAAmB,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C,CAAC,CAAC,CAAC;IAChC,CAAC;IACD,0BAA0B;IACV,iBAAiB,CAAC,CAAc;QAC9C,OAAO,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IAChC,CAAC;IACD,0BAA0B;IACV,iBAAiB,CAAC,CAAc;QAC9C,OAAO,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IAChC,CAAC;IACD,+BAA+B;IACxB,YAAY,CAAC,EAAU;QAC5B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,+BAA+B;IACxB,UAAU,CAAC,EAAQ;QACxB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,+BAA+B;IACxB,SAAS,CAAC,EAAO;QACtB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,+BAA+B;IACxB,eAAe,CAAC,EAAa;QAClC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,+BAA+B;IACxB,iBAAiB,CAAC,EAAe;QACtC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,+BAA+B;IACxB,qBAAqB,CAAC,EAAmB;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,+BAA+B;IACxB,gBAAgB,CAAC,EAAc;QACpC,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,+BAA+B;IACxB,mBAAmB,CAAC,EAAiB;QAC1C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,+BAA+B;IACxB,mBAAmB,CAAC,EAAiB;QAC1C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,+BAA+B;IACxB,oBAAoB,CAAC,EAAkB;QAC5C,OAAO,SAAS,CAAC;IACnB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n\n/** @packageDocumentation\n * @module ArraysAndInterfaces\n */\n\nimport { AkimaCurve3d } from \"../bspline/AkimaCurve3d\";\nimport { BezierCurve3d } from \"../bspline/BezierCurve3d\";\nimport { BezierCurve3dH } from \"../bspline/BezierCurve3dH\";\nimport { BezierCurveBase } from \"../bspline/BezierCurveBase\";\nimport { BSplineCurve3d } from \"../bspline/BSplineCurve\";\nimport { BSplineCurve3dH } from \"../bspline/BSplineCurve3dH\";\nimport { BSplineSurface3d, BSplineSurface3dH } from \"../bspline/BSplineSurface\";\nimport { InterpolationCurve3d } from \"../bspline/InterpolationCurve3d\";\nimport { Arc3d } from \"../curve/Arc3d\";\nimport { CoordinateXYZ } from \"../curve/CoordinateXYZ\";\nimport { BagOfCurves, CurveCollection } from \"../curve/CurveCollection\";\nimport { CurvePrimitive } from \"../curve/CurvePrimitive\";\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\nimport { LineSegment3d } from \"../curve/LineSegment3d\";\nimport { LineString3d } from \"../curve/LineString3d\";\nimport { Loop } from \"../curve/Loop\";\nimport { ParityRegion } from \"../curve/ParityRegion\";\nimport { Path } from \"../curve/Path\";\nimport { PointString3d } from \"../curve/PointString3d\";\nimport { TransitionSpiral3d } from \"../curve/spiral/TransitionSpiral3d\";\nimport { UnionRegion } from \"../curve/UnionRegion\";\nimport { IndexedPolyface } from \"../polyface/Polyface\";\nimport { Box } from \"../solid/Box\";\nimport { Cone } from \"../solid/Cone\";\nimport { LinearSweep } from \"../solid/LinearSweep\";\nimport { RotationalSweep } from \"../solid/RotationalSweep\";\nimport { RuledSweep } from \"../solid/RuledSweep\";\nimport { Sphere } from \"../solid/Sphere\";\nimport { TorusPipe } from \"../solid/TorusPipe\";\nimport { Plane3dByOriginAndVectors } from \"./Plane3dByOriginAndVectors\";\nimport { Vector2d } from \"./Point2dVector2d\";\nimport { Point3d, Vector3d } from \"./Point3dVector3d\";\n\n/**\n * `GeometryHandler` defines the base abstract methods for double-dispatch geometry computation.\n * * User code that wants to handle one or all of the commonly known geometry types implements a handler class.\n * * User code that does not handle all types is most likely to start with `NullGeometryHandler`, which will provide\n * No-action implementations for all types.\n * @public\n */\nexport abstract class GeometryHandler {\n /** Handle strongly typed [[LineSegment3d]] */\n public abstract handleLineSegment3d(g: LineSegment3d): any;\n /** Handle strongly typed [[LineString3d]] */\n public abstract handleLineString3d(g: LineString3d): any;\n /** Handle strongly typed [[Arc3d]] */\n public abstract handleArc3d(g: Arc3d): any;\n /** Handle strongly typed [[CurveCollection]] */\n public handleCurveCollection(_g: CurveCollection): any { }\n /** Handle strongly typed [[BSplineCurve3d]] */\n public abstract handleBSplineCurve3d(g: BSplineCurve3d): any;\n /** Handle strongly typed [[InterpolationCurve3d]] */\n public abstract handleInterpolationCurve3d(g: InterpolationCurve3d): any;\n /** Handle strongly typed [[AkimaCurve3d]] */\n public abstract handleAkimaCurve3d(g: AkimaCurve3d): any;\n /** Handle strongly typed [[BSplineCurve3dH]] */\n public abstract handleBSplineCurve3dH(g: BSplineCurve3dH): any;\n /** Handle strongly typed [[BSplineSurface3d]] */\n public abstract handleBSplineSurface3d(g: BSplineSurface3d): any;\n /** Handle strongly typed [[CoordinateXYZ]] */\n public abstract handleCoordinateXYZ(g: CoordinateXYZ): any;\n /** Handle strongly typed [[BSplineSurface3dH]] */\n public abstract handleBSplineSurface3dH(g: BSplineSurface3dH): any;\n /** Handle strongly typed [[IndexedPolyface]] */\n public abstract handleIndexedPolyface(g: IndexedPolyface): any;\n /**\n * Handle strongly typed [[TransitionSpiral3d]]\n * @alpha\n */\n public abstract handleTransitionSpiral(g: TransitionSpiral3d): any;\n /** Handle strongly typed Path (base class method calls handleCurveCollection) */\n public handlePath(g: Path): any {\n return this.handleCurveCollection(g);\n }\n /** Handle strongly typed Loop (base class method calls handleCurveCollection) */\n public handleLoop(g: Loop): any {\n return this.handleCurveCollection(g);\n }\n /** Handle strongly typed ParityRegion (base class method calls handleCurveCollection) */\n public handleParityRegion(g: ParityRegion): any {\n return this.handleCurveCollection(g);\n }\n /** Handle strongly typed UnionRegion (base class method calls handleCurveCollection) */\n public handleUnionRegion(g: UnionRegion): any {\n return this.handleCurveCollection(g);\n }\n /** Handle strongly typed BagOfCurves (base class method calls handleCurveCollection) */\n public handleBagOfCurves(g: BagOfCurves): any {\n return this.handleCurveCollection(g);\n }\n /** Handle strongly typed Sphere */\n public abstract handleSphere(g: Sphere): any;\n /** Handle strongly typed Cone */\n public abstract handleCone(g: Cone): any;\n /** Handle strongly typed Box */\n public abstract handleBox(g: Box): any;\n /** Handle strongly typed TorusPipe */\n public abstract handleTorusPipe(g: TorusPipe): any;\n /** Handle strongly typed LinearSweep */\n public abstract handleLinearSweep(g: LinearSweep): any;\n /** Handle strongly typed RotationalSweep */\n public abstract handleRotationalSweep(g: RotationalSweep): any;\n /** Handle strongly typed RuledSweep */\n public abstract handleRuledSweep(g: RuledSweep): any;\n /** Handle strongly typed PointString3d */\n public abstract handlePointString3d(g: PointString3d): any;\n /** Handle strongly typed BezierCurve3d */\n public abstract handleBezierCurve3d(g: BezierCurve3d): any;\n /** Handle strongly typed BezierCurve3dH */\n public abstract handleBezierCurve3dH(g: BezierCurve3dH): any;\n}\n/**\n * `NullGeometryHandler` is a base class for dispatching various geometry types to application specific implementation\n * of some service.\n * To use:\n * * Derive a class from `NullGeometryHandler`\n * * Re-implement any or all of the specific `handleXXXX` methods\n * * Create a handler instance `myHandler`\n * * To send a `GeometryQuery` object `candidateGeometry` through the (fast) dispatch, invoke\n * `candidateGeometry.dispatchToHandler (myHandler).\n * * The appropriate method or methods will get called with a strongly typed `_g ` value.\n * @public\n */\nexport class NullGeometryHandler extends GeometryHandler {\n /** No-action implementation */\n public handleLineSegment3d(_g: LineSegment3d): any {\n return undefined;\n }\n /** No-action implementation */\n public handleLineString3d(_g: LineString3d): any {\n return undefined;\n }\n /** No-action implementation */\n public handleArc3d(_g: Arc3d): any {\n return undefined;\n }\n /** No-action implementation */\n public override handleCurveCollection(_g: CurveCollection): any {\n return undefined;\n }\n /** No-action implementation */\n public handleBSplineCurve3d(_g: BSplineCurve3d): any {\n return undefined;\n }\n /** No-action implementation */\n public handleInterpolationCurve3d(_g: InterpolationCurve3d): any {\n return undefined;\n }\n /** No-action implementation */\n public handleAkimaCurve3d(_g: AkimaCurve3d): any {\n return undefined;\n }\n /** No-action implementation */\n public handleBSplineCurve3dH(_g: BSplineCurve3dH): any {\n return undefined;\n }\n /** No-action implementation */\n public handleBSplineSurface3d(_g: BSplineSurface3d): any {\n return undefined;\n }\n /** No-action implementation */\n public handleCoordinateXYZ(_g: CoordinateXYZ): any {\n return undefined;\n }\n /** No-action implementation */\n public handleBSplineSurface3dH(_g: BSplineSurface3dH): any {\n return undefined;\n }\n /** No-action implementation */\n public handleIndexedPolyface(_g: IndexedPolyface): any {\n return undefined;\n }\n /** No-action implementation\n * @alpha\n */\n public handleTransitionSpiral(_g: TransitionSpiral3d): any {\n return undefined;\n }\n /** No-action implementation */\n public override handlePath(_g: Path): any {\n return undefined;\n }\n /** No-action implementation */\n public override handleLoop(_g: Loop): any {\n return undefined;\n }\n /** No-action implementation */\n public override handleParityRegion(_g: ParityRegion): any {\n return undefined;\n }\n /** No-action implementation */\n public override handleUnionRegion(_g: UnionRegion): any {\n return undefined;\n }\n /** No-action implementation */\n public override handleBagOfCurves(_g: BagOfCurves): any {\n return undefined;\n }\n /** No-action implementation */\n public handleSphere(_g: Sphere): any {\n return undefined;\n }\n /** No-action implementation */\n public handleCone(_g: Cone): any {\n return undefined;\n }\n /** No-action implementation */\n public handleBox(_g: Box): any {\n return undefined;\n }\n /** No-action implementation */\n public handleTorusPipe(_g: TorusPipe): any {\n return undefined;\n }\n /** No-action implementation */\n public handleLinearSweep(_g: LinearSweep): any {\n return undefined;\n }\n /** No-action implementation */\n public handleRotationalSweep(_g: RotationalSweep): any {\n return undefined;\n }\n /** No-action implementation */\n public handleRuledSweep(_g: RuledSweep): any {\n return undefined;\n }\n /** No-action implementation */\n public handlePointString3d(_g: PointString3d): any {\n return undefined;\n }\n /** No-action implementation */\n public handleBezierCurve3d(_g: BezierCurve3d): any {\n return undefined;\n }\n /** No-action implementation */\n public handleBezierCurve3dH(_g: BezierCurve3dH): any {\n return undefined;\n }\n}\n/**\n * Implement GeometryHandler methods, with all curve collection methods recursing to children.\n * @public\n */\nexport class RecurseToCurvesGeometryHandler extends GeometryHandler {\n /** No-action implementation */\n public handleLineSegment3d(_g: LineSegment3d): any {\n return undefined;\n }\n /** No-action implementation */\n public handleLineString3d(_g: LineString3d): any {\n return undefined;\n }\n /** No-action implementation */\n public handleArc3d(_g: Arc3d): any {\n return undefined;\n }\n /** No-action implementation */\n public handleBSplineCurve3d(_g: BSplineCurve3d): any {\n return undefined;\n }\n /** No-action implementation */\n public handleInterpolationCurve3d(_g: InterpolationCurve3d): any {\n return undefined;\n }\n /** No-action implementation */\n public handleAkimaCurve3d(_g: AkimaCurve3d): any {\n return undefined;\n }\n /** No-action implementation */\n public handleBSplineCurve3dH(_g: BSplineCurve3dH): any {\n return undefined;\n }\n /** No-action implementation */\n public handleBSplineSurface3d(_g: BSplineSurface3d): any {\n return undefined;\n }\n /** No-action implementation */\n public handleCoordinateXYZ(_g: CoordinateXYZ): any {\n return undefined;\n }\n /** No-action implementation */\n public handleBSplineSurface3dH(_g: BSplineSurface3dH): any {\n return undefined;\n }\n /** No-action implementation */\n public handleIndexedPolyface(_g: IndexedPolyface): any {\n return undefined;\n }\n /** No-action implementation\n * @alpha\n */\n public handleTransitionSpiral(_g: TransitionSpiral3d): any {\n return undefined;\n }\n /** Invoke `child.dispatchToGeometryHandler(this)` for each child in the array returned by the query `g.children` */\n public handleChildren(g: GeometryQuery): any {\n const children = g.children;\n if (children)\n for (const child of children) {\n child.dispatchToGeometryHandler(this);\n }\n }\n /** Recurse to children */\n public override handleCurveCollection(g: CurveCollection): any {\n return this.handleChildren(g);\n }\n /** Recurse to children */\n public override handlePath(g: Path): any {\n return this.handleChildren(g);\n }\n /** Recurse to children */\n public override handleLoop(g: Loop): any {\n return this.handleChildren(g);\n }\n /** Recurse to children */\n public override handleParityRegion(g: ParityRegion): any {\n return this.handleChildren(g);\n }\n /** Recurse to children */\n public override handleUnionRegion(g: UnionRegion): any {\n return this.handleChildren(g);\n }\n /** Recurse to children */\n public override handleBagOfCurves(g: BagOfCurves): any {\n return this.handleChildren(g);\n }\n /** No-action implementation */\n public handleSphere(_g: Sphere): any {\n return undefined;\n }\n /** No-action implementation */\n public handleCone(_g: Cone): any {\n return undefined;\n }\n /** No-action implementation */\n public handleBox(_g: Box): any {\n return undefined;\n }\n /** No-action implementation */\n public handleTorusPipe(_g: TorusPipe): any {\n return undefined;\n }\n /** No-action implementation */\n public handleLinearSweep(_g: LinearSweep): any {\n return undefined;\n }\n /** No-action implementation */\n public handleRotationalSweep(_g: RotationalSweep): any {\n return undefined;\n }\n /** No-action implementation */\n public handleRuledSweep(_g: RuledSweep): any {\n return undefined;\n }\n /** No-action implementation */\n public handlePointString3d(_g: PointString3d): any {\n return undefined;\n }\n /** No-action implementation */\n public handleBezierCurve3d(_g: BezierCurve3d): any {\n return undefined;\n }\n /** No-action implementation */\n public handleBezierCurve3dH(_g: BezierCurve3dH): any {\n return undefined;\n }\n}\n\n/**\n * IStrokeHandler is an interface with methods to receive data about curves being stroked.\n * CurvePrimitives emitStrokes () methods emit calls to a handler object with these methods.\n * The various CurvePrimitive types are free to announce either single points (announcePoint), linear fragments,\n * or fractional intervals of the parent curve.\n * * handler.startCurvePrimitive (cp) -- announce the curve primitive whose strokes will follow.\n * * announcePointTangent (xyz, fraction, tangent) -- announce a single point on the curve.\n * * announceIntervalForUniformStepStrokes (cp, numStrokes, fraction0, fraction1) -- announce a fraction\n * interval in which the curve can be evaluated (e.g. the handler can call cp->fractionToPointAndDerivative ())\n * * announceSegmentInterval (cp, point0, point1, numStrokes, fraction0, fraction1) -- announce\n * that the fractional interval fraction0, fraction1 is a straight line which should be broken into\n * numStrokes strokes.\n * * A LineSegment would make a single call to this.\n * * A LineString would make one call to this for each of its segments, with fractions indicating position\n * within the linestring.\n * * endCurvePrimitive (cp) -- announce the end of the curve primitive.\n * @public\n */\nexport interface IStrokeHandler {\n /**\n * Announce a parent curve primitive\n * * startParentCurvePrimitive() ...endParentCurvePrimitive() are wrapped around startCurvePrimitive and\n * endCurvePrimitive when the interior primitive is a proxy.\n */\n startParentCurvePrimitive(cp: CurvePrimitive): void;\n /** Announce the curve primitive that will be described in subsequent calls. */\n startCurvePrimitive(cp: CurvePrimitive): void;\n /**\n * Announce a single point with its fraction and tangent.\n * * (IMPORTANT) the same Point3d and Vector3d will be reset and passed on multiple calls.\n * * (THEREFORE) if the implementation is saving coordinates, it must copy the xyz data out into its own data\n * structure rather than save the references.\n */\n announcePointTangent(xyz: Point3d, fraction: number, tangent: Vector3d): void;\n\n /**\n * Announce that curve primitive cp should be evaluated in the specified fraction interval.\n * * Note that this method is permitted (expected) to provide pre-stroked data if available.\n * * In th pre-stroked case, the cp passed to the handler will be the stroked image, not the original.\n * * Callers that want summary data should implement (and return true from) needPrimaryDataForStrokes\n */\n announceIntervalForUniformStepStrokes(\n cp: CurvePrimitive,\n numStrokes: number,\n fraction0: number,\n fraction1: number): void;\n /**\n * OPTIONAL method for a handler to indicate that it wants primary geometry (e.g. spirals) rather than strokes.\n * @returns true if primary geometry should be passed (rather than stroked or otherwise simplified)\n */\n needPrimaryGeometryForStrokes?(): boolean;\n /** Announce numPoints interpolated between point0 and point1, with associated fractions */\n announceSegmentInterval(\n cp: CurvePrimitive, point0: Point3d, point1: Point3d, numStrokes: number, fraction0: number, fraction1: number,\n ): void;\n /** Announce that all data about `cp` has been announced. */\n endCurvePrimitive(cp: CurvePrimitive): void;\n /** Announce that all data about the parent primitive has been announced. */\n endParentCurvePrimitive(cp: CurvePrimitive): void;\n /**\n * Announce a bezier curve fragment.\n * * this is usually a section of BsplineCurve\n * * If this function is missing, the same interval will be passed to announceIntervalForUniformSteps.\n * @param bezier bezier fragment\n * @param numStrokes suggested number of strokes (uniform in bezier interval 0..1)\n * @param parent parent curve\n * @param spanIndex spanIndex within parent\n * @param fraction0 start fraction on parent curve\n * @param fraction1 end fraction on parent curve\n */\n announceBezierCurve?(\n bezier: BezierCurveBase,\n numStrokes: number,\n parent: CurvePrimitive,\n spandex: number,\n fraction0: number,\n fraction1: number,\n ): void;\n}\n\n/**\n * Interface with methods for mapping (u,v) fractional coordinates to surface xyz and derivatives.\n * @public\n */\nexport interface UVSurface {\n /**\n * Convert fractional u and v coordinates to surface point.\n * @param uFraction fractional coordinate in u direction\n * @param vFraction fractional coordinate in v direction\n * @param result optional pre-allocated point\n */\n uvFractionToPoint(uFraction: number, vFraction: number, result?: Point3d): Point3d;\n /**\n * Convert fractional u and v coordinates to surface point and in-surface tangent directions.\n * * The vectors are expected to be non-zero tangents which can be crossed to get a normal.\n * * Hence they are not necessarily (a) partial derivatives or (b) Frenet vectors.\n * @param uFraction fractional coordinate in u direction\n * @param vFraction fractional coordinate in v direction\n * @param result optional pre-allocated carrier for point and vectors\n */\n uvFractionToPointAndTangents(\n uFraction: number, vFraction: number, result?: Plane3dByOriginAndVectors,\n ): Plane3dByOriginAndVectors;\n}\n/**\n * Interface for queries of distance-along in u and v directions\n * @public\n */\nexport interface UVSurfaceIsoParametricDistance {\n /**\n * * Return a vector whose x and y parts are \"size\" of the surface in the u and v directions.\n * * Sizes are use for applying scaling to mesh parameters\n * * These sizes are (reasonable approximations of) the max curve length along u and v isoparameter lines.\n * * e.g. for a sphere, these are:\n * * u direction = distance around the equator\n * * v direction = distance from south pole to north pole.\n */\n maxIsoParametricDistance(): Vector2d;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"GrowableBlockedArray.js","sourceRoot":"","sources":["../../../src/geometry3d/GrowableBlockedArray.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH;;;;GAIG;AACH,MAAM,OAAO,oBAAoB;IAc/B;;;;;;;OAOG;IACH,YAAmB,SAAiB,EAAE,gBAAwB,CAAC,EAAE,YAAqB;QACpF,IAAI,CAAC,KAAK,GAAG,IAAI,YAAY,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;QACzD,IAAI,CAA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,GAAG,CAAC;QACb,IAAI,EAAE,GAAG,IAAI,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC;QACnD,IAAI,EAAE,GAAG,IAAI,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC;QACnD,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC,EAAE,EAAE;YACxC,CAAC,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;YAC5B,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;SACb;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACvB,CAAC;IAED,2HAA2H;IACpH,wBAAwB,CAAC,WAAmB,EAAE,WAAmB,EAAE,MAAc,EAAE,IAAY;QACpG,IAAI,EAAE,GAAG,GAAG,CAAC;QACb,MAAM,EAAE,GAAG,IAAI,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC;QACrD,MAAM,EAAE,GAAG,IAAI,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC;QACrD,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,KAAK,IAAI,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YAClC,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;YAChC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;SACb;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACvB,CAAC;CACF","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/** @packageDocumentation\r\n * @module ArraysAndInterfaces\r\n */\r\n\r\nimport { BlockComparisonFunction } from \"./GrowableFloat64Array\";\r\n\r\n/**\r\n * Array of contiguous doubles, indexed by block number and index within block.\r\n * * This is essentially a rectangular matrix (two dimensional array), with each block being a row of the matrix.\r\n * @public\r\n */\r\nexport class GrowableBlockedArray {\r\n /** underlying contiguous, oversized buffer. */\r\n protected _data: Float64Array;\r\n /** Number of blocks (matrix rows) in use. */\r\n protected _inUse: number;\r\n /** number of numbers per block in the array.\r\n * * If viewing the array as a two dimensional array, this is the row size.\r\n */\r\n protected _blockSize: number; // positive integer !!!\r\n /**\r\n * multiplier used by ensureBlockCapacity to expand requested reallocation size\r\n */\r\n protected _growthFactor: number;\r\n\r\n /**\r\n * Construct an array whose contents are in blocked (row-major) order, possibly with extra capacity.\r\n * * Total capacity is `this._data.length`\r\n * * Actual in-use count is `this._inUse * this._blockSize`\r\n * @param blockSize number of entries in each block, i.e., row size\r\n * @param initialBlocks initial capacity in blocks (default 8)\r\n * @param growthFactor used by ensureBlockCapacity to expand requested reallocation size (default 1.5)\r\n */\r\n public constructor(blockSize: number, initialBlocks: number = 8, growthFactor?: number) {\r\n this._data = new Float64Array(initialBlocks * blockSize);\r\n this._inUse = 0;\r\n this._blockSize = blockSize > 0 ? blockSize : 1;\r\n this._growthFactor = (undefined !== growthFactor && growthFactor >= 1.0) ? growthFactor : 1.5;\r\n }\r\n\r\n /** Copy data from source array. Does not reallocate or change active block count.\r\n * @param source array to copy from\r\n * @param sourceCount copy the first sourceCount blocks; all blocks if undefined\r\n * @param destOffset copy to instance array starting at this block index; zero if undefined\r\n * @return count and offset of blocks copied\r\n */\r\n protected copyData(source: Float64Array | number[], sourceCount?: number, destOffset?: number): {count: number, offset: number} {\r\n // validate inputs and convert from blocks to entries\r\n let myOffset = (undefined !== destOffset) ? destOffset * this.numPerBlock : 0;\r\n if (myOffset < 0)\r\n myOffset = 0;\r\n if (myOffset >= this._data.length)\r\n return {count: 0, offset: 0};\r\n let myCount = (undefined !== sourceCount) ? sourceCount * this.numPerBlock : source.length;\r\n if (myCount > 0) {\r\n if (myCount > source.length)\r\n myCount = source.length;\r\n if (myOffset + myCount > this._data.length)\r\n myCount = this._data.length - myOffset;\r\n if (myCount % this.numPerBlock !== 0)\r\n myCount -= myCount % this.numPerBlock;\r\n }\r\n if (myCount <= 0)\r\n return {count: 0, offset: 0};\r\n if (myCount === source.length)\r\n this._data.set(source, myOffset);\r\n else if (source instanceof Float64Array)\r\n this._data.set(source.subarray(0, myCount), myOffset);\r\n else\r\n this._data.set(source.slice(0, myCount), myOffset);\r\n return {count: myCount / this.numPerBlock, offset: myOffset / this.numPerBlock};\r\n }\r\n\r\n /**\r\n * Make a copy of the (active) blocks in this array.\r\n * (The clone does NOT get excess capacity)\r\n */\r\n public clone(): GrowableBlockedArray {\r\n const newBlocks = new GrowableBlockedArray(this.numPerBlock, this.numBlocks, this._growthFactor);\r\n newBlocks.copyData(this._data, this.numBlocks);\r\n newBlocks._inUse = this.numBlocks;\r\n return newBlocks;\r\n }\r\n\r\n /** computed property: length (in blocks, not doubles) */\r\n public get length(): number { return this._inUse; }\r\n /** computed property: length (in blocks, not doubles) */\r\n public get numBlocks(): number { return this._inUse; }\r\n /** property: number of data values per block */\r\n public get numPerBlock(): number { return this._blockSize; }\r\n /**\r\n * Return a single value indexed within a block. Indices are unchecked.\r\n * @param blockIndex index of block to read\r\n * @param indexInBlock offset within the block\r\n */\r\n public getWithinBlock(blockIndex: number, indexWithinBlock: number): number {\r\n return this._data[blockIndex * this._blockSize + indexWithinBlock];\r\n }\r\n /** clear the block count to zero, but maintain the allocated memory */\r\n public clear() { this._inUse = 0; }\r\n /** Return the capacity in blocks (not doubles) */\r\n public blockCapacity() {\r\n return this._data.length / this._blockSize;\r\n }\r\n /** ensure capacity (in blocks, not doubles) */\r\n public ensureBlockCapacity(blockCapacity: number, applyGrowthFactor: boolean = true) {\r\n if (blockCapacity > this.blockCapacity()) {\r\n if (applyGrowthFactor)\r\n blockCapacity *= this._growthFactor;\r\n const prevData = this._data;\r\n this._data = new Float64Array(blockCapacity * this._blockSize);\r\n this.copyData(prevData, this._inUse);\r\n }\r\n }\r\n /** Add a new block of data.\r\n * * If newData has fewer than numPerBlock entries, the remaining part of the new block is zeros.\r\n * * If newData has more entries, only the first numPerBlock are taken.\r\n */\r\n public addBlock(newData: number[]) {\r\n const k0 = this.newBlockIndex();\r\n let numValue = newData.length;\r\n if (numValue > this._blockSize)\r\n numValue = this._blockSize;\r\n for (let i = 0; i < numValue; i++)\r\n this._data[k0 + i] = newData[i];\r\n }\r\n /**\r\n * Return the starting index of a block of (zero-initialized) doubles at the end.\r\n *\r\n * * this.data is reallocated if needed to include the new block.\r\n * * The inUse count is incremented to include the new block.\r\n * * The returned block is an index to the Float64Array (not a block index)\r\n */\r\n protected newBlockIndex(): number {\r\n const index = this._blockSize * this._inUse;\r\n if ((index + 1) > this._data.length)\r\n this.ensureBlockCapacity(1 + this._inUse);\r\n this._inUse++;\r\n for (let i = index; i < index + this._blockSize; i++)\r\n this._data[i] = 0.0;\r\n return index;\r\n }\r\n /** reduce the block count by one. */\r\n public popBlock() {\r\n if (this._inUse > 0)\r\n this._inUse--;\r\n }\r\n /** convert a block index to the simple index to the underlying Float64Array. */\r\n protected blockIndexToDoubleIndex(blockIndex: number) { return this._blockSize * blockIndex; }\r\n /** Access a single double at offset within a block, with index checking and return undefined if indexing is invalid. */\r\n public checkedComponent(blockIndex: number, componentIndex: number): number | undefined {\r\n if (blockIndex >= this._inUse || blockIndex < 0 || componentIndex < 0 || componentIndex >= this._blockSize)\r\n return undefined;\r\n return this._data[this._blockSize * blockIndex + componentIndex];\r\n }\r\n /** Access a single double at offset within a block. This has no index checking. */\r\n public component(blockIndex: number, componentIndex: number): number {\r\n return this._data[this._blockSize * blockIndex + componentIndex];\r\n }\r\n /** compare two blocks in simple lexical order.\r\n * @param data data array\r\n * @param blockSize number of items to compare\r\n * @param ia raw index (not block index) of first block\r\n * @param ib raw index (not block index) of second block\r\n */\r\n public static compareLexicalBlock(data: Float64Array, blockSize: number, ia: number, ib: number): number {\r\n let ax = 0;\r\n let bx = 0;\r\n for (let i = 0; i < blockSize; i++) {\r\n ax = data[ia + i];\r\n bx = data[ib + i];\r\n if (ax > bx) return 1;\r\n if (ax < bx) return -1;\r\n }\r\n return ia - ib; // so original order is maintained among duplicates !!!!\r\n }\r\n /** Return an array of block indices sorted per compareLexicalBlock function */\r\n public sortIndicesLexical(compareBlocks: BlockComparisonFunction = (dataArray, size, iA, iB) => GrowableBlockedArray.compareLexicalBlock(dataArray, size, iA, iB)): Uint32Array {\r\n const n = this._inUse;\r\n // let numCompare = 0;\r\n const result = new Uint32Array(n);\r\n const data = this._data;\r\n const blockSize = this._blockSize;\r\n for (let i = 0; i < n; i++)result[i] = i;\r\n result.sort(\r\n (blockIndexA: number, blockIndexB: number) => {\r\n // numCompare++;\r\n return compareBlocks(data, blockSize, blockIndexA * blockSize, blockIndexB * blockSize);\r\n });\r\n // console.log (n, numCompare);\r\n return result;\r\n }\r\n /** Return the distance (hypotenuse=sqrt(summed squares)) between indicated blocks */\r\n public distanceBetweenBlocks(blockIndexA: number, blockIndexB: number): number {\r\n let dd = 0.0;\r\n let iA = this.blockIndexToDoubleIndex(blockIndexA);\r\n let iB = this.blockIndexToDoubleIndex(blockIndexB);\r\n let a = 0;\r\n const data = this._data;\r\n for (let i = 0; i < this._blockSize; i++) {\r\n a = data[iA++] - data[iB++];\r\n dd += a * a;\r\n }\r\n return Math.sqrt(dd);\r\n }\r\n\r\n /** Return the distance (hypotenuse=sqrt(summed squares)) between block entries `iBegin <= i < iEnd` of indicated blocks */\r\n public distanceBetweenSubBlocks(blockIndexA: number, blockIndexB: number, iBegin: number, iEnd: number): number {\r\n let dd = 0.0;\r\n const iA = this.blockIndexToDoubleIndex(blockIndexA);\r\n const iB = this.blockIndexToDoubleIndex(blockIndexB);\r\n let a = 0;\r\n const data = this._data;\r\n for (let i = iBegin; i < iEnd; i++) {\r\n a = data[iA + i] - data[iB + i];\r\n dd += a * a;\r\n }\r\n return Math.sqrt(dd);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"GrowableBlockedArray.js","sourceRoot":"","sources":["../../../src/geometry3d/GrowableBlockedArray.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAIH;;;;GAIG;AACH,MAAM,OAAO,oBAAoB;IAc/B;;;;;;;OAOG;IACH,YAAmB,SAAiB,EAAE,gBAAwB,CAAC,EAAE,YAAqB;QACpF,IAAI,CAAC,KAAK,GAAG,IAAI,YAAY,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;QACzD,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAChB,IAAI,CAAC,UAAU,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;QAChD,IAAI,CAAC,aAAa,GAAG,CAAC,SAAS,KAAK,YAAY,IAAI,YAAY,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC;IAChG,CAAC;IAED;;;;;OAKG;IACO,QAAQ,CAAC,MAA+B,EAAE,WAAoB,EAAE,UAAmB;QAC3F,qDAAqD;QACrD,IAAI,QAAQ,GAAG,CAAC,SAAS,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9E,IAAI,QAAQ,GAAG,CAAC;YACd,QAAQ,GAAG,CAAC,CAAC;QACf,IAAI,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM;YAC/B,OAAO,EAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC,CAAC;QAC/B,IAAI,OAAO,GAAG,CAAC,SAAS,KAAK,WA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GAAG,IAAI,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC;QACrD,IAAI,CAAC,GAAG,CAAC,CAAC;QACV,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,KAAK,IAAI,CAAC,GAAG,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YAClC,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;YAChC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;SACb;QACD,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACvB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module ArraysAndInterfaces\n */\n\nimport { BlockComparisonFunction } from \"./GrowableFloat64Array\";\n\n/**\n * Array of contiguous doubles, indexed by block number and index within block.\n * * This is essentially a rectangular matrix (two dimensional array), with each block being a row of the matrix.\n * @public\n */\nexport class GrowableBlockedArray {\n /** underlying contiguous, oversized buffer. */\n protected _data: Float64Array;\n /** Number of blocks (matrix rows) in use. */\n protected _inUse: number;\n /** number of numbers per block in the array.\n * * If viewing the array as a two dimensional array, this is the row size.\n */\n protected _blockSize: number; // positive integer !!!\n /**\n * multiplier used by ensureBlockCapacity to expand requested reallocation size\n */\n protected _growthFactor: number;\n\n /**\n * Construct an array whose contents are in blocked (row-major) order, possibly with extra capacity.\n * * Total capacity is `this._data.length`\n * * Actual in-use count is `this._inUse * this._blockSize`\n * @param blockSize number of entries in each block, i.e., row size\n * @param initialBlocks initial capacity in blocks (default 8)\n * @param growthFactor used by ensureBlockCapacity to expand requested reallocation size (default 1.5)\n */\n public constructor(blockSize: number, initialBlocks: number = 8, growthFactor?: number) {\n this._data = new Float64Array(initialBlocks * blockSize);\n this._inUse = 0;\n this._blockSize = blockSize > 0 ? blockSize : 1;\n this._growthFactor = (undefined !== growthFactor && growthFactor >= 1.0) ? growthFactor : 1.5;\n }\n\n /** Copy data from source array. Does not reallocate or change active block count.\n * @param source array to copy from\n * @param sourceCount copy the first sourceCount blocks; all blocks if undefined\n * @param destOffset copy to instance array starting at this block index; zero if undefined\n * @return count and offset of blocks copied\n */\n protected copyData(source: Float64Array | number[], sourceCount?: number, destOffset?: number): {count: number, offset: number} {\n // validate inputs and convert from blocks to entries\n let myOffset = (undefined !== destOffset) ? destOffset * this.numPerBlock : 0;\n if (myOffset < 0)\n myOffset = 0;\n if (myOffset >= this._data.length)\n return {count: 0, offset: 0};\n let myCount = (undefined !== sourceCount) ? sourceCount * this.numPerBlock : source.length;\n if (myCount > 0) {\n if (myCount > source.length)\n myCount = source.length;\n if (myOffset + myCount > this._data.length)\n myCount = this._data.length - myOffset;\n if (myCount % this.numPerBlock !== 0)\n myCount -= myCount % this.numPerBlock;\n }\n if (myCount <= 0)\n return {count: 0, offset: 0};\n if (myCount === source.length)\n this._data.set(source, myOffset);\n else if (source instanceof Float64Array)\n this._data.set(source.subarray(0, myCount), myOffset);\n else\n this._data.set(source.slice(0, myCount), myOffset);\n return {count: myCount / this.numPerBlock, offset: myOffset / this.numPerBlock};\n }\n\n /**\n * Make a copy of the (active) blocks in this array.\n * (The clone does NOT get excess capacity)\n */\n public clone(): GrowableBlockedArray {\n const newBlocks = new GrowableBlockedArray(this.numPerBlock, this.numBlocks, this._growthFactor);\n newBlocks.copyData(this._data, this.numBlocks);\n newBlocks._inUse = this.numBlocks;\n return newBlocks;\n }\n\n /** computed property: length (in blocks, not doubles) */\n public get length(): number { return this._inUse; }\n /** computed property: length (in blocks, not doubles) */\n public get numBlocks(): number { return this._inUse; }\n /** property: number of data values per block */\n public get numPerBlock(): number { return this._blockSize; }\n /**\n * Return a single value indexed within a block. Indices are unchecked.\n * @param blockIndex index of block to read\n * @param indexInBlock offset within the block\n */\n public getWithinBlock(blockIndex: number, indexWithinBlock: number): number {\n return this._data[blockIndex * this._blockSize + indexWithinBlock];\n }\n /** clear the block count to zero, but maintain the allocated memory */\n public clear() { this._inUse = 0; }\n /** Return the capacity in blocks (not doubles) */\n public blockCapacity() {\n return this._data.length / this._blockSize;\n }\n /** ensure capacity (in blocks, not doubles) */\n public ensureBlockCapacity(blockCapacity: number, applyGrowthFactor: boolean = true) {\n if (blockCapacity > this.blockCapacity()) {\n if (applyGrowthFactor)\n blockCapacity *= this._growthFactor;\n const prevData = this._data;\n this._data = new Float64Array(blockCapacity * this._blockSize);\n this.copyData(prevData, this._inUse);\n }\n }\n /** Add a new block of data.\n * * If newData has fewer than numPerBlock entries, the remaining part of the new block is zeros.\n * * If newData has more entries, only the first numPerBlock are taken.\n */\n public addBlock(newData: number[]) {\n const k0 = this.newBlockIndex();\n let numValue = newData.length;\n if (numValue > this._blockSize)\n numValue = this._blockSize;\n for (let i = 0; i < numValue; i++)\n this._data[k0 + i] = newData[i];\n }\n /**\n * Return the starting index of a block of (zero-initialized) doubles at the end.\n *\n * * this.data is reallocated if needed to include the new block.\n * * The inUse count is incremented to include the new block.\n * * The returned block is an index to the Float64Array (not a block index)\n */\n protected newBlockIndex(): number {\n const index = this._blockSize * this._inUse;\n if ((index + 1) > this._data.length)\n this.ensureBlockCapacity(1 + this._inUse);\n this._inUse++;\n for (let i = index; i < index + this._blockSize; i++)\n this._data[i] = 0.0;\n return index;\n }\n /** reduce the block count by one. */\n public popBlock() {\n if (this._inUse > 0)\n this._inUse--;\n }\n /** convert a block index to the simple index to the underlying Float64Array. */\n protected blockIndexToDoubleIndex(blockIndex: number) { return this._blockSize * blockIndex; }\n /** Access a single double at offset within a block, with index checking and return undefined if indexing is invalid. */\n public checkedComponent(blockIndex: number, componentIndex: number): number | undefined {\n if (blockIndex >= this._inUse || blockIndex < 0 || componentIndex < 0 || componentIndex >= this._blockSize)\n return undefined;\n return this._data[this._blockSize * blockIndex + componentIndex];\n }\n /** Access a single double at offset within a block. This has no index checking. */\n public component(blockIndex: number, componentIndex: number): number {\n return this._data[this._blockSize * blockIndex + componentIndex];\n }\n /** compare two blocks in simple lexical order.\n * @param data data array\n * @param blockSize number of items to compare\n * @param ia raw index (not block index) of first block\n * @param ib raw index (not block index) of second block\n */\n public static compareLexicalBlock(data: Float64Array, blockSize: number, ia: number, ib: number): number {\n let ax = 0;\n let bx = 0;\n for (let i = 0; i < blockSize; i++) {\n ax = data[ia + i];\n bx = data[ib + i];\n if (ax > bx) return 1;\n if (ax < bx) return -1;\n }\n return ia - ib; // so original order is maintained among duplicates !!!!\n }\n /** Return an array of block indices sorted per compareLexicalBlock function */\n public sortIndicesLexical(compareBlocks: BlockComparisonFunction = (dataArray, size, iA, iB) => GrowableBlockedArray.compareLexicalBlock(dataArray, size, iA, iB)): Uint32Array {\n const n = this._inUse;\n // let numCompare = 0;\n const result = new Uint32Array(n);\n const data = this._data;\n const blockSize = this._blockSize;\n for (let i = 0; i < n; i++)result[i] = i;\n result.sort(\n (blockIndexA: number, blockIndexB: number) => {\n // numCompare++;\n return compareBlocks(data, blockSize, blockIndexA * blockSize, blockIndexB * blockSize);\n });\n // console.log (n, numCompare);\n return result;\n }\n /** Return the distance (hypotenuse=sqrt(summed squares)) between indicated blocks */\n public distanceBetweenBlocks(blockIndexA: number, blockIndexB: number): number {\n let dd = 0.0;\n let iA = this.blockIndexToDoubleIndex(blockIndexA);\n let iB = this.blockIndexToDoubleIndex(blockIndexB);\n let a = 0;\n const data = this._data;\n for (let i = 0; i < this._blockSize; i++) {\n a = data[iA++] - data[iB++];\n dd += a * a;\n }\n return Math.sqrt(dd);\n }\n\n /** Return the distance (hypotenuse=sqrt(summed squares)) between block entries `iBegin <= i < iEnd` of indicated blocks */\n public distanceBetweenSubBlocks(blockIndexA: number, blockIndexB: number, iBegin: number, iEnd: number): number {\n let dd = 0.0;\n const iA = this.blockIndexToDoubleIndex(blockIndexA);\n const iB = this.blockIndexToDoubleIndex(blockIndexB);\n let a = 0;\n const data = this._data;\n for (let i = iBegin; i < iEnd; i++) {\n a = data[iA + i] - data[iB + i];\n dd += a * a;\n }\n return Math.sqrt(dd);\n }\n}\n"]}