flo-mat 1.1.2 → 2.0.0

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 (470) hide show
  1. package/.mocharc.cjs +17 -0
  2. package/README.md +13 -2
  3. package/browser/index.js +7348 -0
  4. package/browser/index.min.js +2 -1
  5. package/browser/index.min.js.LICENSE.txt +2907 -0
  6. package/browser/index.module.js +7369 -0
  7. package/browser/index.module.min.js +2 -0
  8. package/browser/index.module.min.js.LICENSE.txt +2907 -0
  9. package/node/circle.d.ts +1 -4
  10. package/node/circle.js +3 -6
  11. package/node/circle.js.map +1 -1
  12. package/node/compare-curvatures-at-interface.d.ts +19 -0
  13. package/node/compare-curvatures-at-interface.js +125 -0
  14. package/node/compare-curvatures-at-interface.js.map +1 -0
  15. package/node/contact-point.d.ts +2 -2
  16. package/node/contact-point.js +3 -5
  17. package/node/contact-point.js.map +1 -1
  18. package/node/cp-node/clone.d.ts +1 -1
  19. package/node/cp-node/clone.js +4 -6
  20. package/node/cp-node/clone.js.map +1 -1
  21. package/node/cp-node/remove.d.ts +2 -2
  22. package/node/cp-node/remove.js +1 -3
  23. package/node/cp-node/remove.js.map +1 -1
  24. package/node/cp-node.d.ts +4 -5
  25. package/node/cp-node.js +8 -11
  26. package/node/cp-node.js.map +1 -1
  27. package/node/curve.d.ts +2 -2
  28. package/node/curve.js +10 -13
  29. package/node/curve.js.map +1 -1
  30. package/node/debug/cp-node-for-debugging.d.ts +2 -2
  31. package/node/debug/cp-node-for-debugging.js +1 -2
  32. package/node/debug/debug-elem-types.d.ts +8 -8
  33. package/node/debug/debug-elem-types.js +1 -2
  34. package/node/debug/debug.d.ts +5 -7
  35. package/node/debug/debug.js +67 -9
  36. package/node/debug/debug.js.map +1 -1
  37. package/node/debug/functions/draw-elem/bounding-hull.js +3 -5
  38. package/node/debug/functions/draw-elem/bounding-hull.js.map +1 -1
  39. package/node/debug/functions/draw-elem/branch.d.ts +1 -1
  40. package/node/debug/functions/draw-elem/branch.js +5 -7
  41. package/node/debug/functions/draw-elem/branch.js.map +1 -1
  42. package/node/debug/functions/draw-elem/culls.d.ts +1 -1
  43. package/node/debug/functions/draw-elem/culls.js +1 -3
  44. package/node/debug/functions/draw-elem/culls.js.map +1 -1
  45. package/node/debug/functions/draw-elem/draw-circle-percent.js +1 -3
  46. package/node/debug/functions/draw-elem/draw-circle-percent.js.map +1 -1
  47. package/node/debug/functions/draw-elem/draw-elem.d.ts +1 -1
  48. package/node/debug/functions/draw-elem/draw-elem.js +34 -36
  49. package/node/debug/functions/draw-elem/draw-elem.js.map +1 -1
  50. package/node/debug/functions/draw-elem/dull-corner.d.ts +1 -1
  51. package/node/debug/functions/draw-elem/dull-corner.js +5 -6
  52. package/node/debug/functions/draw-elem/dull-corner.js.map +1 -1
  53. package/node/debug/functions/draw-elem/leaves.d.ts +1 -1
  54. package/node/debug/functions/draw-elem/leaves.js +3 -5
  55. package/node/debug/functions/draw-elem/leaves.js.map +1 -1
  56. package/node/debug/functions/draw-elem/loop.d.ts +1 -1
  57. package/node/debug/functions/draw-elem/loop.js +1 -3
  58. package/node/debug/functions/draw-elem/loop.js.map +1 -1
  59. package/node/debug/functions/draw-elem/loops.d.ts +1 -1
  60. package/node/debug/functions/draw-elem/loops.js +1 -3
  61. package/node/debug/functions/draw-elem/loops.js.map +1 -1
  62. package/node/debug/functions/draw-elem/loose-bounding-box.js +3 -5
  63. package/node/debug/functions/draw-elem/loose-bounding-box.js.map +1 -1
  64. package/node/debug/functions/draw-elem/mat.d.ts +1 -1
  65. package/node/debug/functions/draw-elem/mat.js +7 -9
  66. package/node/debug/functions/draw-elem/mat.js.map +1 -1
  67. package/node/debug/functions/draw-elem/max-vertex.d.ts +1 -1
  68. package/node/debug/functions/draw-elem/max-vertex.js +3 -5
  69. package/node/debug/functions/draw-elem/max-vertex.js.map +1 -1
  70. package/node/debug/functions/draw-elem/min-y.d.ts +1 -1
  71. package/node/debug/functions/draw-elem/min-y.js +9 -11
  72. package/node/debug/functions/draw-elem/min-y.js.map +1 -1
  73. package/node/debug/functions/draw-elem/one-prong-at-dull-corner.d.ts +1 -1
  74. package/node/debug/functions/draw-elem/one-prong-at-dull-corner.js +7 -9
  75. package/node/debug/functions/draw-elem/one-prong-at-dull-corner.js.map +1 -1
  76. package/node/debug/functions/draw-elem/one-prong.d.ts +1 -1
  77. package/node/debug/functions/draw-elem/one-prong.js +9 -11
  78. package/node/debug/functions/draw-elem/one-prong.js.map +1 -1
  79. package/node/debug/functions/draw-elem/sharp-corner.d.ts +1 -1
  80. package/node/debug/functions/draw-elem/sharp-corner.js +3 -5
  81. package/node/debug/functions/draw-elem/sharp-corner.js.map +1 -1
  82. package/node/debug/functions/draw-elem/three-prong.d.ts +1 -1
  83. package/node/debug/functions/draw-elem/three-prong.js +9 -11
  84. package/node/debug/functions/draw-elem/three-prong.js.map +1 -1
  85. package/node/debug/functions/draw-elem/tight-bounding-box.js +3 -5
  86. package/node/debug/functions/draw-elem/tight-bounding-box.js.map +1 -1
  87. package/node/debug/functions/draw-elem/two-prong.d.ts +1 -1
  88. package/node/debug/functions/draw-elem/two-prong.js +9 -11
  89. package/node/debug/functions/draw-elem/two-prong.js.map +1 -1
  90. package/node/debug/functions/draw-elem/vertex.d.ts +1 -1
  91. package/node/debug/functions/draw-elem/vertex.js +7 -9
  92. package/node/debug/functions/draw-elem/vertex.js.map +1 -1
  93. package/node/debug/functions/general.d.ts +1 -1
  94. package/node/debug/functions/general.js +3 -5
  95. package/node/debug/functions/general.js.map +1 -1
  96. package/node/debug/functions/three-prong.js +24 -26
  97. package/node/debug/functions/three-prong.js.map +1 -1
  98. package/node/debug/functions/two-prong.d.ts +1 -1
  99. package/node/debug/functions/two-prong.js +10 -12
  100. package/node/debug/functions/two-prong.js.map +1 -1
  101. package/node/debug/three-prong-for-debugging.d.ts +4 -4
  102. package/node/debug/three-prong-for-debugging.js +4 -6
  103. package/node/debug/three-prong-for-debugging.js.map +1 -1
  104. package/node/debug/two-prong-for-debugging.d.ts +5 -5
  105. package/node/debug/two-prong-for-debugging.js +1 -2
  106. package/node/find-mats.d.ts +12 -9
  107. package/node/find-mats.js +47 -52
  108. package/node/find-mats.js.map +1 -1
  109. package/node/get-boundary-bezier-parts-to-next.d.ts +3 -5
  110. package/node/get-boundary-bezier-parts-to-next.js +1 -3
  111. package/node/get-boundary-bezier-parts-to-next.js.map +1 -1
  112. package/node/get-boundary-beziers-to-next.d.ts +1 -1
  113. package/node/get-boundary-beziers-to-next.js +8 -7
  114. package/node/get-boundary-beziers-to-next.js.map +1 -1
  115. package/node/get-bounding-box-.d.ts +2 -0
  116. package/node/get-bounding-box-.js +5 -0
  117. package/node/get-bounding-box-.js.map +1 -0
  118. package/node/get-branches.d.ts +1 -1
  119. package/node/get-branches.js +7 -9
  120. package/node/get-branches.js.map +1 -1
  121. package/node/get-curve/get-curve-between.d.ts +1 -1
  122. package/node/get-curve/get-curve-between.js +21 -23
  123. package/node/get-curve/get-curve-between.js.map +1 -1
  124. package/node/get-curve/get-edge-direction.d.ts +1 -1
  125. package/node/get-curve/get-edge-direction.js +12 -14
  126. package/node/get-curve/get-edge-direction.js.map +1 -1
  127. package/node/get-curve-to-next.d.ts +1 -1
  128. package/node/get-curve-to-next.js +3 -5
  129. package/node/get-curve-to-next.js.map +1 -1
  130. package/node/get-interface-ccw.d.ts +24 -0
  131. package/node/get-interface-ccw.js +98 -0
  132. package/node/get-interface-ccw.js.map +1 -0
  133. package/node/index.d.ts +35 -36
  134. package/node/index.js +32 -55
  135. package/node/index.js.map +1 -1
  136. package/node/loop/get-max-coordinate.js +1 -3
  137. package/node/loop/get-max-coordinate.js.map +1 -1
  138. package/node/loop.d.ts +1 -1
  139. package/node/loop.js +1 -3
  140. package/node/loop.js.map +1 -1
  141. package/node/mat/add-to-cp-graph.d.ts +5 -5
  142. package/node/mat/add-to-cp-graph.js +5 -7
  143. package/node/mat/add-to-cp-graph.js.map +1 -1
  144. package/node/mat/bezier-piece.d.ts +1 -1
  145. package/node/mat/bezier-piece.js +1 -2
  146. package/node/mat/closest-boundary-point/closest-points-on-curve.d.ts +1 -1
  147. package/node/mat/closest-boundary-point/closest-points-on-curve.js +15 -13
  148. package/node/mat/closest-boundary-point/closest-points-on-curve.js.map +1 -1
  149. package/node/mat/closest-boundary-point/cull-bezier-pieces.d.ts +1 -1
  150. package/node/mat/closest-boundary-point/cull-bezier-pieces.js +7 -9
  151. package/node/mat/closest-boundary-point/cull-bezier-pieces.js.map +1 -1
  152. package/node/mat/closest-boundary-point/cull-by-loose-bounding-box.d.ts +1 -1
  153. package/node/mat/closest-boundary-point/cull-by-loose-bounding-box.js +5 -7
  154. package/node/mat/closest-boundary-point/cull-by-loose-bounding-box.js.map +1 -1
  155. package/node/mat/closest-boundary-point/cull-by-tight-boundary-box.d.ts +1 -1
  156. package/node/mat/closest-boundary-point/cull-by-tight-boundary-box.js +7 -7
  157. package/node/mat/closest-boundary-point/cull-by-tight-boundary-box.js.map +1 -1
  158. package/node/mat/closest-boundary-point/get-best-distance-squared.d.ts +1 -1
  159. package/node/mat/closest-boundary-point/get-best-distance-squared.js +6 -8
  160. package/node/mat/closest-boundary-point/get-best-distance-squared.js.map +1 -1
  161. package/node/mat/closest-boundary-point/get-close-boundary-points.d.ts +2 -2
  162. package/node/mat/closest-boundary-point/get-close-boundary-points.js +9 -11
  163. package/node/mat/closest-boundary-point/get-close-boundary-points.js.map +1 -1
  164. package/node/mat/closest-boundary-point/get-closest-boundary-point.d.ts +3 -3
  165. package/node/mat/closest-boundary-point/get-closest-boundary-point.js +10 -12
  166. package/node/mat/closest-boundary-point/get-closest-boundary-point.js.map +1 -1
  167. package/node/mat/corner.js +1 -2
  168. package/node/mat/create-new-cp-tree.d.ts +3 -3
  169. package/node/mat/create-new-cp-tree.js +5 -6
  170. package/node/mat/create-new-cp-tree.js.map +1 -1
  171. package/node/mat/elem-type-two-prong.js +1 -2
  172. package/node/mat/find-mat/add-1-prong.d.ts +4 -4
  173. package/node/mat/find-mat/add-1-prong.js +9 -11
  174. package/node/mat/find-mat/add-1-prong.js.map +1 -1
  175. package/node/mat/find-mat/add-2-prong.d.ts +5 -5
  176. package/node/mat/find-mat/add-2-prong.js +19 -21
  177. package/node/mat/find-mat/add-2-prong.js.map +1 -1
  178. package/node/mat/find-mat/add-3-prong.d.ts +5 -5
  179. package/node/mat/find-mat/add-3-prong.js +7 -9
  180. package/node/mat/find-mat/add-3-prong.js.map +1 -1
  181. package/node/mat/find-mat/add-debug-info.d.ts +2 -2
  182. package/node/mat/find-mat/add-debug-info.js +8 -12
  183. package/node/mat/find-mat/add-debug-info.js.map +1 -1
  184. package/node/mat/find-mat/create-get-interesting-points-on-loop.d.ts +3 -3
  185. package/node/mat/find-mat/create-get-interesting-points-on-loop.js +29 -15
  186. package/node/mat/find-mat/create-get-interesting-points-on-loop.js.map +1 -1
  187. package/node/mat/find-mat/create-initial-cp-graph.d.ts +4 -4
  188. package/node/mat/find-mat/create-initial-cp-graph.js +7 -8
  189. package/node/mat/find-mat/create-initial-cp-graph.js.map +1 -1
  190. package/node/mat/find-mat/find-2-prong/add-debug-info.d.ts +5 -5
  191. package/node/mat/find-mat/find-2-prong/add-debug-info.js +3 -5
  192. package/node/mat/find-mat/find-2-prong/add-debug-info.js.map +1 -1
  193. package/node/mat/find-mat/find-2-prong/cull-bezier-pieces.d.ts +1 -1
  194. package/node/mat/find-mat/find-2-prong/cull-bezier-pieces.js +5 -7
  195. package/node/mat/find-mat/find-2-prong/cull-bezier-pieces.js.map +1 -1
  196. package/node/mat/find-mat/find-2-prong/find-2-prong.d.ts +5 -5
  197. package/node/mat/find-mat/find-2-prong/find-2-prong.js +37 -38
  198. package/node/mat/find-mat/find-2-prong/find-2-prong.js.map +1 -1
  199. package/node/mat/find-mat/find-2-prong/find-equidistant-point-on-line.js +1 -3
  200. package/node/mat/find-mat/find-2-prong/find-equidistant-point-on-line.js.map +1 -1
  201. package/node/mat/find-mat/find-2-prong/get-initial-bezier-pieces.d.ts +5 -5
  202. package/node/mat/find-mat/find-2-prong/get-initial-bezier-pieces.js +7 -9
  203. package/node/mat/find-mat/find-2-prong/get-initial-bezier-pieces.js.map +1 -1
  204. package/node/mat/find-mat/find-2-prong/x-for-debugging.d.ts +1 -1
  205. package/node/mat/find-mat/find-2-prong/x-for-debugging.js +1 -2
  206. package/node/mat/find-mat/find-3-prong/calc-better-x.d.ts +2 -2
  207. package/node/mat/find-mat/find-3-prong/calc-better-x.js +10 -12
  208. package/node/mat/find-mat/find-3-prong/calc-better-x.js.map +1 -1
  209. package/node/mat/find-mat/find-3-prong/calc-initial-3-prong-center.d.ts +2 -2
  210. package/node/mat/find-mat/find-3-prong/calc-initial-3-prong-center.js +6 -7
  211. package/node/mat/find-mat/find-3-prong/calc-initial-3-prong-center.js.map +1 -1
  212. package/node/mat/find-mat/find-3-prong/find-3-prong-for-delta3s.d.ts +3 -3
  213. package/node/mat/find-mat/find-3-prong/find-3-prong-for-delta3s.js +29 -31
  214. package/node/mat/find-mat/find-3-prong/find-3-prong-for-delta3s.js.map +1 -1
  215. package/node/mat/find-mat/find-3-prong/find-3-prong.d.ts +3 -3
  216. package/node/mat/find-mat/find-3-prong/find-3-prong.js +14 -11
  217. package/node/mat/find-mat/find-3-prong/find-3-prong.js.map +1 -1
  218. package/node/mat/find-mat/find-3-prong/get-closest-points.d.ts +2 -2
  219. package/node/mat/find-mat/find-3-prong/get-closest-points.js +3 -5
  220. package/node/mat/find-mat/find-3-prong/get-closest-points.js.map +1 -1
  221. package/node/mat/find-mat/find-and-add-2-prongs-on-all-paths.d.ts +4 -4
  222. package/node/mat/find-mat/find-and-add-2-prongs-on-all-paths.js +3 -5
  223. package/node/mat/find-mat/find-and-add-2-prongs-on-all-paths.js.map +1 -1
  224. package/node/mat/find-mat/find-and-add-2-prongs.d.ts +4 -4
  225. package/node/mat/find-mat/find-and-add-2-prongs.js +9 -11
  226. package/node/mat/find-mat/find-and-add-2-prongs.js.map +1 -1
  227. package/node/mat/find-mat/find-and-add-3-prongs.d.ts +3 -3
  228. package/node/mat/find-mat/find-and-add-3-prongs.js +8 -10
  229. package/node/mat/find-mat/find-and-add-3-prongs.js.map +1 -1
  230. package/node/mat/find-mat/find-and-add-hole-closing-2-prongs.d.ts +3 -3
  231. package/node/mat/find-mat/find-and-add-hole-closing-2-prongs.js +11 -13
  232. package/node/mat/find-mat/find-and-add-hole-closing-2-prongs.js.map +1 -1
  233. package/node/mat/find-mat/get-potential-2-prongs.d.ts +1 -1
  234. package/node/mat/find-mat/get-potential-2-prongs.js +3 -5
  235. package/node/mat/find-mat/get-potential-2-prongs.js.map +1 -1
  236. package/node/mat/find-mat/get-sharp-corners.d.ts +1 -1
  237. package/node/mat/find-mat/get-sharp-corners.js +3 -5
  238. package/node/mat/find-mat/get-sharp-corners.js.map +1 -1
  239. package/node/mat/geometry/get-closest-square-distance-to-rect.js +21 -14
  240. package/node/mat/geometry/get-closest-square-distance-to-rect.js.map +1 -1
  241. package/node/mat/geometry/get-closest-squared-distance-to-rotated-rect.js +5 -7
  242. package/node/mat/geometry/get-closest-squared-distance-to-rotated-rect.js.map +1 -1
  243. package/node/mat/get-boundary-piece-beziers.d.ts +2 -2
  244. package/node/mat/get-boundary-piece-beziers.js +6 -8
  245. package/node/mat/get-boundary-piece-beziers.js.map +1 -1
  246. package/node/mat/get-contact-circles-at-interface.d.ts +2 -2
  247. package/node/mat/get-contact-circles-at-interface.js +7 -9
  248. package/node/mat/get-contact-circles-at-interface.js.map +1 -1
  249. package/node/mat/get-largest-vertex.d.ts +1 -1
  250. package/node/mat/get-largest-vertex.js +1 -3
  251. package/node/mat/get-largest-vertex.js.map +1 -1
  252. package/node/mat/get-leaves.d.ts +1 -1
  253. package/node/mat/get-leaves.js +1 -3
  254. package/node/mat/get-leaves.js.map +1 -1
  255. package/node/mat/get-neighboring-cps.d.ts +3 -3
  256. package/node/mat/get-neighboring-cps.js +5 -7
  257. package/node/mat/get-neighboring-cps.js.map +1 -1
  258. package/node/mat/get-two-prong-type.d.ts +2 -2
  259. package/node/mat/get-two-prong-type.js +1 -3
  260. package/node/mat/get-two-prong-type.js.map +1 -1
  261. package/node/mat/is-another-cp-closeby.d.ts +5 -5
  262. package/node/mat/is-another-cp-closeby.js +8 -10
  263. package/node/mat/is-another-cp-closeby.js.map +1 -1
  264. package/node/mat/simplify-mat-map-only.d.ts +1 -1
  265. package/node/mat/simplify-mat-map-only.js +10 -13
  266. package/node/mat/simplify-mat-map-only.js.map +1 -1
  267. package/node/mat/to-scale-axis/add-debug-info.d.ts +1 -1
  268. package/node/mat/to-scale-axis/add-debug-info.js +1 -3
  269. package/node/mat/to-scale-axis/add-debug-info.js.map +1 -1
  270. package/node/mat/to-scale-axis/cull-non-cycles.d.ts +1 -1
  271. package/node/mat/to-scale-axis/cull-non-cycles.js +5 -7
  272. package/node/mat/to-scale-axis/cull-non-cycles.js.map +1 -1
  273. package/node/mat/to-scale-axis/cull.d.ts +2 -2
  274. package/node/mat/to-scale-axis/cull.js +75 -7
  275. package/node/mat/to-scale-axis/cull.js.map +1 -1
  276. package/node/mat/trim-mat.d.ts +1 -1
  277. package/node/mat/trim-mat.js +6 -8
  278. package/node/mat/trim-mat.js.map +1 -1
  279. package/node/mat.d.ts +3 -3
  280. package/node/mat.js +1 -2
  281. package/node/point-on-shape.d.ts +2 -2
  282. package/node/point-on-shape.js +23 -33
  283. package/node/point-on-shape.js.map +1 -1
  284. package/node/simplify-mat.d.ts +4 -3
  285. package/node/simplify-mat.js +16 -37
  286. package/node/simplify-mat.js.map +1 -1
  287. package/node/svg/get-loop-bounds.d.ts +2 -2
  288. package/node/svg/get-loop-bounds.js +11 -12
  289. package/node/svg/get-loop-bounds.js.map +1 -1
  290. package/node/svg/get-min-y-pos.d.ts +3 -2
  291. package/node/svg/get-min-y-pos.js +3 -5
  292. package/node/svg/get-min-y-pos.js.map +1 -1
  293. package/node/svg/get-shape-bounds.d.ts +5 -5
  294. package/node/svg/get-shape-bounds.js +5 -7
  295. package/node/svg/get-shape-bounds.js.map +1 -1
  296. package/node/sweep-line/sweep-line.js +1 -3
  297. package/node/sweep-line/sweep-line.js.map +1 -1
  298. package/node/to-scale-axis.d.ts +2 -1
  299. package/node/to-scale-axis.js +18 -20
  300. package/node/to-scale-axis.js.map +1 -1
  301. package/node/traverse-edges.d.ts +1 -1
  302. package/node/traverse-edges.js +1 -3
  303. package/node/traverse-edges.js.map +1 -1
  304. package/node/traverse-vertices.d.ts +1 -1
  305. package/node/traverse-vertices.js +1 -3
  306. package/node/traverse-vertices.js.map +1 -1
  307. package/package.json +34 -30
  308. package/src/circle.ts +1 -2
  309. package/src/compare-curvatures-at-interface.ts +197 -0
  310. package/src/contact-point.ts +2 -3
  311. package/src/cp-node/clone.ts +1 -2
  312. package/src/cp-node/remove.ts +2 -3
  313. package/src/cp-node.ts +6 -8
  314. package/src/curve.ts +3 -4
  315. package/src/debug/cp-node-for-debugging.ts +2 -3
  316. package/src/debug/debug-elem-types.ts +8 -10
  317. package/src/debug/debug.ts +22 -17
  318. package/src/debug/functions/draw-elem/bounding-hull.ts +0 -1
  319. package/src/debug/functions/draw-elem/branch.ts +2 -3
  320. package/src/debug/functions/draw-elem/culls.ts +1 -2
  321. package/src/debug/functions/draw-elem/draw-elem.ts +18 -19
  322. package/src/debug/functions/draw-elem/dull-corner.ts +3 -3
  323. package/src/debug/functions/draw-elem/leaves.ts +2 -4
  324. package/src/debug/functions/draw-elem/loop.ts +1 -2
  325. package/src/debug/functions/draw-elem/loops.ts +1 -2
  326. package/src/debug/functions/draw-elem/loose-bounding-box.ts +0 -1
  327. package/src/debug/functions/draw-elem/mat.ts +3 -5
  328. package/src/debug/functions/draw-elem/max-vertex.ts +1 -2
  329. package/src/debug/functions/draw-elem/min-y.ts +5 -7
  330. package/src/debug/functions/draw-elem/one-prong-at-dull-corner.ts +1 -2
  331. package/src/debug/functions/draw-elem/one-prong.ts +2 -3
  332. package/src/debug/functions/draw-elem/sharp-corner.ts +1 -2
  333. package/src/debug/functions/draw-elem/three-prong.ts +2 -4
  334. package/src/debug/functions/draw-elem/tight-bounding-box.ts +0 -1
  335. package/src/debug/functions/draw-elem/two-prong.ts +2 -3
  336. package/src/debug/functions/draw-elem/vertex.ts +1 -2
  337. package/src/debug/functions/general.ts +2 -3
  338. package/src/debug/functions/three-prong.ts +3 -5
  339. package/src/debug/functions/two-prong.ts +6 -14
  340. package/src/debug/three-prong-for-debugging.ts +4 -5
  341. package/src/debug/two-prong-for-debugging.ts +5 -6
  342. package/src/find-mats.ts +34 -39
  343. package/src/get-boundary-bezier-parts-to-next.ts +5 -6
  344. package/src/get-boundary-beziers-to-next.ts +8 -7
  345. package/src/get-bounding-box-.ts +7 -0
  346. package/src/get-branches.ts +2 -3
  347. package/src/get-curve/get-curve-between.ts +2 -3
  348. package/src/get-curve/get-edge-direction.ts +2 -5
  349. package/src/get-curve-to-next.ts +2 -3
  350. package/src/get-interface-ccw.ts +112 -0
  351. package/src/index.ts +34 -48
  352. package/src/loop/get-max-coordinate.ts +0 -1
  353. package/src/loop.ts +1 -2
  354. package/src/mat/add-to-cp-graph.ts +7 -8
  355. package/src/mat/bezier-piece.ts +1 -2
  356. package/src/mat/closest-boundary-point/closest-points-on-curve.ts +19 -17
  357. package/src/mat/closest-boundary-point/cull-bezier-pieces.ts +4 -5
  358. package/src/mat/closest-boundary-point/cull-by-loose-bounding-box.ts +4 -5
  359. package/src/mat/closest-boundary-point/cull-by-tight-boundary-box.ts +7 -5
  360. package/src/mat/closest-boundary-point/get-best-distance-squared.ts +1 -2
  361. package/src/mat/closest-boundary-point/get-close-boundary-points.ts +4 -11
  362. package/src/mat/closest-boundary-point/get-closest-boundary-point.ts +5 -6
  363. package/src/mat/cmp-cp-on-delta.ts +2 -3
  364. package/src/mat/create-new-cp-tree.ts +5 -5
  365. package/src/mat/find-mat/add-1-prong.ts +7 -8
  366. package/src/mat/find-mat/add-2-prong.ts +11 -12
  367. package/src/mat/find-mat/add-3-prong.ts +7 -8
  368. package/src/mat/find-mat/add-debug-info.ts +8 -7
  369. package/src/mat/find-mat/create-get-interesting-points-on-loop.ts +22 -8
  370. package/src/mat/find-mat/create-initial-cp-graph.ts +7 -8
  371. package/src/mat/find-mat/find-2-prong/add-debug-info.ts +9 -10
  372. package/src/mat/find-mat/find-2-prong/cull-bezier-pieces.ts +4 -7
  373. package/src/mat/find-mat/find-2-prong/find-2-prong.ts +19 -17
  374. package/src/mat/find-mat/find-2-prong/get-initial-bezier-pieces.ts +7 -8
  375. package/src/mat/find-mat/find-2-prong/x-for-debugging.ts +1 -2
  376. package/src/mat/find-mat/find-3-prong/calc-better-x.ts +3 -6
  377. package/src/mat/find-mat/find-3-prong/calc-initial-3-prong-center.ts +3 -8
  378. package/src/mat/find-mat/find-3-prong/find-3-prong-for-delta3s.ts +10 -14
  379. package/src/mat/find-mat/find-3-prong/find-3-prong.ts +13 -8
  380. package/src/mat/find-mat/find-3-prong/get-closest-points.ts +2 -5
  381. package/src/mat/find-mat/find-and-add-2-prongs-on-all-paths.ts +5 -6
  382. package/src/mat/find-mat/find-and-add-2-prongs.ts +9 -10
  383. package/src/mat/find-mat/find-and-add-3-prongs.ts +8 -9
  384. package/src/mat/find-mat/find-and-add-hole-closing-2-prongs.ts +7 -8
  385. package/src/mat/find-mat/get-potential-2-prongs.ts +1 -2
  386. package/src/mat/find-mat/get-sharp-corners.ts +1 -2
  387. package/src/mat/find-mat/get-total-abs-curvature.ts +2 -3
  388. package/src/mat/find-mat/get-total-by.ts +2 -3
  389. package/src/mat/geometry/get-closest-square-distance-to-rect.ts +15 -4
  390. package/src/mat/geometry/get-closest-squared-distance-to-rotated-rect.ts +0 -1
  391. package/src/mat/get-boundary-piece-beziers.ts +5 -6
  392. package/src/mat/get-contact-circles-at-interface.ts +3 -4
  393. package/src/mat/get-edges-as-array.ts +2 -3
  394. package/src/mat/get-largest-three-prong.ts +1 -2
  395. package/src/mat/get-largest-vertex.ts +1 -2
  396. package/src/mat/get-leaves.ts +1 -2
  397. package/src/mat/get-neighboring-cps.ts +5 -6
  398. package/src/mat/get-two-prong-type.ts +2 -3
  399. package/src/mat/is-another-cp-closeby.ts +6 -7
  400. package/src/mat/simplify-mat-map-only.ts +5 -7
  401. package/src/mat/to-scale-axis/add-debug-info.ts +2 -3
  402. package/src/mat/to-scale-axis/add-to-tree.ts +3 -4
  403. package/src/mat/to-scale-axis/calc-groups.ts +1 -2
  404. package/src/mat/to-scale-axis/create-spacial-tree.ts +3 -4
  405. package/src/mat/to-scale-axis/cull-non-cycles.ts +2 -3
  406. package/src/mat/to-scale-axis/cull.ts +3 -4
  407. package/src/mat/to-scale-axis/get-engulfed-vertices.ts +3 -4
  408. package/src/mat/to-scale-axis/t-tree.ts +1 -2
  409. package/src/mat/to-scale-axis/traverse-spacial-tree.ts +2 -4
  410. package/src/mat/trim-mat.ts +4 -5
  411. package/src/mat.ts +3 -5
  412. package/src/point-on-shape.ts +10 -12
  413. package/src/simplify-mat.ts +15 -41
  414. package/src/svg/get-curvature-at-interface.ts +1 -3
  415. package/src/svg/get-extreme.ts +2 -3
  416. package/src/svg/get-loop-bounds.ts +4 -4
  417. package/src/svg/get-min-y-pos.ts +2 -6
  418. package/src/svg/get-shape-bounds.ts +2 -3
  419. package/src/sweep-line/are-boxes-intersecting.ts +1 -1
  420. package/src/to-scale-axis.ts +15 -16
  421. package/src/traverse-edges.ts +1 -2
  422. package/src/traverse-vertices.ts +1 -2
  423. package/test/lib-load.spec.ts +0 -1
  424. package/tsconfig.json +6 -31
  425. package/webpack.config.cjs +132 -0
  426. package/.nycrc +0 -4
  427. package/node/mat/cmp-cp-on-delta.d.ts +0 -14
  428. package/node/mat/cmp-cp-on-delta.js +0 -44
  429. package/node/mat/cmp-cp-on-delta.js.map +0 -1
  430. package/node/mat/find-mat/get-total-abs-curvature.d.ts +0 -5
  431. package/node/mat/find-mat/get-total-abs-curvature.js +0 -12
  432. package/node/mat/find-mat/get-total-abs-curvature.js.map +0 -1
  433. package/node/mat/find-mat/get-total-by.d.ts +0 -10
  434. package/node/mat/find-mat/get-total-by.js +0 -21
  435. package/node/mat/find-mat/get-total-by.js.map +0 -1
  436. package/node/mat/get-edges-as-array.d.ts +0 -4
  437. package/node/mat/get-edges-as-array.js +0 -11
  438. package/node/mat/get-edges-as-array.js.map +0 -1
  439. package/node/mat/get-largest-three-prong.d.ts +0 -4
  440. package/node/mat/get-largest-three-prong.js +0 -12
  441. package/node/mat/get-largest-three-prong.js.map +0 -1
  442. package/node/mat/to-scale-axis/add-to-tree.d.ts +0 -13
  443. package/node/mat/to-scale-axis/add-to-tree.js +0 -38
  444. package/node/mat/to-scale-axis/add-to-tree.js.map +0 -1
  445. package/node/mat/to-scale-axis/calc-groups.d.ts +0 -28
  446. package/node/mat/to-scale-axis/calc-groups.js +0 -65
  447. package/node/mat/to-scale-axis/calc-groups.js.map +0 -1
  448. package/node/mat/to-scale-axis/create-spacial-tree.d.ts +0 -9
  449. package/node/mat/to-scale-axis/create-spacial-tree.js +0 -23
  450. package/node/mat/to-scale-axis/create-spacial-tree.js.map +0 -1
  451. package/node/mat/to-scale-axis/get-engulfed-vertices.d.ts +0 -12
  452. package/node/mat/to-scale-axis/get-engulfed-vertices.js +0 -94
  453. package/node/mat/to-scale-axis/get-engulfed-vertices.js.map +0 -1
  454. package/node/mat/to-scale-axis/t-tree.d.ts +0 -6
  455. package/node/mat/to-scale-axis/t-tree.js +0 -3
  456. package/node/mat/to-scale-axis/t-tree.js.map +0 -1
  457. package/node/mat/to-scale-axis/traverse-spacial-tree.d.ts +0 -11
  458. package/node/mat/to-scale-axis/traverse-spacial-tree.js +0 -24
  459. package/node/mat/to-scale-axis/traverse-spacial-tree.js.map +0 -1
  460. package/node/svg/get-curvature-at-interface.d.ts +0 -9
  461. package/node/svg/get-curvature-at-interface.js +0 -48
  462. package/node/svg/get-curvature-at-interface.js.map +0 -1
  463. package/node/svg/get-extreme.d.ts +0 -9
  464. package/node/svg/get-extreme.js +0 -15
  465. package/node/svg/get-extreme.js.map +0 -1
  466. package/node/sweep-line/are-boxes-intersecting.d.ts +0 -11
  467. package/node/sweep-line/are-boxes-intersecting.js +0 -41
  468. package/node/sweep-line/are-boxes-intersecting.js.map +0 -1
  469. package/test/mocha.opts +0 -4
  470. package/webpack.config.js +0 -25
@@ -1,8 +1,8 @@
1
- import { CpNode } from '../cp-node';
2
- import { IPointOnShape } from '../point-on-shape';
3
- import { Circle } from '../circle';
4
- import { BezierPiece } from '../mat/bezier-piece';
5
- import { Generated } from './debug';
1
+ import { CpNode } from '../cp-node.js';
2
+ import { IPointOnShape } from '../point-on-shape.js';
3
+ import { Circle } from '../circle.js';
4
+ import { BezierPiece } from '../mat/bezier-piece.js';
5
+ import { Generated } from './debug.js';
6
6
  /** @hidden */
7
7
  interface TwoProngForDebugging {
8
8
  generated: Generated;
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=two-prong-for-debugging.js.map
@@ -1,23 +1,26 @@
1
- import { Mat } from './mat';
1
+ import { Mat } from './mat.js';
2
2
  /**
3
3
  * Finds and returns the Medial Axis Transforms (MATs) from the given array of
4
4
  * bezier loops representing shape boundaries.
5
+ *
5
6
  * @param bezierLoops An array of (possibly intersecting) loops with each loop
6
7
  * representing one or more piecewise smooth closed curves (i.e. shapes). Each
7
8
  * loop consists of an array of beziers represented by an array of control
8
9
  * points with 2,3 or 4 elements corresponding to linear, quadratic and cubic
9
10
  * beziers respectively. Each point is a two-element array (ordered pair), the
10
11
  * first of which is the x-coordinate and the second the y-coordinate.
11
- * @param maxFlatness The maximum value the flatness of a curve can have before
12
- * an additional MAT point is added in between. Defaults to 1.01. (Flatness is
13
- * measured as the total distance between control points of a curve divided by
14
- * the length of the curve.) The is clipped in [1.001,2]..
12
+ *
13
+ * @param maxCurviness The maximum value the 'curviness' of a curve can have
14
+ * before an additional MAT point is inserted in between. Defaults to 0.4.
15
+ * (Curviness is measured as the total angle in radians between the consecutive
16
+ * vectors formed by the ordered control points of th bezier curve). The value
17
+ * is clipped in the range `[0.05,3]`.
15
18
  * @param maxLength The maximum length a curve can have before an additional MAT
16
- * point is added in between. This value is scaled to a reference 1024 x 1024
17
- * grid (e.g. if the shape fits in a 512 x 512 axis-aligned box the will be
18
- * halved, e.g. from 10 to 5). Together with maxFlatness it represents a
19
+ * point is inserted. This value is scaled to a reference 1024 x 1024
20
+ * grid (e.g. if the shape fits in a 512 x 512 axis-aligned box the value will be
21
+ * halved, e.g. from 10 to 5). Together with maxCurviness it represents a
19
22
  * tolerance for the accuracy of the MAT. Defaults to 4. The value is clipped
20
23
  * in [1,100].
21
24
  */
22
- declare function findMats(bezierLoops: number[][][][], maxFlatness?: number, maxLength?: number): Mat[];
25
+ declare function findMats(bezierLoops: number[][][][], maxCurviness?: number, maxLength?: number): Mat[];
23
26
  export { findMats };
package/node/find-mats.js CHANGED
@@ -1,75 +1,71 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const flo_boolean_1 = require("flo-boolean");
4
- const find_and_add_3_prongs_1 = require("./mat/find-mat/find-and-add-3-prongs");
5
- const create_initial_cp_graph_1 = require("./mat/find-mat/create-initial-cp-graph");
1
+ import { simplifyPaths } from 'flo-boolean';
2
+ import { findAndAddAll3Prongs } from './mat/find-mat/find-and-add-3-prongs.js';
3
+ import { createInitialCpGraph } from './mat/find-mat/create-initial-cp-graph.js';
6
4
  ;
7
- const add_debug_info_1 = require("./mat/find-mat/add-debug-info");
8
- const get_potential_2_prongs_1 = require("./mat/find-mat/get-potential-2-prongs");
9
- const get_sharp_corners_1 = require("./mat/find-mat/get-sharp-corners");
10
- const find_and_add_2_prongs_on_all_paths_1 = require("./mat/find-mat/find-and-add-2-prongs-on-all-paths");
11
- const create_get_interesting_points_on_loop_1 = require("./mat/find-mat/create-get-interesting-points-on-loop");
12
- const find_and_add_hole_closing_2_prongs_1 = require("./mat/find-mat/find-and-add-hole-closing-2-prongs");
13
- const get_max_coordinate_1 = require("./loop/get-max-coordinate");
5
+ import { addDebugInfo1, addDebugInfo2, addDebugInfo3, addDebugInfo4 } from './mat/find-mat/add-debug-info.js';
6
+ import { getPotential2Prongs } from './mat/find-mat/get-potential-2-prongs.js';
7
+ import { getSharpCorners } from './mat/find-mat/get-sharp-corners.js';
8
+ import { findAndAdd2ProngsOnAllPaths } from './mat/find-mat/find-and-add-2-prongs-on-all-paths.js';
9
+ import { getInterestingPointsOnLoop } from './mat/find-mat/create-get-interesting-points-on-loop.js';
10
+ import { findAndAddHoleClosing2Prongs } from './mat/find-mat/find-and-add-hole-closing-2-prongs.js';
11
+ import { getLoopsMetrics } from './loop/get-max-coordinate.js';
14
12
  /**
15
13
  * Finds and returns the Medial Axis Transforms (MATs) from the given array of
16
14
  * bezier loops representing shape boundaries.
15
+ *
17
16
  * @param bezierLoops An array of (possibly intersecting) loops with each loop
18
17
  * representing one or more piecewise smooth closed curves (i.e. shapes). Each
19
18
  * loop consists of an array of beziers represented by an array of control
20
19
  * points with 2,3 or 4 elements corresponding to linear, quadratic and cubic
21
20
  * beziers respectively. Each point is a two-element array (ordered pair), the
22
21
  * first of which is the x-coordinate and the second the y-coordinate.
23
- * @param maxFlatness The maximum value the flatness of a curve can have before
24
- * an additional MAT point is added in between. Defaults to 1.01. (Flatness is
25
- * measured as the total distance between control points of a curve divided by
26
- * the length of the curve.) The is clipped in [1.001,2]..
22
+ *
23
+ * @param maxCurviness The maximum value the 'curviness' of a curve can have
24
+ * before an additional MAT point is inserted in between. Defaults to 0.4.
25
+ * (Curviness is measured as the total angle in radians between the consecutive
26
+ * vectors formed by the ordered control points of th bezier curve). The value
27
+ * is clipped in the range `[0.05,3]`.
27
28
  * @param maxLength The maximum length a curve can have before an additional MAT
28
- * point is added in between. This value is scaled to a reference 1024 x 1024
29
- * grid (e.g. if the shape fits in a 512 x 512 axis-aligned box the will be
30
- * halved, e.g. from 10 to 5). Together with maxFlatness it represents a
29
+ * point is inserted. This value is scaled to a reference 1024 x 1024
30
+ * grid (e.g. if the shape fits in a 512 x 512 axis-aligned box the value will be
31
+ * halved, e.g. from 10 to 5). Together with maxCurviness it represents a
31
32
  * tolerance for the accuracy of the MAT. Defaults to 4. The value is clipped
32
33
  * in [1,100].
33
34
  */
34
- function findMats(bezierLoops, maxFlatness = 1.01, maxLength = 4) {
35
+ function findMats(bezierLoops, maxCurviness = 0.4, maxLength = 4) {
35
36
  if (typeof _debug_ !== 'undefined') {
36
37
  var timingStart = performance.now();
37
38
  }
38
39
  let maxCoordinate;
39
40
  let minBezLength;
40
- ({ maxFlatness, maxLength, maxCoordinate, minBezLength } =
41
- getSizeParams(bezierLoops, maxFlatness, maxLength));
42
- let loopss = flo_boolean_1.simplifyPaths(bezierLoops, maxCoordinate);
43
- if (typeof _debug_ !== 'undefined') {
44
- let timing = _debug_.generated.timing;
45
- timing.simplifyPaths = performance.now() - timingStart;
46
- }
41
+ ({ maxCurviness, maxLength, maxCoordinate, minBezLength } =
42
+ getSizeParams(bezierLoops, maxCurviness, maxLength));
43
+ let loopss = simplifyPaths(bezierLoops, maxCoordinate);
47
44
  let mats = [];
48
45
  for (let loops of loopss) {
49
- let mat = findMat(loops, minBezLength, maxFlatness, maxLength, maxCoordinate);
46
+ let mat = findMat(loops, minBezLength, maxCurviness, maxLength, maxCoordinate);
50
47
  if (mat) {
51
48
  mats.push(mat);
52
49
  }
53
50
  }
54
51
  return mats;
55
52
  }
56
- exports.findMats = findMats;
57
- function getSizeParams(bezierLoops, maxFlatness, maxLength) {
53
+ function getSizeParams(bezierLoops, maxCurviness, maxLength) {
58
54
  // Gather some shape metrics
59
- let { maxCoordinate, maxRadius } = get_max_coordinate_1.getLoopsMetrics(bezierLoops);
55
+ let { maxCoordinate, maxRadius } = getLoopsMetrics(bezierLoops);
60
56
  let expMax = Math.ceil(Math.log2(maxCoordinate));
61
57
  let minBezLengthSigBits = 14;
62
58
  /**
63
59
  * If a curve is shorter than this value then no points on it will be
64
60
  * selected for the purpose of finding the MAT.
65
61
  */
66
- let minBezLength = Math.pow(2, expMax) * Math.pow(2, (-minBezLengthSigBits));
62
+ let minBezLength = 2 ** expMax * 2 ** (-minBezLengthSigBits);
67
63
  // Limit the tolerance to a reasonable level
68
- if (maxFlatness < 1.001) {
69
- maxFlatness = 1.001;
64
+ if (maxCurviness < 0.05) {
65
+ maxCurviness = 0.05;
70
66
  }
71
- if (maxFlatness > 2) {
72
- maxFlatness = 2;
67
+ if (maxCurviness > 3) {
68
+ maxCurviness = 3;
73
69
  }
74
70
  // Limit the tolerance to a reasonable level
75
71
  if (maxLength < 0.1) {
@@ -81,35 +77,33 @@ function getSizeParams(bezierLoops, maxFlatness, maxLength) {
81
77
  // Adjust length tolerance according to a reference max coordinate
82
78
  let expMaxRadius = Math.ceil(Math.log2(maxRadius));
83
79
  let maxLengthSigBits = 10; // 1024 x 1024
84
- maxLength = maxLength * (Math.pow(2, expMaxRadius) * Math.pow(2, (-maxLengthSigBits)));
85
- return { maxFlatness, maxLength, maxCoordinate, minBezLength };
80
+ maxLength = maxLength * (2 ** expMaxRadius * 2 ** (-maxLengthSigBits));
81
+ return { maxCurviness, maxLength, maxCoordinate, minBezLength };
86
82
  }
87
83
  /**
88
84
  * @hidden
89
85
  * Find the MAT of the given loops.
90
86
  * @param loops The loops (that as a precondition must be ordered from highest
91
87
  * (i.e. smallest y-value) topmost point loops to lowest)
92
- * @param xMap Intersection point map.
93
- * @param additionalPointCount
94
88
  */
95
- function findMat(loops, minBezLength, maxFlatness, maxLength, maxCoordinate) {
96
- add_debug_info_1.addDebugInfo1(loops);
89
+ function findMat(loops, minBezLength, maxCurviness, maxLength, maxCoordinate) {
90
+ addDebugInfo1(loops);
97
91
  // Gets interesting points on the shape, i.e. those that makes sense to use
98
92
  // for the 2-prong procedure.
99
- let pointsPerLoop = loops.map(create_get_interesting_points_on_loop_1.getInterestingPointsOnLoop(minBezLength, maxFlatness, maxLength));
100
- let for2ProngsPerLoop = get_potential_2_prongs_1.getPotential2Prongs(pointsPerLoop);
101
- let sharpCornersPerLoop = get_sharp_corners_1.getSharpCorners(pointsPerLoop);
93
+ let pointsPerLoop = loops.map(getInterestingPointsOnLoop(minBezLength, maxCurviness, maxLength));
94
+ let for2ProngsPerLoop = getPotential2Prongs(pointsPerLoop);
95
+ let sharpCornersPerLoop = getSharpCorners(pointsPerLoop);
102
96
  let cpTrees = new Map();
103
- let cpNode = create_initial_cp_graph_1.createInitialCpGraph(loops, cpTrees, sharpCornersPerLoop);
104
- find_and_add_hole_closing_2_prongs_1.findAndAddHoleClosing2Prongs(loops, cpTrees, maxCoordinate);
97
+ let cpNode = createInitialCpGraph(loops, cpTrees, sharpCornersPerLoop);
98
+ findAndAddHoleClosing2Prongs(loops, cpTrees, maxCoordinate);
105
99
  if (typeof _debug_ !== 'undefined') {
106
100
  if (_debug_.directives.stopAfterHoleClosers) {
107
101
  return undefined;
108
102
  }
109
103
  }
110
- add_debug_info_1.addDebugInfo2();
111
- cpNode = find_and_add_2_prongs_on_all_paths_1.findAndAdd2ProngsOnAllPaths(loops, cpTrees, for2ProngsPerLoop, maxCoordinate);
112
- add_debug_info_1.addDebugInfo3();
104
+ addDebugInfo2();
105
+ cpNode = findAndAdd2ProngsOnAllPaths(loops, cpTrees, for2ProngsPerLoop, maxCoordinate);
106
+ addDebugInfo3();
113
107
  if (typeof _debug_ !== 'undefined') {
114
108
  if (_debug_.directives.stopAfterTwoProngs) {
115
109
  return undefined;
@@ -118,14 +112,15 @@ function findMat(loops, minBezLength, maxFlatness, maxLength, maxCoordinate) {
118
112
  if (cpNode === undefined) {
119
113
  return undefined;
120
114
  }
121
- find_and_add_3_prongs_1.findAndAddAll3Prongs(cpTrees, cpNode, maxCoordinate);
115
+ findAndAddAll3Prongs(cpTrees, cpNode, maxCoordinate);
122
116
  if (typeof _debug_ !== 'undefined') {
123
117
  if (_debug_.directives.stopAfterThreeProngs) {
124
118
  return undefined;
125
119
  }
126
120
  }
127
121
  let mat = { cpNode, cpTrees };
128
- add_debug_info_1.addDebugInfo4(mat);
122
+ addDebugInfo4(mat);
129
123
  return mat;
130
124
  }
125
+ export { findMats };
131
126
  //# sourceMappingURL=find-mats.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"find-mats.js","sourceRoot":"","sources":["../src/find-mats.ts"],"names":[],"mappings":";;AAMA,6CAA4C;AAI5C,gFAA4E;AAC5E,oFAA8E;AAAA,CAAC;AAC/E,kEAA2G;AAC3G,kFAA4E;AAC5E,wEAAmE;AACnE,0GAAgG;AAChG,gHAAkG;AAClG,0GAAiG;AACjG,kEAA4D;AAG5D;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAS,QAAQ,CACf,WAA2B,EAC3B,WAAW,GAAG,IAAI,EACZ,SAAS,GAAG,CAAC;IAEpB,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE;QAAE,IAAI,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;KAAE;IAE5E,IAAI,aAAqB,CAAC;IAC1B,IAAI,YAAoB,CAAC;IACzB,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE;QACvD,aAAa,CAAC,WAAW,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC;IAErD,IAAI,MAAM,GAAG,2BAAa,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;IAEvD,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE;QACnC,IAAI,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC;QACtC,MAAM,CAAC,aAAa,GAAG,WAAW,CAAC,GAAG,EAAE,GAAG,WAAW,CAAC;KACvD;IAED,IAAI,IAAI,GAAU,EAAE,CAAC;IACrB,KAAK,IAAI,KAAK,IAAI,MAAM,EAAE;QACzB,IAAI,GAAG,GAAG,OAAO,CAChB,KAAK,EACL,YAAY,EACZ,WAAW,EACX,SAAS,EACT,aAAa,CACb,CAAC;QACF,IAAI,GAAG,EAAE;YAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAAE;KAC5B;IAED,O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AErD,IAAI,OAAO,OAAO,KAAK,WAAW,EAAE;QACnC,IAAI,OAAO,CAAC,UAAU,CAAC,oBAAoB,EAAE;YAC5C,OAAO,SAAS,CAAC;SACjB;KACD;IAED,IAAI,GAAG,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;IAE9B,aAAa,CAAC,GAAG,CAAC,CAAC;IAEnB,OAAO,GAAG,CAAC;AACZ,CAAC;AAGD,OAAO,EAAE,QAAQ,EAAE,CAAA"}
@@ -1,11 +1,9 @@
1
- import { CpNode } from './cp-node';
1
+ import { BezierPiece } from 'flo-bezier3';
2
+ import { CpNode } from './cp-node.js';
2
3
  /**
3
4
  * Returns the ordered bezier curves from this CpNode to the next CpNode
4
5
  * on the boundary.
5
6
  * @param cpNode
6
7
  */
7
- declare function getBoundaryBezierPartsToNext(cpNode: CpNode): {
8
- ps: number[][];
9
- ts: number[];
10
- }[];
8
+ declare function getBoundaryBezierPartsToNext(cpNode: CpNode): BezierPiece[];
11
9
  export { getBoundaryBezierPartsToNext };
@@ -1,5 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
1
  /**
4
2
  * Returns the ordered bezier curves from this CpNode to the next CpNode
5
3
  * on the boundary.
@@ -27,7 +25,6 @@ function getBoundaryBezierPartsToNext(cpNode) {
27
25
  }
28
26
  return bezierParts;
29
27
  }
30
- exports.getBoundaryBezierPartsToNext = getBoundaryBezierPartsToNext;
31
28
  /**
32
29
  * @hidden
33
30
  * Adds pieces of skipped beziers.
@@ -42,4 +39,5 @@ function addSkippedBeziers(bezierParts, curveStart, curveEnd, t1) {
42
39
  bezierParts.push(bezierPart);
43
40
  } while (curveThis !== curveEnd);
44
41
  }
42
+ export { getBoundaryBezierPartsToNext };
45
43
  //# sourceMappingURL=get-boundary-bezier-parts-to-next.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-boundary-bezier-parts-to-next.js","sourceRoot":"","sources":["../src/get-boundary-bezier-parts-to-next.ts"],"names":[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OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAC/C,CAAC;QAEF,iBAAiB,CACT,WAAW,EACX,OAAO,CAAC,KAAK,EACb,OAAO,CAAC,KAAK,EACb,OAAO,CAAC,CAAC,CAChB,CAAC;KACL;IAED,OAAO,WAAW,CAAC;AACvB,CAAC;AAGD;;;GAGG;AACH,SAAS,iBAAiB,CAClB,WAA+C,EAC/C,UAAkB,EAClB,QAAkB,EAClB,EAAmB;IAEvB,IAAI,SAAS,GAAG,UAAU,CAAC;IAC3B,GAAG;QACC,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC;QAC3B,IAAI,UAAU,GAAG,SAAS,KAAK,QAAQ;YACnC,CAAC,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE;YACnC,CAAC,CAAC,EAAE,EAAE,EAAE,SAAS,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAA;QAEtC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;KAChC,QAAQ,SAAS,KAAK,QAAQ,EAAE;AAGrC,CAAC;AAGD,OAAO,EAAE,4BAA4B,EAAE,CAAA"}
@@ -1,4 +1,4 @@
1
- import { CpNode } from './cp-node';
1
+ import { CpNode } from './cp-node.js';
2
2
  /**
3
3
  * Returns the ordered bezier curves from this CpNode to the next CpNode
4
4
  * on the boundary.
@@ -1,6 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const flo_bezier3_1 = require("flo-bezier3");
1
+ // qqq import { fromTo, fromTTo1, from0ToT } from 'flo-bezier3';
2
+ import { fromTo } from 'flo-bezier3';
4
3
  /**
5
4
  * Returns the ordered bezier curves from this CpNode to the next CpNode
6
5
  * on the boundary.
@@ -20,15 +19,14 @@ function getBoundaryBeziersToNext(cpNode) {
20
19
  }
21
20
  let beziers = [];
22
21
  if (curveNext === curveThis) {
23
- beziers.push(flo_bezier3_1.fromTo(posThis.curve.ps)(posThis.t, posNext.t));
22
+ beziers.push(fromTo(posThis.curve.ps, posThis.t, posNext.t));
24
23
  }
25
24
  else {
26
- beziers.push(flo_bezier3_1.fromTTo1(posThis.curve.ps, posThis.t));
25
+ beziers.push(fromTo(posThis.curve.ps, posThis.t, 1));
27
26
  addSkippedBeziers(beziers, posThis.curve, posNext.curve, posNext.t);
28
27
  }
29
28
  return beziers;
30
29
  }
31
- exports.getBoundaryBeziersToNext = getBoundaryBeziersToNext;
32
30
  /**
33
31
  * Adds pieces of skipped beziers.
34
32
  * @hidden
@@ -38,7 +36,10 @@ function addSkippedBeziers(beziers, curveStart, curveEnd, t1) {
38
36
  do {
39
37
  curveThis = curveThis.next;
40
38
  let tEnd = curveThis === curveEnd ? t1 : 1;
41
- beziers.push(flo_bezier3_1.from0ToT(curveThis.ps, tEnd));
39
+ beziers.push(
40
+ // qqq from0ToT(curveThis.ps, tEnd)
41
+ fromTo(curveThis.ps, 0, tEnd));
42
42
  } while (curveThis !== curveEnd);
43
43
  }
44
+ export { getBoundaryBeziersToNext };
44
45
  //# sourceMappingURL=get-boundary-beziers-to-next.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-boundary-beziers-to-next.js","sourceRoot":"","sources":["../src/get-boundary-beziers-to-next.ts"],"names":[],"mappings":";;AAGA,6CAAyD;AAGzD;;;;GAIG;AACH,SAAS,wBAAwB,CAAC,MAAc;IAC5C,IAAI,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;IAEzB,IAAI,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC;IACrC,IAAI,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC;IAErC,IAAI,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC;IAC9B,I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AC,CAAC;QAC3C,OAAO,CAAC,IAAI;QACR,oCAAoC;QACpC,MAAM,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,CAChC,CAAC;KACL,QAAQ,SAAS,KAAK,QAAQ,EAAE;AACrC,CAAC;AAGD,OAAO,EAAE,wBAAwB,EAAE,CAAA"}
@@ -0,0 +1,2 @@
1
+ declare const getBoundingBox_: (a: number[][]) => number[][];
2
+ export { getBoundingBox_ };
@@ -0,0 +1,5 @@
1
+ import { getBoundingBox } from "flo-bezier3";
2
+ import { memoize } from "flo-memoize";
3
+ const getBoundingBox_ = memoize(getBoundingBox);
4
+ export { getBoundingBox_ };
5
+ //# sourceMappingURL=get-bounding-box-.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-bounding-box-.js","sourceRoot":"","sources":["../src/get-bounding-box-.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,MAAM,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;AAGhD,OAAO,EAAE,eAAe,EAAE,CAAA"}
@@ -1,4 +1,4 @@
1
- import { CpNode } from './cp-node';
1
+ import { CpNode } from './cp-node.js';
2
2
  /**
3
3
  * Traverses all edges (depth first) of the given MAT tree starting at the given
4
4
  * vertex (represented by a [[CpNode]]). Returns the result as an array of
@@ -1,8 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const flo_bezier3_1 = require("flo-bezier3");
4
- const flo_vector2d_1 = require("flo-vector2d");
5
- const get_curve_to_next_1 = require("./get-curve-to-next");
1
+ import { tangent } from 'flo-bezier3';
2
+ import { cross, toUnitVector } from 'flo-vector2d';
3
+ import { getCurveToNext } from './get-curve-to-next.js';
6
4
  /** @hidden */
7
5
  const defaultTolerance = 1; // 1 degree
8
6
  /**
@@ -52,9 +50,9 @@ function getBranches(cpNode, tolerance = defaultTolerance) {
52
50
  cps.push(...children);
53
51
  continue;
54
52
  }
55
- let backPointingTan = flo_vector2d_1.toUnitVector(flo_bezier3_1.tangent(get_curve_to_next_1.getCurveToNext(cp.next.prevOnCircle), 0));
56
- let forwardPointingTan = flo_vector2d_1.toUnitVector(flo_bezier3_1.tangent(get_curve_to_next_1.getCurveToNext(children[0]), 0));
57
- let cross_ = flo_vector2d_1.cross(backPointingTan, forwardPointingTan);
53
+ let backPointingTan = toUnitVector(tangent(getCurveToNext(cp.next.prevOnCircle), 0));
54
+ let forwardPointingTan = toUnitVector(tangent(getCurveToNext(children[0]), 0));
55
+ let cross_ = cross(backPointingTan, forwardPointingTan);
58
56
  let angle = Math.abs(Math.asin(cross_) * (180 / Math.PI));
59
57
  if (angle > tolerance) {
60
58
  branches.push(branchCpNodes);
@@ -67,5 +65,5 @@ function getBranches(cpNode, tolerance = defaultTolerance) {
67
65
  }
68
66
  return branches;
69
67
  }
70
- exports.getBranches = getBranches;
68
+ export { getBranches };
71
69
  //# sourceMappingURL=get-branches.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-branches.js","sourceRoot":"","sources":["../src/get-branches.ts"],"names":[],"mappings":";;AAEA,6CAAsC;AACtC,+CAAmD;AACnD,2DAAqD;AAGrD,cAAc;AACd,MAAM,gBAAgB,GAAG,CAAC,CAAC,CAAC,WAAW;AAGvC;;;;;;;;GAQG;AACH,SAAS,WAAW,CAClB,MAAc,EACd,YAAoB,gBAAgB;IAErC,oBAAoB;IACpB,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,EAAE;QACpC,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;KACrB;IAED,IAAI,QAAQ,GAAe,EAAE,CAAC;IAE9B,wEAAwE;IACxE,gBAAgB;IAChB,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAEhC,IAAI,aAAa,GAAa,EAAE,CAAC;IACjC,OAAO,GAAG,CAAC,MAAM,EAA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K,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAAC;QACxD,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAE,MAAM,CAAE,GAAG,CAAC,GAAG,GAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;QAE1D,IAAI,KAAK,GAAG,SAAS,EAAE;YACtB,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;YAC7B,aAAa,GAAG,EAAE,CAAC;SACnB;QAED,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;KACtB;IAED,IAAI,aAAa,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;KAAE;IAE3D,OAAO,QAAQ,CAAC;AACjB,CAAC;AAGD,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -1,4 +1,4 @@
1
- import { CpNode } from '../cp-node';
1
+ import { CpNode } from '../cp-node.js';
2
2
  /**
3
3
  * Returns the bezier curve from the maximal disk of one [[CpNode]] to another
4
4
  * [[CpNode]]'s maximal disk.
@@ -1,7 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const flo_vector2d_1 = require("flo-vector2d");
4
- const get_edge_direction_1 = require("./get-edge-direction");
1
+ import { fromTo, dot, cross, rotate90Degrees, interpolate, translate, lineLineIntersection } from 'flo-vector2d';
2
+ import { getEdgeDirection } from './get-edge-direction.js';
5
3
  /** @hidden */
6
4
  const TOLERANCE_ADD_2PRONG = 0.01;
7
5
  /** @hidden */
@@ -14,46 +12,46 @@ const TOLERANCE_USE_LINE = 0.0001; // else cubic
14
12
  */
15
13
  function getCurveBetween(cpNodeFrom, cpNodeTo) {
16
14
  let fromCc = cpNodeFrom.cp.circle.center;
17
- let fromL = get_edge_direction_1.getEdgeDirection(cpNodeFrom);
15
+ let fromL = getEdgeDirection(cpNodeFrom);
18
16
  let toCc = cpNodeTo.cp.circle.center;
19
- let toL = get_edge_direction_1.getEdgeDirection(cpNodeTo.prevOnCircle);
20
- let mid = flo_vector2d_1.lineLineIntersection(fromL, toL);
21
- let c = flo_vector2d_1.fromTo(fromCc, toCc);
17
+ let toL = getEdgeDirection(cpNodeTo.prevOnCircle);
18
+ let mid = lineLineIntersection(fromL, toL);
19
+ let c = fromTo(fromCc, toCc);
22
20
  let twisted;
23
21
  if (!mid) {
24
22
  twisted = true;
25
23
  }
26
24
  else {
27
- let a = flo_vector2d_1.fromTo(fromCc, mid);
28
- let b = flo_vector2d_1.fromTo(toCc, mid);
29
- twisted = flo_vector2d_1.dot(a, c) < 0 || flo_vector2d_1.dot(b, c) > 0;
25
+ let a = fromTo(fromCc, mid);
26
+ let b = fromTo(toCc, mid);
27
+ twisted = dot(a, c) < 0 || dot(b, c) > 0;
30
28
  }
31
29
  if (!twisted) {
32
30
  return [fromCc, mid, toCc];
33
31
  }
34
- let r = flo_vector2d_1.rotate90Degrees(c);
35
- let w1 = flo_vector2d_1.fromTo(fromL[0], fromL[1]); // This is a unit vector
36
- let w2 = flo_vector2d_1.fromTo(toL[0], toL[1]); // This is a unit vector
37
- let d1 = Math.abs(flo_vector2d_1.cross(c, w1)) / (3 * 3);
38
- let d2 = Math.abs(flo_vector2d_1.cross(c, w2)) / (3 * 3);
32
+ let r = rotate90Degrees(c);
33
+ let w1 = fromTo(fromL[0], fromL[1]); // This is a unit vector
34
+ let w2 = fromTo(toL[0], toL[1]); // This is a unit vector
35
+ let d1 = Math.abs(cross(c, w1)) / (3 * 3);
36
+ let d2 = Math.abs(cross(c, w2)) / (3 * 3);
39
37
  if (d1 > TOLERANCE_ADD_2PRONG || d2 > TOLERANCE_ADD_2PRONG) {
40
38
  // TODO - not within tolerance - must add additional 2-prong
41
39
  return [fromCc, toCc];
42
40
  }
43
41
  if (d1 > TOLERANCE_USE_LINE || d2 > TOLERANCE_USE_LINE) {
44
42
  // approximate with cubic bezier
45
- let m1 = flo_vector2d_1.interpolate(fromCc, toCc, 1 / 3);
46
- let m2 = flo_vector2d_1.interpolate(fromCc, toCc, 2 / 3);
47
- let v1 = flo_vector2d_1.translate(r, m1);
48
- let v2 = flo_vector2d_1.translate(r, m2);
43
+ let m1 = interpolate(fromCc, toCc, 1 / 3);
44
+ let m2 = interpolate(fromCc, toCc, 2 / 3);
45
+ let v1 = translate(r, m1);
46
+ let v2 = translate(r, m2);
49
47
  let l1 = [m1, v1];
50
48
  let l2 = [m2, v2];
51
- let mid1 = flo_vector2d_1.lineLineIntersection(fromL, l1);
52
- let mid2 = flo_vector2d_1.lineLineIntersection(toL, l2);
49
+ let mid1 = lineLineIntersection(fromL, l1);
50
+ let mid2 = lineLineIntersection(toL, l2);
53
51
  return [fromCc, mid1, mid2, toCc];
54
52
  }
55
53
  // Within tolerance - approximate with a straight line.
56
54
  return [fromCc, toCc];
57
55
  }
58
- exports.getCurveBetween = getCurveBetween;
56
+ export { getCurveBetween };
59
57
  //# sourceMappingURL=get-curve-between.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-curve-between.js","sourceRoot":"","sources":["../../src/get-curve/get-curve-between.ts"],"names":[],"mappings":";;AACA,+CAGsB;AAEtB,6DAAwD;AAGxD,cAAc;AACd,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAClC,cAAc;AACd,MAAM,kBAAkB,GAAG,MAAM,CAAC,CAAC,aAAa;AAGhD;;;;;GAKG;AACH,SAAS,eAAe,CAChB,UAAkB,EAClB,QAAgB;IAEpB,IAAI,MAAM,GAAG,UAAU,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;IACzC,IAAI,KAAK,GAAG,qCAAgB,CAAC,UAAU,CAAC,CAAC;IAEzC,IAAI,IAAI,GAAG,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;IACrC,IAAI,GAAG,GAAG,qCAAgB,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAElD,IAAI,GAAG,GAAG,mCAAoB,CAAC,KAAK,EA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@@
1
- import { CpNode } from '../cp-node';
1
+ import { CpNode } from '../cp-node.js';
2
2
  /**
3
3
  * @hidden
4
4
  * Returns a line segment of unit length starting in the given Vertex center and
@@ -1,8 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const flo_vector2d_1 = require("flo-vector2d");
4
- const flo_bezier3_1 = require("flo-bezier3");
5
- const point_on_shape_1 = require("../point-on-shape");
1
+ import { toUnitVector, fromTo, rotate, translate, rotate90Degrees, reverse, dot } from 'flo-vector2d';
2
+ import { tangent } from 'flo-bezier3';
3
+ import { isPosSharpCorner } from '../point-on-shape.js';
6
4
  /**
7
5
  * @hidden
8
6
  * Returns a line segment of unit length starting in the given Vertex center and
@@ -19,12 +17,12 @@ function getEdgeDirection(cpNode) {
19
17
  let p2 = pos2.p;
20
18
  let vDir;
21
19
  //if (!PointOnShape.isSharpCorner(pos1)) {
22
- if (!point_on_shape_1.isPosSharpCorner(pos1)) {
20
+ if (!isPosSharpCorner(pos1)) {
23
21
  if (p1[0] === p2[0] && p1[1] === p2[1]) {
24
- vDir = flo_vector2d_1.fromTo(p1, circleCenter); // A 1-prong
22
+ vDir = fromTo(p1, circleCenter); // A 1-prong
25
23
  }
26
24
  else {
27
- vDir = flo_vector2d_1.rotate90Degrees(flo_vector2d_1.fromTo(p1, p2)); // not a 1-prong.
25
+ vDir = rotate90Degrees(fromTo(p1, p2)); // not a 1-prong.
28
26
  }
29
27
  }
30
28
  else {
@@ -39,18 +37,18 @@ function getEdgeDirection(cpNode) {
39
37
  curve1 = pos1.curve.next;
40
38
  curve2 = pos1.curve;
41
39
  }
42
- let tan1 = flo_vector2d_1.toUnitVector(flo_bezier3_1.tangent(curve1.ps, 0));
43
- let tan2 = flo_vector2d_1.reverse(flo_vector2d_1.toUnitVector(flo_bezier3_1.tangent(curve2.ps, 1)));
44
- let x = flo_vector2d_1.dot(tan1, tan2);
40
+ let tan1 = toUnitVector(tangent(curve1.ps, 0));
41
+ let tan2 = reverse(toUnitVector(tangent(curve2.ps, 1)));
42
+ let x = dot(tan1, tan2);
45
43
  // Recall the identities sin(acos(x)) = sqrt(1-x^2), etc. Also
46
44
  // recall the half angle formulas. Then the rotation matrix, R, can
47
45
  // be calculated.
48
46
  let cosθ = Math.sqrt((1 + x) / 2);
49
47
  let sinθ = Math.sqrt((1 - x) / 2);
50
- vDir = flo_vector2d_1.rotate(sinθ, cosθ, tan2);
48
+ vDir = rotate(sinθ, cosθ, tan2);
51
49
  }
52
- let v = flo_vector2d_1.translate(flo_vector2d_1.toUnitVector(vDir), circleCenter);
50
+ let v = translate(toUnitVector(vDir), circleCenter);
53
51
  return [circleCenter, v];
54
52
  }
55
- exports.getEdgeDirection = getEdgeDirection;
53
+ export { getEdgeDirection };
56
54
  //# sourceMappingURL=get-edge-direction.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-edge-direction.js","sourceRoot":"","sources":["../../src/get-curve/get-edge-direction.ts"],"names":[],"mappings":";;AACA,+CAEsB;AAEtB,6CAAsC;AAGtC,sDAAqD;AAGrD;;;;;GAKG;AACH,SAAS,gBAAgB,CAAC,MAAc;IAEpC,IAAI,YAAY,GAAG,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;IAE3C,IAAI,GAAG,GAAG,MAAM,CAAC;IACjB,IAAI,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC;IAE9B,IAAI,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC,YAAY,CAAC;IAC/B,IAAI,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC,YAAY,CAAC;IAE/B,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IAChB,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IAEhB,IAAI,IAAI,CAAC;IAET,0CAA0C;IAC1C,IAAI,CAAC,iCAAgB,CAAC,IAAI,CAAC,EAAE;QACzB,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,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,CAAA"}
@@ -1,4 +1,4 @@
1
- import { CpNode } from "./cp-node";
1
+ import { CpNode } from './cp-node.js';
2
2
  /**
3
3
  * Returns the bezier curve from the maximal disk of the given [[CpNode]] to the
4
4
  * next [[CpNode]]'s maximal disk and thus directly represents a piece of the