flo-mat 3.0.0 → 3.0.2

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 (822) hide show
  1. package/.mocharc.cjs +1 -1
  2. package/README.md +7 -7
  3. package/browser/index.min.js +1 -1
  4. package/newdocs/README.md +41 -0
  5. package/newdocs/babel.config.js +3 -0
  6. package/newdocs/blog/2019-05-28-first-blog-post.md +12 -0
  7. package/newdocs/blog/2019-05-29-long-blog-post.md +44 -0
  8. package/newdocs/blog/2021-08-01-mdx-blog-post.mdx +20 -0
  9. package/newdocs/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg +0 -0
  10. package/newdocs/blog/2021-08-26-welcome/index.md +25 -0
  11. package/newdocs/blog/authors.yml +17 -0
  12. package/newdocs/docs/Introduction.md +78 -0
  13. package/newdocs/docs/aaa.md +23 -0
  14. package/newdocs/docusaurus.config.js +139 -0
  15. package/newdocs/package-lock.json +12697 -0
  16. package/newdocs/package.json +46 -0
  17. package/newdocs/sidebars.js +33 -0
  18. package/newdocs/src/components/HomepageFeatures/index.tsx +46 -0
  19. package/newdocs/src/components/HomepageFeatures/styles.module.css +11 -0
  20. package/newdocs/src/css/custom.css +30 -0
  21. package/newdocs/src/pages/index.module.css +23 -0
  22. package/newdocs/src/pages/index.tsx +43 -0
  23. package/newdocs/src/pages/markdown-page.md +7 -0
  24. package/newdocs/static/.nojekyll +0 -0
  25. package/newdocs/static/img/docusaurus-social-card.jpg +0 -0
  26. package/newdocs/static/img/docusaurus.png +0 -0
  27. package/newdocs/static/img/favicon.ico +0 -0
  28. package/newdocs/static/img/favicon1.ico +0 -0
  29. package/newdocs/static/img/favicon_io/android-chrome-192x192.png +0 -0
  30. package/newdocs/static/img/favicon_io/android-chrome-512x512.png +0 -0
  31. package/newdocs/static/img/favicon_io/apple-touch-icon.png +0 -0
  32. package/newdocs/static/img/favicon_io/favicon-16x16.png +0 -0
  33. package/newdocs/static/img/favicon_io/favicon-32x32.png +0 -0
  34. package/newdocs/static/img/favicon_io/favicon.ico +0 -0
  35. package/newdocs/static/img/favicon_io/site.webmanifest +1 -0
  36. package/newdocs/static/img/favicon_io.zip +0 -0
  37. package/newdocs/static/img/logo.png +0 -0
  38. package/newdocs/static/img/logo.svg +1 -0
  39. package/newdocs/static/img/undraw_books_re_8gea.svg +1 -0
  40. package/newdocs/static/img/undraw_docusaurus_mountain.svg +171 -0
  41. package/newdocs/static/img/undraw_docusaurus_react.svg +170 -0
  42. package/newdocs/static/img/undraw_docusaurus_tree.svg +40 -0
  43. package/newdocs/tsconfig.json +7 -0
  44. package/node/add-n-prong.ts/join-spokes.d.ts +4 -0
  45. package/node/add-n-prong.ts/join-spokes.js +24 -0
  46. package/node/add-n-prong.ts/join-spokes.js.map +1 -0
  47. package/node/bezier/fit-quads-to-cubic.d.ts +19 -0
  48. package/node/bezier/fit-quads-to-cubic.js +83 -0
  49. package/node/bezier/fit-quads-to-cubic.js.map +1 -0
  50. package/node/bezier/total-curvature.d.ts +2 -0
  51. package/node/bezier/total-curvature.js +5 -0
  52. package/node/bezier/total-curvature.js.map +1 -0
  53. package/node/bezier/total-length.d.ts +2 -0
  54. package/node/bezier/total-length.js +5 -0
  55. package/node/bezier/total-length.js.map +1 -0
  56. package/node/closest-boundary-point/cull-bezier-pieces.d.ts +2 -2
  57. package/node/closest-boundary-point/cull-bezier-pieces.js.map +1 -1
  58. package/node/closest-boundary-point/cull-by-loose-bounding-box.d.ts +2 -2
  59. package/node/closest-boundary-point/cull-by-loose-bounding-box.js +2 -2
  60. package/node/closest-boundary-point/cull-by-loose-bounding-box.js.map +1 -1
  61. package/node/closest-boundary-point/cull-by-tight-boundary-box.d.ts +2 -2
  62. package/node/closest-boundary-point/cull-by-tight-boundary-box.js.map +1 -1
  63. package/node/closest-boundary-point/dd-deflate-with-running-error.js.map +1 -1
  64. package/node/closest-boundary-point/foot-and-endpoint-info.d.ts +1 -1
  65. package/node/closest-boundary-point/get-best-distance-squared.d.ts +2 -2
  66. package/node/closest-boundary-point/get-best-distance-squared.js.map +1 -1
  67. package/node/closest-boundary-point/get-close-boundary-points-certified.d.ts +6 -3
  68. package/node/closest-boundary-point/get-close-boundary-points-certified.js +6 -3
  69. package/node/closest-boundary-point/get-close-boundary-points-certified.js.map +1 -1
  70. package/node/closest-boundary-point/get-potential-closest-points-on-curve-certified.d.ts +5 -1
  71. package/node/closest-boundary-point/get-potential-closest-points-on-curve-certified.js +22 -5
  72. package/node/closest-boundary-point/get-potential-closest-points-on-curve-certified.js.map +1 -1
  73. package/node/closest-boundary-point/root-interval-to-distance-squared-interval.d.ts +1 -1
  74. package/node/closest-boundary-point/root-interval-to-distance-squared-interval.js +13 -8
  75. package/node/closest-boundary-point/root-interval-to-distance-squared-interval.js.map +1 -1
  76. package/node/contact-point/contact-point.js.map +1 -1
  77. package/node/corner/compare-curvatures-at-interface.js +37 -54
  78. package/node/corner/compare-curvatures-at-interface.js.map +1 -1
  79. package/node/corner/corner.d.ts +0 -1
  80. package/node/corner/get-corner.d.ts +1 -1
  81. package/node/corner/get-corner.js +9 -21
  82. package/node/corner/get-corner.js.map +1 -1
  83. package/node/corner/get-interface-ccw.d.ts +6 -7
  84. package/node/corner/get-interface-ccw.js +63 -46
  85. package/node/corner/get-interface-ccw.js.map +1 -1
  86. package/node/cp-node/cp-node-fs.d.ts +225 -0
  87. package/node/cp-node/cp-node-fs.js +228 -0
  88. package/node/cp-node/cp-node-fs.js.map +1 -0
  89. package/node/cp-node/cp-node.d.ts +22 -128
  90. package/node/cp-node/cp-node.js +1 -248
  91. package/node/cp-node/cp-node.js.map +1 -1
  92. package/node/cp-node/{clone.d.ts → fs/clone.d.ts} +1 -1
  93. package/node/cp-node/{clone.js → fs/clone.js} +14 -5
  94. package/node/cp-node/fs/clone.js.map +1 -0
  95. package/node/cp-node/fs/cp-nodes-to-boundary-beziers.d.ts +3 -0
  96. package/node/cp-node/fs/cp-nodes-to-boundary-beziers.js +6 -0
  97. package/node/cp-node/fs/cp-nodes-to-boundary-beziers.js.map +1 -0
  98. package/node/cp-node/{enhance-cp-node.d.ts → fs/enhance-cp-node.d.ts} +14 -4
  99. package/node/cp-node/{enhance-cp-node.js → fs/enhance-cp-node.js} +8 -1
  100. package/node/cp-node/fs/enhance-cp-node.js.map +1 -0
  101. package/node/cp-node/fs/find-first.d.ts +3 -0
  102. package/node/cp-node/fs/find-first.js +16 -0
  103. package/node/cp-node/fs/find-first.js.map +1 -0
  104. package/node/cp-node/fs/get-all-between.d.ts +17 -0
  105. package/node/cp-node/fs/get-all-between.js +31 -0
  106. package/node/cp-node/fs/get-all-between.js.map +1 -0
  107. package/node/cp-node/fs/get-all-on-circle.d.ts +3 -0
  108. package/node/cp-node/fs/get-all-on-circle.js +14 -0
  109. package/node/cp-node/fs/get-all-on-circle.js.map +1 -0
  110. package/node/cp-node/fs/get-all-on-loop.d.ts +3 -0
  111. package/node/cp-node/fs/get-all-on-loop.js +12 -0
  112. package/node/cp-node/fs/get-all-on-loop.js.map +1 -0
  113. package/node/cp-node/fs/get-all-vertices.d.ts +3 -0
  114. package/node/cp-node/fs/get-all-vertices.js +10 -0
  115. package/node/cp-node/fs/get-all-vertices.js.map +1 -0
  116. package/node/cp-node/fs/get-angle-between-mat-curves.d.ts +9 -0
  117. package/node/cp-node/fs/get-angle-between-mat-curves.js +18 -0
  118. package/node/cp-node/fs/get-angle-between-mat-curves.js.map +1 -0
  119. package/node/cp-node/{get-boundary-bezier-parts-to-next.d.ts → fs/get-boundary-bezier-parts-to-next.d.ts} +1 -6
  120. package/node/cp-node/{get-boundary-bezier-parts-to-next.js → fs/get-boundary-bezier-parts-to-next.js} +0 -5
  121. package/node/cp-node/fs/get-boundary-bezier-parts-to-next.js.map +1 -0
  122. package/node/cp-node/fs/get-boundary-beziers-between.d.ts +17 -0
  123. package/node/cp-node/fs/get-boundary-beziers-between.js +22 -0
  124. package/node/cp-node/fs/get-boundary-beziers-between.js.map +1 -0
  125. package/node/cp-node/fs/get-boundary-beziers-to-next.d.ts +3 -0
  126. package/node/cp-node/{get-boundary-beziers-to-next.js → fs/get-boundary-beziers-to-next.js} +2 -7
  127. package/node/cp-node/fs/get-boundary-beziers-to-next.js.map +1 -0
  128. package/node/cp-node/fs/get-branch-beziers.d.ts +8 -0
  129. package/node/cp-node/fs/get-branch-beziers.js +12 -0
  130. package/node/cp-node/fs/get-branch-beziers.js.map +1 -0
  131. package/node/cp-node/fs/get-branch.d.ts +10 -0
  132. package/node/cp-node/fs/get-branch.js +33 -0
  133. package/node/cp-node/fs/get-branch.js.map +1 -0
  134. package/node/cp-node/fs/get-children.d.ts +3 -0
  135. package/node/cp-node/fs/get-children.js +12 -0
  136. package/node/cp-node/fs/get-children.js.map +1 -0
  137. package/node/cp-node/{get-cp-node-ordering.d.ts → fs/get-cp-node-ordering.d.ts} +5 -1
  138. package/node/cp-node/{get-cp-node-ordering.js → fs/get-cp-node-ordering.js} +4 -0
  139. package/node/cp-node/fs/get-cp-node-ordering.js.map +1 -0
  140. package/node/cp-node/fs/get-distance-to-next.d.ts +4 -0
  141. package/node/cp-node/fs/get-distance-to-next.js +11 -0
  142. package/node/cp-node/fs/get-distance-to-next.js.map +1 -0
  143. package/node/cp-node/fs/get-edge-direction.d.ts +3 -0
  144. package/node/{get-curve → cp-node/fs}/get-edge-direction.js +1 -7
  145. package/node/cp-node/fs/get-edge-direction.js.map +1 -0
  146. package/node/cp-node/fs/get-first-exit.d.ts +3 -0
  147. package/node/cp-node/fs/get-first-exit.js +15 -0
  148. package/node/cp-node/fs/get-first-exit.js.map +1 -0
  149. package/node/cp-node/fs/get-hole-closers.d.ts +3 -0
  150. package/node/cp-node/fs/get-hole-closers.js +7 -0
  151. package/node/cp-node/fs/get-hole-closers.js.map +1 -0
  152. package/node/cp-node/fs/get-implied-boundary-bezier-between.d.ts +3 -0
  153. package/node/cp-node/fs/get-implied-boundary-bezier-between.js +58 -0
  154. package/node/cp-node/fs/get-implied-boundary-bezier-between.js.map +1 -0
  155. package/node/cp-node/fs/get-mat-curve-between.d.ts +3 -0
  156. package/node/{get-curve/get-curve-between.js → cp-node/fs/get-mat-curve-between.js} +3 -9
  157. package/node/cp-node/fs/get-mat-curve-between.js.map +1 -0
  158. package/node/cp-node/fs/get-mat-curve-to-next.d.ts +4 -0
  159. package/node/cp-node/fs/get-mat-curve-to-next.js +8 -0
  160. package/node/cp-node/fs/get-mat-curve-to-next.js.map +1 -0
  161. package/node/cp-node/fs/get-mat-curves-between.d.ts +3 -0
  162. package/node/cp-node/fs/get-mat-curves-between.js +13 -0
  163. package/node/cp-node/fs/get-mat-curves-between.js.map +1 -0
  164. package/node/cp-node/fs/get-non-terminating-on-circle.d.ts +3 -0
  165. package/node/cp-node/fs/get-non-terminating-on-circle.js +15 -0
  166. package/node/cp-node/fs/get-non-terminating-on-circle.js.map +1 -0
  167. package/node/cp-node/fs/get-prong-count.d.ts +3 -0
  168. package/node/cp-node/fs/get-prong-count.js +12 -0
  169. package/node/cp-node/fs/get-prong-count.js.map +1 -0
  170. package/node/cp-node/fs/get-real-prong-count.d.ts +3 -0
  171. package/node/cp-node/fs/get-real-prong-count.js +9 -0
  172. package/node/cp-node/fs/get-real-prong-count.js.map +1 -0
  173. package/node/cp-node/fs/get-salience.d.ts +7 -0
  174. package/node/cp-node/fs/get-salience.js +20 -0
  175. package/node/cp-node/fs/get-salience.js.map +1 -0
  176. package/node/cp-node/fs/get-smoothed-speed.d.ts +3 -0
  177. package/node/cp-node/fs/get-smoothed-speed.js +75 -0
  178. package/node/cp-node/fs/get-smoothed-speed.js.map +1 -0
  179. package/node/cp-node/fs/get-speed.d.ts +4 -0
  180. package/node/cp-node/fs/get-speed.js +40 -0
  181. package/node/cp-node/fs/get-speed.js.map +1 -0
  182. package/node/cp-node/fs/get-vertex-forward-children.d.ts +3 -0
  183. package/node/cp-node/fs/get-vertex-forward-children.js +15 -0
  184. package/node/cp-node/fs/get-vertex-forward-children.js.map +1 -0
  185. package/node/cp-node/fs/insert-cp-node.d.ts +5 -0
  186. package/node/cp-node/fs/insert-cp-node.js +21 -0
  187. package/node/cp-node/fs/insert-cp-node.js.map +1 -0
  188. package/node/cp-node/fs/is-fully-terminating.d.ts +3 -0
  189. package/node/cp-node/fs/is-fully-terminating.js +8 -0
  190. package/node/cp-node/fs/is-fully-terminating.js.map +1 -0
  191. package/node/cp-node/fs/is-on-same-circle.d.ts +3 -0
  192. package/node/cp-node/fs/is-on-same-circle.js +8 -0
  193. package/node/cp-node/fs/is-on-same-circle.js.map +1 -0
  194. package/node/cp-node/fs/is-one-prong.d.ts +3 -0
  195. package/node/cp-node/fs/is-one-prong.js +13 -0
  196. package/node/cp-node/fs/is-one-prong.js.map +1 -0
  197. package/node/cp-node/fs/is-order-correct.d.ts +5 -0
  198. package/node/cp-node/fs/is-order-correct.js +26 -0
  199. package/node/cp-node/fs/is-order-correct.js.map +1 -0
  200. package/node/cp-node/fs/is-sharp.d.ts +3 -0
  201. package/node/cp-node/fs/is-sharp.js +5 -0
  202. package/node/cp-node/fs/is-sharp.js.map +1 -0
  203. package/node/cp-node/fs/is-special.d.ts +3 -0
  204. package/node/cp-node/fs/is-special.js +9 -0
  205. package/node/cp-node/fs/is-special.js.map +1 -0
  206. package/node/cp-node/fs/is-terminating.d.ts +3 -0
  207. package/node/cp-node/fs/is-terminating.js +5 -0
  208. package/node/cp-node/fs/is-terminating.js.map +1 -0
  209. package/node/cp-node/fs/is-trivial.d.ts +6 -0
  210. package/node/cp-node/fs/is-trivial.js +10 -0
  211. package/node/cp-node/fs/is-trivial.js.map +1 -0
  212. package/node/cp-node/fs/is-two-prong.d.ts +3 -0
  213. package/node/cp-node/fs/is-two-prong.js +6 -0
  214. package/node/cp-node/fs/is-two-prong.js.map +1 -0
  215. package/node/cp-node/fs/is-vertex-special.d.ts +2 -0
  216. package/node/cp-node/fs/is-vertex-special.js +5 -0
  217. package/node/cp-node/fs/is-vertex-special.js.map +1 -0
  218. package/node/cp-node/fs/is-vertex.d.ts +3 -0
  219. package/node/cp-node/fs/is-vertex.js +6 -0
  220. package/node/cp-node/fs/is-vertex.js.map +1 -0
  221. package/node/cp-node/fs/remove-cp-node.d.ts +5 -0
  222. package/node/cp-node/fs/remove-cp-node.js +10 -0
  223. package/node/cp-node/fs/remove-cp-node.js.map +1 -0
  224. package/node/cp-node/fs/traverse-cp.d.ts +3 -0
  225. package/node/cp-node/{traverse-cp.js → fs/traverse-cp.js} +2 -10
  226. package/node/cp-node/fs/traverse-cp.js.map +1 -0
  227. package/node/cp-node/fs/traverse-edges.d.ts +5 -0
  228. package/node/cp-node/fs/traverse-edges.js +47 -0
  229. package/node/cp-node/fs/traverse-edges.js.map +1 -0
  230. package/node/cp-node/fs/traverse-vertices.d.ts +3 -0
  231. package/node/cp-node/fs/traverse-vertices.js +21 -0
  232. package/node/cp-node/fs/traverse-vertices.js.map +1 -0
  233. package/node/curve/curve.d.ts +1 -8
  234. package/node/curve/curve.js +1 -13
  235. package/node/curve/curve.js.map +1 -1
  236. package/node/debug/debug-elem-types.d.ts +24 -29
  237. package/node/debug/debug-elem-types.js +22 -1
  238. package/node/debug/debug-elem-types.js.map +1 -1
  239. package/node/debug/debug.d.ts +4 -8
  240. package/node/debug/debug.js +16 -17
  241. package/node/debug/debug.js.map +1 -1
  242. package/node/debug/functions/draw/draw-beziers-as-single-path.d.ts +2 -0
  243. package/node/debug/functions/draw/draw-beziers-as-single-path.js +30 -0
  244. package/node/debug/functions/draw/draw-beziers-as-single-path.js.map +1 -0
  245. package/node/debug/functions/draw/xmlns.d.ts +2 -0
  246. package/node/debug/functions/draw/xmlns.js +3 -0
  247. package/node/debug/functions/draw/xmlns.js.map +1 -0
  248. package/node/debug/functions/draw-elem/draw-branch.d.ts +4 -0
  249. package/node/debug/functions/draw-elem/draw-branch.js +26 -0
  250. package/node/debug/functions/draw-elem/draw-branch.js.map +1 -0
  251. package/node/debug/functions/draw-elem/draw-cp-node.d.ts +4 -0
  252. package/node/debug/functions/draw-elem/draw-cp-node.js +26 -0
  253. package/node/debug/functions/draw-elem/draw-cp-node.js.map +1 -0
  254. package/node/debug/functions/draw-elem/draw-cull.d.ts +3 -0
  255. package/node/debug/functions/draw-elem/draw-cull.js +9 -0
  256. package/node/debug/functions/draw-elem/draw-cull.js.map +1 -0
  257. package/node/debug/functions/draw-elem/{dull-corner.js → draw-dull-corner.js} +1 -1
  258. package/node/debug/functions/draw-elem/draw-dull-corner.js.map +1 -0
  259. package/node/debug/functions/draw-elem/draw-elem.d.ts +7 -5
  260. package/node/debug/functions/draw-elem/draw-elem.js +33 -36
  261. package/node/debug/functions/draw-elem/draw-elem.js.map +1 -1
  262. package/node/debug/functions/draw-elem/draw-leaves.d.ts +4 -0
  263. package/node/debug/functions/draw-elem/draw-leaves.js +34 -0
  264. package/node/debug/functions/draw-elem/draw-leaves.js.map +1 -0
  265. package/node/debug/functions/draw-elem/{loop.js → draw-loop.js} +1 -1
  266. package/node/debug/functions/draw-elem/draw-loop.js.map +1 -0
  267. package/node/debug/functions/draw-elem/{loops.js → draw-loops.js} +1 -1
  268. package/node/debug/functions/draw-elem/draw-loops.js.map +1 -0
  269. package/node/debug/functions/draw-elem/{loose-bounding-box.js → draw-loose-bounding-box.js} +1 -1
  270. package/node/debug/functions/draw-elem/draw-loose-bounding-box.js.map +1 -0
  271. package/node/debug/functions/draw-elem/draw-mat.d.ts +4 -0
  272. package/node/debug/functions/draw-elem/draw-mat.js +38 -0
  273. package/node/debug/functions/draw-elem/draw-mat.js.map +1 -0
  274. package/node/debug/functions/draw-elem/{max-vertex.js → draw-max-vertex.js} +1 -1
  275. package/node/debug/functions/draw-elem/draw-max-vertex.js.map +1 -0
  276. package/node/debug/functions/draw-elem/{min-y.js → draw-min-y.js} +1 -1
  277. package/node/debug/functions/draw-elem/draw-min-y.js.map +1 -0
  278. package/node/debug/functions/draw-elem/{one-prong-at-dull-corner.js → draw-one-prong-at-dull-corner.js} +1 -1
  279. package/node/debug/functions/draw-elem/draw-one-prong-at-dull-corner.js.map +1 -0
  280. package/node/debug/functions/draw-elem/{one-prong.js → draw-one-prong.js} +1 -1
  281. package/node/debug/functions/draw-elem/draw-one-prong.js.map +1 -0
  282. package/node/debug/functions/draw-elem/{sharp-corner.js → draw-sharp-corner.js} +1 -1
  283. package/node/debug/functions/draw-elem/draw-sharp-corner.js.map +1 -0
  284. package/node/debug/functions/draw-elem/draw-speed.d.ts +4 -0
  285. package/node/debug/functions/draw-elem/draw-speed.js +21 -0
  286. package/node/debug/functions/draw-elem/draw-speed.js.map +1 -0
  287. package/node/debug/functions/draw-elem/draw-three-prong.d.ts +4 -0
  288. package/node/debug/functions/draw-elem/draw-three-prong.js +26 -0
  289. package/node/debug/functions/draw-elem/draw-three-prong.js.map +1 -0
  290. package/node/debug/functions/draw-elem/{tight-bounding-box.js → draw-tight-bounding-box.js} +1 -1
  291. package/node/debug/functions/draw-elem/draw-tight-bounding-box.js.map +1 -0
  292. package/node/debug/functions/draw-elem/draw-two-prong.d.ts +4 -0
  293. package/node/debug/functions/draw-elem/draw-two-prong.js +48 -0
  294. package/node/debug/functions/draw-elem/draw-two-prong.js.map +1 -0
  295. package/node/debug/functions/draw-elem/{vertex.d.ts → draw-vertex.d.ts} +1 -2
  296. package/node/debug/functions/draw-elem/draw-vertex.js +15 -0
  297. package/node/debug/functions/draw-elem/draw-vertex.js.map +1 -0
  298. package/node/find-2-prong/add-1-prong.d.ts +3 -5
  299. package/node/find-2-prong/add-1-prong.js +15 -16
  300. package/node/find-2-prong/add-1-prong.js.map +1 -1
  301. package/node/find-2-prong/add-2-prong.d.ts +6 -6
  302. package/node/find-2-prong/add-2-prong.js +45 -124
  303. package/node/find-2-prong/add-2-prong.js.map +1 -1
  304. package/node/find-2-prong/calc-seperation-tolerance.d.ts +2 -0
  305. package/node/find-2-prong/calc-seperation-tolerance.js +86 -0
  306. package/node/find-2-prong/calc-seperation-tolerance.js.map +1 -0
  307. package/node/find-2-prong/cull-bezier-pieces.d.ts +2 -2
  308. package/node/find-2-prong/cull-bezier-pieces.js +2 -2
  309. package/node/find-2-prong/cull-bezier-pieces.js.map +1 -1
  310. package/node/find-2-prong/find-2-prong.d.ts +4 -6
  311. package/node/find-2-prong/find-2-prong.js +70 -59
  312. package/node/find-2-prong/find-2-prong.js.map +1 -1
  313. package/node/find-2-prong/find-and-add-2-prong.d.ts +11 -0
  314. package/node/find-2-prong/find-and-add-2-prong.js +19 -0
  315. package/node/find-2-prong/find-and-add-2-prong.js.map +1 -0
  316. package/node/find-2-prong/find-and-add-2-prongs-on-all-loops.d.ts +14 -0
  317. package/node/find-2-prong/find-and-add-2-prongs-on-all-loops.js +21 -0
  318. package/node/find-2-prong/find-and-add-2-prongs-on-all-loops.js.map +1 -0
  319. package/node/find-2-prong/find-and-add-2-prongs.d.ts +5 -9
  320. package/node/find-2-prong/find-and-add-2-prongs.js +17 -21
  321. package/node/find-2-prong/find-and-add-2-prongs.js.map +1 -1
  322. package/node/find-2-prong/find-and-add-hole-closing-2-prongs.d.ts +3 -4
  323. package/node/find-2-prong/find-and-add-hole-closing-2-prongs.js +8 -8
  324. package/node/find-2-prong/find-and-add-hole-closing-2-prongs.js.map +1 -1
  325. package/node/find-2-prong/find-equidistant-point-on-line-dd.js.map +1 -1
  326. package/node/find-2-prong/get-initial-bezier-pieces.d.ts +2 -8
  327. package/node/find-2-prong/get-initial-bezier-pieces.js +13 -21
  328. package/node/find-2-prong/get-initial-bezier-pieces.js.map +1 -1
  329. package/node/find-2-prong/reduce-radius.d.ts +2 -2
  330. package/node/find-2-prong/reduce-radius.js +10 -19
  331. package/node/find-2-prong/reduce-radius.js.map +1 -1
  332. package/node/find-3-prong.ts/calc-better-x.d.ts +3 -3
  333. package/node/find-3-prong.ts/calc-better-x.js +4 -4
  334. package/node/find-3-prong.ts/calc-better-x.js.map +1 -1
  335. package/node/find-3-prong.ts/calc-initial-3-prong-center.d.ts +2 -2
  336. package/node/find-3-prong.ts/calc-initial-3-prong-center.js +6 -3
  337. package/node/find-3-prong.ts/calc-initial-3-prong-center.js.map +1 -1
  338. package/node/find-3-prong.ts/find-3-prong-for-delta3s.d.ts +4 -4
  339. package/node/find-3-prong.ts/find-3-prong-for-delta3s.js +24 -33
  340. package/node/find-3-prong.ts/find-3-prong-for-delta3s.js.map +1 -1
  341. package/node/find-3-prong.ts/find-3-prong.d.ts +1 -1
  342. package/node/find-3-prong.ts/find-3-prong.js +2 -61
  343. package/node/find-3-prong.ts/find-3-prong.js.map +1 -1
  344. package/node/find-3-prong.ts/find-and-add-3-prong.d.ts +15 -0
  345. package/node/find-3-prong.ts/find-and-add-3-prong.js +43 -0
  346. package/node/find-3-prong.ts/find-and-add-3-prong.js.map +1 -0
  347. package/node/find-3-prong.ts/find-and-add-3-prongs-on-loop.d.ts +11 -0
  348. package/node/find-3-prong.ts/find-and-add-3-prongs-on-loop.js +63 -0
  349. package/node/find-3-prong.ts/find-and-add-3-prongs-on-loop.js.map +1 -0
  350. package/node/find-3-prong.ts/find-and-add-3-prongs.d.ts +22 -3
  351. package/node/find-3-prong.ts/find-and-add-3-prongs.js +28 -55
  352. package/node/find-3-prong.ts/find-and-add-3-prongs.js.map +1 -1
  353. package/node/find-3-prong.ts/get-closest-points.d.ts +2 -2
  354. package/node/find-3-prong.ts/get-closest-points.js +2 -1
  355. package/node/find-3-prong.ts/get-closest-points.js.map +1 -1
  356. package/node/find-mat/clip-options.d.ts +3 -0
  357. package/node/find-mat/clip-options.js +32 -0
  358. package/node/find-mat/clip-options.js.map +1 -0
  359. package/node/find-mat/{create-initial-cp-graph.d.ts → create-initial-cp-tree.d.ts} +5 -2
  360. package/node/find-mat/{create-initial-cp-graph.js → create-initial-cp-tree.js} +11 -10
  361. package/node/find-mat/create-initial-cp-tree.js.map +1 -0
  362. package/node/find-mat/find-mat.d.ts +7 -2
  363. package/node/find-mat/find-mat.js +34 -22
  364. package/node/find-mat/find-mat.js.map +1 -1
  365. package/node/find-mat/find-mats.d.ts +4 -2
  366. package/node/find-mat/find-mats.js +27 -10
  367. package/node/find-mat/find-mats.js.map +1 -1
  368. package/node/find-mat/{get-dull-corners.js → get-dull-corners-on-loop.js} +3 -3
  369. package/node/find-mat/get-dull-corners-on-loop.js.map +1 -0
  370. package/node/find-mat/get-for-1-prongs-on-loop.js +15 -5
  371. package/node/find-mat/get-for-1-prongs-on-loop.js.map +1 -1
  372. package/node/find-mat/get-for-2-prongs-on-loop.js +14 -10
  373. package/node/find-mat/get-for-2-prongs-on-loop.js.map +1 -1
  374. package/node/find-mat/get-meta.d.ts +11 -0
  375. package/node/find-mat/get-meta.js +82 -0
  376. package/node/find-mat/get-meta.js.map +1 -0
  377. package/node/find-mat/get-sharp-corners.js +3 -2
  378. package/node/find-mat/get-sharp-corners.js.map +1 -1
  379. package/node/find-mat/mat-options.d.ts +88 -0
  380. package/node/find-mat/mat-options.js +36 -0
  381. package/node/find-mat/mat-options.js.map +1 -0
  382. package/node/floyd-warshall/floyd-warshall.d.ts +7 -0
  383. package/node/floyd-warshall/floyd-warshall.js +67 -0
  384. package/node/floyd-warshall/floyd-warshall.js.map +1 -0
  385. package/node/floyd-warshall/get-graph.d.ts +3 -0
  386. package/node/floyd-warshall/get-graph.js +54 -0
  387. package/node/floyd-warshall/get-graph.js.map +1 -0
  388. package/node/floyd-warshall/get-hole-closer-pairs.d.ts +3 -0
  389. package/node/floyd-warshall/get-hole-closer-pairs.js +19 -0
  390. package/node/floyd-warshall/get-hole-closer-pairs.js.map +1 -0
  391. package/node/geometry/circle.js.map +1 -1
  392. package/node/geometry/get-bounding-box-.d.ts +2 -2
  393. package/node/geometry/get-bounding-box-.js +2 -2
  394. package/node/geometry/get-bounding-box-.js.map +1 -1
  395. package/node/geometry/get-closest-square-distance-to-rect.js.map +1 -1
  396. package/node/geometry/get-closest-squared-distance-to-rotated-rect.js.map +1 -1
  397. package/node/index.d.ts +50 -40
  398. package/node/index.js +34 -37
  399. package/node/index.js.map +1 -1
  400. package/node/loop/get-max-coordinate.js.map +1 -1
  401. package/node/mat/{add-to-cp-graph.d.ts → add-to-cp-tree.d.ts} +6 -4
  402. package/node/mat/add-to-cp-tree.js +34 -0
  403. package/node/mat/add-to-cp-tree.js.map +1 -0
  404. package/node/mat/connect-hole-closers.d.ts +3 -0
  405. package/node/mat/connect-hole-closers.js +5 -0
  406. package/node/mat/connect-hole-closers.js.map +1 -0
  407. package/node/mat/create-new-cp-tree.d.ts +1 -1
  408. package/node/mat/create-new-cp-tree.js +2 -1
  409. package/node/mat/create-new-cp-tree.js.map +1 -1
  410. package/node/mat/{bezier-piece.d.ts → curve-piece.d.ts} +2 -2
  411. package/node/mat/curve-piece.js +2 -0
  412. package/node/mat/curve-piece.js.map +1 -0
  413. package/node/mat/get-boundary-piece-beziers.d.ts +3 -2
  414. package/node/mat/get-boundary-piece-beziers.js +2 -3
  415. package/node/mat/get-boundary-piece-beziers.js.map +1 -1
  416. package/node/mat/get-branches.d.ts +1 -10
  417. package/node/mat/get-branches.js +23 -60
  418. package/node/mat/get-branches.js.map +1 -1
  419. package/node/mat/get-closeby-cp-if-exist.d.ts +17 -0
  420. package/node/mat/{is-another-cp-closeby.js → get-closeby-cp-if-exist.js} +17 -13
  421. package/node/mat/get-closeby-cp-if-exist.js.map +1 -0
  422. package/node/mat/get-cp-node-to-left-or-same.d.ts +18 -0
  423. package/node/mat/get-cp-node-to-left-or-same.js +29 -0
  424. package/node/mat/get-cp-node-to-left-or-same.js.map +1 -0
  425. package/node/mat/get-largest-vertex.d.ts +1 -1
  426. package/node/mat/get-largest-vertex.js +3 -1
  427. package/node/mat/get-largest-vertex.js.map +1 -1
  428. package/node/mat/mat-meta.d.ts +24 -0
  429. package/node/mat/mat-meta.js +2 -0
  430. package/node/mat/mat-meta.js.map +1 -0
  431. package/node/mat/mat.d.ts +6 -6
  432. package/node/mat/simplify-mat.d.ts +2 -2
  433. package/node/mat/simplify-mat.js +31 -20
  434. package/node/mat/simplify-mat.js.map +1 -1
  435. package/node/mat/trim-mat.js +8 -2
  436. package/node/mat/trim-mat.js.map +1 -1
  437. package/node/memoize-primitive.d.ts +11 -0
  438. package/node/memoize-primitive.js +25 -0
  439. package/node/memoize-primitive.js.map +1 -0
  440. package/node/point-on-shape/calc-pos-order.js +1 -2
  441. package/node/point-on-shape/calc-pos-order.js.map +1 -1
  442. package/node/point-on-shape/compare-poss.js.map +1 -1
  443. package/node/point-on-shape/create-pos.d.ts +1 -1
  444. package/node/point-on-shape/create-pos.js +2 -3
  445. package/node/point-on-shape/create-pos.js.map +1 -1
  446. package/node/point-on-shape/get-osculating-circle.d.ts +3 -1
  447. package/node/point-on-shape/get-osculating-circle.js +6 -2
  448. package/node/point-on-shape/get-osculating-circle.js.map +1 -1
  449. package/node/point-on-shape/get-pos-corner.js +4 -2
  450. package/node/point-on-shape/get-pos-corner.js.map +1 -1
  451. package/node/point-on-shape/is-pos-quite-sharp-corner.js.map +1 -1
  452. package/node/point-on-shape/is-pos-sharp-corner.js.map +1 -1
  453. package/node/point-on-shape/point-on-shape.d.ts +1 -1
  454. package/node/sat/add-debug-info.d.ts +1 -2
  455. package/node/sat/add-debug-info.js +1 -2
  456. package/node/sat/add-debug-info.js.map +1 -1
  457. package/node/sat/cull-non-cycles.js +2 -2
  458. package/node/sat/cull-non-cycles.js.map +1 -1
  459. package/node/sat/cull.d.ts +2 -2
  460. package/node/sat/cull.js +40 -95
  461. package/node/sat/cull.js.map +1 -1
  462. package/node/sat/get-leaves.js +6 -4
  463. package/node/sat/get-leaves.js.map +1 -1
  464. package/node/sat/get-sat-culls.d.ts +4 -0
  465. package/node/sat/get-sat-culls.js +33 -0
  466. package/node/sat/get-sat-culls.js.map +1 -0
  467. package/node/sat/to-scale-axis.d.ts +1 -2
  468. package/node/sat/to-scale-axis.js +14 -52
  469. package/node/sat/to-scale-axis.js.map +1 -1
  470. package/node/svg/get-loop-bounds.js.map +1 -1
  471. package/node/svg/get-min-y-pos.d.ts +1 -1
  472. package/node/svg/get-shape-bounds.js.map +1 -1
  473. package/node/sweep-line/sweep-line.js.map +1 -1
  474. package/node/utils/dual-set.d.ts +27 -0
  475. package/node/utils/dual-set.js +55 -0
  476. package/node/utils/dual-set.js.map +1 -0
  477. package/node/utils/sleep.d.ts +2 -0
  478. package/node/utils/sleep.js +5 -0
  479. package/node/utils/sleep.js.map +1 -0
  480. package/node/utils/sum.d.ts +2 -0
  481. package/node/utils/sum.js +9 -0
  482. package/node/utils/sum.js.map +1 -0
  483. package/node/utils/tri-map.d.ts +27 -0
  484. package/node/utils/tri-map.js +49 -0
  485. package/node/utils/tri-map.js.map +1 -0
  486. package/node/vertex/remove-vertex.d.ts +5 -0
  487. package/node/vertex/remove-vertex.js +12 -0
  488. package/node/vertex/remove-vertex.js.map +1 -0
  489. package/package.json +21 -25
  490. package/src/add-n-prong.ts/join-spokes.ts +39 -0
  491. package/src/bezier/fit-quads-to-cubic.ts +103 -0
  492. package/src/bezier/total-curvature.ts +8 -0
  493. package/src/bezier/total-length.ts +8 -0
  494. package/src/closest-boundary-point/closest-points-on-curve-precise.ts +62 -62
  495. package/src/closest-boundary-point/cull-bezier-pieces.ts +2 -2
  496. package/src/closest-boundary-point/cull-by-loose-bounding-box.ts +4 -4
  497. package/src/closest-boundary-point/cull-by-tight-boundary-box.ts +2 -2
  498. package/src/closest-boundary-point/foot-and-endpoint-info.ts +2 -2
  499. package/src/closest-boundary-point/get-best-distance-squared.ts +2 -2
  500. package/src/closest-boundary-point/get-close-boundary-points-certified.ts +8 -3
  501. package/src/closest-boundary-point/get-closest-boundary-point-certified.ts +56 -56
  502. package/src/closest-boundary-point/get-potential-closest-points-on-curve-certified.ts +24 -6
  503. package/src/closest-boundary-point/root-interval-to-distance-squared-interval.ts +12 -6
  504. package/src/corner/compare-curvatures-at-interface.ts +49 -69
  505. package/src/corner/corner.ts +1 -1
  506. package/src/corner/get-corner.ts +9 -23
  507. package/src/corner/get-interface-ccw.ts +96 -60
  508. package/src/cp-node/cp-node-fs.ts +234 -0
  509. package/src/cp-node/cp-node.ts +27 -348
  510. package/src/cp-node/fs/add-distance-from.ts +50 -0
  511. package/src/cp-node/{clone.ts → fs/clone.ts} +27 -17
  512. package/src/cp-node/fs/cp-nodes-to-boundary-beziers.ts +10 -0
  513. package/src/cp-node/fs/create-cp-node.ts +21 -0
  514. package/src/cp-node/{enhance-cp-node.ts → fs/enhance-cp-node.ts} +10 -4
  515. package/src/cp-node/fs/find-first.ts +25 -0
  516. package/src/cp-node/fs/get-all-between.ts +44 -0
  517. package/src/cp-node/fs/get-all-on-circle.ts +23 -0
  518. package/src/cp-node/fs/get-all-on-loop.ts +18 -0
  519. package/src/cp-node/fs/get-all-vertices.ts +17 -0
  520. package/src/cp-node/fs/get-angle-between-mat-curves.ts +33 -0
  521. package/src/cp-node/fs/get-avg-speed.ts +31 -0
  522. package/src/cp-node/{get-boundary-bezier-parts-to-next.ts → fs/get-boundary-bezier-parts-to-next.ts} +2 -9
  523. package/src/cp-node/fs/get-boundary-beziers-between.ts +31 -0
  524. package/src/cp-node/{get-boundary-beziers-to-next.ts → fs/get-boundary-beziers-to-next.ts} +5 -10
  525. package/src/cp-node/fs/get-boundary-distance-to-next.ts +16 -0
  526. package/src/cp-node/fs/get-branch-beziers.ts +18 -0
  527. package/src/cp-node/fs/get-branch.ts +43 -0
  528. package/src/cp-node/fs/get-children.ts +18 -0
  529. package/src/cp-node/{get-cp-node-ordering.ts → fs/get-cp-node-ordering.ts} +5 -1
  530. package/src/cp-node/fs/get-distance-between.ts +16 -0
  531. package/src/cp-node/fs/get-distance-to-next.ts +19 -0
  532. package/src/cp-node/fs/get-edge-direction.ts +64 -0
  533. package/src/cp-node/fs/get-first-exit.ts +22 -0
  534. package/src/cp-node/fs/get-hole-closers.ts +13 -0
  535. package/src/cp-node/fs/get-implied-boundary-bezier-between.ts +78 -0
  536. package/src/cp-node/fs/get-mat-curve-between.ts +74 -0
  537. package/src/cp-node/fs/get-mat-curve-to-next.ts +13 -0
  538. package/src/cp-node/fs/get-mat-curves-between.ts +22 -0
  539. package/src/cp-node/fs/get-non-terminating-on-circle.ts +24 -0
  540. package/src/cp-node/fs/get-prong-count.ts +18 -0
  541. package/src/cp-node/fs/get-real-prong-count.ts +14 -0
  542. package/src/cp-node/fs/get-salience.ts +28 -0
  543. package/src/cp-node/fs/get-smoothed-speed.ts +97 -0
  544. package/src/cp-node/fs/get-smoothed.ts +62 -0
  545. package/src/cp-node/fs/get-speed.ts +61 -0
  546. package/src/cp-node/fs/get-terminating-on-circle.ts +24 -0
  547. package/src/cp-node/fs/get-vertex-forward-children.ts +22 -0
  548. package/src/cp-node/fs/insert-cp-node.ts +40 -0
  549. package/src/cp-node/fs/is-fully-terminating.ts +13 -0
  550. package/src/cp-node/fs/is-on-same-circle.ts +16 -0
  551. package/src/cp-node/fs/is-one-prong.ts +21 -0
  552. package/src/cp-node/fs/is-order-correct.ts +36 -0
  553. package/src/cp-node/fs/is-sharp.ts +9 -0
  554. package/src/cp-node/fs/is-single-3-prong.ts +15 -0
  555. package/src/cp-node/fs/is-special.ts +16 -0
  556. package/src/cp-node/fs/is-terminating.ts +9 -0
  557. package/src/cp-node/fs/is-trivial.ts +16 -0
  558. package/src/cp-node/fs/is-two-prong.ts +10 -0
  559. package/src/cp-node/fs/is-vertex-special.ts +8 -0
  560. package/src/cp-node/fs/is-vertex.ts +12 -0
  561. package/src/cp-node/fs/iterate-all-on-loop.ts +15 -0
  562. package/src/cp-node/fs/remove-cp-node.ts +20 -0
  563. package/src/cp-node/fs/traverse-all-forward.ts +24 -0
  564. package/src/cp-node/{traverse-cp.ts → fs/traverse-cp.ts} +3 -11
  565. package/src/cp-node/fs/traverse-edges.ts +71 -0
  566. package/src/cp-node/fs/traverse-vertices.ts +32 -0
  567. package/src/curve/curve.ts +1 -16
  568. package/src/dbscan/dbscan.ts +91 -0
  569. package/src/debug/debug-elem-types.ts +37 -29
  570. package/src/debug/debug.ts +20 -25
  571. package/src/debug/functions/check-ordering.ts +97 -0
  572. package/src/debug/functions/cmp-cp-on-delta.ts +54 -0
  573. package/src/debug/functions/draw/draw-bezier-pieces.ts +35 -0
  574. package/src/debug/functions/draw/draw-beziers-as-single-path.ts +40 -0
  575. package/src/debug/functions/draw/draw-disk.ts +34 -0
  576. package/src/debug/functions/draw/xmlns.ts +5 -0
  577. package/src/debug/functions/draw-elem/branch.ts +0 -1
  578. package/src/debug/functions/draw-elem/draw-branch.ts +39 -0
  579. package/src/debug/functions/draw-elem/draw-cp-node.ts +47 -0
  580. package/src/debug/functions/draw-elem/draw-cull.ts +21 -0
  581. package/src/debug/functions/draw-elem/draw-dull-corner.ts +21 -0
  582. package/src/debug/functions/draw-elem/draw-elem.ts +51 -48
  583. package/src/debug/functions/draw-elem/draw-leaves.ts +51 -0
  584. package/src/debug/functions/draw-elem/draw-loop.ts +16 -0
  585. package/src/debug/functions/draw-elem/draw-loops.ts +10 -0
  586. package/src/debug/functions/draw-elem/draw-loose-bounding-box.ts +21 -0
  587. package/src/debug/functions/draw-elem/draw-mat.ts +53 -0
  588. package/src/debug/functions/draw-elem/draw-max-vertex.ts +15 -0
  589. package/src/debug/functions/draw-elem/draw-min-y.ts +18 -0
  590. package/src/debug/functions/draw-elem/draw-one-prong-at-dull-corner.ts +26 -0
  591. package/src/debug/functions/draw-elem/draw-one-prong.ts +23 -0
  592. package/src/debug/functions/draw-elem/draw-sharp-corner.ts +20 -0
  593. package/src/debug/functions/draw-elem/draw-speed.ts +35 -0
  594. package/src/debug/functions/draw-elem/draw-three-prong.ts +44 -0
  595. package/src/debug/functions/draw-elem/draw-tight-bounding-box.ts +18 -0
  596. package/src/debug/functions/draw-elem/draw-two-prong.ts +67 -0
  597. package/src/debug/functions/draw-elem/draw-vertex.ts +30 -0
  598. package/src/debug/two-prong-for-debugging.ts +2 -2
  599. package/src/dijkstra/dijkstra.ts +418 -0
  600. package/src/find-2-prong/add-1-prong.ts +15 -22
  601. package/src/find-2-prong/add-2-prong.ts +68 -173
  602. package/src/find-2-prong/add-debug-info.ts +21 -25
  603. package/src/find-2-prong/calc-seperation-tolerance.ts +121 -0
  604. package/src/find-2-prong/cull-bezier-pieces.ts +4 -4
  605. package/src/find-2-prong/find-2-prong.ts +87 -71
  606. package/src/find-2-prong/find-and-add-2-prong.ts +30 -0
  607. package/src/find-2-prong/find-and-add-2-prongs-on-all-loops.ts +37 -0
  608. package/src/find-2-prong/find-and-add-2-prongs.ts +20 -33
  609. package/src/find-2-prong/find-and-add-hole-closing-2-prongs.ts +13 -14
  610. package/src/find-2-prong/get-initial-bezier-pieces.ts +23 -31
  611. package/src/find-2-prong/reduce-radius.ts +13 -24
  612. package/src/find-3-prong.ts/array-set.ts +47 -0
  613. package/src/find-3-prong.ts/calc-better-x.ts +7 -7
  614. package/src/find-3-prong.ts/calc-initial-3-prong-center.ts +8 -3
  615. package/src/find-3-prong.ts/find-3-prong-for-delta3s.ts +28 -42
  616. package/src/find-3-prong.ts/find-3-prong.ts +7 -107
  617. package/src/find-3-prong.ts/find-and-add-3-prong.ts +61 -0
  618. package/src/find-3-prong.ts/find-and-add-3-prongs-on-loop.ts +89 -0
  619. package/src/find-3-prong.ts/find-and-add-3-prongs.ts +31 -81
  620. package/src/find-3-prong.ts/get-closest-points.ts +3 -3
  621. package/src/find-mat/add-2-prongs-by-error.ts +122 -0
  622. package/src/find-mat/clip-options.ts +38 -0
  623. package/src/find-mat/cp-node-for-insertion.ts +13 -0
  624. package/src/find-mat/create-initial-cp-tree.ts +59 -0
  625. package/src/find-mat/find-mat.ts +50 -38
  626. package/src/find-mat/find-mats.ts +39 -22
  627. package/src/find-mat/get-dull-corners-on-loop.ts +34 -0
  628. package/src/find-mat/get-for-1-prongs-on-loop.ts +25 -6
  629. package/src/find-mat/get-for-2-prongs-on-loop.ts +16 -8
  630. package/src/find-mat/get-half-angles.ts +95 -0
  631. package/src/find-mat/get-meta.ts +115 -0
  632. package/src/find-mat/get-sharp-corners.ts +3 -2
  633. package/src/find-mat/get-total-by.ts +5 -5
  634. package/src/find-mat/mat-options.ts +140 -0
  635. package/src/floyd-warshall/floyd-warshall.ts +89 -0
  636. package/src/floyd-warshall/get-graph.ts +73 -0
  637. package/src/floyd-warshall/get-hole-closer-pairs.ts +27 -0
  638. package/src/geometry/get-bounding-box-.ts +3 -2
  639. package/src/heap/heap.ts +96 -0
  640. package/src/index.ts +52 -133
  641. package/src/mat/add-to-cp-tree.ts +56 -0
  642. package/src/mat/clone-mat.ts +14 -0
  643. package/src/mat/clone-meta.ts +17 -0
  644. package/src/mat/connect-hole-closers.ts +9 -0
  645. package/src/mat/create-new-cp-tree.ts +4 -1
  646. package/src/mat/{bezier-piece.ts → curve-piece.ts} +2 -2
  647. package/src/mat/get-boundary-piece-beziers.ts +10 -11
  648. package/src/mat/get-branches.ts +25 -75
  649. package/src/mat/get-closeby-cp-if-exist.ts +75 -0
  650. package/src/mat/get-cp-node-to-left-or-same.ts +43 -0
  651. package/src/mat/get-edges-as-array.ts +12 -12
  652. package/src/mat/get-largest-3-prong.ts +21 -0
  653. package/src/mat/get-largest-vertex.ts +4 -1
  654. package/src/mat/mat-meta.ts +31 -0
  655. package/src/mat/mat.ts +7 -7
  656. package/src/mat/simplify-mat.ts +39 -23
  657. package/src/mat/trim-mat.ts +8 -2
  658. package/src/memoize-primitive.ts +31 -0
  659. package/src/point-on-shape/calc-pos-order.ts +1 -2
  660. package/src/point-on-shape/create-pos.ts +2 -3
  661. package/src/point-on-shape/get-osculating-circle.ts +4 -1
  662. package/src/point-on-shape/get-pos-corner.ts +10 -6
  663. package/src/point-on-shape/is-pos-dull-corner.ts +6 -4
  664. package/src/point-on-shape/point-on-shape.ts +1 -1
  665. package/src/sat/add-debug-info.ts +0 -4
  666. package/src/sat/cull-by-salience.ts +115 -0
  667. package/src/sat/cull-non-cycles.ts +4 -2
  668. package/src/sat/cull.ts +48 -99
  669. package/src/sat/get-leaves.ts +9 -4
  670. package/src/sat/get-sat-culls.ts +46 -0
  671. package/src/sat/to-scale-axis.ts +14 -70
  672. package/src/svg/get-extreme.ts +1 -1
  673. package/src/utils/bezier-piece-to-bezier.ts +13 -0
  674. package/src/utils/deg-to-rad.ts +7 -0
  675. package/src/utils/dual-map.ts +55 -0
  676. package/src/utils/dual-set.ts +82 -0
  677. package/src/utils/rad-to-deg.ts +7 -0
  678. package/src/utils/rotate.ts +17 -0
  679. package/src/utils/sleep.ts +7 -0
  680. package/src/utils/sum.ts +12 -0
  681. package/src/utils/tri-map.ts +76 -0
  682. package/src/vertex/remove-vertex.ts +22 -0
  683. package/webpack.config.cjs +38 -36
  684. package/browser/index.js +0 -33670
  685. package/node/closest-boundary-point/get-closest-boundary-point-certified.d.ts +0 -15
  686. package/node/closest-boundary-point/get-closest-boundary-point-certified.js +0 -42
  687. package/node/closest-boundary-point/get-closest-boundary-point-certified.js.map +0 -1
  688. package/node/cp-node/clone.js.map +0 -1
  689. package/node/cp-node/create-cp-node.d.ts +0 -4
  690. package/node/cp-node/create-cp-node.js +0 -8
  691. package/node/cp-node/create-cp-node.js.map +0 -1
  692. package/node/cp-node/enhance-cp-node.js.map +0 -1
  693. package/node/cp-node/get-boundary-bezier-parts-to-next.js.map +0 -1
  694. package/node/cp-node/get-boundary-beziers-to-next.d.ts +0 -8
  695. package/node/cp-node/get-boundary-beziers-to-next.js.map +0 -1
  696. package/node/cp-node/get-cp-node-ordering.js.map +0 -1
  697. package/node/cp-node/get-curve-to-next.d.ts +0 -9
  698. package/node/cp-node/get-curve-to-next.js +0 -12
  699. package/node/cp-node/get-curve-to-next.js.map +0 -1
  700. package/node/cp-node/remove.d.ts +0 -9
  701. package/node/cp-node/remove.js +0 -20
  702. package/node/cp-node/remove.js.map +0 -1
  703. package/node/cp-node/traverse-cp.d.ts +0 -12
  704. package/node/cp-node/traverse-cp.js.map +0 -1
  705. package/node/cp-node/traverse-edges.d.ts +0 -10
  706. package/node/cp-node/traverse-edges.js +0 -23
  707. package/node/cp-node/traverse-edges.js.map +0 -1
  708. package/node/cp-node/traverse-vertices.d.ts +0 -12
  709. package/node/cp-node/traverse-vertices.js +0 -29
  710. package/node/cp-node/traverse-vertices.js.map +0 -1
  711. package/node/debug/functions/draw-elem/branch.d.ts +0 -4
  712. package/node/debug/functions/draw-elem/branch.js +0 -24
  713. package/node/debug/functions/draw-elem/branch.js.map +0 -1
  714. package/node/debug/functions/draw-elem/culls.d.ts +0 -4
  715. package/node/debug/functions/draw-elem/culls.js +0 -22
  716. package/node/debug/functions/draw-elem/culls.js.map +0 -1
  717. package/node/debug/functions/draw-elem/dull-corner.js.map +0 -1
  718. package/node/debug/functions/draw-elem/leaves.d.ts +0 -4
  719. package/node/debug/functions/draw-elem/leaves.js +0 -13
  720. package/node/debug/functions/draw-elem/leaves.js.map +0 -1
  721. package/node/debug/functions/draw-elem/loop.js.map +0 -1
  722. package/node/debug/functions/draw-elem/loops.js.map +0 -1
  723. package/node/debug/functions/draw-elem/loose-bounding-box.js.map +0 -1
  724. package/node/debug/functions/draw-elem/mat.d.ts +0 -4
  725. package/node/debug/functions/draw-elem/mat.js +0 -33
  726. package/node/debug/functions/draw-elem/mat.js.map +0 -1
  727. package/node/debug/functions/draw-elem/max-vertex.js.map +0 -1
  728. package/node/debug/functions/draw-elem/min-y.js.map +0 -1
  729. package/node/debug/functions/draw-elem/one-prong-at-dull-corner.js.map +0 -1
  730. package/node/debug/functions/draw-elem/one-prong.js.map +0 -1
  731. package/node/debug/functions/draw-elem/sharp-corner.js.map +0 -1
  732. package/node/debug/functions/draw-elem/three-prong.d.ts +0 -4
  733. package/node/debug/functions/draw-elem/three-prong.js +0 -15
  734. package/node/debug/functions/draw-elem/three-prong.js.map +0 -1
  735. package/node/debug/functions/draw-elem/tight-bounding-box.js.map +0 -1
  736. package/node/debug/functions/draw-elem/two-prong.d.ts +0 -4
  737. package/node/debug/functions/draw-elem/two-prong.js +0 -36
  738. package/node/debug/functions/draw-elem/two-prong.js.map +0 -1
  739. package/node/debug/functions/draw-elem/vertex.js +0 -30
  740. package/node/debug/functions/draw-elem/vertex.js.map +0 -1
  741. package/node/debug/functions/three-prong.d.ts +0 -11
  742. package/node/debug/functions/three-prong.js +0 -182
  743. package/node/debug/functions/three-prong.js.map +0 -1
  744. package/node/debug/functions/two-prong.d.ts +0 -24
  745. package/node/debug/functions/two-prong.js +0 -116
  746. package/node/debug/functions/two-prong.js.map +0 -1
  747. package/node/debug/three-prong-for-debugging.d.ts +0 -31
  748. package/node/debug/three-prong-for-debugging.js +0 -21
  749. package/node/debug/three-prong-for-debugging.js.map +0 -1
  750. package/node/debug/two-prong-for-debugging.d.ts +0 -26
  751. package/node/debug/two-prong-for-debugging.js +0 -2
  752. package/node/debug/two-prong-for-debugging.js.map +0 -1
  753. package/node/find-2-prong/add-debug-info.d.ts +0 -8
  754. package/node/find-2-prong/add-debug-info.js +0 -23
  755. package/node/find-2-prong/add-debug-info.js.map +0 -1
  756. package/node/find-2-prong/find-and-add-2-prongs-on-all-paths.d.ts +0 -15
  757. package/node/find-2-prong/find-and-add-2-prongs-on-all-paths.js +0 -22
  758. package/node/find-2-prong/find-and-add-2-prongs-on-all-paths.js.map +0 -1
  759. package/node/find-2-prong/x-for-debugging.d.ts +0 -9
  760. package/node/find-2-prong/x-for-debugging.js +0 -2
  761. package/node/find-2-prong/x-for-debugging.js.map +0 -1
  762. package/node/find-3-prong.ts/add-3-prong.d.ts +0 -24
  763. package/node/find-3-prong.ts/add-3-prong.js +0 -82
  764. package/node/find-3-prong.ts/add-3-prong.js.map +0 -1
  765. package/node/find-3-prong.ts/find-and-add-all-3-prongs.d.ts +0 -13
  766. package/node/find-3-prong.ts/find-and-add-all-3-prongs.js +0 -66
  767. package/node/find-3-prong.ts/find-and-add-all-3-prongs.js.map +0 -1
  768. package/node/find-mat/add-debug-info.d.ts +0 -9
  769. package/node/find-mat/add-debug-info.js +0 -68
  770. package/node/find-mat/add-debug-info.js.map +0 -1
  771. package/node/find-mat/create-initial-cp-graph.js.map +0 -1
  772. package/node/find-mat/fix-ordering.d.ts +0 -8
  773. package/node/find-mat/fix-ordering.js +0 -59
  774. package/node/find-mat/fix-ordering.js.map +0 -1
  775. package/node/find-mat/get-dull-corners.js.map +0 -1
  776. package/node/find-mat/get-size-params.d.ts +0 -7
  777. package/node/find-mat/get-size-params.js +0 -33
  778. package/node/find-mat/get-size-params.js.map +0 -1
  779. package/node/get-curve/get-curve-between.d.ts +0 -9
  780. package/node/get-curve/get-curve-between.js.map +0 -1
  781. package/node/get-curve/get-edge-direction.d.ts +0 -9
  782. package/node/get-curve/get-edge-direction.js.map +0 -1
  783. package/node/mat/add-to-cp-graph.js +0 -33
  784. package/node/mat/add-to-cp-graph.js.map +0 -1
  785. package/node/mat/bezier-piece.js +0 -2
  786. package/node/mat/bezier-piece.js.map +0 -1
  787. package/node/mat/elem-type-two-prong.d.ts +0 -3
  788. package/node/mat/elem-type-two-prong.js +0 -2
  789. package/node/mat/elem-type-two-prong.js.map +0 -1
  790. package/node/mat/get-neighboring-cps.d.ts +0 -16
  791. package/node/mat/get-neighboring-cps.js +0 -33
  792. package/node/mat/get-neighboring-cps.js.map +0 -1
  793. package/node/mat/get-two-prong-type.d.ts +0 -5
  794. package/node/mat/get-two-prong-type.js +0 -9
  795. package/node/mat/get-two-prong-type.js.map +0 -1
  796. package/node/mat/is-another-cp-closeby.d.ts +0 -21
  797. package/node/mat/is-another-cp-closeby.js.map +0 -1
  798. package/node/mat/simplify-mat-map-only.d.ts +0 -23
  799. package/node/mat/simplify-mat-map-only.js +0 -82
  800. package/node/mat/simplify-mat-map-only.js.map +0 -1
  801. package/node/point-on-shape/is-pos-dull-corner.d.ts +0 -6
  802. package/node/point-on-shape/is-pos-dull-corner.js +0 -14
  803. package/node/point-on-shape/is-pos-dull-corner.js.map +0 -1
  804. package/src/cp-node/create-cp-node.ts +0 -21
  805. package/src/cp-node/get-curve-to-next.ts +0 -16
  806. package/src/cp-node/remove.ts +0 -27
  807. package/src/cp-node/traverse-edges.ts +0 -29
  808. package/src/cp-node/traverse-vertices.ts +0 -37
  809. package/src/sat/t-tree.ts +0 -8
  810. package/src/sat/traverse-spacial-tree.ts +0 -34
  811. /package/{test → __tests__}/lib-load.spec.ts +0 -0
  812. /package/node/debug/functions/draw-elem/{dull-corner.d.ts → draw-dull-corner.d.ts} +0 -0
  813. /package/node/debug/functions/draw-elem/{loop.d.ts → draw-loop.d.ts} +0 -0
  814. /package/node/debug/functions/draw-elem/{loops.d.ts → draw-loops.d.ts} +0 -0
  815. /package/node/debug/functions/draw-elem/{loose-bounding-box.d.ts → draw-loose-bounding-box.d.ts} +0 -0
  816. /package/node/debug/functions/draw-elem/{max-vertex.d.ts → draw-max-vertex.d.ts} +0 -0
  817. /package/node/debug/functions/draw-elem/{min-y.d.ts → draw-min-y.d.ts} +0 -0
  818. /package/node/debug/functions/draw-elem/{one-prong-at-dull-corner.d.ts → draw-one-prong-at-dull-corner.d.ts} +0 -0
  819. /package/node/debug/functions/draw-elem/{one-prong.d.ts → draw-one-prong.d.ts} +0 -0
  820. /package/node/debug/functions/draw-elem/{sharp-corner.d.ts → draw-sharp-corner.d.ts} +0 -0
  821. /package/node/debug/functions/draw-elem/{tight-bounding-box.d.ts → draw-tight-bounding-box.d.ts} +0 -0
  822. /package/node/find-mat/{get-dull-corners.d.ts → get-dull-corners-on-loop.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { eAdd, eEstimate, eMult, eNegativeOf, twoDiff } from 'big-float-ts';
2
- import { dot } from "flo-vector2d";
2
+ // import { dot } from "flo-vector2d";
3
3
  import { compareCurvaturesAtInterface } from "./compare-curvatures-at-interface.js";
4
4
  /**
5
5
  * Returns a positive value if the second bezier (of order 1, 2 or 3) curves
@@ -12,68 +12,85 @@ import { compareCurvaturesAtInterface } from "./compare-curvatures-at-interface.
12
12
  * The above obviously necessitates that their endpoints coincide as described.
13
13
  *
14
14
  * Preconditions (for robustness):
15
- * * The beziers has control points with max bit-length of 25 and bit-aligned.
16
15
  * * The bezier does not have infinite curvature at either endpoint
17
16
  *
18
- * This is so the vectors between control points can be
19
- * calculated exactly without resorting to adaptive infinite precision floating
20
- * point operations. Note: aligned to 'grid' here means if you bitwise-and all
21
- * values together the resulting bitlength === the max bithlength of any value.
22
- *
23
17
  * @param psI The incoming bezier that ends at the interface
24
18
  * @param psO The outgoing bezier that starts at the interface
25
19
  */
26
- // TODO - improve and make at least 46-bitlength precondition
27
20
  function getInterfaceCcw(psI, psO) {
28
21
  const lenI = psI.length;
29
22
  // second last control point of incoming curve
30
- const p0 = psI[lenI - 2];
23
+ let p0 = psI[lenI - 2];
31
24
  // last control point of incoming curve / first control point of outgoing
32
- const p1 = psO[0];
25
+ let p1 = psO[0];
33
26
  // second control point of outgoing curve
34
- const p2 = psO[1];
35
- // Max one bit can be added in the calculations below due to bit-alignment
36
- const xE = p1[0] - p0[0]; // tangent x-coordinate
37
- const yE = p1[1] - p0[1]; // tangent y-coordinate
38
- const xS = p2[0] - p1[0]; // tangent x-coordinate
39
- const yS = p2[1] - p1[1]; // tangent y-coordinate
40
- // If the tangent is to be found at t === 0 or t === 1 then using a basic
41
- // property of bezier curves we can find the tangents easily as below
42
- // (non-normalized) tangent of incoming curve at t === 1
43
- const tangentAtEnd = [xE, yE];
44
- // (non-normalized) tangent of outgoing curve at t === 0
45
- const tangentAtStart = [xS, yS];
46
- // const crossTangents = orient2d(p0, p1, p2);
47
- const crossTangents = orient2dPrecise(p0, p1, p2);
48
- if (crossTangents !== 0) {
49
- return crossTangents;
27
+ let p2 = psO[1];
28
+ // infinite curvature - we're now handling this as well
29
+ if (pointsEqual(p0, p1)) {
30
+ p0 = psI[lenI - 3]; // length cannot be 2
31
+ }
32
+ if (pointsEqual(p1, p2)) {
33
+ p2 = psO[2]; // length cannot be 2
50
34
  }
51
- // The dot calculated below will have a max bitlength of
52
- // (2*(maxBitLength + 1)) + 1 === e.g. (2*(25 + 1)) + 1 === 53
53
- // If the preconditions are met it is exact
54
- const dotTangents = dot(tangentAtEnd, tangentAtStart);
55
- if (dotTangents > 0) {
56
- // Curves go in same direction at interface - neither clock or
57
- // anti-clockwise.
58
- // Note: The above comment is not strictly true but as this case is not
59
- // important for the algorithm we return 0
60
- return 0;
35
+ const crossTangents = crossPrecise(p0, p1, p2); // sign will be correct
36
+ const xI = twoDiff(p1[0], p0[0]); // tangent x-coordinate
37
+ const yI = twoDiff(p1[1], p0[1]); // tangent y-coordinate
38
+ const xO = twoDiff(p2[0], p1[0]); // tangent x-coordinate
39
+ const yO = twoDiff(p2[1], p1[1]); // tangent y-coordinate
40
+ const tangentI = [xI, yI];
41
+ const tangentO = [xO, yO];
42
+ const dotTangents = dotPrecise(tangentI, tangentO);
43
+ if (crossTangents !== 0 || dotTangents > 0) {
44
+ return {
45
+ ccw: crossTangents,
46
+ tangentI,
47
+ tangentO,
48
+ // crossTangents,
49
+ dotTangents
50
+ };
61
51
  }
62
52
  // Curves go in opposite directions at interface starting off with the exact
63
53
  // same tangent - look now at curvature to see which has the largest
64
54
  // curvature so we can base the clock or anti-clockwise result on that
65
55
  // Look at curvature
66
- return compareCurvaturesAtInterface(psI.slice().reverse(), psO);
56
+ // TODO2
57
+ // The line below is probably not working correctly for infinite
58
+ // curvature but it should be rare to get here - investiagte.
59
+ // Probably need to resort to length of tangents and then if this is
60
+ // also the same simply look at the last point's ccw wrt the 1st or
61
+ // the second?
62
+ return {
63
+ ccw: compareCurvaturesAtInterface(psI.slice().reverse(), psO),
64
+ tangentI,
65
+ tangentO,
66
+ // crossTangents,
67
+ dotTangents
68
+ };
69
+ }
70
+ function pointsEqual(p1, p2) {
71
+ return p1[0] === p2[0] && p1[1] === p2[1];
72
+ }
73
+ /**
74
+ * The input is two exact double-double coefficient vectors
75
+ *
76
+ * * returns the correct sign
77
+ */
78
+ function dotPrecise(tangentI, tangentO) {
79
+ const abx = eMult(tangentI[0], tangentO[0]);
80
+ const aby = eMult(tangentI[1], tangentO[1]);
81
+ const dot = eAdd(abx, aby);
82
+ return eEstimate(dot);
67
83
  }
68
- /** Returns the cross from A to B to C */
69
- function orient2dPrecise(A, B, C) {
70
- // const detleft = (A[0] - C[0]) * (B[1] - C[1]);
71
- // const detright = (A[1] - C[1]) * (B[0] - C[0]);
72
- // const det = detleft - detright;
73
- const a = twoDiff(A[0], C[0]);
74
- const b = twoDiff(B[1], C[1]);
75
- const c = twoDiff(A[1], C[1]);
76
- const d = twoDiff(B[0], C[0]);
84
+ /**
85
+ * Returns the cross from A to B to C
86
+ *
87
+ * * returns the correct sign
88
+ */
89
+ function crossPrecise(p0, p1, p2) {
90
+ const a = twoDiff(p0[0], p2[0]);
91
+ const b = twoDiff(p1[1], p2[1]);
92
+ const c = twoDiff(p0[1], p2[1]);
93
+ const d = twoDiff(p1[0], p2[0]);
77
94
  const e = eMult(a, b);
78
95
  const f = eMult(c, d);
79
96
  const g = eAdd(e, eNegativeOf(f));
@@ -1 +1 @@
1
- {"version":3,"file":"get-interface-ccw.js","sourceRoot":"","sources":["../../src/corner/get-interface-ccw.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,EAAsB,OAAO,EAAE,MAAM,cAAc,CAAC;AAChG,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AAGpF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,6DAA6D;AAC7D,SAAS,eAAe,CAAC,GAAe,EAAE,GAAe;IACrD,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC;IAExB,8CAA8C;IAC9C,MAAM,EAAE,GAAG,GAAG,CAAC,IAAI,GAAC,CAAC,CAAC,CAAC;IACvB,yEAAyE;IACzE,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IAClB,yCAAyC;IACzC,MAAM,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IAElB,0EAA0E;IAC1E,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAE,uBAAuB;IACrD,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,C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AO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAE/B,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;IACrB,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,EAAC,CAAC,CAAC,CAAC;IAErB,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,EAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAEjC,OAAO,SAAS,CAAC,CAAC,CAAC,CAAC;AACxB,CAAC;AAGD,OAAO,EAAE,eAAe,EAAE,CAAA"}
@@ -0,0 +1,225 @@
1
+ import { CpNode } from "./cp-node.js";
2
+ import { getHoleClosers } from "./fs/get-hole-closers.js";
3
+ import { getSpeed } from "./fs/get-speed.js";
4
+ import { enhanceCpNode } from "./fs/enhance-cp-node.js";
5
+ import { traverseCp } from './fs/traverse-cp.js';
6
+ import { traverseEdges } from './fs/traverse-edges.js';
7
+ import { traverseVertices } from './fs/traverse-vertices.js';
8
+ import { clone } from './fs/clone.js';
9
+ import { getBoundaryBezierPartsToNext } from './fs/get-boundary-bezier-parts-to-next.js';
10
+ import { getBoundaryBeziersToNext } from './fs/get-boundary-beziers-to-next.js';
11
+ import { removeVertex } from '../vertex/remove-vertex.js';
12
+ import { getProngCount } from './fs/get-prong-count.js';
13
+ import { getChildren } from './fs/get-children.js';
14
+ import { getAllOnLoop } from './fs/get-all-on-loop.js';
15
+ import { getAllOnCircle } from './fs/get-all-on-circle.js';
16
+ import { getMatCurveToNext } from './fs/get-mat-curve-to-next.js';
17
+ import { getFirstExit } from './fs/get-first-exit.js';
18
+ import { getRealProngCount } from './fs/get-real-prong-count.js';
19
+ import { isFullyTerminating } from './fs/is-fully-terminating.js';
20
+ import { isOnSameCircle } from './fs/is-on-same-circle.js';
21
+ import { isOneProng } from './fs/is-one-prong.js';
22
+ import { isSharp } from './fs/is-sharp.js';
23
+ import { isTerminating } from './fs/is-terminating.js';
24
+ import { getVertexForwardChildren } from './fs/get-vertex-forward-children.js';
25
+ import { isTwoProng } from './fs/is-two-prong.js';
26
+ import { getBranch } from './fs/get-branch.js';
27
+ import { getBranchBeziers } from './fs/get-branch-beziers.js';
28
+ import { getSalience } from './fs/get-salience.js';
29
+ import { getMatCurveBetween } from './fs/get-mat-curve-between.js';
30
+ import { getEdgeDirection } from './fs/get-edge-direction.js';
31
+ import { getBoundaryBeziersBetween } from './fs/get-boundary-beziers-between.js';
32
+ import { getMatCurvesBetween } from './fs/get-mat-curves-between.js';
33
+ import { getInitialDegAngleBetweenMatCurves } from "./fs/get-angle-between-mat-curves.js";
34
+ import { getAllVertices } from "./fs/get-all-vertices.js";
35
+ declare const CpNodeFs: {
36
+ /**
37
+ * Returns the children of this [[CpNode]] when seen as a MAT edge. Only
38
+ * children in a 'forward' direction are returned. These include all edges
39
+ * except the 'backward' edge given by [[prevOnCircle]], even terminating
40
+ * edges.
41
+ */
42
+ getChildren: typeof getChildren;
43
+ /**
44
+ * Similar to [[getChildren]] but returns the child nodes of the tree when
45
+ * [[CpNode]] is seen as a MAT vertex point (as opposed to edge). In this
46
+ * way the dual graph of the tree can easily be traversed - see e.g.
47
+ * [[traverseVertices]]. Generally, however, traversing the edges is
48
+ * preferred as it returns the entire Medial Axis (by utilizing
49
+ * [[getMatCurveToNext]] on each returned edge).
50
+ */
51
+ getVertexForwardChildren: typeof getVertexForwardChildren;
52
+ /**
53
+ * Returns all [[CpNode]]s on the MAT that this [[CpNode]] is part of
54
+ * starting from the current one and going anti-clockwise around the shape.
55
+ */
56
+ getAllOnLoop: typeof getAllOnLoop;
57
+ /**
58
+ * Return this (except if exclThis is truthy) and the the other CpNodes
59
+ * around the maximal disk vertex circle in an anti-clockwise order.
60
+ * @param exclThis If true the returned array does not include this
61
+ * [[CpNode]].
62
+ */
63
+ getAllOnCircle: typeof getAllOnCircle;
64
+ /**
65
+ * Returns true if the 2 given [[CpNode]]s are on the same maximal disk
66
+ * circle.
67
+ * @param cpNode1 A [[CpNode]].
68
+ * @param cpNode2 Another [[CpNode]]
69
+ */
70
+ isOnSameCircle: typeof isOnSameCircle;
71
+ /**
72
+ * Returns true if this [[CpNode]] is terminating, i.e. implies a leaf MAT
73
+ * vertex.
74
+ *
75
+ * This is always the case for sharp corners and maximal disks with
76
+ * a single contact point. Note, however, that even in these cases there are
77
+ * two contact points stored (sitting 'on top' of each other) for the
78
+ * maximal disk. It can be seen as a limiting case of a two-prong where the
79
+ * distance between two of the contact points tend to zero. One point
80
+ * (represented by a [[CpNode]] of course) will be terminating with the
81
+ * other point being its [[next]], whereas the other point will *not* be
82
+ * terminating and 'points' back into the shape.
83
+ */
84
+ isTerminating: typeof isTerminating;
85
+ /**
86
+ * Like isTerminating() but only returns true if all cpNodes on the circle
87
+ * (except this.prevOnCircle) is terminating.
88
+ */
89
+ isFullyTerminating: typeof isFullyTerminating;
90
+ /**
91
+ * Returns the first [[CpNode]] (from this one by successively applying
92
+ * .nextOnCircle) that exits the circle.
93
+ */
94
+ getFirstExit: typeof getFirstExit;
95
+ /**
96
+ * Returns true if this [[CpNode]] represents a sharp corner, i.e. the
97
+ * limiting case of a two-prong having zero radius.
98
+ *
99
+ * Note that two [[CpNode]]s are stored for each sharp corner, one being
100
+ * terminating and one not. See [[isTerminating]] for more details.
101
+ */
102
+ isSharp: typeof isSharp;
103
+ /**
104
+ * Returns true if this [[CpNode]]'s maximal disk has only one contact point
105
+ * on the shape boundary (up to planar coordinates). These includes sharp
106
+ * corners.
107
+ *
108
+ * Note, however, that two [[CpNode]]s are stored for each such point to
109
+ * preserve symmetry - see [[isTerminating]] for more details.
110
+ */
111
+ isOneProng: typeof isOneProng;
112
+ /**
113
+ * Returns the number of contact points on the maximal disk circle implied
114
+ * by this [[CpNode]].
115
+ *
116
+ * Note, however, that even one-prongs and sharp corners will return 2 (see
117
+ * [[isTerminating]] for more details); if this is not desired use
118
+ * [[getRealProngCount]] instead which will return 1 in these cases.
119
+ */
120
+ getProngCount: typeof getProngCount;
121
+ /**
122
+ * Returns the number of contact points (up to planar coordinates) on the
123
+ * maximal disk circle implied by this [[CpNode]].
124
+ *
125
+ * See also [[getProngCount]].
126
+ */
127
+ getRealProngCount: typeof getRealProngCount;
128
+ /**
129
+ * Primarily for internal use.
130
+ *
131
+ * Compares the order of two [[CpNode]]s. The order is cyclic and depends
132
+ * on a [[CpNode]]'s relative position along the shape boundary.
133
+ */
134
+ cpNodeComparator: (a: CpNode, b: CpNode) => number;
135
+ /**
136
+ * For debugging
137
+ * @param cpNode
138
+ */
139
+ enhanceCpNode: typeof enhanceCpNode;
140
+ /**
141
+ * @internal
142
+ *
143
+ * Traverses the shape from the given `CpNode` going around the shortest path
144
+ * so that only a piece of the shape is traversed and returns the visited
145
+ * `CpNode`s (starting from the given `CpNode`).
146
+ *
147
+ * @param cpStart The `CpNode` from where to start the traversal.
148
+ */
149
+ traverseCp: typeof traverseCp;
150
+ /**
151
+ * Traverses all edges (depth first) of the given MAT tree starting at the given
152
+ * vertex (represented by a [[CpNode]]).
153
+ * @param cpNode Any [[CpNode]] representing the start vertex.
154
+ * @param traverseEdgesCallback A callback function for each CpNode representing the vertex at the
155
+ * start of an edge.
156
+ */
157
+ traverseEdges: typeof traverseEdges;
158
+ /**
159
+ * Traverses the MAT tree and calls the given callback function for each vertex
160
+ * (represented by a [[CpNode]]) on the MAT.
161
+ *
162
+ * It is usually preferable to use [[traverseEdges]] as it allows for the
163
+ * traversal of all the smooth curves representing the MAT.
164
+ * @param cpNode Any [[CpNode]] representing the start vertex.
165
+ * @param traverseVerticesCallback A callback function taking a single [[CpNode]] as parameter.
166
+ */
167
+ traverseVertices: typeof traverseVertices;
168
+ /**
169
+ * Returns a deep clone of this [[CpNode]]. Can be used to copy the MAT
170
+ * since cloning a single [[CpNode]] necessarily implies cloning all
171
+ * [[CpNode]]s on the same MAT tree.
172
+ */
173
+ clone: typeof clone;
174
+ /**
175
+ * Returns the ordered bezier curves from this CpNode to the next CpNode
176
+ * on the boundary.
177
+ * @param cpNode
178
+ */
179
+ getBoundaryBezierPartsToNext: typeof getBoundaryBezierPartsToNext;
180
+ /**
181
+ * Returns the ordered bezier curves from this CpNode to the next CpNode
182
+ * on the boundary.
183
+ * @param cpNode
184
+ */
185
+ getBoundaryBeziersToNext: typeof getBoundaryBeziersToNext;
186
+ /**
187
+ * Removes a cpNode from the MAT.
188
+ * @param cpTree The tree graph holding the [[CpNodes]] of the MAT.
189
+ * @param cpNode The [[CpNode]] to remove.
190
+ */
191
+ removeVertex: typeof removeVertex;
192
+ /**
193
+ * Returns the bezier curve from the maximal disk of the given [[CpNode]] to the
194
+ * next [[CpNode]]'s maximal disk and thus directly represents a piece of the
195
+ * medial axis.
196
+ * @param cpNode
197
+ */
198
+ getMatCurveToNext: typeof getMatCurveToNext;
199
+ isTwoProng: typeof isTwoProng;
200
+ getBranch: typeof getBranch;
201
+ getBranchBeziers: typeof getBranchBeziers;
202
+ getSalience: typeof getSalience;
203
+ /**
204
+ * Returns the bezier curve from the maximal disk of one [[CpNode]] to another
205
+ * [[CpNode]]'s maximal disk.
206
+ * @param cpNodeFrom
207
+ * @param cpNodeTo
208
+ */
209
+ getMatCurveBetween: typeof getMatCurveBetween;
210
+ /**
211
+ * @internal
212
+ * Returns a line segment of unit length starting in the given Vertex center and
213
+ * pointing in the direction of the medial axis (viewed as a rooted tree).
214
+ * @param cpNode
215
+ */
216
+ getEdgeDirection: typeof getEdgeDirection;
217
+ getBoundaryBeziersBetween: typeof getBoundaryBeziersBetween;
218
+ getMatCurvesBetween: typeof getMatCurvesBetween;
219
+ getHoleClosers: typeof getHoleClosers;
220
+ getSpeed: typeof getSpeed;
221
+ getSmoothedSpeed$: (a: number) => (a: CpNode) => number | undefined;
222
+ getInitialDegAngleBetweenMatCurves: typeof getInitialDegAngleBetweenMatCurves;
223
+ getAllVertices: typeof getAllVertices;
224
+ };
225
+ export { CpNodeFs };
@@ -0,0 +1,228 @@
1
+ import { compareCps } from "../contact-point/contact-point.js";
2
+ import { getHoleClosers } from "./fs/get-hole-closers.js";
3
+ import { getSpeed } from "./fs/get-speed.js";
4
+ import { getSmoothedSpeed$ } from "./fs/get-smoothed-speed.js";
5
+ import { enhanceCpNode } from "./fs/enhance-cp-node.js";
6
+ import { traverseCp } from './fs/traverse-cp.js';
7
+ import { traverseEdges } from './fs/traverse-edges.js';
8
+ import { traverseVertices } from './fs/traverse-vertices.js';
9
+ import { clone } from './fs/clone.js';
10
+ import { getBoundaryBezierPartsToNext } from './fs/get-boundary-bezier-parts-to-next.js';
11
+ import { getBoundaryBeziersToNext } from './fs/get-boundary-beziers-to-next.js';
12
+ import { removeVertex } from '../vertex/remove-vertex.js';
13
+ import { getProngCount } from './fs/get-prong-count.js';
14
+ import { getChildren } from './fs/get-children.js';
15
+ import { getAllOnLoop } from './fs/get-all-on-loop.js';
16
+ import { getAllOnCircle } from './fs/get-all-on-circle.js';
17
+ import { getMatCurveToNext } from './fs/get-mat-curve-to-next.js';
18
+ import { getFirstExit } from './fs/get-first-exit.js';
19
+ import { getRealProngCount } from './fs/get-real-prong-count.js';
20
+ import { isFullyTerminating } from './fs/is-fully-terminating.js';
21
+ import { isOnSameCircle } from './fs/is-on-same-circle.js';
22
+ import { isOneProng } from './fs/is-one-prong.js';
23
+ import { isSharp } from './fs/is-sharp.js';
24
+ import { isTerminating } from './fs/is-terminating.js';
25
+ import { getVertexForwardChildren } from './fs/get-vertex-forward-children.js';
26
+ import { isTwoProng } from './fs/is-two-prong.js';
27
+ import { getBranch } from './fs/get-branch.js';
28
+ import { getBranchBeziers } from './fs/get-branch-beziers.js';
29
+ import { getSalience } from './fs/get-salience.js';
30
+ import { getMatCurveBetween } from './fs/get-mat-curve-between.js';
31
+ import { getEdgeDirection } from './fs/get-edge-direction.js';
32
+ import { getBoundaryBeziersBetween } from './fs/get-boundary-beziers-between.js';
33
+ import { getMatCurvesBetween } from './fs/get-mat-curves-between.js';
34
+ import { getInitialDegAngleBetweenMatCurves } from "./fs/get-angle-between-mat-curves.js";
35
+ import { getAllVertices } from "./fs/get-all-vertices.js";
36
+ const cpNodeComparator = (a, b) => compareCps(a.cp, b.cp);
37
+ const CpNodeFs = {
38
+ /**
39
+ * Returns the children of this [[CpNode]] when seen as a MAT edge. Only
40
+ * children in a 'forward' direction are returned. These include all edges
41
+ * except the 'backward' edge given by [[prevOnCircle]], even terminating
42
+ * edges.
43
+ */
44
+ getChildren,
45
+ /**
46
+ * Similar to [[getChildren]] but returns the child nodes of the tree when
47
+ * [[CpNode]] is seen as a MAT vertex point (as opposed to edge). In this
48
+ * way the dual graph of the tree can easily be traversed - see e.g.
49
+ * [[traverseVertices]]. Generally, however, traversing the edges is
50
+ * preferred as it returns the entire Medial Axis (by utilizing
51
+ * [[getMatCurveToNext]] on each returned edge).
52
+ */
53
+ getVertexForwardChildren,
54
+ /**
55
+ * Returns all [[CpNode]]s on the MAT that this [[CpNode]] is part of
56
+ * starting from the current one and going anti-clockwise around the shape.
57
+ */
58
+ getAllOnLoop,
59
+ /**
60
+ * Return this (except if exclThis is truthy) and the the other CpNodes
61
+ * around the maximal disk vertex circle in an anti-clockwise order.
62
+ * @param exclThis If true the returned array does not include this
63
+ * [[CpNode]].
64
+ */
65
+ getAllOnCircle,
66
+ /**
67
+ * Returns true if the 2 given [[CpNode]]s are on the same maximal disk
68
+ * circle.
69
+ * @param cpNode1 A [[CpNode]].
70
+ * @param cpNode2 Another [[CpNode]]
71
+ */
72
+ isOnSameCircle,
73
+ /**
74
+ * Returns true if this [[CpNode]] is terminating, i.e. implies a leaf MAT
75
+ * vertex.
76
+ *
77
+ * This is always the case for sharp corners and maximal disks with
78
+ * a single contact point. Note, however, that even in these cases there are
79
+ * two contact points stored (sitting 'on top' of each other) for the
80
+ * maximal disk. It can be seen as a limiting case of a two-prong where the
81
+ * distance between two of the contact points tend to zero. One point
82
+ * (represented by a [[CpNode]] of course) will be terminating with the
83
+ * other point being its [[next]], whereas the other point will *not* be
84
+ * terminating and 'points' back into the shape.
85
+ */
86
+ isTerminating,
87
+ /**
88
+ * Like isTerminating() but only returns true if all cpNodes on the circle
89
+ * (except this.prevOnCircle) is terminating.
90
+ */
91
+ isFullyTerminating,
92
+ /**
93
+ * Returns the first [[CpNode]] (from this one by successively applying
94
+ * .nextOnCircle) that exits the circle.
95
+ */
96
+ getFirstExit,
97
+ /**
98
+ * Returns true if this [[CpNode]] represents a sharp corner, i.e. the
99
+ * limiting case of a two-prong having zero radius.
100
+ *
101
+ * Note that two [[CpNode]]s are stored for each sharp corner, one being
102
+ * terminating and one not. See [[isTerminating]] for more details.
103
+ */
104
+ isSharp,
105
+ /**
106
+ * Returns true if this [[CpNode]]'s maximal disk has only one contact point
107
+ * on the shape boundary (up to planar coordinates). These includes sharp
108
+ * corners.
109
+ *
110
+ * Note, however, that two [[CpNode]]s are stored for each such point to
111
+ * preserve symmetry - see [[isTerminating]] for more details.
112
+ */
113
+ isOneProng,
114
+ /**
115
+ * Returns the number of contact points on the maximal disk circle implied
116
+ * by this [[CpNode]].
117
+ *
118
+ * Note, however, that even one-prongs and sharp corners will return 2 (see
119
+ * [[isTerminating]] for more details); if this is not desired use
120
+ * [[getRealProngCount]] instead which will return 1 in these cases.
121
+ */
122
+ getProngCount,
123
+ /**
124
+ * Returns the number of contact points (up to planar coordinates) on the
125
+ * maximal disk circle implied by this [[CpNode]].
126
+ *
127
+ * See also [[getProngCount]].
128
+ */
129
+ getRealProngCount,
130
+ /**
131
+ * Primarily for internal use.
132
+ *
133
+ * Compares the order of two [[CpNode]]s. The order is cyclic and depends
134
+ * on a [[CpNode]]'s relative position along the shape boundary.
135
+ */
136
+ cpNodeComparator,
137
+ /**
138
+ * For debugging
139
+ * @param cpNode
140
+ */
141
+ enhanceCpNode,
142
+ /**
143
+ * @internal
144
+ *
145
+ * Traverses the shape from the given `CpNode` going around the shortest path
146
+ * so that only a piece of the shape is traversed and returns the visited
147
+ * `CpNode`s (starting from the given `CpNode`).
148
+ *
149
+ * @param cpStart The `CpNode` from where to start the traversal.
150
+ */
151
+ traverseCp,
152
+ /**
153
+ * Traverses all edges (depth first) of the given MAT tree starting at the given
154
+ * vertex (represented by a [[CpNode]]).
155
+ * @param cpNode Any [[CpNode]] representing the start vertex.
156
+ * @param traverseEdgesCallback A callback function for each CpNode representing the vertex at the
157
+ * start of an edge.
158
+ */
159
+ traverseEdges,
160
+ /**
161
+ * Traverses the MAT tree and calls the given callback function for each vertex
162
+ * (represented by a [[CpNode]]) on the MAT.
163
+ *
164
+ * It is usually preferable to use [[traverseEdges]] as it allows for the
165
+ * traversal of all the smooth curves representing the MAT.
166
+ * @param cpNode Any [[CpNode]] representing the start vertex.
167
+ * @param traverseVerticesCallback A callback function taking a single [[CpNode]] as parameter.
168
+ */
169
+ traverseVertices,
170
+ /**
171
+ * Returns a deep clone of this [[CpNode]]. Can be used to copy the MAT
172
+ * since cloning a single [[CpNode]] necessarily implies cloning all
173
+ * [[CpNode]]s on the same MAT tree.
174
+ */
175
+ clone,
176
+ /**
177
+ * Returns the ordered bezier curves from this CpNode to the next CpNode
178
+ * on the boundary.
179
+ * @param cpNode
180
+ */
181
+ getBoundaryBezierPartsToNext,
182
+ /**
183
+ * Returns the ordered bezier curves from this CpNode to the next CpNode
184
+ * on the boundary.
185
+ * @param cpNode
186
+ */
187
+ getBoundaryBeziersToNext,
188
+ /**
189
+ * Removes a cpNode from the MAT.
190
+ * @param cpTree The tree graph holding the [[CpNodes]] of the MAT.
191
+ * @param cpNode The [[CpNode]] to remove.
192
+ */
193
+ removeVertex,
194
+ /**
195
+ * Returns the bezier curve from the maximal disk of the given [[CpNode]] to the
196
+ * next [[CpNode]]'s maximal disk and thus directly represents a piece of the
197
+ * medial axis.
198
+ * @param cpNode
199
+ */
200
+ getMatCurveToNext,
201
+ isTwoProng,
202
+ getBranch,
203
+ getBranchBeziers,
204
+ getSalience,
205
+ /**
206
+ * Returns the bezier curve from the maximal disk of one [[CpNode]] to another
207
+ * [[CpNode]]'s maximal disk.
208
+ * @param cpNodeFrom
209
+ * @param cpNodeTo
210
+ */
211
+ getMatCurveBetween,
212
+ /**
213
+ * @internal
214
+ * Returns a line segment of unit length starting in the given Vertex center and
215
+ * pointing in the direction of the medial axis (viewed as a rooted tree).
216
+ * @param cpNode
217
+ */
218
+ getEdgeDirection,
219
+ getBoundaryBeziersBetween,
220
+ getMatCurvesBetween,
221
+ getHoleClosers,
222
+ getSpeed,
223
+ getSmoothedSpeed$,
224
+ getInitialDegAngleBetweenMatCurves,
225
+ getAllVertices
226
+ };
227
+ export { CpNodeFs };
228
+ //# sourceMappingURL=cp-node-fs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cp-node-fs.js","sourceRoot":"","sources":["../../src/cp-node/cp-node-fs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,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