@tscircuit/schematic-trace-solver 0.0.37 → 0.0.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/index.d.ts +25 -1
  2. package/dist/index.js +917 -10
  3. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/collisions.ts +17 -0
  4. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/pathOps.ts +31 -12
  5. package/lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver.ts +40 -0
  6. package/lib/solvers/TraceLabelOverlapAvoidanceSolver/TraceLabelOverlapAvoidanceSolver.ts +240 -0
  7. package/lib/solvers/TraceLabelOverlapAvoidanceSolver/balanceLShapes.ts +207 -0
  8. package/lib/solvers/TraceLabelOverlapAvoidanceSolver/countTurns.ts +18 -0
  9. package/lib/solvers/TraceLabelOverlapAvoidanceSolver/detectTraceLabelOverlap.ts +38 -0
  10. package/lib/solvers/TraceLabelOverlapAvoidanceSolver/hasCollisions.ts +22 -0
  11. package/lib/solvers/TraceLabelOverlapAvoidanceSolver/hasCollisionsWithLabels.ts +19 -0
  12. package/lib/solvers/TraceLabelOverlapAvoidanceSolver/index.ts +1 -0
  13. package/lib/solvers/TraceLabelOverlapAvoidanceSolver/minimizeTurnsWithFilteredLabels.ts +66 -0
  14. package/lib/solvers/TraceLabelOverlapAvoidanceSolver/rerouteCollidingTrace.ts +73 -0
  15. package/lib/solvers/TraceLabelOverlapAvoidanceSolver/simplifyPath.ts +41 -0
  16. package/lib/solvers/TraceLabelOverlapAvoidanceSolver/tryConnectPoints.ts +14 -0
  17. package/lib/solvers/TraceLabelOverlapAvoidanceSolver/trySnipAndReconnect.ts +229 -0
  18. package/lib/solvers/TraceLabelOverlapAvoidanceSolver/turnMinimization.ts +211 -0
  19. package/lib/solvers/TraceLabelOverlapAvoidanceSolver/violation.ts +25 -0
  20. package/package.json +1 -1
  21. package/site/examples/example20.page.tsx +103 -0
  22. package/site/examples/example22.page.tsx +108 -0
  23. package/site/examples/example23.page.tsx +137 -0
  24. package/site/examples/example24.page.tsx +128 -0
  25. package/tests/examples/__snapshots__/example16.snap.svg +27 -27
  26. package/tests/examples/__snapshots__/example22.snap.svg +137 -0
  27. package/tests/examples/__snapshots__/example23.snap.svg +137 -0
  28. package/tests/examples/__snapshots__/example24.snap.svg +143 -0
  29. package/tests/examples/__snapshots__/example25.snap.svg +165 -0
  30. package/tests/examples/__snapshots__/example26.snap.svg +157 -0
  31. package/tests/examples/example22.test.tsx +109 -0
  32. package/tests/examples/example23.test.tsx +109 -0
  33. package/tests/examples/example24.test.tsx +114 -0
  34. package/tests/examples/example25.test.tsx +143 -0
  35. package/tests/examples/example26.test.tsx +134 -0
@@ -0,0 +1,103 @@
1
+ import { PipelineDebugger } from "site/components/PipelineDebugger"
2
+ import type { InputProblem } from "lib/types/InputProblem"
3
+
4
+ const inputProblem: InputProblem = {
5
+ chips: [
6
+ {
7
+ chipId: "schematic_component_0",
8
+ center: {
9
+ x: 0,
10
+ y: 0,
11
+ },
12
+ width: 2.4000000000000004,
13
+ height: 1,
14
+ pins: [
15
+ {
16
+ pinId: "U1.1",
17
+ x: 1.2000000000000002,
18
+ y: -0.30000000000000004,
19
+ },
20
+ {
21
+ pinId: "U1.2",
22
+ x: -1.2000000000000002,
23
+ y: -0.30000000000000004,
24
+ },
25
+ {
26
+ pinId: "U1.3",
27
+ x: 1.2000000000000002,
28
+ y: 0.09999999999999998,
29
+ },
30
+ {
31
+ pinId: "U1.4",
32
+ x: -1.2000000000000002,
33
+ y: 0.30000000000000004,
34
+ },
35
+ {
36
+ pinId: "U1.5",
37
+ x: -1.2000000000000002,
38
+ y: 0.10000000000000003,
39
+ },
40
+ {
41
+ pinId: "U1.6",
42
+ x: -1.2000000000000002,
43
+ y: -0.09999999999999998,
44
+ },
45
+ {
46
+ pinId: "U1.7",
47
+ x: 1.2000000000000002,
48
+ y: -0.10000000000000003,
49
+ },
50
+ {
51
+ pinId: "U1.8",
52
+ x: 1.2000000000000002,
53
+ y: 0.30000000000000004,
54
+ },
55
+ ],
56
+ },
57
+ {
58
+ chipId: "schematic_component_1",
59
+ center: {
60
+ x: 2.7,
61
+ y: 1.9049999999999998,
62
+ },
63
+ width: 2.2,
64
+ height: 0.8,
65
+ pins: [
66
+ {
67
+ pinId: "J1.1",
68
+ x: 1.6,
69
+ y: 2.105,
70
+ },
71
+ {
72
+ pinId: "J1.2",
73
+ x: 1.6,
74
+ y: 1.9049999999999998,
75
+ },
76
+ {
77
+ pinId: "J1.3",
78
+ x: 1.6,
79
+ y: 1.7049999999999998,
80
+ },
81
+ ],
82
+ },
83
+ ],
84
+ directConnections: [],
85
+ netConnections: [
86
+ {
87
+ netId: "GND",
88
+ pinIds: ["U1.1", "J1.3"],
89
+ },
90
+ {
91
+ netId: "VCC",
92
+ pinIds: ["U1.8", "J1.1"],
93
+ },
94
+ ],
95
+ availableNetLabelOrientations: {
96
+ VCC: ["y+"],
97
+ OUT: ["x-", "x+"],
98
+ GND: ["y-"],
99
+ },
100
+ maxMspPairDistance: 2.4,
101
+ }
102
+
103
+ export default () => <PipelineDebugger inputProblem={inputProblem} />
@@ -0,0 +1,108 @@
1
+ import { PipelineDebugger } from "site/components/PipelineDebugger"
2
+ import type { InputProblem } from "lib/types/InputProblem"
3
+
4
+ const inputProblem: InputProblem = {
5
+ chips: [
6
+ {
7
+ chipId: "schematic_component_0",
8
+ center: {
9
+ x: 0,
10
+ y: 0,
11
+ },
12
+ width: 2.4000000000000004,
13
+ height: 1,
14
+ pins: [
15
+ {
16
+ pinId: "U1.1",
17
+ x: 1.2000000000000002,
18
+ y: -0.30000000000000004,
19
+ },
20
+ {
21
+ pinId: "U1.2",
22
+ x: -1.2000000000000002,
23
+ y: -0.30000000000000004,
24
+ },
25
+ {
26
+ pinId: "U1.3",
27
+ x: 1.2000000000000002,
28
+ y: 0.09999999999999998,
29
+ },
30
+ {
31
+ pinId: "U1.4",
32
+ x: -1.2000000000000002,
33
+ y: 0.30000000000000004,
34
+ },
35
+ {
36
+ pinId: "U1.5",
37
+ x: -1.2000000000000002,
38
+ y: 0.10000000000000003,
39
+ },
40
+ {
41
+ pinId: "U1.6",
42
+ x: -1.2000000000000002,
43
+ y: -0.09999999999999998,
44
+ },
45
+ {
46
+ pinId: "U1.7",
47
+ x: 1.2000000000000002,
48
+ y: -0.10000000000000003,
49
+ },
50
+ {
51
+ pinId: "U1.8",
52
+ x: 1.2000000000000002,
53
+ y: 0.30000000000000004,
54
+ },
55
+ ],
56
+ },
57
+ {
58
+ chipId: "schematic_component_1",
59
+ center: {
60
+ x: 2.7,
61
+ y: -2.0950000000000002, // Moved below component 0
62
+ },
63
+ width: 2.2,
64
+ height: 0.8,
65
+ pins: [
66
+ {
67
+ pinId: "J1.1",
68
+ x: 1.6,
69
+ y: -1.895, // Adjusted y position
70
+ },
71
+ {
72
+ pinId: "J1.2",
73
+ x: 1.6,
74
+ y: -2.0950000000000002, // Adjusted y position
75
+ },
76
+ {
77
+ pinId: "J1.3",
78
+ x: 1.6,
79
+ y: -2.295, // Adjusted y position
80
+ },
81
+ ],
82
+ },
83
+ ],
84
+ directConnections: [],
85
+ netConnections: [
86
+ {
87
+ netId: "GND",
88
+ pinIds: ["U1.1", "J1.3"], // U1.1 connects to J1.3
89
+ },
90
+ {
91
+ netId: "VCC",
92
+ pinIds: ["U1.8", "J1.1"], // U1.8 connects to J1.1
93
+ },
94
+ {
95
+ netId: "MMM",
96
+ pinIds: ["J1.2"], // U1.8 connects to J1.1
97
+ },
98
+ ],
99
+ availableNetLabelOrientations: {
100
+ VCC: ["y-"], // Changed to y- since trace now goes downward
101
+ OUT: ["x-", "x+"],
102
+ GND: ["y-"], // Changed to y- since trace now goes downward
103
+ MMM: ["x+", "x-"],
104
+ },
105
+ maxMspPairDistance: 2.4,
106
+ }
107
+
108
+ export default () => <PipelineDebugger inputProblem={inputProblem} />
@@ -0,0 +1,137 @@
1
+ import { PipelineDebugger } from "site/components/PipelineDebugger"
2
+ import type { InputProblem } from "lib/types/InputProblem"
3
+
4
+ const inputProblem: InputProblem = {
5
+ chips: [
6
+ {
7
+ chipId: "schematic_component_0",
8
+ center: {
9
+ x: -3,
10
+ y: 0,
11
+ },
12
+ width: 2.4000000000000004,
13
+ height: 1,
14
+ pins: [
15
+ {
16
+ pinId: "U1.1",
17
+ x: -1.8,
18
+ y: -0.30000000000000004,
19
+ },
20
+ {
21
+ pinId: "U1.2",
22
+ x: -4.2,
23
+ y: -0.30000000000000004,
24
+ },
25
+ {
26
+ pinId: "U1.3",
27
+ x: -1.8,
28
+ y: 0.09999999999999998,
29
+ },
30
+ {
31
+ pinId: "U1.4",
32
+ x: -4.2,
33
+ y: 0.30000000000000004,
34
+ },
35
+ {
36
+ pinId: "U1.5",
37
+ x: -4.2,
38
+ y: 0.10000000000000003,
39
+ },
40
+ {
41
+ pinId: "U1.6",
42
+ x: -4.2,
43
+ y: -0.09999999999999998,
44
+ },
45
+ {
46
+ pinId: "U1.7",
47
+ x: -1.8,
48
+ y: -0.10000000000000003,
49
+ },
50
+ {
51
+ pinId: "U1.8",
52
+ x: -1.8,
53
+ y: 0.30000000000000004,
54
+ },
55
+ ],
56
+ },
57
+ {
58
+ chipId: "schematic_component_1",
59
+ center: {
60
+ x: 3,
61
+ y: 0,
62
+ },
63
+ width: 2.2,
64
+ height: 0.8,
65
+ pins: [
66
+ {
67
+ pinId: "J1.1",
68
+ x: 1.9,
69
+ y: 0.2,
70
+ },
71
+ {
72
+ pinId: "J1.2",
73
+ x: 1.9,
74
+ y: 0,
75
+ },
76
+ {
77
+ pinId: "J1.3",
78
+ x: 1.9,
79
+ y: -0.2,
80
+ },
81
+ ],
82
+ },
83
+ {
84
+ chipId: "schematic_component_2",
85
+ center: {
86
+ x: 0,
87
+ y: -2, // Moved down so component body doesn't block horizontal traces
88
+ },
89
+ width: 1.2,
90
+ height: 3,
91
+ pins: [
92
+ {
93
+ pinId: "U2.1",
94
+ x: -0.4,
95
+ y: -0.5, // Top pin
96
+ },
97
+ {
98
+ pinId: "U2.2",
99
+ x: 0.4,
100
+ y: -0.6,
101
+ },
102
+ {
103
+ pinId: "U2.3",
104
+ x: -0.4,
105
+ y: -2.8, // Bottom pin
106
+ },
107
+ {
108
+ pinId: "U2.4",
109
+ x: 0.4,
110
+ y: -2.8,
111
+ },
112
+ ],
113
+ },
114
+ ],
115
+ directConnections: [
116
+ {
117
+ pinIds: ["U1.1", "J1.3"],
118
+ },
119
+ {
120
+ pinIds: ["U1.8", "J1.1"],
121
+ },
122
+ ],
123
+ netConnections: [
124
+ {
125
+ netId: "SIGNAL1",
126
+ pinIds: ["U2.2"],
127
+ },
128
+ {
129
+ netId: "SIGNAL2",
130
+ pinIds: ["U2.1"],
131
+ },
132
+ ],
133
+ availableNetLabelOrientations: {},
134
+ maxMspPairDistance: 6.5,
135
+ }
136
+
137
+ export default () => <PipelineDebugger inputProblem={inputProblem} />
@@ -0,0 +1,128 @@
1
+ import { PipelineDebugger } from "site/components/PipelineDebugger"
2
+ import type { InputProblem } from "lib/types/InputProblem"
3
+
4
+ const inputProblem: InputProblem = {
5
+ chips: [
6
+ {
7
+ chipId: "schematic_component_0",
8
+ center: {
9
+ x: -3,
10
+ y: 0,
11
+ },
12
+ width: 2.4000000000000004,
13
+ height: 1,
14
+ pins: [
15
+ {
16
+ pinId: "U1.1",
17
+ x: -1.8,
18
+ y: -0.30000000000000004,
19
+ },
20
+ {
21
+ pinId: "U1.2",
22
+ x: -4.2,
23
+ y: -0.30000000000000004,
24
+ },
25
+ {
26
+ pinId: "U1.3",
27
+ x: -1.8,
28
+ y: 0.09999999999999998,
29
+ },
30
+ {
31
+ pinId: "U1.4",
32
+ x: -4.2,
33
+ y: 0.30000000000000004,
34
+ },
35
+ {
36
+ pinId: "U1.5",
37
+ x: -4.2,
38
+ y: 0.10000000000000003,
39
+ },
40
+ {
41
+ pinId: "U1.6",
42
+ x: -4.2,
43
+ y: -0.09999999999999998,
44
+ },
45
+ {
46
+ pinId: "U1.7",
47
+ x: -1.8,
48
+ y: -0.10000000000000003,
49
+ },
50
+ {
51
+ pinId: "U1.8",
52
+ x: -1.8,
53
+ y: 0.30000000000000004,
54
+ },
55
+ ],
56
+ },
57
+ {
58
+ chipId: "schematic_component_1",
59
+ center: {
60
+ x: 3,
61
+ y: 0,
62
+ },
63
+ width: 2.2,
64
+ height: 0.8,
65
+ pins: [
66
+ {
67
+ pinId: "J1.1",
68
+ x: 1.9,
69
+ y: 0.2,
70
+ },
71
+ {
72
+ pinId: "J1.2",
73
+ x: 1.9,
74
+ y: 0,
75
+ },
76
+ {
77
+ pinId: "J1.3",
78
+ x: 1.9,
79
+ y: -0.2,
80
+ },
81
+ ],
82
+ },
83
+ {
84
+ chipId: "schematic_component_2",
85
+ center: {
86
+ x: 0,
87
+ y: 1, // Moved down so component body doesn't block horizontal traces
88
+ },
89
+ width: 1,
90
+ height: 1,
91
+ pins: [
92
+ {
93
+ pinId: "U2.3",
94
+ x: -0.4,
95
+ y: 0.5, // Bottom pin
96
+ },
97
+ {
98
+ pinId: "U2.4",
99
+ x: 0.4,
100
+ y: 0.5,
101
+ },
102
+ ],
103
+ },
104
+ ],
105
+ directConnections: [],
106
+ netConnections: [
107
+ {
108
+ netId: "SIGNAL1",
109
+ pinIds: ["U2.3"],
110
+ },
111
+ {
112
+ netId: "SIGNAL2",
113
+ pinIds: ["U2.4"],
114
+ },
115
+ {
116
+ netId: "SSH",
117
+ pinIds: ["U1.1", "J1.3"],
118
+ },
119
+ {
120
+ netId: "BHH",
121
+ pinIds: ["J1.1", "U1.3"],
122
+ },
123
+ ],
124
+ availableNetLabelOrientations: {},
125
+ maxMspPairDistance: 6.5,
126
+ }
127
+
128
+ export default () => <PipelineDebugger inputProblem={inputProblem} />
@@ -2,92 +2,92 @@
2
2
  <rect width="100%" height="100%" fill="white" />
3
3
  <g>
4
4
  <circle data-type="point" data-label="U1.1
5
- x+" data-x="1.2000000000000002" data-y="-0.30000000000000004" cx="308.80000000000007" cy="454.68" r="3" fill="hsl(319, 100%, 50%, 0.8)" />
5
+ x+" data-x="1.2000000000000002" data-y="-0.30000000000000004" cx="308.80000000000007" cy="468.68000000000006" r="3" fill="hsl(319, 100%, 50%, 0.8)" />
6
6
  </g>
7
7
  <g>
8
8
  <circle data-type="point" data-label="U1.2
9
- x-" data-x="-1.2000000000000002" data-y="-0.30000000000000004" cx="40" cy="454.68" r="3" fill="hsl(320, 100%, 50%, 0.8)" />
9
+ x-" data-x="-1.2000000000000002" data-y="-0.30000000000000004" cx="40" cy="468.68000000000006" r="3" fill="hsl(320, 100%, 50%, 0.8)" />
10
10
  </g>
11
11
  <g>
12
12
  <circle data-type="point" data-label="U1.3
13
- x+" data-x="1.2000000000000002" data-y="0.09999999999999998" cx="308.80000000000007" cy="409.88" r="3" fill="hsl(321, 100%, 50%, 0.8)" />
13
+ x+" data-x="1.2000000000000002" data-y="0.09999999999999998" cx="308.80000000000007" cy="423.88000000000005" r="3" fill="hsl(321, 100%, 50%, 0.8)" />
14
14
  </g>
15
15
  <g>
16
16
  <circle data-type="point" data-label="U1.4
17
- x-" data-x="-1.2000000000000002" data-y="0.30000000000000004" cx="40" cy="387.47999999999996" r="3" fill="hsl(322, 100%, 50%, 0.8)" />
17
+ x-" data-x="-1.2000000000000002" data-y="0.30000000000000004" cx="40" cy="401.48" r="3" fill="hsl(322, 100%, 50%, 0.8)" />
18
18
  </g>
19
19
  <g>
20
20
  <circle data-type="point" data-label="U1.5
21
- x-" data-x="-1.2000000000000002" data-y="0.10000000000000003" cx="40" cy="409.88" r="3" fill="hsl(323, 100%, 50%, 0.8)" />
21
+ x-" data-x="-1.2000000000000002" data-y="0.10000000000000003" cx="40" cy="423.88000000000005" r="3" fill="hsl(323, 100%, 50%, 0.8)" />
22
22
  </g>
23
23
  <g>
24
24
  <circle data-type="point" data-label="U1.6
25
- x-" data-x="-1.2000000000000002" data-y="-0.09999999999999998" cx="40" cy="432.28" r="3" fill="hsl(324, 100%, 50%, 0.8)" />
25
+ x-" data-x="-1.2000000000000002" data-y="-0.09999999999999998" cx="40" cy="446.28000000000003" r="3" fill="hsl(324, 100%, 50%, 0.8)" />
26
26
  </g>
27
27
  <g>
28
28
  <circle data-type="point" data-label="U1.7
29
- x+" data-x="1.2000000000000002" data-y="-0.10000000000000003" cx="308.80000000000007" cy="432.28" r="3" fill="hsl(325, 100%, 50%, 0.8)" />
29
+ x+" data-x="1.2000000000000002" data-y="-0.10000000000000003" cx="308.80000000000007" cy="446.28000000000003" r="3" fill="hsl(325, 100%, 50%, 0.8)" />
30
30
  </g>
31
31
  <g>
32
32
  <circle data-type="point" data-label="U1.8
33
- x+" data-x="1.2000000000000002" data-y="0.30000000000000004" cx="308.80000000000007" cy="387.47999999999996" r="3" fill="hsl(326, 100%, 50%, 0.8)" />
33
+ x+" data-x="1.2000000000000002" data-y="0.30000000000000004" cx="308.80000000000007" cy="401.48" r="3" fill="hsl(326, 100%, 50%, 0.8)" />
34
34
  </g>
35
35
  <g>
36
36
  <circle data-type="point" data-label="J1.1
37
- x-" data-x="1.6" data-y="2.105" cx="353.6" cy="185.32" r="3" fill="hsl(218, 100%, 50%, 0.8)" />
37
+ x-" data-x="1.6" data-y="2.105" cx="353.6" cy="199.32000000000005" r="3" fill="hsl(218, 100%, 50%, 0.8)" />
38
38
  </g>
39
39
  <g>
40
40
  <circle data-type="point" data-label="J1.2
41
- x-" data-x="1.6" data-y="1.9049999999999998" cx="353.6" cy="207.72" r="3" fill="hsl(219, 100%, 50%, 0.8)" />
41
+ x-" data-x="1.6" data-y="1.9049999999999998" cx="353.6" cy="221.72000000000006" r="3" fill="hsl(219, 100%, 50%, 0.8)" />
42
42
  </g>
43
43
  <g>
44
44
  <circle data-type="point" data-label="J1.3
45
- x-" data-x="1.6" data-y="1.7049999999999998" cx="353.6" cy="230.12" r="3" fill="hsl(220, 100%, 50%, 0.8)" />
45
+ x-" data-x="1.6" data-y="1.7049999999999998" cx="353.6" cy="244.12000000000006" r="3" fill="hsl(220, 100%, 50%, 0.8)" />
46
46
  </g>
47
47
  <g>
48
- <circle data-type="point" data-label="" data-x="1.2000000000000002" data-y="-0.30000000000000004" cx="308.80000000000007" cy="454.68" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
48
+ <circle data-type="point" data-label="" data-x="1.2000000000000002" data-y="-0.30000000000000004" cx="308.80000000000007" cy="468.68000000000006" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
49
49
  </g>
50
50
  <g>
51
- <circle data-type="point" data-label="" data-x="1.6" data-y="1.7049999999999998" cx="353.6" cy="230.12" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
51
+ <circle data-type="point" data-label="" data-x="1.6" data-y="1.7049999999999998" cx="353.6" cy="244.12000000000006" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
52
52
  </g>
53
53
  <g>
54
- <circle data-type="point" data-label="" data-x="1.3" data-y="1.0025" cx="320" cy="308.79999999999995" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
54
+ <circle data-type="point" data-label="" data-x="1.049" data-y="1.0025" cx="291.88800000000003" cy="322.80000000000007" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
55
55
  </g>
56
56
  <g>
57
- <circle data-type="point" data-label="" data-x="1.4000000000000001" data-y="0.30000000000000004" cx="331.20000000000005" cy="387.47999999999996" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
57
+ <circle data-type="point" data-label="" data-x="0.9490000000000001" data-y="2.105" cx="280.68800000000005" cy="199.32000000000005" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
58
58
  </g>
59
59
  <g>
60
- <polyline data-points="1.2000000000000002,-0.30000000000000004 1.6,1.7049999999999998" data-type="line" data-label="" points="308.80000000000007,454.68 353.6,230.12" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
60
+ <polyline data-points="1.2000000000000002,-0.30000000000000004 1.6,1.7049999999999998" data-type="line" data-label="" points="308.80000000000007,468.68000000000006 353.6,244.12000000000006" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
61
61
  </g>
62
62
  <g>
63
- <polyline data-points="1.2000000000000002,0.09999999999999998 1.6,1.9049999999999998" data-type="line" data-label="" points="308.80000000000007,409.88 353.6,207.72" fill="none" stroke="hsl(158, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
63
+ <polyline data-points="1.2000000000000002,0.09999999999999998 1.6,1.9049999999999998" data-type="line" data-label="" points="308.80000000000007,423.88000000000005 353.6,221.72000000000006" fill="none" stroke="hsl(158, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
64
64
  </g>
65
65
  <g>
66
- <polyline data-points="1.2000000000000002,0.30000000000000004 1.6,2.105" data-type="line" data-label="" points="308.80000000000007,387.47999999999996 353.6,185.32" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
66
+ <polyline data-points="1.2000000000000002,0.30000000000000004 1.6,2.105" data-type="line" data-label="" points="308.80000000000007,401.48 353.6,199.32000000000005" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
67
67
  </g>
68
68
  <g>
69
- <polyline data-points="1.2000000000000002,0.09999999999999998 1.4000000000000001,0.09999999999999998 1.3,1.0025 1.3,1.9049999999999998 1.6,1.9049999999999998" data-type="line" data-label="" points="308.80000000000007,409.88 331.20000000000005,409.88 320,308.79999999999995 320,207.72 353.6,207.72" fill="none" stroke="purple" stroke-width="1" />
69
+ <polyline data-points="1.2000000000000002,0.09999999999999998 1.4000000000000001,0.09999999999999998 1.3,1.0025 1.049,1.0025 1.049,1.905 1.6,1.9049999999999998" data-type="line" data-label="" points="308.80000000000007,423.88000000000005 331.20000000000005,423.88000000000005 320,322.80000000000007 291.88800000000003,322.80000000000007 291.88800000000003,221.72000000000003 353.6,221.72000000000006" fill="none" stroke="purple" stroke-width="1" />
70
70
  </g>
71
71
  <g>
72
- <polyline data-points="1.2000000000000002,0.30000000000000004 1.4000000000000001,0.30000000000000004 1.5000000000000002,1.2025000000000001 1.5000000000000002,2.105 1.6,2.105" data-type="line" data-label="" points="308.80000000000007,387.47999999999996 331.20000000000005,387.47999999999996 342.4000000000001,286.4 342.4000000000001,185.32 353.6,185.32" fill="none" stroke="purple" stroke-width="1" />
72
+ <polyline data-points="1.2000000000000002,0.30000000000000004 1.5000000000000002,0.30000000000000004 1.5000000000000002,1.2025000000000001 0.9490000000000001,1.2025000000000001 0.9490000000000001,2.105 1.6,2.105" data-type="line" data-label="" points="308.80000000000007,401.48 342.4000000000001,401.48 342.4000000000001,300.40000000000003 280.68800000000005,300.40000000000003 280.68800000000005,199.32000000000005 353.6,199.32000000000005" fill="none" stroke="purple" stroke-width="1" />
73
73
  </g>
74
74
  <g>
75
- <rect data-type="rect" data-label="schematic_component_0" data-x="0" data-y="0" x="40" y="365.08" width="268.80000000000007" height="112" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008928571428571428" />
75
+ <rect data-type="rect" data-label="schematic_component_0" data-x="0" data-y="0" x="40" y="379.08000000000004" width="268.80000000000007" height="112" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008928571428571428" />
76
76
  </g>
77
77
  <g>
78
- <rect data-type="rect" data-label="schematic_component_1" data-x="2.7" data-y="1.9049999999999998" x="353.6" y="162.92000000000002" width="246.39999999999998" height="89.59999999999997" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008928571428571428" />
78
+ <rect data-type="rect" data-label="schematic_component_1" data-x="2.7" data-y="1.9049999999999998" x="353.6" y="176.92000000000007" width="246.39999999999998" height="89.59999999999997" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008928571428571428" />
79
79
  </g>
80
80
  <g>
81
- <rect data-type="rect" data-label="" data-x="1.4260000000000002" data-y="-0.30000000000000004" x="308.91200000000003" y="443.48" width="50.400000000000034" height="22.399999999999977" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008928571428571428" />
81
+ <rect data-type="rect" data-label="" data-x="1.4260000000000002" data-y="-0.30000000000000004" x="308.91200000000003" y="457.48" width="50.400000000000034" height="22.400000000000034" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008928571428571428" />
82
82
  </g>
83
83
  <g>
84
- <rect data-type="rect" data-label="" data-x="1.374" data-y="1.7049999999999998" x="303.088" y="218.92" width="50.400000000000034" height="22.400000000000034" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008928571428571428" />
84
+ <rect data-type="rect" data-label="" data-x="1.374" data-y="1.7049999999999998" x="303.088" y="232.92000000000004" width="50.400000000000034" height="22.400000000000034" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008928571428571428" />
85
85
  </g>
86
86
  <g>
87
- <rect data-type="rect" data-label="" data-x="1.075" data-y="1.0025" x="269.6" y="297.59999999999997" width="50.39999999999998" height="22.400000000000034" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008928571428571428" />
87
+ <rect data-type="rect" data-label="" data-x="0.824" data-y="1.0025" x="241.48800000000003" y="311.6" width="50.400000000000006" height="22.400000000000034" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008928571428571428" />
88
88
  </g>
89
89
  <g>
90
- <rect data-type="rect" data-label="" data-x="1.4000000000000001" data-y="0.525" x="320" y="337.08" width="22.40000000000009" height="50.39999999999998" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008928571428571428" />
90
+ <rect data-type="rect" data-label="" data-x="0.9490000000000001" data-y="2.33" x="269.48800000000006" y="148.92000000000002" width="22.399999999999977" height="50.400000000000034" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008928571428571428" />
91
91
  </g>
92
92
  <g id="crosshair" style="display: none">
93
93
  <line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
@@ -122,7 +122,7 @@ x-" data-x="1.6" data-y="1.7049999999999998" cx="353.6" cy="230.12" r="3" fill="
122
122
  "e": 174.40000000000003,
123
123
  "b": 0,
124
124
  "d": -112,
125
- "f": 421.08
125
+ "f": 435.08000000000004
126
126
  };
127
127
  // Manually invert and apply the affine transform
128
128
  // Since we only use translate and scale, we can directly compute: