@tscircuit/schematic-trace-solver 0.0.87 → 0.0.88

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 (113) hide show
  1. package/.agents/skills/schematic-trace-visualization/SKILL.md +115 -0
  2. package/.github/scripts/import-json-bug-report.ts +15 -1
  3. package/.github/workflows/json-bug-report.yml +3 -2
  4. package/AGENTS.md +22 -0
  5. package/lib/testing/PipelineStageDebugRunner.ts +344 -0
  6. package/package.json +3 -2
  7. package/scripts/debug-pipeline-stages.ts +146 -0
  8. package/site/bug-reports/bug-report-20260706T220324Z.page.tsx +4 -0
  9. package/site/bug-reports/bug-report-20260707T020342Z.page.tsx +4 -0
  10. package/site/bug-reports/bug-report-20260707T092615Z.page.tsx +4 -0
  11. package/site/bug-reports/bug-report-20260707T134549Z.page.tsx +4 -0
  12. package/site/bug-reports/bug-report-20260707T134722Z.page.tsx +4 -0
  13. package/site/bug-reports/bug-report-20260707T140410Z.page.tsx +4 -0
  14. package/site/bug-reports/bug-report-20260707T141025Z.page.tsx +4 -0
  15. package/site/bug-reports/bug-report-20260707T141421Z.page.tsx +4 -0
  16. package/tests/bug-reports/bug-report-20260706T220324Z/__snapshots__/bug-report-20260706T220324Z.snap.svg +357 -3448
  17. package/tests/bug-reports/bug-report-20260707T020342Z/__snapshots__/bug-report-20260707T020342Z.snap.svg +64 -0
  18. package/tests/bug-reports/bug-report-20260707T020342Z/bug-report-20260707T020342Z.json +233 -0
  19. package/tests/bug-reports/bug-report-20260707T020342Z/bug-report-20260707T020342Z.test.ts +12 -0
  20. package/tests/bug-reports/bug-report-20260707T092615Z/__snapshots__/bug-report-20260707T092615Z.snap.svg +2098 -0
  21. package/tests/bug-reports/bug-report-20260707T092615Z/bug-report-20260707T092615Z.json +1392 -0
  22. package/tests/bug-reports/bug-report-20260707T092615Z/bug-report-20260707T092615Z.test.ts +12 -0
  23. package/tests/bug-reports/bug-report-20260707T134549Z/__snapshots__/bug-report-20260707T134549Z.snap.svg +857 -0
  24. package/tests/bug-reports/bug-report-20260707T134549Z/bug-report-20260707T134549Z.json +652 -0
  25. package/tests/bug-reports/bug-report-20260707T134549Z/bug-report-20260707T134549Z.test.ts +12 -0
  26. package/tests/bug-reports/bug-report-20260707T134722Z/__snapshots__/bug-report-20260707T134722Z.snap.svg +275 -0
  27. package/tests/bug-reports/bug-report-20260707T134722Z/bug-report-20260707T134722Z.json +265 -0
  28. package/tests/bug-reports/bug-report-20260707T134722Z/bug-report-20260707T134722Z.test.ts +12 -0
  29. package/tests/bug-reports/bug-report-20260707T140410Z/__snapshots__/bug-report-20260707T140410Z.snap.svg +950 -0
  30. package/tests/bug-reports/bug-report-20260707T140410Z/bug-report-20260707T140410Z.json +610 -0
  31. package/tests/bug-reports/bug-report-20260707T140410Z/bug-report-20260707T140410Z.test.ts +12 -0
  32. package/tests/bug-reports/bug-report-20260707T141025Z/__snapshots__/bug-report-20260707T141025Z.snap.svg +218 -0
  33. package/tests/bug-reports/bug-report-20260707T141025Z/bug-report-20260707T141025Z.json +185 -0
  34. package/tests/bug-reports/bug-report-20260707T141025Z/bug-report-20260707T141025Z.test.ts +12 -0
  35. package/tests/bug-reports/bug-report-20260707T141421Z/__snapshots__/bug-report-20260707T141421Z.snap.svg +613 -0
  36. package/tests/bug-reports/bug-report-20260707T141421Z/bug-report-20260707T141421Z.json +499 -0
  37. package/tests/bug-reports/bug-report-20260707T141421Z/bug-report-20260707T141421Z.test.ts +12 -0
  38. package/tests/examples/__snapshots__/example01.snap.svg +59 -162
  39. package/tests/examples/__snapshots__/example02.snap.svg +64 -273
  40. package/tests/examples/__snapshots__/example03.snap.svg +85 -290
  41. package/tests/examples/__snapshots__/example04.snap.svg +50 -94
  42. package/tests/examples/__snapshots__/example05.snap.svg +73 -191
  43. package/tests/examples/__snapshots__/example06.snap.svg +49 -95
  44. package/tests/examples/__snapshots__/example07.snap.svg +65 -218
  45. package/tests/examples/__snapshots__/example08.snap.svg +61 -143
  46. package/tests/examples/__snapshots__/example09.snap.svg +123 -493
  47. package/tests/examples/__snapshots__/example10.snap.svg +57 -136
  48. package/tests/examples/__snapshots__/example11.snap.svg +64 -173
  49. package/tests/examples/__snapshots__/example12.snap.svg +58 -159
  50. package/tests/examples/__snapshots__/example13.snap.svg +78 -348
  51. package/tests/examples/__snapshots__/example14.snap.svg +77 -293
  52. package/tests/examples/__snapshots__/example15.snap.svg +140 -984
  53. package/tests/examples/__snapshots__/example16.snap.svg +62 -162
  54. package/tests/examples/__snapshots__/example17.snap.svg +67 -198
  55. package/tests/examples/__snapshots__/example18.snap.svg +69 -249
  56. package/tests/examples/__snapshots__/example19.snap.svg +63 -202
  57. package/tests/examples/__snapshots__/example20.snap.svg +60 -148
  58. package/tests/examples/__snapshots__/example21.snap.svg +73 -298
  59. package/tests/examples/__snapshots__/example22.snap.svg +62 -156
  60. package/tests/examples/__snapshots__/example23.snap.svg +66 -172
  61. package/tests/examples/__snapshots__/example24.snap.svg +64 -164
  62. package/tests/examples/__snapshots__/example25.snap.svg +76 -299
  63. package/tests/examples/__snapshots__/example26.snap.svg +64 -164
  64. package/tests/examples/__snapshots__/example27.snap.svg +83 -300
  65. package/tests/examples/__snapshots__/example28.snap.svg +54 -115
  66. package/tests/examples/__snapshots__/example29.snap.svg +257 -1299
  67. package/tests/examples/__snapshots__/example30.snap.svg +91 -293
  68. package/tests/examples/__snapshots__/example31.snap.svg +47 -88
  69. package/tests/examples/__snapshots__/example32.snap.svg +107 -405
  70. package/tests/examples/__snapshots__/example33.snap.svg +71 -180
  71. package/tests/examples/__snapshots__/example34.snap.svg +55 -116
  72. package/tests/examples/__snapshots__/example35.snap.svg +69 -176
  73. package/tests/examples/__snapshots__/example36.snap.svg +65 -159
  74. package/tests/examples/__snapshots__/example37.snap.svg +75 -223
  75. package/tests/examples/__snapshots__/example38.snap.svg +46 -76
  76. package/tests/examples/__snapshots__/example39.snap.svg +51 -106
  77. package/tests/examples/__snapshots__/example40.snap.svg +83 -270
  78. package/tests/examples/__snapshots__/example41.snap.svg +54 -118
  79. package/tests/examples/__snapshots__/example42.snap.svg +67 -194
  80. package/tests/examples/__snapshots__/example43.snap.svg +62 -168
  81. package/tests/examples/__snapshots__/example44.snap.svg +86 -369
  82. package/tests/examples/__snapshots__/example45.snap.svg +60 -169
  83. package/tests/examples/__snapshots__/example46.snap.svg +80 -342
  84. package/tests/examples/__snapshots__/example47.snap.svg +82 -323
  85. package/tests/examples/__snapshots__/example48.snap.svg +64 -167
  86. package/tests/examples/__snapshots__/example49.snap.svg +120 -565
  87. package/tests/examples/__snapshots__/example50.snap.svg +71 -189
  88. package/tests/fixtures/getLastStepGraphicsObject.ts +38 -0
  89. package/tests/fixtures/getLastStepSvg.ts +9 -0
  90. package/tests/repros/__snapshots__/bugreport-001-gnd-overlap.snap.svg +67 -218
  91. package/tests/repros/__snapshots__/manufacturePartNumber-text-box.snap.svg +47 -87
  92. package/tests/repros/__snapshots__/netlabel-connector-through-rail-label.snap.svg +73 -272
  93. package/tests/repros/__snapshots__/repro-atmega328p-fault-pullup.snap.svg +284 -0
  94. package/tests/repros/__snapshots__/repro-atmega328p-missing-gnd-netlabel.snap.svg +470 -0
  95. package/tests/repros/__snapshots__/repro-bq24074-battery-charger.snap.svg +94 -395
  96. package/tests/repros/__snapshots__/repro-cc2340r5.snap.svg +88 -467
  97. package/tests/repros/__snapshots__/repro-ina237-current-monitor.snap.svg +109 -569
  98. package/tests/repros/__snapshots__/repro130-bq27441-fuel-gauge-trace-through-c1.snap.svg +95 -459
  99. package/tests/repros/__snapshots__/repro51-overlap-junction-crossing.snap.svg +64 -176
  100. package/tests/repros/__snapshots__/trace-overlap-box-resistor.snap.svg +51 -112
  101. package/tests/repros/assets/repro-atmega328p-fault-pullup.input.json +239 -0
  102. package/tests/repros/assets/repro-atmega328p-missing-gnd-netlabel.input.json +432 -0
  103. package/tests/repros/repro-atmega328p-fault-pullup.test.ts +11 -0
  104. package/tests/repros/repro-atmega328p-missing-gnd-netlabel.test.ts +16 -0
  105. package/tests/solvers/SchematicTraceSingleLineSolver2/__snapshots__/SchematicTraceSingleLineSolver2_01-example17-d1_1-u1_1.snap.svg +59 -159
  106. package/tests/solvers/TraceCleanupSolver/__snapshots__/TraceCleanupSolver.snap.svg +54 -118
  107. package/tests/solvers/TraceLabelOverlapAvoidanceSolver/__snapshots__/TraceLabelOverlapAvoidanceSolver.snap.svg +58 -245
  108. package/tests/solvers/TraceLabelOverlapAvoidanceSolver/renderComparisonView/__snapshots__/renderComparisonView01.snap.svg +73 -222
  109. package/tests/solvers/TraceLabelOverlapAvoidanceSolver/renderComparisonView/__snapshots__/renderComparisonView02.snap.svg +65 -204
  110. package/tests/solvers/TraceLabelOverlapAvoidanceSolver/renderComparisonView/__snapshots__/renderComparisonView03.snap.svg +65 -183
  111. package/tests/solvers/TraceLabelOverlapAvoidanceSolver/sub-solver/__snapshots__/MergedNetLabelObstacles.snap.svg +54 -139
  112. package/tests/solvers/TraceLabelOverlapAvoidanceSolver/sub-solver/__snapshots__/OverlapAvoidanceStepSolver.snap.svg +61 -215
  113. package/tests/solvers/TraceLabelOverlapAvoidanceSolver/sub-solver/__snapshots__/SingleOverlapSolver.snap.svg +54 -124
@@ -1,119 +1,55 @@
1
- <svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg">
2
- <rect width="100%" height="100%" fill="white" />
3
- <g>
4
- <circle data-type="point" data-label="U3.24
5
- x-" data-x="-7.65" data-y="-0.22999999999999998" cx="325.9574468085108" cy="308.0851063829787" r="3" fill="hsl(74, 100%, 50%, 0.8)" />
6
- </g>
7
- <g>
8
- <circle data-type="point" data-label="U3.25
9
- x-" data-x="-7.65" data-y="-0.43000000000000016" cx="325.9574468085108" cy="331.9148936170213" r="3" fill="hsl(75, 100%, 50%, 0.8)" />
10
- </g>
11
- <g>
12
- <circle data-type="point" data-label="U3.26
13
- x-" data-x="-7.65" data-y="-0.6300000000000001" cx="325.9574468085108" cy="355.74468085106383" r="3" fill="hsl(76, 100%, 50%, 0.8)" />
14
- </g>
15
- <g>
16
- <circle data-type="point" data-label="R5.1
17
- x-" data-x="-10.05" data-y="-0.4299999999999997" cx="40.00000000000023" cy="331.9148936170212" r="3" fill="hsl(110, 100%, 50%, 0.8)" />
18
- </g>
19
- <g>
20
- <circle data-type="point" data-label="R5.2
21
- x+" data-x="-8.95" data-y="-0.4299999999999997" cx="171.06382978723423" cy="331.9148936170212" r="3" fill="hsl(111, 100%, 50%, 0.8)" />
22
- </g>
23
- <g>
24
- <circle data-type="point" data-label="anchorPoint
25
- orientation: x-" data-x="-7.65" data-y="-0.22999999999999998" cx="325.9574468085108" cy="308.0851063829787" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
26
- </g>
27
- <g>
28
- <circle data-type="point" data-label="anchorPoint
29
- orientation: y+" data-x="-8.65" data-y="-0.4299999999999998" cx="206.808510638298" cy="331.9148936170212" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
30
- </g>
31
- <g>
32
- <circle data-type="point" data-label="anchorPoint
33
- orientation: x-" data-x="-7.65" data-y="-0.6300000000000001" cx="325.9574468085108" cy="355.74468085106383" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
34
- </g>
35
- <g>
36
- <polyline data-points="-7.65,-0.43000000000000016 -8.95,-0.4299999999999997" data-type="line" data-label="" points="325.9574468085108,331.9148936170213 171.06382978723423,331.9148936170212" fill="none" stroke="hsl(80, 100%, 50%, 0.8)" stroke-width="1" />
37
- </g>
38
- <g>
39
- <polyline data-points="-7.65,-0.43000000000000016 -8.95,-0.4299999999999997" data-type="line" data-label="" points="325.9574468085108,331.9148936170213 171.06382978723423,331.9148936170212" fill="none" stroke="hsl(88, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
40
- </g>
41
- <g>
42
- <polyline data-points="-7.65,-0.43000000000000016 -8.95,-0.4299999999999997" data-type="line" data-label="" points="325.9574468085108,331.9148936170213 171.06382978723423,331.9148936170212" fill="none" stroke="purple" stroke-width="1" />
43
- </g>
44
- <g>
45
- <rect data-type="rect" data-label="schematic_component_0" data-x="-6.5" data-y="-0.33" x="325.9574468085108" y="230.63829787234044" width="274.04255319148933" height="178.7234042553191" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008392857142857145" />
46
- </g>
47
- <g>
48
- <rect data-type="rect" data-label="schematic_component_4" data-x="-9.5" data-y="-0.4299999999999997" x="40.00000000000023" y="308.7457455319149" width="131.063829787234" height="46.33829617021263" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008392857142857145" />
49
- </g>
50
- <g>
51
- <rect data-type="rect" data-label="netId: SWCLK
52
- globalConnNetId: connectivity_net1" data-x="-8.011" data-y="-0.22999999999999998" x="240.0510638297876" y="296.17021276595744" width="85.78723404255311" height="23.829787234042556" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008392857142857145" />
53
- </g>
54
- <g>
55
- <rect data-type="rect" data-label="netId: SWD
56
- globalConnNetId: connectivity_net0" data-x="-8.65" data-y="-0.18989999999999985" x="178.2127659574469" y="274.7114893617021" width="57.191489361702224" height="57.19148936170211" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008392857142857145" />
57
- </g>
58
- <g>
59
- <rect data-type="rect" data-label="netId: CLK
60
- globalConnNetId: connectivity_net2" data-x="-8.011" data-y="-0.6300000000000001" x="240.0510638297876" y="343.82978723404256" width="85.78723404255311" height="23.829787234042556" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008392857142857145" />
61
- </g>
62
- <g id="crosshair" style="display: none">
63
- <line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
64
- <line id="crosshair-v" x1="0" x2="640" stroke="#666" stroke-width="0.5" /><text id="coordinates" font-family="monospace" font-size="12" fill="#666"></text>
65
- </g>
66
- <script>
67
- <![CDATA[
68
- document.currentScript.parentElement.addEventListener('mousemove', (e) => {
69
- const svg = e.currentTarget;
70
- const rect = svg.getBoundingClientRect();
71
- const x = e.clientX - rect.left;
72
- const y = e.clientY - rect.top;
73
- const crosshair = svg.getElementById('crosshair');
74
- const h = svg.getElementById('crosshair-h');
75
- const v = svg.getElementById('crosshair-v');
76
- const coords = svg.getElementById('coordinates');
1
+ <svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="white"/><g><polyline data-points="-7.65,-0.43000000000000016 -8.95,-0.4299999999999997" data-type="line" data-label="" points="325.9574468085108,331.9148936170213 171.06382978723423,331.9148936170212" fill="none" stroke="hsl(80, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-7.65,-0.43000000000000016 -8.95,-0.4299999999999997" data-type="line" data-label="" points="325.9574468085108,331.9148936170213 171.06382978723423,331.9148936170212" fill="none" stroke="hsl(88, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-7.65,-0.43000000000000016 -8.95,-0.4299999999999997" data-type="line" data-label="" points="325.9574468085108,331.9148936170213 171.06382978723423,331.9148936170212" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="-6.5" data-y="-0.33" x="325.9574468085108" y="230.63829787234044" width="274.04255319148933" height="178.7234042553191" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008392857142857145"/></g><g><rect data-type="rect" data-label="schematic_component_4" data-x="-9.5" data-y="-0.4299999999999997" x="40.00000000000034" y="308.7457455319149" width="131.063829787234" height="46.33829617021263" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008392857142857145"/></g><g><rect data-type="rect" data-label="netId: SWCLK
2
+ globalConnNetId: connectivity_net1" data-x="-8.011" data-y="-0.22999999999999998" x="240.0510638297875" y="296.17021276595744" width="85.78723404255311" height="23.829787234042556" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008392857142857145"/></g><g><rect data-type="rect" data-label="netId: SWD
3
+ globalConnNetId: connectivity_net0" data-x="-8.65" data-y="-0.18989999999999985" x="178.2127659574469" y="274.7114893617021" width="57.191489361702224" height="57.19148936170211" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008392857142857145"/></g><g><rect data-type="rect" data-label="netId: CLK
4
+ globalConnNetId: connectivity_net2" data-x="-8.011" data-y="-0.6300000000000001" x="240.0510638297875" y="343.82978723404256" width="85.78723404255311" height="23.829787234042556" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008392857142857145"/></g><g><circle data-type="point" data-label="U3.24
5
+ x-" data-x="-7.65" data-y="-0.22999999999999998" cx="325.9574468085108" cy="308.0851063829787" r="3" fill="hsl(74, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U3.25
6
+ x-" data-x="-7.65" data-y="-0.43000000000000016" cx="325.9574468085108" cy="331.9148936170213" r="3" fill="hsl(75, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U3.26
7
+ x-" data-x="-7.65" data-y="-0.6300000000000001" cx="325.9574468085108" cy="355.74468085106383" r="3" fill="hsl(76, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R5.1
8
+ x-" data-x="-10.05" data-y="-0.4299999999999997" cx="40.00000000000023" cy="331.9148936170212" r="3" fill="hsl(110, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R5.2
9
+ x+" data-x="-8.95" data-y="-0.4299999999999997" cx="171.06382978723423" cy="331.9148936170212" r="3" fill="hsl(111, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
10
+ orientation: x-" data-x="-7.65" data-y="-0.22999999999999998" cx="325.9574468085108" cy="308.0851063829787" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
11
+ orientation: y+" data-x="-8.65" data-y="-0.4299999999999998" cx="206.808510638298" cy="331.9148936170212" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
12
+ orientation: x-" data-x="-7.65" data-y="-0.6300000000000001" cx="325.9574468085108" cy="355.74468085106383" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g id="crosshair" style="display: none"><line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5"/><line id="crosshair-v" x1="0" x2="640" stroke="#666" stroke-width="0.5"/><text id="coordinates" font-family="monospace" font-size="12" fill="#666"></text></g><script><![CDATA[
13
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
14
+ const svg = e.currentTarget;
15
+ const rect = svg.getBoundingClientRect();
16
+ const x = e.clientX - rect.left;
17
+ const y = e.clientY - rect.top;
18
+ const crosshair = svg.getElementById('crosshair');
19
+ const h = svg.getElementById('crosshair-h');
20
+ const v = svg.getElementById('crosshair-v');
21
+ const coords = svg.getElementById('coordinates');
22
+
23
+ crosshair.style.display = 'block';
24
+ h.setAttribute('x1', '0');
25
+ h.setAttribute('x2', '640');
26
+ h.setAttribute('y1', y);
27
+ h.setAttribute('y2', y);
28
+ v.setAttribute('x1', x);
29
+ v.setAttribute('x2', x);
30
+ v.setAttribute('y1', '0');
31
+ v.setAttribute('y2', '640');
77
32
 
78
- crosshair.style.display = 'block';
79
- h.setAttribute('x1', '0');
80
- h.setAttribute('x2', '640');
81
- h.setAttribute('y1', y);
82
- h.setAttribute('y2', y);
83
- v.setAttribute('x1', x);
84
- v.setAttribute('x2', x);
85
- v.setAttribute('y1', '0');
86
- v.setAttribute('y2', '640');
87
-
88
- // Calculate real coordinates using inverse transformation
89
- const matrix = {
90
- "a": 119.14893617021274,
91
- "c": 0,
92
- "e": 1237.4468085106382,
93
- "b": 0,
94
- "d": -119.14893617021274,
95
- "f": 280.6808510638298
96
- };
97
- // Manually invert and apply the affine transform
98
- // Since we only use translate and scale, we can directly compute:
99
- // x' = (x - tx) / sx
100
- // y' = (y - ty) / sy
101
- const sx = matrix.a;
102
- const sy = matrix.d;
103
- const tx = matrix.e;
104
- const ty = matrix.f;
105
- const realPoint = {
106
- x: (x - tx) / sx,
107
- y: (y - ty) / sy // Flip y back since we used negative scale
108
- }
109
-
110
- coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
111
- coords.setAttribute('x', (x + 5).toString());
112
- coords.setAttribute('y', (y - 5).toString());
113
- });
114
- document.currentScript.parentElement.addEventListener('mouseleave', () => {
115
- document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
116
- });
117
- ]]>
118
- </script>
119
- </svg>
33
+ // Calculate real coordinates using inverse transformation
34
+ const matrix = {"a":119.14893617021274,"c":0,"e":1237.4468085106382,"b":0,"d":-119.14893617021274,"f":280.6808510638298};
35
+ // Manually invert and apply the affine transform
36
+ // Since we only use translate and scale, we can directly compute:
37
+ // x' = (x - tx) / sx
38
+ // y' = (y - ty) / sy
39
+ const sx = matrix.a;
40
+ const sy = matrix.d;
41
+ const tx = matrix.e;
42
+ const ty = matrix.f;
43
+ const realPoint = {
44
+ x: (x - tx) / sx,
45
+ y: (y - ty) / sy // Flip y back since we used negative scale
46
+ }
47
+
48
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
49
+ coords.setAttribute('x', (x + 5).toString());
50
+ coords.setAttribute('y', (y - 5).toString());
51
+ });
52
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
53
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
54
+ });
55
+ ]]></script></svg>
@@ -1,195 +1,68 @@
1
- <svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg">
2
- <rect width="100%" height="100%" fill="white" />
3
- <g>
4
- <circle data-type="point" data-label="U3.1
5
- x+" data-x="2.6" data-y="0.8499999999999999" cx="477.8947368421052" cy="194.5684210526316" r="3" fill="hsl(81, 100%, 50%, 0.8)" />
6
- </g>
7
- <g>
8
- <circle data-type="point" data-label="U3.2
9
- x+" data-x="2.6" data-y="0.6499999999999999" cx="477.8947368421052" cy="211.4105263157895" r="3" fill="hsl(82, 100%, 50%, 0.8)" />
10
- </g>
11
- <g>
12
- <circle data-type="point" data-label="U3.3
13
- x+" data-x="2.6" data-y="0.44999999999999996" cx="477.8947368421052" cy="228.2526315789474" r="3" fill="hsl(83, 100%, 50%, 0.8)" />
14
- </g>
15
- <g>
16
- <circle data-type="point" data-label="U3.4
17
- x+" data-x="2.6" data-y="0.10000000000000009" cx="477.8947368421052" cy="257.7263157894737" r="3" fill="hsl(84, 100%, 50%, 0.8)" />
18
- </g>
19
- <g>
20
- <circle data-type="point" data-label="U3.5
21
- x+" data-x="2.6" data-y="-0.09999999999999987" cx="477.8947368421052" cy="274.5684210526316" r="3" fill="hsl(85, 100%, 50%, 0.8)" />
22
- </g>
23
- <g>
24
- <circle data-type="point" data-label="U3.6
25
- x+" data-x="2.6" data-y="-0.44999999999999984" cx="477.8947368421052" cy="304.0421052631579" r="3" fill="hsl(86, 100%, 50%, 0.8)" />
26
- </g>
27
- <g>
28
- <circle data-type="point" data-label="U3.7
29
- x+" data-x="2.6" data-y="-0.6499999999999999" cx="477.8947368421052" cy="320.88421052631577" r="3" fill="hsl(87, 100%, 50%, 0.8)" />
30
- </g>
31
- <g>
32
- <circle data-type="point" data-label="U3.8
33
- x+" data-x="2.6" data-y="-0.8499999999999999" cx="477.8947368421052" cy="337.7263157894737" r="3" fill="hsl(88, 100%, 50%, 0.8)" />
34
- </g>
35
- <g>
36
- <circle data-type="point" data-label="R8.1
37
- x-" data-x="2.6500000000000004" data-y="-1.4" cx="482.1052631578947" cy="384.0421052631579" r="3" fill="hsl(113, 100%, 50%, 0.8)" />
38
- </g>
39
- <g>
40
- <circle data-type="point" data-label="R8.2
41
- x+" data-x="3.75" data-y="-1.4" cx="574.7368421052631" cy="384.0421052631579" r="3" fill="hsl(114, 100%, 50%, 0.8)" />
42
- </g>
43
- <g>
44
- <circle data-type="point" data-label="R9.1
45
- x-" data-x="2.6500000000000004" data-y="-2.4" cx="482.1052631578947" cy="468.25263157894733" r="3" fill="hsl(354, 100%, 50%, 0.8)" />
46
- </g>
47
- <g>
48
- <circle data-type="point" data-label="R9.2
49
- x+" data-x="3.75" data-y="-2.4" cx="574.7368421052631" cy="468.25263157894733" r="3" fill="hsl(355, 100%, 50%, 0.8)" />
50
- </g>
51
- <g>
52
- <circle data-type="point" data-label="anchorPoint
53
- orientation: y+" data-x="2.701" data-y="1.001" cx="486.4" cy="181.8526315789474" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
54
- </g>
55
- <g>
56
- <circle data-type="point" data-label="anchorPoint
57
- orientation: x+" data-x="2.6" data-y="0.6499999999999999" cx="477.8947368421052" cy="211.4105263157895" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
58
- </g>
59
- <g>
60
- <circle data-type="point" data-label="anchorPoint
61
- orientation: x+" data-x="2.6" data-y="0.44999999999999996" cx="477.8947368421052" cy="228.2526315789474" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
62
- </g>
63
- <g>
64
- <circle data-type="point" data-label="anchorPoint
65
- orientation: x+" data-x="2.61" data-y="0.10000000000000009" cx="478.7368421052631" cy="257.7263157894737" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
66
- </g>
67
- <g>
68
- <circle data-type="point" data-label="anchorPoint
69
- orientation: x+" data-x="2.6400000000000006" data-y="-0.09999999999999987" cx="481.2631578947369" cy="274.5684210526316" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
70
- </g>
71
- <g>
72
- <circle data-type="point" data-label="anchorPoint
73
- orientation: y-" data-x="3.95" data-y="-2.4" cx="591.578947368421" cy="468.25263157894733" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
74
- </g>
75
- <g>
76
- <polyline data-points="2.6,-0.8499999999999999 3.75,-1.4" data-type="line" data-label="" points="477.8947368421052,337.7263157894737 574.7368421052631,384.0421052631579" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
77
- </g>
78
- <g>
79
- <polyline data-points="2.6,-0.8499999999999999 3.75,-2.4" data-type="line" data-label="" points="477.8947368421052,337.7263157894737 574.7368421052631,468.25263157894733" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
80
- </g>
81
- <g>
82
- <polyline data-points="3.75,-1.4 3.75,-2.4" data-type="line" data-label="" points="574.7368421052631,384.0421052631579 574.7368421052631,468.25263157894733" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
83
- </g>
84
- <g>
85
- <polyline data-points="2.6,0.10000000000000009 2.6500000000000004,-1.4" data-type="line" data-label="" points="477.8947368421052,257.7263157894737 482.1052631578947,384.0421052631579" fill="none" stroke="hsl(273, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
86
- </g>
87
- <g>
88
- <polyline data-points="2.6,-0.09999999999999987 2.6500000000000004,-2.4" data-type="line" data-label="" points="477.8947368421052,274.5684210526316 482.1052631578947,468.25263157894733" fill="none" stroke="hsl(274, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
89
- </g>
90
- <g>
91
- <polyline data-points="3.75,-2.4 3.95,-2.4 3.95,-1.4 3.75,-1.4" data-type="line" data-label="" points="574.7368421052631,468.25263157894733 591.578947368421,468.25263157894733 591.578947368421,384.0421052631579 574.7368421052631,384.0421052631579" fill="none" stroke="purple" stroke-width="1" />
92
- </g>
93
- <g>
94
- <polyline data-points="2.6,-0.8499999999999999 3.95,-0.8499999999999999 3.95,-1.4 3.75,-1.4" data-type="line" data-label="" points="477.8947368421052,337.7263157894737 591.578947368421,337.7263157894737 591.578947368421,384.0421052631579 574.7368421052631,384.0421052631579" fill="none" stroke="purple" stroke-width="1" />
95
- </g>
96
- <g>
97
- <polyline data-points="2.6,0.10000000000000009 2.61,0.10000000000000009 2.61,-1.2 2.435,-1.2 2.435,-1.4 2.6500000000000004,-1.4" data-type="line" data-label="" points="477.8947368421052,257.7263157894737 478.7368421052631,257.7263157894737 478.7368421052631,367.2 463.99999999999994,367.2 463.99999999999994,384.0421052631579 482.1052631578947,384.0421052631579" fill="none" stroke="purple" stroke-width="1" />
98
- </g>
99
- <g>
100
- <polyline data-points="2.6,-0.09999999999999987 2.6400000000000006,-0.09999999999999987 2.6400000000000006,-1.25 2.4650000000000007,-1.25 2.4650000000000007,-2.4 2.6500000000000004,-2.4" data-type="line" data-label="" points="477.8947368421052,274.5684210526316 481.2631578947369,274.5684210526316 481.2631578947369,371.41052631578947 466.5263157894737,371.41052631578947 466.5263157894737,468.25263157894733 482.1052631578947,468.25263157894733" fill="none" stroke="purple" stroke-width="1" />
101
- </g>
102
- <g>
103
- <polyline data-points="2.6,0.8499999999999999 2.701,0.8499999999999999 2.701,1.001" data-type="line" data-label="" points="477.8947368421052,194.5684210526316 486.4,194.5684210526316 486.4,181.8526315789474" fill="none" stroke="purple" stroke-width="1" />
104
- </g>
105
- <g>
106
- <rect data-type="rect" data-label="schematic_component_16" data-x="0" data-y="0" x="39.99999999999997" y="181.93684210526317" width="437.8947368421052" height="168.42105263157896" fill="hsl(320, 100%, 50%, 0.8)" stroke="black" stroke-width="0.011875000000000002" />
107
- </g>
108
- <g>
109
- <rect data-type="rect" data-label="schematic_component_17" data-x="3.2" data-y="-1.4" x="482.1052631578947" y="351.24586526315795" width="92.63157894736844" height="65.59247999999991" fill="hsl(320, 100%, 50%, 0.8)" stroke="black" stroke-width="0.011875000000000002" />
110
- </g>
111
- <g>
112
- <rect data-type="rect" data-label="schematic_component_18" data-x="3.2" data-y="-2.4" x="482.1052631578947" y="435.45639157894743" width="92.63157894736844" height="65.59247999999985" fill="hsl(320, 100%, 50%, 0.8)" stroke="black" stroke-width="0.011875000000000002" />
113
- </g>
114
- <g>
115
- <rect data-type="rect" data-label="netId: VBUS
116
- globalConnNetId: connectivity_net3" data-x="2.701" data-y="1.301" x="477.978947368421" y="131.3263157894737" width="16.84210526315792" height="50.5263157894737" fill="#ef444466" stroke="#ef4444" stroke-width="0.011875000000000002" />
117
- </g>
118
- <g>
119
- <rect data-type="rect" data-label="netId: D_PLUS
120
- globalConnNetId: connectivity_net2" data-x="3.021" data-y="0.6499999999999999" x="477.978947368421" y="202.98947368421057" width="70.73684210526312" height="16.84210526315789" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.011875000000000002" />
121
- </g>
122
- <g>
123
- <rect data-type="rect" data-label="netId: D_MINUS
124
- globalConnNetId: connectivity_net1" data-x="3.081" data-y="0.44999999999999996" x="477.978947368421" y="219.83157894736846" width="80.8421052631578" height="16.84210526315789" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.011875000000000002" />
125
- </g>
126
- <g>
127
- <rect data-type="rect" data-label="netId: CC1
128
- globalConnNetId: connectivity_net4" data-x="2.8499999999999996" data-y="0.10000000000000009" x="478.73684210526307" y="249.30526315789476" width="40.421052631579016" height="16.84210526315789" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.011875000000000002" />
129
- </g>
130
- <g>
131
- <rect data-type="rect" data-label="netId: CC2
132
- globalConnNetId: connectivity_net5" data-x="2.880000000000001" data-y="-0.09999999999999987" x="481.2631578947369" y="266.14736842105265" width="40.42105263157896" height="16.842105263157862" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.011875000000000002" />
133
- </g>
134
- <g>
135
- <rect data-type="rect" data-label="netId: GND
136
- globalConnNetId: connectivity_net0" data-x="3.95" data-y="-2.6399999999999997" x="583.1578947368421" y="468.25263157894733" width="16.84210526315792" height="40.42105263157896" fill="#00000066" stroke="#000000" stroke-width="0.011875000000000002" />
137
- </g>
138
- <g id="crosshair" style="display: none">
139
- <line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
140
- <line id="crosshair-v" x1="0" x2="640" stroke="#666" stroke-width="0.5" /><text id="coordinates" font-family="monospace" font-size="12" fill="#666"></text>
141
- </g>
142
- <script>
143
- <![CDATA[
144
- document.currentScript.parentElement.addEventListener('mousemove', (e) => {
145
- const svg = e.currentTarget;
146
- const rect = svg.getBoundingClientRect();
147
- const x = e.clientX - rect.left;
148
- const y = e.clientY - rect.top;
149
- const crosshair = svg.getElementById('crosshair');
150
- const h = svg.getElementById('crosshair-h');
151
- const v = svg.getElementById('crosshair-v');
152
- const coords = svg.getElementById('coordinates');
1
+ <svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="white"/><g><polyline data-points="2.6,-0.8499999999999999 3.75,-1.4" data-type="line" data-label="" points="477.8947368421052,337.7263157894737 574.7368421052631,384.0421052631579" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="2.6,-0.8499999999999999 3.75,-2.4" data-type="line" data-label="" points="477.8947368421052,337.7263157894737 574.7368421052631,468.25263157894733" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="3.75,-1.4 3.75,-2.4" data-type="line" data-label="" points="574.7368421052631,384.0421052631579 574.7368421052631,468.25263157894733" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="2.6,0.10000000000000009 2.6500000000000004,-1.4" data-type="line" data-label="" points="477.8947368421052,257.7263157894737 482.1052631578947,384.0421052631579" fill="none" stroke="hsl(273, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="2.6,-0.09999999999999987 2.6500000000000004,-2.4" data-type="line" data-label="" points="477.8947368421052,274.5684210526316 482.1052631578947,468.25263157894733" fill="none" stroke="hsl(274, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="3.75,-2.4 3.95,-2.4 3.95,-1.4 3.75,-1.4" data-type="line" data-label="" points="574.7368421052631,468.25263157894733 591.578947368421,468.25263157894733 591.578947368421,384.0421052631579 574.7368421052631,384.0421052631579" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.6,-0.8499999999999999 3.95,-0.8499999999999999 3.95,-1.4 3.75,-1.4" data-type="line" data-label="" points="477.8947368421052,337.7263157894737 591.578947368421,337.7263157894737 591.578947368421,384.0421052631579 574.7368421052631,384.0421052631579" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.6,0.10000000000000009 2.61,0.10000000000000009 2.61,-1.2 2.435,-1.2 2.435,-1.4 2.6500000000000004,-1.4" data-type="line" data-label="" points="477.8947368421052,257.7263157894737 478.7368421052631,257.7263157894737 478.7368421052631,367.2 463.99999999999994,367.2 463.99999999999994,384.0421052631579 482.1052631578947,384.0421052631579" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.6,-0.09999999999999987 2.6400000000000006,-0.09999999999999987 2.6400000000000006,-1.25 2.4650000000000007,-1.25 2.4650000000000007,-2.4 2.6500000000000004,-2.4" data-type="line" data-label="" points="477.8947368421052,274.5684210526316 481.2631578947369,274.5684210526316 481.2631578947369,371.41052631578947 466.5263157894737,371.41052631578947 466.5263157894737,468.25263157894733 482.1052631578947,468.25263157894733" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.6,0.8499999999999999 2.701,0.8499999999999999 2.701,1.001" data-type="line" data-label="" points="477.8947368421052,194.5684210526316 486.4,194.5684210526316 486.4,181.8526315789474" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_16" data-x="0" data-y="0" x="40" y="181.93684210526317" width="437.8947368421052" height="168.42105263157896" fill="hsl(320, 100%, 50%, 0.8)" stroke="black" stroke-width="0.011875000000000002"/></g><g><rect data-type="rect" data-label="schematic_component_17" data-x="3.2" data-y="-1.4" x="482.10526315789474" y="351.24586526315795" width="92.63157894736844" height="65.59247999999991" fill="hsl(320, 100%, 50%, 0.8)" stroke="black" stroke-width="0.011875000000000002"/></g><g><rect data-type="rect" data-label="schematic_component_18" data-x="3.2" data-y="-2.4" x="482.10526315789474" y="435.45639157894743" width="92.63157894736844" height="65.59247999999985" fill="hsl(320, 100%, 50%, 0.8)" stroke="black" stroke-width="0.011875000000000002"/></g><g><rect data-type="rect" data-label="netId: VBUS
2
+ globalConnNetId: connectivity_net3" data-x="2.701" data-y="1.301" x="477.978947368421" y="131.3263157894737" width="16.84210526315792" height="50.5263157894737" fill="#ef444466" stroke="#ef4444" stroke-width="0.011875000000000002"/></g><g><rect data-type="rect" data-label="netId: D_PLUS
3
+ globalConnNetId: connectivity_net2" data-x="3.021" data-y="0.6499999999999999" x="477.978947368421" y="202.98947368421057" width="70.73684210526312" height="16.84210526315789" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.011875000000000002"/></g><g><rect data-type="rect" data-label="netId: D_MINUS
4
+ globalConnNetId: connectivity_net1" data-x="3.081" data-y="0.44999999999999996" x="477.97894736842096" y="219.83157894736843" width="80.8421052631578" height="16.84210526315789" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.011875000000000002"/></g><g><rect data-type="rect" data-label="netId: CC1
5
+ globalConnNetId: connectivity_net4" data-x="2.8499999999999996" data-y="0.10000000000000009" x="478.736842105263" y="249.30526315789473" width="40.421052631579016" height="16.84210526315789" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.011875000000000002"/></g><g><rect data-type="rect" data-label="netId: CC2
6
+ globalConnNetId: connectivity_net5" data-x="2.880000000000001" data-y="-0.09999999999999987" x="481.2631578947369" y="266.14736842105265" width="40.42105263157896" height="16.842105263157862" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.011875000000000002"/></g><g><rect data-type="rect" data-label="netId: GND
7
+ globalConnNetId: connectivity_net0" data-x="3.95" data-y="-2.6399999999999997" x="583.1578947368421" y="468.25263157894733" width="16.84210526315792" height="40.42105263157896" fill="#00000066" stroke="#000000" stroke-width="0.011875000000000002"/></g><g><circle data-type="point" data-label="U3.1
8
+ x+" data-x="2.6" data-y="0.8499999999999999" cx="477.8947368421052" cy="194.5684210526316" r="3" fill="hsl(81, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U3.2
9
+ x+" data-x="2.6" data-y="0.6499999999999999" cx="477.8947368421052" cy="211.4105263157895" r="3" fill="hsl(82, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U3.3
10
+ x+" data-x="2.6" data-y="0.44999999999999996" cx="477.8947368421052" cy="228.2526315789474" r="3" fill="hsl(83, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U3.4
11
+ x+" data-x="2.6" data-y="0.10000000000000009" cx="477.8947368421052" cy="257.7263157894737" r="3" fill="hsl(84, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U3.5
12
+ x+" data-x="2.6" data-y="-0.09999999999999987" cx="477.8947368421052" cy="274.5684210526316" r="3" fill="hsl(85, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U3.6
13
+ x+" data-x="2.6" data-y="-0.44999999999999984" cx="477.8947368421052" cy="304.0421052631579" r="3" fill="hsl(86, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U3.7
14
+ x+" data-x="2.6" data-y="-0.6499999999999999" cx="477.8947368421052" cy="320.88421052631577" r="3" fill="hsl(87, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U3.8
15
+ x+" data-x="2.6" data-y="-0.8499999999999999" cx="477.8947368421052" cy="337.7263157894737" r="3" fill="hsl(88, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R8.1
16
+ x-" data-x="2.6500000000000004" data-y="-1.4" cx="482.1052631578947" cy="384.0421052631579" r="3" fill="hsl(113, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R8.2
17
+ x+" data-x="3.75" data-y="-1.4" cx="574.7368421052631" cy="384.0421052631579" r="3" fill="hsl(114, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R9.1
18
+ x-" data-x="2.6500000000000004" data-y="-2.4" cx="482.1052631578947" cy="468.25263157894733" r="3" fill="hsl(354, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R9.2
19
+ x+" data-x="3.75" data-y="-2.4" cx="574.7368421052631" cy="468.25263157894733" r="3" fill="hsl(355, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
20
+ orientation: y+" data-x="2.701" data-y="1.001" cx="486.4" cy="181.8526315789474" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
21
+ orientation: x+" data-x="2.6" data-y="0.6499999999999999" cx="477.8947368421052" cy="211.4105263157895" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
22
+ orientation: x+" data-x="2.6" data-y="0.44999999999999996" cx="477.8947368421052" cy="228.2526315789474" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
23
+ orientation: x+" data-x="2.61" data-y="0.10000000000000009" cx="478.7368421052631" cy="257.7263157894737" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
24
+ orientation: x+" data-x="2.6400000000000006" data-y="-0.09999999999999987" cx="481.2631578947369" cy="274.5684210526316" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
25
+ orientation: y-" data-x="3.95" data-y="-2.4" cx="591.578947368421" cy="468.25263157894733" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g id="crosshair" style="display: none"><line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5"/><line id="crosshair-v" x1="0" x2="640" stroke="#666" stroke-width="0.5"/><text id="coordinates" font-family="monospace" font-size="12" fill="#666"></text></g><script><![CDATA[
26
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
27
+ const svg = e.currentTarget;
28
+ const rect = svg.getBoundingClientRect();
29
+ const x = e.clientX - rect.left;
30
+ const y = e.clientY - rect.top;
31
+ const crosshair = svg.getElementById('crosshair');
32
+ const h = svg.getElementById('crosshair-h');
33
+ const v = svg.getElementById('crosshair-v');
34
+ const coords = svg.getElementById('coordinates');
35
+
36
+ crosshair.style.display = 'block';
37
+ h.setAttribute('x1', '0');
38
+ h.setAttribute('x2', '640');
39
+ h.setAttribute('y1', y);
40
+ h.setAttribute('y2', y);
41
+ v.setAttribute('x1', x);
42
+ v.setAttribute('x2', x);
43
+ v.setAttribute('y1', '0');
44
+ v.setAttribute('y2', '640');
153
45
 
154
- crosshair.style.display = 'block';
155
- h.setAttribute('x1', '0');
156
- h.setAttribute('x2', '640');
157
- h.setAttribute('y1', y);
158
- h.setAttribute('y2', y);
159
- v.setAttribute('x1', x);
160
- v.setAttribute('x2', x);
161
- v.setAttribute('y1', '0');
162
- v.setAttribute('y2', '640');
163
-
164
- // Calculate real coordinates using inverse transformation
165
- const matrix = {
166
- "a": 84.21052631578947,
167
- "c": 0,
168
- "e": 258.9473684210526,
169
- "b": 0,
170
- "d": -84.21052631578947,
171
- "f": 266.14736842105265
172
- };
173
- // Manually invert and apply the affine transform
174
- // Since we only use translate and scale, we can directly compute:
175
- // x' = (x - tx) / sx
176
- // y' = (y - ty) / sy
177
- const sx = matrix.a;
178
- const sy = matrix.d;
179
- const tx = matrix.e;
180
- const ty = matrix.f;
181
- const realPoint = {
182
- x: (x - tx) / sx,
183
- y: (y - ty) / sy // Flip y back since we used negative scale
184
- }
185
-
186
- coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
187
- coords.setAttribute('x', (x + 5).toString());
188
- coords.setAttribute('y', (y - 5).toString());
189
- });
190
- document.currentScript.parentElement.addEventListener('mouseleave', () => {
191
- document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
192
- });
193
- ]]>
194
- </script>
195
- </svg>
46
+ // Calculate real coordinates using inverse transformation
47
+ const matrix = {"a":84.21052631578947,"c":0,"e":258.9473684210526,"b":0,"d":-84.21052631578947,"f":266.14736842105265};
48
+ // Manually invert and apply the affine transform
49
+ // Since we only use translate and scale, we can directly compute:
50
+ // x' = (x - tx) / sx
51
+ // y' = (y - ty) / sy
52
+ const sx = matrix.a;
53
+ const sy = matrix.d;
54
+ const tx = matrix.e;
55
+ const ty = matrix.f;
56
+ const realPoint = {
57
+ x: (x - tx) / sx,
58
+ y: (y - ty) / sy // Flip y back since we used negative scale
59
+ }
60
+
61
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
62
+ coords.setAttribute('x', (x + 5).toString());
63
+ coords.setAttribute('y', (y - 5).toString());
64
+ });
65
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
66
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
67
+ });
68
+ ]]></script></svg>