flo-mat 1.2.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.mocharc.cjs +17 -0
- package/README.md +12 -1
- package/browser/index.js +7348 -0
- package/browser/index.min.js +2 -1
- package/browser/index.min.js.LICENSE.txt +2907 -0
- package/browser/index.module.js +7369 -0
- package/browser/index.module.min.js +2 -0
- package/browser/index.module.min.js.LICENSE.txt +2907 -0
- package/node/circle.js +3 -7
- package/node/circle.js.map +1 -1
- package/node/compare-curvatures-at-interface.d.ts +19 -0
- package/node/compare-curvatures-at-interface.js +125 -0
- package/node/compare-curvatures-at-interface.js.map +1 -0
- package/node/contact-point.d.ts +2 -2
- package/node/contact-point.js +3 -6
- package/node/contact-point.js.map +1 -1
- package/node/cp-node/clone.d.ts +1 -1
- package/node/cp-node/clone.js +4 -7
- package/node/cp-node/clone.js.map +1 -1
- package/node/cp-node/remove.d.ts +2 -2
- package/node/cp-node/remove.js +1 -4
- package/node/cp-node/remove.js.map +1 -1
- package/node/cp-node.d.ts +4 -5
- package/node/cp-node.js +8 -12
- package/node/cp-node.js.map +1 -1
- package/node/curve.d.ts +2 -2
- package/node/curve.js +10 -14
- package/node/curve.js.map +1 -1
- package/node/debug/cp-node-for-debugging.d.ts +2 -2
- package/node/debug/cp-node-for-debugging.js +1 -2
- package/node/debug/debug-elem-types.d.ts +8 -8
- package/node/debug/debug-elem-types.js +1 -2
- package/node/debug/debug.d.ts +5 -7
- package/node/debug/debug.js +67 -10
- package/node/debug/debug.js.map +1 -1
- package/node/debug/functions/draw-elem/bounding-hull.js +3 -6
- package/node/debug/functions/draw-elem/bounding-hull.js.map +1 -1
- package/node/debug/functions/draw-elem/branch.d.ts +1 -1
- package/node/debug/functions/draw-elem/branch.js +5 -8
- package/node/debug/functions/draw-elem/branch.js.map +1 -1
- package/node/debug/functions/draw-elem/culls.d.ts +1 -1
- package/node/debug/functions/draw-elem/culls.js +1 -4
- package/node/debug/functions/draw-elem/culls.js.map +1 -1
- package/node/debug/functions/draw-elem/draw-circle-percent.js +1 -4
- package/node/debug/functions/draw-elem/draw-circle-percent.js.map +1 -1
- package/node/debug/functions/draw-elem/draw-elem.d.ts +1 -1
- package/node/debug/functions/draw-elem/draw-elem.js +34 -37
- package/node/debug/functions/draw-elem/draw-elem.js.map +1 -1
- package/node/debug/functions/draw-elem/dull-corner.d.ts +1 -1
- package/node/debug/functions/draw-elem/dull-corner.js +5 -7
- package/node/debug/functions/draw-elem/dull-corner.js.map +1 -1
- package/node/debug/functions/draw-elem/leaves.d.ts +1 -1
- package/node/debug/functions/draw-elem/leaves.js +3 -6
- package/node/debug/functions/draw-elem/leaves.js.map +1 -1
- package/node/debug/functions/draw-elem/loop.d.ts +1 -1
- package/node/debug/functions/draw-elem/loop.js +1 -4
- package/node/debug/functions/draw-elem/loop.js.map +1 -1
- package/node/debug/functions/draw-elem/loops.d.ts +1 -1
- package/node/debug/functions/draw-elem/loops.js +1 -4
- package/node/debug/functions/draw-elem/loops.js.map +1 -1
- package/node/debug/functions/draw-elem/loose-bounding-box.js +3 -6
- package/node/debug/functions/draw-elem/loose-bounding-box.js.map +1 -1
- package/node/debug/functions/draw-elem/mat.d.ts +1 -1
- package/node/debug/functions/draw-elem/mat.js +7 -10
- package/node/debug/functions/draw-elem/mat.js.map +1 -1
- package/node/debug/functions/draw-elem/max-vertex.d.ts +1 -1
- package/node/debug/functions/draw-elem/max-vertex.js +3 -6
- package/node/debug/functions/draw-elem/max-vertex.js.map +1 -1
- package/node/debug/functions/draw-elem/min-y.d.ts +1 -1
- package/node/debug/functions/draw-elem/min-y.js +9 -12
- package/node/debug/functions/draw-elem/min-y.js.map +1 -1
- package/node/debug/functions/draw-elem/one-prong-at-dull-corner.d.ts +1 -1
- package/node/debug/functions/draw-elem/one-prong-at-dull-corner.js +7 -10
- package/node/debug/functions/draw-elem/one-prong-at-dull-corner.js.map +1 -1
- package/node/debug/functions/draw-elem/one-prong.d.ts +1 -1
- package/node/debug/functions/draw-elem/one-prong.js +9 -12
- package/node/debug/functions/draw-elem/one-prong.js.map +1 -1
- package/node/debug/functions/draw-elem/sharp-corner.d.ts +1 -1
- package/node/debug/functions/draw-elem/sharp-corner.js +3 -6
- package/node/debug/functions/draw-elem/sharp-corner.js.map +1 -1
- package/node/debug/functions/draw-elem/three-prong.d.ts +1 -1
- package/node/debug/functions/draw-elem/three-prong.js +9 -12
- package/node/debug/functions/draw-elem/three-prong.js.map +1 -1
- package/node/debug/functions/draw-elem/tight-bounding-box.js +3 -6
- package/node/debug/functions/draw-elem/tight-bounding-box.js.map +1 -1
- package/node/debug/functions/draw-elem/two-prong.d.ts +1 -1
- package/node/debug/functions/draw-elem/two-prong.js +9 -12
- package/node/debug/functions/draw-elem/two-prong.js.map +1 -1
- package/node/debug/functions/draw-elem/vertex.d.ts +1 -1
- package/node/debug/functions/draw-elem/vertex.js +7 -10
- 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 +3 -6
- package/node/debug/functions/general.js.map +1 -1
- package/node/debug/functions/three-prong.js +24 -27
- 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 +10 -13
- package/node/debug/functions/two-prong.js.map +1 -1
- package/node/debug/three-prong-for-debugging.d.ts +4 -4
- package/node/debug/three-prong-for-debugging.js +4 -7
- package/node/debug/three-prong-for-debugging.js.map +1 -1
- package/node/debug/two-prong-for-debugging.d.ts +5 -5
- package/node/debug/two-prong-for-debugging.js +1 -2
- package/node/find-mats.d.ts +12 -9
- package/node/find-mats.js +47 -53
- package/node/find-mats.js.map +1 -1
- package/node/get-boundary-bezier-parts-to-next.d.ts +3 -3
- package/node/get-boundary-bezier-parts-to-next.js +1 -4
- package/node/get-boundary-bezier-parts-to-next.js.map +1 -1
- package/node/get-boundary-beziers-to-next.d.ts +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-bounding-box-.d.ts +2 -0
- package/node/get-bounding-box-.js +5 -0
- package/node/get-bounding-box-.js.map +1 -0
- package/node/get-branches.d.ts +1 -1
- package/node/get-branches.js +7 -10
- package/node/get-branches.js.map +1 -1
- package/node/get-curve/get-curve-between.d.ts +1 -1
- package/node/get-curve/get-curve-between.js +21 -24
- package/node/get-curve/get-curve-between.js.map +1 -1
- package/node/get-curve/get-edge-direction.d.ts +1 -1
- package/node/get-curve/get-edge-direction.js +12 -15
- package/node/get-curve/get-edge-direction.js.map +1 -1
- package/node/get-curve-to-next.d.ts +1 -1
- package/node/get-curve-to-next.js +3 -6
- package/node/get-curve-to-next.js.map +1 -1
- package/node/get-interface-ccw.d.ts +24 -0
- package/node/get-interface-ccw.js +98 -0
- package/node/get-interface-ccw.js.map +1 -0
- package/node/index.d.ts +35 -36
- package/node/index.js +32 -56
- package/node/index.js.map +1 -1
- package/node/loop/get-max-coordinate.js +1 -4
- package/node/loop/get-max-coordinate.js.map +1 -1
- package/node/loop.d.ts +1 -1
- package/node/loop.js +1 -4
- package/node/loop.js.map +1 -1
- package/node/mat/add-to-cp-graph.d.ts +5 -5
- package/node/mat/add-to-cp-graph.js +5 -8
- package/node/mat/add-to-cp-graph.js.map +1 -1
- package/node/mat/bezier-piece.d.ts +1 -1
- package/node/mat/bezier-piece.js +1 -2
- package/node/mat/closest-boundary-point/closest-points-on-curve.d.ts +1 -1
- package/node/mat/closest-boundary-point/closest-points-on-curve.js +15 -14
- package/node/mat/closest-boundary-point/closest-points-on-curve.js.map +1 -1
- package/node/mat/closest-boundary-point/cull-bezier-pieces.d.ts +1 -1
- package/node/mat/closest-boundary-point/cull-bezier-pieces.js +7 -10
- package/node/mat/closest-boundary-point/cull-bezier-pieces.js.map +1 -1
- package/node/mat/closest-boundary-point/cull-by-loose-bounding-box.d.ts +1 -1
- package/node/mat/closest-boundary-point/cull-by-loose-bounding-box.js +5 -8
- 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.d.ts +1 -1
- package/node/mat/closest-boundary-point/cull-by-tight-boundary-box.js +7 -8
- 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.d.ts +1 -1
- package/node/mat/closest-boundary-point/get-best-distance-squared.js +6 -9
- package/node/mat/closest-boundary-point/get-best-distance-squared.js.map +1 -1
- package/node/mat/closest-boundary-point/get-close-boundary-points.d.ts +2 -2
- package/node/mat/closest-boundary-point/get-close-boundary-points.js +9 -12
- package/node/mat/closest-boundary-point/get-close-boundary-points.js.map +1 -1
- package/node/mat/closest-boundary-point/get-closest-boundary-point.d.ts +3 -3
- package/node/mat/closest-boundary-point/get-closest-boundary-point.js +10 -13
- package/node/mat/closest-boundary-point/get-closest-boundary-point.js.map +1 -1
- package/node/mat/corner.js +1 -2
- package/node/mat/create-new-cp-tree.d.ts +3 -3
- package/node/mat/create-new-cp-tree.js +5 -7
- package/node/mat/create-new-cp-tree.js.map +1 -1
- package/node/mat/elem-type-two-prong.js +1 -2
- package/node/mat/find-mat/add-1-prong.d.ts +4 -4
- package/node/mat/find-mat/add-1-prong.js +9 -12
- package/node/mat/find-mat/add-1-prong.js.map +1 -1
- package/node/mat/find-mat/add-2-prong.d.ts +5 -5
- package/node/mat/find-mat/add-2-prong.js +19 -22
- package/node/mat/find-mat/add-2-prong.js.map +1 -1
- package/node/mat/find-mat/add-3-prong.d.ts +5 -5
- package/node/mat/find-mat/add-3-prong.js +7 -10
- package/node/mat/find-mat/add-3-prong.js.map +1 -1
- package/node/mat/find-mat/add-debug-info.d.ts +2 -2
- package/node/mat/find-mat/add-debug-info.js +8 -13
- package/node/mat/find-mat/add-debug-info.js.map +1 -1
- package/node/mat/find-mat/create-get-interesting-points-on-loop.d.ts +3 -3
- package/node/mat/find-mat/create-get-interesting-points-on-loop.js +29 -16
- package/node/mat/find-mat/create-get-interesting-points-on-loop.js.map +1 -1
- package/node/mat/find-mat/create-initial-cp-graph.d.ts +4 -4
- package/node/mat/find-mat/create-initial-cp-graph.js +7 -9
- package/node/mat/find-mat/create-initial-cp-graph.js.map +1 -1
- package/node/mat/find-mat/find-2-prong/add-debug-info.d.ts +5 -5
- package/node/mat/find-mat/find-2-prong/add-debug-info.js +3 -6
- 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.d.ts +1 -1
- package/node/mat/find-mat/find-2-prong/cull-bezier-pieces.js +5 -8
- 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.d.ts +5 -5
- package/node/mat/find-mat/find-2-prong/find-2-prong.js +37 -39
- 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 +1 -4
- 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.d.ts +5 -5
- package/node/mat/find-mat/find-2-prong/get-initial-bezier-pieces.js +7 -10
- 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-2-prong/x-for-debugging.js +1 -2
- package/node/mat/find-mat/find-3-prong/calc-better-x.d.ts +2 -2
- package/node/mat/find-mat/find-3-prong/calc-better-x.js +10 -13
- 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.d.ts +2 -2
- package/node/mat/find-mat/find-3-prong/calc-initial-3-prong-center.js +6 -8
- 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.d.ts +3 -3
- package/node/mat/find-mat/find-3-prong/find-3-prong-for-delta3s.js +29 -32
- 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.d.ts +3 -3
- package/node/mat/find-mat/find-3-prong/find-3-prong.js +14 -12
- 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.d.ts +2 -2
- package/node/mat/find-mat/find-3-prong/get-closest-points.js +3 -6
- 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.d.ts +4 -4
- package/node/mat/find-mat/find-and-add-2-prongs-on-all-paths.js +3 -6
- 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.d.ts +4 -4
- package/node/mat/find-mat/find-and-add-2-prongs.js +9 -12
- package/node/mat/find-mat/find-and-add-2-prongs.js.map +1 -1
- package/node/mat/find-mat/find-and-add-3-prongs.d.ts +3 -3
- package/node/mat/find-mat/find-and-add-3-prongs.js +8 -11
- 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.d.ts +3 -3
- package/node/mat/find-mat/find-and-add-hole-closing-2-prongs.js +11 -14
- 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.d.ts +1 -1
- package/node/mat/find-mat/get-potential-2-prongs.js +3 -6
- package/node/mat/find-mat/get-potential-2-prongs.js.map +1 -1
- package/node/mat/find-mat/get-sharp-corners.d.ts +1 -1
- package/node/mat/find-mat/get-sharp-corners.js +3 -6
- package/node/mat/find-mat/get-sharp-corners.js.map +1 -1
- package/node/mat/geometry/get-closest-square-distance-to-rect.js +21 -15
- package/node/mat/geometry/get-closest-square-distance-to-rect.js.map +1 -1
- package/node/mat/geometry/get-closest-squared-distance-to-rotated-rect.js +5 -8
- package/node/mat/geometry/get-closest-squared-distance-to-rotated-rect.js.map +1 -1
- package/node/mat/get-boundary-piece-beziers.d.ts +2 -2
- package/node/mat/get-boundary-piece-beziers.js +6 -9
- package/node/mat/get-boundary-piece-beziers.js.map +1 -1
- package/node/mat/get-contact-circles-at-interface.d.ts +2 -2
- package/node/mat/get-contact-circles-at-interface.js +7 -10
- package/node/mat/get-contact-circles-at-interface.js.map +1 -1
- package/node/mat/get-largest-vertex.d.ts +1 -1
- package/node/mat/get-largest-vertex.js +1 -4
- package/node/mat/get-largest-vertex.js.map +1 -1
- package/node/mat/get-leaves.d.ts +1 -1
- package/node/mat/get-leaves.js +1 -4
- package/node/mat/get-leaves.js.map +1 -1
- package/node/mat/get-neighboring-cps.d.ts +3 -3
- package/node/mat/get-neighboring-cps.js +5 -8
- package/node/mat/get-neighboring-cps.js.map +1 -1
- package/node/mat/get-two-prong-type.d.ts +2 -2
- package/node/mat/get-two-prong-type.js +1 -4
- package/node/mat/get-two-prong-type.js.map +1 -1
- package/node/mat/is-another-cp-closeby.d.ts +5 -5
- package/node/mat/is-another-cp-closeby.js +8 -11
- package/node/mat/is-another-cp-closeby.js.map +1 -1
- package/node/mat/simplify-mat-map-only.d.ts +1 -1
- package/node/mat/simplify-mat-map-only.js +10 -14
- package/node/mat/simplify-mat-map-only.js.map +1 -1
- package/node/mat/to-scale-axis/add-debug-info.d.ts +1 -1
- package/node/mat/to-scale-axis/add-debug-info.js +1 -4
- package/node/mat/to-scale-axis/add-debug-info.js.map +1 -1
- package/node/mat/to-scale-axis/cull-non-cycles.d.ts +1 -1
- package/node/mat/to-scale-axis/cull-non-cycles.js +5 -8
- package/node/mat/to-scale-axis/cull-non-cycles.js.map +1 -1
- package/node/mat/to-scale-axis/cull.d.ts +2 -2
- package/node/mat/to-scale-axis/cull.js +75 -8
- package/node/mat/to-scale-axis/cull.js.map +1 -1
- package/node/mat/trim-mat.d.ts +1 -1
- package/node/mat/trim-mat.js +6 -9
- package/node/mat/trim-mat.js.map +1 -1
- package/node/mat.d.ts +3 -3
- package/node/mat.js +1 -2
- package/node/point-on-shape.d.ts +2 -2
- package/node/point-on-shape.js +23 -34
- package/node/point-on-shape.js.map +1 -1
- package/node/simplify-mat.d.ts +4 -3
- package/node/simplify-mat.js +14 -16
- package/node/simplify-mat.js.map +1 -1
- package/node/svg/get-loop-bounds.d.ts +2 -2
- package/node/svg/get-loop-bounds.js +11 -13
- package/node/svg/get-loop-bounds.js.map +1 -1
- package/node/svg/get-min-y-pos.d.ts +3 -2
- package/node/svg/get-min-y-pos.js +3 -6
- package/node/svg/get-min-y-pos.js.map +1 -1
- package/node/svg/get-shape-bounds.d.ts +5 -5
- package/node/svg/get-shape-bounds.js +5 -8
- package/node/svg/get-shape-bounds.js.map +1 -1
- package/node/sweep-line/sweep-line.js +1 -4
- package/node/sweep-line/sweep-line.js.map +1 -1
- package/node/to-scale-axis.d.ts +2 -1
- package/node/to-scale-axis.js +18 -21
- package/node/to-scale-axis.js.map +1 -1
- package/node/traverse-edges.d.ts +1 -1
- package/node/traverse-edges.js +1 -4
- package/node/traverse-edges.js.map +1 -1
- package/node/traverse-vertices.d.ts +1 -1
- package/node/traverse-vertices.js +1 -4
- package/node/traverse-vertices.js.map +1 -1
- package/package.json +34 -31
- package/src/circle.ts +0 -6
- package/src/compare-curvatures-at-interface.ts +197 -0
- package/src/contact-point.ts +2 -3
- package/src/cp-node/clone.ts +1 -2
- package/src/cp-node/remove.ts +2 -3
- package/src/cp-node.ts +6 -8
- package/src/curve.ts +3 -4
- package/src/debug/cp-node-for-debugging.ts +2 -3
- package/src/debug/debug-elem-types.ts +8 -10
- package/src/debug/debug.ts +22 -17
- package/src/debug/functions/draw-elem/bounding-hull.ts +0 -1
- package/src/debug/functions/draw-elem/branch.ts +2 -3
- package/src/debug/functions/draw-elem/culls.ts +1 -2
- package/src/debug/functions/draw-elem/draw-elem.ts +18 -19
- package/src/debug/functions/draw-elem/dull-corner.ts +3 -3
- package/src/debug/functions/draw-elem/leaves.ts +2 -4
- package/src/debug/functions/draw-elem/loop.ts +1 -2
- package/src/debug/functions/draw-elem/loops.ts +1 -2
- package/src/debug/functions/draw-elem/loose-bounding-box.ts +0 -1
- package/src/debug/functions/draw-elem/mat.ts +3 -5
- package/src/debug/functions/draw-elem/max-vertex.ts +1 -2
- package/src/debug/functions/draw-elem/min-y.ts +5 -7
- package/src/debug/functions/draw-elem/one-prong-at-dull-corner.ts +1 -2
- package/src/debug/functions/draw-elem/one-prong.ts +2 -3
- package/src/debug/functions/draw-elem/sharp-corner.ts +1 -2
- package/src/debug/functions/draw-elem/three-prong.ts +2 -4
- package/src/debug/functions/draw-elem/tight-bounding-box.ts +0 -1
- package/src/debug/functions/draw-elem/two-prong.ts +2 -3
- package/src/debug/functions/draw-elem/vertex.ts +1 -2
- package/src/debug/functions/general.ts +2 -3
- package/src/debug/functions/three-prong.ts +3 -4
- package/src/debug/functions/two-prong.ts +6 -14
- package/src/debug/three-prong-for-debugging.ts +4 -5
- package/src/debug/two-prong-for-debugging.ts +5 -6
- package/src/find-mats.ts +34 -39
- package/src/get-boundary-bezier-parts-to-next.ts +5 -6
- package/src/get-boundary-beziers-to-next.ts +8 -7
- package/src/get-bounding-box-.ts +7 -0
- package/src/get-branches.ts +2 -3
- package/src/get-curve/get-curve-between.ts +2 -3
- package/src/get-curve/get-edge-direction.ts +2 -5
- package/src/get-curve-to-next.ts +2 -3
- package/src/get-interface-ccw.ts +112 -0
- package/src/index.ts +34 -48
- package/src/loop/get-max-coordinate.ts +0 -1
- package/src/loop.ts +1 -2
- package/src/mat/add-to-cp-graph.ts +7 -8
- package/src/mat/bezier-piece.ts +1 -2
- package/src/mat/closest-boundary-point/closest-points-on-curve.ts +19 -17
- package/src/mat/closest-boundary-point/cull-bezier-pieces.ts +4 -5
- package/src/mat/closest-boundary-point/cull-by-loose-bounding-box.ts +4 -5
- package/src/mat/closest-boundary-point/cull-by-tight-boundary-box.ts +7 -5
- package/src/mat/closest-boundary-point/get-best-distance-squared.ts +1 -2
- package/src/mat/closest-boundary-point/get-close-boundary-points.ts +4 -11
- package/src/mat/closest-boundary-point/get-closest-boundary-point.ts +5 -6
- package/src/mat/cmp-cp-on-delta.ts +2 -3
- package/src/mat/create-new-cp-tree.ts +5 -5
- package/src/mat/find-mat/add-1-prong.ts +7 -8
- package/src/mat/find-mat/add-2-prong.ts +11 -12
- package/src/mat/find-mat/add-3-prong.ts +7 -8
- package/src/mat/find-mat/add-debug-info.ts +8 -7
- package/src/mat/find-mat/create-get-interesting-points-on-loop.ts +22 -8
- package/src/mat/find-mat/create-initial-cp-graph.ts +7 -8
- package/src/mat/find-mat/find-2-prong/add-debug-info.ts +9 -10
- package/src/mat/find-mat/find-2-prong/cull-bezier-pieces.ts +4 -7
- package/src/mat/find-mat/find-2-prong/find-2-prong.ts +19 -17
- package/src/mat/find-mat/find-2-prong/get-initial-bezier-pieces.ts +7 -8
- package/src/mat/find-mat/find-2-prong/x-for-debugging.ts +1 -2
- package/src/mat/find-mat/find-3-prong/calc-better-x.ts +3 -6
- package/src/mat/find-mat/find-3-prong/calc-initial-3-prong-center.ts +3 -8
- package/src/mat/find-mat/find-3-prong/find-3-prong-for-delta3s.ts +10 -14
- package/src/mat/find-mat/find-3-prong/find-3-prong.ts +13 -8
- package/src/mat/find-mat/find-3-prong/get-closest-points.ts +2 -5
- package/src/mat/find-mat/find-and-add-2-prongs-on-all-paths.ts +5 -6
- package/src/mat/find-mat/find-and-add-2-prongs.ts +9 -10
- package/src/mat/find-mat/find-and-add-3-prongs.ts +8 -9
- package/src/mat/find-mat/find-and-add-hole-closing-2-prongs.ts +7 -8
- package/src/mat/find-mat/get-potential-2-prongs.ts +1 -2
- package/src/mat/find-mat/get-sharp-corners.ts +1 -2
- package/src/mat/find-mat/get-total-abs-curvature.ts +2 -3
- package/src/mat/find-mat/get-total-by.ts +2 -3
- package/src/mat/geometry/get-closest-square-distance-to-rect.ts +15 -4
- package/src/mat/geometry/get-closest-squared-distance-to-rotated-rect.ts +0 -1
- package/src/mat/get-boundary-piece-beziers.ts +5 -6
- package/src/mat/get-contact-circles-at-interface.ts +3 -4
- package/src/mat/get-edges-as-array.ts +2 -3
- package/src/mat/get-largest-three-prong.ts +1 -2
- package/src/mat/get-largest-vertex.ts +1 -2
- package/src/mat/get-leaves.ts +1 -2
- package/src/mat/get-neighboring-cps.ts +5 -6
- package/src/mat/get-two-prong-type.ts +2 -3
- package/src/mat/is-another-cp-closeby.ts +6 -7
- package/src/mat/simplify-mat-map-only.ts +5 -7
- package/src/mat/to-scale-axis/add-debug-info.ts +2 -3
- package/src/mat/to-scale-axis/add-to-tree.ts +3 -4
- package/src/mat/to-scale-axis/calc-groups.ts +1 -2
- package/src/mat/to-scale-axis/create-spacial-tree.ts +3 -4
- package/src/mat/to-scale-axis/cull-non-cycles.ts +2 -3
- package/src/mat/to-scale-axis/cull.ts +3 -4
- package/src/mat/to-scale-axis/get-engulfed-vertices.ts +3 -4
- package/src/mat/to-scale-axis/t-tree.ts +1 -2
- package/src/mat/to-scale-axis/traverse-spacial-tree.ts +2 -4
- package/src/mat/trim-mat.ts +4 -5
- package/src/mat.ts +3 -5
- package/src/point-on-shape.ts +10 -12
- package/src/simplify-mat.ts +11 -13
- package/src/svg/get-curvature-at-interface.ts +1 -3
- package/src/svg/get-extreme.ts +2 -3
- package/src/svg/get-loop-bounds.ts +4 -4
- package/src/svg/get-min-y-pos.ts +2 -6
- package/src/svg/get-shape-bounds.ts +2 -3
- package/src/sweep-line/are-boxes-intersecting.ts +1 -1
- package/src/to-scale-axis.ts +15 -16
- package/src/traverse-edges.ts +1 -2
- package/src/traverse-vertices.ts +1 -2
- package/test/lib-load.spec.ts +0 -1
- package/tsconfig.json +6 -31
- package/webpack.config.cjs +132 -0
- package/.nycrc +0 -4
- package/node/mat/cmp-cp-on-delta.d.ts +0 -14
- package/node/mat/cmp-cp-on-delta.js +0 -45
- package/node/mat/cmp-cp-on-delta.js.map +0 -1
- package/node/mat/find-mat/get-total-abs-curvature.d.ts +0 -5
- package/node/mat/find-mat/get-total-abs-curvature.js +0 -13
- package/node/mat/find-mat/get-total-abs-curvature.js.map +0 -1
- package/node/mat/find-mat/get-total-by.d.ts +0 -10
- package/node/mat/find-mat/get-total-by.js +0 -22
- package/node/mat/find-mat/get-total-by.js.map +0 -1
- package/node/mat/get-edges-as-array.d.ts +0 -4
- package/node/mat/get-edges-as-array.js +0 -12
- package/node/mat/get-edges-as-array.js.map +0 -1
- package/node/mat/get-largest-three-prong.d.ts +0 -4
- package/node/mat/get-largest-three-prong.js +0 -13
- package/node/mat/get-largest-three-prong.js.map +0 -1
- package/node/mat/to-scale-axis/add-to-tree.d.ts +0 -13
- package/node/mat/to-scale-axis/add-to-tree.js +0 -39
- package/node/mat/to-scale-axis/add-to-tree.js.map +0 -1
- package/node/mat/to-scale-axis/calc-groups.d.ts +0 -28
- package/node/mat/to-scale-axis/calc-groups.js +0 -66
- package/node/mat/to-scale-axis/calc-groups.js.map +0 -1
- package/node/mat/to-scale-axis/create-spacial-tree.d.ts +0 -9
- package/node/mat/to-scale-axis/create-spacial-tree.js +0 -24
- package/node/mat/to-scale-axis/create-spacial-tree.js.map +0 -1
- package/node/mat/to-scale-axis/get-engulfed-vertices.d.ts +0 -12
- package/node/mat/to-scale-axis/get-engulfed-vertices.js +0 -95
- package/node/mat/to-scale-axis/get-engulfed-vertices.js.map +0 -1
- package/node/mat/to-scale-axis/t-tree.d.ts +0 -6
- package/node/mat/to-scale-axis/t-tree.js +0 -3
- package/node/mat/to-scale-axis/t-tree.js.map +0 -1
- package/node/mat/to-scale-axis/traverse-spacial-tree.d.ts +0 -11
- package/node/mat/to-scale-axis/traverse-spacial-tree.js +0 -25
- package/node/mat/to-scale-axis/traverse-spacial-tree.js.map +0 -1
- package/node/svg/get-curvature-at-interface.d.ts +0 -9
- package/node/svg/get-curvature-at-interface.js +0 -49
- package/node/svg/get-curvature-at-interface.js.map +0 -1
- package/node/svg/get-extreme.d.ts +0 -9
- package/node/svg/get-extreme.js +0 -16
- package/node/svg/get-extreme.js.map +0 -1
- package/node/sweep-line/are-boxes-intersecting.d.ts +0 -11
- package/node/sweep-line/are-boxes-intersecting.js +0 -42
- package/node/sweep-line/are-boxes-intersecting.js.map +0 -1
- package/test/mocha.opts +0 -4
- package/webpack.config.js +0 -25
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import LlRbTree from 'flo-ll-rb-tree';
|
|
2
|
-
import { BezierPiece } from '../../bezier-piece';
|
|
3
|
-
import { Loop } from '../../../loop';
|
|
4
|
-
import { CpNode } from '../../../cp-node';
|
|
5
|
-
import { IPointOnShape } from '../../../point-on-shape';
|
|
1
|
+
import { LlRbTree } from 'flo-ll-rb-tree';
|
|
2
|
+
import { BezierPiece } from '../../bezier-piece.js';
|
|
3
|
+
import { Loop } from '../../../loop.js';
|
|
4
|
+
import { CpNode } from '../../../cp-node.js';
|
|
5
|
+
import { IPointOnShape } from '../../../point-on-shape.js';
|
|
6
6
|
/** @hidden */
|
|
7
7
|
declare function getInitialBezierPieces(isHoleClosing: boolean, k: number, loops: Loop[], cpTrees: Map<Loop, LlRbTree<CpNode>>, y: IPointOnShape): {
|
|
8
8
|
bezierPieces: BezierPiece[];
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const get_neighboring_cps_1 = require("../../get-neighboring-cps");
|
|
5
|
-
const get_boundary_piece_beziers_1 = require("../../get-boundary-piece-beziers");
|
|
6
|
-
const point_on_shape_1 = require("../../../point-on-shape");
|
|
1
|
+
import { getNeighbouringPoints } from '../../get-neighboring-cps.js';
|
|
2
|
+
import { getBoundaryPieceBeziers } from '../../get-boundary-piece-beziers.js';
|
|
3
|
+
import { isPosDullCorner } from '../../../point-on-shape.js';
|
|
7
4
|
/** @hidden */
|
|
8
5
|
function getInitialBezierPieces(isHoleClosing, k, loops, cpTrees, y) {
|
|
9
6
|
let bezierPieces;
|
|
@@ -18,11 +15,11 @@ function getInitialBezierPieces(isHoleClosing, k, loops, cpTrees, y) {
|
|
|
18
15
|
}
|
|
19
16
|
else {
|
|
20
17
|
//let order = PointOnShape.isDullCorner(y)
|
|
21
|
-
let order =
|
|
18
|
+
let order = isPosDullCorner(y)
|
|
22
19
|
? y.t === 1 ? -1 : +1
|
|
23
20
|
: 0;
|
|
24
21
|
let loop = loops[k];
|
|
25
|
-
let cpNode =
|
|
22
|
+
let cpNode = getNeighbouringPoints(cpTrees.get(loop), y, order, 0)[0];
|
|
26
23
|
δ = [cpNode, cpNode];
|
|
27
24
|
if (!cpNode ||
|
|
28
25
|
// The special case if there is only a single sharp corner or
|
|
@@ -32,10 +29,10 @@ function getInitialBezierPieces(isHoleClosing, k, loops, cpTrees, y) {
|
|
|
32
29
|
.map(curve => ({ curve, ts: [0, 1] }));
|
|
33
30
|
}
|
|
34
31
|
else {
|
|
35
|
-
bezierPieces =
|
|
32
|
+
bezierPieces = getBoundaryPieceBeziers(δ);
|
|
36
33
|
}
|
|
37
34
|
}
|
|
38
35
|
return { bezierPieces, δ };
|
|
39
36
|
}
|
|
40
|
-
|
|
37
|
+
export { getInitialBezierPieces };
|
|
41
38
|
//# sourceMappingURL=get-initial-bezier-pieces.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-initial-bezier-pieces.js","sourceRoot":"","sources":["../../../../src/mat/find-mat/find-2-prong/get-initial-bezier-pieces.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-initial-bezier-pieces.js","sourceRoot":"","sources":["../../../../src/mat/find-mat/find-2-prong/get-initial-bezier-pieces.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAI9E,OAAO,EAAE,eAAe,EAAiB,MAAM,4BAA4B,CAAC;AAG5E,cAAc;AACd,SAAS,sBAAsB,CACvB,aAAsB,EACtB,C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AAA;SAC5C;aAAM;YACH,YAAY,GAAG,uBAAuB,CAAC,CAAC,CAAC,CAAC;SAC7C;KACJ;IAED,OAAO,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;AAC/B,CAAC;AAGD,OAAO,EAAE,sBAAsB,EAAE,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IPointOnShape } from '../../../point-on-shape';
|
|
2
|
-
import { BezierPiece } from '../../bezier-piece';
|
|
1
|
+
import { IPointOnShape } from '../../../point-on-shape.js';
|
|
2
|
+
import { BezierPiece } from '../../bezier-piece.js';
|
|
3
3
|
/**
|
|
4
4
|
* @hidden
|
|
5
5
|
* Find new x and ps that are a better estimate of the 3-prong circle.
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.calcBetterX = void 0;
|
|
4
|
-
const flo_vector2d_1 = require("flo-vector2d");
|
|
5
|
-
const get_closest_points_1 = require("./get-closest-points");
|
|
1
|
+
import { fromTo, circumCenter, len, scale, translate } from 'flo-vector2d';
|
|
2
|
+
import { getClosestPoints } from './get-closest-points.js';
|
|
6
3
|
/**
|
|
7
4
|
* @hidden
|
|
8
5
|
* Find new x and ps that are a better estimate of the 3-prong circle.
|
|
@@ -15,7 +12,7 @@ const get_closest_points_1 = require("./get-closest-points");
|
|
|
15
12
|
* @param extreme
|
|
16
13
|
*/
|
|
17
14
|
function calcBetterX(bezierPiece3s, x, vectorToZeroV) {
|
|
18
|
-
let V =
|
|
15
|
+
let V = len(vectorToZeroV);
|
|
19
16
|
let nu = 1;
|
|
20
17
|
let better;
|
|
21
18
|
let newX;
|
|
@@ -23,18 +20,18 @@ function calcBetterX(bezierPiece3s, x, vectorToZeroV) {
|
|
|
23
20
|
let newV;
|
|
24
21
|
let i = 0; // Safeguard
|
|
25
22
|
do {
|
|
26
|
-
let shift =
|
|
27
|
-
newX =
|
|
28
|
-
newPs =
|
|
23
|
+
let shift = scale(vectorToZeroV, nu);
|
|
24
|
+
newX = translate(shift, x);
|
|
25
|
+
newPs = getClosestPoints(newX, bezierPiece3s);
|
|
29
26
|
// Point of zero V
|
|
30
|
-
let newCircleCenter =
|
|
31
|
-
let newVectorToZeroV =
|
|
32
|
-
newV =
|
|
27
|
+
let newCircleCenter = circumCenter(newPs.map(pos => pos.p));
|
|
28
|
+
let newVectorToZeroV = fromTo(newX, newCircleCenter);
|
|
29
|
+
newV = len(newVectorToZeroV);
|
|
33
30
|
better = newV < V;
|
|
34
31
|
nu = nu / 2;
|
|
35
32
|
i++;
|
|
36
33
|
} while (!better && i < 3);
|
|
37
34
|
return { newX, newV, newPs };
|
|
38
35
|
}
|
|
39
|
-
|
|
36
|
+
export { calcBetterX };
|
|
40
37
|
//# sourceMappingURL=calc-better-x.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calc-better-x.js","sourceRoot":"","sources":["../../../../src/mat/find-mat/find-3-prong/calc-better-x.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"calc-better-x.js","sourceRoot":"","sources":["../../../../src/mat/find-mat/find-3-prong/calc-better-x.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAG3D;;;;;;;;;;GAUG;AACH,SAAS,WAAW,CACZ,aAA8B,EAC9B,CAAW,EACX,aAAuB;IAE3B,IAAI,CAAC,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;IAE3B,IAAI,EAAE,GAAG,CAAC,CAAC;IACX,IAAI,MAAM,CAAC;IACX,IAAI,IAAI,CAAC;IACT,IAAI,KAAsB,CAAC;IAC3B,IAAI,IAAI,CAAC;IACT,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY;IACvB,GAAG;QACC,IAAI,KAAK,GAAG,KAAK,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;QACrC,IAAI,GAAG,SAAS,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAG3B,KAAK,GAAG,gBAAgB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;QAE9C,kBAAkB;QAClB,IAAI,eAAe,GAAG,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5D,IAAI,gBAAgB,GAAG,MAAM,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QACrD,IAAI,GAAG,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAE7B,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC;QAElB,EAAE,GAAG,EAAE,GAAC,CAAC,CAAC;QAEV,CAAC,EAAE,CAAC;KACP,QAAQ,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,EAAE;IAE3B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAA;AAChC,CAAC;AAGD,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CpNode } from '../../../cp-node';
|
|
2
|
-
import { BezierPiece } from '../../bezier-piece';
|
|
1
|
+
import { CpNode } from '../../../cp-node.js';
|
|
2
|
+
import { BezierPiece } from '../../bezier-piece.js';
|
|
3
3
|
/**
|
|
4
4
|
* @hidden
|
|
5
5
|
* Finds an initial 3-prong circle center point from which to iterate. The point
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const flo_vector2d_1 = require("flo-vector2d");
|
|
5
|
-
const get_closest_boundary_point_1 = require("../../closest-boundary-point/get-closest-boundary-point");
|
|
1
|
+
/** @hidden */
|
|
2
|
+
import { circumCenter } from 'flo-vector2d';
|
|
3
|
+
import { getClosestBoundaryPoint } from '../../closest-boundary-point/get-closest-boundary-point.js';
|
|
6
4
|
/**
|
|
7
5
|
* @hidden
|
|
8
6
|
* Finds an initial 3-prong circle center point from which to iterate. The point
|
|
@@ -14,7 +12,7 @@ const get_closest_boundary_point_1 = require("../../closest-boundary-point/get-c
|
|
|
14
12
|
*/
|
|
15
13
|
function calcInitial3ProngCenter(δ3s, bezierPiece3s) {
|
|
16
14
|
let twoProngCircleCenter = δ3s[0][0].cp.circle.center;
|
|
17
|
-
let posInfo =
|
|
15
|
+
let posInfo = getClosestBoundaryPoint(bezierPiece3s[1], twoProngCircleCenter, undefined, // curve
|
|
18
16
|
undefined // t
|
|
19
17
|
);
|
|
20
18
|
let meanPoints = [
|
|
@@ -22,7 +20,7 @@ function calcInitial3ProngCenter(δ3s, bezierPiece3s) {
|
|
|
22
20
|
posInfo.pos.p,
|
|
23
21
|
δ3s[2][1].cp.pointOnShape.p,
|
|
24
22
|
];
|
|
25
|
-
return
|
|
23
|
+
return circumCenter(meanPoints);
|
|
26
24
|
}
|
|
27
|
-
|
|
25
|
+
export { calcInitial3ProngCenter };
|
|
28
26
|
//# sourceMappingURL=calc-initial-3-prong-center.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calc-initial-3-prong-center.js","sourceRoot":"","sources":["../../../../src/mat/find-mat/find-3-prong/calc-initial-3-prong-center.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"calc-initial-3-prong-center.js","sourceRoot":"","sources":["../../../../src/mat/find-mat/find-3-prong/calc-initial-3-prong-center.ts"],"names":[],"mappings":"AAAA,cAAc;AACd,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,4DAA4D,CAAC;AAGrG;;;;;;;;GAQG;AACH,SAAS,uBAAuB,CACxB,GAAe,EACf,aAA8B;IAElC,IAAI,oBAAoB,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;IAEtD,IAAI,OAAO,GAAG,uBAAuB,CAC7B,aAAa,CAAC,CAAC,CAAC,EAChB,oBAAoB,EACpB,SAAS,EAAE,QAAQ;IACnB,SAAS,CAAE,IAAI;KACtB,CAAC;IAEF,IAAI,UAAU,GAAG;QACb,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,CAAC;QACb,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC;KAC9B,CAAC;IAEF,OAAO,YAAY,CAAC,UAAU,CAAC,CAAC;AACpC,CAAC;AAGD,OAAO,EAAE,uBAAuB,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CpNode } from '../../../cp-node';
|
|
2
|
-
import { BezierPiece } from '../../bezier-piece';
|
|
3
|
-
import { IPointOnShape } from '../../../point-on-shape';
|
|
1
|
+
import { CpNode } from '../../../cp-node.js';
|
|
2
|
+
import { BezierPiece } from '../../bezier-piece.js';
|
|
3
|
+
import { IPointOnShape } from '../../../point-on-shape.js';
|
|
4
4
|
/**
|
|
5
5
|
* @hidden
|
|
6
6
|
* Finds a 3-prong using only the 3 given δs.
|
|
@@ -1,16 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const get_closest_points_1 = require("./get-closest-points");
|
|
10
|
-
const calc_better_x_1 = require("./calc-better-x");
|
|
11
|
-
const curve_1 = require("../../../curve");
|
|
1
|
+
import { fromTo, circumCenter, len, distanceBetween, toUnitVector, rotate90Degrees, cross } from 'flo-vector2d';
|
|
2
|
+
import { tangent } from 'flo-bezier3';
|
|
3
|
+
import { isPosDullCorner } from '../../../point-on-shape.js';
|
|
4
|
+
import { getClosestBoundaryPoint } from '../../closest-boundary-point/get-closest-boundary-point.js';
|
|
5
|
+
import { calcInitial3ProngCenter } from './calc-initial-3-prong-center.js';
|
|
6
|
+
import { getClosestPoints } from './get-closest-points.js';
|
|
7
|
+
import { calcBetterX } from './calc-better-x.js';
|
|
8
|
+
import { getCornerAtEnd } from '../../../curve.js';
|
|
12
9
|
/** @hidden */
|
|
13
|
-
const calcVectorToZeroV_StraightToIt =
|
|
10
|
+
const calcVectorToZeroV_StraightToIt = fromTo;
|
|
14
11
|
/**
|
|
15
12
|
* @hidden
|
|
16
13
|
* Finds a 3-prong using only the 3 given δs.
|
|
@@ -51,7 +48,7 @@ function find3ProngForDelta3s(δs, idx, k, bezierPiecess, extreme) {
|
|
|
51
48
|
let ps;
|
|
52
49
|
let circumCenter_;
|
|
53
50
|
let j = 0; // Safeguard for slow convergence
|
|
54
|
-
let x =
|
|
51
|
+
let x = calcInitial3ProngCenter(δ3s, bezierPiece3s);
|
|
55
52
|
if (typeof _debug_ !== 'undefined') {
|
|
56
53
|
let threeProngs = _debug_.generated.elems.threeProng;
|
|
57
54
|
let d = threeProngs[threeProngs.length - 1];
|
|
@@ -61,7 +58,7 @@ function find3ProngForDelta3s(δs, idx, k, bezierPiecess, extreme) {
|
|
|
61
58
|
let tolerance = Number.POSITIVE_INFINITY;
|
|
62
59
|
while (tolerance > TOLERANCE && j < MAX_ITERATIONS) {
|
|
63
60
|
j++;
|
|
64
|
-
ps =
|
|
61
|
+
ps = getClosestPoints(x, bezierPiece3s);
|
|
65
62
|
if (!Number.isFinite(x[0]) || !Number.isFinite(x[1])) {
|
|
66
63
|
// TODO - the code can be cleaned up and sped up a lot if we don't
|
|
67
64
|
// use this function as is but instead use δs[0] and δs[2] as is
|
|
@@ -69,7 +66,7 @@ function find3ProngForDelta3s(δs, idx, k, bezierPiecess, extreme) {
|
|
|
69
66
|
// loop. This check, for instance, would be eliminated completely.
|
|
70
67
|
return undefined;
|
|
71
68
|
}
|
|
72
|
-
circumCenter_ =
|
|
69
|
+
circumCenter_ = circumCenter(ps.map(x => x.p));
|
|
73
70
|
let vectorToZeroV = calcVectorToZeroV_StraightToIt(x, circumCenter_);
|
|
74
71
|
if (!Number.isFinite(vectorToZeroV[0]) || !Number.isFinite(vectorToZeroV[1])) {
|
|
75
72
|
// TODO - the code can be cleaned up and sped up a lot if we don't
|
|
@@ -78,7 +75,7 @@ function find3ProngForDelta3s(δs, idx, k, bezierPiecess, extreme) {
|
|
|
78
75
|
// loop. This check, for instance, would be eliminated completely.
|
|
79
76
|
return undefined;
|
|
80
77
|
}
|
|
81
|
-
let upds =
|
|
78
|
+
let upds = calcBetterX(bezierPiece3s, x, vectorToZeroV);
|
|
82
79
|
x = upds.newX;
|
|
83
80
|
ps = upds.newPs;
|
|
84
81
|
if (typeof _debug_ !== 'undefined') {
|
|
@@ -87,12 +84,12 @@ function find3ProngForDelta3s(δs, idx, k, bezierPiecess, extreme) {
|
|
|
87
84
|
let trace = d.traces[d.traces.length - 1];
|
|
88
85
|
trace.push(x);
|
|
89
86
|
}
|
|
90
|
-
let V =
|
|
87
|
+
let V = len(vectorToZeroV); // The 'potential'
|
|
91
88
|
tolerance = Math.abs(V - upds.newV);
|
|
92
89
|
}
|
|
93
|
-
let radius = (
|
|
94
|
-
|
|
95
|
-
|
|
90
|
+
let radius = (distanceBetween(x, ps[0].p) +
|
|
91
|
+
distanceBetween(x, ps[1].p) +
|
|
92
|
+
distanceBetween(x, ps[2].p)) / 3;
|
|
96
93
|
let circle = { center: x, radius };
|
|
97
94
|
//-------------------------------------------------------------------------
|
|
98
95
|
// Calculate the unit tangent vector at 3-prong circle points - they should
|
|
@@ -105,19 +102,19 @@ function find3ProngForDelta3s(δs, idx, k, bezierPiecess, extreme) {
|
|
|
105
102
|
//----------------------------
|
|
106
103
|
// Tangent of circle at point
|
|
107
104
|
//----------------------------
|
|
108
|
-
let v =
|
|
109
|
-
let v1 =
|
|
105
|
+
let v = toUnitVector(fromTo(p.p, x));
|
|
106
|
+
let v1 = rotate90Degrees(v);
|
|
110
107
|
//-----------------------------------
|
|
111
108
|
// Check if point is on dull crorner
|
|
112
109
|
//-----------------------------------
|
|
113
110
|
//if (PointOnShape.isDullCorner(p)) {
|
|
114
|
-
if (
|
|
111
|
+
if (isPosDullCorner(p)) {
|
|
115
112
|
//let corner = Curve.getCornerAtEnd(p.curve);
|
|
116
|
-
let corner =
|
|
113
|
+
let corner = getCornerAtEnd(p.curve);
|
|
117
114
|
let tans = corner.tangents;
|
|
118
|
-
let perps = tans.map(
|
|
119
|
-
let angleError1 = Math.asin(
|
|
120
|
-
let angleError2 = Math.asin(
|
|
115
|
+
let perps = tans.map(rotate90Degrees);
|
|
116
|
+
let angleError1 = Math.asin(cross(perps[0], v));
|
|
117
|
+
let angleError2 = Math.asin(cross(v, perps[1]));
|
|
121
118
|
let angleError = 0;
|
|
122
119
|
if (angleError1 > 0) {
|
|
123
120
|
angleError += angleError1;
|
|
@@ -131,13 +128,13 @@ function find3ProngForDelta3s(δs, idx, k, bezierPiecess, extreme) {
|
|
|
131
128
|
//---------------------------
|
|
132
129
|
// Tangent of curve at point
|
|
133
130
|
//---------------------------
|
|
134
|
-
let v2 =
|
|
131
|
+
let v2 = toUnitVector(tangent(p.curve.ps, p.t));
|
|
135
132
|
// Cross is more numerically stable than Vector.dot at angles a
|
|
136
133
|
// multiple of Math.PI **and** is close to the actual angle value
|
|
137
134
|
// and can thus just be added to cone method of looking at
|
|
138
135
|
// tolerance.
|
|
139
136
|
// Should be close to zero and is close to the actual angle.
|
|
140
|
-
let cross_ = Math.abs(Math.asin(
|
|
137
|
+
let cross_ = Math.abs(Math.asin(cross(v1, v2)));
|
|
141
138
|
totalAngleError += cross_;
|
|
142
139
|
}
|
|
143
140
|
}
|
|
@@ -148,8 +145,8 @@ function find3ProngForDelta3s(δs, idx, k, bezierPiecess, extreme) {
|
|
|
148
145
|
//-------------------------------------------------------------------------
|
|
149
146
|
let closestDs = [];
|
|
150
147
|
for (let i = 0; i < bezierPiecess.length; i++) {
|
|
151
|
-
let p =
|
|
152
|
-
closestDs.push(
|
|
148
|
+
let p = getClosestBoundaryPoint(bezierPiecess[i], x, undefined, undefined);
|
|
149
|
+
closestDs.push(distanceBetween(p.pos.p, x));
|
|
153
150
|
}
|
|
154
151
|
let closestD = Math.min(...closestDs);
|
|
155
152
|
let radiusDelta = Math.abs(radius - closestD);
|
|
@@ -159,5 +156,5 @@ function find3ProngForDelta3s(δs, idx, k, bezierPiecess, extreme) {
|
|
|
159
156
|
let error = W1 * radiusDelta + W2 * totalAngleError;
|
|
160
157
|
return { ps, circle, error, δ3s };
|
|
161
158
|
}
|
|
162
|
-
|
|
159
|
+
export { find3ProngForDelta3s };
|
|
163
160
|
//# sourceMappingURL=find-3-prong-for-delta3s.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-3-prong-for-delta3s.js","sourceRoot":"","sources":["../../../../src/mat/find-mat/find-3-prong/find-3-prong-for-delta3s.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"find-3-prong-for-delta3s.js","sourceRoot":"","sources":["../../../../src/mat/find-mat/find-3-prong/find-3-prong-for-delta3s.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,eAAe,EAAE,YAAY,EAAE,eAAe,EACzE,KAAK,EACR,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAItC,OAAO,EAAE,eAAe,EAAiB,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,4DAA4D,CAAC;AACrG,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAS,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAG1D,cAAc;AACd,MAAM,8BAA8B,GAAG,MAAM,CAAC;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AM,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;AACtC,CAAC;AAGD,OAAO,EAAE,oBAAoB,EAAE,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CpNode } from '../../../cp-node';
|
|
2
|
-
import { Circle } from '../../../circle';
|
|
3
|
-
import { IPointOnShape } from '../../../point-on-shape';
|
|
1
|
+
import { CpNode } from '../../../cp-node.js';
|
|
2
|
+
import { Circle } from '../../../circle.js';
|
|
3
|
+
import { IPointOnShape } from '../../../point-on-shape.js';
|
|
4
4
|
/**
|
|
5
5
|
* @hidden
|
|
6
6
|
* Find and return a 3-prong from the given boundary piece.
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const three_prong_for_debugging_1 = require("../../../debug/three-prong-for-debugging");
|
|
6
|
-
const find_3_prong_for_delta3s_1 = require("./find-3-prong-for-delta3s");
|
|
7
|
-
const get_boundary_piece_beziers_1 = require("../../get-boundary-piece-beziers");
|
|
1
|
+
import { fromTo } from 'flo-bezier3';
|
|
2
|
+
import { createEmptyThreeProngForDebugging } from '../../../debug/three-prong-for-debugging.js';
|
|
3
|
+
import { find3ProngForDelta3s } from './find-3-prong-for-delta3s.js';
|
|
4
|
+
import { getBoundaryPieceBeziers } from '../../get-boundary-piece-beziers.js';
|
|
8
5
|
/**
|
|
9
6
|
* @hidden
|
|
10
7
|
* Find and return a 3-prong from the given boundary piece.
|
|
@@ -13,17 +10,22 @@ const get_boundary_piece_beziers_1 = require("../../get-boundary-piece-beziers")
|
|
|
13
10
|
* tolerances.
|
|
14
11
|
*/
|
|
15
12
|
function find3Prong(δs, extreme) {
|
|
16
|
-
let bezierPiecess = δs.map(
|
|
13
|
+
let bezierPiecess = δs.map(getBoundaryPieceBeziers);
|
|
17
14
|
if (typeof _debug_ !== 'undefined') {
|
|
18
15
|
let threeProngs = _debug_.generated.elems.threeProng;
|
|
19
|
-
threeProngs.push(
|
|
16
|
+
threeProngs.push(createEmptyThreeProngForDebugging());
|
|
20
17
|
let d = threeProngs[threeProngs.length - 1];
|
|
21
18
|
d.boundaries = [];
|
|
22
19
|
for (let bezierPieces of bezierPiecess) {
|
|
23
20
|
let boundary = [];
|
|
24
21
|
d.boundaries.push(boundary);
|
|
25
22
|
for (let bezierPiece of bezierPieces) {
|
|
26
|
-
|
|
23
|
+
/* qqq
|
|
24
|
+
let bezier = fromTo(bezierPiece.curve.ps)(
|
|
25
|
+
bezierPiece.ts[0], bezierPiece.ts[1]
|
|
26
|
+
);
|
|
27
|
+
*/
|
|
28
|
+
const bezier = fromTo(bezierPiece.curve.ps, bezierPiece.ts[0], bezierPiece.ts[1]);
|
|
27
29
|
boundary.push(bezier);
|
|
28
30
|
}
|
|
29
31
|
}
|
|
@@ -42,7 +44,7 @@ function find3Prong(δs, extreme) {
|
|
|
42
44
|
let trace = [];
|
|
43
45
|
d.traces.push(trace);
|
|
44
46
|
}
|
|
45
|
-
let threeProngInfo =
|
|
47
|
+
let threeProngInfo = find3ProngForDelta3s(δs, i, k, bezierPiecess, extreme);
|
|
46
48
|
if (!threeProngInfo) {
|
|
47
49
|
continue;
|
|
48
50
|
}
|
|
@@ -71,5 +73,5 @@ function find3Prong(δs, extreme) {
|
|
|
71
73
|
}
|
|
72
74
|
return threeProng;
|
|
73
75
|
}
|
|
74
|
-
|
|
76
|
+
export { find3Prong };
|
|
75
77
|
//# sourceMappingURL=find-3-prong.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-3-prong.js","sourceRoot":"","sources":["../../../../src/mat/find-mat/find-3-prong/find-3-prong.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"find-3-prong.js","sourceRoot":"","sources":["../../../../src/mat/find-mat/find-3-prong/find-3-prong.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAKrC,OAAO,EAAE,iCAAiC,EAAE,MAAM,6CA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AAG,OAAO,CAAC,SAAS,CAAC;QAChC,CAAC,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;QAC7B,CAAC,CAAC,IAAI,GAAG,UAAU,CAAC,EAAE,CAAC;QACvB,CAAC,CAAC,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC;QACzB,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC;QACZ,CAAC,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACtB,CAAC,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;KAC9C;IAED,OAAO,UAAU,CAAC;AACnB,CAAC;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { BezierPiece } from '../../bezier-piece';
|
|
1
|
+
import { BezierPiece } from '../../bezier-piece.js';
|
|
2
2
|
/**
|
|
3
3
|
* @hidden
|
|
4
4
|
* @param x
|
|
5
5
|
* @param bezierPiece3s
|
|
6
6
|
* @param extreme
|
|
7
7
|
*/
|
|
8
|
-
declare function getClosestPoints(x: number[], bezierPiece3s: BezierPiece[][]): import("../../../point-on-shape").IPointOnShape[];
|
|
8
|
+
declare function getClosestPoints(x: number[], bezierPiece3s: BezierPiece[][]): import("../../../point-on-shape.js").IPointOnShape[];
|
|
9
9
|
export { getClosestPoints };
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getClosestPoints = void 0;
|
|
4
|
-
const get_closest_boundary_point_1 = require("../../closest-boundary-point/get-closest-boundary-point");
|
|
1
|
+
import { getClosestBoundaryPoint } from '../../closest-boundary-point/get-closest-boundary-point.js';
|
|
5
2
|
/**
|
|
6
3
|
* @hidden
|
|
7
4
|
* @param x
|
|
@@ -10,11 +7,11 @@ const get_closest_boundary_point_1 = require("../../closest-boundary-point/get-c
|
|
|
10
7
|
*/
|
|
11
8
|
function getClosestPoints(x, bezierPiece3s) {
|
|
12
9
|
return bezierPiece3s.map(bezierPieces => {
|
|
13
|
-
let posInfo =
|
|
10
|
+
let posInfo = getClosestBoundaryPoint(bezierPieces, x, undefined, // curve
|
|
14
11
|
undefined // t
|
|
15
12
|
);
|
|
16
13
|
return posInfo ? posInfo.pos : undefined;
|
|
17
14
|
});
|
|
18
15
|
}
|
|
19
|
-
|
|
16
|
+
export { getClosestPoints };
|
|
20
17
|
//# sourceMappingURL=get-closest-points.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-closest-points.js","sourceRoot":"","sources":["../../../../src/mat/find-mat/find-3-prong/get-closest-points.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-closest-points.js","sourceRoot":"","sources":["../../../../src/mat/find-mat/find-3-prong/get-closest-points.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,4DAA4D,CAAC;AAGrG;;;;;GAKG;AACH,SAAS,gBAAgB,CACjB,CAAW,EACX,aAA8B;IAElC,OAAO,aAAa,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE;QACpC,IAAI,OAAO,GAAG,uBAAuB,CAC7B,YAAY,EACZ,CAAC,EACD,SAAS,EAAE,QAAQ;QACnB,SAAS,CAAE,IAAI;SACtB,CAAC;QAEF,OAAO,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;IAC7C,CAAC,CAAC,CAAC;AACP,CAAC;AAGD,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import LlRbTree from 'flo-ll-rb-tree';
|
|
2
|
-
import { Loop } from
|
|
3
|
-
import { CpNode } from '../../cp-node';
|
|
4
|
-
import { IPointOnShape } from '../../point-on-shape';
|
|
1
|
+
import { LlRbTree } from 'flo-ll-rb-tree';
|
|
2
|
+
import { Loop } from '../../loop.js';
|
|
3
|
+
import { CpNode } from '../../cp-node.js';
|
|
4
|
+
import { IPointOnShape } from '../../point-on-shape.js';
|
|
5
5
|
/**
|
|
6
6
|
* @hidden
|
|
7
7
|
* Add 2 prongs. See comments on the add2Prong function.
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findAndAdd2ProngsOnAllPaths = void 0;
|
|
4
|
-
const find_and_add_2_prongs_1 = require("./find-and-add-2-prongs");
|
|
1
|
+
import { findAndAdd2Prongs } from './find-and-add-2-prongs.js';
|
|
5
2
|
/**
|
|
6
3
|
* @hidden
|
|
7
4
|
* Add 2 prongs. See comments on the add2Prong function.
|
|
@@ -15,10 +12,10 @@ function findAndAdd2ProngsOnAllPaths(loops, cpGraphs, for2Prongss, extreme) {
|
|
|
15
12
|
let cpNode;
|
|
16
13
|
for (let k = 0; k < for2Prongss.length; k++) {
|
|
17
14
|
let for2Prongs = for2Prongss[k];
|
|
18
|
-
let _cpNode =
|
|
15
|
+
let _cpNode = findAndAdd2Prongs(loops, cpGraphs, k, for2Prongs, extreme);
|
|
19
16
|
cpNode = cpNode || _cpNode;
|
|
20
17
|
}
|
|
21
18
|
return cpNode;
|
|
22
19
|
}
|
|
23
|
-
|
|
20
|
+
export { findAndAdd2ProngsOnAllPaths };
|
|
24
21
|
//# sourceMappingURL=find-and-add-2-prongs-on-all-paths.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-and-add-2-prongs-on-all-paths.js","sourceRoot":"","sources":["../../../src/mat/find-mat/find-and-add-2-prongs-on-all-paths.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"find-and-add-2-prongs-on-all-paths.js","sourceRoot":"","sources":["../../../src/mat/find-mat/find-and-add-2-prongs-on-all-paths.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D;;;;;;;;GAQG;AACH,SAAS,2BAA2B,CAC5B,KAAa,EACb,QAAoC,EACpC,WAA8B,EAC9B,OAAe;IAEnB,IAAI,MAAM,CAAC;IAEX,KAAK,IAAI,CAAC,GAAC,CAAC,EAAE,CAAC,GAAC,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,IAAI,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;QAChC,IAAI,OAAO,GAAG,iBAAiB,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;QACzE,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC;KAC9B;IAED,OAAO,MAAM,CAAC;AAClB,CAAC;AAGD,OAAO,EAAE,2BAA2B,EAAE,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import LlRbTree from 'flo-ll-rb-tree';
|
|
2
|
-
import { Loop } from
|
|
3
|
-
import { CpNode } from '../../cp-node';
|
|
4
|
-
import { IPointOnShape } from '../../point-on-shape';
|
|
1
|
+
import { LlRbTree } from 'flo-ll-rb-tree';
|
|
2
|
+
import { Loop } from '../../loop.js';
|
|
3
|
+
import { CpNode } from '../../cp-node.js';
|
|
4
|
+
import { IPointOnShape } from '../../point-on-shape.js';
|
|
5
5
|
/**
|
|
6
6
|
* @hidden
|
|
7
7
|
* Find and add two-prongs.
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const get_shape_bounds_1 = require("../../svg/get-shape-bounds");
|
|
5
|
-
const find_2_prong_1 = require("./find-2-prong/find-2-prong");
|
|
6
|
-
const add_2_prong_1 = require("./add-2-prong");
|
|
1
|
+
import { getShapeBounds } from '../../svg/get-shape-bounds.js';
|
|
2
|
+
import { find2Prong } from './find-2-prong/find-2-prong.js';
|
|
3
|
+
import { add2Prong } from './add-2-prong.js';
|
|
7
4
|
/**
|
|
8
5
|
* @hidden
|
|
9
6
|
* Find and add two-prongs.
|
|
@@ -19,16 +16,16 @@ function findAndAdd2Prongs(loops, cpGraphs, k, for2Prongs, extreme) {
|
|
|
19
16
|
let index = indexLinear(len);
|
|
20
17
|
//let index = indexInterlaced(len); // Keep for possible future use.
|
|
21
18
|
let cpNode_;
|
|
22
|
-
let bounds =
|
|
23
|
-
let squaredDiagonalLength =
|
|
24
|
-
|
|
19
|
+
let bounds = getShapeBounds(loops);
|
|
20
|
+
let squaredDiagonalLength = (bounds.maxX.p[0] - bounds.minX.p[0]) ** 2 +
|
|
21
|
+
(bounds.maxY.p[1] - bounds.minY.p[1]) ** 2;
|
|
25
22
|
for (let i = 0; i < len; i++) {
|
|
26
23
|
let pos = for2Prongs[index[i]];
|
|
27
24
|
let twoProngInfo;
|
|
28
|
-
twoProngInfo =
|
|
25
|
+
twoProngInfo = find2Prong(loops, extreme, squaredDiagonalLength, cpGraphs, pos, false, k);
|
|
29
26
|
if (twoProngInfo) {
|
|
30
27
|
let { circle, zs } = twoProngInfo;
|
|
31
|
-
let cpNode =
|
|
28
|
+
let cpNode = add2Prong(cpGraphs, circle, pos, zs, false, extreme);
|
|
32
29
|
cpNode_ = cpNode_ || cpNode;
|
|
33
30
|
}
|
|
34
31
|
if (typeof _debug_ !== 'undefined') {
|
|
@@ -39,7 +36,6 @@ function findAndAdd2Prongs(loops, cpGraphs, k, for2Prongs, extreme) {
|
|
|
39
36
|
}
|
|
40
37
|
return cpNode_;
|
|
41
38
|
}
|
|
42
|
-
exports.findAndAdd2Prongs = findAndAdd2Prongs;
|
|
43
39
|
/**
|
|
44
40
|
* @hidden
|
|
45
41
|
* Simple linear array indexing.
|
|
@@ -75,4 +71,5 @@ function indexInterlaced(n) {
|
|
|
75
71
|
}
|
|
76
72
|
return arr;
|
|
77
73
|
}
|
|
74
|
+
export { findAndAdd2Prongs };
|
|
78
75
|
//# sourceMappingURL=find-and-add-2-prongs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"find-and-add-2-prongs.js","sourceRoot":"","sources":["../../../src/mat/find-mat/find-and-add-2-prongs.ts"],"names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