flo-mat 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +69 -0
- package/README.md +9 -27
- package/browser/index.js +29720 -7345
- package/browser/index.min.js +1 -2
- package/node/circle.js +3 -3
- package/node/circle.js.map +1 -1
- package/node/compare-curvatures-at-interface.js +36 -36
- package/node/compare-curvatures-at-interface.js.map +1 -1
- package/node/cp-node/clone.js +6 -6
- package/node/cp-node/clone.js.map +1 -1
- package/node/cp-node/remove.js +4 -4
- package/node/cp-node/remove.js.map +1 -1
- package/node/cp-node.js +18 -18
- package/node/cp-node.js.map +1 -1
- package/node/curve.d.ts +1 -1
- package/node/curve.js +19 -19
- package/node/curve.js.map +1 -1
- package/node/debug/debug.d.ts +1 -1
- package/node/debug/functions/draw-elem/bounding-hull.js +1 -1
- package/node/debug/functions/draw-elem/bounding-hull.js.map +1 -1
- package/node/debug/functions/draw-elem/branch.js +4 -4
- package/node/debug/functions/draw-elem/branch.js.map +1 -1
- package/node/debug/functions/draw-elem/culls.js +4 -4
- package/node/debug/functions/draw-elem/culls.js.map +1 -1
- package/node/debug/functions/draw-elem/draw-circle-percent.js +1 -1
- package/node/debug/functions/draw-elem/draw-circle-percent.js.map +1 -1
- package/node/debug/functions/draw-elem/draw-elem.d.ts +2 -2
- package/node/debug/functions/draw-elem/draw-elem.js +1 -1
- package/node/debug/functions/draw-elem/draw-elem.js.map +1 -1
- package/node/debug/functions/draw-elem/dull-corner.js +3 -3
- package/node/debug/functions/draw-elem/dull-corner.js.map +1 -1
- package/node/debug/functions/draw-elem/leaves.js +4 -4
- package/node/debug/functions/draw-elem/leaves.js.map +1 -1
- package/node/debug/functions/draw-elem/loose-bounding-box.js +2 -2
- package/node/debug/functions/draw-elem/loose-bounding-box.js.map +1 -1
- package/node/debug/functions/draw-elem/mat.js +4 -4
- package/node/debug/functions/draw-elem/mat.js.map +1 -1
- package/node/debug/functions/draw-elem/max-vertex.js +2 -2
- package/node/debug/functions/draw-elem/max-vertex.js.map +1 -1
- package/node/debug/functions/draw-elem/min-y.js +3 -3
- package/node/debug/functions/draw-elem/min-y.js.map +1 -1
- package/node/debug/functions/draw-elem/one-prong-at-dull-corner.js +4 -4
- package/node/debug/functions/draw-elem/one-prong-at-dull-corner.js.map +1 -1
- package/node/debug/functions/draw-elem/one-prong.js +4 -4
- package/node/debug/functions/draw-elem/one-prong.js.map +1 -1
- package/node/debug/functions/draw-elem/sharp-corner.js +2 -2
- package/node/debug/functions/draw-elem/sharp-corner.js.map +1 -1
- package/node/debug/functions/draw-elem/three-prong.js +7 -7
- package/node/debug/functions/draw-elem/three-prong.js.map +1 -1
- package/node/debug/functions/draw-elem/tight-bounding-box.js +1 -1
- package/node/debug/functions/draw-elem/tight-bounding-box.js.map +1 -1
- package/node/debug/functions/draw-elem/two-prong.js +1 -1
- package/node/debug/functions/draw-elem/two-prong.js.map +1 -1
- package/node/debug/functions/draw-elem/vertex.js +13 -13
- package/node/debug/functions/draw-elem/vertex.js.map +1 -1
- package/node/debug/functions/general.d.ts +1 -1
- package/node/debug/functions/general.js +1 -1
- package/node/debug/functions/general.js.map +1 -1
- package/node/debug/functions/three-prong.d.ts +1 -1
- package/node/debug/functions/three-prong.js +37 -37
- package/node/debug/functions/three-prong.js.map +1 -1
- package/node/debug/functions/two-prong.d.ts +1 -1
- package/node/debug/functions/two-prong.js +15 -15
- package/node/debug/functions/two-prong.js.map +1 -1
- package/node/find-mats.js +16 -19
- package/node/find-mats.js.map +1 -1
- package/node/get-boundary-bezier-parts-to-next.js +8 -8
- package/node/get-boundary-bezier-parts-to-next.js.map +1 -1
- package/node/get-boundary-beziers-to-next.js +8 -8
- package/node/get-boundary-beziers-to-next.js.map +1 -1
- package/node/get-branches.js +7 -7
- package/node/get-branches.js.map +1 -1
- package/node/get-curve/get-curve-between.js +21 -21
- package/node/get-curve/get-curve-between.js.map +1 -1
- package/node/get-curve/get-edge-direction.js +13 -13
- package/node/get-curve/get-edge-direction.js.map +1 -1
- package/node/get-interface-ccw.js +12 -12
- package/node/get-interface-ccw.js.map +1 -1
- package/node/loop/get-max-coordinate.js +9 -9
- package/node/loop/get-max-coordinate.js.map +1 -1
- package/node/loop.js +4 -4
- package/node/loop.js.map +1 -1
- package/node/mat/add-to-cp-graph.js +8 -8
- package/node/mat/add-to-cp-graph.js.map +1 -1
- package/node/mat/closest-boundary-point/closest-points-on-curve.js +5 -6
- package/node/mat/closest-boundary-point/closest-points-on-curve.js.map +1 -1
- package/node/mat/closest-boundary-point/cull-bezier-pieces.js +1 -1
- package/node/mat/closest-boundary-point/cull-bezier-pieces.js.map +1 -1
- package/node/mat/closest-boundary-point/cull-by-loose-bounding-box.js +5 -5
- package/node/mat/closest-boundary-point/cull-by-loose-bounding-box.js.map +1 -1
- package/node/mat/closest-boundary-point/cull-by-tight-boundary-box.js +5 -5
- package/node/mat/closest-boundary-point/cull-by-tight-boundary-box.js.map +1 -1
- package/node/mat/closest-boundary-point/get-best-distance-squared.js +5 -5
- package/node/mat/closest-boundary-point/get-best-distance-squared.js.map +1 -1
- package/node/mat/closest-boundary-point/get-close-boundary-points.js +15 -15
- package/node/mat/closest-boundary-point/get-close-boundary-points.js.map +1 -1
- package/node/mat/closest-boundary-point/get-closest-boundary-point.js +4 -4
- package/node/mat/closest-boundary-point/get-closest-boundary-point.js.map +1 -1
- package/node/mat/create-new-cp-tree.js +3 -3
- package/node/mat/create-new-cp-tree.js.map +1 -1
- package/node/mat/elem-type-two-prong.d.ts +1 -1
- package/node/mat/find-mat/add-1-prong.js +3 -3
- package/node/mat/find-mat/add-1-prong.js.map +1 -1
- package/node/mat/find-mat/add-2-prong.js +40 -40
- package/node/mat/find-mat/add-2-prong.js.map +1 -1
- package/node/mat/find-mat/add-3-prong.js +1 -1
- package/node/mat/find-mat/add-3-prong.js.map +1 -1
- package/node/mat/find-mat/add-debug-info.js +16 -18
- package/node/mat/find-mat/add-debug-info.js.map +1 -1
- package/node/mat/find-mat/create-get-interesting-points-on-loop.js +4 -4
- package/node/mat/find-mat/create-get-interesting-points-on-loop.js.map +1 -1
- package/node/mat/find-mat/create-initial-cp-graph.js +11 -11
- package/node/mat/find-mat/create-initial-cp-graph.js.map +1 -1
- package/node/mat/find-mat/find-2-prong/add-debug-info.js +2 -2
- package/node/mat/find-mat/find-2-prong/add-debug-info.js.map +1 -1
- package/node/mat/find-mat/find-2-prong/cull-bezier-pieces.js +5 -5
- package/node/mat/find-mat/find-2-prong/cull-bezier-pieces.js.map +1 -1
- package/node/mat/find-mat/find-2-prong/find-2-prong.js +25 -25
- package/node/mat/find-mat/find-2-prong/find-2-prong.js.map +1 -1
- package/node/mat/find-mat/find-2-prong/find-equidistant-point-on-line.js +7 -7
- package/node/mat/find-mat/find-2-prong/find-equidistant-point-on-line.js.map +1 -1
- package/node/mat/find-mat/find-2-prong/get-initial-bezier-pieces.js +4 -4
- package/node/mat/find-mat/find-2-prong/get-initial-bezier-pieces.js.map +1 -1
- package/node/mat/find-mat/find-2-prong/x-for-debugging.d.ts +1 -1
- package/node/mat/find-mat/find-3-prong/calc-better-x.js +4 -4
- package/node/mat/find-mat/find-3-prong/calc-better-x.js.map +1 -1
- package/node/mat/find-mat/find-3-prong/calc-initial-3-prong-center.js +3 -3
- package/node/mat/find-mat/find-3-prong/calc-initial-3-prong-center.js.map +1 -1
- package/node/mat/find-mat/find-3-prong/find-3-prong-for-delta3s.js +35 -35
- package/node/mat/find-mat/find-3-prong/find-3-prong-for-delta3s.js.map +1 -1
- package/node/mat/find-mat/find-3-prong/find-3-prong.js +14 -14
- package/node/mat/find-mat/find-3-prong/find-3-prong.js.map +1 -1
- package/node/mat/find-mat/find-3-prong/get-closest-points.js +1 -1
- package/node/mat/find-mat/find-3-prong/get-closest-points.js.map +1 -1
- package/node/mat/find-mat/find-and-add-2-prongs-on-all-paths.js +2 -2
- package/node/mat/find-mat/find-and-add-2-prongs-on-all-paths.js.map +1 -1
- package/node/mat/find-mat/find-and-add-2-prongs.js +12 -13
- package/node/mat/find-mat/find-and-add-2-prongs.js.map +1 -1
- package/node/mat/find-mat/find-and-add-3-prongs.js +16 -17
- package/node/mat/find-mat/find-and-add-3-prongs.js.map +1 -1
- package/node/mat/find-mat/find-and-add-hole-closing-2-prongs.js +6 -6
- package/node/mat/find-mat/find-and-add-hole-closing-2-prongs.js.map +1 -1
- package/node/mat/find-mat/get-potential-2-prongs.js +4 -4
- package/node/mat/find-mat/get-potential-2-prongs.js.map +1 -1
- package/node/mat/find-mat/get-sharp-corners.js +4 -4
- package/node/mat/find-mat/get-sharp-corners.js.map +1 -1
- package/node/mat/geometry/get-closest-squared-distance-to-rotated-rect.js +3 -3
- package/node/mat/geometry/get-closest-squared-distance-to-rotated-rect.js.map +1 -1
- package/node/mat/get-boundary-piece-beziers.js +5 -5
- package/node/mat/get-boundary-piece-beziers.js.map +1 -1
- package/node/mat/get-contact-circles-at-interface.js +1 -1
- package/node/mat/get-contact-circles-at-interface.js.map +1 -1
- package/node/mat/get-leaves.js +2 -2
- package/node/mat/get-leaves.js.map +1 -1
- package/node/mat/get-neighboring-cps.js +1 -1
- package/node/mat/get-neighboring-cps.js.map +1 -1
- package/node/mat/is-another-cp-closeby.js +9 -9
- package/node/mat/is-another-cp-closeby.js.map +1 -1
- package/node/mat/simplify-mat-map-only.js +15 -15
- package/node/mat/simplify-mat-map-only.js.map +1 -1
- package/node/mat/to-scale-axis/add-debug-info.js +1 -1
- package/node/mat/to-scale-axis/add-debug-info.js.map +1 -1
- package/node/mat/to-scale-axis/cull-non-cycles.js +5 -5
- package/node/mat/to-scale-axis/cull-non-cycles.js.map +1 -1
- package/node/mat/to-scale-axis/cull.js +5 -5
- package/node/mat/to-scale-axis/cull.js.map +1 -1
- package/node/mat/trim-mat.js +1 -1
- package/node/mat/trim-mat.js.map +1 -1
- package/node/point-on-shape.d.ts +4 -4
- package/node/point-on-shape.js +16 -16
- package/node/point-on-shape.js.map +1 -1
- package/node/simplify-mat.js +10 -10
- package/node/simplify-mat.js.map +1 -1
- package/node/svg/get-loop-bounds.d.ts +1 -1
- package/node/svg/get-loop-bounds.js +13 -13
- package/node/svg/get-loop-bounds.js.map +1 -1
- package/node/svg/get-shape-bounds.d.ts +2 -2
- package/node/svg/get-shape-bounds.js +4 -4
- package/node/svg/get-shape-bounds.js.map +1 -1
- package/node/sweep-line/sweep-line.js +8 -8
- package/node/sweep-line/sweep-line.js.map +1 -1
- package/node/to-scale-axis.js +16 -15
- package/node/to-scale-axis.js.map +1 -1
- package/node/traverse-edges.js +2 -2
- package/node/traverse-edges.js.map +1 -1
- package/node/traverse-vertices.js +2 -2
- package/node/traverse-vertices.js.map +1 -1
- package/package.json +30 -25
- package/src/circle.ts +3 -3
- package/src/compare-curvatures-at-interface.ts +36 -36
- package/src/cp-node/clone.ts +6 -6
- package/src/cp-node/remove.ts +4 -4
- package/src/cp-node.ts +20 -20
- package/src/curve.ts +19 -19
- package/src/debug/functions/draw-elem/bounding-hull.ts +2 -2
- package/src/debug/functions/draw-elem/branch.ts +4 -4
- package/src/debug/functions/draw-elem/culls.ts +4 -4
- package/src/debug/functions/draw-elem/draw-circle-percent.ts +2 -2
- package/src/debug/functions/draw-elem/draw-elem.ts +1 -1
- package/src/debug/functions/draw-elem/dull-corner.ts +3 -3
- package/src/debug/functions/draw-elem/leaves.ts +4 -4
- package/src/debug/functions/draw-elem/loose-bounding-box.ts +2 -2
- package/src/debug/functions/draw-elem/mat.ts +4 -4
- package/src/debug/functions/draw-elem/max-vertex.ts +2 -2
- package/src/debug/functions/draw-elem/min-y.ts +3 -3
- package/src/debug/functions/draw-elem/one-prong-at-dull-corner.ts +4 -4
- package/src/debug/functions/draw-elem/one-prong.ts +4 -4
- package/src/debug/functions/draw-elem/sharp-corner.ts +2 -2
- package/src/debug/functions/draw-elem/three-prong.ts +7 -7
- package/src/debug/functions/draw-elem/tight-bounding-box.ts +1 -1
- package/src/debug/functions/draw-elem/two-prong.ts +1 -1
- package/src/debug/functions/draw-elem/vertex.ts +20 -14
- package/src/debug/functions/general.ts +3 -3
- package/src/debug/functions/three-prong.ts +37 -37
- package/src/debug/functions/two-prong.ts +15 -15
- package/src/find-mats.ts +19 -19
- package/src/get-boundary-bezier-parts-to-next.ts +8 -8
- package/src/get-boundary-beziers-to-next.ts +8 -8
- package/src/get-branches.ts +7 -7
- package/src/get-curve/get-curve-between.ts +21 -21
- package/src/get-curve/get-edge-direction.ts +13 -14
- package/src/get-interface-ccw.ts +12 -12
- package/src/loop/get-max-coordinate.ts +7 -7
- package/src/loop.ts +4 -4
- package/src/mat/add-to-cp-graph.ts +8 -8
- package/src/mat/closest-boundary-point/closest-points-on-curve.ts +5 -6
- package/src/mat/closest-boundary-point/cull-bezier-pieces.ts +1 -1
- package/src/mat/closest-boundary-point/cull-by-loose-bounding-box.ts +5 -5
- package/src/mat/closest-boundary-point/cull-by-tight-boundary-box.ts +5 -5
- package/src/mat/closest-boundary-point/get-best-distance-squared.ts +5 -5
- package/src/mat/closest-boundary-point/get-close-boundary-points.ts +15 -15
- package/src/mat/closest-boundary-point/get-closest-boundary-point.ts +4 -4
- package/src/mat/cmp-cp-on-delta.ts +5 -5
- package/src/mat/create-new-cp-tree.ts +3 -3
- package/src/mat/find-mat/add-1-prong.ts +5 -5
- package/src/mat/find-mat/add-2-prong.ts +42 -42
- package/src/mat/find-mat/add-3-prong.ts +1 -1
- package/src/mat/find-mat/add-debug-info.ts +18 -20
- package/src/mat/find-mat/create-get-interesting-points-on-loop.ts +4 -4
- package/src/mat/find-mat/create-initial-cp-graph.ts +11 -11
- package/src/mat/find-mat/find-2-prong/add-debug-info.ts +4 -4
- package/src/mat/find-mat/find-2-prong/cull-bezier-pieces.ts +5 -5
- package/src/mat/find-mat/find-2-prong/find-2-prong.ts +27 -27
- package/src/mat/find-mat/find-2-prong/find-equidistant-point-on-line.ts +7 -7
- package/src/mat/find-mat/find-2-prong/get-initial-bezier-pieces.ts +4 -4
- package/src/mat/find-mat/find-3-prong/calc-better-x.ts +4 -4
- package/src/mat/find-mat/find-3-prong/calc-initial-3-prong-center.ts +3 -3
- package/src/mat/find-mat/find-3-prong/find-3-prong-for-delta3s.ts +37 -37
- package/src/mat/find-mat/find-3-prong/find-3-prong.ts +16 -16
- package/src/mat/find-mat/find-3-prong/get-closest-points.ts +1 -1
- package/src/mat/find-mat/find-and-add-2-prongs-on-all-paths.ts +2 -2
- package/src/mat/find-mat/find-and-add-2-prongs.ts +14 -16
- package/src/mat/find-mat/find-and-add-3-prongs.ts +19 -19
- package/src/mat/find-mat/find-and-add-hole-closing-2-prongs.ts +6 -6
- package/src/mat/find-mat/get-potential-2-prongs.ts +4 -4
- package/src/mat/find-mat/get-sharp-corners.ts +4 -4
- package/src/mat/find-mat/get-total-abs-curvature.ts +1 -1
- package/src/mat/geometry/get-closest-squared-distance-to-rotated-rect.ts +3 -3
- package/src/mat/get-boundary-piece-beziers.ts +5 -5
- package/src/mat/get-contact-circles-at-interface.ts +1 -1
- package/src/mat/get-edges-as-array.ts +2 -2
- package/src/mat/get-leaves.ts +2 -2
- package/src/mat/get-neighboring-cps.ts +1 -1
- package/src/mat/is-another-cp-closeby.ts +9 -9
- package/src/mat/simplify-mat-map-only.ts +15 -15
- package/src/mat/to-scale-axis/add-debug-info.ts +6 -3
- package/src/mat/to-scale-axis/add-to-tree.ts +10 -10
- package/src/mat/to-scale-axis/calc-groups.ts +19 -19
- package/src/mat/to-scale-axis/create-spacial-tree.ts +4 -4
- package/src/mat/to-scale-axis/cull-non-cycles.ts +5 -5
- package/src/mat/to-scale-axis/cull.ts +5 -5
- package/src/mat/to-scale-axis/get-engulfed-vertices.ts +18 -18
- package/src/mat/trim-mat.ts +1 -1
- package/src/point-on-shape.ts +16 -16
- package/src/simplify-mat.ts +10 -10
- package/src/svg/get-curvature-at-interface.ts +6 -8
- package/src/svg/get-extreme.ts +1 -1
- package/src/svg/get-loop-bounds.ts +13 -13
- package/src/svg/get-shape-bounds.ts +4 -4
- package/src/sweep-line/are-boxes-intersecting.ts +4 -4
- package/src/sweep-line/sweep-line.ts +8 -8
- package/src/to-scale-axis.ts +18 -17
- package/src/traverse-edges.ts +2 -2
- package/src/traverse-vertices.ts +2 -2
- package/webpack.config.cjs +12 -63
- package/browser/index.min.js.LICENSE.txt +0 -2907
- package/browser/index.module.js +0 -7369
- package/browser/index.module.min.js +0 -2
- package/browser/index.module.min.js.LICENSE.txt +0 -2907
package/node/circle.js
CHANGED
|
@@ -16,9 +16,9 @@ function engulfsCircle(c1, c2) {
|
|
|
16
16
|
if (c1.radius <= c2.radius) {
|
|
17
17
|
return false;
|
|
18
18
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const d = squaredDistanceBetween(c1.center, c2.center);
|
|
20
|
+
const dr = c1.radius - c2.radius;
|
|
21
|
+
const δ = dr * dr;
|
|
22
22
|
return δ > d;
|
|
23
23
|
}
|
|
24
24
|
/**
|
package/node/circle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"circle.js","sourceRoot":"","sources":["../src/circle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAYtD;;;;GAIG;AACH,SAAS,WAAW,CAAC,MAAc,EAAE,CAAS;IAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;AAChE,CAAC;AAGD;;;;GAIG;AACH,SAAS,aAAa,CAAC,EAAU,EAAE,EAAU;IACzC,IAAI,EAAE,CAAC,MAAM,IAAI,EAAE,CAAC,MAAM,EAAE;QACxB,OAAO,KAAK,CAAC;KAChB;IAED,
|
|
1
|
+
{"version":3,"file":"circle.js","sourceRoot":"","sources":["../src/circle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAYtD;;;;GAIG;AACH,SAAS,WAAW,CAAC,MAAc,EAAE,CAAS;IAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;AAChE,CAAC;AAGD;;;;GAIG;AACH,SAAS,aAAa,CAAC,EAAU,EAAE,EAAU;IACzC,IAAI,EAAE,CAAC,MAAM,IAAI,EAAE,CAAC,MAAM,EAAE;QACxB,OAAO,KAAK,CAAC;KAChB;IAED,MAAM,CAAC,GAAG,sBAAsB,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;IACvD,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,MAAM,CAAC;IACjC,MAAM,CAAC,GAAG,EAAE,GAAC,EAAE,CAAC;IAEhB,OAAO,CAAC,GAAG,CAAC,CAAC;AACjB,CAAC;AAGD;;;GAGG;AACH,SAAS,QAAQ,CAAC,MAAc;IAC5B,OAAO,KAAK,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAC1D,CAAC;AAED,OAAO,EAAU,WAAW,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -19,13 +19,13 @@ import { tangentAt0, evaluate2ndDerivativeAt0, toPowerBasis_3rdDerivative } from
|
|
|
19
19
|
*/
|
|
20
20
|
function compareCurvaturesAtInterface(psI, psO) {
|
|
21
21
|
// Get x' and y' for incoming curve evaluated at 0
|
|
22
|
-
|
|
22
|
+
const [dxI, dyI] = tangentAt0(psI); // max bitlength increase / max shift === 3
|
|
23
23
|
// Get x'' and y'' for incoming curve evaluated at 0
|
|
24
|
-
|
|
24
|
+
const [ddxI, ddyI] = evaluate2ndDerivativeAt0(psI); // max bitlength increase / max shift === 5
|
|
25
25
|
// Get x' and y' for outgoing curve evaluated at 0
|
|
26
|
-
|
|
26
|
+
const [dxO, dyO] = tangentAt0(psO); // max bitlength increase / max shift === 3
|
|
27
27
|
// Get x'' and y'' for outgoing curve evaluated at 0
|
|
28
|
-
|
|
28
|
+
const [ddxO, ddyO] = evaluate2ndDerivativeAt0(psO); // max bitlength increase / max shift === 5
|
|
29
29
|
//console.log('κI: ', κ(psI, 0));
|
|
30
30
|
//console.log('κO: ', κ(psO, 0));
|
|
31
31
|
// Remember the formula for the signed curvature of a parametric curve:
|
|
@@ -48,32 +48,32 @@ function compareCurvaturesAtInterface(psI, psO) {
|
|
|
48
48
|
// d -> 3 x ((p+3) + 1) === 3p + 12
|
|
49
49
|
//let d = (dxI*dxI + dyI*dyI )**3;
|
|
50
50
|
// We need to resort to exact floating point arithmetic at this point
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
const a = eDiff(twoProduct(dxI, ddyI), twoProduct(dyI, ddxI));
|
|
52
|
+
const c = eDiff(twoProduct(dxO, ddyO), twoProduct(dyO, ddxO));
|
|
53
|
+
const signA = eSign(a);
|
|
54
|
+
const signC = eSign(c);
|
|
55
55
|
if (signA !== signC) {
|
|
56
56
|
//console.log('branch 3');
|
|
57
57
|
return signA - signC;
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
const b = fastExpansionSum(twoProduct(dxO, dxO), twoProduct(dyO, dyO));
|
|
60
|
+
const d = fastExpansionSum(twoProduct(dxI, dxI), twoProduct(dyI, dyI));
|
|
61
|
+
const b2 = expansionProduct(b, b);
|
|
62
|
+
const b3 = expansionProduct(b2, b);
|
|
63
|
+
const d2 = expansionProduct(d, d);
|
|
64
|
+
const d3 = expansionProduct(d2, d);
|
|
65
65
|
if (signA !== 0 || signC !== 0) {
|
|
66
66
|
//console.log('branch 4');
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
const a2 = expansionProduct(a, a);
|
|
68
|
+
const c2 = expansionProduct(c, c);
|
|
69
69
|
// max aggregate bitlength increase (let original bitlength === p):
|
|
70
70
|
// κ -> (2 x ((p+3)+(p+5) + 1)) + (3 x ((p+3) + 1)) === 7p + 30
|
|
71
71
|
// e.g. for bit-aligned input bitlength p of 10 we get output bitlength
|
|
72
72
|
// of 100, or for p === 3 (the max exact bitlength allowed to have exact
|
|
73
73
|
// results without resorting to infinite precision) we get 51 bits.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
const κI = expansionProduct(a2, b3);
|
|
75
|
+
const κO = expansionProduct(c2, d3);
|
|
76
|
+
const δκ = eSign(eDiff(κI, κO));
|
|
77
77
|
if (δκ !== 0) {
|
|
78
78
|
//console.log('branch 5');
|
|
79
79
|
// At this point signA === signC, both +tive or -tive
|
|
@@ -91,18 +91,18 @@ function compareCurvaturesAtInterface(psI, psO) {
|
|
|
91
91
|
// <=> (de - 3af)²b⁵ > (bg - 3ch)²d⁵
|
|
92
92
|
// <=> i²b⁵ > j²d⁵
|
|
93
93
|
// Get x′′′ and y′′′ for incoming curve evaluated at 1
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
const [dddxI, dddyI] = toPowerBasis_3rdDerivative(psI); // max bitlength increase === max shift === 6
|
|
95
|
+
const [dddxO, dddyO] = toPowerBasis_3rdDerivative(psO); // max bitlength increase === max shift === 6
|
|
96
|
+
const e = eDiff(twoProduct(dxI, dddyI), twoProduct(dyI, dddxI));
|
|
97
|
+
const f = fastExpansionSum(twoProduct(dxI, ddxI), twoProduct(dyI, ddyI));
|
|
98
|
+
const g = eDiff(twoProduct(dxO, dddyO), twoProduct(dyO, dddxO));
|
|
99
|
+
const h = fastExpansionSum(twoProduct(dxO, ddxO), twoProduct(dyO, ddyO));
|
|
100
100
|
// (de - 3af)²b⁵ > (bg - 3ch)²d⁵
|
|
101
101
|
// i²b⁵ > j²d⁵
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
const i = eDiff(expansionProduct(d, e), scaleExpansion(expansionProduct(a, f), 3));
|
|
103
|
+
const j = eDiff(expansionProduct(b, g), scaleExpansion(expansionProduct(c, h), 3));
|
|
104
|
+
const signI = eSign(i);
|
|
105
|
+
const signJ = eSign(j);
|
|
106
106
|
if (signA !== signC) {
|
|
107
107
|
return signI - signJ;
|
|
108
108
|
}
|
|
@@ -110,13 +110,13 @@ function compareCurvaturesAtInterface(psI, psO) {
|
|
|
110
110
|
// Both curve extensions are identical, i.e. in the same K-family
|
|
111
111
|
return 0;
|
|
112
112
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
113
|
+
const i2 = expansionProduct(i, i);
|
|
114
|
+
const b5 = expansionProduct(b2, b3);
|
|
115
|
+
const j2 = expansionProduct(j, j);
|
|
116
|
+
const d5 = expansionProduct(d2, d3);
|
|
117
|
+
const dκI = expansionProduct(i2, b5);
|
|
118
|
+
const dκO = expansionProduct(j2, d5);
|
|
119
|
+
const sgn = eSign(eDiff(dκI, dκO));
|
|
120
120
|
return signI > 0 ? sgn : -sgn;
|
|
121
121
|
// If the above returned value is still zero then the two curve extensions
|
|
122
122
|
// are identical, i.e. in the same K-family
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compare-curvatures-at-interface.js","sourceRoot":"","sources":["../src/compare-curvatures-at-interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC5G,OAAO,EAAE,UAAU,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAG/F;;;;;;;;;;;;;;;;GAgBG;AACH,SAAS,4BAA4B,CAC7B,GAAe,EACf,GAAe;IAEnB,kDAAkD;IAClD,
|
|
1
|
+
{"version":3,"file":"compare-curvatures-at-interface.js","sourceRoot":"","sources":["../src/compare-curvatures-at-interface.ts"],"names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['prev', 'next', 'prevOnCircle', 'nextOnCircle'];
|
|
|
9
9
|
function clone(cpNode) {
|
|
10
10
|
// Don't change this function to be recursive, the call stack may
|
|
11
11
|
// overflow if there are too many CpNodes.
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
const nodeMap = new Map();
|
|
13
|
+
const newCpNode = new CpNode(cpNode.cp, cpNode.isHoleClosing, cpNode.isIntersection);
|
|
14
14
|
nodeMap.set(cpNode, newCpNode);
|
|
15
|
-
|
|
15
|
+
const cpStack = [{ cpNode, newCpNode }];
|
|
16
16
|
while (cpStack.length) {
|
|
17
|
-
|
|
18
|
-
for (
|
|
19
|
-
|
|
17
|
+
const { cpNode, newCpNode } = cpStack.pop();
|
|
18
|
+
for (const edge of EDGES) {
|
|
19
|
+
const node = cpNode[edge];
|
|
20
20
|
let newNode = nodeMap.get(node);
|
|
21
21
|
if (!newNode) {
|
|
22
22
|
newNode = new CpNode(node.cp, node.isHoleClosing, node.isIntersection);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clone.js","sourceRoot":"","sources":["../../src/cp-node/clone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAUvC,cAAc;AACd,MAAM,KAAK,GAAW,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;AAGvE;;;;GAIG;AACH,SAAS,KAAK,CAAC,MAAc;IACzB,kEAAkE;IAClE,0CAA0C;IAE1C,
|
|
1
|
+
{"version":3,"file":"clone.js","sourceRoot":"","sources":["../../src/cp-node/clone.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAUvC,cAAc;AACd,MAAM,KAAK,GAAW,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;AAGvE;;;;GAIG;AACH,SAAS,KAAK,CAAC,MAAc;IACzB,kEAAkE;IAClE,0CAA0C;IAE1C,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ode.next;
|
|
9
9
|
prev.next = next;
|
|
10
10
|
next.prev = prev;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const nextOpposite = next.prevOnCircle;
|
|
12
|
+
const prevOpposite = prev.nextOnCircle;
|
|
13
13
|
nextOpposite.next = prevOpposite;
|
|
14
14
|
prevOpposite.prev = nextOpposite;
|
|
15
15
|
if (cpTree) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../src/cp-node/remove.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,SAAS,YAAY,CAAC,MAAc,EAAE,MAAyB;IAC3D,
|
|
1
|
+
{"version":3,"file":"remove.js","sourceRoot":"","sources":["../../src/cp-node/remove.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,SAAS,YAAY,CAAC,MAAc,EAAE,MAAyB;IAC3D,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IACzB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IACzB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAEjB,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;IACvC,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;IACvC,YAAY,CAAC,IAAI,GAAG,YAAY,CAAC;IACjC,YAAY,CAAC,IAAI,GAAG,YAAY,CAAC;IAEjC,IAAI,MAAM,EAAE;QACR,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;KAChC;AACL,CAAC;AAGD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
package/node/cp-node.js
CHANGED
|
@@ -93,8 +93,8 @@ class CpNode {
|
|
|
93
93
|
* edges.
|
|
94
94
|
*/
|
|
95
95
|
getChildren() {
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
const children = [];
|
|
97
|
+
const cp = this.next;
|
|
98
98
|
let cp_ = cp;
|
|
99
99
|
do {
|
|
100
100
|
children.push(cp_);
|
|
@@ -114,8 +114,8 @@ class CpNode {
|
|
|
114
114
|
if (this.isTerminating()) {
|
|
115
115
|
return [];
|
|
116
116
|
}
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
const cp = this;
|
|
118
|
+
const children = [];
|
|
119
119
|
let cp_ = cp;
|
|
120
120
|
while (cp_ !== cp.prevOnCircle) {
|
|
121
121
|
if (!cp_.isTerminating()) {
|
|
@@ -130,8 +130,8 @@ class CpNode {
|
|
|
130
130
|
* starting from the current one and going anti-clockwise around the shape.
|
|
131
131
|
*/
|
|
132
132
|
getAllOnLoop() {
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
const cpStart = this;
|
|
134
|
+
const cps = [cpStart];
|
|
135
135
|
let cp = this.next;
|
|
136
136
|
while (cp !== cpStart) {
|
|
137
137
|
cps.push(cp);
|
|
@@ -154,7 +154,7 @@ class CpNode {
|
|
|
154
154
|
* loop.
|
|
155
155
|
*/
|
|
156
156
|
static insert(isHoleClosing, isIntersection, cpTree, cp, prev_) {
|
|
157
|
-
|
|
157
|
+
const cpNode = new CpNode(cp, isHoleClosing, isIntersection);
|
|
158
158
|
if (typeof _debug_ !== 'undefined') {
|
|
159
159
|
_debug_.generated.elems.cpNode.push({
|
|
160
160
|
generated: _debug_.generated,
|
|
@@ -185,9 +185,9 @@ class CpNode {
|
|
|
185
185
|
* [[CpNode]].
|
|
186
186
|
*/
|
|
187
187
|
getCpNodesOnCircle(exclThis = false) {
|
|
188
|
-
|
|
188
|
+
const startCp = this;
|
|
189
189
|
let cp = startCp;
|
|
190
|
-
|
|
190
|
+
const cps = [];
|
|
191
191
|
do {
|
|
192
192
|
if (exclThis) {
|
|
193
193
|
exclThis = false;
|
|
@@ -206,7 +206,7 @@ class CpNode {
|
|
|
206
206
|
* @param cpNode2 Another [[CpNode]]
|
|
207
207
|
*/
|
|
208
208
|
static isOnSameCircle(cpNode1, cpNode2) {
|
|
209
|
-
|
|
209
|
+
const cpNodes = cpNode1.getCpNodesOnCircle(true);
|
|
210
210
|
return cpNodes.indexOf(cpNode2) >= 0;
|
|
211
211
|
}
|
|
212
212
|
/**
|
|
@@ -230,8 +230,8 @@ class CpNode {
|
|
|
230
230
|
* (except this.prevOnCircle) is terminating.
|
|
231
231
|
*/
|
|
232
232
|
isFullyTerminating() {
|
|
233
|
-
|
|
234
|
-
|
|
233
|
+
const otherOnCircle = this.prevOnCircle.getCpNodesOnCircle(true);
|
|
234
|
+
const isFullyTerminating = otherOnCircle.every(cpNode => cpNode.isTerminating());
|
|
235
235
|
return isFullyTerminating;
|
|
236
236
|
}
|
|
237
237
|
/**
|
|
@@ -239,7 +239,7 @@ class CpNode {
|
|
|
239
239
|
* .nextOnCircle) that exits the circle.
|
|
240
240
|
*/
|
|
241
241
|
getFirstExit() {
|
|
242
|
-
|
|
242
|
+
const startNode = this;
|
|
243
243
|
let cpNode = startNode;
|
|
244
244
|
while (cpNode.next === cpNode.prevOnCircle) {
|
|
245
245
|
cpNode = cpNode.next;
|
|
@@ -269,13 +269,13 @@ class CpNode {
|
|
|
269
269
|
* preserve symmetry - see [[isTerminating]] for more details.
|
|
270
270
|
*/
|
|
271
271
|
isOneProng() {
|
|
272
|
-
|
|
272
|
+
const cp1 = this;
|
|
273
273
|
if (cp1.cp.circle.radius === 0) {
|
|
274
274
|
return true;
|
|
275
275
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
276
|
+
const cp2 = cp1.nextOnCircle;
|
|
277
|
+
const p1 = cp1.cp.pointOnShape.p;
|
|
278
|
+
const p2 = cp2.cp.pointOnShape.p;
|
|
279
279
|
return (p1[0] === p2[0] && p1[1] === p2[1]);
|
|
280
280
|
}
|
|
281
281
|
/**
|
|
@@ -287,7 +287,7 @@ class CpNode {
|
|
|
287
287
|
* [[getRealProngCount]] instead which will return 1 in these cases.
|
|
288
288
|
*/
|
|
289
289
|
getProngCount() {
|
|
290
|
-
|
|
290
|
+
const startCp = this;
|
|
291
291
|
let cp = startCp;
|
|
292
292
|
let i = 0;
|
|
293
293
|
do {
|
package/node/cp-node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cp-node.js","sourceRoot":"","sources":["../src/cp-node.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgB,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,MAAM,MAAM;IAEX;;;;;;;;;;;;;;;;OAgBG;IACA,YACe,EAAoB,EAC7B,aAAwB,EACxB,cAAwB,EACxB,OAA0B,SAAS,EACnC,OAA0B,SAAS,EACnC,eAA0B,SAAS,EACnC,eAA0B,SAAS;QAN1B,OAAE,GAAF,EAAE,CAAkB;QAC7B,kBAAa,GAAb,aAAa,CAAW;QACxB,mBAAc,GAAd,cAAc,CAAU;QACxB,SAAI,GAAJ,IAAI,CAA+B;QACnC,SAAI,GAAJ,IAAI,CAA+B;QACnC,iBAAY,GAAZ,YAAY,CAAuB;QACnC,iBAAY,GAAZ,YAAY,CAAuB;IAC5C,CAAC;IAGD;;;;;;OAMG;IACH,IAAI,oBAAoB;QACvB,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IAaD;;;;;OAKG;IACH,WAAW;QACV,
|
|
1
|
+
{"version":3,"file":"cp-node.js","sourceRoot":"","sources":["../src/cp-node.ts"],"names":[],"mappings":"AAKA,OAAO,EAAgB,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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iBAAU,GAChB,CAAC,CAAS,EAAE,CAAS,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;AAsB3C,aAAM,GAAG,YAAY,CAAC;AAkQ9B,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
package/node/curve.d.ts
CHANGED
|
@@ -42,5 +42,5 @@ declare function getCorner(psI: number[][], psO: number[][]): Corner;
|
|
|
42
42
|
* Returns information about the corner created at the end of this curve
|
|
43
43
|
* (at t === 1) and the start of the next curve (at t === 0).
|
|
44
44
|
*/
|
|
45
|
-
declare
|
|
45
|
+
declare const getCornerAtEnd: (a: Curve) => Corner;
|
|
46
46
|
export { Curve, getCorner, getCornerAtEnd };
|
package/node/curve.js
CHANGED
|
@@ -31,32 +31,32 @@ const DEGREE_LIMIT = DEGREES[4];
|
|
|
31
31
|
function getCorner(psI, psO) {
|
|
32
32
|
// getInterfaceCcw must return a number !== 0 if psI and psO are not the
|
|
33
33
|
// same as seen as a curve extension with t ∈ [-∞,+∞]
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
const ccw = getInterfaceCcw(psI, psO);
|
|
35
|
+
const isSharp = ccw < 0;
|
|
36
|
+
const isDull = ccw > 0;
|
|
37
37
|
// Find (non-normalized) tangent of curve.ps at t === 1
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
const p0E = psI[psI.length - 2];
|
|
39
|
+
const p1E = psI[psI.length - 1];
|
|
40
|
+
const xE = p1E[0] - p0E[0];
|
|
41
|
+
const yE = p1E[1] - p0E[1];
|
|
42
|
+
const tangentAtEnd = [xE, yE];
|
|
43
43
|
// Find (non-normalized) tangent of curve.next.ps at t === 0
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
const p0S = psO[0];
|
|
45
|
+
const p1S = psO[1];
|
|
46
|
+
const xS = p1S[0] - p0S[0];
|
|
47
|
+
const yS = p1S[1] - p0S[1];
|
|
48
|
+
const tangentAtStart = [xS, yS];
|
|
49
49
|
// These use square root and are thus not exact
|
|
50
|
-
|
|
50
|
+
const tangents_ = [
|
|
51
51
|
toUnitVector(tangentAtEnd),
|
|
52
52
|
toUnitVector(tangentAtStart),
|
|
53
53
|
];
|
|
54
54
|
// The cross calculated below should be exact due to beziers having been
|
|
55
55
|
// normalized!
|
|
56
|
-
|
|
56
|
+
const crossTangents = cross(tangents_[0], tangents_[1]);
|
|
57
57
|
let isQuiteSharp;
|
|
58
58
|
let isQuiteDull;
|
|
59
|
-
|
|
59
|
+
const dotTangents = dot(tangentAtEnd, tangentAtStart);
|
|
60
60
|
if (dotTangents > 0) {
|
|
61
61
|
// Curves go in same direction
|
|
62
62
|
isQuiteSharp = crossTangents < -DEGREE_LIMIT;
|
|
@@ -80,9 +80,9 @@ function getCorner(psI, psO) {
|
|
|
80
80
|
* Returns information about the corner created at the end of this curve
|
|
81
81
|
* (at t === 1) and the start of the next curve (at t === 0).
|
|
82
82
|
*/
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
const getCornerAtEnd = memoize(function (curve) {
|
|
84
|
+
const psE = curve.ps;
|
|
85
|
+
const psS = curve.next.ps;
|
|
86
86
|
return getCorner(psE, psS);
|
|
87
87
|
});
|
|
88
88
|
export { getCorner, getCornerAtEnd };
|
package/node/curve.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curve.js","sourceRoot":"","sources":["../src/curve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAgCzD;;;GAGG;AACH,MAAM,OAAO,GAAG;IACf,kBAAkB;IAClB,IAAI,EAAG,MAA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AW;KACX,CAAC;AACH,CAAC;AAGD;;;;GAIG;AACH,MAAM,cAAc,GAAG,OAAO,CAAC,UAAS,KAAY;IACnD,MAAM,GAAG,GAAG,KAAK,CAAC,EAAE,CAAC;IACrB,MAAM,GAAG,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;IAE1B,OAAO,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC;AAGH,OAAO,EAAS,SAAS,EAAE,cAAc,EAAE,CAAA"}
|
package/node/debug/debug.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { drawFs } from 'flo-draw';
|
|
2
2
|
/** @hidden */
|
|
3
3
|
function boundingHull(g, hull, style = 'thin5 black nofill') {
|
|
4
|
-
|
|
4
|
+
const $polygon = drawFs.polygon(g, hull, style);
|
|
5
5
|
return $polygon;
|
|
6
6
|
}
|
|
7
7
|
export { boundingHull };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bounding-hull.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/bounding-hull.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,cAAc;AACd,SAAS,YAAY,CACb,CAAc,EACd,IAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"bounding-hull.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/bounding-hull.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,cAAc;AACd,SAAS,YAAY,CACb,CAAc,EACd,IAAgB,EAChB,KAAK,GAAG,oBAAoB;IAEnC,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IAEhD,OAAO,QAAQ,CAAC;AACjB,CAAC;AAGD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -2,15 +2,15 @@ import { drawFs } from 'flo-draw';
|
|
|
2
2
|
import { getCurveToNext } from '../../../get-curve-to-next.js';
|
|
3
3
|
/** @hidden */
|
|
4
4
|
function drawBranch(g, branch, delay) {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const classes = 'thin5 purple nofill';
|
|
6
|
+
const $svgs = [];
|
|
7
7
|
let i = 0;
|
|
8
|
-
for (
|
|
8
|
+
for (const cpNode of branch) {
|
|
9
9
|
if (cpNode.isTerminating()) {
|
|
10
10
|
continue;
|
|
11
11
|
}
|
|
12
12
|
//let bezier = cpNode.matCurveToNextVertex;
|
|
13
|
-
|
|
13
|
+
const bezier = getCurveToNext(cpNode);
|
|
14
14
|
if (!bezier) {
|
|
15
15
|
continue;
|
|
16
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"branch.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/branch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAG/D,cAAc;AACd,SAAS,UAAU,CAAC,CAAc,EAAE,MAAgB,EAAE,KAAc;IAEhE,
|
|
1
|
+
{"version":3,"file":"branch.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/branch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAG/D,cAAc;AACd,SAAS,UAAU,CAAC,CAAc,EAAE,MAAgB,EAAE,KAAc;IAEhE,MAAM,OAAO,GAAG,qBAAqB,CAAC;IAEtC,MAAM,KAAK,GAAiB,EAAE,CAAC;IAC/B,IAAI,CAAC,GAAG,CAAC,CAAC;IAEV,KAAK,MAAM,MAAM,IAAI,MAAM,EAAE;QACzB,IAAI,MAAM,CAAC,aAAa,EAAE,EAAE;YAAE,SAAS;SAAE;QACzC,2CAA2C;QAC3C,MAAM,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;QACtC,IAAI,CAAC,MAAM,EAAE;YAAE,SAAS;SAAE;QAC1B,CAAC,EAAE,CAAC;QACJ,KAAK,CAAC,IAAI,CAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;KAC5D;IAED,OAAO,KAAK,CAAC;AACjB,CAAC;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @hidden */
|
|
2
2
|
function culls(g, culls) {
|
|
3
|
-
|
|
4
|
-
for (
|
|
5
|
-
|
|
3
|
+
const $elems = [];
|
|
4
|
+
for (const circle of culls) {
|
|
5
|
+
const p = circle.center;
|
|
6
6
|
$elems.push(drawCircle(g, p, 0.4, 'cyan thin5 nofill'));
|
|
7
7
|
}
|
|
8
8
|
return $elems;
|
|
@@ -10,7 +10,7 @@ function culls(g, culls) {
|
|
|
10
10
|
/** @hidden */
|
|
11
11
|
function drawCircle(g, center, radiusPercent, classes) {
|
|
12
12
|
const XMLNS = 'http://www.w3.org/2000/svg';
|
|
13
|
-
|
|
13
|
+
const $circle = document.createElementNS(XMLNS, 'circle');
|
|
14
14
|
$circle.setAttributeNS(null, "cx", center[0].toString());
|
|
15
15
|
$circle.setAttributeNS(null, "cy", center[1].toString());
|
|
16
16
|
$circle.setAttributeNS(null, "r", radiusPercent.toString() + '%');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"culls.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/culls.ts"],"names":[],"mappings":"AAGA,cAAc;AACd,SAAS,KAAK,CAAC,CAAc,EAAE,KAAe;IAC1C,
|
|
1
|
+
{"version":3,"file":"culls.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/culls.ts"],"names":[],"mappings":"AAGA,cAAc;AACd,SAAS,KAAK,CAAC,CAAc,EAAE,KAAe;IAC1C,MAAM,MAAM,GAAiB,EAAE,CAAC;IAEhC,KAAK,MAAM,MAAM,IAAI,KAAK,EAAE;QACxB,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC;QAExB,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,mBAAmB,CAAC,CAAC,CAAC;KAC3D;IAEJ,OAAO,MAAM,CAAC;AACf,CAAC;AAGD,cAAc;AACd,SAAS,UAAU,CACX,CAAc,EACd,MAAgB,EAChB,aAAqB,EACrB,OAAe;IAEnB,MAAM,KAAK,GAAG,4BAA4B,CAAC;IAE3C,MAAM,OAAO,GAAG,QAAQ,CAAC,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC1D,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IACzD,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IACzD,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,aAAa,CAAC,QAAQ,EAAE,GAAG,GAAG,CAAC,CAAC;IAClE,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAE/C,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAEvB,OAAO,OAAO,CAAC;AACnB,CAAC;AAGD,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @hidden */
|
|
2
2
|
function drawCirclePercent(g, center, radiusPercent, classes) {
|
|
3
3
|
const XMLNS = 'http://www.w3.org/2000/svg';
|
|
4
|
-
|
|
4
|
+
const $circle = document.createElementNS(XMLNS, 'circle');
|
|
5
5
|
$circle.setAttributeNS(null, "cx", center[0].toString());
|
|
6
6
|
$circle.setAttributeNS(null, "cy", center[1].toString());
|
|
7
7
|
$circle.setAttributeNS(null, "r", radiusPercent.toString() + '%');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draw-circle-percent.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/draw-circle-percent.ts"],"names":[],"mappings":"AACA,cAAc;AACd,SAAS,iBAAiB,CAClB,CAAc,EACd,MAAgB,EAChB,aAAqB,EACrB,OAAe;IAEnB,MAAM,KAAK,GAAG,4BAA4B,CAAC;IAE3C,
|
|
1
|
+
{"version":3,"file":"draw-circle-percent.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/draw-circle-percent.ts"],"names":[],"mappings":"AACA,cAAc;AACd,SAAS,iBAAiB,CAClB,CAAc,EACd,MAAgB,EAChB,aAAqB,EACrB,OAAe;IAEnB,MAAM,KAAK,GAAG,4BAA4B,CAAC;IAE3C,MAAM,OAAO,GAAG,QAAQ,CAAC,eAAe,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAC1D,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IACzD,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IACzD,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,aAAa,CAAC,QAAQ,EAAE,GAAG,GAAG,CAAC,CAAC;IAClE,OAAO,CAAC,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAE/C,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAEvB,OAAO,OAAO,CAAC;AACnB,CAAC;AAGD,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { IDebugElems } from '../../debug-elem-types.js';
|
|
2
2
|
/** @hidden */
|
|
3
|
-
|
|
3
|
+
type TDrawElemFunctions = {
|
|
4
4
|
[T in keyof IDebugElems]: (g: SVGGElement, elem: IDebugElems[T], classes?: string, delay?: number) => SVGElement[];
|
|
5
5
|
};
|
|
6
6
|
/** @hidden */
|
|
7
|
-
declare
|
|
7
|
+
declare const drawElemFunctions: TDrawElemFunctions;
|
|
8
8
|
export { drawElemFunctions, TDrawElemFunctions };
|
|
@@ -17,7 +17,7 @@ function notImplementedYet(g, elem) {
|
|
|
17
17
|
return []; // TODO - implement relevant drawing function
|
|
18
18
|
}
|
|
19
19
|
/** @hidden */
|
|
20
|
-
|
|
20
|
+
const drawElemFunctions = {
|
|
21
21
|
oneProng: drawOneProng,
|
|
22
22
|
oneProngAtDullCorner,
|
|
23
23
|
twoProng_regular: twoProng,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"draw-elem.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/draw-elem.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAM,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAU,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAQ,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAY,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,YAAY,EAAM,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAO,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAQ,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAW,MAAM,UAAU,CAAC;AAG5C,OAAO,EAAE,SAAS,EAAS,MAAM,iBAAiB,CAAC;A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GAAuB;IAC7C,QAAQ,EAAE,YAAY;IACtB,oBAAoB;IAEpB,gBAAgB,EAAE,QAAQ;IAC1B,eAAe,EAAE,QAAQ;IACzB,iBAAiB,EAAE,QAAQ;IAC3B,gBAAgB,EAAE,QAAQ;IAC1B,oBAAoB,EAAE,QAAQ;IAC9B,UAAU;IACV,OAAO;IACP,YAAY;IACZ,gBAAgB;IAChB,gBAAgB;IAChB,WAAW;IACX,UAAU;IACV,MAAM;IACN,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC;IACnB,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC;IACnB,OAAO;IACP,QAAQ;IACR,SAAS;IACT,MAAM;IACN,KAAK;IACL,MAAM,EAAE,iBAAiB;CACzB,CAAA;AAGD,OAAO,EAAE,iBAAiB,EAAsB,CAAA"}
|
|
@@ -2,9 +2,9 @@ import { drawFs } from 'flo-draw';
|
|
|
2
2
|
/** @hidden */
|
|
3
3
|
function dullCorner(g, curve) {
|
|
4
4
|
const scaleFactor = 1;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
const ps = curve.ps;
|
|
6
|
+
const p = curve.ps[ps.length - 1];
|
|
7
|
+
const $pos = drawFs.dot(g, p, 0.5 * scaleFactor, 'orange');
|
|
8
8
|
return $pos;
|
|
9
9
|
}
|
|
10
10
|
export { dullCorner };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dull-corner.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/dull-corner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,cAAc;AACd,SAAS,UAAU,CAAC,CAAc,EAAE,KAAY;IAC/C,MAAM,WAAW,GAAG,CAAC,CAAC;IAEtB,
|
|
1
|
+
{"version":3,"file":"dull-corner.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/dull-corner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAIlC,cAAc;AACd,SAAS,UAAU,CAAC,CAAc,EAAE,KAAY;IAC/C,MAAM,WAAW,GAAG,CAAC,CAAC;IAEtB,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC;IACpB,MAAM,CAAC,GAAG,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,GAAC,CAAC,CAAC,CAAC;IAChC,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,GAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAEzD,OAAO,IAAI,CAAC;AACb,CAAC;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { drawCirclePercent } from './draw-circle-percent.js';
|
|
2
2
|
/** @hidden */
|
|
3
3
|
function leaves(g, leaves) {
|
|
4
|
-
|
|
5
|
-
for (
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
const $elems = [];
|
|
5
|
+
for (const cpNode of leaves) {
|
|
6
|
+
const cp = cpNode.cp;
|
|
7
|
+
const p = cp.circle.center;
|
|
8
8
|
$elems.push(drawCirclePercent(g, p, 0.5, 'pinker thin5 nofill'));
|
|
9
9
|
}
|
|
10
10
|
return $elems;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leaves.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/leaves.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG7D,cAAc;AACd,SAAS,MAAM,CAAC,CAAc,EAAE,MAAgB;IAC5C,
|
|
1
|
+
{"version":3,"file":"leaves.js","sourceRoot":"","sources":["../../../../src/debug/functions/draw-elem/leaves.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG7D,cAAc;AACd,SAAS,MAAM,CAAC,CAAc,EAAE,MAAgB;IAC5C,MAAM,MAAM,GAAiB,EAAE,CAAC;IAEhC,KAAK,MAAM,MAAM,IAAI,MAAM,EAAE;QACzB,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;QACrB,MAAM,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;QAE3B,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,qBAAqB,CAAC,CAAC,CAAC;KACpE;IAEJ,OAAO,MAAM,CAAC;AACf,CAAC;AAGD,OAAO,EAAE,MAAM,EAAE,CAAA"}
|