@tscircuit/schematic-trace-solver 0.0.31 → 0.0.33

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 (32) hide show
  1. package/CLAUDE.md +8 -0
  2. package/dist/index.d.ts +24 -53
  3. package/dist/index.js +494 -807
  4. package/lib/index.ts +1 -0
  5. package/lib/solvers/MspConnectionPairSolver/MspConnectionPairSolver.ts +54 -3
  6. package/lib/solvers/MspConnectionPairSolver/doesPairCrossRestrictedCenterLines.ts +62 -0
  7. package/lib/solvers/MspConnectionPairSolver/getMspConnectionPairsFromPins.ts +7 -2
  8. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceLinesSolver.ts +5 -11
  9. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver/SchematicTraceSingleLineSolver.ts +37 -7
  10. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver/generateElbowVariants.ts +7 -0
  11. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/SchematicTraceSingleLineSolver2.ts +239 -0
  12. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/collisions.ts +57 -0
  13. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/mid.ts +97 -0
  14. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/pathOps.ts +65 -0
  15. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/rect.ts +19 -0
  16. package/lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver.ts +14 -14
  17. package/package.json +1 -1
  18. package/site/SchematicTracePipelineSolver/SchematicTracePipelineSolver03.page.tsx +486 -0
  19. package/site/examples/example09.page.tsx +1 -1
  20. package/tests/examples/__snapshots__/example01.snap.svg +29 -29
  21. package/tests/examples/__snapshots__/example02.snap.svg +13 -10
  22. package/tests/examples/__snapshots__/example04.snap.svg +12 -12
  23. package/tests/examples/__snapshots__/example05.snap.svg +38 -38
  24. package/tests/examples/__snapshots__/example06.snap.svg +14 -14
  25. package/tests/examples/__snapshots__/example08.snap.svg +29 -23
  26. package/tests/examples/__snapshots__/example09.snap.svg +119 -149
  27. package/tests/examples/__snapshots__/example11.snap.svg +39 -33
  28. package/tests/examples/__snapshots__/example12.snap.svg +32 -29
  29. package/tests/examples/__snapshots__/example13.snap.svg +87 -84
  30. package/tests/examples/__snapshots__/example15.snap.svg +57 -57
  31. package/tests/examples/__snapshots__/example16.snap.svg +3 -3
  32. package/tests/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver_repro03.test.ts +491 -0
@@ -0,0 +1,486 @@
1
+ import { PipelineDebugger } from "site/components/PipelineDebugger"
2
+ import type { InputProblem } from "lib/types/InputProblem"
3
+
4
+ export 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.4,
14
+ pins: [
15
+ {
16
+ pinId: "J1.1",
17
+ x: 1.15,
18
+ y: 0.5,
19
+ },
20
+ {
21
+ pinId: "J1.2",
22
+ x: 1.15,
23
+ y: 0.30000000000000004,
24
+ },
25
+ {
26
+ pinId: "J1.3",
27
+ x: 1.15,
28
+ y: 0.10000000000000009,
29
+ },
30
+ {
31
+ pinId: "J1.4",
32
+ x: 1.15,
33
+ y: -0.09999999999999998,
34
+ },
35
+ {
36
+ pinId: "J1.5",
37
+ x: 1.15,
38
+ y: -0.3,
39
+ },
40
+ {
41
+ pinId: "J1.6",
42
+ x: 1.15,
43
+ y: -0.5,
44
+ },
45
+ ],
46
+ },
47
+ {
48
+ chipId: "schematic_component_1",
49
+ center: {
50
+ x: 1.56,
51
+ y: 4.308333333333334,
52
+ },
53
+ width: 1,
54
+ height: 0.45,
55
+ pins: [
56
+ {
57
+ pinId: "SW1.1",
58
+ x: 1.06,
59
+ y: 4.258333333333334,
60
+ },
61
+ {
62
+ pinId: "SW1.2",
63
+ x: 2.06,
64
+ y: 4.258333333333334,
65
+ },
66
+ ],
67
+ },
68
+ {
69
+ chipId: "schematic_component_2",
70
+ center: {
71
+ x: 0.3599999999999999,
72
+ y: 4.308333333333334,
73
+ },
74
+ width: 1.04,
75
+ height: 0.54,
76
+ pins: [
77
+ {
78
+ pinId: "D1.1",
79
+ x: -0.16000000000000014,
80
+ y: 4.308333333333334,
81
+ },
82
+ {
83
+ pinId: "D1.2",
84
+ x: 0.8799999999999999,
85
+ y: 4.308333333333334,
86
+ },
87
+ ],
88
+ },
89
+ {
90
+ chipId: "schematic_component_3",
91
+ center: {
92
+ x: 5.06,
93
+ y: 0.3583333333333334,
94
+ },
95
+ width: 1,
96
+ height: 0.45,
97
+ pins: [
98
+ {
99
+ pinId: "SW2.1",
100
+ x: 4.56,
101
+ y: 0.30833333333333357,
102
+ },
103
+ {
104
+ pinId: "SW2.2",
105
+ x: 5.56,
106
+ y: 0.30833333333333357,
107
+ },
108
+ ],
109
+ },
110
+ {
111
+ chipId: "schematic_component_4",
112
+ center: {
113
+ x: 3.8599999999999994,
114
+ y: 0.3583333333333334,
115
+ },
116
+ width: 1.040000000000001,
117
+ height: 0.54,
118
+ pins: [
119
+ {
120
+ pinId: "D2.1",
121
+ x: 3.339999999999999,
122
+ y: 0.3583333333333334,
123
+ },
124
+ {
125
+ pinId: "D2.2",
126
+ x: 4.38,
127
+ y: 0.3583333333333334,
128
+ },
129
+ ],
130
+ },
131
+ {
132
+ chipId: "schematic_component_5",
133
+ center: {
134
+ x: 3.163333333333334,
135
+ y: 10.185,
136
+ },
137
+ width: 1,
138
+ height: 0.45,
139
+ pins: [
140
+ {
141
+ pinId: "SW3.1",
142
+ x: 2.663333333333334,
143
+ y: 10.135,
144
+ },
145
+ {
146
+ pinId: "SW3.2",
147
+ x: 3.663333333333334,
148
+ y: 10.135,
149
+ },
150
+ ],
151
+ },
152
+ {
153
+ chipId: "schematic_component_6",
154
+ center: {
155
+ x: 1.9633333333333338,
156
+ y: 10.185,
157
+ },
158
+ width: 1.040000000000001,
159
+ height: 0.54,
160
+ pins: [
161
+ {
162
+ pinId: "D3.1",
163
+ x: 1.4433333333333334,
164
+ y: 10.185,
165
+ },
166
+ {
167
+ pinId: "D3.2",
168
+ x: 2.4833333333333343,
169
+ y: 10.185,
170
+ },
171
+ ],
172
+ },
173
+ {
174
+ chipId: "schematic_component_7",
175
+ center: {
176
+ x: 3.8100000000000005,
177
+ y: 3.715,
178
+ },
179
+ width: 1,
180
+ height: 0.45,
181
+ pins: [
182
+ {
183
+ pinId: "SW4.1",
184
+ x: 3.3100000000000005,
185
+ y: 3.665,
186
+ },
187
+ {
188
+ pinId: "SW4.2",
189
+ x: 4.3100000000000005,
190
+ y: 3.665,
191
+ },
192
+ ],
193
+ },
194
+ {
195
+ chipId: "schematic_component_8",
196
+ center: {
197
+ x: 2.6100000000000003,
198
+ y: 3.715,
199
+ },
200
+ width: 1.04,
201
+ height: 0.54,
202
+ pins: [
203
+ {
204
+ pinId: "D4.1",
205
+ x: 2.0900000000000003,
206
+ y: 3.715,
207
+ },
208
+ {
209
+ pinId: "D4.2",
210
+ x: 3.1300000000000003,
211
+ y: 3.715,
212
+ },
213
+ ],
214
+ },
215
+ {
216
+ chipId: "schematic_component_9",
217
+ center: {
218
+ x: 3.34,
219
+ y: 5.783333333333333,
220
+ },
221
+ width: 1,
222
+ height: 0.45,
223
+ pins: [
224
+ {
225
+ pinId: "SW5.1",
226
+ x: 2.84,
227
+ y: 5.733333333333333,
228
+ },
229
+ {
230
+ pinId: "SW5.2",
231
+ x: 3.84,
232
+ y: 5.733333333333333,
233
+ },
234
+ ],
235
+ },
236
+ {
237
+ chipId: "schematic_component_10",
238
+ center: {
239
+ x: 2.1399999999999997,
240
+ y: 5.783333333333333,
241
+ },
242
+ width: 1.040000000000001,
243
+ height: 0.54,
244
+ pins: [
245
+ {
246
+ pinId: "D5.1",
247
+ x: 1.6199999999999992,
248
+ y: 5.783333333333333,
249
+ },
250
+ {
251
+ pinId: "D5.2",
252
+ x: 2.66,
253
+ y: 5.783333333333333,
254
+ },
255
+ ],
256
+ },
257
+ {
258
+ chipId: "schematic_component_11",
259
+ center: {
260
+ x: 1.4249999999999998,
261
+ y: 2.17,
262
+ },
263
+ width: 1,
264
+ height: 0.45,
265
+ pins: [
266
+ {
267
+ pinId: "SW6.1",
268
+ x: 0.9249999999999998,
269
+ y: 2.12,
270
+ },
271
+ {
272
+ pinId: "SW6.2",
273
+ x: 1.9249999999999998,
274
+ y: 2.12,
275
+ },
276
+ ],
277
+ },
278
+ {
279
+ chipId: "schematic_component_12",
280
+ center: {
281
+ x: 0.22499999999999964,
282
+ y: 2.17,
283
+ },
284
+ width: 1.040000000000001,
285
+ height: 0.54,
286
+ pins: [
287
+ {
288
+ pinId: "D6.1",
289
+ x: -0.2950000000000008,
290
+ y: 2.17,
291
+ },
292
+ {
293
+ pinId: "D6.2",
294
+ x: 0.7450000000000001,
295
+ y: 2.17,
296
+ },
297
+ ],
298
+ },
299
+ {
300
+ chipId: "schematic_component_13",
301
+ center: {
302
+ x: 4.9799999999999995,
303
+ y: -3.4499999999999997,
304
+ },
305
+ width: 1,
306
+ height: 0.45,
307
+ pins: [
308
+ {
309
+ pinId: "SW7.1",
310
+ x: 4.4799999999999995,
311
+ y: -3.4999999999999996,
312
+ },
313
+ {
314
+ pinId: "SW7.2",
315
+ x: 5.4799999999999995,
316
+ y: -3.4999999999999996,
317
+ },
318
+ ],
319
+ },
320
+ {
321
+ chipId: "schematic_component_14",
322
+ center: {
323
+ x: 3.7799999999999994,
324
+ y: -3.4499999999999997,
325
+ },
326
+ width: 1.04,
327
+ height: 0.54,
328
+ pins: [
329
+ {
330
+ pinId: "D7.1",
331
+ x: 3.2599999999999993,
332
+ y: -3.4499999999999997,
333
+ },
334
+ {
335
+ pinId: "D7.2",
336
+ x: 4.299999999999999,
337
+ y: -3.4499999999999997,
338
+ },
339
+ ],
340
+ },
341
+ {
342
+ chipId: "schematic_component_15",
343
+ center: {
344
+ x: 2.944999999999998,
345
+ y: -6.048333333333334,
346
+ },
347
+ width: 1,
348
+ height: 0.45,
349
+ pins: [
350
+ {
351
+ pinId: "SW8.1",
352
+ x: 2.444999999999998,
353
+ y: -6.098333333333334,
354
+ },
355
+ {
356
+ pinId: "SW8.2",
357
+ x: 3.444999999999998,
358
+ y: -6.098333333333334,
359
+ },
360
+ ],
361
+ },
362
+ {
363
+ chipId: "schematic_component_16",
364
+ center: {
365
+ x: 1.744999999999998,
366
+ y: -6.048333333333334,
367
+ },
368
+ width: 1.04,
369
+ height: 0.54,
370
+ pins: [
371
+ {
372
+ pinId: "D8.1",
373
+ x: 1.224999999999998,
374
+ y: -6.048333333333334,
375
+ },
376
+ {
377
+ pinId: "D8.2",
378
+ x: 2.264999999999998,
379
+ y: -6.048333333333334,
380
+ },
381
+ ],
382
+ },
383
+ {
384
+ chipId: "schematic_component_17",
385
+ center: {
386
+ x: 4.409999999999998,
387
+ y: -7.788333333333336,
388
+ },
389
+ width: 1,
390
+ height: 0.45,
391
+ pins: [
392
+ {
393
+ pinId: "SW9.1",
394
+ x: 3.9099999999999984,
395
+ y: -7.838333333333335,
396
+ },
397
+ {
398
+ pinId: "SW9.2",
399
+ x: 4.909999999999998,
400
+ y: -7.838333333333335,
401
+ },
402
+ ],
403
+ },
404
+ {
405
+ chipId: "schematic_component_18",
406
+ center: {
407
+ x: 3.209999999999998,
408
+ y: -7.788333333333336,
409
+ },
410
+ width: 1.040000000000001,
411
+ height: 0.54,
412
+ pins: [
413
+ {
414
+ pinId: "D9.1",
415
+ x: 2.6899999999999977,
416
+ y: -7.788333333333336,
417
+ },
418
+ {
419
+ pinId: "D9.2",
420
+ x: 3.7299999999999986,
421
+ y: -7.788333333333336,
422
+ },
423
+ ],
424
+ },
425
+ ],
426
+ directConnections: [
427
+ {
428
+ pinIds: ["D1.2", "SW1.1"],
429
+ netId: ".D1 > .cathode to .SW1 > .pin1",
430
+ },
431
+ {
432
+ pinIds: ["D2.2", "SW2.1"],
433
+ netId: ".D2 > .cathode to .SW2 > .pin1",
434
+ },
435
+ {
436
+ pinIds: ["D3.2", "SW3.1"],
437
+ netId: ".D3 > .cathode to .SW3 > .pin1",
438
+ },
439
+ {
440
+ pinIds: ["D4.2", "SW4.1"],
441
+ netId: ".D4 > .cathode to .SW4 > .pin1",
442
+ },
443
+ {
444
+ pinIds: ["D5.2", "SW5.1"],
445
+ netId: ".D5 > .cathode to .SW5 > .pin1",
446
+ },
447
+ {
448
+ pinIds: ["D6.2", "SW6.1"],
449
+ netId: ".D6 > .cathode to .SW6 > .pin1",
450
+ },
451
+ {
452
+ pinIds: ["D7.2", "SW7.1"],
453
+ netId: ".D7 > .cathode to .SW7 > .pin1",
454
+ },
455
+ {
456
+ pinIds: ["D8.2", "SW8.1"],
457
+ netId: ".D8 > .cathode to .SW8 > .pin1",
458
+ },
459
+ {
460
+ pinIds: ["D9.2", "SW9.1"],
461
+ netId: ".D9 > .cathode to .SW9 > .pin1",
462
+ },
463
+ ],
464
+ netConnections: [
465
+ {
466
+ netId: "ROW0",
467
+ pinIds: ["J1.1", "D1.1", "D2.1", "D3.1"],
468
+ },
469
+ {
470
+ netId: "ROW1",
471
+ pinIds: ["J1.2", "D4.1", "D5.1", "D6.1"],
472
+ },
473
+ {
474
+ netId: "ROW2",
475
+ pinIds: ["J1.3", "D7.1", "D8.1", "D9.1"],
476
+ },
477
+ ],
478
+ availableNetLabelOrientations: {
479
+ ROW0: ["x-", "x+"],
480
+ ROW1: ["x-", "x+"],
481
+ ROW2: ["x-", "x+"],
482
+ },
483
+ maxMspPairDistance: 5,
484
+ }
485
+
486
+ export default () => <PipelineDebugger inputProblem={inputProblem} />
@@ -411,7 +411,7 @@ export const inputProblem: InputProblem = {
411
411
  ],
412
412
  netConnections: [],
413
413
  availableNetLabelOrientations: {},
414
- maxMspPairDistance: 2,
414
+ maxMspPairDistance: 5,
415
415
  }
416
416
 
417
417
  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: