@tscircuit/schematic-trace-solver 0.0.32 → 0.0.34

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 (42) hide show
  1. package/dist/index.d.ts +24 -53
  2. package/dist/index.js +526 -847
  3. package/lib/index.ts +1 -0
  4. package/lib/solvers/MspConnectionPairSolver/MspConnectionPairSolver.ts +54 -3
  5. package/lib/solvers/MspConnectionPairSolver/doesPairCrossRestrictedCenterLines.ts +62 -0
  6. package/lib/solvers/MspConnectionPairSolver/getMspConnectionPairsFromPins.ts +7 -2
  7. package/lib/solvers/NetLabelPlacementSolver/NetLabelPlacementSolver.ts +25 -4
  8. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceLinesSolver.ts +3 -10
  9. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/SchematicTraceSingleLineSolver2.ts +239 -0
  10. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/collisions.ts +57 -0
  11. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/mid.ts +97 -0
  12. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/pathOps.ts +65 -0
  13. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/rect.ts +19 -0
  14. package/lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver.ts +14 -14
  15. package/package.json +1 -1
  16. package/site/examples/example09.page.tsx +1 -1
  17. package/site/examples/example15-rp2040-caps.page.tsx +623 -0
  18. package/site/examples/example16-core-repro51.page.tsx +107 -0
  19. package/site/examples/example17-straight-line-trace.page.tsx +165 -0
  20. package/site/examples/example18.page.tsx +181 -0
  21. package/site/examples/example19.page.tsx +169 -0
  22. package/tests/examples/__snapshots__/example01.snap.svg +29 -29
  23. package/tests/examples/__snapshots__/example02.snap.svg +13 -10
  24. package/tests/examples/__snapshots__/example04.snap.svg +12 -12
  25. package/tests/examples/__snapshots__/example05.snap.svg +38 -38
  26. package/tests/examples/__snapshots__/example06.snap.svg +14 -14
  27. package/tests/examples/__snapshots__/example08.snap.svg +29 -23
  28. package/tests/examples/__snapshots__/example09.snap.svg +119 -149
  29. package/tests/examples/__snapshots__/example11.snap.svg +39 -33
  30. package/tests/examples/__snapshots__/example12.snap.svg +32 -29
  31. package/tests/examples/__snapshots__/example13.snap.svg +87 -84
  32. package/tests/examples/__snapshots__/example15.snap.svg +800 -71
  33. package/tests/examples/__snapshots__/example16.snap.svg +40 -86
  34. package/tests/examples/__snapshots__/example17.snap.svg +190 -0
  35. package/tests/examples/__snapshots__/example18.snap.svg +235 -0
  36. package/tests/examples/__snapshots__/example19.snap.svg +195 -0
  37. package/tests/examples/example15.test.tsx +524 -82
  38. package/tests/examples/example16.test.tsx +56 -118
  39. package/tests/examples/example17.test.tsx +171 -0
  40. package/tests/examples/example18.test.tsx +187 -0
  41. package/tests/examples/example19.test.tsx +175 -0
  42. package/tests/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver_repro03.test.ts +1 -0
@@ -0,0 +1,165 @@
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.3,
13
+ height: 1,
14
+ pins: [
15
+ {
16
+ pinId: "U1.1",
17
+ x: -1.15,
18
+ y: 0.30000000000000004,
19
+ },
20
+ {
21
+ pinId: "U1.2",
22
+ x: -1.15,
23
+ y: 0.10000000000000003,
24
+ },
25
+ {
26
+ pinId: "U1.3",
27
+ x: -1.15,
28
+ y: -0.09999999999999998,
29
+ },
30
+ {
31
+ pinId: "U1.4",
32
+ x: -1.15,
33
+ y: -0.30000000000000004,
34
+ },
35
+ {
36
+ pinId: "U1.5",
37
+ x: 1.15,
38
+ y: -0.30000000000000004,
39
+ },
40
+ {
41
+ pinId: "U1.6",
42
+ x: 1.15,
43
+ y: -0.10000000000000003,
44
+ },
45
+ {
46
+ pinId: "U1.7",
47
+ x: 1.15,
48
+ y: 0.09999999999999998,
49
+ },
50
+ {
51
+ pinId: "U1.8",
52
+ x: 1.15,
53
+ y: 0.30000000000000004,
54
+ },
55
+ ],
56
+ },
57
+ {
58
+ chipId: "schematic_component_1",
59
+ center: {
60
+ x: -1.1500000000000004,
61
+ y: 1.6700000000000002,
62
+ },
63
+ width: 1.04,
64
+ height: 1.0400000000000005,
65
+ pins: [
66
+ {
67
+ pinId: "D1.1",
68
+ x: -1.1500000000000004,
69
+ y: 1.15,
70
+ },
71
+ {
72
+ pinId: "D1.2",
73
+ x: -1.1500000000000004,
74
+ y: 2.1900000000000004,
75
+ },
76
+ ],
77
+ },
78
+ {
79
+ chipId: "schematic_component_2",
80
+ center: {
81
+ x: -2.37,
82
+ y: 0.10000000000000009,
83
+ },
84
+ width: 1.04,
85
+ height: 0.54,
86
+ pins: [
87
+ {
88
+ pinId: "D2.1",
89
+ x: -1.85,
90
+ y: 0.10000000000000002,
91
+ },
92
+ {
93
+ pinId: "D2.2",
94
+ x: -2.89,
95
+ y: 0.10000000000000016,
96
+ },
97
+ ],
98
+ },
99
+ {
100
+ chipId: "schematic_component_3",
101
+ center: {
102
+ x: 2.4,
103
+ y: -0.3000000000000007,
104
+ },
105
+ width: 1.1000000000000005,
106
+ height: 0.84,
107
+ pins: [
108
+ {
109
+ pinId: "C1.1",
110
+ x: 1.8499999999999996,
111
+ y: -0.3000000000000007,
112
+ },
113
+ {
114
+ pinId: "C1.2",
115
+ x: 2.95,
116
+ y: -0.3000000000000007,
117
+ },
118
+ ],
119
+ },
120
+ {
121
+ chipId: "schematic_component_4",
122
+ center: {
123
+ x: 4.2,
124
+ y: -0.3000000000000007,
125
+ },
126
+ width: 1.0999999999999996,
127
+ height: 0.84,
128
+ pins: [
129
+ {
130
+ pinId: "C2.1",
131
+ x: 3.6500000000000004,
132
+ y: -0.3000000000000007,
133
+ },
134
+ {
135
+ pinId: "C2.2",
136
+ x: 4.75,
137
+ y: -0.3000000000000007,
138
+ },
139
+ ],
140
+ },
141
+ ],
142
+ directConnections: [
143
+ {
144
+ pinIds: ["U1.5", "C1.1"],
145
+ netId: ".U1 .VCC to .C1 .pin1",
146
+ },
147
+ {
148
+ pinIds: ["C1.2", "C2.1"],
149
+ netId: ".C1 .pin2 to .C2 .pin1",
150
+ },
151
+ {
152
+ pinIds: ["U1.1", "D1.1"],
153
+ netId: ".U1 .OUT1 to .D1 .pin1",
154
+ },
155
+ {
156
+ pinIds: ["U1.2", "D2.1"],
157
+ netId: ".U1 .OUT2 to .D2 .pin1",
158
+ },
159
+ ],
160
+ netConnections: [],
161
+ availableNetLabelOrientations: {},
162
+ maxMspPairDistance: 2.4,
163
+ }
164
+
165
+ export default () => <PipelineDebugger inputProblem={inputProblem} />
@@ -0,0 +1,181 @@
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,
13
+ height: 1.4,
14
+ pins: [
15
+ {
16
+ pinId: "U3.8",
17
+ x: -1.4,
18
+ y: 0.42500000000000004,
19
+ },
20
+ {
21
+ pinId: "U3.4",
22
+ x: -1.4,
23
+ y: -0.42500000000000004,
24
+ },
25
+ {
26
+ pinId: "U3.1",
27
+ x: 1.4,
28
+ y: 0.5,
29
+ },
30
+ {
31
+ pinId: "U3.6",
32
+ x: 1.4,
33
+ y: 0.30000000000000004,
34
+ },
35
+ {
36
+ pinId: "U3.5",
37
+ x: 1.4,
38
+ y: 0.10000000000000009,
39
+ },
40
+ {
41
+ pinId: "U3.2",
42
+ x: 1.4,
43
+ y: -0.09999999999999998,
44
+ },
45
+ {
46
+ pinId: "U3.3",
47
+ x: 1.4,
48
+ y: -0.3,
49
+ },
50
+ {
51
+ pinId: "U3.7",
52
+ x: 1.4,
53
+ y: -0.5,
54
+ },
55
+ ],
56
+ },
57
+ {
58
+ chipId: "schematic_component_1",
59
+ center: {
60
+ x: -2.3145833,
61
+ y: 0,
62
+ },
63
+ width: 0.5291665999999999,
64
+ height: 1.0583333000000001,
65
+ pins: [
66
+ {
67
+ pinId: "C20.1",
68
+ x: -2.3148566499999994,
69
+ y: 0.5512093000000002,
70
+ },
71
+ {
72
+ pinId: "C20.2",
73
+ x: -2.31430995,
74
+ y: -0.5512093000000002,
75
+ },
76
+ ],
77
+ },
78
+ {
79
+ chipId: "schematic_component_2",
80
+ center: {
81
+ x: 1.7577928249999983,
82
+ y: 1.7512907000000002,
83
+ },
84
+ width: 0.3155856499999966,
85
+ height: 1.0583332999999997,
86
+ pins: [
87
+ {
88
+ pinId: "R11.1",
89
+ x: 1.7580660749999977,
90
+ y: 2.3025814000000002,
91
+ },
92
+ {
93
+ pinId: "R11.2",
94
+ x: 1.757519574999999,
95
+ y: 1.2,
96
+ },
97
+ ],
98
+ },
99
+ {
100
+ chipId: "schematic_component_3",
101
+ center: {
102
+ x: -1.7577928249999983,
103
+ y: -2.7512907000000002,
104
+ },
105
+ width: 0.3155856499999966,
106
+ height: 1.0583332999999997,
107
+ pins: [
108
+ {
109
+ pinId: "R12.1",
110
+ x: -1.7580660749999977,
111
+ y: -3.3025814000000002,
112
+ },
113
+ {
114
+ pinId: "R12.2",
115
+ x: -1.757519574999999,
116
+ y: -2.2,
117
+ },
118
+ ],
119
+ },
120
+ {
121
+ chipId: "schematic_component_4",
122
+ center: {
123
+ x: 1.7577928249999983,
124
+ y: -2.7512907000000002,
125
+ },
126
+ width: 0.3155856499999966,
127
+ height: 1.0583332999999997,
128
+ pins: [
129
+ {
130
+ pinId: "R13.1",
131
+ x: 1.7580660749999977,
132
+ y: -3.3025814000000002,
133
+ },
134
+ {
135
+ pinId: "R13.2",
136
+ x: 1.757519574999999,
137
+ y: -2.2,
138
+ },
139
+ ],
140
+ },
141
+ ],
142
+ directConnections: [
143
+ {
144
+ pinIds: ["C20.1", "U3.8"],
145
+ netId: "capacitor.C20 > port.pin1 to .U3 > .VDD",
146
+ },
147
+ {
148
+ pinIds: ["C20.2", "U3.4"],
149
+ netId: "capacitor.C20 > port.pin2 to .U3 > .GND",
150
+ },
151
+ {
152
+ pinIds: ["R11.2", "U3.1"],
153
+ netId: "resistor.R11 > port.pin2 to .U3 > .N_CS",
154
+ },
155
+ {
156
+ pinIds: ["R13.2", "R12.2"],
157
+ netId: "resistor.R11 > port.pin1 to resistor.R12 > port.pin1",
158
+ },
159
+ ],
160
+ netConnections: [
161
+ {
162
+ netId: "V3_3",
163
+ pinIds: ["U3.8", "U3.3", "U3.7", "C20.1", "R11.1"],
164
+ },
165
+ {
166
+ netId: "GND",
167
+ pinIds: ["U3.4", "C20.2"],
168
+ },
169
+ {
170
+ netId: "FLASH_N_CS",
171
+ pinIds: ["U3.1", "R11.2"],
172
+ },
173
+ ],
174
+ availableNetLabelOrientations: {
175
+ V3_3: ["y+"],
176
+ GND: ["y-"],
177
+ },
178
+ maxMspPairDistance: 5,
179
+ }
180
+
181
+ export default () => <PipelineDebugger inputProblem={inputProblem} />
@@ -0,0 +1,169 @@
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: 0.4,
13
+ height: 0.8,
14
+ pins: [
15
+ {
16
+ pinId: "U1.6",
17
+ x: 0.6000000000000001,
18
+ y: -0.2,
19
+ },
20
+ {
21
+ pinId: "U1.8",
22
+ x: 0.6000000000000001,
23
+ y: 0,
24
+ },
25
+ {
26
+ pinId: "U1.1",
27
+ x: 0.6000000000000001,
28
+ y: 0.2,
29
+ },
30
+ ],
31
+ },
32
+ {
33
+ chipId: "schematic_component_1",
34
+ center: {
35
+ x: 1.4,
36
+ y: 0.55,
37
+ },
38
+ width: 0.5291665999999999,
39
+ height: 1.0583333000000001,
40
+ pins: [
41
+ {
42
+ pinId: "C2.1",
43
+ x: 1.4002733499999995,
44
+ y: -0.0012093000000001908,
45
+ },
46
+ {
47
+ pinId: "C2.2",
48
+ x: 1.3997266500000003,
49
+ y: 1.1012093000000003,
50
+ },
51
+ ],
52
+ },
53
+ {
54
+ chipId: "schematic_component_2",
55
+ center: {
56
+ x: 2.7,
57
+ y: 1.3,
58
+ },
59
+ width: 1.0583332999999997,
60
+ height: 0.388910699999999,
61
+ pins: [
62
+ {
63
+ pinId: "R1.1",
64
+ x: 2.1487093,
65
+ y: 1.3002732499999994,
66
+ },
67
+ {
68
+ pinId: "R1.2",
69
+ x: 3.2512907000000006,
70
+ y: 1.2997267500000007,
71
+ },
72
+ ],
73
+ },
74
+ {
75
+ chipId: "schematic_component_3",
76
+ center: {
77
+ x: 4.4,
78
+ y: 0,
79
+ },
80
+ width: 0.4,
81
+ height: 0.4,
82
+ pins: [
83
+ {
84
+ pinId: "JP5.1",
85
+ x: 3.8000000000000003,
86
+ y: 0,
87
+ },
88
+ ],
89
+ },
90
+ {
91
+ chipId: "schematic_component_4",
92
+ center: {
93
+ x: 4.4,
94
+ y: -0.9,
95
+ },
96
+ width: 0.4,
97
+ height: 0.4,
98
+ pins: [
99
+ {
100
+ pinId: "JP9.1",
101
+ x: 3.8000000000000003,
102
+ y: -0.9,
103
+ },
104
+ ],
105
+ },
106
+ {
107
+ chipId: "schematic_component_5",
108
+ center: {
109
+ x: 2,
110
+ y: -1.1,
111
+ },
112
+ width: 0.8843008999999997,
113
+ height: 0.5299361999999987,
114
+ pins: [
115
+ {
116
+ pinId: "JP8.1",
117
+ x: 2.4458007999999998,
118
+ y: -1.2015872704999997,
119
+ },
120
+ {
121
+ pinId: "JP8.2",
122
+ x: 2.0034928,
123
+ y: -0.8474009705000005,
124
+ },
125
+ {
126
+ pinId: "JP8.3",
127
+ x: 1.5541992,
128
+ y: -1.2014628704999997,
129
+ },
130
+ ],
131
+ },
132
+ ],
133
+ directConnections: [
134
+ {
135
+ pinIds: ["C2.1", "U1.8"],
136
+ netId: "capacitor.C2 > port.pin1 to .U1 > .pin8",
137
+ },
138
+ {
139
+ pinIds: ["C2.2", "R1.1"],
140
+ netId: "capacitor.C2 > port.pin2 to .R1 > .pin1",
141
+ },
142
+ {
143
+ pinIds: ["R1.1", "U1.1"],
144
+ netId: "resistor.R1 > port.pin1 to .U1 > .pin1",
145
+ },
146
+ {
147
+ pinIds: ["JP5.1", "R1.2"],
148
+ netId: "pinheader.JP5 > port.pin1 to .R1 > .pin2",
149
+ },
150
+ {
151
+ pinIds: ["JP9.1", "R1.2"],
152
+ netId: "pinheader.JP9 > port.pin1 to .R1 > .pin2",
153
+ },
154
+ {
155
+ pinIds: ["JP8.2", "U1.6"],
156
+ netId: "solderjumper.JP8 > port.pin2 to .U1 > .pin6",
157
+ },
158
+ ],
159
+ netConnections: [
160
+ {
161
+ netId: "PAD",
162
+ pinIds: ["R1.2", "JP5.1", "JP9.1"],
163
+ },
164
+ ],
165
+ availableNetLabelOrientations: {},
166
+ maxMspPairDistance: 5,
167
+ }
168
+
169
+ export default () => <PipelineDebugger inputProblem={inputProblem} />
@@ -2,97 +2,97 @@
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="-0.8" data-y="0.2" cx="422.5742574257426" cy="272.8712871287128" r="3" fill="hsl(319, 100%, 50%, 0.8)" />
5
+ x-" data-x="-0.8" data-y="0.2" cx="422.5742574257426" cy="278.4158415841584" 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="-0.8" data-y="0" cx="422.5742574257426" cy="295.049504950495" r="3" fill="hsl(320, 100%, 50%, 0.8)" />
9
+ x-" data-x="-0.8" data-y="0" cx="422.5742574257426" cy="300.5940594059406" 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="-0.8" data-y="-0.2" cx="422.5742574257426" cy="317.2277227722772" r="3" fill="hsl(321, 100%, 50%, 0.8)" />
13
+ x-" data-x="-0.8" data-y="-0.2" cx="422.5742574257426" cy="322.7722772277228" 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="0.8" data-y="-0.2" cx="600" cy="317.2277227722772" r="3" fill="hsl(322, 100%, 50%, 0.8)" />
17
+ x+" data-x="0.8" data-y="-0.2" cx="600" cy="322.7722772277228" 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="0.8" data-y="0" cx="600" cy="295.049504950495" r="3" fill="hsl(323, 100%, 50%, 0.8)" />
21
+ x+" data-x="0.8" data-y="0" cx="600" cy="300.5940594059406" 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="0.8" data-y="0.2" cx="600" cy="272.8712871287128" r="3" fill="hsl(324, 100%, 50%, 0.8)" />
25
+ x+" data-x="0.8" data-y="0.2" cx="600" cy="278.4158415841584" r="3" fill="hsl(324, 100%, 50%, 0.8)" />
26
26
  </g>
27
27
  <g>
28
28
  <circle data-type="point" data-label="C1.1
29
- y+" data-x="-2" data-y="0.5" cx="289.50495049504957" cy="239.60396039603958" r="3" fill="hsl(121, 100%, 50%, 0.8)" />
29
+ y+" data-x="-2" data-y="0.5" cx="289.50495049504957" cy="245.14851485148515" r="3" fill="hsl(121, 100%, 50%, 0.8)" />
30
30
  </g>
31
31
  <g>
32
32
  <circle data-type="point" data-label="C1.2
33
- y-" data-x="-2" data-y="-0.5" cx="289.50495049504957" cy="350.4950495049505" r="3" fill="hsl(122, 100%, 50%, 0.8)" />
33
+ y-" data-x="-2" data-y="-0.5" cx="289.50495049504957" cy="356.03960396039605" r="3" fill="hsl(122, 100%, 50%, 0.8)" />
34
34
  </g>
35
35
  <g>
36
36
  <circle data-type="point" data-label="C2.1
37
- y+" data-x="-4" data-y="0.5" cx="67.72277227722776" cy="239.60396039603958" r="3" fill="hsl(2, 100%, 50%, 0.8)" />
37
+ y+" data-x="-4" data-y="0.5" cx="67.72277227722776" cy="245.14851485148515" r="3" fill="hsl(2, 100%, 50%, 0.8)" />
38
38
  </g>
39
39
  <g>
40
40
  <circle data-type="point" data-label="C2.2
41
- y-" data-x="-4" data-y="-0.5" cx="67.72277227722776" cy="350.4950495049505" r="3" fill="hsl(3, 100%, 50%, 0.8)" />
41
+ y-" data-x="-4" data-y="-0.5" cx="67.72277227722776" cy="356.03960396039605" r="3" fill="hsl(3, 100%, 50%, 0.8)" />
42
42
  </g>
43
43
  <g>
44
- <circle data-type="point" data-label="" data-x="-1.1" data-y="0.20000000000000018" cx="389.3069306930693" cy="272.8712871287128" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
44
+ <circle data-type="point" data-label="" data-x="-1.1" data-y="0.20000000000000018" cx="389.3069306930693" cy="278.4158415841584" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
45
45
  </g>
46
46
  <g>
47
- <circle data-type="point" data-label="" data-x="-1.275" data-y="0" cx="369.90099009900996" cy="295.049504950495" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
47
+ <circle data-type="point" data-label="" data-x="-1.275" data-y="0" cx="369.90099009900996" cy="300.5940594059406" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
48
48
  </g>
49
49
  <g>
50
- <circle data-type="point" data-label="" data-x="-4" data-y="-0.7000000000000002" cx="67.72277227722776" cy="372.6732673267327" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
50
+ <circle data-type="point" data-label="" data-x="-1.4" data-y="-0.7" cx="356.0396039603961" cy="378.2178217821782" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
51
51
  </g>
52
52
  <g>
53
- <polyline data-points="-0.8,0.2 -2,0.5" data-type="line" data-label="" points="422.5742574257426,272.8712871287128 289.50495049504957,239.60396039603958" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1" />
53
+ <polyline data-points="-0.8,0.2 -2,0.5" data-type="line" data-label="" points="422.5742574257426,278.4158415841584 289.50495049504957,245.14851485148515" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1" />
54
54
  </g>
55
55
  <g>
56
- <polyline data-points="-0.8,0 -4,0.5" data-type="line" data-label="" points="422.5742574257426,295.049504950495 67.72277227722776,239.60396039603958" fill="none" stroke="hsl(57, 100%, 50%, 0.8)" stroke-width="1" />
56
+ <polyline data-points="-0.8,0 -4,0.5" data-type="line" data-label="" points="422.5742574257426,300.5940594059406 67.72277227722776,245.14851485148515" fill="none" stroke="hsl(57, 100%, 50%, 0.8)" stroke-width="1" />
57
57
  </g>
58
58
  <g>
59
- <polyline data-points="-0.8,-0.2 -4,-0.5" data-type="line" data-label="" points="422.5742574257426,317.2277227722772 67.72277227722776,350.4950495049505" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
59
+ <polyline data-points="-0.8,-0.2 -4,-0.5" data-type="line" data-label="" points="422.5742574257426,322.7722772277228 67.72277227722776,356.03960396039605" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
60
60
  </g>
61
61
  <g>
62
- <polyline data-points="-0.8,-0.2 -2,-0.5" data-type="line" data-label="" points="422.5742574257426,317.2277227722772 289.50495049504957,350.4950495049505" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
62
+ <polyline data-points="-0.8,-0.2 -2,-0.5" data-type="line" data-label="" points="422.5742574257426,322.7722772277228 289.50495049504957,356.03960396039605" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
63
63
  </g>
64
64
  <g>
65
- <polyline data-points="-4,-0.5 -2,-0.5" data-type="line" data-label="" points="67.72277227722776,350.4950495049505 289.50495049504957,350.4950495049505" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
65
+ <polyline data-points="-4,-0.5 -2,-0.5" data-type="line" data-label="" points="67.72277227722776,356.03960396039605 289.50495049504957,356.03960396039605" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
66
66
  </g>
67
67
  <g>
68
- <polyline data-points="-0.8,0.20000000000000018 -1.4,0.20000000000000018 -1.4,0.5 -2,0.5" data-type="line" data-label="" points="422.5742574257426,272.8712871287128 356.0396039603961,272.8712871287128 356.0396039603961,239.60396039603958 289.50495049504957,239.60396039603958" fill="none" stroke="purple" stroke-width="1" />
68
+ <polyline data-points="-0.8,0.20000000000000018 -1.4,0.20000000000000018 -1.4,0.6 -2,0.6 -2,0.5" data-type="line" data-label="" points="422.5742574257426,278.4158415841584 356.0396039603961,278.4158415841584 356.0396039603961,234.05940594059405 289.50495049504957,234.05940594059405 289.50495049504957,245.14851485148515" fill="none" stroke="purple" stroke-width="1" />
69
69
  </g>
70
70
  <g>
71
- <polyline data-points="-0.7999999999999998,0 -1.275,0 -1.275,0.7 -4,0.7 -4,0.5" data-type="line" data-label="" points="422.57425742574264,295.049504950495 369.90099009900996,295.049504950495 369.90099009900996,217.4257425742574 67.72277227722776,217.4257425742574 67.72277227722776,239.60396039603958" fill="none" stroke="purple" stroke-width="1" />
71
+ <polyline data-points="-0.7999999999999998,0 -1.275,0 -1.275,0.8000000000000002 -4,0.8000000000000002 -4,0.5" data-type="line" data-label="" points="422.57425742574264,300.5940594059406 369.90099009900996,300.5940594059406 369.90099009900996,211.88118811881185 67.72277227722776,211.88118811881185 67.72277227722776,245.14851485148515" fill="none" stroke="purple" stroke-width="1" />
72
72
  </g>
73
73
  <g>
74
- <polyline data-points="-0.8,-0.20000000000000018 -1.4,-0.20000000000000018 -1.4,-0.6 -2,-0.6 -2,-0.5" data-type="line" data-label="" points="422.5742574257426,317.2277227722772 356.0396039603961,317.2277227722772 356.0396039603961,361.58415841584156 289.50495049504957,361.58415841584156 289.50495049504957,350.4950495049505" fill="none" stroke="purple" stroke-width="1" />
74
+ <polyline data-points="-0.8,-0.20000000000000018 -1.4,-0.20000000000000018 -1.4,-0.7 -2,-0.7 -2,-0.5" data-type="line" data-label="" points="422.5742574257426,322.7722772277228 356.0396039603961,322.7722772277228 356.0396039603961,378.2178217821782 289.50495049504957,378.2178217821782 289.50495049504957,356.03960396039605" fill="none" stroke="purple" stroke-width="1" />
75
75
  </g>
76
76
  <g>
77
- <polyline data-points="-4,-0.5 -4,-0.7000000000000002 -2,-0.7000000000000002 -2,-0.5" data-type="line" data-label="" points="67.72277227722776,350.4950495049505 67.72277227722776,372.6732673267327 289.50495049504957,372.6732673267327 289.50495049504957,350.4950495049505" fill="none" stroke="purple" stroke-width="1" />
77
+ <polyline data-points="-4,-0.5 -4,-0.7000000000000002 -2,-0.7000000000000002 -2,-0.5" data-type="line" data-label="" points="67.72277227722776,356.03960396039605 67.72277227722776,378.21782178217825 289.50495049504957,378.21782178217825 289.50495049504957,356.03960396039605" fill="none" stroke="purple" stroke-width="1" />
78
78
  </g>
79
79
  <g>
80
- <rect data-type="rect" data-label="U1" data-x="0" data-y="0" x="422.5742574257426" y="261.78217821782175" width="177.4257425742574" height="66.53465346534654" fill="hsl(164, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009017857142857143" />
80
+ <rect data-type="rect" data-label="U1" data-x="0" data-y="0" x="422.5742574257426" y="267.3267326732673" width="177.4257425742574" height="66.53465346534654" fill="hsl(164, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009017857142857143" />
81
81
  </g>
82
82
  <g>
83
- <rect data-type="rect" data-label="C1" data-x="-2" data-y="0" x="261.7821782178218" y="239.60396039603958" width="55.445544554455466" height="110.8910891089109" fill="hsl(326, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009017857142857143" />
83
+ <rect data-type="rect" data-label="C1" data-x="-2" data-y="0" x="261.7821782178218" y="245.14851485148515" width="55.445544554455466" height="110.8910891089109" fill="hsl(326, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009017857142857143" />
84
84
  </g>
85
85
  <g>
86
- <rect data-type="rect" data-label="C2" data-x="-4" data-y="0" x="40.00000000000006" y="239.60396039603958" width="55.44554455445541" height="110.8910891089109" fill="hsl(327, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009017857142857143" />
86
+ <rect data-type="rect" data-label="C2" data-x="-4" data-y="0" x="40.00000000000006" y="245.14851485148515" width="55.44554455445541" height="110.8910891089109" fill="hsl(327, 100%, 50%, 0.8)" stroke="black" stroke-width="0.009017857142857143" />
87
87
  </g>
88
88
  <g>
89
- <rect data-type="rect" data-label="" data-x="-1.1" data-y="0.42500000000000016" x="378.21782178217825" y="222.97029702970292" width="22.178217821782198" height="49.9009900990099" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.009017857142857143" />
89
+ <rect data-type="rect" data-label="" data-x="-1.1" data-y="0.42500000000000016" x="378.21782178217825" y="228.51485148514848" width="22.178217821782198" height="49.9009900990099" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.009017857142857143" />
90
90
  </g>
91
91
  <g>
92
- <rect data-type="rect" data-label="" data-x="-1.5" data-y="0" x="320" y="283.96039603960395" width="49.90099009900996" height="22.17821782178214" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.009017857142857143" />
92
+ <rect data-type="rect" data-label="" data-x="-1.5" data-y="0" x="320" y="289.5049504950495" width="49.90099009900996" height="22.17821782178214" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.009017857142857143" />
93
93
  </g>
94
94
  <g>
95
- <rect data-type="rect" data-label="" data-x="-4" data-y="-0.9250000000000002" x="56.63366336633669" y="372.6732673267327" width="22.17821782178214" height="49.900990099009846" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.009017857142857143" />
95
+ <rect data-type="rect" data-label="" data-x="-1.4" data-y="-0.9249999999999999" x="344.950495049505" y="378.2178217821782" width="22.178217821782198" height="49.9009900990099" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.009017857142857143" />
96
96
  </g>
97
97
  <g id="crosshair" style="display: none">
98
98
  <line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
@@ -127,7 +127,7 @@ y-" data-x="-4" data-y="-0.5" cx="67.72277227722776" cy="350.4950495049505" r="3
127
127
  "e": 511.2871287128713,
128
128
  "b": 0,
129
129
  "d": -110.89108910891089,
130
- "f": 295.049504950495
130
+ "f": 300.5940594059406
131
131
  };
132
132
  // Manually invert and apply the affine transform
133
133
  // Since we only use translate and scale, we can directly compute: