flo-mat 4.1.5 → 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.
- package/__tests__/closest-boundary-point/get-endpoint-info.spec.ts +140 -0
- package/__tests__/closest-boundary-point/root-interval-to-distance-squared-interval.spec.ts +87 -0
- package/__tests__/cp-node/fs/get-all-on-loop-by-loop.spec.ts +55 -0
- package/__tests__/cp-node/fs/get-angle-between-mat-curves.spec.ts +39 -3
- package/__tests__/cp-node/fs/get-boundary-bezier-parts-to-next.spec.ts +87 -3
- package/__tests__/cp-node/fs/get-boundary-beziers-between.spec.ts +68 -3
- package/__tests__/cp-node/fs/get-boundary-beziers-to-next.spec.ts +41 -3
- package/__tests__/cp-node/fs/get-boundary-distance-to-next.spec.ts +20 -3
- package/__tests__/cp-node/fs/get-branch-beziers.spec.ts +42 -3
- package/__tests__/cp-node/fs/get-branch.spec.ts +60 -3
- package/__tests__/cp-node/fs/get-cp-node-ordering.spec.ts +19 -3
- package/__tests__/cp-node/fs/get-distance-to-next.spec.ts +37 -4
- package/__tests__/cp-node/fs/get-edge-direction.spec.ts +50 -3
- package/__tests__/cp-node/fs/get-first-exit.spec.ts +78 -3
- package/__tests__/cp-node/fs/get-hole-closers.spec.ts +32 -3
- package/__tests__/cp-node/fs/get-implied-boundary-bezier-between.spec.ts +48 -3
- package/__tests__/cp-node/fs/get-mat-curve-between.spec.ts +77 -3
- package/__tests__/cp-node/fs/get-mat-curve-to-next.spec.ts +17 -4
- package/__tests__/cp-node/fs/get-mat-curves-between.spec.ts +38 -3
- package/__tests__/cp-node/fs/get-salience.spec.ts +68 -3
- package/__tests__/cp-node/fs/get-vertex-forward-children.spec.ts +40 -3
- package/__tests__/cp-node/fs/insert-cp-node.spec.ts +87 -3
- package/__tests__/cp-node/fs/is-special.spec.ts +1 -1
- package/__tests__/cp-node/fs/remove-cp-node.spec.ts +42 -3
- package/__tests__/find-2-prong/calc-seperation-tolerance.spec.ts +46 -0
- package/__tests__/find-2-prong/get-medial/get-closest-points.spec.ts +1 -1
- package/__tests__/floyd-warshall/get-graph.spec.ts +100 -0
- package/__tests__/get-mats-with-hole.ts +28 -0
- package/__tests__/get-mats1.spec.ts +61 -0
- package/__tests__/get-mats1.ts +75 -67
- package/__tests__/helpers/cp-node-by-id.ts +27 -0
- package/__tests__/helpers/expect-point-close.ts +42 -0
- package/__tests__/mat/hausdorff-distance-one-sided-exceeds.spec.ts +129 -0
- package/__tests__/mat/simplify-mat.spec.ts +85 -0
- package/__tests__/reconstruct-from-mat/reconstruct-from-mat.spec.ts +39 -0
- package/__tests__/specific-cases/test-svgs/achispado.svg +14 -0
- package/__tests__/utils/get-beziers-from-tangents.spec.ts +142 -0
- package/browser/index.js +13944 -10307
- package/browser/index.min.js +1 -1
- package/node/closest-boundary-point/cull-curve-pieces.d.ts +21 -0
- package/node/closest-boundary-point/cull-curve-pieces.js +40 -0
- package/node/closest-boundary-point/cull-curve-pieces.js.map +1 -0
- package/node/closest-boundary-point/get-close-boundary-points-certified.js +5 -2
- package/node/closest-boundary-point/get-close-boundary-points-certified.js.map +1 -1
- package/node/closest-boundary-point/get-endpoint-info.d.ts +39 -0
- package/node/closest-boundary-point/get-endpoint-info.js +78 -0
- package/node/closest-boundary-point/get-endpoint-info.js.map +1 -0
- package/node/closest-boundary-point/get-potential-closest-points-on-curve-certified.js +5 -19
- package/node/closest-boundary-point/get-potential-closest-points-on-curve-certified.js.map +1 -1
- package/node/closest-boundary-point/root-interval-to-distance-squared-interval.d.ts +17 -5
- package/node/closest-boundary-point/root-interval-to-distance-squared-interval.js +37 -50
- package/node/closest-boundary-point/root-interval-to-distance-squared-interval.js.map +1 -1
- package/node/corner/get-corner.d.ts +18 -1
- package/node/corner/get-corner.js +8 -1
- package/node/corner/get-corner.js.map +1 -1
- package/node/corner/get-interface-ccw.js.map +1 -1
- package/node/cp-node/cp-node.d.ts +4 -3
- package/node/cp-node/fs/get-all-on-loop-by-loop.js +0 -4
- package/node/cp-node/fs/get-all-on-loop-by-loop.js.map +1 -1
- package/node/cp-node/fs/get-angle-between-mat-curves.js +6 -4
- package/node/cp-node/fs/get-angle-between-mat-curves.js.map +1 -1
- package/node/cp-node/fs/get-boundary-beziers-between.d.ts +6 -4
- package/node/cp-node/fs/get-boundary-beziers-between.js +6 -4
- package/node/cp-node/fs/get-boundary-beziers-between.js.map +1 -1
- package/node/cp-node/fs/get-branch-beziers.d.ts +2 -1
- package/node/cp-node/fs/get-branch-beziers.js +3 -2
- package/node/cp-node/fs/get-branch-beziers.js.map +1 -1
- package/node/cp-node/fs/get-branch.js +1 -2
- package/node/cp-node/fs/get-branch.js.map +1 -1
- package/node/cp-node/fs/get-distance-to-next.js +4 -2
- package/node/cp-node/fs/get-distance-to-next.js.map +1 -1
- package/node/cp-node/fs/get-first-exit.d.ts +7 -3
- package/node/cp-node/fs/get-first-exit.js +13 -11
- package/node/cp-node/fs/get-first-exit.js.map +1 -1
- package/node/cp-node/fs/get-implied-boundary-bezier-between.d.ts +9 -1
- package/node/cp-node/fs/get-implied-boundary-bezier-between.js +11 -55
- package/node/cp-node/fs/get-implied-boundary-bezier-between.js.map +1 -1
- package/node/cp-node/fs/get-mat-curve-between.d.ts +4 -3
- package/node/cp-node/fs/get-mat-curve-between.js +5 -49
- package/node/cp-node/fs/get-mat-curve-between.js.map +1 -1
- package/node/cp-node/fs/get-mat-curve-to-next.d.ts +1 -1
- package/node/cp-node/fs/get-mat-curves-between.d.ts +8 -0
- package/node/cp-node/fs/get-mat-curves-between.js +9 -2
- package/node/cp-node/fs/get-mat-curves-between.js.map +1 -1
- package/node/cp-node/fs/get-real-prong-count.d.ts +2 -1
- package/node/cp-node/fs/get-real-prong-count.js +11 -5
- package/node/cp-node/fs/get-real-prong-count.js.map +1 -1
- package/node/cp-node/fs/get-salience.d.ts +10 -0
- package/node/cp-node/fs/get-salience.js +17 -1
- package/node/cp-node/fs/get-salience.js.map +1 -1
- package/node/cp-node/fs/is-fully-terminating.d.ts +4 -2
- package/node/cp-node/fs/is-fully-terminating.js +6 -15
- package/node/cp-node/fs/is-fully-terminating.js.map +1 -1
- package/node/cp-node/fs/is-on-same-loop.d.ts +1 -1
- package/node/cp-node/fs/is-special.d.ts +7 -0
- package/node/cp-node/fs/is-special.js +9 -2
- package/node/cp-node/fs/is-special.js.map +1 -1
- package/node/cp-node/fs/is-vertex.d.ts +1 -1
- package/node/cp-node/fs/traverse-edges.d.ts +7 -3
- package/node/cp-node/fs/traverse-edges.js +7 -3
- package/node/cp-node/fs/traverse-edges.js.map +1 -1
- package/node/cp-node/stringification/from-stringifyable.d.ts +2 -2
- package/node/cp-node/stringification/from-stringifyable.js +1 -1
- package/node/cp-node/stringification/from-stringifyable.js.map +1 -1
- package/node/cp-node/stringification/to-stringifyable.d.ts +3 -3
- package/node/cp-node/stringification/to-stringifyable.js +3 -3
- package/node/debug/debug.d.ts +26 -3
- package/node/debug/debug.js +16 -5
- package/node/debug/debug.js.map +1 -1
- package/node/find-2-prong/add-2-prong.js +1 -7
- package/node/find-2-prong/add-2-prong.js.map +1 -1
- package/node/find-2-prong/calc-seperation-tolerance.d.ts +28 -5
- package/node/find-2-prong/calc-seperation-tolerance.js +32 -89
- package/node/find-2-prong/calc-seperation-tolerance.js.map +1 -1
- package/node/find-2-prong/find-2-prong.js +8 -10
- package/node/find-2-prong/find-2-prong.js.map +1 -1
- package/node/find-2-prong/find-and-add-2-prongs.js +2 -2
- package/node/find-2-prong/find-and-add-2-prongs.js.map +1 -1
- package/node/find-2-prong/get-medial/get-antipodal-points.d.ts +1 -2
- package/node/find-2-prong/get-medial/get-antipodal-points.js +2 -3
- package/node/find-2-prong/get-medial/get-antipodal-points.js.map +1 -1
- package/node/find-2-prong/get-medial/get-closest-points.d.ts +1 -8
- package/node/find-2-prong/get-medial/get-closest-points.js +4 -40
- package/node/find-2-prong/get-medial/get-closest-points.js.map +1 -1
- package/node/find-2-prong/reduce-radius.d.ts +1 -1
- package/node/find-2-prong/reduce-radius.js +6 -3
- package/node/find-2-prong/reduce-radius.js.map +1 -1
- package/node/find-3-prong/calc-better-x.js +1 -1
- package/node/find-3-prong/calc-better-x.js.map +1 -1
- package/node/find-3-prong/find-3-prong-for-delta3s.d.ts +3 -2
- package/node/find-3-prong/find-3-prong-for-delta3s.js +35 -41
- package/node/find-3-prong/find-3-prong-for-delta3s.js.map +1 -1
- package/node/find-3-prong/find-3-prong.js +3 -1
- package/node/find-3-prong/find-3-prong.js.map +1 -1
- package/node/find-3-prong/find-and-add-3-prongs.js +16 -0
- package/node/find-3-prong/find-and-add-3-prongs.js.map +1 -1
- package/node/find-mat/create-initial-cp-tree.js +2 -2
- package/node/find-mat/create-initial-cp-tree.js.map +1 -1
- package/node/find-mat/find-mat.js +3 -4
- package/node/find-mat/find-mat.js.map +1 -1
- package/node/find-mat/find-mats.d.ts +6 -12
- package/node/find-mat/find-mats.js +10 -27
- package/node/find-mat/find-mats.js.map +1 -1
- package/node/find-mat/get-dull-corners-on-loop.js +2 -2
- package/node/find-mat/get-dull-corners-on-loop.js.map +1 -1
- package/node/find-mat/get-for-1-prongs-on-loop.js +36 -8
- package/node/find-mat/get-for-1-prongs-on-loop.js.map +1 -1
- package/node/find-mat/get-meta.d.ts +14 -4
- package/node/find-mat/get-meta.js +30 -24
- package/node/find-mat/get-meta.js.map +1 -1
- package/node/find-mat/get-sharp-corners.js +2 -2
- package/node/find-mat/get-sharp-corners.js.map +1 -1
- package/node/find-mat/mat-options.d.ts +2 -2
- package/node/floyd-warshall/get-graph.d.ts +12 -1
- package/node/floyd-warshall/get-graph.js +41 -38
- package/node/floyd-warshall/get-graph.js.map +1 -1
- package/node/geometry/get-bounding-box-.d.ts +16 -2
- package/node/geometry/get-bounding-box-.js +5 -2
- package/node/geometry/get-bounding-box-.js.map +1 -1
- package/node/geometry/get-closest-square-distance-to-rect.d.ts +3 -0
- package/node/geometry/get-closest-square-distance-to-rect.js +7 -5
- package/node/geometry/get-closest-square-distance-to-rect.js.map +1 -1
- package/node/geometry/get-closest-squared-distance-to-rotated-rect.d.ts +4 -0
- package/node/geometry/get-closest-squared-distance-to-rotated-rect.js +11 -5
- package/node/geometry/get-closest-squared-distance-to-rotated-rect.js.map +1 -1
- package/node/get-medial-points/double-double/dd-get-medial-point-coeffs-bez3.js +1 -2
- package/node/get-medial-points/double-double/dd-get-medial-point-coeffs-bez3.js.map +1 -1
- package/node/index.d.ts +3 -2
- package/node/index.js +2 -1
- package/node/index.js.map +1 -1
- package/node/mat/clone-mat.d.ts +9 -0
- package/node/mat/clone-mat.js +17 -0
- package/node/mat/clone-mat.js.map +1 -0
- package/node/mat/clone-meta.d.ts +12 -0
- package/node/mat/clone-meta.js +24 -0
- package/node/mat/clone-meta.js.map +1 -0
- package/node/mat/get-boundary-piece-beziers.d.ts +5 -0
- package/node/mat/get-boundary-piece-beziers.js +7 -93
- package/node/mat/get-boundary-piece-beziers.js.map +1 -1
- package/node/mat/get-largest-3-prong.d.ts +6 -0
- package/node/mat/get-largest-3-prong.js +8 -5
- package/node/mat/get-largest-3-prong.js.map +1 -1
- package/node/mat/get-largest-vertex.d.ts +15 -1
- package/node/mat/get-largest-vertex.js +20 -7
- package/node/mat/get-largest-vertex.js.map +1 -1
- package/node/mat/hausdorff-distance-one-sided-exceeds.d.ts +79 -0
- package/node/mat/hausdorff-distance-one-sided-exceeds.js +251 -0
- package/node/mat/hausdorff-distance-one-sided-exceeds.js.map +1 -0
- package/node/mat/mat-meta.d.ts +0 -6
- package/node/mat/simplify-mat.d.ts +25 -8
- package/node/mat/simplify-mat.js +182 -53
- package/node/mat/simplify-mat.js.map +1 -1
- package/node/mat/trim-mat.d.ts +4 -2
- package/node/mat/trim-mat.js +3 -1
- package/node/mat/trim-mat.js.map +1 -1
- package/node/point-on-shape/get-boundary-tangent-line.d.ts +19 -0
- package/node/point-on-shape/get-boundary-tangent-line.js +33 -0
- package/node/point-on-shape/get-boundary-tangent-line.js.map +1 -0
- package/node/point-on-shape/get-osculating-circle.d.ts +6 -4
- package/node/point-on-shape/get-osculating-circle.js +6 -4
- package/node/point-on-shape/get-osculating-circle.js.map +1 -1
- package/node/point-on-shape/get-pos-corner.js +2 -2
- package/node/point-on-shape/get-pos-corner.js.map +1 -1
- package/node/reconstruct-from-mat/reconstruct-from-mat.js +20 -80
- package/node/reconstruct-from-mat/reconstruct-from-mat.js.map +1 -1
- package/node/reconstruct-from-mat/remove-sat-induced-trivial-3prongs.d.ts +4 -0
- package/node/reconstruct-from-mat/remove-sat-induced-trivial-3prongs.js +4 -0
- package/node/reconstruct-from-mat/remove-sat-induced-trivial-3prongs.js.map +1 -1
- package/node/sat/cull.d.ts +7 -6
- package/node/sat/cull.js +13 -16
- package/node/sat/cull.js.map +1 -1
- package/node/sat/get-sat-culls.d.ts +12 -2
- package/node/sat/get-sat-culls.js +21 -16
- package/node/sat/get-sat-culls.js.map +1 -1
- package/node/svg/get-shape-bounds.d.ts +1 -12
- package/node/svg/get-shape-bounds.js +2 -3
- package/node/svg/get-shape-bounds.js.map +1 -1
- package/node/sweep-line/sweep-line.js.map +1 -1
- package/node/utils/get-beziers-from-tangents.d.ts +28 -0
- package/node/utils/get-beziers-from-tangents.js +92 -0
- package/node/utils/get-beziers-from-tangents.js.map +1 -0
- package/node/vertex/remove-vertex.d.ts +5 -3
- package/node/vertex/remove-vertex.js +5 -3
- package/node/vertex/remove-vertex.js.map +1 -1
- package/package.json +8 -8
- package/qv-infinite-loop.md +120 -0
- package/src/closest-boundary-point/cull-curve-pieces.ts +49 -0
- package/src/closest-boundary-point/get-close-boundary-points-certified.ts +5 -2
- package/src/closest-boundary-point/get-endpoint-info.ts +96 -0
- package/src/closest-boundary-point/get-potential-closest-points-on-curve-certified.ts +5 -23
- package/src/closest-boundary-point/root-interval-to-distance-squared-interval.ts +42 -60
- package/src/corner/get-corner.ts +10 -1
- package/src/corner/get-interface-ccw.ts +2 -2
- package/src/cp-node/cp-node.ts +4 -3
- package/src/cp-node/fs/get-all-on-loop-by-loop.ts +0 -4
- package/src/cp-node/fs/get-angle-between-mat-curves.ts +6 -4
- package/src/cp-node/fs/get-boundary-beziers-between.ts +10 -8
- package/src/cp-node/fs/get-branch-beziers.ts +3 -2
- package/src/cp-node/fs/get-branch.ts +1 -2
- package/src/cp-node/fs/get-distance-to-next.ts +4 -2
- package/src/cp-node/fs/get-first-exit.ts +15 -14
- package/src/cp-node/fs/get-implied-boundary-bezier-between.ts +17 -69
- package/src/cp-node/fs/get-mat-curve-between.ts +9 -67
- package/src/cp-node/fs/get-mat-curves-between.ts +9 -2
- package/src/cp-node/fs/get-real-prong-count.ts +11 -7
- package/src/cp-node/fs/get-salience.ts +15 -2
- package/src/cp-node/fs/is-fully-terminating.ts +6 -18
- package/src/cp-node/fs/is-on-same-loop.ts +2 -2
- package/src/cp-node/fs/is-special.ts +11 -6
- package/src/cp-node/fs/is-vertex.ts +1 -1
- package/src/cp-node/fs/traverse-edges.ts +8 -4
- package/src/cp-node/stringification/from-stringifyable.ts +75 -75
- package/src/cp-node/stringification/to-stringifyable.ts +3 -3
- package/src/debug/debug.ts +44 -8
- package/src/find-2-prong/add-2-prong.ts +2 -9
- package/src/find-2-prong/calc-seperation-tolerance.ts +34 -115
- package/src/find-2-prong/find-2-prong.ts +9 -11
- package/src/find-2-prong/find-and-add-2-prongs.ts +2 -2
- package/src/find-2-prong/get-medial/get-antipodal-points.ts +1 -3
- package/src/find-2-prong/get-medial/get-closest-points.ts +6 -51
- package/src/find-2-prong/reduce-radius.ts +6 -4
- package/src/find-3-prong/calc-better-x.ts +2 -2
- package/src/find-3-prong/find-3-prong-for-delta3s.ts +197 -214
- package/src/find-3-prong/find-3-prong.ts +54 -51
- package/src/find-3-prong/find-and-add-3-prongs.ts +20 -1
- package/src/find-mat/create-initial-cp-tree.ts +2 -2
- package/src/find-mat/find-mat.ts +4 -6
- package/src/find-mat/find-mats.ts +83 -105
- package/src/find-mat/get-dull-corners-on-loop.ts +2 -2
- package/src/find-mat/get-for-1-prongs-on-loop.ts +40 -8
- package/src/find-mat/get-meta.ts +34 -39
- package/src/find-mat/get-sharp-corners.ts +2 -2
- package/src/find-mat/mat-options.ts +2 -2
- package/src/floyd-warshall/get-graph.ts +46 -47
- package/src/geometry/get-bounding-box-.ts +5 -2
- package/src/geometry/get-closest-square-distance-to-rect.ts +7 -7
- package/src/geometry/get-closest-squared-distance-to-rotated-rect.ts +12 -10
- package/src/get-medial-points/double-double/dd-get-medial-point-coeffs-bez3.ts +1 -2
- package/src/index.ts +3 -2
- package/src/mat/clone-mat.ts +9 -3
- package/src/mat/clone-meta.ts +8 -0
- package/src/mat/get-boundary-piece-beziers.ts +16 -117
- package/src/mat/get-largest-3-prong.ts +9 -6
- package/src/mat/get-largest-vertex.ts +25 -9
- package/src/mat/hausdorff-distance-one-sided-exceeds.ts +314 -0
- package/src/mat/mat-meta.ts +0 -9
- package/src/mat/simplify-mat.ts +254 -116
- package/src/mat/trim-mat.ts +6 -4
- package/src/point-on-shape/get-boundary-tangent-line.ts +36 -0
- package/src/point-on-shape/get-osculating-circle.ts +7 -5
- package/src/point-on-shape/get-pos-corner.ts +2 -2
- package/src/reconstruct-from-mat/reconstruct-from-mat.ts +22 -111
- package/src/reconstruct-from-mat/remove-sat-induced-trivial-3prongs.ts +4 -0
- package/src/sat/cull.ts +16 -20
- package/src/sat/get-sat-culls.ts +28 -23
- package/src/svg/get-shape-bounds.ts +2 -3
- package/src/sweep-line/sweep-line.ts +1 -1
- package/src/utils/get-beziers-from-tangents.ts +110 -0
- package/src/utils/map-map.ts +1 -1
- package/src/vertex/remove-vertex.ts +5 -3
- package/__tests__/cp-node/fs/get-distance-between.spec.ts +0 -7
- package/__tests__/cp-node/fs/get-terminating-on-circle.spec.ts +0 -24
- package/__tests__/cp-node/fs/is-single-3-prong.spec.ts +0 -17
- package/__tests__/cp-node/fs/iterate-all-on-loop.spec.ts +0 -17
- package/__tests__/cp-node/fs/traverse-all-forward.spec.ts +0 -14
- package/node/closest-boundary-point/cull-bezier-pieces-1.d.ts +0 -9
- package/node/closest-boundary-point/cull-bezier-pieces-1.js +0 -17
- package/node/closest-boundary-point/cull-bezier-pieces-1.js.map +0 -1
- package/node/closest-boundary-point/cull-by-loose-bounding-box.d.ts +0 -13
- package/node/closest-boundary-point/cull-by-loose-bounding-box.js +0 -27
- package/node/closest-boundary-point/cull-by-loose-bounding-box.js.map +0 -1
- package/node/closest-boundary-point/cull-by-tight-boundary-box.d.ts +0 -11
- package/node/closest-boundary-point/cull-by-tight-boundary-box.js +0 -27
- package/node/closest-boundary-point/cull-by-tight-boundary-box.js.map +0 -1
- package/node/cp-node/fs/find-first.d.ts +0 -10
- package/node/cp-node/fs/find-first.js +0 -19
- package/node/cp-node/fs/find-first.js.map +0 -1
- package/node/debug/functions/check-ordering.d.ts +0 -4
- package/node/debug/functions/check-ordering.js +0 -43
- package/node/debug/functions/check-ordering.js.map +0 -1
- package/node/find-2-prong/cull-bezier-pieces.d.ts +0 -13
- package/node/find-2-prong/cull-bezier-pieces.js +0 -43
- package/node/find-2-prong/cull-bezier-pieces.js.map +0 -1
- package/node/floyd-warshall/get-hole-closer-pairs.d.ts +0 -8
- package/node/floyd-warshall/get-hole-closer-pairs.js +0 -27
- package/node/floyd-warshall/get-hole-closer-pairs.js.map +0 -1
- package/node/utils/dual-set.d.ts +0 -27
- package/node/utils/dual-set.js +0 -55
- package/node/utils/dual-set.js.map +0 -1
- package/node/utils/tri-map.d.ts +0 -27
- package/node/utils/tri-map.js +0 -49
- package/node/utils/tri-map.js.map +0 -1
- package/src/closest-boundary-point/cull-bezier-pieces-1.ts +0 -36
- package/src/closest-boundary-point/cull-by-loose-bounding-box.ts +0 -42
- package/src/closest-boundary-point/cull-by-tight-boundary-box.ts +0 -43
- package/src/closest-boundary-point/get-p-from-box.ts +0 -14
- package/src/cp-node/fs/add-distance-from.ts +0 -49
- package/src/cp-node/fs/get-distance-between.ts +0 -16
- package/src/cp-node/fs/get-terminating-on-circle.ts +0 -24
- package/src/cp-node/fs/is-single-3-prong.ts +0 -15
- package/src/cp-node/fs/iterate-all-on-loop.ts +0 -15
- package/src/cp-node/fs/traverse-all-forward.ts +0 -24
- package/src/debug/functions/draw/draw-beziers-as-single-path.ts +0 -40
- package/src/debug/functions/draw/draw-disk.ts +0 -34
- package/src/debug/functions/draw/xmlns.ts +0 -5
- package/src/find-2-prong/cull-bezier-pieces.ts +0 -61
- package/src/find-2-prong/find-and-add-2-prong.ts +0 -30
- package/src/find-2-prong/get-medial/get-closest-points-d.ts +0 -213
- package/src/find-2-prong/x-for-debugging.ts +0 -13
- package/src/floyd-warshall/get-hole-closer-pairs.ts +0 -35
- package/src/mat/get-two-prong-type.ts +0 -13
- package/src/point-on-shape/is-pos-dull-corner.ts +0 -18
- package/src/point-on-shape/is-pos-quite-dull-corner.ts +0 -18
- package/src/point-on-shape/is-pos-quite-sharp-corner.ts +0 -18
- package/src/point-on-shape/pos-to-human-string.ts +0 -18
- package/src/sweep-line/are-boxes-intersecting.ts +0 -37
|
@@ -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
|
|
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).
|
|
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
|
|
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 (
|
|
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,
|
|
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
|
-
|
|
6
|
-
const
|
|
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,
|
|
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,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`
|
|
4
|
-
*
|
|
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`
|
|
3
|
-
*
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
|
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":"
|
|
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
1
|
import type { CpNode } from '../cp-node.js';
|
|
2
|
-
|
|
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,59 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
+
*/
|
|
8
11
|
function getImpliedBoundaryBezierBetween(cpNodeA, cpNodeB) {
|
|
9
|
-
|
|
10
|
-
const posB = cpNodeB.pointOnShape;
|
|
11
|
-
let { curve: curveA, p: pA, t: tA } = posA;
|
|
12
|
-
let { curve: curveB, p: pB, t: tB } = posB;
|
|
13
|
-
if (pA[0] === pB[0] && pA[1] === pB[1]) {
|
|
14
|
-
return [pA];
|
|
15
|
-
}
|
|
16
|
-
if (tA === 1) {
|
|
17
|
-
tA = 0;
|
|
18
|
-
curveA = curveA.next;
|
|
19
|
-
}
|
|
20
|
-
if (tB === 0) {
|
|
21
|
-
tB = 1;
|
|
22
|
-
curveB = curveB.prev;
|
|
23
|
-
}
|
|
24
|
-
const { ps: psA } = curveA;
|
|
25
|
-
const { ps: psB } = curveB;
|
|
26
|
-
const lA = [pA, translate(pA)(toUnitVector(tangent(psA, tA)))];
|
|
27
|
-
const lB = [pB, translate(pB)(toUnitVector(tangent(psB, tB)))];
|
|
28
|
-
const mid = lineLineIntersection(lA, lB);
|
|
29
|
-
const c = fromTo(pA, pB);
|
|
30
|
-
let twisted;
|
|
31
|
-
if (!mid) {
|
|
32
|
-
twisted = true;
|
|
33
|
-
}
|
|
34
|
-
else {
|
|
35
|
-
const a = fromTo(pA, mid);
|
|
36
|
-
const b = fromTo(pB, mid);
|
|
37
|
-
twisted = dot(a, c) < 0 || dot(b, c) > 0;
|
|
38
|
-
}
|
|
39
|
-
if (!twisted) {
|
|
40
|
-
// drawFs.bezier(g, [pA, mid!, pB], 'thin10 pink nofill', 0)
|
|
41
|
-
return [pA, mid, pB];
|
|
42
|
-
}
|
|
43
|
-
const w1 = fromTo(lA[0], lA[1]); // This is a unit vector
|
|
44
|
-
const w2 = fromTo(lB[0], lB[1]); // This is a unit vector
|
|
45
|
-
const d1 = abs(cross(c, w1)) / (3 * 3);
|
|
46
|
-
const d2 = abs(cross(c, w2)) / (3 * 3);
|
|
47
|
-
if (d1 > TOLERANCE_ADD_2PRONG || d2 > TOLERANCE_ADD_2PRONG) {
|
|
48
|
-
// not within tolerance
|
|
49
|
-
return undefined;
|
|
50
|
-
}
|
|
51
|
-
if (d1 > TOLERANCE_USE_LINE || d2 > TOLERANCE_USE_LINE) {
|
|
52
|
-
// approximate with cubic bezier?
|
|
53
|
-
return undefined; // add 2-prong
|
|
54
|
-
}
|
|
55
|
-
// Within tolerance - approximate with a straight line.
|
|
56
|
-
return [pA, pB];
|
|
12
|
+
return getBeziersFromTangents(getBoundaryTangentLine(cpNodeA.pointOnShape, true), getBoundaryTangentLine(cpNodeB.pointOnShape, false));
|
|
57
13
|
}
|
|
58
14
|
export { getImpliedBoundaryBezierBetween };
|
|
59
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":"AACA,OAAO,EAAE,
|
|
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,10 +1,11 @@
|
|
|
1
1
|
import type { CpNode } from '../cp-node.js';
|
|
2
2
|
/**
|
|
3
|
-
* Returns the bezier
|
|
4
|
-
* `CpNode`'s
|
|
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.
|
|
5
6
|
*
|
|
6
7
|
* @param cpNodeFrom
|
|
7
8
|
* @param cpNodeTo
|
|
8
9
|
*/
|
|
9
|
-
declare function getMatCurveBetween(cpNodeFrom: CpNode, cpNodeTo: CpNode): number[][];
|
|
10
|
+
declare function getMatCurveBetween(cpNodeFrom: CpNode, cpNodeTo: CpNode): number[][][];
|
|
10
11
|
export { getMatCurveBetween };
|
|
@@ -1,59 +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
|
-
|
|
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
|
|
10
|
-
* `CpNode`'s
|
|
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.
|
|
11
7
|
*
|
|
12
8
|
* @param cpNodeFrom
|
|
13
9
|
* @param cpNodeTo
|
|
14
10
|
*/
|
|
15
11
|
function getMatCurveBetween(cpNodeFrom, cpNodeTo) {
|
|
16
|
-
|
|
17
|
-
const fromL = getEdgeDirection(cpNodeFrom);
|
|
18
|
-
const toCc = cpNodeTo.pointOnShape.circle.center;
|
|
19
|
-
const toL = getEdgeDirection(cpNodeTo.prevOnCircle);
|
|
20
|
-
const mid = lineLineIntersection(fromL, toL);
|
|
21
|
-
const c = fromToVec(fromCc, toCc);
|
|
22
|
-
let twisted;
|
|
23
|
-
if (!mid) {
|
|
24
|
-
twisted = true;
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
const a = fromToVec(fromCc, mid);
|
|
28
|
-
const b = fromToVec(toCc, mid);
|
|
29
|
-
twisted = dot(a, c) < 0 || dot(b, c) > 0;
|
|
30
|
-
}
|
|
31
|
-
if (!twisted) {
|
|
32
|
-
return [fromCc, mid, toCc];
|
|
33
|
-
}
|
|
34
|
-
const r = rotate90Degrees(c);
|
|
35
|
-
const w1 = fromToVec(fromL[0], fromL[1]); // This is a unit vector
|
|
36
|
-
const w2 = fromToVec(toL[0], toL[1]); // This is a unit vector
|
|
37
|
-
const d1 = abs(cross(c, w1)) / (3 * 3);
|
|
38
|
-
const d2 = abs(cross(c, w2)) / (3 * 3);
|
|
39
|
-
if (d1 > TOLERANCE_ADD_2PRONG || d2 > TOLERANCE_ADD_2PRONG) {
|
|
40
|
-
// FUTURE - not within tolerance - must add additional 2-prong
|
|
41
|
-
return [fromCc, toCc];
|
|
42
|
-
}
|
|
43
|
-
if (d1 > TOLERANCE_USE_LINE || d2 > TOLERANCE_USE_LINE) {
|
|
44
|
-
// approximate with cubic bezier
|
|
45
|
-
const m1 = interpolate(fromCc, toCc, 1 / 3);
|
|
46
|
-
const m2 = interpolate(fromCc, toCc, 2 / 3);
|
|
47
|
-
const v1 = translate(r, m1);
|
|
48
|
-
const v2 = translate(r, m2);
|
|
49
|
-
const l1 = [m1, v1];
|
|
50
|
-
const l2 = [m2, v2];
|
|
51
|
-
const mid1 = lineLineIntersection(fromL, l1);
|
|
52
|
-
const mid2 = lineLineIntersection(toL, l2);
|
|
53
|
-
return [fromCc, mid1, mid2, toCc];
|
|
54
|
-
}
|
|
55
|
-
// Within tolerance - approximate with a straight line.
|
|
56
|
-
return [fromCc, toCc];
|
|
12
|
+
return getBeziersFromTangents(getEdgeDirection(cpNodeFrom), getEdgeDirection(cpNodeTo.prevOnCircle));
|
|
57
13
|
}
|
|
58
14
|
export { getMatCurveBetween };
|
|
59
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,
|
|
1
|
+
{"version":3,"file":"get-mat-curve-between.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-mat-curve-between.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,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
|
-
|
|
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,
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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,
|
|
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
|
-
|
|
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
|
|
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;;;;;;;;;;;;;GAaG;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,MAAM,CAAC,GAAG,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAE9C,IAAI,aAAa,EAAE,CAAC;QAAC,OAAO,QAAQ,CAAC;IAAC,CAAC;IACvC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAAC,OAAO,CAAC,CAAC;IAAC,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 `CpNode`s on the circle
|
|
4
|
-
* (except this.prevOnCircle)
|
|
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,22 +1,13 @@
|
|
|
1
|
-
import {
|
|
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 `CpNode`s on the circle
|
|
6
|
-
* (except this.prevOnCircle)
|
|
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
|
-
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
if (isTrivial(cpNode)) {
|
|
13
|
-
return true;
|
|
14
|
-
}
|
|
15
|
-
while (cpNode.prev === cpNode.prevOnCircle) {
|
|
16
|
-
cpNode = cpNode.prev;
|
|
17
|
-
}
|
|
18
|
-
return getAllOnCircle(cpNode.prevOnCircle, true)
|
|
19
|
-
.every(isTerminating);
|
|
10
|
+
return isTerminating(cpNode) && getRealProngCount(cpNode) <= 1;
|
|
20
11
|
}
|
|
21
12
|
export { isFullyTerminating };
|
|
22
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,
|
|
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"}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import type { CpNode } from "../cp-node.js";
|
|
2
|
+
/**
|
|
3
|
+
* Returns `true` if the given `CpNode` is on a 'special' MAT vertex, i.e. one
|
|
4
|
+
* that is not a plain 2-prong: a leaf, a 3-prong (or higher) or a hole-closer.
|
|
5
|
+
*
|
|
6
|
+
* * these are the vertices that must be kept when simplifying the MAT and
|
|
7
|
+
* the vertices of the MAT seen as a graph
|
|
8
|
+
*/
|
|
2
9
|
declare function isSpecial(cpNode: CpNode): boolean;
|
|
3
10
|
export { isSpecial };
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { getRealProngCount } from "./get-real-prong-count.js";
|
|
2
|
+
/**
|
|
3
|
+
* Returns `true` if the given `CpNode` is on a 'special' MAT vertex, i.e. one
|
|
4
|
+
* that is not a plain 2-prong: a leaf, a 3-prong (or higher) or a hole-closer.
|
|
5
|
+
*
|
|
6
|
+
* * these are the vertices that must be kept when simplifying the MAT and
|
|
7
|
+
* the vertices of the MAT seen as a graph
|
|
8
|
+
*/
|
|
2
9
|
function isSpecial(cpNode) {
|
|
3
|
-
return (
|
|
4
|
-
|
|
10
|
+
return (getRealProngCount(cpNode) !== 2 ||
|
|
11
|
+
cpNode.isHoleClosing);
|
|
5
12
|
}
|
|
6
13
|
export { isSpecial };
|
|
7
14
|
//# sourceMappingURL=is-special.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-special.js","sourceRoot":"","sources":["../../../src/cp-node/fs/is-special.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,SAAS,SAAS,
|
|
1
|
+
{"version":3,"file":"is-special.js","sourceRoot":"","sources":["../../../src/cp-node/fs/is-special.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D;;;;;;GAMG;AACH,SAAS,SAAS,CAAC,MAAc;IAC7B,OAAO,CACH,iBAAiB,CAAC,MAAM,CAAC,KAAK,CAAC;QAC/B,MAAM,CAAC,aAAa,CACvB,CAAC;AACN,CAAC;AAGD,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { CpNode } from '../cp-node.js';
|
|
2
2
|
/**
|
|
3
|
-
* Traverses all edges
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* Traverses all edges of the given MAT tree exactly once each, calling the
|
|
4
|
+
* callback for one of the two `CpNode`s representing each edge.
|
|
5
|
+
*
|
|
6
|
+
* * the edges are visited in boundary order starting from the given `CpNode`
|
|
7
|
+
* (not depth first)
|
|
8
|
+
*
|
|
9
|
+
* @param cpNode Any `CpNode` on the MAT.
|
|
6
10
|
* @param traverseEdgesCallback A callback function for each CpNode representing the vertex at the
|
|
7
11
|
* start of an edge.
|
|
8
12
|
*/
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { isTerminating } from './is-terminating.js';
|
|
2
2
|
import { getAllOnLoop } from './get-all-on-loop.js';
|
|
3
3
|
/**
|
|
4
|
-
* Traverses all edges
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Traverses all edges of the given MAT tree exactly once each, calling the
|
|
5
|
+
* callback for one of the two `CpNode`s representing each edge.
|
|
6
|
+
*
|
|
7
|
+
* * the edges are visited in boundary order starting from the given `CpNode`
|
|
8
|
+
* (not depth first)
|
|
9
|
+
*
|
|
10
|
+
* @param cpNode Any `CpNode` on the MAT.
|
|
7
11
|
* @param traverseEdgesCallback A callback function for each CpNode representing the vertex at the
|
|
8
12
|
* start of an edge.
|
|
9
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traverse-edges.js","sourceRoot":"","sources":["../../../src/cp-node/fs/traverse-edges.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD
|
|
1
|
+
{"version":3,"file":"traverse-edges.js","sourceRoot":"","sources":["../../../src/cp-node/fs/traverse-edges.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGpD;;;;;;;;;;GAUG;AACH,SAAS,aAAa,CACd,MAAc,EACd,qBAA+C;IAEnD,MAAM,OAAO,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAE/B,KAAK,MAAM,IAAI,OAAO,EAAE,CAAC;QACrB,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;YAChE,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAClC,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACrB,CAAC;AACL,CAAC;AAGD,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CpNode } from "../cp-node";
|
|
2
|
-
import type { CpNodeStringifyable } from "./cp-node-stringifyable";
|
|
1
|
+
import type { CpNode } from "../cp-node.js";
|
|
2
|
+
import type { CpNodeStringifyable } from "./cp-node-stringifyable.js";
|
|
3
3
|
declare function fromStringifyable(cpNodesStringifyable: CpNodeStringifyable): CpNode;
|
|
4
4
|
export { fromStringifyable };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EDGES } from "./cp-node-stringifyable";
|
|
1
|
+
import { EDGES } from "./cp-node-stringifyable.js";
|
|
2
2
|
import { getAllOnCircle } from "../fs/get-all-on-circle.js";
|
|
3
3
|
import { loopFromStringifyable } from './loop-from-stringifyable.js';
|
|
4
4
|
function fromStringifyable(cpNodesStringifyable) {
|