flo-mat 2.0.2 → 2.0.3
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/browser/index.js +8230 -8229
- package/browser/index.min.js +1 -1
- package/node/circle.d.ts +20 -20
- package/node/circle.js +31 -31
- package/node/compare-curvatures-at-interface.d.ts +19 -19
- package/node/compare-curvatures-at-interface.js +124 -124
- package/node/contact-point.d.ts +26 -26
- package/node/contact-point.js +25 -25
- package/node/cp-node/clone.d.ts +8 -8
- package/node/cp-node/clone.js +31 -31
- package/node/cp-node/remove.d.ts +9 -9
- package/node/cp-node/remove.js +19 -19
- package/node/cp-node.d.ts +202 -202
- package/node/cp-node.js +320 -320
- package/node/curve.d.ts +46 -46
- package/node/curve.js +88 -88
- package/node/debug/cp-node-for-debugging.d.ts +11 -11
- package/node/debug/cp-node-for-debugging.js +1 -1
- package/node/debug/debug-elem-types.d.ts +32 -32
- package/node/debug/debug-elem-types.js +1 -1
- package/node/debug/debug.d.ts +50 -50
- package/node/debug/debug.js +75 -75
- package/node/debug/functions/draw-elem/bounding-hull.d.ts +3 -3
- package/node/debug/functions/draw-elem/bounding-hull.js +7 -7
- package/node/debug/functions/draw-elem/branch.d.ts +4 -4
- package/node/debug/functions/draw-elem/branch.js +22 -22
- package/node/debug/functions/draw-elem/culls.d.ts +4 -4
- package/node/debug/functions/draw-elem/culls.js +21 -21
- package/node/debug/functions/draw-elem/draw-circle-percent.d.ts +3 -3
- package/node/debug/functions/draw-elem/draw-circle-percent.js +12 -12
- package/node/debug/functions/draw-elem/draw-elem.d.ts +8 -8
- package/node/debug/functions/draw-elem/draw-elem.js +45 -45
- package/node/debug/functions/draw-elem/dull-corner.d.ts +4 -4
- package/node/debug/functions/draw-elem/dull-corner.js +10 -10
- package/node/debug/functions/draw-elem/leaves.d.ts +4 -4
- package/node/debug/functions/draw-elem/leaves.js +12 -12
- package/node/debug/functions/draw-elem/loop.d.ts +4 -4
- package/node/debug/functions/draw-elem/loop.js +11 -11
- package/node/debug/functions/draw-elem/loops.d.ts +4 -4
- package/node/debug/functions/draw-elem/loops.js +6 -6
- package/node/debug/functions/draw-elem/loose-bounding-box.d.ts +3 -3
- package/node/debug/functions/draw-elem/loose-bounding-box.js +9 -9
- package/node/debug/functions/draw-elem/mat.d.ts +4 -4
- package/node/debug/functions/draw-elem/mat.js +30 -30
- package/node/debug/functions/draw-elem/max-vertex.d.ts +4 -4
- package/node/debug/functions/draw-elem/max-vertex.js +8 -8
- package/node/debug/functions/draw-elem/min-y.d.ts +4 -4
- package/node/debug/functions/draw-elem/min-y.js +13 -13
- package/node/debug/functions/draw-elem/one-prong-at-dull-corner.d.ts +4 -4
- package/node/debug/functions/draw-elem/one-prong-at-dull-corner.js +12 -12
- package/node/debug/functions/draw-elem/one-prong.d.ts +4 -4
- package/node/debug/functions/draw-elem/one-prong.js +16 -16
- package/node/debug/functions/draw-elem/sharp-corner.d.ts +4 -4
- package/node/debug/functions/draw-elem/sharp-corner.js +9 -9
- package/node/debug/functions/draw-elem/three-prong.d.ts +4 -4
- package/node/debug/functions/draw-elem/three-prong.js +16 -16
- package/node/debug/functions/draw-elem/tight-bounding-box.d.ts +3 -3
- package/node/debug/functions/draw-elem/tight-bounding-box.js +7 -7
- package/node/debug/functions/draw-elem/two-prong.d.ts +4 -4
- package/node/debug/functions/draw-elem/two-prong.js +36 -36
- package/node/debug/functions/draw-elem/vertex.d.ts +4 -4
- package/node/debug/functions/draw-elem/vertex.js +27 -27
- package/node/debug/functions/general.d.ts +48 -48
- package/node/debug/functions/general.js +52 -52
- package/node/debug/functions/three-prong.d.ts +11 -11
- package/node/debug/functions/three-prong.js +184 -184
- package/node/debug/functions/two-prong.d.ts +13 -13
- package/node/debug/functions/two-prong.js +117 -117
- package/node/debug/three-prong-for-debugging.d.ts +31 -31
- package/node/debug/three-prong-for-debugging.js +20 -20
- package/node/debug/two-prong-for-debugging.d.ts +26 -26
- package/node/debug/two-prong-for-debugging.js +1 -1
- package/node/find-mats.d.ts +26 -26
- package/node/find-mats.js +122 -122
- package/node/get-boundary-bezier-parts-to-next.d.ts +9 -9
- package/node/get-boundary-bezier-parts-to-next.js +42 -42
- package/node/get-boundary-beziers-to-next.d.ts +8 -8
- package/node/get-boundary-beziers-to-next.js +44 -44
- package/node/get-bounding-box-.d.ts +2 -2
- package/node/get-bounding-box-.js +4 -4
- package/node/get-branches.d.ts +12 -12
- package/node/get-branches.js +68 -68
- package/node/get-curve/get-curve-between.d.ts +9 -9
- package/node/get-curve/get-curve-between.js +56 -56
- package/node/get-curve/get-edge-direction.d.ts +9 -9
- package/node/get-curve/get-edge-direction.js +53 -53
- package/node/get-curve-to-next.d.ts +9 -9
- package/node/get-curve-to-next.js +11 -11
- package/node/get-interface-ccw.d.ts +24 -24
- package/node/get-interface-ccw.js +97 -97
- package/node/index.d.ts +36 -36
- package/node/index.js +32 -32
- package/node/loop/get-max-coordinate.d.ts +10 -10
- package/node/loop/get-max-coordinate.js +43 -43
- package/node/loop.d.ts +16 -16
- package/node/loop.js +34 -34
- package/node/mat/add-to-cp-graph.d.ts +16 -16
- package/node/mat/add-to-cp-graph.js +30 -30
- package/node/mat/bezier-piece.d.ts +12 -12
- package/node/mat/bezier-piece.js +1 -1
- package/node/mat/closest-boundary-point/closest-points-on-curve.d.ts +14 -14
- package/node/mat/closest-boundary-point/closest-points-on-curve.js +72 -72
- package/node/mat/closest-boundary-point/cull-bezier-pieces.d.ts +9 -9
- package/node/mat/closest-boundary-point/cull-bezier-pieces.js +19 -19
- package/node/mat/closest-boundary-point/cull-by-loose-bounding-box.d.ts +11 -11
- package/node/mat/closest-boundary-point/cull-by-loose-bounding-box.js +24 -24
- package/node/mat/closest-boundary-point/cull-by-tight-boundary-box.d.ts +11 -11
- package/node/mat/closest-boundary-point/cull-by-tight-boundary-box.js +26 -26
- package/node/mat/closest-boundary-point/get-best-distance-squared.d.ts +8 -8
- package/node/mat/closest-boundary-point/get-best-distance-squared.js +24 -24
- package/node/mat/closest-boundary-point/get-close-boundary-points.d.ts +17 -17
- package/node/mat/closest-boundary-point/get-close-boundary-points.js +80 -80
- package/node/mat/closest-boundary-point/get-closest-boundary-point.d.ts +18 -18
- package/node/mat/closest-boundary-point/get-closest-boundary-point.js +40 -40
- package/node/mat/corner.d.ts +37 -37
- package/node/mat/corner.js +1 -1
- package/node/mat/create-new-cp-tree.d.ts +9 -9
- package/node/mat/create-new-cp-tree.js +23 -23
- package/node/mat/elem-type-two-prong.d.ts +3 -3
- package/node/mat/elem-type-two-prong.js +1 -1
- package/node/mat/find-mat/add-1-prong.d.ts +12 -12
- package/node/mat/find-mat/add-1-prong.js +42 -42
- package/node/mat/find-mat/add-2-prong.d.ts +21 -21
- package/node/mat/find-mat/add-2-prong.js +192 -192
- package/node/mat/find-mat/add-3-prong.d.ts +19 -19
- package/node/mat/find-mat/add-3-prong.js +54 -54
- package/node/mat/find-mat/add-debug-info.d.ts +9 -9
- package/node/mat/find-mat/add-debug-info.js +67 -67
- package/node/mat/find-mat/create-get-interesting-points-on-loop.d.ts +11 -11
- package/node/mat/find-mat/create-get-interesting-points-on-loop.js +51 -51
- package/node/mat/find-mat/create-initial-cp-graph.d.ts +12 -12
- package/node/mat/find-mat/create-initial-cp-graph.js +40 -40
- package/node/mat/find-mat/find-2-prong/add-debug-info.d.ts +8 -8
- package/node/mat/find-mat/find-2-prong/add-debug-info.js +21 -21
- package/node/mat/find-mat/find-2-prong/cull-bezier-pieces.d.ts +11 -11
- package/node/mat/find-mat/find-2-prong/cull-bezier-pieces.js +29 -29
- package/node/mat/find-mat/find-2-prong/find-2-prong.d.ts +37 -37
- package/node/mat/find-mat/find-2-prong/find-2-prong.js +232 -232
- package/node/mat/find-mat/find-2-prong/find-equidistant-point-on-line.d.ts +9 -9
- package/node/mat/find-mat/find-2-prong/find-equidistant-point-on-line.js +39 -39
- package/node/mat/find-mat/find-2-prong/get-initial-bezier-pieces.d.ts +11 -11
- package/node/mat/find-mat/find-2-prong/get-initial-bezier-pieces.js +37 -37
- package/node/mat/find-mat/find-2-prong/x-for-debugging.d.ts +9 -9
- package/node/mat/find-mat/find-2-prong/x-for-debugging.js +1 -1
- package/node/mat/find-mat/find-3-prong/calc-better-x.d.ts +19 -19
- package/node/mat/find-mat/find-3-prong/calc-better-x.js +36 -36
- package/node/mat/find-mat/find-3-prong/calc-initial-3-prong-center.d.ts +13 -13
- package/node/mat/find-mat/find-3-prong/calc-initial-3-prong-center.js +25 -25
- package/node/mat/find-mat/find-3-prong/find-3-prong-for-delta3s.d.ts +22 -22
- package/node/mat/find-mat/find-3-prong/find-3-prong-for-delta3s.js +159 -159
- package/node/mat/find-mat/find-3-prong/find-3-prong.d.ts +16 -16
- package/node/mat/find-mat/find-3-prong/find-3-prong.js +76 -76
- package/node/mat/find-mat/find-3-prong/get-closest-points.d.ts +9 -9
- package/node/mat/find-mat/find-3-prong/get-closest-points.js +16 -16
- package/node/mat/find-mat/find-and-add-2-prongs-on-all-paths.d.ts +15 -15
- package/node/mat/find-mat/find-and-add-2-prongs-on-all-paths.js +20 -20
- package/node/mat/find-mat/find-and-add-2-prongs.d.ts +16 -16
- package/node/mat/find-mat/find-and-add-2-prongs.js +73 -73
- package/node/mat/find-mat/find-and-add-3-prongs.d.ts +13 -13
- package/node/mat/find-mat/find-and-add-3-prongs.js +146 -146
- package/node/mat/find-mat/find-and-add-hole-closing-2-prongs.d.ts +14 -14
- package/node/mat/find-mat/find-and-add-hole-closing-2-prongs.js +33 -33
- package/node/mat/find-mat/get-potential-2-prongs.d.ts +4 -4
- package/node/mat/find-mat/get-potential-2-prongs.js +16 -16
- package/node/mat/find-mat/get-sharp-corners.d.ts +4 -4
- package/node/mat/find-mat/get-sharp-corners.js +17 -17
- package/node/mat/geometry/get-closest-square-distance-to-rect.d.ts +5 -5
- package/node/mat/geometry/get-closest-square-distance-to-rect.js +49 -49
- package/node/mat/geometry/get-closest-squared-distance-to-rotated-rect.d.ts +5 -5
- package/node/mat/geometry/get-closest-squared-distance-to-rotated-rect.js +15 -15
- package/node/mat/get-boundary-piece-beziers.d.ts +11 -11
- package/node/mat/get-boundary-piece-beziers.js +58 -58
- package/node/mat/get-contact-circles-at-interface.d.ts +8 -8
- package/node/mat/get-contact-circles-at-interface.js +20 -20
- package/node/mat/get-largest-vertex.d.ts +4 -4
- package/node/mat/get-largest-vertex.js +9 -9
- package/node/mat/get-leaves.d.ts +4 -4
- package/node/mat/get-leaves.js +12 -12
- package/node/mat/get-neighboring-cps.d.ts +14 -14
- package/node/mat/get-neighboring-cps.js +30 -30
- package/node/mat/get-two-prong-type.d.ts +5 -5
- package/node/mat/get-two-prong-type.js +8 -8
- package/node/mat/is-another-cp-closeby.d.ts +20 -20
- package/node/mat/is-another-cp-closeby.js +55 -55
- package/node/mat/simplify-mat-map-only.d.ts +23 -23
- package/node/mat/simplify-mat-map-only.js +80 -80
- package/node/mat/to-scale-axis/add-debug-info.d.ts +7 -7
- package/node/mat/to-scale-axis/add-debug-info.js +13 -13
- package/node/mat/to-scale-axis/cull-non-cycles.d.ts +9 -9
- package/node/mat/to-scale-axis/cull-non-cycles.js +51 -51
- package/node/mat/to-scale-axis/cull.d.ts +12 -12
- package/node/mat/to-scale-axis/cull.js +132 -132
- package/node/mat/trim-mat.d.ts +8 -8
- package/node/mat/trim-mat.js +16 -16
- package/node/mat.d.ts +22 -22
- package/node/mat.js +1 -1
- package/node/point-on-shape.d.ts +73 -73
- package/node/point-on-shape.js +167 -167
- package/node/simplify-mat.d.ts +16 -16
- package/node/simplify-mat.js +71 -71
- package/node/svg/get-loop-bounds.d.ts +12 -12
- package/node/svg/get-loop-bounds.js +80 -80
- package/node/svg/get-min-y-pos.d.ts +8 -8
- package/node/svg/get-min-y-pos.js +9 -9
- package/node/svg/get-shape-bounds.d.ts +9 -9
- package/node/svg/get-shape-bounds.js +35 -35
- package/node/sweep-line/sweep-line.d.ts +18 -18
- package/node/sweep-line/sweep-line.js +72 -72
- package/node/to-scale-axis.d.ts +16 -16
- package/node/to-scale-axis.js +74 -74
- package/node/traverse-edges.d.ts +10 -10
- package/node/traverse-edges.js +21 -21
- package/node/traverse-vertices.d.ts +12 -12
- package/node/traverse-vertices.js +27 -27
- package/package.json +11 -11
- package/tsconfig.json +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { drawFs } from 'flo-draw';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
function sharpCorner(g, curve) {
|
|
4
|
-
const scaleFactor = 1;
|
|
5
|
-
const p = curve.ps[curve.ps.length - 1];
|
|
6
|
-
const $pos = drawFs.dot(g, p, 0.6 * scaleFactor, 'green');
|
|
7
|
-
return $pos;
|
|
8
|
-
}
|
|
9
|
-
export { sharpCorner };
|
|
1
|
+
import { drawFs } from 'flo-draw';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
function sharpCorner(g, curve) {
|
|
4
|
+
const scaleFactor = 1;
|
|
5
|
+
const p = curve.ps[curve.ps.length - 1];
|
|
6
|
+
const $pos = drawFs.dot(g, p, 0.6 * scaleFactor, 'green');
|
|
7
|
+
return $pos;
|
|
8
|
+
}
|
|
9
|
+
export { sharpCorner };
|
|
10
10
|
//# sourceMappingURL=sharp-corner.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ThreeProngForDebugging } from '../../three-prong-for-debugging.js';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
declare function threeProng(g: SVGGElement, threeProng: ThreeProngForDebugging): SVGCircleElement[];
|
|
4
|
-
export { threeProng };
|
|
1
|
+
import { ThreeProngForDebugging } from '../../three-prong-for-debugging.js';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
declare function threeProng(g: SVGGElement, threeProng: ThreeProngForDebugging): SVGCircleElement[];
|
|
4
|
+
export { threeProng };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { drawFs } from 'flo-draw';
|
|
2
|
-
import { scaleCircle } from '../../../circle.js';
|
|
3
|
-
/** @hidden */
|
|
4
|
-
const scaleFactor = 0.3;
|
|
5
|
-
/** @hidden */
|
|
6
|
-
function threeProng(g, threeProng) {
|
|
7
|
-
const circle = scaleCircle(threeProng.circle, 1);
|
|
8
|
-
const poss = threeProng.poss;
|
|
9
|
-
const $cp1 = drawFs.dot(g, poss[0].p, 0.1 * 1 * scaleFactor, 'blue');
|
|
10
|
-
const $cp2 = drawFs.dot(g, poss[1].p, 0.1 * 2 * scaleFactor, 'blue');
|
|
11
|
-
const $cp3 = drawFs.dot(g, poss[2].p, 0.1 * 3 * scaleFactor, 'blue');
|
|
12
|
-
const $center = drawFs.dot(g, circle.center, 0.3 * scaleFactor, 'blue');
|
|
13
|
-
const $circle = drawFs.circle(g, circle, 'blue thin2 nofill');
|
|
14
|
-
return [...$center, ...$cp1, ...$cp2, ...$cp3, ...$circle];
|
|
15
|
-
}
|
|
16
|
-
export { threeProng };
|
|
1
|
+
import { drawFs } from 'flo-draw';
|
|
2
|
+
import { scaleCircle } from '../../../circle.js';
|
|
3
|
+
/** @hidden */
|
|
4
|
+
const scaleFactor = 0.3;
|
|
5
|
+
/** @hidden */
|
|
6
|
+
function threeProng(g, threeProng) {
|
|
7
|
+
const circle = scaleCircle(threeProng.circle, 1);
|
|
8
|
+
const poss = threeProng.poss;
|
|
9
|
+
const $cp1 = drawFs.dot(g, poss[0].p, 0.1 * 1 * scaleFactor, 'blue');
|
|
10
|
+
const $cp2 = drawFs.dot(g, poss[1].p, 0.1 * 2 * scaleFactor, 'blue');
|
|
11
|
+
const $cp3 = drawFs.dot(g, poss[2].p, 0.1 * 3 * scaleFactor, 'blue');
|
|
12
|
+
const $center = drawFs.dot(g, circle.center, 0.3 * scaleFactor, 'blue');
|
|
13
|
+
const $circle = drawFs.circle(g, circle, 'blue thin2 nofill');
|
|
14
|
+
return [...$center, ...$cp1, ...$cp2, ...$cp3, ...$circle];
|
|
15
|
+
}
|
|
16
|
+
export { threeProng };
|
|
17
17
|
//# sourceMappingURL=three-prong.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/** @hidden */
|
|
2
|
-
declare function tightBoundingBox(g: SVGGElement, box: number[][]): SVGPathElement[];
|
|
3
|
-
export { tightBoundingBox };
|
|
1
|
+
/** @hidden */
|
|
2
|
+
declare function tightBoundingBox(g: SVGGElement, box: number[][]): SVGPathElement[];
|
|
3
|
+
export { tightBoundingBox };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { drawFs } from 'flo-draw';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
function tightBoundingBox(g, box) {
|
|
4
|
-
const $box = drawFs.polygon(g, box, 'thin5 pinker nofill');
|
|
5
|
-
return $box;
|
|
6
|
-
}
|
|
7
|
-
export { tightBoundingBox };
|
|
1
|
+
import { drawFs } from 'flo-draw';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
function tightBoundingBox(g, box) {
|
|
4
|
+
const $box = drawFs.polygon(g, box, 'thin5 pinker nofill');
|
|
5
|
+
return $box;
|
|
6
|
+
}
|
|
7
|
+
export { tightBoundingBox };
|
|
8
8
|
//# sourceMappingURL=tight-bounding-box.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TwoProngForDebugging } from '../../two-prong-for-debugging.js';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
declare function twoProng(g: SVGGElement, twoProng: TwoProngForDebugging): SVGElement[];
|
|
4
|
-
export { twoProng };
|
|
1
|
+
import { TwoProngForDebugging } from '../../two-prong-for-debugging.js';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
declare function twoProng(g: SVGGElement, twoProng: TwoProngForDebugging): SVGElement[];
|
|
4
|
+
export { twoProng };
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { drawFs } from 'flo-draw';
|
|
2
|
-
import { getTwoProngType } from '../../../mat/get-two-prong-type.js';
|
|
3
|
-
/** @hidden */
|
|
4
|
-
function twoProng(g, twoProng) {
|
|
5
|
-
const scaleFactor = 0.3;
|
|
6
|
-
let $failedDot = [];
|
|
7
|
-
let $center = [];
|
|
8
|
-
let $circle = [];
|
|
9
|
-
let $cp1 = [];
|
|
10
|
-
let $cp2 = [];
|
|
11
|
-
let color;
|
|
12
|
-
let thin;
|
|
13
|
-
switch (getTwoProngType(twoProng)) {
|
|
14
|
-
case 'twoProng_regular': {
|
|
15
|
-
color = 'red ';
|
|
16
|
-
thin = '2';
|
|
17
|
-
break;
|
|
18
|
-
}
|
|
19
|
-
case 'twoProng_holeClosing': {
|
|
20
|
-
color = 'cyan ';
|
|
21
|
-
thin = '10';
|
|
22
|
-
break;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
if (twoProng.failed) {
|
|
26
|
-
$failedDot = drawFs.dot(g, twoProng.pos.p, 1 * scaleFactor, 'black');
|
|
27
|
-
}
|
|
28
|
-
else if (!twoProng.failed) {
|
|
29
|
-
$center = drawFs.dot(g, twoProng.circle.center, 1 * scaleFactor, 'yellow');
|
|
30
|
-
$circle = drawFs.circle(g, twoProng.circle, color + 'thin' + thin + ' nofill');
|
|
31
|
-
$cp1 = drawFs.dot(g, twoProng.pos.p, 0.035 * scaleFactor, color);
|
|
32
|
-
$cp2 = drawFs.dot(g, twoProng.z, 0.07 * scaleFactor, color);
|
|
33
|
-
}
|
|
34
|
-
return [...$failedDot, ...$center, ...$circle, ...$cp1, ...$cp2];
|
|
35
|
-
}
|
|
36
|
-
export { twoProng };
|
|
1
|
+
import { drawFs } from 'flo-draw';
|
|
2
|
+
import { getTwoProngType } from '../../../mat/get-two-prong-type.js';
|
|
3
|
+
/** @hidden */
|
|
4
|
+
function twoProng(g, twoProng) {
|
|
5
|
+
const scaleFactor = 0.3;
|
|
6
|
+
let $failedDot = [];
|
|
7
|
+
let $center = [];
|
|
8
|
+
let $circle = [];
|
|
9
|
+
let $cp1 = [];
|
|
10
|
+
let $cp2 = [];
|
|
11
|
+
let color;
|
|
12
|
+
let thin;
|
|
13
|
+
switch (getTwoProngType(twoProng)) {
|
|
14
|
+
case 'twoProng_regular': {
|
|
15
|
+
color = 'red ';
|
|
16
|
+
thin = '2';
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
19
|
+
case 'twoProng_holeClosing': {
|
|
20
|
+
color = 'cyan ';
|
|
21
|
+
thin = '10';
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (twoProng.failed) {
|
|
26
|
+
$failedDot = drawFs.dot(g, twoProng.pos.p, 1 * scaleFactor, 'black');
|
|
27
|
+
}
|
|
28
|
+
else if (!twoProng.failed) {
|
|
29
|
+
$center = drawFs.dot(g, twoProng.circle.center, 1 * scaleFactor, 'yellow');
|
|
30
|
+
$circle = drawFs.circle(g, twoProng.circle, color + 'thin' + thin + ' nofill');
|
|
31
|
+
$cp1 = drawFs.dot(g, twoProng.pos.p, 0.035 * scaleFactor, color);
|
|
32
|
+
$cp2 = drawFs.dot(g, twoProng.z, 0.07 * scaleFactor, color);
|
|
33
|
+
}
|
|
34
|
+
return [...$failedDot, ...$center, ...$circle, ...$cp1, ...$cp2];
|
|
35
|
+
}
|
|
36
|
+
export { twoProng };
|
|
37
37
|
//# sourceMappingURL=two-prong.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CpNode } from '../../../cp-node.js';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
declare function vertex(g: SVGGElement, cpNode: CpNode, classes?: string, delay?: number, visible?: boolean): SVGElement[];
|
|
4
|
-
export { vertex };
|
|
1
|
+
import { CpNode } from '../../../cp-node.js';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
declare function vertex(g: SVGGElement, cpNode: CpNode, classes?: string, delay?: number, visible?: boolean): SVGElement[];
|
|
4
|
+
export { vertex };
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { drawFs } from 'flo-draw';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
function vertex(g, cpNode, classes, delay, visible = true) {
|
|
4
|
-
const visibleClass = visible ? '' : ' invisible';
|
|
5
|
-
const circle = cpNode.cp.circle;
|
|
6
|
-
const THIN = 'thin20';
|
|
7
|
-
const cps = cpNode.getCpNodesOnCircle();
|
|
8
|
-
console.log(cps);
|
|
9
|
-
let $svgs = [];
|
|
10
|
-
const $circle = drawFs.circle(g, circle, 'red ' + THIN + ' nofill ' + visibleClass, delay);
|
|
11
|
-
const $crossHair = drawFs.crossHair(g, circle.center, 'red ' + THIN + ' nofill ' + visibleClass, 3, delay);
|
|
12
|
-
$svgs = [...$circle, ...$crossHair];
|
|
13
|
-
for (let i = 0; i < cps.length; i++) {
|
|
14
|
-
const cp = cps[i];
|
|
15
|
-
const edgeCircle = cp.next.cp.circle;
|
|
16
|
-
const $circle = drawFs.circle(g, edgeCircle, 'pink ' + THIN + ' nofill ' + visibleClass, delay);
|
|
17
|
-
const $crossHair = drawFs.crossHair(g, edgeCircle.center, 'pink ' + THIN + ' nofill ' + visibleClass, 3, delay);
|
|
18
|
-
$svgs.push(...$circle, ...$crossHair);
|
|
19
|
-
const p1 = circle.center;
|
|
20
|
-
const p2 = edgeCircle.center;
|
|
21
|
-
const thin = i === 0 ? 'thin10' : (i === 1 ? 'thin20' : 'thin35');
|
|
22
|
-
const $line = drawFs.line(g, [p1, p2], 'yellow ' + thin + ' nofill ' + visibleClass, delay);
|
|
23
|
-
$svgs.push(...$line);
|
|
24
|
-
}
|
|
25
|
-
return $svgs;
|
|
26
|
-
}
|
|
27
|
-
export { vertex };
|
|
1
|
+
import { drawFs } from 'flo-draw';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
function vertex(g, cpNode, classes, delay, visible = true) {
|
|
4
|
+
const visibleClass = visible ? '' : ' invisible';
|
|
5
|
+
const circle = cpNode.cp.circle;
|
|
6
|
+
const THIN = 'thin20';
|
|
7
|
+
const cps = cpNode.getCpNodesOnCircle();
|
|
8
|
+
console.log(cps);
|
|
9
|
+
let $svgs = [];
|
|
10
|
+
const $circle = drawFs.circle(g, circle, 'red ' + THIN + ' nofill ' + visibleClass, delay);
|
|
11
|
+
const $crossHair = drawFs.crossHair(g, circle.center, 'red ' + THIN + ' nofill ' + visibleClass, 3, delay);
|
|
12
|
+
$svgs = [...$circle, ...$crossHair];
|
|
13
|
+
for (let i = 0; i < cps.length; i++) {
|
|
14
|
+
const cp = cps[i];
|
|
15
|
+
const edgeCircle = cp.next.cp.circle;
|
|
16
|
+
const $circle = drawFs.circle(g, edgeCircle, 'pink ' + THIN + ' nofill ' + visibleClass, delay);
|
|
17
|
+
const $crossHair = drawFs.crossHair(g, edgeCircle.center, 'pink ' + THIN + ' nofill ' + visibleClass, 3, delay);
|
|
18
|
+
$svgs.push(...$circle, ...$crossHair);
|
|
19
|
+
const p1 = circle.center;
|
|
20
|
+
const p2 = edgeCircle.center;
|
|
21
|
+
const thin = i === 0 ? 'thin10' : (i === 1 ? 'thin20' : 'thin35');
|
|
22
|
+
const $line = drawFs.line(g, [p1, p2], 'yellow ' + thin + ' nofill ' + visibleClass, delay);
|
|
23
|
+
$svgs.push(...$line);
|
|
24
|
+
}
|
|
25
|
+
return $svgs;
|
|
26
|
+
}
|
|
27
|
+
export { vertex };
|
|
28
28
|
//# sourceMappingURL=vertex.js.map
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { CpNode } from '../../cp-node.js';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
export interface IGeneralDebugFunctions {
|
|
4
|
-
nameObj: (obj: any, pre?: string) => void;
|
|
5
|
-
δToString: (cpNodes: CpNode[]) => string[];
|
|
6
|
-
δsToString: (cpNodes: CpNode[][]) => string[][];
|
|
7
|
-
pointToStr: (p: number[], decimalPlaces?: number) => string;
|
|
8
|
-
pointsToStr: (ps: number[][], decimalPlaces?: number) => string[];
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* @hidden
|
|
12
|
-
* Name the given object - for debugging purposes only
|
|
13
|
-
*/
|
|
14
|
-
declare function nameObj(o: any, pre?: string): void;
|
|
15
|
-
/**
|
|
16
|
-
* @hidden
|
|
17
|
-
* Transforms a boundary piece (δ) into a human readable string.
|
|
18
|
-
* @param cpNodes A boundary piece given by two CpNodes.
|
|
19
|
-
*/
|
|
20
|
-
declare function δToString(cpNodes: CpNode[]): string[];
|
|
21
|
-
/**
|
|
22
|
-
* @hidden
|
|
23
|
-
* Transforms an array of boundary pieces (δs) into a human readable string.
|
|
24
|
-
* @param cpNodes An array of boundary pieces.
|
|
25
|
-
*/
|
|
26
|
-
declare function δsToString(cpNodes: CpNode[][]): string[][];
|
|
27
|
-
/**
|
|
28
|
-
* @hidden
|
|
29
|
-
* Convert the given points into a human readable string.
|
|
30
|
-
* @param ps
|
|
31
|
-
*/
|
|
32
|
-
declare function pointsToStr(ps: number[][], decimalPlaces?: number): string[];
|
|
33
|
-
/**
|
|
34
|
-
* @hidden
|
|
35
|
-
* Converts the given point into a human readable string.
|
|
36
|
-
* @param p The point
|
|
37
|
-
* @param decimalPlaces number of decimal places
|
|
38
|
-
*/
|
|
39
|
-
declare function pointToStr(p: number[], decimalPlaces?: number): string;
|
|
40
|
-
/** @hidden */
|
|
41
|
-
declare const generalDebugFunctions: {
|
|
42
|
-
δToString: typeof δToString;
|
|
43
|
-
δsToString: typeof δsToString;
|
|
44
|
-
pointToStr: typeof pointToStr;
|
|
45
|
-
pointsToStr: typeof pointsToStr;
|
|
46
|
-
nameObj: typeof nameObj;
|
|
47
|
-
};
|
|
48
|
-
export { generalDebugFunctions };
|
|
1
|
+
import { CpNode } from '../../cp-node.js';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
export interface IGeneralDebugFunctions {
|
|
4
|
+
nameObj: (obj: any, pre?: string) => void;
|
|
5
|
+
δToString: (cpNodes: CpNode[]) => string[];
|
|
6
|
+
δsToString: (cpNodes: CpNode[][]) => string[][];
|
|
7
|
+
pointToStr: (p: number[], decimalPlaces?: number) => string;
|
|
8
|
+
pointsToStr: (ps: number[][], decimalPlaces?: number) => string[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
* Name the given object - for debugging purposes only
|
|
13
|
+
*/
|
|
14
|
+
declare function nameObj(o: any, pre?: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* @hidden
|
|
17
|
+
* Transforms a boundary piece (δ) into a human readable string.
|
|
18
|
+
* @param cpNodes A boundary piece given by two CpNodes.
|
|
19
|
+
*/
|
|
20
|
+
declare function δToString(cpNodes: CpNode[]): string[];
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
* Transforms an array of boundary pieces (δs) into a human readable string.
|
|
24
|
+
* @param cpNodes An array of boundary pieces.
|
|
25
|
+
*/
|
|
26
|
+
declare function δsToString(cpNodes: CpNode[][]): string[][];
|
|
27
|
+
/**
|
|
28
|
+
* @hidden
|
|
29
|
+
* Convert the given points into a human readable string.
|
|
30
|
+
* @param ps
|
|
31
|
+
*/
|
|
32
|
+
declare function pointsToStr(ps: number[][], decimalPlaces?: number): string[];
|
|
33
|
+
/**
|
|
34
|
+
* @hidden
|
|
35
|
+
* Converts the given point into a human readable string.
|
|
36
|
+
* @param p The point
|
|
37
|
+
* @param decimalPlaces number of decimal places
|
|
38
|
+
*/
|
|
39
|
+
declare function pointToStr(p: number[], decimalPlaces?: number): string;
|
|
40
|
+
/** @hidden */
|
|
41
|
+
declare const generalDebugFunctions: {
|
|
42
|
+
δToString: typeof δToString;
|
|
43
|
+
δsToString: typeof δsToString;
|
|
44
|
+
pointToStr: typeof pointToStr;
|
|
45
|
+
pointsToStr: typeof pointsToStr;
|
|
46
|
+
nameObj: typeof nameObj;
|
|
47
|
+
};
|
|
48
|
+
export { generalDebugFunctions };
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { posToHumanString } from '../../point-on-shape.js';
|
|
2
|
-
/** @hidden */
|
|
3
|
-
let i = 0;
|
|
4
|
-
/**
|
|
5
|
-
* @hidden
|
|
6
|
-
* Name the given object - for debugging purposes only
|
|
7
|
-
*/
|
|
8
|
-
function nameObj(o, pre = '') {
|
|
9
|
-
o.name = '' + pre + i++;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* @hidden
|
|
13
|
-
* Transforms a boundary piece (δ) into a human readable string.
|
|
14
|
-
* @param cpNodes A boundary piece given by two CpNodes.
|
|
15
|
-
*/
|
|
16
|
-
function δToString(cpNodes) {
|
|
17
|
-
return cpNodes.map(cpNode => posToHumanString(cpNode.cp.pointOnShape));
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* @hidden
|
|
21
|
-
* Transforms an array of boundary pieces (δs) into a human readable string.
|
|
22
|
-
* @param cpNodes An array of boundary pieces.
|
|
23
|
-
*/
|
|
24
|
-
function δsToString(cpNodes) {
|
|
25
|
-
return cpNodes.map(δToString);
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* @hidden
|
|
29
|
-
* Convert the given points into a human readable string.
|
|
30
|
-
* @param ps
|
|
31
|
-
*/
|
|
32
|
-
function pointsToStr(ps, decimalPlaces = 3) {
|
|
33
|
-
return ps.map(p => pointToStr(p, decimalPlaces));
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* @hidden
|
|
37
|
-
* Converts the given point into a human readable string.
|
|
38
|
-
* @param p The point
|
|
39
|
-
* @param decimalPlaces number of decimal places
|
|
40
|
-
*/
|
|
41
|
-
function pointToStr(p, decimalPlaces = 3) {
|
|
42
|
-
return p[0].toFixed(decimalPlaces) + ', ' + p[1].toFixed(decimalPlaces);
|
|
43
|
-
}
|
|
44
|
-
/** @hidden */
|
|
45
|
-
const generalDebugFunctions /*: IGeneralDebugFunctions*/ = {
|
|
46
|
-
δToString,
|
|
47
|
-
δsToString,
|
|
48
|
-
pointToStr,
|
|
49
|
-
pointsToStr,
|
|
50
|
-
nameObj,
|
|
51
|
-
};
|
|
52
|
-
export { generalDebugFunctions };
|
|
1
|
+
import { posToHumanString } from '../../point-on-shape.js';
|
|
2
|
+
/** @hidden */
|
|
3
|
+
let i = 0;
|
|
4
|
+
/**
|
|
5
|
+
* @hidden
|
|
6
|
+
* Name the given object - for debugging purposes only
|
|
7
|
+
*/
|
|
8
|
+
function nameObj(o, pre = '') {
|
|
9
|
+
o.name = '' + pre + i++;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @hidden
|
|
13
|
+
* Transforms a boundary piece (δ) into a human readable string.
|
|
14
|
+
* @param cpNodes A boundary piece given by two CpNodes.
|
|
15
|
+
*/
|
|
16
|
+
function δToString(cpNodes) {
|
|
17
|
+
return cpNodes.map(cpNode => posToHumanString(cpNode.cp.pointOnShape));
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @hidden
|
|
21
|
+
* Transforms an array of boundary pieces (δs) into a human readable string.
|
|
22
|
+
* @param cpNodes An array of boundary pieces.
|
|
23
|
+
*/
|
|
24
|
+
function δsToString(cpNodes) {
|
|
25
|
+
return cpNodes.map(δToString);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @hidden
|
|
29
|
+
* Convert the given points into a human readable string.
|
|
30
|
+
* @param ps
|
|
31
|
+
*/
|
|
32
|
+
function pointsToStr(ps, decimalPlaces = 3) {
|
|
33
|
+
return ps.map(p => pointToStr(p, decimalPlaces));
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @hidden
|
|
37
|
+
* Converts the given point into a human readable string.
|
|
38
|
+
* @param p The point
|
|
39
|
+
* @param decimalPlaces number of decimal places
|
|
40
|
+
*/
|
|
41
|
+
function pointToStr(p, decimalPlaces = 3) {
|
|
42
|
+
return p[0].toFixed(decimalPlaces) + ', ' + p[1].toFixed(decimalPlaces);
|
|
43
|
+
}
|
|
44
|
+
/** @hidden */
|
|
45
|
+
const generalDebugFunctions /*: IGeneralDebugFunctions*/ = {
|
|
46
|
+
δToString,
|
|
47
|
+
δsToString,
|
|
48
|
+
pointToStr,
|
|
49
|
+
pointsToStr,
|
|
50
|
+
nameObj,
|
|
51
|
+
};
|
|
52
|
+
export { generalDebugFunctions };
|
|
53
53
|
//# sourceMappingURL=general.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/** @hidden */
|
|
2
|
-
export interface IThreeProngDebugFunctions {
|
|
3
|
-
drawSpokes: (g: SVGGElement, n: number) => void;
|
|
4
|
-
traceConvergence: (g: SVGGElement, n: number, indx: number) => void;
|
|
5
|
-
showBoundary: (g: SVGGElement, n: number, indx: number) => void;
|
|
6
|
-
logδs: (n: number) => void;
|
|
7
|
-
logNearest: (showSpokes?: boolean, showTrace?: boolean, showBoundaries?: boolean) => (g: SVGGElement, p: number[], showDelay?: number) => void;
|
|
8
|
-
}
|
|
9
|
-
/** @hidden */
|
|
10
|
-
declare const threeProngDebugFunctions: IThreeProngDebugFunctions;
|
|
11
|
-
export { threeProngDebugFunctions };
|
|
1
|
+
/** @hidden */
|
|
2
|
+
export interface IThreeProngDebugFunctions {
|
|
3
|
+
drawSpokes: (g: SVGGElement, n: number) => void;
|
|
4
|
+
traceConvergence: (g: SVGGElement, n: number, indx: number) => void;
|
|
5
|
+
showBoundary: (g: SVGGElement, n: number, indx: number) => void;
|
|
6
|
+
logδs: (n: number) => void;
|
|
7
|
+
logNearest: (showSpokes?: boolean, showTrace?: boolean, showBoundaries?: boolean) => (g: SVGGElement, p: number[], showDelay?: number) => void;
|
|
8
|
+
}
|
|
9
|
+
/** @hidden */
|
|
10
|
+
declare const threeProngDebugFunctions: IThreeProngDebugFunctions;
|
|
11
|
+
export { threeProngDebugFunctions };
|