@itwin/core-geometry 3.1.0-dev.8 → 3.2.0-dev.3

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 (280) hide show
  1. package/CHANGELOG.md +43 -3
  2. package/lib/cjs/bspline/AkimaCurve3d.d.ts +2 -8
  3. package/lib/cjs/bspline/AkimaCurve3d.d.ts.map +1 -1
  4. package/lib/cjs/bspline/AkimaCurve3d.js +2 -17
  5. package/lib/cjs/bspline/AkimaCurve3d.js.map +1 -1
  6. package/lib/cjs/bspline/BSpline1dNd.d.ts +11 -6
  7. package/lib/cjs/bspline/BSpline1dNd.d.ts.map +1 -1
  8. package/lib/cjs/bspline/BSpline1dNd.js +64 -6
  9. package/lib/cjs/bspline/BSpline1dNd.js.map +1 -1
  10. package/lib/cjs/bspline/BSplineCurve.d.ts +17 -13
  11. package/lib/cjs/bspline/BSplineCurve.d.ts.map +1 -1
  12. package/lib/cjs/bspline/BSplineCurve.js +53 -31
  13. package/lib/cjs/bspline/BSplineCurve.js.map +1 -1
  14. package/lib/cjs/bspline/BSplineCurve3dH.d.ts +0 -2
  15. package/lib/cjs/bspline/BSplineCurve3dH.d.ts.map +1 -1
  16. package/lib/cjs/bspline/BSplineCurve3dH.js +0 -6
  17. package/lib/cjs/bspline/BSplineCurve3dH.js.map +1 -1
  18. package/lib/cjs/bspline/BSplineCurveOps.d.ts.map +1 -1
  19. package/lib/cjs/bspline/BSplineCurveOps.js +4 -6
  20. package/lib/cjs/bspline/BSplineCurveOps.js.map +1 -1
  21. package/lib/cjs/bspline/Bezier1dNd.d.ts +8 -11
  22. package/lib/cjs/bspline/Bezier1dNd.d.ts.map +1 -1
  23. package/lib/cjs/bspline/Bezier1dNd.js +13 -14
  24. package/lib/cjs/bspline/Bezier1dNd.js.map +1 -1
  25. package/lib/cjs/bspline/BezierCurve3d.d.ts +0 -6
  26. package/lib/cjs/bspline/BezierCurve3d.d.ts.map +1 -1
  27. package/lib/cjs/bspline/BezierCurve3d.js +0 -14
  28. package/lib/cjs/bspline/BezierCurve3d.js.map +1 -1
  29. package/lib/cjs/bspline/BezierCurve3dH.d.ts +0 -4
  30. package/lib/cjs/bspline/BezierCurve3dH.d.ts.map +1 -1
  31. package/lib/cjs/bspline/BezierCurve3dH.js +0 -8
  32. package/lib/cjs/bspline/BezierCurve3dH.js.map +1 -1
  33. package/lib/cjs/bspline/BezierCurveBase.d.ts +17 -0
  34. package/lib/cjs/bspline/BezierCurveBase.d.ts.map +1 -1
  35. package/lib/cjs/bspline/BezierCurveBase.js +31 -1
  36. package/lib/cjs/bspline/BezierCurveBase.js.map +1 -1
  37. package/lib/cjs/bspline/InterpolationCurve3d.d.ts +2 -8
  38. package/lib/cjs/bspline/InterpolationCurve3d.d.ts.map +1 -1
  39. package/lib/cjs/bspline/InterpolationCurve3d.js +2 -17
  40. package/lib/cjs/bspline/InterpolationCurve3d.js.map +1 -1
  41. package/lib/cjs/bspline/KnotVector.d.ts +24 -9
  42. package/lib/cjs/bspline/KnotVector.d.ts.map +1 -1
  43. package/lib/cjs/bspline/KnotVector.js +86 -26
  44. package/lib/cjs/bspline/KnotVector.js.map +1 -1
  45. package/lib/cjs/curve/Arc3d.d.ts +7 -1
  46. package/lib/cjs/curve/Arc3d.d.ts.map +1 -1
  47. package/lib/cjs/curve/Arc3d.js +31 -0
  48. package/lib/cjs/curve/Arc3d.js.map +1 -1
  49. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts +11 -4
  50. package/lib/cjs/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
  51. package/lib/cjs/curve/CurveChainWithDistanceIndex.js +25 -9
  52. package/lib/cjs/curve/CurveChainWithDistanceIndex.js.map +1 -1
  53. package/lib/cjs/curve/CurveCollection.d.ts +2 -2
  54. package/lib/cjs/curve/CurveCollection.d.ts.map +1 -1
  55. package/lib/cjs/curve/CurveCollection.js.map +1 -1
  56. package/lib/cjs/curve/CurveCurveIntersectXY.d.ts.map +1 -1
  57. package/lib/cjs/curve/CurveCurveIntersectXY.js +5 -3
  58. package/lib/cjs/curve/CurveCurveIntersectXY.js.map +1 -1
  59. package/lib/cjs/curve/CurveFactory.d.ts +7 -3
  60. package/lib/cjs/curve/CurveFactory.d.ts.map +1 -1
  61. package/lib/cjs/curve/CurveFactory.js +30 -15
  62. package/lib/cjs/curve/CurveFactory.js.map +1 -1
  63. package/lib/cjs/curve/CurvePrimitive.d.ts +27 -9
  64. package/lib/cjs/curve/CurvePrimitive.d.ts.map +1 -1
  65. package/lib/cjs/curve/CurvePrimitive.js +18 -0
  66. package/lib/cjs/curve/CurvePrimitive.js.map +1 -1
  67. package/lib/cjs/curve/LineSegment3d.d.ts +7 -1
  68. package/lib/cjs/curve/LineSegment3d.d.ts.map +1 -1
  69. package/lib/cjs/curve/LineSegment3d.js +14 -0
  70. package/lib/cjs/curve/LineSegment3d.js.map +1 -1
  71. package/lib/cjs/curve/LineString3d.d.ts +8 -1
  72. package/lib/cjs/curve/LineString3d.d.ts.map +1 -1
  73. package/lib/cjs/curve/LineString3d.js +20 -0
  74. package/lib/cjs/curve/LineString3d.js.map +1 -1
  75. package/lib/cjs/curve/ProxyCurve.d.ts +12 -4
  76. package/lib/cjs/curve/ProxyCurve.d.ts.map +1 -1
  77. package/lib/cjs/curve/ProxyCurve.js +16 -2
  78. package/lib/cjs/curve/ProxyCurve.js.map +1 -1
  79. package/lib/cjs/curve/Query/CurveSplitContext.d.ts.map +1 -1
  80. package/lib/cjs/curve/Query/CurveSplitContext.js +1 -3
  81. package/lib/cjs/curve/Query/CurveSplitContext.js.map +1 -1
  82. package/lib/cjs/curve/Query/PlanarSubdivision.d.ts +11 -0
  83. package/lib/cjs/curve/Query/PlanarSubdivision.d.ts.map +1 -1
  84. package/lib/cjs/curve/Query/PlanarSubdivision.js +26 -17
  85. package/lib/cjs/curve/Query/PlanarSubdivision.js.map +1 -1
  86. package/lib/cjs/curve/RegionOps.d.ts +15 -16
  87. package/lib/cjs/curve/RegionOps.d.ts.map +1 -1
  88. package/lib/cjs/curve/RegionOps.js +14 -16
  89. package/lib/cjs/curve/RegionOps.js.map +1 -1
  90. package/lib/cjs/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
  91. package/lib/cjs/curve/RegionOpsClassificationSweeps.js +3 -1
  92. package/lib/cjs/curve/RegionOpsClassificationSweeps.js.map +1 -1
  93. package/lib/cjs/curve/StrokeOptions.d.ts +6 -0
  94. package/lib/cjs/curve/StrokeOptions.d.ts.map +1 -1
  95. package/lib/cjs/curve/StrokeOptions.js +21 -0
  96. package/lib/cjs/curve/StrokeOptions.js.map +1 -1
  97. package/lib/cjs/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  98. package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.d.ts +2 -2
  99. package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.d.ts.map +1 -1
  100. package/lib/cjs/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  101. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.d.ts +36 -0
  102. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.d.ts.map +1 -0
  103. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js +73 -0
  104. package/lib/cjs/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -0
  105. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts +48 -24
  106. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
  107. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js +113 -112
  108. package/lib/cjs/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  109. package/lib/cjs/curve/spiral/DirectSpiral3d.d.ts +0 -4
  110. package/lib/cjs/curve/spiral/DirectSpiral3d.d.ts.map +1 -1
  111. package/lib/cjs/curve/spiral/DirectSpiral3d.js +0 -15
  112. package/lib/cjs/curve/spiral/DirectSpiral3d.js.map +1 -1
  113. package/lib/cjs/curve/spiral/IntegratedSpiral3d.d.ts +0 -4
  114. package/lib/cjs/curve/spiral/IntegratedSpiral3d.d.ts.map +1 -1
  115. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js +33 -22
  116. package/lib/cjs/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  117. package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts +16 -0
  118. package/lib/cjs/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
  119. package/lib/cjs/curve/spiral/TransitionSpiral3d.js +29 -0
  120. package/lib/cjs/curve/spiral/TransitionSpiral3d.js.map +1 -1
  121. package/lib/cjs/geometry3d/Matrix3d.d.ts +4 -4
  122. package/lib/cjs/geometry3d/Matrix3d.js +4 -4
  123. package/lib/cjs/geometry3d/Matrix3d.js.map +1 -1
  124. package/lib/cjs/geometry4d/Matrix4d.d.ts.map +1 -1
  125. package/lib/cjs/geometry4d/Matrix4d.js +21 -8
  126. package/lib/cjs/geometry4d/Matrix4d.js.map +1 -1
  127. package/lib/cjs/numerics/ClusterableArray.d.ts +1 -1
  128. package/lib/cjs/numerics/ClusterableArray.d.ts.map +1 -1
  129. package/lib/cjs/numerics/ClusterableArray.js +2 -2
  130. package/lib/cjs/numerics/ClusterableArray.js.map +1 -1
  131. package/lib/cjs/polyface/PolyfaceBuilder.d.ts +15 -1
  132. package/lib/cjs/polyface/PolyfaceBuilder.d.ts.map +1 -1
  133. package/lib/cjs/polyface/PolyfaceBuilder.js +17 -11
  134. package/lib/cjs/polyface/PolyfaceBuilder.js.map +1 -1
  135. package/lib/cjs/solid/RuledSweep.js.map +1 -1
  136. package/lib/cjs/solid/SweepContour.js.map +1 -1
  137. package/lib/cjs/topology/Merging.d.ts +22 -3
  138. package/lib/cjs/topology/Merging.d.ts.map +1 -1
  139. package/lib/cjs/topology/Merging.js +97 -1
  140. package/lib/cjs/topology/Merging.js.map +1 -1
  141. package/lib/esm/bspline/AkimaCurve3d.d.ts +2 -8
  142. package/lib/esm/bspline/AkimaCurve3d.d.ts.map +1 -1
  143. package/lib/esm/bspline/AkimaCurve3d.js +2 -17
  144. package/lib/esm/bspline/AkimaCurve3d.js.map +1 -1
  145. package/lib/esm/bspline/BSpline1dNd.d.ts +11 -6
  146. package/lib/esm/bspline/BSpline1dNd.d.ts.map +1 -1
  147. package/lib/esm/bspline/BSpline1dNd.js +65 -7
  148. package/lib/esm/bspline/BSpline1dNd.js.map +1 -1
  149. package/lib/esm/bspline/BSplineCurve.d.ts +17 -13
  150. package/lib/esm/bspline/BSplineCurve.d.ts.map +1 -1
  151. package/lib/esm/bspline/BSplineCurve.js +53 -31
  152. package/lib/esm/bspline/BSplineCurve.js.map +1 -1
  153. package/lib/esm/bspline/BSplineCurve3dH.d.ts +0 -2
  154. package/lib/esm/bspline/BSplineCurve3dH.d.ts.map +1 -1
  155. package/lib/esm/bspline/BSplineCurve3dH.js +0 -6
  156. package/lib/esm/bspline/BSplineCurve3dH.js.map +1 -1
  157. package/lib/esm/bspline/BSplineCurveOps.d.ts.map +1 -1
  158. package/lib/esm/bspline/BSplineCurveOps.js +4 -6
  159. package/lib/esm/bspline/BSplineCurveOps.js.map +1 -1
  160. package/lib/esm/bspline/Bezier1dNd.d.ts +8 -11
  161. package/lib/esm/bspline/Bezier1dNd.d.ts.map +1 -1
  162. package/lib/esm/bspline/Bezier1dNd.js +13 -14
  163. package/lib/esm/bspline/Bezier1dNd.js.map +1 -1
  164. package/lib/esm/bspline/BezierCurve3d.d.ts +0 -6
  165. package/lib/esm/bspline/BezierCurve3d.d.ts.map +1 -1
  166. package/lib/esm/bspline/BezierCurve3d.js +0 -14
  167. package/lib/esm/bspline/BezierCurve3d.js.map +1 -1
  168. package/lib/esm/bspline/BezierCurve3dH.d.ts +0 -4
  169. package/lib/esm/bspline/BezierCurve3dH.d.ts.map +1 -1
  170. package/lib/esm/bspline/BezierCurve3dH.js +0 -8
  171. package/lib/esm/bspline/BezierCurve3dH.js.map +1 -1
  172. package/lib/esm/bspline/BezierCurveBase.d.ts +17 -0
  173. package/lib/esm/bspline/BezierCurveBase.d.ts.map +1 -1
  174. package/lib/esm/bspline/BezierCurveBase.js +31 -1
  175. package/lib/esm/bspline/BezierCurveBase.js.map +1 -1
  176. package/lib/esm/bspline/InterpolationCurve3d.d.ts +2 -8
  177. package/lib/esm/bspline/InterpolationCurve3d.d.ts.map +1 -1
  178. package/lib/esm/bspline/InterpolationCurve3d.js +2 -17
  179. package/lib/esm/bspline/InterpolationCurve3d.js.map +1 -1
  180. package/lib/esm/bspline/KnotVector.d.ts +24 -9
  181. package/lib/esm/bspline/KnotVector.d.ts.map +1 -1
  182. package/lib/esm/bspline/KnotVector.js +86 -26
  183. package/lib/esm/bspline/KnotVector.js.map +1 -1
  184. package/lib/esm/curve/Arc3d.d.ts +7 -1
  185. package/lib/esm/curve/Arc3d.d.ts.map +1 -1
  186. package/lib/esm/curve/Arc3d.js +31 -0
  187. package/lib/esm/curve/Arc3d.js.map +1 -1
  188. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts +11 -4
  189. package/lib/esm/curve/CurveChainWithDistanceIndex.d.ts.map +1 -1
  190. package/lib/esm/curve/CurveChainWithDistanceIndex.js +25 -9
  191. package/lib/esm/curve/CurveChainWithDistanceIndex.js.map +1 -1
  192. package/lib/esm/curve/CurveCollection.d.ts +2 -2
  193. package/lib/esm/curve/CurveCollection.d.ts.map +1 -1
  194. package/lib/esm/curve/CurveCollection.js.map +1 -1
  195. package/lib/esm/curve/CurveCurveIntersectXY.d.ts.map +1 -1
  196. package/lib/esm/curve/CurveCurveIntersectXY.js +5 -3
  197. package/lib/esm/curve/CurveCurveIntersectXY.js.map +1 -1
  198. package/lib/esm/curve/CurveFactory.d.ts +7 -3
  199. package/lib/esm/curve/CurveFactory.d.ts.map +1 -1
  200. package/lib/esm/curve/CurveFactory.js +30 -15
  201. package/lib/esm/curve/CurveFactory.js.map +1 -1
  202. package/lib/esm/curve/CurvePrimitive.d.ts +27 -9
  203. package/lib/esm/curve/CurvePrimitive.d.ts.map +1 -1
  204. package/lib/esm/curve/CurvePrimitive.js +18 -0
  205. package/lib/esm/curve/CurvePrimitive.js.map +1 -1
  206. package/lib/esm/curve/LineSegment3d.d.ts +7 -1
  207. package/lib/esm/curve/LineSegment3d.d.ts.map +1 -1
  208. package/lib/esm/curve/LineSegment3d.js +15 -1
  209. package/lib/esm/curve/LineSegment3d.js.map +1 -1
  210. package/lib/esm/curve/LineString3d.d.ts +8 -1
  211. package/lib/esm/curve/LineString3d.d.ts.map +1 -1
  212. package/lib/esm/curve/LineString3d.js +20 -0
  213. package/lib/esm/curve/LineString3d.js.map +1 -1
  214. package/lib/esm/curve/ProxyCurve.d.ts +12 -4
  215. package/lib/esm/curve/ProxyCurve.d.ts.map +1 -1
  216. package/lib/esm/curve/ProxyCurve.js +16 -2
  217. package/lib/esm/curve/ProxyCurve.js.map +1 -1
  218. package/lib/esm/curve/Query/CurveSplitContext.d.ts.map +1 -1
  219. package/lib/esm/curve/Query/CurveSplitContext.js +1 -3
  220. package/lib/esm/curve/Query/CurveSplitContext.js.map +1 -1
  221. package/lib/esm/curve/Query/PlanarSubdivision.d.ts +11 -0
  222. package/lib/esm/curve/Query/PlanarSubdivision.d.ts.map +1 -1
  223. package/lib/esm/curve/Query/PlanarSubdivision.js +26 -17
  224. package/lib/esm/curve/Query/PlanarSubdivision.js.map +1 -1
  225. package/lib/esm/curve/RegionOps.d.ts +15 -16
  226. package/lib/esm/curve/RegionOps.d.ts.map +1 -1
  227. package/lib/esm/curve/RegionOps.js +15 -17
  228. package/lib/esm/curve/RegionOps.js.map +1 -1
  229. package/lib/esm/curve/RegionOpsClassificationSweeps.d.ts.map +1 -1
  230. package/lib/esm/curve/RegionOpsClassificationSweeps.js +3 -1
  231. package/lib/esm/curve/RegionOpsClassificationSweeps.js.map +1 -1
  232. package/lib/esm/curve/StrokeOptions.d.ts +6 -0
  233. package/lib/esm/curve/StrokeOptions.d.ts.map +1 -1
  234. package/lib/esm/curve/StrokeOptions.js +21 -0
  235. package/lib/esm/curve/StrokeOptions.js.map +1 -1
  236. package/lib/esm/curve/internalContexts/CloneCurvesContext.js.map +1 -1
  237. package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.d.ts +2 -2
  238. package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.d.ts.map +1 -1
  239. package/lib/esm/curve/internalContexts/CloneWithExpandedLineStrings.js.map +1 -1
  240. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.d.ts +36 -0
  241. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.d.ts.map +1 -0
  242. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js +69 -0
  243. package/lib/esm/curve/internalContexts/CurveOffsetXYHandler.js.map +1 -0
  244. package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts +48 -24
  245. package/lib/esm/curve/internalContexts/PolygonOffsetContext.d.ts.map +1 -1
  246. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js +111 -111
  247. package/lib/esm/curve/internalContexts/PolygonOffsetContext.js.map +1 -1
  248. package/lib/esm/curve/spiral/DirectSpiral3d.d.ts +0 -4
  249. package/lib/esm/curve/spiral/DirectSpiral3d.d.ts.map +1 -1
  250. package/lib/esm/curve/spiral/DirectSpiral3d.js +0 -15
  251. package/lib/esm/curve/spiral/DirectSpiral3d.js.map +1 -1
  252. package/lib/esm/curve/spiral/IntegratedSpiral3d.d.ts +0 -4
  253. package/lib/esm/curve/spiral/IntegratedSpiral3d.d.ts.map +1 -1
  254. package/lib/esm/curve/spiral/IntegratedSpiral3d.js +33 -22
  255. package/lib/esm/curve/spiral/IntegratedSpiral3d.js.map +1 -1
  256. package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts +16 -0
  257. package/lib/esm/curve/spiral/TransitionSpiral3d.d.ts.map +1 -1
  258. package/lib/esm/curve/spiral/TransitionSpiral3d.js +29 -0
  259. package/lib/esm/curve/spiral/TransitionSpiral3d.js.map +1 -1
  260. package/lib/esm/geometry3d/Matrix3d.d.ts +4 -4
  261. package/lib/esm/geometry3d/Matrix3d.js +4 -4
  262. package/lib/esm/geometry3d/Matrix3d.js.map +1 -1
  263. package/lib/esm/geometry4d/Matrix4d.d.ts.map +1 -1
  264. package/lib/esm/geometry4d/Matrix4d.js +21 -8
  265. package/lib/esm/geometry4d/Matrix4d.js.map +1 -1
  266. package/lib/esm/numerics/ClusterableArray.d.ts +1 -1
  267. package/lib/esm/numerics/ClusterableArray.d.ts.map +1 -1
  268. package/lib/esm/numerics/ClusterableArray.js +2 -2
  269. package/lib/esm/numerics/ClusterableArray.js.map +1 -1
  270. package/lib/esm/polyface/PolyfaceBuilder.d.ts +15 -1
  271. package/lib/esm/polyface/PolyfaceBuilder.d.ts.map +1 -1
  272. package/lib/esm/polyface/PolyfaceBuilder.js +17 -11
  273. package/lib/esm/polyface/PolyfaceBuilder.js.map +1 -1
  274. package/lib/esm/solid/RuledSweep.js.map +1 -1
  275. package/lib/esm/solid/SweepContour.js.map +1 -1
  276. package/lib/esm/topology/Merging.d.ts +22 -3
  277. package/lib/esm/topology/Merging.d.ts.map +1 -1
  278. package/lib/esm/topology/Merging.js +95 -0
  279. package/lib/esm/topology/Merging.js.map +1 -1
  280. package/package.json +7 -5
package/CHANGELOG.md CHANGED
@@ -1,6 +1,46 @@
1
1
  # Change Log - @itwin/core-geometry
2
2
 
3
- This log was last generated on Wed, 12 Jan 2022 14:52:38 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 24 Feb 2022 15:26:55 GMT and should not be manually modified.
4
+
5
+ ## 3.0.1
6
+ Thu, 24 Feb 2022 15:26:55 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 3.0.0
11
+ Mon, 24 Jan 2022 14:00:52 GMT
12
+
13
+ ### Updates
14
+
15
+ - Add clonePartialCurve for spirals. Proper length computation for partial spirals.
16
+ - Create interpolation curve for through points construction.
17
+ - InterpolationCurve3d support
18
+ - add HalfEdgeGraphOps.expandConvexFaces
19
+ - Add curve tests to increase coverage
20
+ - add periodic B-spline curve ctor
21
+ - Upgrade target to ES2019 and deliver both a CommonJs and ESModule version of package
22
+ - Fix bug in polygon booleans when inputs are disjoint
23
+ - In wire offset, improve handling of arcs offset beyond their center
24
+ - When a UnionOfConvexClipPlaneSets clips a polyface, aggressively stitch shards.
25
+ - Produce triangles (instead of quads) (when requested) in AddUVGridBody.
26
+ - Documentation file for ClipPlane structures
27
+ - When building planes for a ClipShape, pre-filter the shape edges to remove danglers that violate triangulation requirements
28
+ - Correct problems with all-convex mask clips
29
+ - ClipUtilities.createComplementaryClips -- method to create a UnionOfConvexClipPlaneSets which covers the space outside of a ConvexClipPlaneSet
30
+ - Correct implementation of "mask" ClipPrimitive
31
+ - Implement appendPolygonClip in deep boolean trees.
32
+ - When building index for CurveChainWithDistanceIndex, refer to primary primitives rather than to stroked pieces.
33
+ - Various code coverage. Fix infinitie loop in "out of graph" case in InsertAndRetriangulateContext
34
+ - Fix poor accuracy of closestPoint for BSplineCurve3dH and Integrated Spirals
35
+ - Tests of area analysis for road section project. Shared-edge annotation from constructAllXYRegions
36
+ - Fix plane constructions on xy clipper from polyline offset
37
+ - Apply tolerance when determining if ClipShape polygon is closed.
38
+ - rename to @itwin/core-geometry
39
+ - remove ClientRequestContext and its subclasses
40
+ - Switching to consume new Projects-Client
41
+ - Renamed an iModel's parent container to iTwin
42
+ - Moved Point3d.interpolatePointAndTangent to Ray3d.interpolatePointAndTangent.
43
+ - Support for TypeDoc v0.22.7. Fix various broken docs links.
4
44
 
5
45
  ## 2.19.28
6
46
  Wed, 12 Jan 2022 14:52:38 GMT
@@ -759,7 +799,7 @@ Fri, 22 Nov 2019 14:03:34 GMT
759
799
 
760
800
  ### Updates
761
801
 
762
- - PolyfaceQuery services: PolyfaceQuery.markAllEdgeVisibility PolyfaceQuery.markPairedEdgesInvisible PolyfaceQuery.setSingleEdgeVisibility PolyfaceQuery.computeFacetUnitNormal
802
+ - PolyfaceQuery services: PolyfaceQuery.markAllEdgeVisibility PolyfaceQuery.markPairedEdgesInvisible PolyfaceQuery.setSingleEdgeVisibility PolyfaceQuery.computeFacetUnitNormal
763
803
  - Correct sectioning of meshes with (a) nonconvex facets and (b) multicomponent plane intersections
764
804
  - Intersect Ray with Sphere
765
805
  - Spherical patch range; optional result in range3d.corners()
@@ -890,7 +930,7 @@ Mon, 13 May 2019 15:52:05 GMT
890
930
  - Triangulation bug (multiple holes not linked correctly)
891
931
  - Fix broken links
892
932
  - Put sourcemap in npm package.
893
- - Setup a generic context for tracking client requests, and made various related enhancements to logging, usage tracking and authorization.
933
+ - Setup a generic context for tracking client requests, and made various related enhancements to logging, usage tracking and authorization.
894
934
  - New code for regularizing a single face.
895
935
  - Upgrade TypeDoc dependency to 0.14.2
896
936
 
@@ -82,14 +82,8 @@ export declare class AkimaCurve3d extends ProxyCurve {
82
82
  * Transform this [[AkimaCurve3d]] and its defining data in place
83
83
  */
84
84
  tryTransformInPlace(transform: Transform): boolean;
85
- /**
86
- * Return a transformed clone.
87
- */
88
- cloneTransformed(transform: Transform): GeometryQuery | undefined;
89
- /**
90
- * Return a clone.
91
- */
92
- clone(): GeometryQuery | undefined;
85
+ /** Return a deep clone */
86
+ clone(): AkimaCurve3d;
93
87
  /** Test if `other` is also an [[AkimaCurve3d]] */
94
88
  isSameGeometryClass(other: GeometryQuery): boolean;
95
89
  isAlmostEqual(other: GeometryQuery): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"AkimaCurve3d.d.ts","sourceRoot":"","sources":["../../../src/bspline/AkimaCurve3d.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAGxD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGjD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAw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,YAAY,GAAG,SAAS;WAUlF,aAAa,CAAC,OAAO,EAAE,mBAAmB,GAAG,YAAY,GAAG,SAAS;IAOnF,uEAAuE;IAChE,yBAAyB,IAAI,YAAY;IAIhD;;;OAGG;IACI,MAAM,IAAI,GAAG;IAGpB,2EAA2E;IACpE,UAAU,IAAI,iBAAiB;IAItC;;;OAGG;IACI,cAAc,IAAI,IAAI;IAI7B;;OAEG;IACI,mBAAmB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO;IAQzD,0BAA0B;IACV,KAAK,IAAI,YAAY;IAIrC,kDAAkD;IAC3C,mBAAmB,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO;IAEzC,aAAa,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO;CAM7D"}
@@ -131,24 +131,9 @@ class AkimaCurve3d extends ProxyCurve_1.ProxyCurve {
131
131
  }
132
132
  return proxyOk;
133
133
  }
134
- /**
135
- * Return a transformed clone.
136
- */
137
- cloneTransformed(transform) {
138
- const myClone = this.clone();
139
- if (myClone && (myClone === null || myClone === void 0 ? void 0 : myClone.tryTransformInPlace(transform)))
140
- return myClone;
141
- return undefined;
142
- }
143
- /**
144
- * Return a clone.
145
- */
134
+ /** Return a deep clone */
146
135
  clone() {
147
- const proxyClone = this._proxyCurve.clone();
148
- if (proxyClone) {
149
- return new AkimaCurve3d(this._options.clone(), proxyClone);
150
- }
151
- return undefined;
136
+ return new AkimaCurve3d(this._options.clone(), this._proxyCurve.clone());
152
137
  }
153
138
  /** Test if `other` is also an [[AkimaCurve3d]] */
154
139
  isSameGeometryClass(other) { return other instanceof AkimaCurve3d; }
@@ -1 +1 @@
1
- {"version":3,"file":"AkimaCurve3d.js","sourceRoot":"","sources":["../../../src/bspline/AkimaCurve3d.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,0CAAuC;AACvC,6DAA0D;AAC1D,oDAAiD;AAEjD,iDAAgD;AAgBhD;;;;;GAKG;AACH,MAAa,mBAAm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,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QAChE,IAAI,OAAO,EAAE;YACX,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;SACzD;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IACD;;OAEG;IACI,gBAAgB,CAAC,SAAoB;QAC1C,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;QAC7B,IAAI,OAAO,KAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,mBAAmB,CAAC,SAAS,CAAC,CAAA;YACpD,OAAO,OAAO,CAAC;QACjB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD;;OAEG;IACI,KAAK;QACV,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;QAC5C,IAAI,UAAU,EAAE;YACd,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAG,EAAE,UAA4B,CAAC,CAAC;SAC/E;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACH,kDAAkD;IACzC,mBAAmB,CAAC,KAAoB,IAAa,OAAO,KAAK,YAAY,YAAY,CAAC,CAAC,CAAC;IAEnF,aAAa,CAAC,KAAoB;QAChD,IAAI,KAAK,YAAY,YAAY,EAAE;YACjC,OAAO,mBAAmB,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;SAC1E;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AAlGD,oCAkGC","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 Bspline\r\n */\r\n\r\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { Geometry } from \"../Geometry\";\r\nimport { Point3dArray } from \"../geometry3d/PointHelpers\";\r\nimport { ProxyCurve } from \"../curve/ProxyCurve\";\r\nimport { CurvePrimitive } from \"../curve/CurvePrimitive\";\r\nimport { BSplineCurve3d } from \"./BSplineCurve\";\r\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\r\nimport { XYZProps } from \"../geometry3d/XYZProps\";\r\n\r\n/**\r\n * fitPoints [[AkimaCurve3d]]\r\n * * This is a \"json compatible\" version of the serializer-friendly [[AkimaCurve3dOptions]]\r\n * @public\r\n */\r\n export interface AkimaCurve3dProps {\r\n /** Points that the curve must pass through */\r\n fitPoints: XYZProps[];\r\n}\r\n\r\n/**\r\n * fitPoints and end condition data for [[AkimaCurve3d]]\r\n * * This is a \"typed object\" version of the serializer-friendly [[AkimaCurve3dProps]]\r\n * * Typical use cases rarely require all parameters, so the constructor does not itemize them as parameters.\r\n * @public\r\n */\r\nexport class AkimaCurve3dOptions {\r\n public fitPoints: Point3d[];\r\n /**\r\n *\r\n * @param fitPoints points to CAPTURE\r\n * @param knots array to CAPTURE\r\n */\r\n public constructor(fitPoints?: Point3d[]) {\r\n this.fitPoints = fitPoints ? fitPoints : [];\r\n }\r\n\r\n /** Points that the curve must pass through.\r\n * First and last 2 points are \"beyond the end\" for control of end slope.\r\n fitPoints: Point3d[];\r\n\r\n/** Clone with strongly typed members reduced to simple json. */\r\n public cloneAsAkimaCurve3dProps(): AkimaCurve3dProps {\r\n const props = {\r\n fitPoints: Point3dArray.cloneDeepJSONNumberArrays(this.fitPoints),\r\n };\r\n return props;\r\n }\r\n/** Clone with strongly typed members reduced to simple json. */\r\n public clone(): AkimaCurve3dOptions {\r\n const clone = new AkimaCurve3dOptions(Point3dArray.clonePoint3dArray(this.fitPoints));\r\n return clone;\r\n }\r\n\r\n/** Clone with strongly typed members reduced to simple json. */\r\npublic static create(source: AkimaCurve3dProps): AkimaCurve3dOptions {\r\n const result = new AkimaCurve3dOptions(Point3dArray.clonePoint3dArray(source.fitPoints));\r\n return result;\r\n}\r\n\r\n public static areAlmostEqual(dataA: AkimaCurve3dOptions | undefined, dataB: AkimaCurve3dOptions | undefined): boolean {\r\n if (dataA === undefined && dataB === undefined)\r\n return true;\r\n if (dataA !== undefined && dataB !== undefined) {\r\n return Geometry.almostEqualArrays(dataA.fitPoints, dataB.fitPoints, (a: Point3d, b: Point3d) => a.isAlmostEqual(b));\r\n }\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * Interpolating curve.\r\n * * Derive from [[ProxyCurve]]\r\n * * Use a [[BSplineCurve3d]] as the proxy\r\n * *\r\n * @public\r\n */\r\nexport class AkimaCurve3d extends ProxyCurve {\r\n public readonly curvePrimitiveType = \"interpolationCurve\";\r\n private _options: AkimaCurve3dOptions;\r\n /**\r\n * CAPTURE properties and proxy curve.\r\n */\r\nprivate constructor(properties: AkimaCurve3dOptions, proxyCurve: CurvePrimitive) {\r\n super(proxyCurve);\r\n this._options = properties;\r\n }\r\n public override dispatchToGeometryHandler(handler: GeometryHandler) {\r\n return handler.handleAkimaCurve3d(this);\r\n }\r\n/**\r\n * Create an [[AkimaCurve3d]] based on points, knots, and other properties in the [[AkimaCurve3dProps]] or [[AkimaCurve3dOptions]].\r\n * * This saves a COPY OF the options or props.\r\n * * Use createCapture () if the options or props can be used without copy\r\n */\r\n public static create(options: AkimaCurve3dOptions | AkimaCurve3dProps): AkimaCurve3d | undefined {\r\n let optionsCopy;\r\n if (options instanceof AkimaCurve3dOptions) {\r\n optionsCopy = options.clone();\r\n } else {\r\n optionsCopy = AkimaCurve3dOptions.create(options);\r\n }\r\n return AkimaCurve3d.createCapture(optionsCopy);\r\n }\r\n\r\n public static createCapture(options: AkimaCurve3dOptions): AkimaCurve3d | undefined{\r\n const proxyCurve = BSplineCurve3d.createFromAkimaCurve3dOptions(options);\r\n if (proxyCurve)\r\n return new AkimaCurve3d(options, proxyCurve);\r\n return undefined;\r\n }\r\n\r\n /** Return a (copy of) the defining points, packed as a Float64Array */\r\n public copyFitPointsFloat64Array(): Float64Array {\r\n return Point3dArray.cloneXYZPropsAsFloat64Array(this._options.fitPoints);\r\n }\r\n\r\n /**\r\n * Return json key-value pairs for for this [[AkimaCurve3d]].\r\n * @returns\r\n */\r\n public toJSON(): any {\r\n return this._options.cloneAsAkimaCurve3dProps();\r\n }\r\n /** Clone the [[AkimaCurve3dProps]] object in this [[AkimaCurve3dProps]] */\r\n public cloneProps(): AkimaCurve3dProps {\r\n return this._options.cloneAsAkimaCurve3dProps();\r\n }\r\n\r\n /**\r\n * Reverse the curve direction.\r\n * * This updates both the defining properties and the proxy bspline.\r\n */\r\n public reverseInPlace(): void {\r\n this._proxyCurve.reverseInPlace();\r\n this._options.fitPoints.reverse();\r\n }\r\n /**\r\n * Transform this [[AkimaCurve3d]] and its defining data in place\r\n */\r\n public tryTransformInPlace(transform: Transform): boolean {\r\n const proxyOk = this._proxyCurve.tryTransformInPlace(transform);\r\n if (proxyOk) {\r\n transform.multiplyPoint3dArray(this._options.fitPoints);\r\n }\r\n return proxyOk;\r\n }\r\n /**\r\n * Return a transformed clone.\r\n */\r\n public cloneTransformed(transform: Transform): GeometryQuery | undefined {\r\n const myClone = this.clone();\r\n if (myClone && myClone?.tryTransformInPlace(transform))\r\n return myClone;\r\n return undefined;\r\n }\r\n /**\r\n * Return a clone.\r\n */\r\n public clone(): GeometryQuery | undefined {\r\n const proxyClone = this._proxyCurve.clone();\r\n if (proxyClone) {\r\n return new AkimaCurve3d(this._options.clone (), proxyClone as CurvePrimitive);\r\n }\r\n return undefined;\r\n }\r\n/** Test if `other` is also an [[AkimaCurve3d]] */\r\n public isSameGeometryClass(other: GeometryQuery): boolean { return other instanceof AkimaCurve3d; }\r\n\r\n public override isAlmostEqual(other: GeometryQuery): boolean{\r\n if (other instanceof AkimaCurve3d) {\r\n return AkimaCurve3dOptions.areAlmostEqual(this._options, other._options);\r\n }\r\n return false;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"AkimaCurve3d.js","sourceRoot":"","sources":["../../../src/bspline/AkimaCurve3d.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,0CAAuC;AACvC,6DAA0D;AAC1D,oDAAiD;AAEjD,iDAAgD;AAgBhD;;;;;GAKG;AACH,MAAa,mBAAmB;IAE9B;;;;OAIG;IACH,YAAmB,SAAqB;QACtC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/C,CAAC;IAEF;;;;mEAI+D;IACvD,wBAAwB;QAC7B,MAAM,KAAK,GAAG;YACZ,SAAS,EAAE,2BAAY,CAAC,yBAAyB,CAAC,IAAI,CAAC,SAAS,CAAC;SAClE,CAAC;QACF,OAAO,KAAK,CAAC;IACf,CAAC;IACH,gEAAgE;IACvD,KAAK;QACV,MAAM,KAAK,GAAG,IAAI,mBAAmB,CAAC,2BAAY,CAAC,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;QACtF,OAAO,KAAK,CAAC;IACf,CAAC;IAEH,gEAAgE;IACzD,MAAM,CAAC,MAAM,CAAC,MAAyB;QAC5C,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,2BAAY,CAAC,iBAAiB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;QACzF,OAAO,MAAM,CAAC;IAChB,CAAC;IAEQ,MAAM,CAAC,cAAc,CAAC,KAAsC,EAAE,KAAsC;QACzG,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS;YAC5C,OAAO,IAAI,CAAC;QACd,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,EAAE;YAC5C,OAAO,mBAAQ,CAAC,iBAAiB,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC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E,UAAU;QACf,OAAO,IAAI,CAAC,QAAQ,CAAC,wBAAwB,EAAE,CAAC;IAClD,CAAC;IAED;;;OAGG;IACI,cAAc;QACnB,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC;QAClC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;IACpC,CAAC;IACD;;OAEG;IACI,mBAAmB,CAAC,SAAoB;QAC7C,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;QAChE,IAAI,OAAO,EAAE;YACX,SAAS,CAAC,oBAAoB,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;SACzD;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,0BAA0B;IACV,KAAK;QACnB,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED,kDAAkD;IAC3C,mBAAmB,CAAC,KAAoB,IAAa,OAAO,KAAK,YAAY,YAAY,CAAC,CAAC,CAAC;IAEnF,aAAa,CAAC,KAAoB;QAChD,IAAI,KAAK,YAAY,YAAY,EAAE;YACjC,OAAO,mBAAmB,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;SAC1E;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AArFD,oCAqFC","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 Bspline\r\n */\r\n\r\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { Geometry } from \"../Geometry\";\r\nimport { Point3dArray } from \"../geometry3d/PointHelpers\";\r\nimport { ProxyCurve } from \"../curve/ProxyCurve\";\r\nimport { CurvePrimitive } from \"../curve/CurvePrimitive\";\r\nimport { BSplineCurve3d } from \"./BSplineCurve\";\r\nimport { GeometryQuery } from \"../curve/GeometryQuery\";\r\nimport { Transform } from \"../geometry3d/Transform\";\r\nimport { GeometryHandler } from \"../geometry3d/GeometryHandler\";\r\nimport { XYZProps } from \"../geometry3d/XYZProps\";\r\n\r\n/**\r\n * fitPoints [[AkimaCurve3d]]\r\n * * This is a \"json compatible\" version of the serializer-friendly [[AkimaCurve3dOptions]]\r\n * @public\r\n */\r\n export interface AkimaCurve3dProps {\r\n /** Points that the curve must pass through */\r\n fitPoints: XYZProps[];\r\n}\r\n\r\n/**\r\n * fitPoints and end condition data for [[AkimaCurve3d]]\r\n * * This is a \"typed object\" version of the serializer-friendly [[AkimaCurve3dProps]]\r\n * * Typical use cases rarely require all parameters, so the constructor does not itemize them as parameters.\r\n * @public\r\n */\r\nexport class AkimaCurve3dOptions {\r\n public fitPoints: Point3d[];\r\n /**\r\n *\r\n * @param fitPoints points to CAPTURE\r\n * @param knots array to CAPTURE\r\n */\r\n public constructor(fitPoints?: Point3d[]) {\r\n this.fitPoints = fitPoints ? fitPoints : [];\r\n }\r\n\r\n /** Points that the curve must pass through.\r\n * First and last 2 points are \"beyond the end\" for control of end slope.\r\n fitPoints: Point3d[];\r\n\r\n/** Clone with strongly typed members reduced to simple json. */\r\n public cloneAsAkimaCurve3dProps(): AkimaCurve3dProps {\r\n const props = {\r\n fitPoints: Point3dArray.cloneDeepJSONNumberArrays(this.fitPoints),\r\n };\r\n return props;\r\n }\r\n/** Clone with strongly typed members reduced to simple json. */\r\n public clone(): AkimaCurve3dOptions {\r\n const clone = new AkimaCurve3dOptions(Point3dArray.clonePoint3dArray(this.fitPoints));\r\n return clone;\r\n }\r\n\r\n/** Clone with strongly typed members reduced to simple json. */\r\npublic static create(source: AkimaCurve3dProps): AkimaCurve3dOptions {\r\n const result = new AkimaCurve3dOptions(Point3dArray.clonePoint3dArray(source.fitPoints));\r\n return result;\r\n}\r\n\r\n public static areAlmostEqual(dataA: AkimaCurve3dOptions | undefined, dataB: AkimaCurve3dOptions | undefined): boolean {\r\n if (dataA === undefined && dataB === undefined)\r\n return true;\r\n if (dataA !== undefined && dataB !== undefined) {\r\n return Geometry.almostEqualArrays(dataA.fitPoints, dataB.fitPoints, (a: Point3d, b: Point3d) => a.isAlmostEqual(b));\r\n }\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * Interpolating curve.\r\n * * Derive from [[ProxyCurve]]\r\n * * Use a [[BSplineCurve3d]] as the proxy\r\n * *\r\n * @public\r\n */\r\nexport class AkimaCurve3d extends ProxyCurve {\r\n public readonly curvePrimitiveType = \"interpolationCurve\";\r\n private _options: AkimaCurve3dOptions;\r\n /**\r\n * CAPTURE properties and proxy curve.\r\n */\r\nprivate constructor(properties: AkimaCurve3dOptions, proxyCurve: CurvePrimitive) {\r\n super(proxyCurve);\r\n this._options = properties;\r\n }\r\n public override dispatchToGeometryHandler(handler: GeometryHandler) {\r\n return handler.handleAkimaCurve3d(this);\r\n }\r\n/**\r\n * Create an [[AkimaCurve3d]] based on points, knots, and other properties in the [[AkimaCurve3dProps]] or [[AkimaCurve3dOptions]].\r\n * * This saves a COPY OF the options or props.\r\n * * Use createCapture () if the options or props can be used without copy\r\n */\r\n public static create(options: AkimaCurve3dOptions | AkimaCurve3dProps): AkimaCurve3d | undefined {\r\n let optionsCopy;\r\n if (options instanceof AkimaCurve3dOptions) {\r\n optionsCopy = options.clone();\r\n } else {\r\n optionsCopy = AkimaCurve3dOptions.create(options);\r\n }\r\n return AkimaCurve3d.createCapture(optionsCopy);\r\n }\r\n\r\n public static createCapture(options: AkimaCurve3dOptions): AkimaCurve3d | undefined{\r\n const proxyCurve = BSplineCurve3d.createFromAkimaCurve3dOptions(options);\r\n if (proxyCurve)\r\n return new AkimaCurve3d(options, proxyCurve);\r\n return undefined;\r\n }\r\n\r\n /** Return a (copy of) the defining points, packed as a Float64Array */\r\n public copyFitPointsFloat64Array(): Float64Array {\r\n return Point3dArray.cloneXYZPropsAsFloat64Array(this._options.fitPoints);\r\n }\r\n\r\n /**\r\n * Return json key-value pairs for for this [[AkimaCurve3d]].\r\n * @returns\r\n */\r\n public toJSON(): any {\r\n return this._options.cloneAsAkimaCurve3dProps();\r\n }\r\n /** Clone the [[AkimaCurve3dProps]] object in this [[AkimaCurve3dProps]] */\r\n public cloneProps(): AkimaCurve3dProps {\r\n return this._options.cloneAsAkimaCurve3dProps();\r\n }\r\n\r\n /**\r\n * Reverse the curve direction.\r\n * * This updates both the defining properties and the proxy bspline.\r\n */\r\n public reverseInPlace(): void {\r\n this._proxyCurve.reverseInPlace();\r\n this._options.fitPoints.reverse();\r\n }\r\n /**\r\n * Transform this [[AkimaCurve3d]] and its defining data in place\r\n */\r\n public tryTransformInPlace(transform: Transform): boolean {\r\n const proxyOk = this._proxyCurve.tryTransformInPlace(transform);\r\n if (proxyOk) {\r\n transform.multiplyPoint3dArray(this._options.fitPoints);\r\n }\r\n return proxyOk;\r\n }\r\n\r\n /** Return a deep clone */\r\n public override clone(): AkimaCurve3d {\r\n return new AkimaCurve3d(this._options.clone(), this._proxyCurve.clone());\r\n }\r\n\r\n /** Test if `other` is also an [[AkimaCurve3d]] */\r\n public isSameGeometryClass(other: GeometryQuery): boolean { return other instanceof AkimaCurve3d; }\r\n\r\n public override isAlmostEqual(other: GeometryQuery): boolean{\r\n if (other instanceof AkimaCurve3d) {\r\n return AkimaCurve3dOptions.areAlmostEqual(this._options, other._options);\r\n }\r\n return false;\r\n }\r\n}\r\n"]}
@@ -6,7 +6,7 @@ import { BSplineWrapMode, KnotVector } from "./KnotVector";
6
6
  /** Bspline knots and poles for 1d-to-Nd.
7
7
  * * The "pole" (aka control point) of this class is a block of `poleLength` numbers.
8
8
  * * Derived classes (not this class) assign meaning such as x,y,z,w.
9
- * * for instance, an instance of this class with `poleLength===3` does not know if its poles are x,y,z or weighed 2D x,y,w
9
+ * * for instance, an instance of this class with `poleLength===3` does not know if its poles are x,y,z or weighted 2D x,y,w
10
10
  * @public
11
11
  */
12
12
  export declare class BSpline1dNd {
@@ -25,7 +25,7 @@ export declare class BSpline1dNd {
25
25
  /** (property accessor) Return the number of poles*/
26
26
  get numPoles(): number;
27
27
  /** copy 3 values of pole `i` into a point.
28
- * * The calling clas sis responsible for knowing if this is an appropriate access to the blocked data.
28
+ * * The calling class is responsible for knowing if this is an appropriate access to the blocked data.
29
29
  */
30
30
  getPoint3dPole(i: number, result?: Point3d): Point3d | undefined;
31
31
  /** preallocated array (length === `order`) used as temporary in evaluations */
@@ -71,14 +71,14 @@ export declare class BSpline1dNd {
71
71
  * * Evaluate the basis functions and one derivative at spanIndex and fraction.
72
72
  * * Evaluations are stored in the preallocated `this.basisBuffer`
73
73
  * * Immediately do the summations of the basis values times the respective control points
74
- * * Summations are stored in the preallocated `this.poleBuffer` and `this.poleBuffer`
74
+ * * Summations are stored in the preallocated `this.poleBuffer` and `this.poleBuffer1`
75
75
  * */
76
76
  evaluateBuffersInSpan1(spanIndex: number, spanFraction: number): void;
77
- /** sum poles at span `spanIndex` by the weights in the `poleBuffer` */
77
+ /** sum poles in `poleBuffer` at span `spanIndex` by the weights in the `basisBuffer` */
78
78
  sumPoleBufferForSpan(spanIndex: number): void;
79
- /** sum poles at span `spanIndex` by the weights in the `poleBuffer1`, i.e. form first derivatives */
79
+ /** sum poles in `poleBuffer1` at span `spanIndex` by the weights in the `basisBuffer1`, i.e. form first derivatives */
80
80
  sumPoleBuffer1ForSpan(spanIndex: number): void;
81
- /** sum poles at span `spanIndex` by the weights in the `poleBuffer2`, i.e. form second derivatives */
81
+ /** sum poles in `poleBuffer2` at span `spanIndex` by the weights in the `basisBuffer2`, i.e. form second derivatives */
82
82
  sumPoleBuffer2ForSpan(spanIndex: number): void;
83
83
  /** Evaluate the function values and 1 or 2 derivatives into `this.poleBuffer`, `this.poleBuffer1` and `this.poleBuffer2` */
84
84
  evaluateBuffersAtKnot(u: number, numDerivative?: number): void;
@@ -92,5 +92,10 @@ export declare class BSpline1dNd {
92
92
  * @returns true if `degree` leading and trailing polygon blocks match
93
93
  */
94
94
  testCloseablePolygon(mode?: BSplineWrapMode): boolean;
95
+ /** Insert knot and resulting pole into the instance, optionally multiple times.
96
+ * @param knot the knot to be inserted (may already exist in the KnotVector)
97
+ * @param totalMultiplicity the total multiplicity of the knot on return
98
+ */
99
+ addKnot(knot: number, totalMultiplicity: number): boolean;
95
100
  }
96
101
  //# sourceMappingURL=BSpline1dNd.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BSpline1dNd.d.ts","sourceRoot":"","sources":["../../../src/bspline/BSpline1dNd.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE3D;;;;;GAKG;AACH,qBAAa,WAAW;IACtB,2BAA2B;IACpB,KAAK,EAAE,UAAU,CAAC;IACzB,uDAAuD;IAChD,UAAU,EAAE,YAAY,CAAC;IAChC,wEAAwE;IACjE,UAAU,EAAE,MAAM,CAAC;IAC1B,gEAAgE;IAChE,IAAW,MAAM,IAAI,MAAM,CAA8B;IACzD,+FAA+F;IAC/F,IAAW,KAAK,IAAI,MAAM,CAAkC;IAC5D,oGAAoG;IACpG,IAAW,OAAO,IAAI,MAAM,CAA8C;IAC1E,qDAAqD;IACrD,IAAW,QAAQ,IAAI,MAAM,CAAqD;IAClF;;OAEG;IACI,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS;IACvE,+EAA+E;IACxE,WAAW,EAAE,YAAY,CAAC;IACjC,oFAAoF;IAC7E,UAAU,EAAE,YAAY,CAAC;IAChC,+EAA+E;IACxE,YAAY,EAAE,YAAY,CAAC;IAClC,+EAA+E;IACxE,YAAY,EAAE,YAAY,C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EAAE,MAAM,GAAG,MAAM;IAItE,uIAAuI;IAChI,4BAA4B,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,EAAE,YAAY,EAAE,EAAE,CAAC,EAAE,YAAY,EAAE,GAAG,CAAC,EAAE,YAAY;IASnI;;;;;SAKK;IACE,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;IAIpE;;;;;SAKK;IACE,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;IAKrE,wFAAwF;IACjF,oBAAoB,CAAC,SAAS,EAAE,MAAM;IAO7C,uHAAuH;IAChH,qBAAqB,CAAC,SAAS,EAAE,MAAM;IAS9C,wHAAwH;IACjH,qBAAqB,CAAC,SAAS,EAAE,MAAM;IAS9C,4HAA4H;IACrH,qBAAqB,CAAC,CAAC,EAAE,MAAM,EAAE,aAAa,GAAE,MAAU;IAgBjE;;OAEG;IACI,cAAc,IAAI,IAAI;IAgB7B;;;;OAIG;IACI,oBAAoB,CAAC,IAAI,CAAC,EAAE,eAAe,GAAG,OAAO;IAyB5D;;;OAGG;IACI,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO;CA2DjE"}
@@ -16,7 +16,7 @@ const KnotVector_1 = require("./KnotVector");
16
16
  /** Bspline knots and poles for 1d-to-Nd.
17
17
  * * The "pole" (aka control point) of this class is a block of `poleLength` numbers.
18
18
  * * Derived classes (not this class) assign meaning such as x,y,z,w.
19
- * * for instance, an instance of this class with `poleLength===3` does not know if its poles are x,y,z or weighed 2D x,y,w
19
+ * * for instance, an instance of this class with `poleLength===3` does not know if its poles are x,y,z or weighted 2D x,y,w
20
20
  * @public
21
21
  */
22
22
  class BSpline1dNd {
@@ -47,7 +47,7 @@ class BSpline1dNd {
47
47
  /** (property accessor) Return the number of poles*/
48
48
  get numPoles() { return this.packedData.length / this.poleLength; }
49
49
  /** copy 3 values of pole `i` into a point.
50
- * * The calling clas sis responsible for knowing if this is an appropriate access to the blocked data.
50
+ * * The calling class is responsible for knowing if this is an appropriate access to the blocked data.
51
51
  */
52
52
  getPoint3dPole(i, result) { return Point3dVector3d_1.Point3d.createFromPacked(this.packedData, i, result); }
53
53
  /**
@@ -90,14 +90,14 @@ class BSpline1dNd {
90
90
  * * Evaluate the basis functions and one derivative at spanIndex and fraction.
91
91
  * * Evaluations are stored in the preallocated `this.basisBuffer`
92
92
  * * Immediately do the summations of the basis values times the respective control points
93
- * * Summations are stored in the preallocated `this.poleBuffer` and `this.poleBuffer`
93
+ * * Summations are stored in the preallocated `this.poleBuffer` and `this.poleBuffer1`
94
94
  * */
95
95
  evaluateBuffersInSpan1(spanIndex, spanFraction) {
96
96
  this.evaluateBasisFunctionsInSpan(spanIndex, spanFraction, this.basisBuffer, this.basisBuffer1);
97
97
  this.sumPoleBufferForSpan(spanIndex);
98
98
  this.sumPoleBuffer1ForSpan(spanIndex);
99
99
  }
100
- /** sum poles at span `spanIndex` by the weights in the `poleBuffer` */
100
+ /** sum poles in `poleBuffer` at span `spanIndex` by the weights in the `basisBuffer` */
101
101
  sumPoleBufferForSpan(spanIndex) {
102
102
  this.poleBuffer.fill(0);
103
103
  let k = spanIndex * this.poleLength;
@@ -107,7 +107,7 @@ class BSpline1dNd {
107
107
  }
108
108
  }
109
109
  }
110
- /** sum poles at span `spanIndex` by the weights in the `poleBuffer1`, i.e. form first derivatives */
110
+ /** sum poles in `poleBuffer1` at span `spanIndex` by the weights in the `basisBuffer1`, i.e. form first derivatives */
111
111
  sumPoleBuffer1ForSpan(spanIndex) {
112
112
  this.poleBuffer1.fill(0);
113
113
  let k = spanIndex * this.poleLength;
@@ -117,7 +117,7 @@ class BSpline1dNd {
117
117
  }
118
118
  }
119
119
  }
120
- /** sum poles at span `spanIndex` by the weights in the `poleBuffer2`, i.e. form second derivatives */
120
+ /** sum poles in `poleBuffer2` at span `spanIndex` by the weights in the `basisBuffer2`, i.e. form second derivatives */
121
121
  sumPoleBuffer2ForSpan(spanIndex) {
122
122
  this.poleBuffer2.fill(0);
123
123
  let k = spanIndex * this.poleLength;
@@ -190,6 +190,64 @@ class BSpline1dNd {
190
190
  }
191
191
  return false;
192
192
  }
193
+ /** Insert knot and resulting pole into the instance, optionally multiple times.
194
+ * @param knot the knot to be inserted (may already exist in the KnotVector)
195
+ * @param totalMultiplicity the total multiplicity of the knot on return
196
+ */
197
+ addKnot(knot, totalMultiplicity) {
198
+ if (knot < this.knots.leftKnot || knot > this.knots.rightKnot)
199
+ return false; // invalid input
200
+ let iLeftKnot = this.knots.knotToLeftKnotIndex(knot);
201
+ // snap input if too close to an existing knot
202
+ if (Math.abs(knot - this.knots.knots[iLeftKnot]) < KnotVector_1.KnotVector.knotTolerance) {
203
+ knot = this.knots.knots[iLeftKnot]; // snap to left knot of bracket
204
+ }
205
+ else if (Math.abs(knot - this.knots.knots[iLeftKnot + 1]) < KnotVector_1.KnotVector.knotTolerance) {
206
+ iLeftKnot += this.knots.getKnotMultiplicityAtIndex(iLeftKnot + 1);
207
+ if (iLeftKnot > this.knots.rightKnotIndex)
208
+ return true; // nothing to do
209
+ knot = this.knots.knots[iLeftKnot]; // snap to left knot of next bracket
210
+ }
211
+ const numKnotsToAdd = Math.min(totalMultiplicity, this.degree) - this.knots.getKnotMultiplicity(knot);
212
+ if (numKnotsToAdd <= 0)
213
+ return true; // nothing to do
214
+ // working arrays and pole buffer
215
+ let currKnotCount = this.knots.knots.length;
216
+ const newKnots = new Float64Array(currKnotCount + numKnotsToAdd);
217
+ for (let i = 0; i < currKnotCount; ++i)
218
+ newKnots[i] = this.knots.knots[i];
219
+ let currPoleCount = this.numPoles;
220
+ const newPackedData = new Float64Array(this.packedData.length + (numKnotsToAdd * this.poleLength));
221
+ for (let i = 0; i < this.packedData.length; ++i)
222
+ newPackedData[i] = this.packedData[i];
223
+ const dataBuf = new Float64Array(this.degree * this.poleLength); // holds degree poles
224
+ // each iteration adds one knot and one pole to the working arrays (cf. Farin 4e)
225
+ for (let iter = 0; iter < numKnotsToAdd; ++iter) {
226
+ // fill the buffer with new poles obtained from control polygon corner cutting
227
+ let iBuf = 0;
228
+ const iStart = iLeftKnot - this.degree + 2;
229
+ for (let i = iStart; i < iStart + this.degree; ++i) {
230
+ const fraction = (knot - newKnots[i - 1]) / (newKnots[i + this.degree - 1] - newKnots[i - 1]);
231
+ for (let j = i * this.poleLength; j < (i + 1) * this.poleLength; ++j) {
232
+ dataBuf[iBuf++] = Geometry_1.Geometry.interpolate(newPackedData[j - this.poleLength], fraction, newPackedData[j]);
233
+ }
234
+ }
235
+ // overwrite degree-1 poles with degree new poles, shifting tail to the right by one
236
+ newPackedData.copyWithin((iStart + this.degree) * this.poleLength, (iStart + this.degree - 1) * this.poleLength, currPoleCount * this.poleLength);
237
+ let iData = iStart * this.poleLength;
238
+ for (const d of dataBuf)
239
+ newPackedData[iData++] = d; // overwrite degree new poles
240
+ // add the knot to newKnots in position, shifting tail to the right by one
241
+ newKnots.copyWithin(iLeftKnot + 2, iLeftKnot + 1, currKnotCount);
242
+ newKnots[iLeftKnot + 1] = knot;
243
+ ++iLeftKnot;
244
+ ++currKnotCount;
245
+ ++currPoleCount;
246
+ }
247
+ this.knots.setKnotsCapture(newKnots);
248
+ this.packedData = newPackedData;
249
+ return true;
250
+ }
193
251
  }
194
252
  exports.BSpline1dNd = BSpline1dNd;
195
253
  //# sourceMappingURL=BSpline1dNd.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BSpline1dNd.js","sourceRoot":"","sources":["../../../src/bspline/BSpline1dNd.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,2CAA2C;AAC3C,0CAAuC;AACvC,mEAAmE;AACnE,mEAAwD;AACxD,6CAA2D;AAE3D;;;;;GAKG;AACH,MAAa,WAAW;IAgCtB;;;;;;OAMG;IACH,YAAsB,QAAgB,EAAE,UAAkB,EAAE,KAAa,EAAE,KAAiB;QAC1F,IAAI,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C,GAAG,SAAS,CAAC;QAC7D,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC;QAC7B,IAAI,IAAI,KAAK,4BAAe,CAAC,yBAAyB,EAAE;YACtD,kCAAkC;YAClC,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,CAAC;YAC3C,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,eAAe,EAAE,EAAE,EAAE,EAAE;gBAC3C,IAAI,CAAC,mBAAQ,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,GAAG,UAAU,CAAC,CAAC;oBAC7D,OAAO,KAAK,CAAC;aAChB;YACD,OAAO,IAAI,CAAC;SACb;QAED,IAAI,IAAI,KAAK,4BAAe,CAAC,mBAAmB,EAAE;YAChD,kCAAkC;YAClC,OAAO,IAAI,CAAC;SACb;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AA9LD,kCA8LC","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 Bspline\r\n */\r\n\r\n// import { Point2d } from \"../Geometry2d\";\r\nimport { Geometry } from \"../Geometry\";\r\n/* eslint-disable @typescript-eslint/naming-convention, no-empty */\r\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { BSplineWrapMode, KnotVector } from \"./KnotVector\";\r\n\r\n/** Bspline knots and poles for 1d-to-Nd.\r\n * * The \"pole\" (aka control point) of this class is a block of `poleLength` numbers.\r\n * * Derived classes (not this class) assign meaning such as x,y,z,w.\r\n * * for instance, an instance of this class with `poleLength===3` does not know if its poles are x,y,z or weighed 2D x,y,w\r\n * @public\r\n */\r\nexport class BSpline1dNd {\r\n /** knots of the bspline */\r\n public knots: KnotVector;\r\n /** poles, packed in blocks of `poleLength` doubles. */\r\n public packedData: Float64Array;\r\n /** (property accessor) Return the number of numeric values per pole. */\r\n public poleLength: number;\r\n /** (property accessor) Return the degree of the polynomials. */\r\n public get degree(): number { return this.knots.degree; }\r\n /** (property accessor) Return the number of order (one more than degree) of the polynomials */\r\n public get order(): number { return this.knots.degree + 1; }\r\n /** (property accessor) Return the number of bezier spans (including null spans at multiple knots)*/\r\n public get numSpan(): number { return this.numPoles - this.knots.degree; }\r\n /** (property accessor) Return the number of poles*/\r\n public get numPoles(): number { return this.packedData.length / this.poleLength; }\r\n /** copy 3 values of pole `i` into a point.\r\n * * The calling clas sis responsible for knowing if this is an appropriate access to the blocked data.\r\n */\r\n public getPoint3dPole(i: number, result?: Point3d): Point3d | undefined { return Point3d.createFromPacked(this.packedData, i, result); }\r\n /** preallocated array (length === `order`) used as temporary in evaluations */\r\n public basisBuffer: Float64Array; // one set of basis function values. ALLOCATED BY CTOR FOR FREQUENT REUSE\r\n /** preallocated array (length === `poleLength`) used as temporary in evaluations */\r\n public poleBuffer: Float64Array; // one set of target values. ALLOCATED BY CTOR FOR FREQUENT REUSE\r\n /** preallocated array (length === `order`) used as temporary in evaluations */\r\n public basisBuffer1: Float64Array; // one set of basis function values. ALLOCATED BY CTOR FOR FREQUENT REUSE\r\n /** preallocated array (length === `order`) used as temporary in evaluations */\r\n public basisBuffer2: Float64Array; // one set of basis function values. ALLOCATED BY CTOR FOR FREQUENT REUSE\r\n /** preallocated array (length === `poleLength`) used as temporary in evaluations */\r\n public poleBuffer1: Float64Array; // one set of target values. ALLOCATED BY CTOR FOR FREQUENT REUSE\r\n /** preallocated array (length === `poleLength`) used as temporary in evaluations */\r\n public poleBuffer2: Float64Array; // one set of target values. ALLOCATED BY CTOR FOR FREQUENT REUSE\r\n\r\n /**\r\n * initialize arrays for given spline dimensions.\r\n * @param numPoles number of poles\r\n * @param poleLength number of coordinates per pole (e.g.. 3 for 3D unweighted, 4 for 3d weighted, 2 for 2d unweighted, 3 for 2d weighted)\r\n * @param order number of poles in support for a section of the bspline\r\n * @param knots KnotVector. This is captured, not cloned.\r\n */\r\n protected constructor(numPoles: number, poleLength: number, order: number, knots: KnotVector) {\r\n this.knots = knots;\r\n this.packedData = new Float64Array(numPoles * poleLength);\r\n this.poleLength = poleLength;\r\n this.basisBuffer = new Float64Array(order);\r\n this.poleBuffer = new Float64Array(poleLength);\r\n this.basisBuffer1 = new Float64Array(order);\r\n this.basisBuffer2 = new Float64Array(order);\r\n this.poleBuffer1 = new Float64Array(poleLength);\r\n this.poleBuffer2 = new Float64Array(poleLength);\r\n }\r\n\r\n /**\r\n * create a 1Bspline1dNd`\r\n * @param numPoles number of poles\r\n * @param poleLength number of coordinates per pole (e.g.. 3 for 3D unweighted, 4 for 3d weighted, 2 for 2d unweighted, 3 for 2d weighted)\r\n * @param order number of poles in support for a section of the bspline\r\n * @param knots KnotVector. This is captured, not cloned.\r\n */\r\n public static create(numPoles: number, poleLength: number, order: number, knots: KnotVector): BSpline1dNd | undefined {\r\n return new BSpline1dNd(numPoles, poleLength, order, knots);\r\n }\r\n /** Map a span index and local fraction to knot value. */\r\n public spanFractionToKnot(span: number, localFraction: number): number {\r\n return this.knots.spanFractionToKnot(span, localFraction);\r\n }\r\n\r\n /** Evaluate the `order` basis functions (and optionally one or two derivatives) at a given fractional position within indexed span. */\r\n public evaluateBasisFunctionsInSpan(spanIndex: number, spanFraction: number, f: Float64Array, df?: Float64Array, ddf?: Float64Array) {\r\n if (spanIndex < 0) spanIndex = 0;\r\n if (spanIndex >= this.numSpan) spanIndex = this.numSpan - 1;\r\n const knotIndex0 = spanIndex + this.degree - 1;\r\n const globalKnot = this.knots.baseKnotFractionToKnot(knotIndex0, spanFraction);\r\n return df ?\r\n this.knots.evaluateBasisFunctions1(knotIndex0, globalKnot, f, df, ddf) :\r\n this.knots.evaluateBasisFunctions(knotIndex0, globalKnot, f);\r\n }\r\n /**\r\n * * Evaluate the basis functions at spanIndex and fraction.\r\n * * Evaluations are stored in the preallocated `this.basisBuffer`\r\n * * Immediately do the summations of the basis values times the respective control points\r\n * * Summations are stored in the preallocated `this.poleBuffer`\r\n * */\r\n public evaluateBuffersInSpan(spanIndex: number, spanFraction: number) {\r\n this.evaluateBasisFunctionsInSpan(spanIndex, spanFraction, this.basisBuffer);\r\n this.sumPoleBufferForSpan(spanIndex);\r\n }\r\n /**\r\n * * Evaluate the basis functions and one derivative at spanIndex and fraction.\r\n * * Evaluations are stored in the preallocated `this.basisBuffer`\r\n * * Immediately do the summations of the basis values times the respective control points\r\n * * Summations are stored in the preallocated `this.poleBuffer` and `this.poleBuffer`\r\n * */\r\n public evaluateBuffersInSpan1(spanIndex: number, spanFraction: number) {\r\n this.evaluateBasisFunctionsInSpan(spanIndex, spanFraction, this.basisBuffer, this.basisBuffer1);\r\n this.sumPoleBufferForSpan(spanIndex);\r\n this.sumPoleBuffer1ForSpan(spanIndex);\r\n }\r\n /** sum poles at span `spanIndex` by the weights in the `poleBuffer` */\r\n public sumPoleBufferForSpan(spanIndex: number) {\r\n this.poleBuffer.fill(0);\r\n let k = spanIndex * this.poleLength;\r\n for (const f of this.basisBuffer) {\r\n for (let j = 0; j < this.poleLength; j++) { this.poleBuffer[j] += f * this.packedData[k++]; }\r\n }\r\n }\r\n /** sum poles at span `spanIndex` by the weights in the `poleBuffer1`, i.e. form first derivatives */\r\n public sumPoleBuffer1ForSpan(spanIndex: number) {\r\n this.poleBuffer1.fill(0);\r\n let k = spanIndex * this.poleLength;\r\n for (const f of this.basisBuffer1) {\r\n for (let j = 0; j < this.poleLength; j++) {\r\n this.poleBuffer1[j] += f * this.packedData[k++];\r\n }\r\n }\r\n }\r\n /** sum poles at span `spanIndex` by the weights in the `poleBuffer2`, i.e. form second derivatives */\r\n public sumPoleBuffer2ForSpan(spanIndex: number) {\r\n this.poleBuffer2.fill(0);\r\n let k = spanIndex * this.poleLength;\r\n for (const f of this.basisBuffer2) {\r\n for (let j = 0; j < this.poleLength; j++) {\r\n this.poleBuffer2[j] += f * this.packedData[k++];\r\n }\r\n }\r\n }\r\n /** Evaluate the function values and 1 or 2 derivatives into `this.poleBuffer`, `this.poleBuffer1` and `this.poleBuffer2` */\r\n public evaluateBuffersAtKnot(u: number, numDerivative: number = 0) {\r\n const knotIndex0 = this.knots.knotToLeftKnotIndex(u);\r\n if (numDerivative < 1) {\r\n this.knots.evaluateBasisFunctions(knotIndex0, u, this.basisBuffer);\r\n this.sumPoleBufferForSpan(knotIndex0 - this.degree + 1);\r\n } else if (numDerivative === 1) {\r\n this.knots.evaluateBasisFunctions1(knotIndex0, u, this.basisBuffer, this.basisBuffer1);\r\n this.sumPoleBufferForSpan(knotIndex0 - this.degree + 1);\r\n this.sumPoleBuffer1ForSpan(knotIndex0 - this.degree + 1);\r\n } else {\r\n this.knots.evaluateBasisFunctions1(knotIndex0, u, this.basisBuffer, this.basisBuffer1, this.basisBuffer2);\r\n this.sumPoleBufferForSpan(knotIndex0 - this.degree + 1);\r\n this.sumPoleBuffer1ForSpan(knotIndex0 - this.degree + 1);\r\n this.sumPoleBuffer2ForSpan(knotIndex0 - this.degree + 1);\r\n }\r\n }\r\n /**\r\n * Reverse the (blocked) poles (in `this.packedData` in place.\r\n */\r\n public reverseInPlace(): void {\r\n // reverse poles in blocks ...\r\n const b = this.poleLength;\r\n const data = this.packedData;\r\n for (let i0 = 0, j0 = b * (this.numPoles - 1);\r\n i0 < j0;\r\n i0 += b, j0 -= b) {\r\n let t = 0;\r\n for (let i = 0; i < b; i++) {\r\n t = data[i0 + i];\r\n data[i0 + i] = data[j0 + i];\r\n data[j0 + i] = t;\r\n }\r\n }\r\n this.knots.reflectKnots();\r\n }\r\n /**\r\n * Test if the leading and trailing polygon coordinates are replicated in the manner of a \"closed\" bspline polygon which has been expanded\r\n * to act as a normal bspline.\r\n * @returns true if `degree` leading and trailing polygon blocks match\r\n */\r\n public testCloseablePolygon(mode?: BSplineWrapMode): boolean {\r\n if (mode === undefined)\r\n mode = this.knots.wrappable;\r\n const degree = this.degree;\r\n const blockSize = this.poleLength;\r\n const indexDelta = (this.numPoles - this.degree) * blockSize;\r\n const data = this.packedData;\r\n if (mode === BSplineWrapMode.OpenByAddingControlPoints) {\r\n // expect {degree} matched points.\r\n const numValuesToTest = degree * blockSize;\r\n for (let i0 = 0; i0 < numValuesToTest; i0++) {\r\n if (!Geometry.isSameCoordinate(data[i0], data[i0 + indexDelta]))\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n if (mode === BSplineWrapMode.OpenByRemovingKnots) {\r\n // no pole conditions are applied.\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"BSpline1dNd.js","sourceRoot":"","sources":["../../../src/bspline/BSpline1dNd.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,2CAA2C;AAC3C,0CAAuC;AACvC,mEAAmE;AACnE,mEAAwD;AACxD,6CAA2D;AAE3D;;;;;GAKG;AACH,MAAa,WAAW;IAgCtB;;;;;;OAMG;IACH,YAAsB,QAAgB,EAAE,UAAkB,EAAE,KAAa,EAAE,KAAiB;QAC1F,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,UAAU,GAAG,IAAI,YAAY,CAAC,QAAQ,GAAG,UAAU,CAAC,CAAC;QAC1D,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;QAC3C,IAAI,CAAC,UAAU,GAAG,IAAI,YAAY,CAAC,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,YAAY,GAAG,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;QAC5C,IAAI,CAAC,WAAW,GAAG,IAAI,YAAY,CAAC,UAAU,CAAC,CAAC;QAChD,IAAI,CAAC,WAAW,GAAG,IAAI,YAAY,CAAC,UAAU,CAAC,CAAC;IA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cesContent":["/*---------------------------------------------------------------------------------------------\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 Bspline\r\n */\r\n\r\n// import { Point2d } from \"../Geometry2d\";\r\nimport { Geometry } from \"../Geometry\";\r\n/* eslint-disable @typescript-eslint/naming-convention, no-empty */\r\nimport { Point3d } from \"../geometry3d/Point3dVector3d\";\r\nimport { BSplineWrapMode, KnotVector } from \"./KnotVector\";\r\n\r\n/** Bspline knots and poles for 1d-to-Nd.\r\n * * The \"pole\" (aka control point) of this class is a block of `poleLength` numbers.\r\n * * Derived classes (not this class) assign meaning such as x,y,z,w.\r\n * * for instance, an instance of this class with `poleLength===3` does not know if its poles are x,y,z or weighted 2D x,y,w\r\n * @public\r\n */\r\nexport class BSpline1dNd {\r\n /** knots of the bspline */\r\n public knots: KnotVector;\r\n /** poles, packed in blocks of `poleLength` doubles. */\r\n public packedData: Float64Array;\r\n /** (property accessor) Return the number of numeric values per pole. */\r\n public poleLength: number;\r\n /** (property accessor) Return the degree of the polynomials. */\r\n public get degree(): number { return this.knots.degree; }\r\n /** (property accessor) Return the number of order (one more than degree) of the polynomials */\r\n public get order(): number { return this.knots.degree + 1; }\r\n /** (property accessor) Return the number of bezier spans (including null spans at multiple knots)*/\r\n public get numSpan(): number { return this.numPoles - this.knots.degree; }\r\n /** (property accessor) Return the number of poles*/\r\n public get numPoles(): number { return this.packedData.length / this.poleLength; }\r\n /** copy 3 values of pole `i` into a point.\r\n * * The calling class is responsible for knowing if this is an appropriate access to the blocked data.\r\n */\r\n public getPoint3dPole(i: number, result?: Point3d): Point3d | undefined { return Point3d.createFromPacked(this.packedData, i, result); }\r\n /** preallocated array (length === `order`) used as temporary in evaluations */\r\n public basisBuffer: Float64Array; // one set of basis function values. ALLOCATED BY CTOR FOR FREQUENT REUSE\r\n /** preallocated array (length === `poleLength`) used as temporary in evaluations */\r\n public poleBuffer: Float64Array; // one set of target values. ALLOCATED BY CTOR FOR FREQUENT REUSE\r\n /** preallocated array (length === `order`) used as temporary in evaluations */\r\n public basisBuffer1: Float64Array; // one set of basis function values. ALLOCATED BY CTOR FOR FREQUENT REUSE\r\n /** preallocated array (length === `order`) used as temporary in evaluations */\r\n public basisBuffer2: Float64Array; // one set of basis function values. ALLOCATED BY CTOR FOR FREQUENT REUSE\r\n /** preallocated array (length === `poleLength`) used as temporary in evaluations */\r\n public poleBuffer1: Float64Array; // one set of target values. ALLOCATED BY CTOR FOR FREQUENT REUSE\r\n /** preallocated array (length === `poleLength`) used as temporary in evaluations */\r\n public poleBuffer2: Float64Array; // one set of target values. ALLOCATED BY CTOR FOR FREQUENT REUSE\r\n\r\n /**\r\n * initialize arrays for given spline dimensions.\r\n * @param numPoles number of poles\r\n * @param poleLength number of coordinates per pole (e.g.. 3 for 3D unweighted, 4 for 3d weighted, 2 for 2d unweighted, 3 for 2d weighted)\r\n * @param order number of poles in support for a section of the bspline\r\n * @param knots KnotVector. This is captured, not cloned.\r\n */\r\n protected constructor(numPoles: number, poleLength: number, order: number, knots: KnotVector) {\r\n this.knots = knots;\r\n this.packedData = new Float64Array(numPoles * poleLength);\r\n this.poleLength = poleLength;\r\n this.basisBuffer = new Float64Array(order);\r\n this.poleBuffer = new Float64Array(poleLength);\r\n this.basisBuffer1 = new Float64Array(order);\r\n this.basisBuffer2 = new Float64Array(order);\r\n this.poleBuffer1 = new Float64Array(poleLength);\r\n this.poleBuffer2 = new Float64Array(poleLength);\r\n }\r\n\r\n /**\r\n * create a 1Bspline1dNd`\r\n * @param numPoles number of poles\r\n * @param poleLength number of coordinates per pole (e.g.. 3 for 3D unweighted, 4 for 3d weighted, 2 for 2d unweighted, 3 for 2d weighted)\r\n * @param order number of poles in support for a section of the bspline\r\n * @param knots KnotVector. This is captured, not cloned.\r\n */\r\n public static create(numPoles: number, poleLength: number, order: number, knots: KnotVector): BSpline1dNd | undefined {\r\n return new BSpline1dNd(numPoles, poleLength, order, knots);\r\n }\r\n /** Map a span index and local fraction to knot value. */\r\n public spanFractionToKnot(span: number, localFraction: number): number {\r\n return this.knots.spanFractionToKnot(span, localFraction);\r\n }\r\n\r\n /** Evaluate the `order` basis functions (and optionally one or two derivatives) at a given fractional position within indexed span. */\r\n public evaluateBasisFunctionsInSpan(spanIndex: number, spanFraction: number, f: Float64Array, df?: Float64Array, ddf?: Float64Array) {\r\n if (spanIndex < 0) spanIndex = 0;\r\n if (spanIndex >= this.numSpan) spanIndex = this.numSpan - 1;\r\n const knotIndex0 = spanIndex + this.degree - 1;\r\n const globalKnot = this.knots.baseKnotFractionToKnot(knotIndex0, spanFraction);\r\n return df ?\r\n this.knots.evaluateBasisFunctions1(knotIndex0, globalKnot, f, df, ddf) :\r\n this.knots.evaluateBasisFunctions(knotIndex0, globalKnot, f);\r\n }\r\n /**\r\n * * Evaluate the basis functions at spanIndex and fraction.\r\n * * Evaluations are stored in the preallocated `this.basisBuffer`\r\n * * Immediately do the summations of the basis values times the respective control points\r\n * * Summations are stored in the preallocated `this.poleBuffer`\r\n * */\r\n public evaluateBuffersInSpan(spanIndex: number, spanFraction: number) {\r\n this.evaluateBasisFunctionsInSpan(spanIndex, spanFraction, this.basisBuffer);\r\n this.sumPoleBufferForSpan(spanIndex);\r\n }\r\n /**\r\n * * Evaluate the basis functions and one derivative at spanIndex and fraction.\r\n * * Evaluations are stored in the preallocated `this.basisBuffer`\r\n * * Immediately do the summations of the basis values times the respective control points\r\n * * Summations are stored in the preallocated `this.poleBuffer` and `this.poleBuffer1`\r\n * */\r\n public evaluateBuffersInSpan1(spanIndex: number, spanFraction: number) {\r\n this.evaluateBasisFunctionsInSpan(spanIndex, spanFraction, this.basisBuffer, this.basisBuffer1);\r\n this.sumPoleBufferForSpan(spanIndex);\r\n this.sumPoleBuffer1ForSpan(spanIndex);\r\n }\r\n /** sum poles in `poleBuffer` at span `spanIndex` by the weights in the `basisBuffer` */\r\n public sumPoleBufferForSpan(spanIndex: number) {\r\n this.poleBuffer.fill(0);\r\n let k = spanIndex * this.poleLength;\r\n for (const f of this.basisBuffer) {\r\n for (let j = 0; j < this.poleLength; j++) { this.poleBuffer[j] += f * this.packedData[k++]; }\r\n }\r\n }\r\n /** sum poles in `poleBuffer1` at span `spanIndex` by the weights in the `basisBuffer1`, i.e. form first derivatives */\r\n public sumPoleBuffer1ForSpan(spanIndex: number) {\r\n this.poleBuffer1.fill(0);\r\n let k = spanIndex * this.poleLength;\r\n for (const f of this.basisBuffer1) {\r\n for (let j = 0; j < this.poleLength; j++) {\r\n this.poleBuffer1[j] += f * this.packedData[k++];\r\n }\r\n }\r\n }\r\n /** sum poles in `poleBuffer2` at span `spanIndex` by the weights in the `basisBuffer2`, i.e. form second derivatives */\r\n public sumPoleBuffer2ForSpan(spanIndex: number) {\r\n this.poleBuffer2.fill(0);\r\n let k = spanIndex * this.poleLength;\r\n for (const f of this.basisBuffer2) {\r\n for (let j = 0; j < this.poleLength; j++) {\r\n this.poleBuffer2[j] += f * this.packedData[k++];\r\n }\r\n }\r\n }\r\n /** Evaluate the function values and 1 or 2 derivatives into `this.poleBuffer`, `this.poleBuffer1` and `this.poleBuffer2` */\r\n public evaluateBuffersAtKnot(u: number, numDerivative: number = 0) {\r\n const knotIndex0 = this.knots.knotToLeftKnotIndex(u);\r\n if (numDerivative < 1) {\r\n this.knots.evaluateBasisFunctions(knotIndex0, u, this.basisBuffer);\r\n this.sumPoleBufferForSpan(knotIndex0 - this.degree + 1);\r\n } else if (numDerivative === 1) {\r\n this.knots.evaluateBasisFunctions1(knotIndex0, u, this.basisBuffer, this.basisBuffer1);\r\n this.sumPoleBufferForSpan(knotIndex0 - this.degree + 1);\r\n this.sumPoleBuffer1ForSpan(knotIndex0 - this.degree + 1);\r\n } else {\r\n this.knots.evaluateBasisFunctions1(knotIndex0, u, this.basisBuffer, this.basisBuffer1, this.basisBuffer2);\r\n this.sumPoleBufferForSpan(knotIndex0 - this.degree + 1);\r\n this.sumPoleBuffer1ForSpan(knotIndex0 - this.degree + 1);\r\n this.sumPoleBuffer2ForSpan(knotIndex0 - this.degree + 1);\r\n }\r\n }\r\n /**\r\n * Reverse the (blocked) poles (in `this.packedData` in place.\r\n */\r\n public reverseInPlace(): void {\r\n // reverse poles in blocks ...\r\n const b = this.poleLength;\r\n const data = this.packedData;\r\n for (let i0 = 0, j0 = b * (this.numPoles - 1);\r\n i0 < j0;\r\n i0 += b, j0 -= b) {\r\n let t = 0;\r\n for (let i = 0; i < b; i++) {\r\n t = data[i0 + i];\r\n data[i0 + i] = data[j0 + i];\r\n data[j0 + i] = t;\r\n }\r\n }\r\n this.knots.reflectKnots();\r\n }\r\n /**\r\n * Test if the leading and trailing polygon coordinates are replicated in the manner of a \"closed\" bspline polygon which has been expanded\r\n * to act as a normal bspline.\r\n * @returns true if `degree` leading and trailing polygon blocks match\r\n */\r\n public testCloseablePolygon(mode?: BSplineWrapMode): boolean {\r\n if (mode === undefined)\r\n mode = this.knots.wrappable;\r\n const degree = this.degree;\r\n const blockSize = this.poleLength;\r\n const indexDelta = (this.numPoles - this.degree) * blockSize;\r\n const data = this.packedData;\r\n if (mode === BSplineWrapMode.OpenByAddingControlPoints) {\r\n // expect {degree} matched points.\r\n const numValuesToTest = degree * blockSize;\r\n for (let i0 = 0; i0 < numValuesToTest; i0++) {\r\n if (!Geometry.isSameCoordinate(data[i0], data[i0 + indexDelta]))\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n if (mode === BSplineWrapMode.OpenByRemovingKnots) {\r\n // no pole conditions are applied.\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n /** Insert knot and resulting pole into the instance, optionally multiple times.\r\n * @param knot the knot to be inserted (may already exist in the KnotVector)\r\n * @param totalMultiplicity the total multiplicity of the knot on return\r\n */\r\n public addKnot(knot: number, totalMultiplicity: number): boolean {\r\n if (knot < this.knots.leftKnot || knot > this.knots.rightKnot)\r\n return false; // invalid input\r\n let iLeftKnot = this.knots.knotToLeftKnotIndex(knot);\r\n\r\n // snap input if too close to an existing knot\r\n if (Math.abs(knot - this.knots.knots[iLeftKnot]) < KnotVector.knotTolerance) {\r\n knot = this.knots.knots[iLeftKnot]; // snap to left knot of bracket\r\n } else if (Math.abs(knot - this.knots.knots[iLeftKnot + 1]) < KnotVector.knotTolerance) {\r\n iLeftKnot += this.knots.getKnotMultiplicityAtIndex(iLeftKnot + 1);\r\n if (iLeftKnot > this.knots.rightKnotIndex)\r\n return true; // nothing to do\r\n knot = this.knots.knots[iLeftKnot]; // snap to left knot of next bracket\r\n }\r\n const numKnotsToAdd = Math.min(totalMultiplicity, this.degree) - this.knots.getKnotMultiplicity(knot);\r\n if (numKnotsToAdd <= 0)\r\n return true; // nothing to do\r\n\r\n // working arrays and pole buffer\r\n let currKnotCount = this.knots.knots.length;\r\n const newKnots = new Float64Array(currKnotCount + numKnotsToAdd);\r\n for (let i = 0; i < currKnotCount; ++i)\r\n newKnots[i] = this.knots.knots[i];\r\n let currPoleCount = this.numPoles;\r\n const newPackedData = new Float64Array(this.packedData.length + (numKnotsToAdd * this.poleLength));\r\n for (let i = 0; i < this.packedData.length; ++i)\r\n newPackedData[i] = this.packedData[i];\r\n const dataBuf = new Float64Array(this.degree * this.poleLength); // holds degree poles\r\n\r\n // each iteration adds one knot and one pole to the working arrays (cf. Farin 4e)\r\n for (let iter = 0; iter < numKnotsToAdd; ++iter) {\r\n // fill the buffer with new poles obtained from control polygon corner cutting\r\n let iBuf = 0;\r\n const iStart = iLeftKnot - this.degree + 2;\r\n for (let i = iStart; i < iStart + this.degree; ++i) {\r\n const fraction = (knot - newKnots[i - 1]) / (newKnots[i + this.degree - 1] - newKnots[i - 1]);\r\n for (let j = i * this.poleLength; j < (i + 1) * this.poleLength; ++j) {\r\n dataBuf[iBuf++] = Geometry.interpolate(newPackedData[j - this.poleLength], fraction, newPackedData[j]);\r\n }\r\n }\r\n\r\n // overwrite degree-1 poles with degree new poles, shifting tail to the right by one\r\n newPackedData.copyWithin((iStart + this.degree) * this.poleLength, (iStart + this.degree - 1) * this.poleLength, currPoleCount * this.poleLength);\r\n let iData = iStart * this.poleLength;\r\n for (const d of dataBuf)\r\n newPackedData[iData++] = d; // overwrite degree new poles\r\n\r\n // add the knot to newKnots in position, shifting tail to the right by one\r\n newKnots.copyWithin(iLeftKnot + 2, iLeftKnot + 1, currKnotCount);\r\n newKnots[iLeftKnot + 1] = knot;\r\n\r\n ++iLeftKnot;\r\n ++currKnotCount;\r\n ++currPoleCount;\r\n }\r\n this.knots.setKnotsCapture(newKnots);\r\n this.packedData = newPackedData;\r\n return true;\r\n }\r\n}\r\n"]}
@@ -22,6 +22,7 @@ import { BezierCurveBase } from "./BezierCurveBase";
22
22
  import { BSpline1dNd } from "./BSpline1dNd";
23
23
  import { InterpolationCurve3dOptions } from "./InterpolationCurve3d";
24
24
  import { BSplineWrapMode, KnotVector } from "./KnotVector";
25
+ import { OffsetOptions } from "../curve/internalContexts/PolygonOffsetContext";
25
26
  /**
26
27
  * Base class for BSplineCurve3d and BSplineCurve3dH.
27
28
  * * A bspline curve consists of a set of knots and a set of poles.
@@ -163,12 +164,28 @@ export declare abstract class BSplineCurve3dBase extends CurvePrimitive {
163
164
  * @returns Returns a CurveLocationDetail structure that holds the details of the close point.
164
165
  */
165
166
  closestPoint(spacePoint: Point3d, _extend: boolean): CurveLocationDetail | undefined;
167
+ /** Return a deep clone. */
168
+ abstract clone(): BSplineCurve3dBase;
169
+ /** Return a transformed deep clone. */
170
+ cloneTransformed(transform: Transform): BSplineCurve3dBase;
171
+ /** Return a curve primitive which is a portion of this curve.
172
+ * @param fractionA [in] start fraction
173
+ * @param fractionB [in] end fraction
174
+ */
175
+ clonePartialCurve(fractionA: number, fractionB: number): BSplineCurve3dBase;
166
176
  /** Implement `CurvePrimitive.appendPlaneIntersections`
167
177
  * @param plane A plane (e.g. specific type Plane3dByOriginAndUnitNormal or Point4d)
168
178
  * @param result growing array of plane intersections
169
179
  * @return number of intersections appended to the array.
170
180
  */
171
181
  appendPlaneIntersectionPoints(plane: PlaneAltitudeEvaluator, result: CurveLocationDetail[]): number;
182
+ /**
183
+ * Construct an offset of the instance curve as viewed in the xy-plane (ignoring z).
184
+ * * No attempt is made to join the offsets of smaller constituent primitives. To construct a fully joined offset
185
+ * for an aggregate instance (e.g., LineString3d, CurveChainWithDistanceIndex), use RegionOps.constructCurveXYOffset() instead.
186
+ * @param offsetDistanceOrOptions offset distance (positive to left of the instance curve), or options object
187
+ */
188
+ constructOffsetXY(offsetDistanceOrOptions: number | OffsetOptions): CurvePrimitive | CurvePrimitive[] | undefined;
172
189
  }
173
190
  /**
174
191
  * A BSplineCurve3d is a bspline curve whose poles are Point3d.
@@ -226,8 +243,6 @@ export declare class BSplineCurve3d extends BSplineCurve3dBase {
226
243
  static create(poleArray: Float64Array | Point3d[], knotArray: Float64Array | number[], order: number): BSplineCurve3d | undefined;
227
244
  /** Return a deep clone */
228
245
  clone(): BSplineCurve3d;
229
- /** Return a transformed deep clone. */
230
- cloneTransformed(transform: Transform): BSplineCurve3d;
231
246
  /** Evaluate at a position given by fractional position within a span. */
232
247
  evaluatePointInSpan(spanIndex: number, spanFraction: number): Point3d;
233
248
  /** Evaluate point and derivative vector at a position given by fractional position within a span.
@@ -240,17 +255,6 @@ export declare class BSplineCurve3d extends BSplineCurve3dBase {
240
255
  knotToPointAndDerivative(u: number, result?: Ray3d): Ray3d;
241
256
  /** Evaluate at a position given by a knot value. Return point with 2 derivatives. */
242
257
  knotToPointAnd2Derivatives(u: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors;
243
- /** Evaluate the curve point at a fractional of the entire knot range. */
244
- fractionToPoint(fraction: number, result?: Point3d): Point3d;
245
- /** Evaluate the curve point at a fractional of the entire knot range. */
246
- fractionToPointAndDerivative(fraction: number, result?: Ray3d): Ray3d;
247
- /** Construct a plane with
248
- * * origin at the fractional position along the arc
249
- * * x axis is the first derivative, i.e. tangent along the arc
250
- * * y axis is the second derivative, i.e. in the plane and on the center side of the tangent.
251
- * If the arc is circular, the second derivative is directly towards the center
252
- */
253
- fractionToPointAnd2Derivatives(fraction: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors;
254
258
  /** test if almost the same curve as `other` */
255
259
  isAlmostEqual(other: any): boolean;
256
260
  /** test if this curve is entirely within plane. */
@@ -1 +1 @@
1
- {"version":3,"file":"BSplineCurve.d.ts","sourceRoot":"","sources":["../../../src/bspline/BSplineCurve.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAqB,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAY,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAC1F,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAEpF,OAAO,EAAE,OAAO,EAAY,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAW,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAGrD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAA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