flo-mat 4.1.4 → 5.0.1

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 (379) hide show
  1. package/__tests__/closest-boundary-point/get-endpoint-info.spec.ts +140 -0
  2. package/__tests__/closest-boundary-point/root-interval-to-distance-squared-interval.spec.ts +87 -0
  3. package/__tests__/cp-node/circle-identity.spec.ts +56 -0
  4. package/__tests__/cp-node/fs/get-all-on-loop-by-loop.spec.ts +55 -0
  5. package/__tests__/cp-node/fs/get-angle-between-mat-curves.spec.ts +39 -3
  6. package/__tests__/cp-node/fs/get-boundary-bezier-parts-to-next.spec.ts +87 -3
  7. package/__tests__/cp-node/fs/get-boundary-beziers-between.spec.ts +68 -3
  8. package/__tests__/cp-node/fs/get-boundary-beziers-to-next.spec.ts +41 -3
  9. package/__tests__/cp-node/fs/get-boundary-distance-to-next.spec.ts +20 -3
  10. package/__tests__/cp-node/fs/get-branch-beziers.spec.ts +42 -3
  11. package/__tests__/cp-node/fs/get-branch.spec.ts +60 -3
  12. package/__tests__/cp-node/fs/get-cp-node-ordering.spec.ts +19 -3
  13. package/__tests__/cp-node/fs/get-distance-to-next.spec.ts +37 -4
  14. package/__tests__/cp-node/fs/get-edge-direction.spec.ts +50 -3
  15. package/__tests__/cp-node/fs/get-first-exit.spec.ts +78 -3
  16. package/__tests__/cp-node/fs/get-hole-closers.spec.ts +32 -3
  17. package/__tests__/cp-node/fs/get-implied-boundary-bezier-between.spec.ts +48 -3
  18. package/__tests__/cp-node/fs/get-mat-curve-between.spec.ts +77 -3
  19. package/__tests__/cp-node/fs/get-mat-curve-to-next.spec.ts +17 -4
  20. package/__tests__/cp-node/fs/get-mat-curves-between.spec.ts +38 -3
  21. package/__tests__/cp-node/fs/get-salience.spec.ts +68 -3
  22. package/__tests__/cp-node/fs/get-vertex-forward-children.spec.ts +40 -3
  23. package/__tests__/cp-node/fs/insert-cp-node.spec.ts +87 -3
  24. package/__tests__/cp-node/fs/is-special.spec.ts +1 -1
  25. package/__tests__/cp-node/fs/remove-cp-node.spec.ts +42 -3
  26. package/__tests__/find-2-prong/calc-seperation-tolerance.spec.ts +46 -0
  27. package/__tests__/find-2-prong/get-medial/dd-get-medial-point-coeffs-same-curve.spec.ts +7 -5
  28. package/__tests__/find-2-prong/get-medial/dd-get-medial-point-coeffs.spec.ts +4 -2
  29. package/__tests__/find-2-prong/get-medial/get-closest-points.spec.ts +1 -1
  30. package/__tests__/floyd-warshall/get-graph.spec.ts +100 -0
  31. package/__tests__/get-mats-with-hole.ts +28 -0
  32. package/__tests__/get-mats1.spec.ts +61 -0
  33. package/__tests__/get-mats1.ts +75 -67
  34. package/__tests__/helpers/cp-node-by-id.ts +27 -0
  35. package/__tests__/helpers/expect-point-close.ts +42 -0
  36. package/__tests__/mat/hausdorff-distance-one-sided-exceeds.spec.ts +129 -0
  37. package/__tests__/mat/simplify-mat.spec.ts +85 -0
  38. package/__tests__/reconstruct-from-mat/reconstruct-from-mat.spec.ts +39 -0
  39. package/__tests__/specific-cases/test-svgs/achispado.svg +14 -0
  40. package/__tests__/utils/get-beziers-from-tangents.spec.ts +142 -0
  41. package/browser/index.js +17882 -13800
  42. package/browser/index.min.js +1 -1
  43. package/node/add-n-prong.ts/join-spokes.js +3 -2
  44. package/node/add-n-prong.ts/join-spokes.js.map +1 -1
  45. package/node/closest-boundary-point/cull-curve-pieces.d.ts +21 -0
  46. package/node/closest-boundary-point/cull-curve-pieces.js +40 -0
  47. package/node/closest-boundary-point/cull-curve-pieces.js.map +1 -0
  48. package/node/closest-boundary-point/get-close-boundary-points-certified.js +5 -2
  49. package/node/closest-boundary-point/get-close-boundary-points-certified.js.map +1 -1
  50. package/node/closest-boundary-point/get-endpoint-info.d.ts +39 -0
  51. package/node/closest-boundary-point/get-endpoint-info.js +78 -0
  52. package/node/closest-boundary-point/get-endpoint-info.js.map +1 -0
  53. package/node/closest-boundary-point/get-potential-closest-points-on-curve-certified.js +5 -19
  54. package/node/closest-boundary-point/get-potential-closest-points-on-curve-certified.js.map +1 -1
  55. package/node/closest-boundary-point/root-interval-to-distance-squared-interval.d.ts +17 -5
  56. package/node/closest-boundary-point/root-interval-to-distance-squared-interval.js +37 -50
  57. package/node/closest-boundary-point/root-interval-to-distance-squared-interval.js.map +1 -1
  58. package/node/corner/get-corner.d.ts +18 -1
  59. package/node/corner/get-corner.js +8 -1
  60. package/node/corner/get-corner.js.map +1 -1
  61. package/node/corner/get-interface-ccw.js.map +1 -1
  62. package/node/cp-node/cp-node.d.ts +4 -3
  63. package/node/cp-node/fs/enhance-cp-node.d.ts +9 -9
  64. package/node/cp-node/fs/get-all-on-loop-by-loop.js +0 -4
  65. package/node/cp-node/fs/get-all-on-loop-by-loop.js.map +1 -1
  66. package/node/cp-node/fs/get-angle-between-mat-curves.d.ts +1 -1
  67. package/node/cp-node/fs/get-angle-between-mat-curves.js +7 -4
  68. package/node/cp-node/fs/get-angle-between-mat-curves.js.map +1 -1
  69. package/node/cp-node/fs/get-boundary-beziers-between.d.ts +6 -4
  70. package/node/cp-node/fs/get-boundary-beziers-between.js +6 -4
  71. package/node/cp-node/fs/get-boundary-beziers-between.js.map +1 -1
  72. package/node/cp-node/fs/get-branch-beziers.d.ts +2 -1
  73. package/node/cp-node/fs/get-branch-beziers.js +3 -2
  74. package/node/cp-node/fs/get-branch-beziers.js.map +1 -1
  75. package/node/cp-node/fs/get-branch.js +1 -2
  76. package/node/cp-node/fs/get-branch.js.map +1 -1
  77. package/node/cp-node/fs/get-distance-to-next.js +4 -2
  78. package/node/cp-node/fs/get-distance-to-next.js.map +1 -1
  79. package/node/cp-node/fs/get-edge-direction.js +3 -2
  80. package/node/cp-node/fs/get-edge-direction.js.map +1 -1
  81. package/node/cp-node/fs/get-first-exit.d.ts +7 -3
  82. package/node/cp-node/fs/get-first-exit.js +13 -11
  83. package/node/cp-node/fs/get-first-exit.js.map +1 -1
  84. package/node/cp-node/fs/get-implied-boundary-bezier-between.d.ts +10 -2
  85. package/node/cp-node/fs/get-implied-boundary-bezier-between.js +11 -54
  86. package/node/cp-node/fs/get-implied-boundary-bezier-between.js.map +1 -1
  87. package/node/cp-node/fs/get-mat-curve-between.d.ts +5 -3
  88. package/node/cp-node/fs/get-mat-curve-between.js +6 -49
  89. package/node/cp-node/fs/get-mat-curve-between.js.map +1 -1
  90. package/node/cp-node/fs/get-mat-curve-to-next.d.ts +1 -1
  91. package/node/cp-node/fs/get-mat-curves-between.d.ts +8 -0
  92. package/node/cp-node/fs/get-mat-curves-between.js +9 -2
  93. package/node/cp-node/fs/get-mat-curves-between.js.map +1 -1
  94. package/node/cp-node/fs/get-real-prong-count.d.ts +2 -1
  95. package/node/cp-node/fs/get-real-prong-count.js +11 -5
  96. package/node/cp-node/fs/get-real-prong-count.js.map +1 -1
  97. package/node/cp-node/fs/get-salience.d.ts +10 -0
  98. package/node/cp-node/fs/get-salience.js +17 -1
  99. package/node/cp-node/fs/get-salience.js.map +1 -1
  100. package/node/cp-node/fs/is-fully-terminating.d.ts +4 -2
  101. package/node/cp-node/fs/is-fully-terminating.js +6 -17
  102. package/node/cp-node/fs/is-fully-terminating.js.map +1 -1
  103. package/node/cp-node/fs/is-on-same-circle.d.ts +3 -0
  104. package/node/cp-node/fs/is-on-same-circle.js +4 -4
  105. package/node/cp-node/fs/is-on-same-circle.js.map +1 -1
  106. package/node/cp-node/fs/is-on-same-loop.d.ts +1 -1
  107. package/node/cp-node/fs/is-special.d.ts +7 -0
  108. package/node/cp-node/fs/is-special.js +9 -2
  109. package/node/cp-node/fs/is-special.js.map +1 -1
  110. package/node/cp-node/fs/is-vertex.d.ts +1 -1
  111. package/node/cp-node/fs/traverse-edges.d.ts +7 -3
  112. package/node/cp-node/fs/traverse-edges.js +7 -3
  113. package/node/cp-node/fs/traverse-edges.js.map +1 -1
  114. package/node/cp-node/stringification/from-stringifyable.d.ts +2 -2
  115. package/node/cp-node/stringification/from-stringifyable.js +17 -1
  116. package/node/cp-node/stringification/from-stringifyable.js.map +1 -1
  117. package/node/cp-node/stringification/to-stringifyable.d.ts +3 -3
  118. package/node/cp-node/stringification/to-stringifyable.js +3 -3
  119. package/node/debug/debug.d.ts +26 -3
  120. package/node/debug/debug.js +16 -5
  121. package/node/debug/debug.js.map +1 -1
  122. package/node/find-2-prong/add-2-prong.js +7 -9
  123. package/node/find-2-prong/add-2-prong.js.map +1 -1
  124. package/node/find-2-prong/calc-seperation-tolerance.d.ts +28 -5
  125. package/node/find-2-prong/calc-seperation-tolerance.js +32 -89
  126. package/node/find-2-prong/calc-seperation-tolerance.js.map +1 -1
  127. package/node/find-2-prong/find-2-prong.js +8 -10
  128. package/node/find-2-prong/find-2-prong.js.map +1 -1
  129. package/node/find-2-prong/find-and-add-2-prongs.js +2 -2
  130. package/node/find-2-prong/find-and-add-2-prongs.js.map +1 -1
  131. package/node/find-2-prong/get-medial/get-antipodal-points.d.ts +1 -2
  132. package/node/find-2-prong/get-medial/get-antipodal-points.js +2 -3
  133. package/node/find-2-prong/get-medial/get-antipodal-points.js.map +1 -1
  134. package/node/find-2-prong/get-medial/get-closest-points.d.ts +1 -8
  135. package/node/find-2-prong/get-medial/get-closest-points.js +4 -40
  136. package/node/find-2-prong/get-medial/get-closest-points.js.map +1 -1
  137. package/node/find-2-prong/reduce-radius.d.ts +1 -1
  138. package/node/find-2-prong/reduce-radius.js +6 -3
  139. package/node/find-2-prong/reduce-radius.js.map +1 -1
  140. package/node/find-3-prong/calc-better-x.js +1 -1
  141. package/node/find-3-prong/calc-better-x.js.map +1 -1
  142. package/node/find-3-prong/find-3-prong-for-delta3s.d.ts +3 -2
  143. package/node/find-3-prong/find-3-prong-for-delta3s.js +36 -42
  144. package/node/find-3-prong/find-3-prong-for-delta3s.js.map +1 -1
  145. package/node/find-3-prong/find-3-prong.js +3 -1
  146. package/node/find-3-prong/find-3-prong.js.map +1 -1
  147. package/node/find-3-prong/find-and-add-3-prongs.js +16 -0
  148. package/node/find-3-prong/find-and-add-3-prongs.js.map +1 -1
  149. package/node/find-mat/create-initial-cp-tree.js +2 -2
  150. package/node/find-mat/create-initial-cp-tree.js.map +1 -1
  151. package/node/find-mat/find-mat.js +3 -4
  152. package/node/find-mat/find-mat.js.map +1 -1
  153. package/node/find-mat/find-mats.d.ts +6 -12
  154. package/node/find-mat/find-mats.js +10 -27
  155. package/node/find-mat/find-mats.js.map +1 -1
  156. package/node/find-mat/get-dull-corners-on-loop.js +2 -2
  157. package/node/find-mat/get-dull-corners-on-loop.js.map +1 -1
  158. package/node/find-mat/get-for-1-prongs-on-loop.js +36 -8
  159. package/node/find-mat/get-for-1-prongs-on-loop.js.map +1 -1
  160. package/node/find-mat/get-meta.d.ts +14 -4
  161. package/node/find-mat/get-meta.js +30 -24
  162. package/node/find-mat/get-meta.js.map +1 -1
  163. package/node/find-mat/get-sharp-corners.js +2 -2
  164. package/node/find-mat/get-sharp-corners.js.map +1 -1
  165. package/node/find-mat/mat-options.d.ts +2 -2
  166. package/node/floyd-warshall/get-graph.d.ts +12 -1
  167. package/node/floyd-warshall/get-graph.js +41 -38
  168. package/node/floyd-warshall/get-graph.js.map +1 -1
  169. package/node/geometry/get-bounding-box-.d.ts +16 -2
  170. package/node/geometry/get-bounding-box-.js +5 -2
  171. package/node/geometry/get-bounding-box-.js.map +1 -1
  172. package/node/geometry/get-closest-square-distance-to-rect.d.ts +3 -0
  173. package/node/geometry/get-closest-square-distance-to-rect.js +7 -5
  174. package/node/geometry/get-closest-square-distance-to-rect.js.map +1 -1
  175. package/node/geometry/get-closest-squared-distance-to-rotated-rect.d.ts +4 -0
  176. package/node/geometry/get-closest-squared-distance-to-rotated-rect.js +12 -5
  177. package/node/geometry/get-closest-squared-distance-to-rotated-rect.js.map +1 -1
  178. package/node/get-medial-points/double-double/dd-get-medial-point-coeffs-bez3.js +1 -2
  179. package/node/get-medial-points/double-double/dd-get-medial-point-coeffs-bez3.js.map +1 -1
  180. package/node/index.d.ts +3 -2
  181. package/node/index.js +2 -1
  182. package/node/index.js.map +1 -1
  183. package/node/mat/clone-mat.d.ts +9 -0
  184. package/node/mat/clone-mat.js +17 -0
  185. package/node/mat/clone-mat.js.map +1 -0
  186. package/node/mat/clone-meta.d.ts +12 -0
  187. package/node/mat/clone-meta.js +24 -0
  188. package/node/mat/clone-meta.js.map +1 -0
  189. package/node/mat/get-boundary-piece-beziers.d.ts +5 -0
  190. package/node/mat/get-boundary-piece-beziers.js +7 -93
  191. package/node/mat/get-boundary-piece-beziers.js.map +1 -1
  192. package/node/mat/get-closeby-cp-if-exist.js +2 -1
  193. package/node/mat/get-closeby-cp-if-exist.js.map +1 -1
  194. package/node/mat/get-largest-3-prong.d.ts +6 -0
  195. package/node/mat/get-largest-3-prong.js +8 -5
  196. package/node/mat/get-largest-3-prong.js.map +1 -1
  197. package/node/mat/get-largest-vertex.d.ts +15 -1
  198. package/node/mat/get-largest-vertex.js +20 -7
  199. package/node/mat/get-largest-vertex.js.map +1 -1
  200. package/node/mat/hausdorff-distance-one-sided-exceeds.d.ts +79 -0
  201. package/node/mat/hausdorff-distance-one-sided-exceeds.js +251 -0
  202. package/node/mat/hausdorff-distance-one-sided-exceeds.js.map +1 -0
  203. package/node/mat/mat-meta.d.ts +0 -6
  204. package/node/mat/simplify-mat.d.ts +25 -8
  205. package/node/mat/simplify-mat.js +182 -53
  206. package/node/mat/simplify-mat.js.map +1 -1
  207. package/node/mat/trim-mat.d.ts +4 -2
  208. package/node/mat/trim-mat.js +3 -1
  209. package/node/mat/trim-mat.js.map +1 -1
  210. package/node/point-on-shape/get-boundary-tangent-line.d.ts +19 -0
  211. package/node/point-on-shape/get-boundary-tangent-line.js +33 -0
  212. package/node/point-on-shape/get-boundary-tangent-line.js.map +1 -0
  213. package/node/point-on-shape/get-osculating-circle.d.ts +6 -4
  214. package/node/point-on-shape/get-osculating-circle.js +6 -4
  215. package/node/point-on-shape/get-osculating-circle.js.map +1 -1
  216. package/node/point-on-shape/get-pos-corner.js +2 -2
  217. package/node/point-on-shape/get-pos-corner.js.map +1 -1
  218. package/node/point-on-shape/point-on-shape.d.ts +5 -0
  219. package/node/reconstruct-from-mat/reconstruct-from-mat.js +20 -80
  220. package/node/reconstruct-from-mat/reconstruct-from-mat.js.map +1 -1
  221. package/node/reconstruct-from-mat/remove-sat-induced-trivial-3prongs.d.ts +4 -0
  222. package/node/reconstruct-from-mat/remove-sat-induced-trivial-3prongs.js +4 -0
  223. package/node/reconstruct-from-mat/remove-sat-induced-trivial-3prongs.js.map +1 -1
  224. package/node/sat/cull.d.ts +7 -6
  225. package/node/sat/cull.js +13 -16
  226. package/node/sat/cull.js.map +1 -1
  227. package/node/sat/get-sat-culls.d.ts +12 -2
  228. package/node/sat/get-sat-culls.js +21 -16
  229. package/node/sat/get-sat-culls.js.map +1 -1
  230. package/node/svg/get-shape-bounds.d.ts +1 -12
  231. package/node/svg/get-shape-bounds.js +2 -3
  232. package/node/svg/get-shape-bounds.js.map +1 -1
  233. package/node/sweep-line/sweep-line.js.map +1 -1
  234. package/node/utils/get-beziers-from-tangents.d.ts +28 -0
  235. package/node/utils/get-beziers-from-tangents.js +92 -0
  236. package/node/utils/get-beziers-from-tangents.js.map +1 -0
  237. package/node/vertex/remove-vertex.d.ts +5 -3
  238. package/node/vertex/remove-vertex.js +5 -3
  239. package/node/vertex/remove-vertex.js.map +1 -1
  240. package/package.json +16 -16
  241. package/qv-infinite-loop.md +120 -0
  242. package/src/add-n-prong.ts/join-spokes.ts +4 -2
  243. package/src/closest-boundary-point/cull-curve-pieces.ts +49 -0
  244. package/src/closest-boundary-point/get-close-boundary-points-certified.ts +5 -2
  245. package/src/closest-boundary-point/get-endpoint-info.ts +96 -0
  246. package/src/closest-boundary-point/get-potential-closest-points-on-curve-certified.ts +5 -23
  247. package/src/closest-boundary-point/root-interval-to-distance-squared-interval.ts +42 -60
  248. package/src/corner/get-corner.ts +10 -1
  249. package/src/corner/get-interface-ccw.ts +2 -2
  250. package/src/cp-node/cp-node.ts +4 -3
  251. package/src/cp-node/fs/get-all-on-loop-by-loop.ts +0 -4
  252. package/src/cp-node/fs/get-angle-between-mat-curves.ts +9 -5
  253. package/src/cp-node/fs/get-boundary-beziers-between.ts +10 -8
  254. package/src/cp-node/fs/get-branch-beziers.ts +3 -2
  255. package/src/cp-node/fs/get-branch.ts +1 -2
  256. package/src/cp-node/fs/get-distance-to-next.ts +4 -2
  257. package/src/cp-node/fs/get-edge-direction.ts +4 -2
  258. package/src/cp-node/fs/get-first-exit.ts +15 -14
  259. package/src/cp-node/fs/get-implied-boundary-bezier-between.ts +18 -70
  260. package/src/cp-node/fs/get-mat-curve-between.ts +10 -67
  261. package/src/cp-node/fs/get-mat-curves-between.ts +9 -2
  262. package/src/cp-node/fs/get-real-prong-count.ts +11 -7
  263. package/src/cp-node/fs/get-salience.ts +15 -2
  264. package/src/cp-node/fs/is-fully-terminating.ts +6 -22
  265. package/src/cp-node/fs/is-on-same-circle.ts +6 -7
  266. package/src/cp-node/fs/is-on-same-loop.ts +2 -2
  267. package/src/cp-node/fs/is-special.ts +11 -6
  268. package/src/cp-node/fs/is-vertex.ts +1 -1
  269. package/src/cp-node/fs/traverse-edges.ts +8 -4
  270. package/src/cp-node/stringification/from-stringifyable.ts +75 -58
  271. package/src/cp-node/stringification/to-stringifyable.ts +3 -3
  272. package/src/debug/debug.ts +44 -8
  273. package/src/find-2-prong/add-2-prong.ts +9 -11
  274. package/src/find-2-prong/calc-seperation-tolerance.ts +34 -115
  275. package/src/find-2-prong/find-2-prong.ts +9 -11
  276. package/src/find-2-prong/find-and-add-2-prongs.ts +2 -2
  277. package/src/find-2-prong/get-medial/get-antipodal-points.ts +1 -3
  278. package/src/find-2-prong/get-medial/get-closest-points.ts +6 -51
  279. package/src/find-2-prong/reduce-radius.ts +6 -4
  280. package/src/find-3-prong/calc-better-x.ts +2 -2
  281. package/src/find-3-prong/find-3-prong-for-delta3s.ts +197 -214
  282. package/src/find-3-prong/find-3-prong.ts +54 -51
  283. package/src/find-3-prong/find-and-add-3-prongs.ts +20 -1
  284. package/src/find-mat/create-initial-cp-tree.ts +2 -2
  285. package/src/find-mat/find-mat.ts +4 -6
  286. package/src/find-mat/find-mats.ts +83 -105
  287. package/src/find-mat/get-dull-corners-on-loop.ts +2 -2
  288. package/src/find-mat/get-for-1-prongs-on-loop.ts +40 -8
  289. package/src/find-mat/get-meta.ts +34 -39
  290. package/src/find-mat/get-sharp-corners.ts +2 -2
  291. package/src/find-mat/mat-options.ts +2 -2
  292. package/src/floyd-warshall/get-graph.ts +46 -47
  293. package/src/geometry/get-bounding-box-.ts +5 -2
  294. package/src/geometry/get-closest-square-distance-to-rect.ts +7 -7
  295. package/src/geometry/get-closest-squared-distance-to-rotated-rect.ts +15 -13
  296. package/src/get-medial-points/double-double/dd-get-medial-point-coeffs-bez3.ts +1 -2
  297. package/src/index.ts +3 -2
  298. package/src/mat/clone-mat.ts +9 -3
  299. package/src/mat/clone-meta.ts +8 -0
  300. package/src/mat/get-boundary-piece-beziers.ts +16 -117
  301. package/src/mat/get-closeby-cp-if-exist.ts +3 -1
  302. package/src/mat/get-largest-3-prong.ts +9 -6
  303. package/src/mat/get-largest-vertex.ts +25 -9
  304. package/src/mat/hausdorff-distance-one-sided-exceeds.ts +314 -0
  305. package/src/mat/mat-meta.ts +0 -9
  306. package/src/mat/simplify-mat.ts +254 -116
  307. package/src/mat/trim-mat.ts +6 -4
  308. package/src/point-on-shape/get-boundary-tangent-line.ts +36 -0
  309. package/src/point-on-shape/get-osculating-circle.ts +7 -5
  310. package/src/point-on-shape/get-pos-corner.ts +2 -2
  311. package/src/point-on-shape/point-on-shape.ts +5 -0
  312. package/src/reconstruct-from-mat/reconstruct-from-mat.ts +22 -111
  313. package/src/reconstruct-from-mat/remove-sat-induced-trivial-3prongs.ts +4 -0
  314. package/src/sat/cull.ts +16 -20
  315. package/src/sat/get-sat-culls.ts +28 -23
  316. package/src/svg/get-shape-bounds.ts +2 -3
  317. package/src/sweep-line/sweep-line.ts +1 -1
  318. package/src/utils/deg-to-rad.ts +4 -2
  319. package/src/utils/get-beziers-from-tangents.ts +110 -0
  320. package/src/utils/map-map.ts +1 -1
  321. package/src/utils/rad-to-deg.ts +4 -1
  322. package/src/vertex/remove-vertex.ts +5 -3
  323. package/webpack.config.cjs +7 -2
  324. package/__tests__/cp-node/fs/get-distance-between.spec.ts +0 -7
  325. package/__tests__/cp-node/fs/get-terminating-on-circle.spec.ts +0 -24
  326. package/__tests__/cp-node/fs/is-single-3-prong.spec.ts +0 -17
  327. package/__tests__/cp-node/fs/iterate-all-on-loop.spec.ts +0 -17
  328. package/__tests__/cp-node/fs/traverse-all-forward.spec.ts +0 -14
  329. package/node/closest-boundary-point/cull-bezier-pieces-1.d.ts +0 -9
  330. package/node/closest-boundary-point/cull-bezier-pieces-1.js +0 -17
  331. package/node/closest-boundary-point/cull-bezier-pieces-1.js.map +0 -1
  332. package/node/closest-boundary-point/cull-by-loose-bounding-box.d.ts +0 -13
  333. package/node/closest-boundary-point/cull-by-loose-bounding-box.js +0 -27
  334. package/node/closest-boundary-point/cull-by-loose-bounding-box.js.map +0 -1
  335. package/node/closest-boundary-point/cull-by-tight-boundary-box.d.ts +0 -11
  336. package/node/closest-boundary-point/cull-by-tight-boundary-box.js +0 -27
  337. package/node/closest-boundary-point/cull-by-tight-boundary-box.js.map +0 -1
  338. package/node/cp-node/fs/find-first.d.ts +0 -10
  339. package/node/cp-node/fs/find-first.js +0 -19
  340. package/node/cp-node/fs/find-first.js.map +0 -1
  341. package/node/debug/functions/check-ordering.d.ts +0 -4
  342. package/node/debug/functions/check-ordering.js +0 -43
  343. package/node/debug/functions/check-ordering.js.map +0 -1
  344. package/node/find-2-prong/cull-bezier-pieces.d.ts +0 -13
  345. package/node/find-2-prong/cull-bezier-pieces.js +0 -43
  346. package/node/find-2-prong/cull-bezier-pieces.js.map +0 -1
  347. package/node/floyd-warshall/get-hole-closer-pairs.d.ts +0 -8
  348. package/node/floyd-warshall/get-hole-closer-pairs.js +0 -27
  349. package/node/floyd-warshall/get-hole-closer-pairs.js.map +0 -1
  350. package/node/utils/dual-set.d.ts +0 -27
  351. package/node/utils/dual-set.js +0 -55
  352. package/node/utils/dual-set.js.map +0 -1
  353. package/node/utils/tri-map.d.ts +0 -27
  354. package/node/utils/tri-map.js +0 -49
  355. package/node/utils/tri-map.js.map +0 -1
  356. package/src/closest-boundary-point/cull-bezier-pieces-1.ts +0 -36
  357. package/src/closest-boundary-point/cull-by-loose-bounding-box.ts +0 -42
  358. package/src/closest-boundary-point/cull-by-tight-boundary-box.ts +0 -43
  359. package/src/closest-boundary-point/get-p-from-box.ts +0 -14
  360. package/src/cp-node/fs/add-distance-from.ts +0 -49
  361. package/src/cp-node/fs/get-distance-between.ts +0 -16
  362. package/src/cp-node/fs/get-terminating-on-circle.ts +0 -24
  363. package/src/cp-node/fs/is-single-3-prong.ts +0 -15
  364. package/src/cp-node/fs/iterate-all-on-loop.ts +0 -15
  365. package/src/cp-node/fs/traverse-all-forward.ts +0 -24
  366. package/src/debug/functions/draw/draw-beziers-as-single-path.ts +0 -40
  367. package/src/debug/functions/draw/draw-disk.ts +0 -34
  368. package/src/debug/functions/draw/xmlns.ts +0 -5
  369. package/src/find-2-prong/cull-bezier-pieces.ts +0 -61
  370. package/src/find-2-prong/find-and-add-2-prong.ts +0 -30
  371. package/src/find-2-prong/get-medial/get-closest-points-d.ts +0 -213
  372. package/src/find-2-prong/x-for-debugging.ts +0 -13
  373. package/src/floyd-warshall/get-hole-closer-pairs.ts +0 -35
  374. package/src/mat/get-two-prong-type.ts +0 -13
  375. package/src/point-on-shape/is-pos-dull-corner.ts +0 -18
  376. package/src/point-on-shape/is-pos-quite-dull-corner.ts +0 -18
  377. package/src/point-on-shape/is-pos-quite-sharp-corner.ts +0 -18
  378. package/src/point-on-shape/pos-to-human-string.ts +0 -18
  379. package/src/sweep-line/are-boxes-intersecting.ts +0 -37
@@ -1,14 +1,16 @@
1
1
  import type { CpNode } from "../cp-node.js";
2
2
  /**
3
- * Returns all `CpNode`s between the two given ones (inclusive).
3
+ * Returns the bezier curves of the shape boundary from the contact point of
4
+ * the first given `CpNode` to that of the second (following `next`), together
5
+ * with whether a hole closer was passed on the way.
4
6
  *
5
- * * If the second `CpNode` is never encountered all on the loop will be
7
+ * * If the second `CpNode` is never encountered the entire boundary is
6
8
  * returned.
7
9
  *
8
10
  * @param cpNode1
9
11
  * @param cpNode2
10
- * @param inclAllIfEqual if `true` and first and last `CpNode`s are equal then
11
- * include all `CpNode`s around the loop, otherwise include none.
12
+ * @param inclAllIfEqual if `true` and the two `CpNode`s are equal then return
13
+ * the entire boundary, otherwise return nothing.
12
14
  */
13
15
  declare function getBoundaryBeziersBetween(cpNode1: CpNode, cpNode2: CpNode, inclAllIfEqual?: boolean): {
14
16
  pss: number[][][];
@@ -1,15 +1,17 @@
1
1
  import { getAllBetween } from "./get-all-between.js";
2
2
  import { getBoundaryBeziersToNext } from "./get-boundary-beziers-to-next.js";
3
3
  /**
4
- * Returns all `CpNode`s between the two given ones (inclusive).
4
+ * Returns the bezier curves of the shape boundary from the contact point of
5
+ * the first given `CpNode` to that of the second (following `next`), together
6
+ * with whether a hole closer was passed on the way.
5
7
  *
6
- * * If the second `CpNode` is never encountered all on the loop will be
8
+ * * If the second `CpNode` is never encountered the entire boundary is
7
9
  * returned.
8
10
  *
9
11
  * @param cpNode1
10
12
  * @param cpNode2
11
- * @param inclAllIfEqual if `true` and first and last `CpNode`s are equal then
12
- * include all `CpNode`s around the loop, otherwise include none.
13
+ * @param inclAllIfEqual if `true` and the two `CpNode`s are equal then return
14
+ * the entire boundary, otherwise return nothing.
13
15
  */
14
16
  function getBoundaryBeziersBetween(cpNode1, cpNode2, inclAllIfEqual = true) {
15
17
  const { cpNodes, hasHoleCloser } = getAllBetween(cpNode1, cpNode2, inclAllIfEqual);
@@ -1 +1 @@
1
- {"version":3,"file":"get-boundary-beziers-between.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-boundary-beziers-between.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAG7E;;;;;;;;;;GAUG;AACH,SAAS,yBAAyB,CAC1B,OAAe,EACf,OAAe,EACf,cAAc,GAAG,IAAI;IAKzB,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAC5B,aAAa,CAAC,OAAO,EAAC,OAAO,EAAC,cAAc,CAAC,CAAC;IAElD,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAEtD,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,CAAA;AACjC,CAAC;AAGD,OAAO,EAAE,yBAAyB,EAAE,CAAA"}
1
+ {"version":3,"file":"get-boundary-beziers-between.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-boundary-beziers-between.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAG7E;;;;;;;;;;;;GAYG;AACH,SAAS,yBAAyB,CAC1B,OAAe,EACf,OAAe,EACf,cAAc,GAAG,IAAI;IAKzB,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAC5B,aAAa,CAAC,OAAO,EAAC,OAAO,EAAC,cAAc,CAAC,CAAC;IAElD,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAEtD,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,CAAA;AACjC,CAAC;AAGD,OAAO,EAAE,yBAAyB,EAAE,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import { CpNode } from '../cp-node.js';
2
2
  /**
3
- * Returns the branch associated with the give cpNode
3
+ * Returns the (flattened) array of bezier curves (lines or quadratics)
4
+ * representing the branch associated with the given cpNode
4
5
  *
5
6
  * @param cpNode `CpNode` representing the start vertex.
6
7
  */
@@ -1,12 +1,13 @@
1
1
  import { getBranch } from './get-branch.js';
2
2
  import { getMatCurveToNext } from './get-mat-curve-to-next.js';
3
3
  /**
4
- * Returns the branch associated with the give cpNode
4
+ * Returns the (flattened) array of bezier curves (lines or quadratics)
5
+ * representing the branch associated with the given cpNode
5
6
  *
6
7
  * @param cpNode `CpNode` representing the start vertex.
7
8
  */
8
9
  function getBranchBeziers(cpNode) {
9
- return getBranch(cpNode).map(b => getMatCurveToNext(b));
10
+ return getBranch(cpNode).flatMap(getMatCurveToNext);
10
11
  }
11
12
  export { getBranchBeziers };
12
13
  //# sourceMappingURL=get-branch-beziers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-branch-beziers.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-branch-beziers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D;;;;GAIG;AACH,SAAS,gBAAgB,CACjB,MAAc;IAElB,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5D,CAAC;AAGD,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
1
+ {"version":3,"file":"get-branch-beziers.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-branch-beziers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D;;;;;GAKG;AACH,SAAS,gBAAgB,CACjB,MAAc;IAElB,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;AACxD,CAAC;AAGD,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
@@ -1,5 +1,4 @@
1
1
  import { getRealProngCount } from './get-real-prong-count.js';
2
- import { isFullyTerminating } from './is-fully-terminating.js';
3
2
  import { isTerminating } from './is-terminating.js';
4
3
  import { isTrivial } from './is-trivial.js';
5
4
  /**
@@ -26,7 +25,7 @@ function getBranch(cpNode) {
26
25
  do {
27
26
  branch.push(cpNode);
28
27
  cpNode = cpNode.next;
29
- } while (!isFullyTerminating(cpNode) && getRealProngCount(cpNode) === 2);
28
+ } while (getRealProngCount(cpNode) === 2);
30
29
  return branch;
31
30
  }
32
31
  export { getBranch };
@@ -1 +1 @@
1
- {"version":3,"file":"get-branch.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-branch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C;;;;;;GAMG;AACH,SAAS,SAAS,CACV,MAAc;IAElB,IAAI,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;QACpB,OAAO,EAAE,CAAC;IACd,CAAC;IAED,+BAA+B;IAC/B,OAAO,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3B,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC;IACjC,CAAC;IAED,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;IACrB,OAAO,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QACrC,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;IACzB,CAAC;IACD,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC;IAE7B,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,GAAG,CAAC;QACA,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACpB,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;IACzB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,MAAM,CAAC,IAAI,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,EAAC;IAExE,OAAO,MAAM,CAAC;AAClB,CAAC;AAGD,OAAO,EAAE,SAAS,EAAE,CAAA"}
1
+ {"version":3,"file":"get-branch.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-branch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C;;;;;;GAMG;AACH,SAAS,SAAS,CACV,MAAc;IAElB,IAAI,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;QACpB,OAAO,EAAE,CAAC;IACd,CAAC;IAED,+BAA+B;IAC/B,OAAO,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;QAC3B,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC;IACjC,CAAC;IAED,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;IACrB,OAAO,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QACrC,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;IACzB,CAAC;IACD,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC;IAE7B,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,GAAG,CAAC;QACA,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACpB,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;IACzB,CAAC,QAAQ,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC,EAAC;IAEzC,OAAO,MAAM,CAAC;AAClB,CAAC;AAGD,OAAO,EAAE,SAAS,EAAE,CAAA"}
@@ -2,8 +2,10 @@ import { totalLength } from "flo-bezier3";
2
2
  import { memoize } from "flo-memoize";
3
3
  import { getMatCurveToNext } from "./get-mat-curve-to-next.js";
4
4
  function getMatDistanceToNext(cpNode) {
5
- const ps = getMatCurveToNext(cpNode);
6
- const l = totalLength(ps);
5
+ let l = 0;
6
+ for (const ps of getMatCurveToNext(cpNode)) {
7
+ l += totalLength(ps);
8
+ }
7
9
  return l;
8
10
  }
9
11
  const getMatDistanceToNext$ = memoize(getMatDistanceToNext);
@@ -1 +1 @@
1
- {"version":3,"file":"get-distance-to-next.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-distance-to-next.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D,SAAS,oBAAoB,CACrB,MAAc;IAElB,MAAM,EAAE,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,CAAC,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC;IAE1B,OAAO,CAAC,CAAC;AACb,CAAC;AAGD,MAAM,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAA;AAE3D,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,CAAA"}
1
+ {"version":3,"file":"get-distance-to-next.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-distance-to-next.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D,SAAS,oBAAoB,CACrB,MAAc;IAElB,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,KAAK,MAAM,EAAE,IAAI,iBAAiB,CAAC,MAAM,CAAC,EAAE,CAAC;QACzC,CAAC,IAAI,WAAW,CAAC,EAAE,CAAC,CAAC;IACzB,CAAC;IAED,OAAO,CAAC,CAAC;AACb,CAAC;AAGD,MAAM,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAA;AAE3D,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import { toUnitVector, fromTo, rotate, translate, rotate90Degrees, reverse as reverseVec, dot } from 'flo-vector2d';
2
2
  import { tangent } from 'flo-bezier3';
3
3
  import { isPosSharpCorner } from '../../point-on-shape/is-pos-sharp-corner.js';
4
+ const { sqrt } = Math;
4
5
  /**
5
6
  * Returns a line segment of unit length starting in the given Vertex center and
6
7
  * pointing in the direction of the medial axis (viewed as a rooted tree).
@@ -43,8 +44,8 @@ function getEdgeDirection(cpNode) {
43
44
  // Recall the identities sin(acos(x)) = sqrt(1-x^2), etc. Also
44
45
  // recall the half angle formulas. Then the rotation matrix, R, can
45
46
  // be calculated.
46
- const cosθ = Math.sqrt((1 + x) / 2);
47
- const sinθ = Math.sqrt((1 - x) / 2);
47
+ const cosθ = sqrt((1 + x) / 2);
48
+ const sinθ = sqrt((1 - x) / 2);
48
49
  vDir = rotate(sinθ, cosθ, tan2);
49
50
  }
50
51
  const v = translate(toUnitVector(vDir), circleCenter);
@@ -1 +1 @@
1
- {"version":3,"file":"get-edge-direction.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-edge-direction.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,IAAI,UAAU,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACpH,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAG/E;;;;;;;GAOG;AACH,SAAS,gBAAgB,CACjB,MAAc;IAElB,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC;IAEvD,MAAM,GAAG,GAAG,MAAM,CAAC;IACnB,MAAM,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC;IA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,oEAAoE;QACpE,iBAAiB;QACjB,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAC,CAAC,CAAC,CAAC;QAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAC,CAAC,CAAC,CAAC;QAE7B,IAAI,GAAG,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,CAAC,GAAG,SAAS,CACf,YAAY,CAAC,IAAI,CAAC,EAClB,YAAY,CACf,CAAC;IAEF,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;AAC7B,CAAC;AAGD,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
@@ -1,7 +1,11 @@
1
- import { CpNode } from "../cp-node.js";
1
+ import type { CpNode } from "../cp-node.js";
2
2
  /**
3
- * Returns the first `CpNode` (from this one by successively applying
4
- * .nextOnCircle) that exits the circle.
3
+ * Returns the first `CpNode` *after* the given one (by successively applying
4
+ * `.nextOnCircle`) that exits the circle, i.e. the first one that is not
5
+ * terminating - the given `CpNode` itself is never returned.
6
+ *
7
+ * * returns `undefined` if no other `CpNode` on the circle exits (e.g. the
8
+ * other `CpNode` of a 1-prong, or the MAT is a single point)
5
9
  */
6
10
  declare function getFirstExit(cpNode: CpNode): CpNode | undefined;
7
11
  export { getFirstExit };
@@ -1,19 +1,21 @@
1
+ import { isTerminating } from "./is-terminating.js";
1
2
  /**
2
- * Returns the first `CpNode` (from this one by successively applying
3
- * .nextOnCircle) that exits the circle.
3
+ * Returns the first `CpNode` *after* the given one (by successively applying
4
+ * `.nextOnCircle`) that exits the circle, i.e. the first one that is not
5
+ * terminating - the given `CpNode` itself is never returned.
6
+ *
7
+ * * returns `undefined` if no other `CpNode` on the circle exits (e.g. the
8
+ * other `CpNode` of a 1-prong, or the MAT is a single point)
4
9
  */
5
10
  function getFirstExit(cpNode) {
6
- // const startNode = this as CpNode;
7
- const startNode = cpNode;
8
- let cpNode_ = startNode;
9
- while (cpNode_.next === cpNode_.prevOnCircle) {
10
- cpNode_ = cpNode_.next;
11
- if (cpNode_ === startNode) {
12
- // The very special case the MAT is a single point.
13
- return undefined;
11
+ let cpNode_ = cpNode.nextOnCircle;
12
+ while (cpNode_ !== cpNode) {
13
+ if (!isTerminating(cpNode_)) {
14
+ return cpNode_;
14
15
  }
16
+ cpNode_ = cpNode_.nextOnCircle;
15
17
  }
16
- return cpNode_;
18
+ return undefined;
17
19
  }
18
20
  export { getFirstExit };
19
21
  //# sourceMappingURL=get-first-exit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-first-exit.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-first-exit.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,SAAS,YAAY,CAAC,MAAc;IAChC,oCAAoC;IACpC,MAAM,SAAS,GAAG,MAAM,CAAC;IACzB,IAAI,OAAO,GAAG,SAAS,CAAC;IAExB,OAAO,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC,YAAY,EAAE,CAAC;QAC3C,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;QAEvB,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YACxB,mDAAmD;YACnD,OAAO,SAAS,CAAC;QACrB,CAAC;IACL,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC;AAGD,OAAO,EAAE,YAAY,EAAE,CAAA"}
1
+ {"version":3,"file":"get-first-exit.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-first-exit.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD;;;;;;;GAOG;AACH,SAAS,YAAY,CAAC,MAAc;IAChC,IAAI,OAAO,GAAG,MAAM,CAAC,YAAY,CAAC;IAElC,OAAO,OAAO,KAAK,MAAM,EAAE,CAAC;QACxB,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;YAC1B,OAAO,OAAO,CAAC;QACnB,CAAC;QACD,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC;IACnC,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,CAAC;AAGD,OAAO,EAAE,YAAY,EAAE,CAAA"}
@@ -1,3 +1,11 @@
1
- import { CpNode } from '../cp-node.js';
2
- declare function getImpliedBoundaryBezierBetween(cpNodeA: CpNode, cpNodeB: CpNode): number[][] | undefined;
1
+ import type { CpNode } from '../cp-node.js';
2
+ /**
3
+ * Returns the bezier curves (an array of 1 or 2 lines or quadratics joined
4
+ * smoothly) approximating the shape boundary between the contact points of
5
+ * two `CpNode`s.
6
+ *
7
+ * @param cpNodeA
8
+ * @param cpNodeB
9
+ */
10
+ declare function getImpliedBoundaryBezierBetween(cpNodeA: CpNode, cpNodeB: CpNode): number[][][];
3
11
  export { getImpliedBoundaryBezierBetween };
@@ -1,58 +1,15 @@
1
- import { tangent } from 'flo-bezier3';
2
- import { fromTo, dot, cross, translate, lineLineIntersection, toUnitVector } from 'flo-vector2d';
3
- /** @internal */
4
- const TOLERANCE_ADD_2PRONG = 0.01;
5
- /** @internal */
6
- const TOLERANCE_USE_LINE = 0.0001; // else cubic
1
+ import { getBoundaryTangentLine } from '../../point-on-shape/get-boundary-tangent-line.js';
2
+ import { getBeziersFromTangents } from '../../utils/get-beziers-from-tangents.js';
3
+ /**
4
+ * Returns the bezier curves (an array of 1 or 2 lines or quadratics joined
5
+ * smoothly) approximating the shape boundary between the contact points of
6
+ * two `CpNode`s.
7
+ *
8
+ * @param cpNodeA
9
+ * @param cpNodeB
10
+ */
7
11
  function getImpliedBoundaryBezierBetween(cpNodeA, cpNodeB) {
8
- const posA = cpNodeA.pointOnShape;
9
- const posB = cpNodeB.pointOnShape;
10
- let { curve: curveA, p: pA, t: tA } = posA;
11
- let { curve: curveB, p: pB, t: tB } = posB;
12
- if (pA[0] === pB[0] && pA[1] === pB[1]) {
13
- return [pA];
14
- }
15
- if (tA === 1) {
16
- tA = 0;
17
- curveA = curveA.next;
18
- }
19
- if (tB === 0) {
20
- tB = 1;
21
- curveB = curveB.prev;
22
- }
23
- const { ps: psA } = curveA;
24
- const { ps: psB } = curveB;
25
- const lA = [pA, translate(pA)(toUnitVector(tangent(psA, tA)))];
26
- const lB = [pB, translate(pB)(toUnitVector(tangent(psB, tB)))];
27
- const mid = lineLineIntersection(lA, lB);
28
- const c = fromTo(pA, pB);
29
- let twisted;
30
- if (!mid) {
31
- twisted = true;
32
- }
33
- else {
34
- const a = fromTo(pA, mid);
35
- const b = fromTo(pB, mid);
36
- twisted = dot(a, c) < 0 || dot(b, c) > 0;
37
- }
38
- if (!twisted) {
39
- // drawFs.bezier(g, [pA, mid!, pB], 'thin10 pink nofill', 0)
40
- return [pA, mid, pB];
41
- }
42
- const w1 = fromTo(lA[0], lA[1]); // This is a unit vector
43
- const w2 = fromTo(lB[0], lB[1]); // This is a unit vector
44
- const d1 = Math.abs(cross(c, w1)) / (3 * 3);
45
- const d2 = Math.abs(cross(c, w2)) / (3 * 3);
46
- if (d1 > TOLERANCE_ADD_2PRONG || d2 > TOLERANCE_ADD_2PRONG) {
47
- // not within tolerance
48
- return undefined;
49
- }
50
- if (d1 > TOLERANCE_USE_LINE || d2 > TOLERANCE_USE_LINE) {
51
- // approximate with cubic bezier?
52
- return undefined; // add 2-prong
53
- }
54
- // Within tolerance - approximate with a straight line.
55
- return [pA, pB];
12
+ return getBeziersFromTangents(getBoundaryTangentLine(cpNodeA.pointOnShape, true), getBoundaryTangentLine(cpNodeB.pointOnShape, false));
56
13
  }
57
14
  export { getImpliedBoundaryBezierBetween };
58
15
  //# sourceMappingURL=get-implied-boundary-bezier-between.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-implied-boundary-bezier-between.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-implied-boundary-bezier-between.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EACH,MAAM,EAAE,GAAG,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,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAC,CAAC,CAAC,CAAC;IAE1C,IAAI,EAAE,GAAG,oBAAoB,IAAI,EAAE,GAAG,oBAAoB,EAAE,CAAC;QACzD,uBAAuB;QACvB,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,IAAI,EAAE,GAAG,kBAAkB,IAAI,EAAE,GAAG,kBAAkB,EAAE,CAAC;QACrD,iCAAiC;QACjC,OAAO,SAAS,CAAC,CAAE,cAAc;IACrC,CAAC;IAED,uDAAuD;IACvD,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AACpB,CAAC;AAGD,OAAO,EAAE,+BAA+B,EAAE,CAAA"}
1
+ {"version":3,"file":"get-implied-boundary-bezier-between.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-implied-boundary-bezier-between.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAC3F,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAGlF;;;;;;;GAOG;AACH,SAAS,+BAA+B,CAChC,OAAe,EACf,OAAe;IAEnB,OAAO,sBAAsB,CACzB,sBAAsB,CAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,EAClD,sBAAsB,CAAC,OAAO,CAAC,YAAY,EAAE,KAAK,CAAC,CACtD,CAAC;AACN,CAAC;AAGD,OAAO,EAAE,+BAA+B,EAAE,CAAA"}
@@ -1,9 +1,11 @@
1
1
  import type { CpNode } from '../cp-node.js';
2
2
  /**
3
- * Returns the bezier curve from the maximal disk of one `CpNode` to another
4
- * `CpNode`'s maximal disk.
3
+ * Returns the bezier curves (an array of 1 or 2 lines or quadratics joined
4
+ * smoothly) from the maximal disk of one `CpNode` to another `CpNode`'s
5
+ * maximal disk.
6
+ *
5
7
  * @param cpNodeFrom
6
8
  * @param cpNodeTo
7
9
  */
8
- declare function getMatCurveBetween(cpNodeFrom: CpNode, cpNodeTo: CpNode): number[][];
10
+ declare function getMatCurveBetween(cpNodeFrom: CpNode, cpNodeTo: CpNode): number[][][];
9
11
  export { getMatCurveBetween };
@@ -1,58 +1,15 @@
1
- import { fromTo as fromToVec, dot, cross, rotate90Degrees, interpolate, translate, lineLineIntersection } from 'flo-vector2d';
2
1
  import { getEdgeDirection } from './get-edge-direction.js';
3
- const { abs } = Math;
4
- /** @internal */
5
- const TOLERANCE_ADD_2PRONG = 0.01;
6
- /** @internal */
7
- const TOLERANCE_USE_LINE = 0.0001; // else cubic
2
+ import { getBeziersFromTangents } from '../../utils/get-beziers-from-tangents.js';
8
3
  /**
9
- * Returns the bezier curve from the maximal disk of one `CpNode` to another
10
- * `CpNode`'s maximal disk.
4
+ * Returns the bezier curves (an array of 1 or 2 lines or quadratics joined
5
+ * smoothly) from the maximal disk of one `CpNode` to another `CpNode`'s
6
+ * maximal disk.
7
+ *
11
8
  * @param cpNodeFrom
12
9
  * @param cpNodeTo
13
10
  */
14
11
  function getMatCurveBetween(cpNodeFrom, cpNodeTo) {
15
- const fromCc = cpNodeFrom.pointOnShape.circle.center;
16
- const fromL = getEdgeDirection(cpNodeFrom);
17
- const toCc = cpNodeTo.pointOnShape.circle.center;
18
- const toL = getEdgeDirection(cpNodeTo.prevOnCircle);
19
- const mid = lineLineIntersection(fromL, toL);
20
- const c = fromToVec(fromCc, toCc);
21
- let twisted;
22
- if (!mid) {
23
- twisted = true;
24
- }
25
- else {
26
- const a = fromToVec(fromCc, mid);
27
- const b = fromToVec(toCc, mid);
28
- twisted = dot(a, c) < 0 || dot(b, c) > 0;
29
- }
30
- if (!twisted) {
31
- return [fromCc, mid, toCc];
32
- }
33
- const r = rotate90Degrees(c);
34
- const w1 = fromToVec(fromL[0], fromL[1]); // This is a unit vector
35
- const w2 = fromToVec(toL[0], toL[1]); // This is a unit vector
36
- const d1 = abs(cross(c, w1)) / (3 * 3);
37
- const d2 = abs(cross(c, w2)) / (3 * 3);
38
- if (d1 > TOLERANCE_ADD_2PRONG || d2 > TOLERANCE_ADD_2PRONG) {
39
- // FUTURE - not within tolerance - must add additional 2-prong
40
- return [fromCc, toCc];
41
- }
42
- if (d1 > TOLERANCE_USE_LINE || d2 > TOLERANCE_USE_LINE) {
43
- // approximate with cubic bezier
44
- const m1 = interpolate(fromCc, toCc, 1 / 3);
45
- const m2 = interpolate(fromCc, toCc, 2 / 3);
46
- const v1 = translate(r, m1);
47
- const v2 = translate(r, m2);
48
- const l1 = [m1, v1];
49
- const l2 = [m2, v2];
50
- const mid1 = lineLineIntersection(fromL, l1);
51
- const mid2 = lineLineIntersection(toL, l2);
52
- return [fromCc, mid1, mid2, toCc];
53
- }
54
- // Within tolerance - approximate with a straight line.
55
- return [fromCc, toCc];
12
+ return getBeziersFromTangents(getEdgeDirection(cpNodeFrom), getEdgeDirection(cpNodeTo.prevOnCircle));
56
13
  }
57
14
  export { getMatCurveBetween };
58
15
  //# sourceMappingURL=get-mat-curve-between.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-mat-curve-between.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-mat-curve-between.ts"],"names":[],"mappings":"AACA,OAAO,EACH,MAAM,IAAI,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EACxE,oBAAoB,EACvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAGrB,gBAAgB;AAChB,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAClC,gBAAgB;AAChB,MAAM,kBAAkB,GAAG,MAAM,CAAC,CAAC,aAAa;AAGhD;;;;;GAKG;AACH,SAAS,kBAAkB,CACnB,UAAkB,EAClB,QAAgB;IAEpB,MAAM,MAAM,GAAG,UAAU,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC;IACrD,MAAM,KAAK,GAAG,g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AE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAGlF;;;;;;;GAOG;AACH,SAAS,kBAAkB,CACnB,UAAkB,EAClB,QAAgB;IAEpB,OAAO,sBAAsB,CACzB,gBAAgB,CAAC,UAAU,CAAC,EAC5B,gBAAgB,CAAC,QAAQ,CAAC,YAAY,CAAC,CAC1C,CAAC;AACN,CAAC;AAGD,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
@@ -5,7 +5,7 @@ import { CpNode } from '../cp-node.js';
5
5
  * medial axis.
6
6
  * @param cpNode
7
7
  */
8
- declare function getMatCurveToNext(cpNode: CpNode): number[][];
8
+ declare function getMatCurveToNext(cpNode: CpNode): number[][][];
9
9
  declare const getMatCurveToNext$: typeof getMatCurveToNext & {
10
10
  readonly weakMapS: WeakMap<object, {
11
11
  readonly weakMap: WeakMap<object, any>;
@@ -1,3 +1,11 @@
1
1
  import { CpNode } from '../cp-node.js';
2
+ /**
3
+ * Returns the (flattened) array of bezier curves (lines or quadratics)
4
+ * representing the medial axis from one `CpNode` to another by following
5
+ * `next` repeatedly.
6
+ *
7
+ * @param cpNodeS
8
+ * @param cpNodeE
9
+ */
2
10
  declare function getMatCurvesBetween(cpNodeS: CpNode, cpNodeE: CpNode): number[][][];
3
11
  export { getMatCurvesBetween };
@@ -1,10 +1,17 @@
1
1
  import { getMatCurveBetween } from './get-mat-curve-between.js';
2
+ /**
3
+ * Returns the (flattened) array of bezier curves (lines or quadratics)
4
+ * representing the medial axis from one `CpNode` to another by following
5
+ * `next` repeatedly.
6
+ *
7
+ * @param cpNodeS
8
+ * @param cpNodeE
9
+ */
2
10
  function getMatCurvesBetween(cpNodeS, cpNodeE) {
3
11
  let cpNode = cpNodeS;
4
12
  const pss = [];
5
13
  while (cpNode !== cpNodeE) {
6
- const ps = getMatCurveBetween(cpNode, cpNode.next);
7
- pss.push(ps);
14
+ pss.push(...getMatCurveBetween(cpNode, cpNode.next));
8
15
  cpNode = cpNode.next;
9
16
  }
10
17
  return pss;
@@ -1 +1 @@
1
- {"version":3,"file":"get-mat-curves-between.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-mat-curves-between.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,SAAS,mBAAmB,CACpB,OAAe,EACf,OAAe;IAEnB,IAAI,MAAM,GAAG,OAAO,CAAC;IACrB,MAAM,GAAG,GAAiB,EAAE,CAAC;IAC7B,OAAO,MAAM,KAAK,OAAO,EAAE,CAAC;QACxB,MAAM,EAAE,GAAG,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;QACnD,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAEb,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;IACzB,CAAC;IAED,OAAO,GAAG,CAAC;AACf,CAAC;AAGD,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
1
+ {"version":3,"file":"get-mat-curves-between.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-mat-curves-between.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE;;;;;;;GAOG;AACH,SAAS,mBAAmB,CACpB,OAAe,EACf,OAAe;IAEnB,IAAI,MAAM,GAAG,OAAO,CAAC;IACrB,MAAM,GAAG,GAAiB,EAAE,CAAC;IAC7B,OAAO,MAAM,KAAK,OAAO,EAAE,CAAC;QACxB,GAAG,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAErD,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;IACzB,CAAC;IAED,OAAO,GAAG,CAAC;AACf,CAAC;AAGD,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
@@ -1,7 +1,8 @@
1
1
  import { CpNode } from "../cp-node.js";
2
2
  /**
3
3
  * Returns the number of contact points (up to planar coordinates) on the
4
- * maximal disk circle implied by this `CpNode`.
4
+ * maximal disk circle implied by this `CpNode`, i.e. the number of
5
+ * non-terminating `CpNode`s on its circle.
5
6
  *
6
7
  * See also `getProngCount`.
7
8
  */
@@ -1,15 +1,21 @@
1
- import { getAllOnCircle } from "./get-all-on-circle.js";
2
1
  import { isTerminating } from "./is-terminating.js";
3
2
  /**
4
3
  * Returns the number of contact points (up to planar coordinates) on the
5
- * maximal disk circle implied by this `CpNode`.
4
+ * maximal disk circle implied by this `CpNode`, i.e. the number of
5
+ * non-terminating `CpNode`s on its circle.
6
6
  *
7
7
  * See also `getProngCount`.
8
8
  */
9
9
  function getRealProngCount(cpNode) {
10
- const nonTerminatingCpNodes = getAllOnCircle(cpNode)
11
- .filter(cpNode => !isTerminating(cpNode));
12
- return nonTerminatingCpNodes.length;
10
+ let count = 0;
11
+ let cpNode_ = cpNode;
12
+ do {
13
+ if (!isTerminating(cpNode_)) {
14
+ count++;
15
+ }
16
+ cpNode_ = cpNode_.nextOnCircle;
17
+ } while (cpNode_ !== cpNode);
18
+ return count;
13
19
  }
14
20
  export { getRealProngCount };
15
21
  //# sourceMappingURL=get-real-prong-count.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-real-prong-count.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-real-prong-count.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD;;;;;GAKG;AACH,SAAS,iBAAiB,CAAC,MAAc;IACrC,MAAM,qBAAqB,GAAG,cAAc,CAAC,MAAM,CAAC;SACnD,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;IAE1C,OAAO,qBAAqB,CAAC,MAAM,CAAC;AACxC,CAAC;AAGD,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
1
+ {"version":3,"file":"get-real-prong-count.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-real-prong-count.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD;;;;;;GAMG;AACH,SAAS,iBAAiB,CAAC,MAAc;IACrC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,OAAO,GAAG,MAAM,CAAC;IACrB,GAAG,CAAC;QACA,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;YAAC,KAAK,EAAE,CAAC;QAAC,CAAC;QACzC,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC;IACnC,CAAC,QAAQ,OAAO,KAAK,MAAM,EAAE;IAE7B,OAAO,KAAK,CAAC;AACjB,CAAC;AAGD,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
@@ -1,6 +1,16 @@
1
1
  import type { CpNode } from "../cp-node.js";
2
2
  /**
3
+ * Returns the salience of the given `CpNode`: the ratio of the boundary length
4
+ * from its contact point forward to the next contact point on its circle to
5
+ * the straight distance between those two points.
6
+ *
7
+ * * `Infinity` if that stretch of boundary passes a hole closer
8
+ * * `0` if the two contact points coincide with no boundary in between (the
9
+ * terminating `CpNode` of a 1-prong) - the other `CpNode` of a 1-prong,
10
+ * whose stretch is the entire boundary, gives `Infinity`
11
+ *
3
12
  * See https://research.gold.ac.uk/id/eprint/31944/
13
+ *
4
14
  * @param cpNode
5
15
  */
6
16
  declare function getSalience(cpNode: CpNode): number;
@@ -3,7 +3,17 @@ import { totalLength } from "flo-bezier3";
3
3
  import { getBoundaryBeziersBetween } from "./get-boundary-beziers-between.js";
4
4
  import { sum } from '../../utils/sum.js';
5
5
  /**
6
+ * Returns the salience of the given `CpNode`: the ratio of the boundary length
7
+ * from its contact point forward to the next contact point on its circle to
8
+ * the straight distance between those two points.
9
+ *
10
+ * * `Infinity` if that stretch of boundary passes a hole closer
11
+ * * `0` if the two contact points coincide with no boundary in between (the
12
+ * terminating `CpNode` of a 1-prong) - the other `CpNode` of a 1-prong,
13
+ * whose stretch is the entire boundary, gives `Infinity`
14
+ *
6
15
  * See https://research.gold.ac.uk/id/eprint/31944/
16
+ *
7
17
  * @param cpNode
8
18
  */
9
19
  function getSalience(cpNode) {
@@ -14,7 +24,13 @@ function getSalience(cpNode) {
14
24
  const d = distanceBetween(bp1, bp2);
15
25
  const { pss, hasHoleCloser } = getBoundaryBeziersBetween(cpNode1, cpNode2);
16
26
  const s = sum(pss.map(ps => totalLength(ps)));
17
- return hasHoleCloser ? Infinity : s / d;
27
+ if (hasHoleCloser) {
28
+ return Infinity;
29
+ }
30
+ if (s === 0) {
31
+ return 0;
32
+ } // (avoids `0/0` for the 1-prong case)
33
+ return s / d;
18
34
  }
19
35
  export { getSalience };
20
36
  //# sourceMappingURL=get-salience.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-salience.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-salience.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAGzC;;;GAGG;AACH,SAAS,WAAW,CAAC,MAAc;IAC/B,MAAM,OAAO,GAAG,MAAM,CAAC;IACvB,MAAM,OAAO,GAAG,MAAM,CAAC,YAAY,CAAC;IACpC,MAAM,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;IACnC,MAAM,GAAG,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnC,MAAM,CAAC,GAAG,eAAe,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAEpC,MAAM,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,yBAAyB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAE3E,M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CAAC,CAAE,sCAAsC;IAElE,OAAO,CAAC,GAAC,CAAC,CAAC;AACf,CAAC;AAGD,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -1,7 +1,9 @@
1
1
  import type { CpNode } from "../cp-node.js";
2
2
  /**
3
- * Like isTerminating() but only returns true if all cpNodes on the circle
4
- * (except this.prevOnCircle) is terminating.
3
+ * Like `isTerminating` but only returns `true` if all `CpNode`s on the circle
4
+ * (except possibly the one leading back, i.e. `this.prevOnCircle`) are
5
+ * terminating - i.e. the `CpNode` is terminating and its vertex has at most
6
+ * one real prong.
5
7
  */
6
8
  declare function isFullyTerminating(cpNode: CpNode): boolean;
7
9
  export { isFullyTerminating };
@@ -1,24 +1,13 @@
1
- import { getAllOnCircle } from "./get-all-on-circle.js";
1
+ import { getRealProngCount } from "./get-real-prong-count.js";
2
2
  import { isTerminating } from "./is-terminating.js";
3
- import { isTrivial } from "./is-trivial.js";
4
3
  /**
5
- * Like isTerminating() but only returns true if all cpNodes on the circle
6
- * (except this.prevOnCircle) is terminating.
4
+ * Like `isTerminating` but only returns `true` if all `CpNode`s on the circle
5
+ * (except possibly the one leading back, i.e. `this.prevOnCircle`) are
6
+ * terminating - i.e. the `CpNode` is terminating and its vertex has at most
7
+ * one real prong.
7
8
  */
8
9
  function isFullyTerminating(cpNode) {
9
- // const otherOnCircle = getAllOnCircle(cpNode.prevOnCircle, true);
10
- // return otherOnCircle.every(isTerminating);
11
- if (!isTerminating(cpNode)) {
12
- return false;
13
- }
14
- if (isTrivial(cpNode)) {
15
- return true;
16
- }
17
- while (cpNode.prev === cpNode.prevOnCircle) {
18
- cpNode = cpNode.prev;
19
- }
20
- const otherOnCircle = getAllOnCircle(cpNode.prevOnCircle, true);
21
- return otherOnCircle.every(isTerminating);
10
+ return isTerminating(cpNode) && getRealProngCount(cpNode) <= 1;
22
11
  }
23
12
  export { isFullyTerminating };
24
13
  //# sourceMappingURL=is-fully-terminating.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-fully-terminating.js","sourceRoot":"","sources":["../../../src/cp-node/fs/is-fully-terminating.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C;;;GAGG;AACH,SAAS,kBAAkB,CAAC,MAAc;IACtC,mEAAmE;IAEnE,6CAA6C;IAC7C,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,IAAI,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;QACpB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,YAAY,EAAE,CAAC;QACzC,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;IACzB,CAAC;IAED,MAAM,aAAa,GAAG,cAAc,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IAEhE,OAAO,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;AAC9C,CAAC;AAGD,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
1
+ {"version":3,"file":"is-fully-terminating.js","sourceRoot":"","sources":["../../../src/cp-node/fs/is-fully-terminating.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD;;;;;GAKG;AACH,SAAS,kBAAkB,CAAC,MAAc;IACtC,OAAO,aAAa,CAAC,MAAM,CAAC,IAAI,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AACnE,CAAC;AAGD,OAAO,EAAE,kBAAkB,EAAE,CAAA"}