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

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 (485) 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.d.ts +90 -54
  5. package/lib/cjs/bspline/BSpline1dNd.d.ts.map +1 -1
  6. package/lib/cjs/bspline/BSpline1dNd.js +134 -99
  7. package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
  8. package/lib/cjs/bspline/BSplineCurve.d.ts +193 -155
  9. package/lib/cjs/bspline/BSplineCurve.d.ts.map +1 -1
  10. package/lib/cjs/bspline/BSplineCurve.js +245 -181
  11. package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
  12. package/lib/cjs/bspline/BSplineCurve3dH.js.map +1 -1
  13. package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
  14. package/lib/cjs/bspline/BSplineSurface.js.map +1 -1
  15. package/lib/cjs/bspline/Bezier1dNd.js.map +1 -1
  16. package/lib/cjs/bspline/BezierCurve3d.d.ts +3 -1
  17. package/lib/cjs/bspline/BezierCurve3d.d.ts.map +1 -1
  18. package/lib/cjs/bspline/BezierCurve3d.js +3 -5
  19. package/lib/cjs/bspline/BezierCurve3d.js.map +1 -1
  20. package/lib/cjs/bspline/BezierCurve3dH.js.map +1 -1
  21. package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
  22. package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
  23. package/lib/cjs/bspline/KnotVector.d.ts +74 -54
  24. package/lib/cjs/bspline/KnotVector.d.ts.map +1 -1
  25. package/lib/cjs/bspline/KnotVector.js +127 -80
  26. package/lib/cjs/bspline/KnotVector.js.map +1 -1
  27. package/lib/cjs/bspline/SurfaceLocationDetail.js.map +1 -1
  28. package/lib/cjs/clipping/AlternatingConvexClipTree.js.map +1 -1
  29. package/lib/cjs/clipping/BooleanClipFactory.js.map +1 -1
  30. package/lib/cjs/clipping/BooleanClipNode.js.map +1 -1
  31. package/lib/cjs/clipping/ClipPlane.js.map +1 -1
  32. package/lib/cjs/clipping/ClipPrimitive.js.map +1 -1
  33. package/lib/cjs/clipping/ClipUtils.js.map +1 -1
  34. package/lib/cjs/clipping/ClipVector.js.map +1 -1
  35. package/lib/cjs/clipping/ConvexClipPlaneSet.js.map +1 -1
  36. package/lib/cjs/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  37. package/lib/cjs/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  38. package/lib/cjs/core-geometry.js.map +1 -1
  39. package/lib/cjs/curve/Arc3d.d.ts +2 -0
  40. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  41. package/lib/cjs/curve/Arc3d.js +2 -0
  42. package/lib/cjs/curve/Arc3d.js.map +1 -1
  43. package/lib/cjs/curve/ConstructCurveBetweenCurves.js.map +1 -1
  44. package/lib/cjs/curve/CoordinateXYZ.js.map +1 -1
  45. package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
  46. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  47. package/lib/cjs/curve/CurveCurve.js.map +1 -1
  48. package/lib/cjs/curve/CurveExtendMode.js.map +1 -1
  49. package/lib/cjs/curve/CurveFactory.js.map +1 -1
  50. package/lib/cjs/curve/CurveLocationDetail.js.map +1 -1
  51. package/lib/cjs/curve/CurveOps.js.map +1 -1
  52. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  53. package/lib/cjs/curve/CurveProcessor.js.map +1 -1
  54. package/lib/cjs/curve/CurveTypes.js.map +1 -1
  55. package/lib/cjs/curve/CurveWireMomentsXYZ.js.map +1 -1
  56. package/lib/cjs/curve/GeometryQuery.js.map +1 -1
  57. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  58. package/lib/cjs/curve/LineString3d.js.map +1 -1
  59. package/lib/cjs/curve/Loop.js.map +1 -1
  60. package/lib/cjs/curve/OffsetOptions.js.map +1 -1
  61. package/lib/cjs/curve/ParityRegion.js.map +1 -1
  62. package/lib/cjs/curve/Path.js.map +1 -1
  63. package/lib/cjs/curve/PointString3d.js.map +1 -1
  64. package/lib/cjs/curve/ProxyCurve.js.map +1 -1
  65. package/lib/cjs/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  66. package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
  67. package/lib/cjs/curve/Query/CylindricalRange.js.map +1 -1
  68. package/lib/cjs/curve/Query/InOutTests.js.map +1 -1
  69. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  70. package/lib/cjs/curve/Query/StrokeCountChain.js.map +1 -1
  71. package/lib/cjs/curve/Query/StrokeCountMap.js.map +1 -1
  72. package/lib/cjs/curve/RegionMomentsXY.js.map +1 -1
  73. package/lib/cjs/curve/RegionOps.js.map +1 -1
  74. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  75. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  76. package/lib/cjs/curve/UnionRegion.js.map +1 -1
  77. package/lib/cjs/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  78. package/lib/cjs/curve/internalContexts/ChainCollectorContext.js.map +1 -1
  79. package/lib/cjs/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  80. package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  81. package/lib/cjs/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  82. package/lib/cjs/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  83. package/lib/cjs/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  84. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  85. package/lib/cjs/curve/internalContexts/CurveCurveIntersectXYZ.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/EllipticalArcApproximationContext.js.map +1 -1
  89. package/lib/cjs/curve/internalContexts/GapSearchContext.js.map +1 -1
  90. package/lib/cjs/curve/internalContexts/MultiChainCollector.js.map +1 -1
  91. package/lib/cjs/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  92. package/lib/cjs/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  93. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  94. package/lib/cjs/curve/internalContexts/SumLengthsContext.js.map +1 -1
  95. package/lib/cjs/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  96. package/lib/cjs/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  97. package/lib/cjs/curve/spiral/ClothoidSeries.js.map +1 -1
  98. package/lib/cjs/curve/spiral/CubicEvaluator.js.map +1 -1
  99. package/lib/cjs/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  100. package/lib/cjs/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  101. package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
  102. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  103. package/lib/cjs/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  104. package/lib/cjs/curve/spiral/NormalizedTransition.js.map +1 -1
  105. package/lib/cjs/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  106. package/lib/cjs/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  107. package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
  108. package/lib/cjs/curve/spiral/XYCurveEvaluator.js.map +1 -1
  109. package/lib/cjs/geometry3d/Angle.js.map +1 -1
  110. package/lib/cjs/geometry3d/AngleSweep.js.map +1 -1
  111. package/lib/cjs/geometry3d/BarycentricTriangle.js.map +1 -1
  112. package/lib/cjs/geometry3d/BilinearPatch.js.map +1 -1
  113. package/lib/cjs/geometry3d/CoincidentGeometryOps.js.map +1 -1
  114. package/lib/cjs/geometry3d/Ellipsoid.js.map +1 -1
  115. package/lib/cjs/geometry3d/FrameBuilder.js.map +1 -1
  116. package/lib/cjs/geometry3d/FrustumAnimation.js.map +1 -1
  117. package/lib/cjs/geometry3d/GeometryHandler.js.map +1 -1
  118. package/lib/cjs/geometry3d/GrowableBlockedArray.js.map +1 -1
  119. package/lib/cjs/geometry3d/GrowableFloat64Array.js.map +1 -1
  120. package/lib/cjs/geometry3d/GrowableXYArray.js.map +1 -1
  121. package/lib/cjs/geometry3d/GrowableXYZArray.js.map +1 -1
  122. package/lib/cjs/geometry3d/IndexedCollectionInterval.js.map +1 -1
  123. package/lib/cjs/geometry3d/IndexedXYCollection.js.map +1 -1
  124. package/lib/cjs/geometry3d/IndexedXYZCollection.js.map +1 -1
  125. package/lib/cjs/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  126. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  127. package/lib/cjs/geometry3d/OrderedRotationAngles.js.map +1 -1
  128. package/lib/cjs/geometry3d/Plane3d.js.map +1 -1
  129. package/lib/cjs/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  130. package/lib/cjs/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  131. package/lib/cjs/geometry3d/Point2dArrayCarrier.js.map +1 -1
  132. package/lib/cjs/geometry3d/Point2dVector2d.js.map +1 -1
  133. package/lib/cjs/geometry3d/Point3dArrayCarrier.js.map +1 -1
  134. package/lib/cjs/geometry3d/Point3dVector3d.js.map +1 -1
  135. package/lib/cjs/geometry3d/PointHelpers.d.ts +3 -3
  136. package/lib/cjs/geometry3d/PointHelpers.js +3 -3
  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.d.ts +2 -2
  145. package/lib/cjs/geometry3d/Ray3d.d.ts.map +1 -1
  146. package/lib/cjs/geometry3d/Ray3d.js +8 -11
  147. package/lib/cjs/geometry3d/Ray3d.js.map +1 -1
  148. package/lib/cjs/geometry3d/ReusableObjectCache.js.map +1 -1
  149. package/lib/cjs/geometry3d/Segment1d.js.map +1 -1
  150. package/lib/cjs/geometry3d/SortablePolygon.js.map +1 -1
  151. package/lib/cjs/geometry3d/Transform.js.map +1 -1
  152. package/lib/cjs/geometry3d/UVSurfaceOps.js.map +1 -1
  153. package/lib/cjs/geometry3d/XYZProps.js.map +1 -1
  154. package/lib/cjs/geometry3d/YawPitchRollAngles.js.map +1 -1
  155. package/lib/cjs/geometry4d/Map4d.js.map +1 -1
  156. package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
  157. package/lib/cjs/geometry4d/MomentData.js.map +1 -1
  158. package/lib/cjs/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  159. package/lib/cjs/geometry4d/Point4d.js.map +1 -1
  160. package/lib/cjs/numerics/BandedSystem.js.map +1 -1
  161. package/lib/cjs/numerics/BezierPolynomials.js.map +1 -1
  162. package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
  163. package/lib/cjs/numerics/Complex.js.map +1 -1
  164. package/lib/cjs/numerics/ConvexPolygon2d.js.map +1 -1
  165. package/lib/cjs/numerics/Newton.js.map +1 -1
  166. package/lib/cjs/numerics/PascalCoefficients.js.map +1 -1
  167. package/lib/cjs/numerics/PolarData.js.map +1 -1
  168. package/lib/cjs/numerics/Polynomials.js.map +1 -1
  169. package/lib/cjs/numerics/Quadrature.js.map +1 -1
  170. package/lib/cjs/numerics/Range1dArray.js.map +1 -1
  171. package/lib/cjs/numerics/SmallSystem.js.map +1 -1
  172. package/lib/cjs/numerics/TriDiagonalSystem.js.map +1 -1
  173. package/lib/cjs/numerics/UnionFind.js.map +1 -1
  174. package/lib/cjs/numerics/UsageSums.js.map +1 -1
  175. package/lib/cjs/polyface/AuxData.js.map +1 -1
  176. package/lib/cjs/polyface/BoxTopology.js.map +1 -1
  177. package/lib/cjs/polyface/FacetFaceData.js.map +1 -1
  178. package/lib/cjs/polyface/FacetLocationDetail.js.map +1 -1
  179. package/lib/cjs/polyface/FacetOrientation.js.map +1 -1
  180. package/lib/cjs/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  181. package/lib/cjs/polyface/IndexedEdgeMatcher.js.map +1 -1
  182. package/lib/cjs/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  183. package/lib/cjs/polyface/IndexedPolyfaceWalker.js.map +1 -1
  184. package/lib/cjs/polyface/Polyface.js.map +1 -1
  185. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  186. package/lib/cjs/polyface/PolyfaceClip.js.map +1 -1
  187. package/lib/cjs/polyface/PolyfaceData.js.map +1 -1
  188. package/lib/cjs/polyface/PolyfaceQuery.js.map +1 -1
  189. package/lib/cjs/polyface/RangeLengthData.js.map +1 -1
  190. package/lib/cjs/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
  191. package/lib/cjs/polyface/RangeTree/MinimumValueTester.js.map +1 -1
  192. package/lib/cjs/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
  193. package/lib/cjs/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
  194. package/lib/cjs/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  195. package/lib/cjs/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
  196. package/lib/cjs/polyface/TaggedNumericData.js.map +1 -1
  197. package/lib/cjs/polyface/TriangleCandidate.js.map +1 -1
  198. package/lib/cjs/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  199. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  200. package/lib/cjs/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  201. package/lib/cjs/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  202. package/lib/cjs/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  203. package/lib/cjs/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  204. package/lib/cjs/polyface/multiclip/RangeSearch.js.map +1 -1
  205. package/lib/cjs/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  206. package/lib/cjs/polyface/multiclip/XYPointBuckets.js.map +1 -1
  207. package/lib/cjs/serialization/BGFBAccessors.js.map +1 -1
  208. package/lib/cjs/serialization/BGFBReader.js.map +1 -1
  209. package/lib/cjs/serialization/BGFBWriter.js.map +1 -1
  210. package/lib/cjs/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  211. package/lib/cjs/serialization/DeepCompare.js.map +1 -1
  212. package/lib/cjs/serialization/GeometrySamples.js.map +1 -1
  213. package/lib/cjs/serialization/IModelJsonSchema.js.map +1 -1
  214. package/lib/cjs/serialization/SerializationHelpers.js.map +1 -1
  215. package/lib/cjs/solid/Box.js.map +1 -1
  216. package/lib/cjs/solid/Cone.js.map +1 -1
  217. package/lib/cjs/solid/LinearSweep.js.map +1 -1
  218. package/lib/cjs/solid/RotationalSweep.js.map +1 -1
  219. package/lib/cjs/solid/RuledSweep.js.map +1 -1
  220. package/lib/cjs/solid/SolidPrimitive.js.map +1 -1
  221. package/lib/cjs/solid/Sphere.js.map +1 -1
  222. package/lib/cjs/solid/SweepContour.js.map +1 -1
  223. package/lib/cjs/solid/TorusPipe.js.map +1 -1
  224. package/lib/cjs/topology/ChainMerge.js.map +1 -1
  225. package/lib/cjs/topology/Graph.js.map +1 -1
  226. package/lib/cjs/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  227. package/lib/cjs/topology/HalfEdgeGraphSearch.js.map +1 -1
  228. package/lib/cjs/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  229. package/lib/cjs/topology/HalfEdgeGraphValidation.js.map +1 -1
  230. package/lib/cjs/topology/HalfEdgeMarkSet.js.map +1 -1
  231. package/lib/cjs/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  232. package/lib/cjs/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  233. package/lib/cjs/topology/HalfEdgePositionDetail.js.map +1 -1
  234. package/lib/cjs/topology/HalfEdgePriorityQueue.js.map +1 -1
  235. package/lib/cjs/topology/InsertAndRetriangulateContext.js.map +1 -1
  236. package/lib/cjs/topology/MaskManager.js.map +1 -1
  237. package/lib/cjs/topology/Merging.js.map +1 -1
  238. package/lib/cjs/topology/RegularizeFace.js.map +1 -1
  239. package/lib/cjs/topology/SignedDataSummary.js.map +1 -1
  240. package/lib/cjs/topology/SpaceTriangulation.js.map +1 -1
  241. package/lib/cjs/topology/Triangulation.js.map +1 -1
  242. package/lib/cjs/topology/XYParitySearchContext.js.map +1 -1
  243. package/lib/esm/Constant.js.map +1 -1
  244. package/lib/esm/Geometry.js.map +1 -1
  245. package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
  246. package/lib/esm/bspline/BSpline1dNd.d.ts +90 -54
  247. package/lib/esm/bspline/BSpline1dNd.d.ts.map +1 -1
  248. package/lib/esm/bspline/BSpline1dNd.js +134 -99
  249. package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
  250. package/lib/esm/bspline/BSplineCurve.d.ts +193 -155
  251. package/lib/esm/bspline/BSplineCurve.d.ts.map +1 -1
  252. package/lib/esm/bspline/BSplineCurve.js +245 -181
  253. package/lib/esm/bspline/BSplineCurve.js.map +1 -1
  254. package/lib/esm/bspline/BSplineCurve3dH.js.map +1 -1
  255. package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
  256. package/lib/esm/bspline/BSplineSurface.js.map +1 -1
  257. package/lib/esm/bspline/Bezier1dNd.js.map +1 -1
  258. package/lib/esm/bspline/BezierCurve3d.d.ts +3 -1
  259. package/lib/esm/bspline/BezierCurve3d.d.ts.map +1 -1
  260. package/lib/esm/bspline/BezierCurve3d.js +3 -5
  261. package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
  262. package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
  263. package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
  264. package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
  265. package/lib/esm/bspline/KnotVector.d.ts +74 -54
  266. package/lib/esm/bspline/KnotVector.d.ts.map +1 -1
  267. package/lib/esm/bspline/KnotVector.js +127 -80
  268. package/lib/esm/bspline/KnotVector.js.map +1 -1
  269. package/lib/esm/bspline/SurfaceLocationDetail.js.map +1 -1
  270. package/lib/esm/clipping/AlternatingConvexClipTree.js.map +1 -1
  271. package/lib/esm/clipping/BooleanClipFactory.js.map +1 -1
  272. package/lib/esm/clipping/BooleanClipNode.js.map +1 -1
  273. package/lib/esm/clipping/ClipPlane.js.map +1 -1
  274. package/lib/esm/clipping/ClipPrimitive.js.map +1 -1
  275. package/lib/esm/clipping/ClipUtils.js.map +1 -1
  276. package/lib/esm/clipping/ClipVector.js.map +1 -1
  277. package/lib/esm/clipping/ConvexClipPlaneSet.js.map +1 -1
  278. package/lib/esm/clipping/UnionOfConvexClipPlaneSets.js.map +1 -1
  279. package/lib/esm/clipping/internalContexts/LineStringOffsetClipperContext.js.map +1 -1
  280. package/lib/esm/core-geometry.js.map +1 -1
  281. package/lib/esm/curve/Arc3d.d.ts +2 -0
  282. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  283. package/lib/esm/curve/Arc3d.js +2 -0
  284. package/lib/esm/curve/Arc3d.js.map +1 -1
  285. package/lib/esm/curve/ConstructCurveBetweenCurves.js.map +1 -1
  286. package/lib/esm/curve/CoordinateXYZ.js.map +1 -1
  287. package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
  288. package/lib/esm/curve/CurveCollection.js.map +1 -1
  289. package/lib/esm/curve/CurveCurve.js.map +1 -1
  290. package/lib/esm/curve/CurveExtendMode.js.map +1 -1
  291. package/lib/esm/curve/CurveFactory.js.map +1 -1
  292. package/lib/esm/curve/CurveLocationDetail.js.map +1 -1
  293. package/lib/esm/curve/CurveOps.js.map +1 -1
  294. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  295. package/lib/esm/curve/CurveProcessor.js.map +1 -1
  296. package/lib/esm/curve/CurveTypes.js.map +1 -1
  297. package/lib/esm/curve/CurveWireMomentsXYZ.js.map +1 -1
  298. package/lib/esm/curve/GeometryQuery.js.map +1 -1
  299. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  300. package/lib/esm/curve/LineString3d.js.map +1 -1
  301. package/lib/esm/curve/Loop.js.map +1 -1
  302. package/lib/esm/curve/OffsetOptions.js.map +1 -1
  303. package/lib/esm/curve/ParityRegion.js.map +1 -1
  304. package/lib/esm/curve/Path.js.map +1 -1
  305. package/lib/esm/curve/PointString3d.js.map +1 -1
  306. package/lib/esm/curve/ProxyCurve.js.map +1 -1
  307. package/lib/esm/curve/Query/ConsolidateAdjacentPrimitivesContext.js.map +1 -1
  308. package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
  309. package/lib/esm/curve/Query/CylindricalRange.js.map +1 -1
  310. package/lib/esm/curve/Query/InOutTests.js.map +1 -1
  311. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  312. package/lib/esm/curve/Query/StrokeCountChain.js.map +1 -1
  313. package/lib/esm/curve/Query/StrokeCountMap.js.map +1 -1
  314. package/lib/esm/curve/RegionMomentsXY.js.map +1 -1
  315. package/lib/esm/curve/RegionOps.js.map +1 -1
  316. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  317. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  318. package/lib/esm/curve/UnionRegion.js.map +1 -1
  319. package/lib/esm/curve/internalContexts/AppendPlaneIntersectionStrokeHandler.js.map +1 -1
  320. package/lib/esm/curve/internalContexts/ChainCollectorContext.js.map +1 -1
  321. package/lib/esm/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  322. package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  323. package/lib/esm/curve/internalContexts/ClosestPointStrokeHandler.js.map +1 -1
  324. package/lib/esm/curve/internalContexts/CountLinearPartsSearchContext.js.map +1 -1
  325. package/lib/esm/curve/internalContexts/CurveCurveCloseApproachXY.js.map +1 -1
  326. package/lib/esm/curve/internalContexts/CurveCurveIntersectXY.js.map +1 -1
  327. package/lib/esm/curve/internalContexts/CurveCurveIntersectXYZ.js.map +1 -1
  328. package/lib/esm/curve/internalContexts/CurveLengthContext.js.map +1 -1
  329. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -1
  330. package/lib/esm/curve/internalContexts/EllipticalArcApproximationContext.js.map +1 -1
  331. package/lib/esm/curve/internalContexts/GapSearchContext.js.map +1 -1
  332. package/lib/esm/curve/internalContexts/MultiChainCollector.js.map +1 -1
  333. package/lib/esm/curve/internalContexts/NewtonRtoRStrokeHandler.js.map +1 -1
  334. package/lib/esm/curve/internalContexts/PlaneAltitudeRangeContext.js.map +1 -1
  335. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  336. package/lib/esm/curve/internalContexts/SumLengthsContext.js.map +1 -1
  337. package/lib/esm/curve/internalContexts/TransformInPlaceContext.js.map +1 -1
  338. package/lib/esm/curve/spiral/AustralianRailCorpXYEvaluator.js.map +1 -1
  339. package/lib/esm/curve/spiral/ClothoidSeries.js.map +1 -1
  340. package/lib/esm/curve/spiral/CubicEvaluator.js.map +1 -1
  341. package/lib/esm/curve/spiral/CzechSpiralEvaluator.js.map +1 -1
  342. package/lib/esm/curve/spiral/DirectHalfCosineSpiralEvaluator.js.map +1 -1
  343. package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
  344. package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  345. package/lib/esm/curve/spiral/MXCubicAlongArcSpiralEvaluator.js.map +1 -1
  346. package/lib/esm/curve/spiral/NormalizedTransition.js.map +1 -1
  347. package/lib/esm/curve/spiral/PolishCubicSpiralEvaluator.js.map +1 -1
  348. package/lib/esm/curve/spiral/TransitionConditionalProperties.js.map +1 -1
  349. package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
  350. package/lib/esm/curve/spiral/XYCurveEvaluator.js.map +1 -1
  351. package/lib/esm/geometry3d/Angle.js.map +1 -1
  352. package/lib/esm/geometry3d/AngleSweep.js.map +1 -1
  353. package/lib/esm/geometry3d/BarycentricTriangle.js.map +1 -1
  354. package/lib/esm/geometry3d/BilinearPatch.js.map +1 -1
  355. package/lib/esm/geometry3d/CoincidentGeometryOps.js.map +1 -1
  356. package/lib/esm/geometry3d/Ellipsoid.js.map +1 -1
  357. package/lib/esm/geometry3d/FrameBuilder.js.map +1 -1
  358. package/lib/esm/geometry3d/FrustumAnimation.js.map +1 -1
  359. package/lib/esm/geometry3d/GeometryHandler.js.map +1 -1
  360. package/lib/esm/geometry3d/GrowableBlockedArray.js.map +1 -1
  361. package/lib/esm/geometry3d/GrowableFloat64Array.js.map +1 -1
  362. package/lib/esm/geometry3d/GrowableXYArray.js.map +1 -1
  363. package/lib/esm/geometry3d/GrowableXYZArray.js.map +1 -1
  364. package/lib/esm/geometry3d/IndexedCollectionInterval.js.map +1 -1
  365. package/lib/esm/geometry3d/IndexedXYCollection.js.map +1 -1
  366. package/lib/esm/geometry3d/IndexedXYZCollection.js.map +1 -1
  367. package/lib/esm/geometry3d/LongitudeLatitudeAltitude.js.map +1 -1
  368. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  369. package/lib/esm/geometry3d/OrderedRotationAngles.js.map +1 -1
  370. package/lib/esm/geometry3d/Plane3d.js.map +1 -1
  371. package/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js.map +1 -1
  372. package/lib/esm/geometry3d/Plane3dByOriginAndVectors.js.map +1 -1
  373. package/lib/esm/geometry3d/Point2dArrayCarrier.js.map +1 -1
  374. package/lib/esm/geometry3d/Point2dVector2d.js.map +1 -1
  375. package/lib/esm/geometry3d/Point3dArrayCarrier.js.map +1 -1
  376. package/lib/esm/geometry3d/Point3dVector3d.js.map +1 -1
  377. package/lib/esm/geometry3d/PointHelpers.d.ts +3 -3
  378. package/lib/esm/geometry3d/PointHelpers.js +3 -3
  379. package/lib/esm/geometry3d/PointHelpers.js.map +1 -1
  380. package/lib/esm/geometry3d/PointStreaming.js.map +1 -1
  381. package/lib/esm/geometry3d/PolygonOps.js.map +1 -1
  382. package/lib/esm/geometry3d/PolylineCompressionByEdgeOffset.js.map +1 -1
  383. package/lib/esm/geometry3d/PolylineOps.js.map +1 -1
  384. package/lib/esm/geometry3d/Range.js.map +1 -1
  385. package/lib/esm/geometry3d/Ray2d.js.map +1 -1
  386. package/lib/esm/geometry3d/Ray3d.d.ts +2 -2
  387. package/lib/esm/geometry3d/Ray3d.d.ts.map +1 -1
  388. package/lib/esm/geometry3d/Ray3d.js +8 -11
  389. package/lib/esm/geometry3d/Ray3d.js.map +1 -1
  390. package/lib/esm/geometry3d/ReusableObjectCache.js.map +1 -1
  391. package/lib/esm/geometry3d/Segment1d.js.map +1 -1
  392. package/lib/esm/geometry3d/SortablePolygon.js.map +1 -1
  393. package/lib/esm/geometry3d/Transform.js.map +1 -1
  394. package/lib/esm/geometry3d/UVSurfaceOps.js.map +1 -1
  395. package/lib/esm/geometry3d/XYZProps.js.map +1 -1
  396. package/lib/esm/geometry3d/YawPitchRollAngles.js.map +1 -1
  397. package/lib/esm/geometry4d/Map4d.js.map +1 -1
  398. package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
  399. package/lib/esm/geometry4d/MomentData.js.map +1 -1
  400. package/lib/esm/geometry4d/PlaneByOriginAndVectors4d.js.map +1 -1
  401. package/lib/esm/geometry4d/Point4d.js.map +1 -1
  402. package/lib/esm/numerics/BandedSystem.js.map +1 -1
  403. package/lib/esm/numerics/BezierPolynomials.js.map +1 -1
  404. package/lib/esm/numerics/ClusterableArray.js.map +1 -1
  405. package/lib/esm/numerics/Complex.js.map +1 -1
  406. package/lib/esm/numerics/ConvexPolygon2d.js.map +1 -1
  407. package/lib/esm/numerics/Newton.js.map +1 -1
  408. package/lib/esm/numerics/PascalCoefficients.js.map +1 -1
  409. package/lib/esm/numerics/PolarData.js.map +1 -1
  410. package/lib/esm/numerics/Polynomials.js.map +1 -1
  411. package/lib/esm/numerics/Quadrature.js.map +1 -1
  412. package/lib/esm/numerics/Range1dArray.js.map +1 -1
  413. package/lib/esm/numerics/SmallSystem.js.map +1 -1
  414. package/lib/esm/numerics/TriDiagonalSystem.js.map +1 -1
  415. package/lib/esm/numerics/UnionFind.js.map +1 -1
  416. package/lib/esm/numerics/UsageSums.js.map +1 -1
  417. package/lib/esm/polyface/AuxData.js.map +1 -1
  418. package/lib/esm/polyface/BoxTopology.js.map +1 -1
  419. package/lib/esm/polyface/FacetFaceData.js.map +1 -1
  420. package/lib/esm/polyface/FacetLocationDetail.js.map +1 -1
  421. package/lib/esm/polyface/FacetOrientation.js.map +1 -1
  422. package/lib/esm/polyface/GreedyTriangulationBetweenLineStrings.js.map +1 -1
  423. package/lib/esm/polyface/IndexedEdgeMatcher.js.map +1 -1
  424. package/lib/esm/polyface/IndexedPolyfaceVisitor.js.map +1 -1
  425. package/lib/esm/polyface/IndexedPolyfaceWalker.js.map +1 -1
  426. package/lib/esm/polyface/Polyface.js.map +1 -1
  427. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  428. package/lib/esm/polyface/PolyfaceClip.js.map +1 -1
  429. package/lib/esm/polyface/PolyfaceData.js.map +1 -1
  430. package/lib/esm/polyface/PolyfaceQuery.js.map +1 -1
  431. package/lib/esm/polyface/RangeLengthData.js.map +1 -1
  432. package/lib/esm/polyface/RangeTree/LineString3dRangeTreeContext.js.map +1 -1
  433. package/lib/esm/polyface/RangeTree/MinimumValueTester.js.map +1 -1
  434. package/lib/esm/polyface/RangeTree/Point3dArrayRangeTreeContext.js.map +1 -1
  435. package/lib/esm/polyface/RangeTree/PolyfaceRangeTreeContext.js.map +1 -1
  436. package/lib/esm/polyface/RangeTree/RangeTreeNode.js.map +1 -1
  437. package/lib/esm/polyface/RangeTree/RangeTreeSearchHandlers.js.map +1 -1
  438. package/lib/esm/polyface/TaggedNumericData.js.map +1 -1
  439. package/lib/esm/polyface/TriangleCandidate.js.map +1 -1
  440. package/lib/esm/polyface/multiclip/BuildAverageNormalsContext.js.map +1 -1
  441. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSet.js.map +1 -1
  442. package/lib/esm/polyface/multiclip/GriddedRaggedRange2dSetWithOverflow.js.map +1 -1
  443. package/lib/esm/polyface/multiclip/LinearSearchRange2dArray.js.map +1 -1
  444. package/lib/esm/polyface/multiclip/OffsetMeshContext.js.map +1 -1
  445. package/lib/esm/polyface/multiclip/Range2dSearchInterface.js.map +1 -1
  446. package/lib/esm/polyface/multiclip/RangeSearch.js.map +1 -1
  447. package/lib/esm/polyface/multiclip/SweepLineStringToFacetContext.js.map +1 -1
  448. package/lib/esm/polyface/multiclip/XYPointBuckets.js.map +1 -1
  449. package/lib/esm/serialization/BGFBAccessors.js.map +1 -1
  450. package/lib/esm/serialization/BGFBReader.js.map +1 -1
  451. package/lib/esm/serialization/BGFBWriter.js.map +1 -1
  452. package/lib/esm/serialization/BentleyGeometryFlatBuffer.js.map +1 -1
  453. package/lib/esm/serialization/DeepCompare.js.map +1 -1
  454. package/lib/esm/serialization/GeometrySamples.js.map +1 -1
  455. package/lib/esm/serialization/IModelJsonSchema.js.map +1 -1
  456. package/lib/esm/serialization/SerializationHelpers.js.map +1 -1
  457. package/lib/esm/solid/Box.js.map +1 -1
  458. package/lib/esm/solid/Cone.js.map +1 -1
  459. package/lib/esm/solid/LinearSweep.js.map +1 -1
  460. package/lib/esm/solid/RotationalSweep.js.map +1 -1
  461. package/lib/esm/solid/RuledSweep.js.map +1 -1
  462. package/lib/esm/solid/SolidPrimitive.js.map +1 -1
  463. package/lib/esm/solid/Sphere.js.map +1 -1
  464. package/lib/esm/solid/SweepContour.js.map +1 -1
  465. package/lib/esm/solid/TorusPipe.js.map +1 -1
  466. package/lib/esm/topology/ChainMerge.js.map +1 -1
  467. package/lib/esm/topology/Graph.js.map +1 -1
  468. package/lib/esm/topology/HalfEdgeGraphFromIndexedLoopsContext.js.map +1 -1
  469. package/lib/esm/topology/HalfEdgeGraphSearch.js.map +1 -1
  470. package/lib/esm/topology/HalfEdgeGraphSpineContext.js.map +1 -1
  471. package/lib/esm/topology/HalfEdgeGraphValidation.js.map +1 -1
  472. package/lib/esm/topology/HalfEdgeMarkSet.js.map +1 -1
  473. package/lib/esm/topology/HalfEdgeNodeXYZUV.js.map +1 -1
  474. package/lib/esm/topology/HalfEdgePointInGraphSearch.js.map +1 -1
  475. package/lib/esm/topology/HalfEdgePositionDetail.js.map +1 -1
  476. package/lib/esm/topology/HalfEdgePriorityQueue.js.map +1 -1
  477. package/lib/esm/topology/InsertAndRetriangulateContext.js.map +1 -1
  478. package/lib/esm/topology/MaskManager.js.map +1 -1
  479. package/lib/esm/topology/Merging.js.map +1 -1
  480. package/lib/esm/topology/RegularizeFace.js.map +1 -1
  481. package/lib/esm/topology/SignedDataSummary.js.map +1 -1
  482. package/lib/esm/topology/SpaceTriangulation.js.map +1 -1
  483. package/lib/esm/topology/Triangulation.js.map +1 -1
  484. package/lib/esm/topology/XYParitySearchContext.js.map +1 -1
  485. package/package.json +3 -3
@@ -31,83 +31,117 @@ const BSplineCurveOps_1 = require("./BSplineCurveOps");
31
31
  const KnotVector_1 = require("./KnotVector");
32
32
  /**
33
33
  * Base class for BSplineCurve3d and BSplineCurve3dH.
34
- * * A bspline curve consists of a set of knots and a set of poles.
35
- * * The bspline curve is a function of the independent "knot axis" variable
36
- * * The curve "follows" the poles loosely.
37
- * * The is a set of polynomial spans.
34
+ * * A B-spline curve consists of an array of `knots`, an array of `poles`, and a `degree`.
35
+ * * The knot array is a non-decreasing sequence of numbers. It is also called a "knot vector".
36
+ * * The curve is a parametric function whose domain is a sub-range of its knots.
37
+ * * The API sometimes refers to a domain parameter `u` as a "knot", even if `u` is not actually an entry in the
38
+ * knot array.
39
+ * * The curve loosely "follows" the line string formed by the poles, aka the "control polygon".
40
+ * * The curve is a chain of polynomial segments, aka "spans" or "fragments". B-spline theory identifies these as
41
+ * Bezier curves.
38
42
  * * The polynomial spans all have same `degree`.
39
- * * Within each span, the polynomial of that `degree` is controlled by `order = degree + 1` contiguous points called poles.
40
- * * The is a strict relationship between knot and poles counts: `numPoles + order = numKnots + 2'
41
- * * The number of spans is `numSpan = numPoles - degree`
42
- * * For a given `spanIndex`:
43
- * * The `order` poles begin at index `spanIndex`.
44
- * * The `2*order` knots begin as span index
45
- * * The knot interval for this span is from `knot[degree+span-1] to knot[degree+span]`
46
- * * The active part of the knot axis is `knot[degree-1] < knot < knot[degree-1 + numSpan]` i.e. `knot[degree-1] < knot < knot[numPoles]
43
+ * * Each span is controlled by `order = degree + 1` contiguous points in the pole array.
44
+ * * There is a strict relationship between knot and poles counts: `numPoles + order = numKnots + 2'.
45
+ * * The number of spans is `numSpan = numPoles - degree`.
46
+ * * For a span with index `spanIndex`:
47
+ * * The `order` relevant poles begin at pole index `spanIndex`.
48
+ * * The `2*degree` relevant knots begin at knot index `spanIndex`.
49
+ * * The span domain is the knot range `[knot[spanIndex+degree-1], knot[spanIndex+degree]]`.
50
+ * * The curve domain is the knot range `[knot[degree-1], knot[numSpan+degree-1]]`, or equivalently
51
+ * `[knot[degree-1], knot[numPoles-1]]`. The API refers to this domain as the "active knot interval" of the curve.
47
52
  *
48
- * Nearly all bsplines are "clamped ".
49
- * * Clamping make the curve pass through its first and last poles, with tangents directed along the first and last edges of the control polygon.
50
- * * The knots for a clamped bspline have `degree` copies of the lowest knot value and `degree` copies of the highest knot value.
51
- * * For instance, the knot vector `[0,0,0,1,2,3,3,3]
52
- * * can be evaluated from `0<=knot<=3`
53
- * * has 3 spans: 0 to 1, 1 to 2, 2 to 3
53
+ * Nearly all B-spline curves are "clamped".
54
+ * * This means that in the `knots` array, the first `degree` knots are equal, and the last `degree` knots are equal.
55
+ * We say the smallest knot and the largest knot have multiplicity `degree`.
56
+ * * Clamping make the curve pass through its first and last poles, with tangents directed along the first and
57
+ * last edges of the control polygon.
58
+ * * For instance, a cubic B-spline curve with knot vector `[0,0,0,1,2,3,3,3]`
59
+ * * can be evaluated at parameter values in the range `[0, 3]`
60
+ * * has 3 spans, with domains `[0, 1]`, `[1, 2]`, and `[2, 3]`
54
61
  * * has 6 poles
55
62
  * * passes through its first and last poles.
56
- * * `create` methods may allow classic convention that has an extra knot at the beginning and end of the knot vector.
57
- * * The extra knots (first and last) were never referenced by the bspline recurrence relations.
58
- * * When the `create` methods recognize the classic setup (`numPoles + order = numKnots`), the extra knot is not saved with the BSplineCurve3dBase knots.
63
+ * * The `create` methods may allow the classic convention that has an extra knot at the beginning and end of the
64
+ * knot vector.
65
+ * * These two extra knots are not actually needed to define the B-spline curve.
66
+ * * When the `create` methods recognize the classic setup (`numPoles + order = numKnots`), the extra knots are
67
+ * not saved with the BSplineCurve3dBase knots.
59
68
  *
60
- * * The weighted variant has the problem that CurvePrimitive 3d typing does not allow undefined result where Point4d has zero weight.
61
- * * The convention for these is to return 000 in such places.
69
+ * * The weighted variant [[BSplineCurve3dH]] has the problem that `CurvePrimitive` 3D typing does not allow the
70
+ * undefined result where a homogeneous pole has zero weight; the convention in this case is to return 000.
62
71
  *
63
72
  * * Note the class relationships:
64
- * * BSpline1dNd knows the bspline recurrence relations for control points (poles) with no physical meaning.
65
- * * BsplineCurve3dBase owns a protected BSpline1dNd
66
- * * BsplineCurve3dBase is derived from CurvePrimitive, which creates obligation to act as a 3D curve, such as
67
- * * evaluate fraction to point and derivatives wrt fraction
68
- * * compute intersection with plane
69
- * * BSplineCurve3d and BSplineCurve3dH have variant logic driven by whether or not there are "weights" on the poles.
70
- * * For `BSplineCurve3d`, the xyz value of pole calculations are "final" values for 3d evaluation
73
+ * * [[BSpline1dNd]] knows the definitional B-spline recurrence relation with no physical interpretation for the poles.
74
+ * * BsplineCurve3dBase owns a protected BSpline1dNd.
75
+ * * `BsplineCurve3dBase` is derived from [[CurvePrimitive]], which creates obligation to act as a 3D curve, e.g.,
76
+ * * evaluate fraction to point and derivatives wrt fraction.
77
+ * * compute intersection with plane.
78
+ * * [[BSplineCurve3d]] and [[BSplineCurve3dH]] have variant logic driven by whether or not there are "weights" on the poles.
79
+ * * For `BSplineCurve3d`, the xyz value of pole calculations are "final" values for 3d evaluation.
71
80
  * * For `BSplineCurve3dH`, various `BSpline1dNd` results with xyzw have to be normalized back to xyz.
72
81
  *
73
82
  * * These classes do not support "periodic" variants.
74
- * * Periodic curves need to have certain leading knots and poles replicated at the end
83
+ * * Periodic curves historically have carried a flag (e.g., "closed") indicating that certain un-stored
84
+ * leading/trailing knots and poles are understood to wrap around periodically.
85
+ * * Instead, these classes carry no such flag. They represent such curves with explicitly wrapped knots/poles.
86
+ *
87
+ * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/BSpline/
75
88
  * @public
76
89
  */
77
90
  class BSplineCurve3dBase extends CurvePrimitive_1.CurvePrimitive {
78
- /** String name for schema properties */
91
+ /** String name for schema properties. */
79
92
  curvePrimitiveType = "bsplineCurve";
80
- /** The underlying blocked-pole spline, with simple x,y,z poles */
93
+ /** The underlying blocked-pole spline, with simple x,y,z poles. */
81
94
  _bcurve;
82
95
  _definitionData;
83
- set definitionData(data) { this._definitionData = data; }
84
- get definitionData() { return this._definitionData; }
96
+ set definitionData(data) {
97
+ this._definitionData = data;
98
+ }
99
+ get definitionData() {
100
+ return this._definitionData;
101
+ }
85
102
  constructor(poleDimension, numPoles, order, knots) {
86
103
  super();
87
104
  this._bcurve = BSpline1dNd_1.BSpline1dNd.create(numPoles, poleDimension, order, knots);
88
105
  }
89
- /** Return the degree (one less than the order) of the curve */
90
- get degree() { return this._bcurve.degree; }
91
- /** Return the order (one more than degree) of the curve */
92
- get order() { return this._bcurve.order; }
93
- /** Return the number of bezier spans in the curve. Note that this number includes the number of null spans at repeated knows */
94
- get numSpan() { return this._bcurve.numSpan; }
95
- /** Return the number of poles */
96
- get numPoles() { return this._bcurve.numPoles; }
97
- /** Return live reference to the packed control point coordinates of the curve. */
98
- get polesRef() { return this._bcurve.packedData; }
99
- /** Return live reference to the knots of the curve. */
100
- get knotsRef() { return this._bcurve.knots.knots; }
101
- /** Number of components per pole.
102
- * * 3 for conventional (x,y,z) curve
103
- * * 4 for weighted (wx,wy,wz,w) curve
106
+ /** Return the degree (one less than the order) of the curve. */
107
+ get degree() {
108
+ return this._bcurve.degree;
109
+ }
110
+ /** Return the order (one more than degree) of the curve. */
111
+ get order() {
112
+ return this._bcurve.order;
113
+ }
114
+ /**
115
+ * Return the number of Bezier spans in the curve. Note that this number includes the number of null
116
+ * spans at repeated knows.
104
117
  */
105
- get poleDimension() { return this._bcurve.poleLength; }
118
+ get numSpan() {
119
+ return this._bcurve.numSpan;
120
+ }
121
+ /** Return the number of poles. */
122
+ get numPoles() {
123
+ return this._bcurve.numPoles;
124
+ }
125
+ /** Return live reference to the poles of the curve. */
126
+ get polesRef() {
127
+ return this._bcurve.packedData;
128
+ }
129
+ /** Return live reference to the knots of the curve. */
130
+ get knotsRef() {
131
+ return this._bcurve.knots.knots;
132
+ }
106
133
  /**
107
- * return a simple array form of the knots. optionally replicate the first and last
108
- * in classic over-clamped manner
134
+ * Number of components per pole, e.g.,
135
+ * * 3 for conventional (x,y,z) curve.
136
+ * * 4 for weighted (wx,wy,wz,w) curve.
109
137
  */
110
- copyKnots(includeExtraEndKnot) { return this._bcurve.knots.copyKnots(includeExtraEndKnot); }
138
+ get poleDimension() {
139
+ return this._bcurve.poleLength;
140
+ }
141
+ /** Return a simple array form of the knots. Optionally replicate the first and last in classic over-clamped manner. */
142
+ copyKnots(includeExtraEndKnot) {
143
+ return this._bcurve.knots.copyKnots(includeExtraEndKnot);
144
+ }
111
145
  /** Get the flag indicating the curve might be suitable for having wrapped "closed" interpretation. */
112
146
  getWrappable() {
113
147
  return this._bcurve.knots.wrappable;
@@ -117,7 +151,7 @@ class BSplineCurve3dBase extends CurvePrimitive_1.CurvePrimitive {
117
151
  this._bcurve.knots.wrappable = value;
118
152
  }
119
153
  /**
120
- * Test knots and control points to determine if it is possible to close (aka "wrap") the curve.
154
+ * Test knots and poles to determine if it is possible to close (aka "wrap") the curve.
121
155
  * @returns the manner in which it is possible to close the curve. See `BSplineWrapMode` for particulars of each mode.
122
156
  */
123
157
  get isClosableCurve() {
@@ -130,25 +164,18 @@ class BSplineCurve3dBase extends CurvePrimitive_1.CurvePrimitive {
130
164
  return KnotVector_1.BSplineWrapMode.None;
131
165
  return mode;
132
166
  }
133
- /** Evaluate the curve point at `fraction` */
167
+ /** Evaluate the curve point at the given fractional parameter. */
134
168
  fractionToPoint(fraction, result) {
135
169
  return this.knotToPoint(this._bcurve.knots.fractionToKnot(fraction), result);
136
170
  }
137
- /** Construct a ray with
138
- * * origin at the fractional position along the arc
139
- * * direction is the first derivative, i.e. tangent along the curve
140
- */
171
+ /** Evaluate the curve and derivative at the given fractional parameter. */
141
172
  fractionToPointAndDerivative(fraction, result) {
142
173
  const knot = this._bcurve.knots.fractionToKnot(fraction);
143
174
  result = this.knotToPointAndDerivative(knot, result);
144
175
  result.direction.scaleInPlace(this._bcurve.knots.knotLength01);
145
176
  return result;
146
177
  }
147
- /** Construct a plane with
148
- * * origin at the fractional position along the arc
149
- * * x axis is the first derivative, i.e. tangent along the curve
150
- * * y axis is the second derivative
151
- */
178
+ /** Evaluate the curve and two derivatives at the given fractional parameter. */
152
179
  fractionToPointAnd2Derivatives(fraction, result) {
153
180
  const knot = this._bcurve.knots.fractionToKnot(fraction);
154
181
  result = this.knotToPointAnd2Derivatives(knot, result);
@@ -157,22 +184,23 @@ class BSplineCurve3dBase extends CurvePrimitive_1.CurvePrimitive {
157
184
  result.vectorV.scaleInPlace(a * a);
158
185
  return result;
159
186
  }
187
+ /** Return the start point of the curve. */
188
+ startPoint() {
189
+ return this.evaluatePointInSpan(0, 0.0);
190
+ }
191
+ /** Return the end point of the curve. */
192
+ endPoint() {
193
+ return this.evaluatePointInSpan(this.numSpan - 1, 1.0);
194
+ }
160
195
  /**
161
- * Return the start point of the curve.
162
- */
163
- startPoint() { return this.evaluatePointInSpan(0, 0.0); }
164
- /**
165
- * Return the end point of the curve
166
- */
167
- endPoint() { return this.evaluatePointInSpan(this.numSpan - 1, 1.0); }
168
- /** Reverse the curve in place.
169
- * * Poles are reversed
170
- * * knot values are mirrored around the middle of the
171
- */
172
- reverseInPlace() { this._bcurve.reverseInPlace(); }
173
- /**
174
- * Return an array with this curve's bezier fragments.
196
+ * Reverse the curve in place.
197
+ * * Poles are reversed.
198
+ * * Knot values are mirrored around the middle of the knot array.
175
199
  */
200
+ reverseInPlace() {
201
+ this._bcurve.reverseInPlace();
202
+ }
203
+ /** Return an array with this curve's Bezier fragments. */
176
204
  collectBezierSpans(prefer3dH) {
177
205
  const result = [];
178
206
  const numSpans = this.numSpan;
@@ -191,17 +219,18 @@ class BSplineCurve3dBase extends CurvePrimitive_1.CurvePrimitive {
191
219
  return poleIndex * this._bcurve.poleLength;
192
220
  return undefined;
193
221
  }
194
- /** Search for the curve point that is closest to the spacePoint.
195
- *
222
+ /**
223
+ * Search for the curve point that is closest to the spacePoint.
196
224
  * * If the space point is exactly on the curve, this is the reverse of fractionToPoint.
197
- * * Since CurvePrimitive should always have start and end available as candidate points, this method should always succeed
198
- * @param spacePoint point in space
225
+ * * Since CurvePrimitive should always have start and end available as candidate points, this method should always
226
+ * succeed.
227
+ * @param spacePoint point in space.
199
228
  * @param _extend ignored (pass false). A BSplineCurve3dBase cannot be extended.
200
229
  * @param result optional pre-allocated detail to populate and return.
201
230
  * @returns details of the closest point.
202
231
  */
203
232
  closestPoint(spacePoint, _extend, result) {
204
- // seed at start point -- final point comes with final bezier perpendicular step.
233
+ // seed at start point; final point comes with final bezier perpendicular step
205
234
  const point = this.fractionToPoint(0);
206
235
  result = CurveLocationDetail_1.CurveLocationDetail.createCurveFractionPointDistance(this, 0.0, point, point.distance(spacePoint), result);
207
236
  let span;
@@ -210,9 +239,9 @@ class BSplineCurve3dBase extends CurvePrimitive_1.CurvePrimitive {
210
239
  if (this._bcurve.knots.isIndexOfRealSpan(i)) {
211
240
  span = this.getSaturatedBezierSpan3dOr3dH(i, true, span);
212
241
  if (span) {
213
- // umm ... if the bspline is discontinuous, both ends should be tested. Ignore that possibility ...
242
+ // if the B-spline is discontinuous, both ends should be tested; ignore that possibility
214
243
  if (span.updateClosestPointByTruePerpendicular(spacePoint, result, false, true)) {
215
- // the detail records the span bezier -- promote it to the parent curve . ..
244
+ // the detail records the span bezier; promote it to the parent curve
216
245
  result.curve = this;
217
246
  result.fraction = span.fractionToParentFraction(result.fraction);
218
247
  }
@@ -223,13 +252,14 @@ class BSplineCurve3dBase extends CurvePrimitive_1.CurvePrimitive {
223
252
  }
224
253
  /** Return a transformed deep clone. */
225
254
  cloneTransformed(transform) {
226
- const curve1 = this.clone();
227
- curve1.tryTransformInPlace(transform);
228
- return curve1;
255
+ const curve = this.clone();
256
+ curve.tryTransformInPlace(transform);
257
+ return curve;
229
258
  }
230
- /** Return a curve primitive which is a portion of this curve.
231
- * @param fractionA [in] start fraction
232
- * @param fractionB [in] end fraction
259
+ /**
260
+ * Return a curve primitive which is a portion of this curve.
261
+ * @param fractionA start fraction.
262
+ * @param fractionB end fraction.
233
263
  */
234
264
  clonePartialCurve(fractionA, fractionB) {
235
265
  const clone = this.clone();
@@ -240,11 +270,8 @@ class BSplineCurve3dBase extends CurvePrimitive_1.CurvePrimitive {
240
270
  clone._bcurve.addKnot(knotB, clone.degree);
241
271
  if (origNumKnots === clone._bcurve.knots.knots.length)
242
272
  return clone; // full curve
243
- if (knotA > knotB) {
244
- const tmp = knotA;
245
- knotA = knotB;
246
- knotB = tmp;
247
- }
273
+ if (knotA > knotB)
274
+ [knotA, knotB] = [knotB, knotA];
248
275
  // choose first/last knot and pole such that knotA/knotB has degree multiplicity in the new knot sequence
249
276
  const iStartKnot = clone._bcurve.knots.knotToLeftKnotIndex(knotA) - clone.degree + 1;
250
277
  const iStartPole = iStartKnot * clone._bcurve.poleLength;
@@ -254,15 +281,17 @@ class BSplineCurve3dBase extends CurvePrimitive_1.CurvePrimitive {
254
281
  iLastKnotLeftMultiple = iLastKnot + 1;
255
282
  const iEndPole = (iLastKnotLeftMultiple + 1) * clone._bcurve.poleLength; // one past last pole
256
283
  const iEndKnot = iLastKnotLeftMultiple + clone.degree; // one past last knot
257
- // trim the arrays (leave knots unnormalized!)
284
+ // trim the arrays (leave knots unnormalized)
258
285
  clone._bcurve.knots.setKnotsCapture(clone._bcurve.knots.knots.slice(iStartKnot, iEndKnot));
259
286
  clone._bcurve.packedData = clone._bcurve.packedData.slice(iStartPole, iEndPole);
260
287
  clone.setWrappable(KnotVector_1.BSplineWrapMode.None); // always open
261
288
  return clone;
262
289
  }
263
- /** Implement `CurvePrimitive.appendPlaneIntersections`
264
- * @param plane A plane (e.g. specific type Plane3dByOriginAndUnitNormal or Point4d)
265
- * @param result growing array of plane intersections
290
+ /**
291
+ * Implement `CurvePrimitive.appendPlaneIntersections` to compute intersections of the curve with a plane.
292
+ * @param plane the plane with which to intersect the curve. Concrete types include [[Plane3dByOriginAndUnitNormal]],
293
+ * [[Point4d]], etc.
294
+ * @param result growing array of plane intersections.
266
295
  * @return number of intersections appended to the array.
267
296
  */
268
297
  appendPlaneIntersectionPoints(plane, result) {
@@ -273,34 +302,32 @@ class BSplineCurve3dBase extends CurvePrimitive_1.CurvePrimitive {
273
302
  const point4d = Point4d_1.Point4d.create();
274
303
  // compute all pole altitudes from the plane
275
304
  const minMax = Range_1.Range1d.createNull();
276
- // Put the altitudes of all the bspline poles in one array.
305
+ // put the altitudes of all the B-spline poles in one array
277
306
  for (let i = 0; i < numPole; i++) {
278
307
  allCoffs[i] = plane.weightedAltitude(this.getPolePoint4d(i, point4d));
279
308
  minMax.extendX(allCoffs[i]);
280
309
  }
281
- // A univariate bspline through the altitude poles gives altitude as function of the bspline knot.
310
+ // A univariate B-spline through the altitude poles gives altitude as function of the B-spline knot.
282
311
  // The (bspline) altitude function for each span is `order` consecutive altitudes.
283
312
  // If those altitudes bracket zero, the span may potentially have a crossing.
284
- // When that occurs,
285
313
  let univariateBezier;
286
314
  let numFound = 0;
287
315
  let previousFraction = -1000.0;
288
316
  if (minMax.containsX(0.0)) {
289
317
  for (let spanIndex = 0; spanIndex < numSpan; spanIndex++) {
290
- if (this._bcurve.knots.isIndexOfRealSpan(spanIndex)) { // ignore trivial knot intervals.
318
+ if (this._bcurve.knots.isIndexOfRealSpan(spanIndex)) { // ignore trivial knot intervals
291
319
  // outer range test ...
292
320
  minMax.setNull();
293
321
  minMax.extendArraySubset(allCoffs, spanIndex, order);
294
322
  if (minMax.containsX(0.0)) {
295
- // pack the bspline support into a univariate bezier ...
323
+ // pack the B-spline support into a univariate bezier
296
324
  univariateBezier = BezierPolynomials_1.UnivariateBezier.createArraySubset(allCoffs, spanIndex, order, univariateBezier);
297
325
  // saturate and solve the bezier
298
326
  Bezier1dNd_1.Bezier1dNd.saturate1dInPlace(univariateBezier.coffs, this._bcurve.knots, spanIndex);
299
327
  const roots = univariateBezier.roots(0.0, true);
300
328
  if (roots) {
301
329
  for (const spanFraction of roots) {
302
- // promote each local bezier fraction to global fraction.
303
- // save the curve evaluation at that fraction.
330
+ // promote each local bezier fraction to global fraction and save the curve evaluation at that fraction
304
331
  numFound++;
305
332
  const fraction = this._bcurve.knots.spanFractionToFraction(spanIndex, spanFraction);
306
333
  if (!Geometry_1.Geometry.isAlmostEqualNumber(fraction, previousFraction)) {
@@ -319,9 +346,7 @@ class BSplineCurve3dBase extends CurvePrimitive_1.CurvePrimitive {
319
346
  }
320
347
  /**
321
348
  * Construct an offset of the instance curve as viewed in the xy-plane (ignoring z).
322
- * * No attempt is made to join the offsets of smaller constituent primitives. To construct a fully joined offset
323
- * for an aggregate instance (e.g., LineString3d, CurveChainWithDistanceIndex), use RegionOps.constructCurveXYOffset() instead.
324
- * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object
349
+ * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object.
325
350
  */
326
351
  constructOffsetXY(offsetDistanceOrOptions) {
327
352
  const options = OffsetOptions_1.OffsetOptions.create(offsetDistanceOrOptions);
@@ -329,10 +354,13 @@ class BSplineCurve3dBase extends CurvePrimitive_1.CurvePrimitive {
329
354
  this.emitStrokableParts(handler, options.strokeOptions);
330
355
  return handler.claimResult();
331
356
  }
332
- /** Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters of projection.
357
+ /**
358
+ * Project instance geometry (via dispatch) onto the given ray, and return the extreme fractional parameters
359
+ * of projection.
333
360
  * @param ray ray onto which the instance is projected. A `Vector3d` is treated as a `Ray3d` with zero origin.
334
- * @param lowHigh optional receiver for output
335
- * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the end of the ray.
361
+ * @param lowHigh optional receiver for output.
362
+ * @returns range of fractional projection parameters onto the ray, where 0.0 is start of the ray and 1.0 is the
363
+ * end of the ray.
336
364
  */
337
365
  projectedParameterRange(ray, lowHigh) {
338
366
  return PlaneAltitudeRangeContext_1.PlaneAltitudeRangeContext.findExtremeFractionsAlongDirection(this, ray, lowHigh);
@@ -340,8 +368,8 @@ class BSplineCurve3dBase extends CurvePrimitive_1.CurvePrimitive {
340
368
  }
341
369
  exports.BSplineCurve3dBase = BSplineCurve3dBase;
342
370
  /**
343
- * A BSplineCurve3d is a bspline curve whose poles are Point3d.
344
- * See BSplineCurve3dBase for description of knots, order, degree.
371
+ * A BSplineCurve3d is a B-spline curve whose poles are Point3d.
372
+ * See BSplineCurve3dBase for description of knots, order, degree, and poles.
345
373
  * @public
346
374
  */
347
375
  class BSplineCurve3d extends BSplineCurve3dBase {
@@ -351,11 +379,19 @@ class BSplineCurve3d extends BSplineCurve3dBase {
351
379
  this._workBezier = BezierCurve3d_1.BezierCurve3d.createOrder(this.order);
352
380
  return this._workBezier;
353
381
  }
354
- /** test of `other` is an instance of BSplineCurve3d */
355
- isSameGeometryClass(other) { return other instanceof BSplineCurve3d; }
382
+ constructor(numPoles, order, knots) {
383
+ super(3, numPoles, order, knots);
384
+ }
385
+ /** Test if `other` is an instance of BSplineCurve3d. */
386
+ isSameGeometryClass(other) {
387
+ return other instanceof BSplineCurve3d;
388
+ }
356
389
  /** Apply `transform` to the poles. */
357
- tryTransformInPlace(transform) { PointHelpers_1.Point3dArray.multiplyInPlace(transform, this._bcurve.packedData); return true; }
358
- /** Get a pole as simple Point3d. */
390
+ tryTransformInPlace(transform) {
391
+ PointHelpers_1.Point3dArray.multiplyInPlace(transform, this._bcurve.packedData);
392
+ return true;
393
+ }
394
+ /** Get a pole as a simple Point3d. */
359
395
  getPolePoint3d(poleIndex, result) {
360
396
  const k = this.poleIndexToDataIndex(poleIndex);
361
397
  if (k !== undefined) {
@@ -364,7 +400,7 @@ class BSplineCurve3d extends BSplineCurve3dBase {
364
400
  }
365
401
  return undefined;
366
402
  }
367
- /** Get a pole as Point4d with weight 1 */
403
+ /** Get a pole as Point4d with weight 1. */
368
404
  getPolePoint4d(poleIndex, result) {
369
405
  const k = this.poleIndexToDataIndex(poleIndex);
370
406
  if (k !== undefined) {
@@ -373,23 +409,26 @@ class BSplineCurve3d extends BSplineCurve3dBase {
373
409
  }
374
410
  return undefined;
375
411
  }
376
- /** Convert `spanIndex` and `localFraction` to a knot. */
377
- spanFractionToKnot(span, localFraction) {
378
- return this._bcurve.spanFractionToKnot(span, localFraction);
379
- }
380
- constructor(numPoles, order, knots) {
381
- super(3, numPoles, order, knots);
382
- }
383
- /** Return a simple array of arrays with the control points as `[[x,y,z],[x,y,z],..]` */
384
- copyPoints() { return PointHelpers_1.Point3dArray.unpackNumbersToNestedArrays(this._bcurve.packedData, 3); }
385
- /** Return a simple array of the control points coordinates */
386
- copyPointsFloat64Array() { return this._bcurve.packedData.slice(); }
387
412
  /**
388
- * return a simple array form of the knots. optionally replicate the first and last
389
- * in classic over-clamped manner
413
+ * Convert the fractional position in the given span to a knot.
414
+ * * The returned value is not necessarily a knot, but it is a valid parameter in the domain of the B-spline curve.
390
415
  */
391
- copyKnots(includeExtraEndKnot) { return this._bcurve.knots.copyKnots(includeExtraEndKnot); }
392
- /** Create a bspline with uniform knots. */
416
+ spanFractionToKnot(spanIndex, spanFraction) {
417
+ return this._bcurve.spanFractionToKnot(spanIndex, spanFraction);
418
+ }
419
+ /** Return a simple array of arrays with the poles as `[[x,y,z],[x,y,z],..]`. */
420
+ copyPoints() {
421
+ return PointHelpers_1.Point3dArray.unpackNumbersToNestedArrays(this._bcurve.packedData, 3);
422
+ }
423
+ /** Return a simple array of poles' coordinates. */
424
+ copyPointsFloat64Array() {
425
+ return this._bcurve.packedData.slice();
426
+ }
427
+ /** Return a simple array form of the knots. Optionally replicate the first and last in classic over-clamped manner. */
428
+ copyKnots(includeExtraEndKnot) {
429
+ return this._bcurve.knots.copyKnots(includeExtraEndKnot);
430
+ }
431
+ /** Create a B-spline with uniform knots. */
393
432
  static createUniformKnots(poles, order) {
394
433
  const numPoles = poles instanceof Float64Array ? poles.length / 3 : poles.length;
395
434
  if (order < 2 || numPoles < order)
@@ -413,9 +452,10 @@ class BSplineCurve3d extends BSplineCurve3dBase {
413
452
  }
414
453
  return curve;
415
454
  }
416
- /** Create a smoothly closed B-spline curve with uniform knots.
417
- * Note that the curve does not start at the first pole!
418
- */
455
+ /**
456
+ * Create a smoothly closed B-spline curve with uniform knots.
457
+ * * Note that the curve does not start at the first pole.
458
+ */
419
459
  static createPeriodicUniformKnots(poles, order) {
420
460
  if (order < 2)
421
461
  return undefined;
@@ -486,21 +526,23 @@ class BSplineCurve3d extends BSplineCurve3dBase {
486
526
  return BSplineCurveOps_1.BSplineCurveOps.createThroughPointsC2Cubic(options);
487
527
  }
488
528
  /**
489
- *
529
+ * Create a B-spline curve from an Akima curve.
490
530
  * @param options collection of points and end conditions.
491
531
  */
492
532
  static createFromAkimaCurve3dOptions(options) {
493
533
  return BSplineCurveOps_1.BSplineCurveOps.createThroughPoints(options.fitPoints, 4); // temporary
494
534
  }
495
535
  /**
496
- * Create a bspline with given knots.
536
+ * Create a B-spline curve with given knots.
497
537
  * * The poles have several variants:
498
- * * Float64Array(3 * numPoles) in blocks of [x,y,z]
499
- * * Point3d[]
500
- * * number[][], with inner dimension 3
538
+ * * Float64Array(3 * numPoles) in blocks of [x,y,z].
539
+ * * Point3d[].
540
+ * * number[][], with inner dimension 3.
501
541
  * * Two count conditions are recognized:
502
- * * If poleArray.length + order === knotArray.length, the first and last are assumed to be the extraneous knots of classic clamping.
542
+ * * If poleArray.length + order === knotArray.length, the first and last are assumed to be the extraneous knots
543
+ * of classic clamping.
503
544
  * * If poleArray.length + order === knotArray.length + 2, the knots are in modern form.
545
+ * * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/BSpline/
504
546
  */
505
547
  static create(poleArray, knotArray, order) {
506
548
  if (order < 2)
@@ -538,31 +580,42 @@ class BSplineCurve3d extends BSplineCurve3dBase {
538
580
  }
539
581
  return curve;
540
582
  }
541
- /** Return a deep clone */
583
+ /** Return a deep clone. */
542
584
  clone() {
543
- const knotVector1 = this._bcurve.knots.clone();
544
- const curve1 = new BSplineCurve3d(this.numPoles, this.order, knotVector1);
545
- curve1._bcurve.packedData = this._bcurve.packedData.slice();
546
- return curve1;
585
+ const knotVector = this._bcurve.knots.clone();
586
+ const curve = new BSplineCurve3d(this.numPoles, this.order, knotVector);
587
+ curve._bcurve.packedData = this._bcurve.packedData.slice();
588
+ return curve;
547
589
  }
548
- /** Evaluate at a position given by fractional position within a span. */
590
+ /** Evaluate the curve at a fractional position within a given span. */
549
591
  evaluatePointInSpan(spanIndex, spanFraction) {
550
592
  this._bcurve.evaluateBuffersInSpan(spanIndex, spanFraction);
551
593
  return Point3dVector3d_1.Point3d.createFrom(this._bcurve.poleBuffer);
552
594
  }
553
- /** Evaluate point and derivative vector at a position given by fractional position within a span.
554
- * * The derivative is with respect to the span fraction (NOT scaled to either global fraction or knot)
595
+ /**
596
+ * Evaluate the curve and derivative at a fractional position within a given span.
597
+ * * The derivative is with respect to the span fractional parameter, _not_ to the curve's parameter or fractional parameter.
555
598
  */
556
599
  evaluatePointAndDerivativeInSpan(spanIndex, spanFraction) {
557
600
  this._bcurve.evaluateBuffersInSpan1(spanIndex, spanFraction);
558
601
  return Ray3d_1.Ray3d.createCapture(Point3dVector3d_1.Point3d.createFrom(this._bcurve.poleBuffer), Point3dVector3d_1.Vector3d.createFrom(this._bcurve.poleBuffer1));
559
602
  }
560
- /** Evaluate at a position given by a knot value. */
603
+ /**
604
+ * Evaluate the curve at the given parameter.
605
+ * @param u parameter in curve domain.
606
+ * @param result optional result.
607
+ * @returns the point on the curve.
608
+ */
561
609
  knotToPoint(u, result) {
562
610
  this._bcurve.evaluateBuffersAtKnot(u);
563
611
  return Point3dVector3d_1.Point3d.createFrom(this._bcurve.poleBuffer, result);
564
612
  }
565
- /** Evaluate at a position given by a knot value. */
613
+ /**
614
+ * Evaluate the curve and derivative at the given parameter.
615
+ * @param u parameter in curve domain.
616
+ * @param result optional result.
617
+ * @returns the ray with origin at the curve point and direction as the derivative.
618
+ */
566
619
  knotToPointAndDerivative(u, result) {
567
620
  this._bcurve.evaluateBuffersAtKnot(u, 1);
568
621
  if (!result)
@@ -571,12 +624,17 @@ class BSplineCurve3d extends BSplineCurve3dBase {
571
624
  result.direction.setFrom(this._bcurve.poleBuffer1);
572
625
  return result;
573
626
  }
574
- /** Evaluate at a position given by a knot value. Return point with 2 derivatives. */
627
+ /**
628
+ * Evaluate the curve and two derivatives at the given parameter.
629
+ * @param u parameter in the curve domain.
630
+ * @param result optional result.
631
+ * @returns the plane with origin at the curve point, vectorU as the 1st derivative, and vectorV as the 2nd derivative.
632
+ */
575
633
  knotToPointAnd2Derivatives(u, result) {
576
634
  this._bcurve.evaluateBuffersAtKnot(u, 2);
577
635
  return Plane3dByOriginAndVectors_1.Plane3dByOriginAndVectors.createOriginAndVectorsXYZ(this._bcurve.poleBuffer[0], this._bcurve.poleBuffer[1], this._bcurve.poleBuffer[2], this._bcurve.poleBuffer1[0], this._bcurve.poleBuffer1[1], this._bcurve.poleBuffer1[2], this._bcurve.poleBuffer2[0], this._bcurve.poleBuffer2[1], this._bcurve.poleBuffer2[2], result);
578
636
  }
579
- /** test if almost the same curve as `other` */
637
+ /** Test if `this` is almost the same curve as `other`. */
580
638
  isAlmostEqual(other) {
581
639
  if (other instanceof BSplineCurve3d) {
582
640
  return this._bcurve.knots.isAlmostEqual(other._bcurve.knots)
@@ -584,15 +642,19 @@ class BSplineCurve3d extends BSplineCurve3dBase {
584
642
  }
585
643
  return false;
586
644
  }
587
- /** test if this curve is entirely within plane. */
645
+ /** Test if this curve lies entirely in the given plane. */
588
646
  isInPlane(plane) {
589
647
  return PointHelpers_1.Point3dArray.isCloseToPlane(this._bcurve.packedData, plane);
590
648
  }
591
- /** Return the control polygon length as approximation (always overestimate) of the curve length. */
592
- quickLength() { return PointHelpers_1.Point3dArray.sumEdgeLengths(this._bcurve.packedData); }
593
- /** Emit beziers or strokes (selected by the stroke options) to the handler. */
649
+ /**
650
+ * Return the control polygon length as an approximation to the curve length.
651
+ * * The returned length is always an overestimate.
652
+ */
653
+ quickLength() {
654
+ return PointHelpers_1.Point3dArray.sumEdgeLengths(this._bcurve.packedData);
655
+ }
656
+ /** Emit Beziers or strokes (selected by the stroke options) to the handler. */
594
657
  emitStrokableParts(handler, options) {
595
- const needBeziers = handler.announceBezierCurve !== undefined;
596
658
  const workBezier = this.initializeWorkBezier();
597
659
  const numSpan = this.numSpan;
598
660
  let numStrokes;
@@ -600,7 +662,7 @@ class BSplineCurve3d extends BSplineCurve3dBase {
600
662
  const bezier = this.getSaturatedBezierSpan3dOr3dH(spanIndex, false, workBezier);
601
663
  if (bezier) {
602
664
  numStrokes = bezier.computeStrokeCountForOptions(options);
603
- if (needBeziers) {
665
+ if (handler.announceBezierCurve) {
604
666
  handler.announceBezierCurve(bezier, numStrokes, this, spanIndex, this._bcurve.knots.spanFractionToFraction(spanIndex, 0.0), this._bcurve.knots.spanFractionToFraction(spanIndex, 1.0));
605
667
  }
606
668
  else {
@@ -625,7 +687,7 @@ class BSplineCurve3d extends BSplineCurve3dBase {
625
687
  return numStroke;
626
688
  }
627
689
  /**
628
- * Compute individual segment stroke counts. Attach in a StrokeCountMap.
690
+ * Compute individual segment stroke counts. Attach in a StrokeCountMap.
629
691
  * @param options StrokeOptions that determine count
630
692
  * @param parentStrokeMap evolving parent map.
631
693
  * @alpha
@@ -644,7 +706,7 @@ class BSplineCurve3d extends BSplineCurve3dBase {
644
706
  }
645
707
  CurvePrimitive_1.CurvePrimitive.installStrokeCountMap(this, myData, parentStrokeMap);
646
708
  }
647
- /** Append strokes to a linestring. */
709
+ /** Append strokes to the given linestring. */
648
710
  emitStrokes(dest, options) {
649
711
  const workBezier = this.initializeWorkBezier();
650
712
  const numSpan = this.numSpan;
@@ -655,16 +717,17 @@ class BSplineCurve3d extends BSplineCurve3dBase {
655
717
  }
656
718
  }
657
719
  /**
658
- * Test knots and control points to determine if it is possible to close (aka "wrap") the curve.
720
+ * Test knots and poles to determine if it is possible to close (aka "wrap") the curve.
659
721
  * @returns the manner in which it is possible to close the curve. See `BSplineWrapMode` for particulars of each mode.
660
722
  */
661
723
  get isClosable() {
662
724
  return this.isClosableCurve;
663
725
  }
664
726
  /**
665
- * Return a BezierCurveBase for this curve. The concrete return type may be BezierCurve3d or BezierCurve3dH according to this type.
666
- * @param spanIndex
667
- * @param result optional reusable curve. This will only be reused if it is a BezierCurve3d with matching order.
727
+ * Return the Bezier fragment corresponding to the given span of this curve.
728
+ * * The concrete return type may be [[BezierCurve3d]] or [[BezierCurve3dH]] according to the instance type and `prefer3dH`.
729
+ * @param spanIndex index of span.
730
+ * @param result optional reusable curve. This will only be reused if its type and order matches.
668
731
  */
669
732
  getSaturatedBezierSpan3dOr3dH(spanIndex, prefer3dH, result) {
670
733
  if (prefer3dH)
@@ -672,9 +735,9 @@ class BSplineCurve3d extends BSplineCurve3dBase {
672
735
  return this.getSaturatedBezierSpan3d(spanIndex, result);
673
736
  }
674
737
  /**
675
- * Return a CurvePrimitive (which is a BezierCurve3d) for a specified span of this curve.
676
- * @param spanIndex
677
- * @param result optional reusable curve. This will only be reused if it is a BezierCurve3d with matching order.
738
+ * Return the Bezier fragment corresponding to the given span of this curve.
739
+ * @param spanIndex index of span.
740
+ * @param result optional reusable curve. This will only be reused if its type and order matches.
678
741
  */
679
742
  getSaturatedBezierSpan3d(spanIndex, result) {
680
743
  if (spanIndex < 0 || spanIndex >= this.numSpan)
@@ -685,13 +748,13 @@ class BSplineCurve3d extends BSplineCurve3dBase {
685
748
  const bezier = result;
686
749
  bezier.loadSpanPoles(this._bcurve.packedData, spanIndex);
687
750
  if (bezier.saturateInPlace(this._bcurve.knots, spanIndex))
688
- return result;
751
+ return bezier;
689
752
  return undefined;
690
753
  }
691
754
  /**
692
- * Return a CurvePrimitive (which is a BezierCurve3dH) for a specified span of this curve.
693
- * @param spanIndex
694
- * @param result optional reusable curve. This will only be reused if it is a BezierCurve3d with matching order.
755
+ * Return the Bezier fragment corresponding to the given span of this curve.
756
+ * @param spanIndex index of span.
757
+ * @param result optional reusable curve. This will only be reused if its type and order matches.
695
758
  */
696
759
  getSaturatedBezierSpan3dH(spanIndex, result) {
697
760
  if (spanIndex < 0 || spanIndex >= this.numSpan)
@@ -705,15 +768,16 @@ class BSplineCurve3d extends BSplineCurve3dBase {
705
768
  return bezier;
706
769
  return undefined;
707
770
  }
708
- /** Second step of double dispatch: call `handler.handleBSplineCurve3d(this)` */
771
+ /** Second step of double dispatch: call `handler.handleBSplineCurve3d(this)`. */
709
772
  dispatchToGeometryHandler(handler) {
710
773
  return handler.handleBSplineCurve3d(this);
711
774
  }
712
775
  /**
713
- * Extend a range so in includes the range of this curve
714
- * * REMARK: this is based on the poles, not the exact curve. This is generally larger than the true curve range.
715
- * @param rangeToExtend
716
- * @param transform transform to apply to points as they are entered into the range.
776
+ * Extend a range so it contains the range of this curve.
777
+ * * This computation is based on the poles, not the curve itself, so the returned range is generally larger than the
778
+ * tightest possible range.
779
+ * @param rangeToExtend range to extend.
780
+ * @param transform transform to apply to the poles as they are entered into the range.
717
781
  */
718
782
  extendRange(rangeToExtend, transform) {
719
783
  const buffer = this._bcurve.packedData;