@tscircuit/schematic-trace-solver 0.0.90 → 0.0.92

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 (33) hide show
  1. package/dist/index.js +121 -2
  2. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/SchematicTraceSingleLineSolver2.ts +20 -14
  3. package/lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/calculateDirectShortPath.ts +161 -0
  4. package/lib/solvers/SchematicTracePipelineSolver/correctPinsInsideChip.ts +19 -0
  5. package/package.json +1 -1
  6. package/site/bug-reports/bug-report-20260707T230831Z.page.tsx +4 -0
  7. package/site/bug-reports/bug-report-20260708T053736Z.page.tsx +4 -0
  8. package/site/bug-reports/bug-report-20260708T055430Z.page.tsx +4 -0
  9. package/site/bug-reports/bug-report-20260708T095725Z.page.tsx +4 -0
  10. package/tests/bug-reports/bug-report-20260707T230831Z/__snapshots__/bug-report-20260707T230831Z.snap.svg +88 -0
  11. package/tests/bug-reports/bug-report-20260707T230831Z/bug-report-20260707T230831Z.json +347 -0
  12. package/tests/bug-reports/bug-report-20260707T230831Z/bug-report-20260707T230831Z.test.ts +12 -0
  13. package/tests/bug-reports/bug-report-20260708T053736Z/__snapshots__/bug-report-20260708T053736Z.snap.svg +52 -0
  14. package/tests/bug-reports/bug-report-20260708T053736Z/bug-report-20260708T053736Z.json +59 -0
  15. package/tests/bug-reports/bug-report-20260708T053736Z/bug-report-20260708T053736Z.test.ts +12 -0
  16. package/tests/bug-reports/bug-report-20260708T055430Z/__snapshots__/bug-report-20260708T055430Z.snap.svg +88 -0
  17. package/tests/bug-reports/bug-report-20260708T055430Z/bug-report-20260708T055430Z.json +263 -0
  18. package/tests/bug-reports/bug-report-20260708T055430Z/bug-report-20260708T055430Z.test.ts +12 -0
  19. package/tests/bug-reports/bug-report-20260708T095725Z/__snapshots__/bug-report-20260708T095725Z.snap.svg +87 -0
  20. package/tests/bug-reports/bug-report-20260708T095725Z/bug-report-20260708T095725Z.json +277 -0
  21. package/tests/bug-reports/bug-report-20260708T095725Z/bug-report-20260708T095725Z.test.ts +12 -0
  22. package/tests/repros/__snapshots__/repro-missing-trace-netlabel.snap.svg +62 -0
  23. package/tests/repros/__snapshots__/repro-netlabel-overlap-trace.snap.svg +60 -0
  24. package/tests/repros/__snapshots__/repro-rectifier-trace-overlap.snap.svg +58 -0
  25. package/tests/repros/__snapshots__/small-variant-resistor-facing-direction.snap.svg +86 -0
  26. package/tests/repros/assets/repro-missing-trace-netlabel.input.json +155 -0
  27. package/tests/repros/assets/repro-netlabel-overlap-trace.input.json +115 -0
  28. package/tests/repros/assets/repro-rectifier-trace-overlap.input.json +137 -0
  29. package/tests/repros/assets/small-variant-resistor-facing-direction.input.json +297 -0
  30. package/tests/repros/repro-missing-trace-netlabel.test.ts +14 -0
  31. package/tests/repros/repro-netlabel-overlap-trace.test.ts +14 -0
  32. package/tests/repros/repro-rectifier-trace-overlap.test.ts +14 -0
  33. package/tests/repros/small-variant-resistor-facing-direction.test.ts +35 -0
@@ -0,0 +1,62 @@
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="11,8.399999999999999 9.1,6.8" data-type="line" data-label="" points="325.8571826217351,133.83206560019448 103.28424299580593,321.2619094957138" fill="none" stroke="hsl(154, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="11,9 12.03,5.3500000000000005" data-type="line" data-label="" points="325.8571826217351,63.54587413937452 446.51514462947557,491.12020552602803" fill="none" stroke="hsl(87, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="9.700000000000001,6.8 8.93,5.3500000000000005" data-type="line" data-label="" points="173.57043445662566,321.2619094957138 83.36982208190693,491.12020552602803" fill="none" stroke="hsl(56, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="9.870000000000001,5.3500000000000005 12.97,5.3500000000000005" data-type="line" data-label="" points="193.48485537052466,491.12020552602803 556.6301779180933,491.12020552602803" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="9.700000000000001,6.8 9.900000000000002,6.8 9.900000000000002,6.075 8.73,6.075 8.73,5.3500000000000005 8.93,5.3500000000000005" data-type="line" data-label="" points="173.57043445662566,321.2619094957138 196.9991649435658,321.2619094957138 196.9991649435658,406.1910575108709 59.94109159496702,406.1910575108709 59.94109159496702,491.12020552602803 83.36982208190693,491.12020552602803" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="11,8.399999999999999 11,7.6 8.9,7.6 8.9,6.8 9.1,6.8" data-type="line" data-label="" points="325.8571826217351,133.83206560019448 325.8571826217351,227.54698754795413 79.85551250886601,227.54698754795413 79.85551250886601,321.2619094957138 103.28424299580593,321.2619094957138" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="9.870000000000001,5.3500000000000005 10.07,5.3500000000000005 10.07,4.840544650000001 13.17,4.840544650000001 13.17,5.3500000000000005 12.97,5.3500000000000005" data-type="line" data-label="" points="193.48485537052466,491.12020552602803 216.91358585746457,491.12020552602803 216.91358585746457,550.7996659774262 580.0589084050332,550.7996659774262 580.0589084050332,491.12020552602803 556.6301779180933,491.12020552602803" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="11,9 11,9.100999999999999 10.549000000000001,9.100999999999999" data-type="line" data-label="" points="325.8571826217351,63.54587413937452 325.8571826217351,51.714365243469956 273.0253953736858,51.714365243469956" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="11.095" data-y="8.7" x="273.1425390261203" y="63.54587413937452" width="127.68658115382254" height="70.28619146081996" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008536527410714282"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="9.4" data-y="6.8" x="103.28424299580593" y="281.43306766791596" width="70.28619146081974" height="79.65768365559563" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008536527410714282"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="9.4" data-y="5.4" x="83.36982208190693" y="443.15511031809996" width="110.11503328861772" height="84.21582517238642" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008536527410714282"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="12.5" data-y="5.4" x="446.51514462947557" y="443.15511031809996" width="110.11503328861772" height="84.21582517238642" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008536527410714282"/></g><g><rect data-type="rect" data-label="netId: V3V3
2
+ globalConnNetId: connectivity_net0" data-x="9.95" data-y="7.81" x="167.71325183489057" y="178.3466535253802" width="70.28619146081974" height="49.200334022573884" fill="#ef444466" stroke="#ef4444" stroke-width="0.008536527410714282"/></g><g><rect data-type="rect" data-label="netId: RESET
3
+ globalConnNetId: connectivity_net1" data-x="10.189000000000002" data-y="9.100999999999999" x="188.68196562070204" y="40.000000000000114" width="84.34342975298364" height="23.428730486939685" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008536527410714282"/></g><g><rect data-type="rect" data-label="netId: RESET
4
+ globalConnNetId: connectivity_net1" data-x="11.669" data-y="5.3500000000000005" x="362.05457122405744" y="479.40584028255813" width="84.34342975298364" height="23.4287304869398" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008536527410714282"/></g><g><rect data-type="rect" data-label="netId: USBOOT
5
+ globalConnNetId: connectivity_net2" data-x="10.320000000000002" data-y="6.8" x="196.9991649435658" y="309.5475442522439" width="98.40066804514754" height="23.4287304869398" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008536527410714282"/></g><g><rect data-type="rect" data-label="netId: GND
6
+ globalConnNetId: connectivity_net3" data-x="10.07" data-y="4.630544650000001" x="188.79910927313665" y="550.7996659774262" width="56.228953168655835" height="49.200334022573884" fill="#00000066" stroke="#000000" stroke-width="0.008536527410714282"/></g><g><circle data-type="point" data-label="R3.1
7
+ y-" data-x="11" data-y="8.399999999999999" cx="325.8571826217351" cy="133.83206560019448" r="3" fill="hsl(348, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R3.2
8
+ y+" data-x="11" data-y="9" cx="325.8571826217351" cy="63.54587413937452" r="3" fill="hsl(349, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R2.1
9
+ x-" data-x="9.1" data-y="6.8" cx="103.28424299580593" cy="321.2619094957138" r="3" fill="hsl(107, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R2.2
10
+ x+" data-x="9.700000000000001" data-y="6.8" cx="173.57043445662566" cy="321.2619094957138" r="3" fill="hsl(108, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="SW3.1
11
+ x-" data-x="8.93" data-y="5.3500000000000005" cx="83.36982208190693" cy="491.12020552602803" r="3" fill="hsl(226, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="SW3.2
12
+ x+" data-x="9.870000000000001" data-y="5.3500000000000005" cx="193.48485537052466" cy="491.12020552602803" r="3" fill="hsl(227, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="SW2.1
13
+ x-" data-x="12.03" data-y="5.3500000000000005" cx="446.51514462947557" cy="491.12020552602803" r="3" fill="hsl(345, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="SW2.2
14
+ x+" data-x="12.97" data-y="5.3500000000000005" cx="556.6301779180933" cy="491.12020552602803" r="3" fill="hsl(346, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
15
+ orientation: y+" data-x="9.95" data-y="7.6" cx="202.85634756530044" cy="227.54698754795413" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
16
+ orientation: x-" data-x="10.549000000000001" data-y="9.100999999999999" cx="273.0253953736858" cy="51.714365243469956" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
17
+ orientation: x-" data-x="12.03" data-y="5.3500000000000005" cx="446.51514462947557" cy="491.12020552602803" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
18
+ orientation: x+" data-x="9.900000000000002" data-y="6.8" cx="196.9991649435658" cy="321.2619094957138" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
19
+ orientation: y-" data-x="10.07" data-y="4.840544650000001" cx="216.91358585746457" cy="550.7996659774262" 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[
20
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
21
+ const svg = e.currentTarget;
22
+ const rect = svg.getBoundingClientRect();
23
+ const x = e.clientX - rect.left;
24
+ const y = e.clientY - rect.top;
25
+ const crosshair = svg.getElementById('crosshair');
26
+ const h = svg.getElementById('crosshair-h');
27
+ const v = svg.getElementById('crosshair-v');
28
+ const coords = svg.getElementById('coordinates');
29
+
30
+ crosshair.style.display = 'block';
31
+ h.setAttribute('x1', '0');
32
+ h.setAttribute('x2', '640');
33
+ h.setAttribute('y1', y);
34
+ h.setAttribute('y2', y);
35
+ v.setAttribute('x1', x);
36
+ v.setAttribute('x2', x);
37
+ v.setAttribute('y1', '0');
38
+ v.setAttribute('y2', '640');
39
+
40
+ // Calculate real coordinates using inverse transformation
41
+ const matrix = {"a":117.1436524346996,"c":0,"e":-962.7229941599605,"b":0,"d":-117.1436524346996,"f":1117.838746051671};
42
+ // Manually invert and apply the affine transform
43
+ // Since we only use translate and scale, we can directly compute:
44
+ // x' = (x - tx) / sx
45
+ // y' = (y - ty) / sy
46
+ const sx = matrix.a;
47
+ const sy = matrix.d;
48
+ const tx = matrix.e;
49
+ const ty = matrix.f;
50
+ const realPoint = {
51
+ x: (x - tx) / sx,
52
+ y: (y - ty) / sy // Flip y back since we used negative scale
53
+ }
54
+
55
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
56
+ coords.setAttribute('x', (x + 5).toString());
57
+ coords.setAttribute('y', (y - 5).toString());
58
+ });
59
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
60
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
61
+ });
62
+ ]]></script></svg>
@@ -0,0 +1,60 @@
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="-4.475,2.9699999999999998 -2.38,3" data-type="line" data-label="" points="106.69131238447312,232.0887245841036 416.4879852125693,227.65249537892794" fill="none" stroke="hsl(192, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-3.5250000000000004,2.9699999999999998 -2.7,1.5" data-type="line" data-label="" points="247.17190388170047,232.0887245841036 369.1682070240295,449.463955637708" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-1.62,3 -3.3,1.5" data-type="line" data-label="" points="528.8724584103511,227.65249537892794 280.4436229205175,449.463955637708" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-3.5250000000000004,2.9699999999999998 -2.5,2.9699999999999998 -2.5,1.5 -2.7,1.5" data-type="line" data-label="" points="247.17190388170047,232.0887245841036 398.74306839186687,232.0887245841036 398.74306839186687,449.463955637708 369.1682070240295,449.463955637708" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-1.62,3 -1.3790000000000002,3 -1.3790000000000002,3.251" data-type="line" data-label="" points="528.8724584103511,227.65249537892794 564.5101663585951,227.65249537892794 564.5101663585951,190.5360443622921" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-3.3,1.5 -3.541,1.5 -3.541,1.9509999999999998" data-type="line" data-label="" points="280.4436229205175,449.463955637708 244.8059149722735,449.463955637708 244.8059149722735,382.77264325323483" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="-4" data-y="3" x="106.69131238447312" y="206.21072088724588" width="140.48059149722735" height="42.88354898336411" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.0067624999999999985"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="-2" data-y="3" x="416.48798521256936" y="190.68391866913123" width="112.3844731977818" height="73.93715341959341" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.0067624999999999985"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="-3" data-y="1.5" x="280.4436229205175" y="387.35674676524957" width="88.72458410351203" height="124.21441774491683" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.0067624999999999985"/></g><g><rect data-type="rect" data-label="netId: .B1 &gt; .pin1 to .SW1 &gt; .pin1
2
+ globalConnNetId: connectivity_net0" data-x="-4.701" data-y="2.9699999999999998" x="40" y="217.3012939001849" width="66.54343807763394" height="29.5748613678374" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.0067624999999999985"/></g><g><rect data-type="rect" data-label="netId: .B1 &gt; .pin1 to .SW1 &gt; .pin1
3
+ globalConnNetId: connectivity_net0" data-x="-2.606" data-y="3" x="349.79667282809606" y="212.86506469500927" width="66.54343807763405" height="29.574861367837343" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.0067624999999999985"/></g><g><rect data-type="rect" data-label="netId: GND
4
+ globalConnNetId: connectivity_net1" data-x="-3.2250000000000005" data-y="2.76" x="256.0443622920516" y="232.0887245841036" width="70.97966728280971" height="62.107208872458386" fill="#00000066" stroke="#000000" stroke-width="0.0067624999999999985"/></g><g><rect data-type="rect" data-label="netId: VCC
5
+ globalConnNetId: connectivity_net2" data-x="-1.3790000000000002" data-y="3.461" x="529.0203327171903" y="128.4288354898337" width="70.97966728280971" height="62.10720887245844" fill="#ef444466" stroke="#ef4444" stroke-width="0.0067624999999999985"/></g><g><rect data-type="rect" data-label="netId: VCC
6
+ globalConnNetId: connectivity_net2" data-x="-3.541" data-y="2.161" x="209.31608133086874" y="320.6654343807764" width="70.97966728280954" height="62.107208872458386" fill="#ef444466" stroke="#ef4444" stroke-width="0.0067624999999999985"/></g><g><circle data-type="point" data-label="B1.1
7
+ x-" data-x="-4.475" data-y="2.9699999999999998" cx="106.69131238447312" cy="232.0887245841036" r="3" fill="hsl(210, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="B1.2
8
+ x+" data-x="-3.5250000000000004" data-y="2.9699999999999998" cx="247.17190388170047" cy="232.0887245841036" r="3" fill="hsl(211, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="SW1.1
9
+ x-" data-x="-2.38" data-y="3" cx="416.4879852125693" cy="227.65249537892794" r="3" fill="hsl(104, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="SW1.2
10
+ x+" data-x="-1.62" data-y="3" cx="528.8724584103511" cy="227.65249537892794" r="3" fill="hsl(105, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="C3.1
11
+ x-" data-x="-3.3" data-y="1.5" cx="280.4436229205175" cy="449.463955637708" r="3" fill="hsl(243, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="C3.2
12
+ x+" data-x="-2.7" data-y="1.5" cx="369.1682070240295" cy="449.463955637708" r="3" fill="hsl(244, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
13
+ orientation: x-" data-x="-4.475" data-y="2.9699999999999998" cx="106.69131238447312" cy="232.0887245841036" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
14
+ orientation: x-" data-x="-2.38" data-y="3" cx="416.4879852125693" cy="227.65249537892794" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
15
+ orientation: y-" data-x="-3.2250000000000005" data-y="2.9699999999999998" cx="291.53419593345643" cy="232.0887245841036" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
16
+ orientation: y+" data-x="-1.3790000000000002" data-y="3.251" cx="564.5101663585951" cy="190.5360443622921" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
17
+ orientation: y+" data-x="-3.541" data-y="1.9509999999999998" cx="244.8059149722735" cy="382.77264325323483" 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[
18
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
19
+ const svg = e.currentTarget;
20
+ const rect = svg.getBoundingClientRect();
21
+ const x = e.clientX - rect.left;
22
+ const y = e.clientY - rect.top;
23
+ const crosshair = svg.getElementById('crosshair');
24
+ const h = svg.getElementById('crosshair-h');
25
+ const v = svg.getElementById('crosshair-v');
26
+ const coords = svg.getElementById('coordinates');
27
+
28
+ crosshair.style.display = 'block';
29
+ h.setAttribute('x1', '0');
30
+ h.setAttribute('x2', '640');
31
+ h.setAttribute('y1', y);
32
+ h.setAttribute('y2', y);
33
+ v.setAttribute('x1', x);
34
+ v.setAttribute('x2', x);
35
+ v.setAttribute('y1', '0');
36
+ v.setAttribute('y2', '640');
37
+
38
+ // Calculate real coordinates using inverse transformation
39
+ const matrix = {"a":147.87430683918672,"c":0,"e":768.4288354898337,"b":0,"d":-147.87430683918672,"f":671.2754158964881};
40
+ // Manually invert and apply the affine transform
41
+ // Since we only use translate and scale, we can directly compute:
42
+ // x' = (x - tx) / sx
43
+ // y' = (y - ty) / sy
44
+ const sx = matrix.a;
45
+ const sy = matrix.d;
46
+ const tx = matrix.e;
47
+ const ty = matrix.f;
48
+ const realPoint = {
49
+ x: (x - tx) / sx,
50
+ y: (y - ty) / sy // Flip y back since we used negative scale
51
+ }
52
+
53
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
54
+ coords.setAttribute('x', (x + 5).toString());
55
+ coords.setAttribute('y', (y - 5).toString());
56
+ });
57
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
58
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
59
+ });
60
+ ]]></script></svg>
@@ -0,0 +1,58 @@
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="-0.54,-0.0050000000000000044 -0.5000000000000002,1.3494553499999995" data-type="line" data-label="" points="79.25233644859813,395.52511635514014 84.48598130841118,218.30665934579443" fill="none" stroke="hsl(168, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.5399999999999998,1.3494553499999995 3.14,0.004999999999999413" data-type="line" data-label="" points="220.56074766355135,218.30665934579443 560.7476635514018,394.21670514018695" fill="none" stroke="hsl(128, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.5399999999999998,1.3494553499999995 1.84,0.004999999999999857" data-type="line" data-label="" points="220.56074766355135,218.30665934579443 390.65420560747657,394.2167051401869" fill="none" stroke="hsl(128, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.54,0.0049999999999999975 2.5400000000000005,0.004999999999999486" data-type="line" data-label="" points="220.56074766355138,394.2167051401869 482.24299065420564,394.21670514018695" fill="none" stroke="hsl(136, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="0.54,0.0049999999999999975 1.24,0.00499999999999993" data-type="line" data-label="" points="220.56074766355138,394.2167051401869 312.14953271028037,394.2167051401869" fill="none" stroke="hsl(136, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-0.54,-0.0050000000000000044 -0.74,-0.0050000000000000044 -0.74,1.3494553499999995 -0.5000000000000002,1.3494553499999995" data-type="line" data-label="" points="79.25233644859813,395.52511635514014 53.084112149532714,395.52511635514014 53.084112149532714,218.30665934579443 84.48598130841118,218.30665934579443" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="3.14,0.004999999999999413 3.3400000000000003,0.004999999999999413 3.3400000000000003,-0.5350000000000006 2.04,-0.5350000000000006 2.04,0.004999999999999857 1.84,0.004999999999999857" data-type="line" data-label="" points="560.7476635514018,394.21670514018695 586.9158878504672,394.21670514018695 586.9158878504672,464.8709107476636 416.82242990654197,464.8709107476636 416.82242990654197,394.2167051401869 390.65420560747657,394.2167051401869" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.5399999999999998,1.3494553499999995 2.04,1.3494553499999995 2.04,0.004999999999999857 1.84,0.004999999999999857" data-type="line" data-label="" points="220.56074766355135,218.30665934579443 416.82242990654197,218.30665934579443 416.82242990654197,394.2167051401869 390.65420560747657,394.2167051401869" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="0.54,0.0049999999999999975 1.24,0.00499999999999993" data-type="line" data-label="" points="220.56074766355138,394.2167051401869 312.14953271028037,394.2167051401869" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="2.5400000000000005,0.004999999999999486 2.3400000000000007,0.004999999999999486 2.3400000000000007,-0.6150000000000001 1.04,-0.6150000000000001 1.04,0.00499999999999993 1.24,0.00499999999999993" data-type="line" data-label="" points="482.24299065420564,394.21670514018695 456.07476635514024,394.21670514018695 456.07476635514024,475.33820046728965 285.98130841121497,475.33820046728965 285.98130841121497,394.2167051401869 312.14953271028037,394.2167051401869" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="0" data-y="0" x="79.25233644859813" y="341.2973135514019" width="141.30841121495325" height="107.14719439252326" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.007642857142857144"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="0.019999999999999796" data-y="1.4194553499999993" x="84.48598130841117" y="164.66179953271038" width="136.07476635514018" height="88.9719626168224" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.007642857142857144"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="2.8400000000000003" data-y="0.004999999999999449" x="482.2429906542056" y="349.7307238317758" width="78.5046728971962" height="88.9719626168224" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.007642857142857144"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="1.54" data-y="0.004999999999999893" x="312.14953271028037" y="339.2634341121495" width="78.5046728971962" height="109.90654205607473" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.007642857142857144"/></g><g><rect data-type="rect" data-label="netId: .V1 &gt; .pin1 to .D1 &gt; .anode
2
+ globalConnNetId: connectivity_net0" data-x="-0.74" data-y="-0.23" x="40.00000000000001" y="395.52511635514014" width="26.168224299065415" height="58.87850467289718" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.007642857142857144"/></g><g><rect data-type="rect" data-label="netId: .V1 &gt; .pin2 to .C1 &gt; .pin2
3
+ globalConnNetId: connectivity_net2" data-x="0.89" data-y="0.22999999999999998" x="253.27102803738313" y="335.3382004672897" width="26.16822429906543" height="58.87850467289718" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.007642857142857144"/></g><g><rect data-type="rect" data-label="netId: .D1 &gt; .cathode to .R1 &gt; .pin1
4
+ globalConnNetId: connectivity_net1" data-x="3.3400000000000003" data-y="0.22999999999999943" x="573.8317757009345" y="335.33820046728977" width="26.1682242990654" height="58.87850467289718" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.007642857142857144"/></g><g><circle data-type="point" data-label="V1.1
5
+ x-" data-x="-0.54" data-y="-0.0050000000000000044" cx="79.25233644859813" cy="395.52511635514014" r="3" fill="hsl(230, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="V1.2
6
+ x+" data-x="0.54" data-y="0.0049999999999999975" cx="220.56074766355138" cy="394.2167051401869" r="3" fill="hsl(231, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="D1.1
7
+ x-" data-x="-0.5000000000000002" data-y="1.3494553499999995" cx="84.48598130841118" cy="218.30665934579443" r="3" fill="hsl(32, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="D1.2
8
+ x+" data-x="0.5399999999999998" data-y="1.3494553499999995" cx="220.56074766355135" cy="218.30665934579443" r="3" fill="hsl(33, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R1.1
9
+ x+" data-x="3.14" data-y="0.004999999999999413" cx="560.7476635514018" cy="394.21670514018695" r="3" fill="hsl(226, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R1.2
10
+ x-" data-x="2.5400000000000005" data-y="0.004999999999999486" cx="482.24299065420564" cy="394.21670514018695" r="3" fill="hsl(227, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="C1.1
11
+ x+" data-x="1.84" data-y="0.004999999999999857" cx="390.65420560747657" cy="394.2167051401869" r="3" fill="hsl(121, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="C1.2
12
+ x-" data-x="1.24" data-y="0.00499999999999993" cx="312.14953271028037" cy="394.2167051401869" r="3" fill="hsl(122, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
13
+ orientation: y-" data-x="-0.74" data-y="-0.0050000000000000044" cx="53.084112149532714" cy="395.52511635514014" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
14
+ orientation: y+" data-x="0.89" data-y="0.004999999999999964" cx="266.35514018691583" cy="394.2167051401869" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
15
+ orientation: y+" data-x="3.3400000000000003" data-y="0.004999999999999413" cx="586.9158878504672" cy="394.21670514018695" 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[
16
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
17
+ const svg = e.currentTarget;
18
+ const rect = svg.getBoundingClientRect();
19
+ const x = e.clientX - rect.left;
20
+ const y = e.clientY - rect.top;
21
+ const crosshair = svg.getElementById('crosshair');
22
+ const h = svg.getElementById('crosshair-h');
23
+ const v = svg.getElementById('crosshair-v');
24
+ const coords = svg.getElementById('coordinates');
25
+
26
+ crosshair.style.display = 'block';
27
+ h.setAttribute('x1', '0');
28
+ h.setAttribute('x2', '640');
29
+ h.setAttribute('y1', y);
30
+ h.setAttribute('y2', y);
31
+ v.setAttribute('x1', x);
32
+ v.setAttribute('x2', x);
33
+ v.setAttribute('y1', '0');
34
+ v.setAttribute('y2', '640');
35
+
36
+ // Calculate real coordinates using inverse transformation
37
+ const matrix = {"a":130.8411214953271,"c":0,"e":149.90654205607476,"b":0,"d":-130.8411214953271,"f":394.8709107476635};
38
+ // Manually invert and apply the affine transform
39
+ // Since we only use translate and scale, we can directly compute:
40
+ // x' = (x - tx) / sx
41
+ // y' = (y - ty) / sy
42
+ const sx = matrix.a;
43
+ const sy = matrix.d;
44
+ const tx = matrix.e;
45
+ const ty = matrix.f;
46
+ const realPoint = {
47
+ x: (x - tx) / sx,
48
+ y: (y - ty) / sy // Flip y back since we used negative scale
49
+ }
50
+
51
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
52
+ coords.setAttribute('x', (x + 5).toString());
53
+ coords.setAttribute('y', (y - 5).toString());
54
+ });
55
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
56
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
57
+ });
58
+ ]]></script></svg>
@@ -0,0 +1,86 @@
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="8.9,15.1 8.9,14.7" data-type="line" data-label="" points="100.44213263979202,152.50975292587782 100.44213263979202,181.63849154746435" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="8.9,15.1 11.1,13.3" data-type="line" data-label="" points="100.44213263979202,152.50975292587782 260.6501950585176,283.5890767230169" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="8.9,14.7 11.1,13.3" data-type="line" data-label="" points="100.44213263979202,181.63849154746435 260.6501950585176,283.5890767230169" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="8.9,14.9 8.9,14.5" data-type="line" data-label="" points="100.44213263979202,167.07412223667097 100.44213263979202,196.2028608582575" fill="none" stroke="hsl(23, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="8.9,14.9 11.1,12.7" data-type="line" data-label="" points="100.44213263979202,167.07412223667097 260.6501950585176,327.2821846553967" fill="none" stroke="hsl(23, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="8.9,14.9 13.16,10" data-type="line" data-label="" points="100.44213263979202,167.07412223667097 410.663198959688,523.9011703511054" fill="none" stroke="hsl(23, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="8.9,14.5 11.1,12.7" data-type="line" data-label="" points="100.44213263979202,196.2028608582575 260.6501950585176,327.2821846553967" fill="none" stroke="hsl(23, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="8.9,14.5 13.16,10" data-type="line" data-label="" points="100.44213263979202,196.2028608582575 410.663198959688,523.9011703511054" fill="none" stroke="hsl(23, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="11.1,12.7 13.16,10" data-type="line" data-label="" points="260.6501950585176,327.2821846553967 410.663198959688,523.9011703511054" fill="none" stroke="hsl(23, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="11.1,15.5 14.84,10" data-type="line" data-label="" points="260.6501950585176,123.38101430429128 533.0039011703514,523.9011703511054" fill="none" stroke="hsl(50, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="8.9,14.7 8.600000000000001,14.7 8.600000000000001,15.1 8.9,15.1" data-type="line" data-label="" points="100.44213263979202,181.63849154746435 78.59557867360218,181.63849154746435 78.59557867360218,152.50975292587782 100.44213263979202,152.50975292587782" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="8.9,14.5 8.8,14.5 8.8,14.9 8.9,14.9" data-type="line" data-label="" points="100.44213263979202,196.2028608582575 93.15994798439544,196.2028608582575 93.15994798439544,167.07412223667097 100.44213263979202,167.07412223667097" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="11.1,12.7 12.129999999999999,12.7 12.129999999999999,10 13.16,10" data-type="line" data-label="" points="260.6501950585176,327.2821846553967 335.6566970091028,327.2821846553967 335.6566970091028,523.9011703511054 410.663198959688,523.9011703511054" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="11.1,15.5 15.04,15.5 15.04,10 14.84,10" data-type="line" data-label="" points="260.6501950585176,123.38101430429128 547.5682704811445,123.38101430429128 547.5682704811445,523.9011703511054 533.0039011703514,523.9011703511054" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="8.600000000000001,14.7 8.31,14.7 8.31,14.699" data-type="line" data-label="" points="78.59557867360218,181.63849154746435 57.477243172951944,181.63849154746435 57.477243172951944,181.71131339401813" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="11.1,13.3 12.341,13.3 12.341,13.249" data-type="line" data-label="" points="260.6501950585176,283.5890767230169 351.0221066319897,283.5890767230169 351.0221066319897,287.3029908972692" fill="none" stroke="purple" stroke-width="1px"/></g><g><rect data-type="rect" data-label="schematic_component_0" data-x="10" data-y="14" x="100.44213263979202" y="108.81664499349813" width="160.2080624187256" height="247.59427828348498" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.013732142857142852"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="14" data-y="10" x="410.6631989596879" y="499.1417425227569" width="122.34070221066338" height="49.51885565669704" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.013732142857142852"/></g><g><rect data-type="rect" data-label="ATMEGA328P_AU" data-x="10.080000000000002" data-y="12.17" x="129.57087126137844" y="359.3237971391418" width="113.60208062418747" height="13.10793237971393" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.013732142857142852"/></g><g><rect data-type="rect" data-label="U_MCU" data-x="9.600000000000001" data-y="15.815" x="125.2015604681406" y="91.33940182054607" width="52.431729518855605" height="18.20546163849167" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.013732142857142852"/></g><g><rect data-type="rect" data-label="netId: GND
2
+ globalConnNetId: connectivity_net0" data-x="8.31" data-y="14.488999999999999" x="40" y="181.71131339401813" width="34.95448634590389" height="30.585175552665987" fill="#00000066" stroke="#000000" stroke-width="0.013732142857142852"/></g><g><rect data-type="rect" data-label="netId: GND
3
+ globalConnNetId: connectivity_net0" data-x="12.341" data-y="13.039" x="333.5448634590378" y="287.30299089726924" width="34.954486345903774" height="30.585175552665874" fill="#00000066" stroke="#000000" stroke-width="0.013732142857142852"/></g><g><rect data-type="rect" data-label="netId: VCC_3V3
4
+ globalConnNetId: connectivity_net1" data-x="11.614999999999998" data-y="12.91" x="263.1989596879063" y="296.69700910273076" width="69.90897269180766" height="30.585175552665874" fill="#ef444466" stroke="#ef4444" stroke-width="0.013732142857142852"/></g><g><rect data-type="rect" data-label="netId: FAULT
5
+ globalConnNetId: connectivity_net2" data-x="15.399999999999999" data-y="15.5" x="547.5682704811444" y="116.09882964889471" width="52.43172951885549" height="14.564369310793154" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.013732142857142852"/></g><g><circle data-type="point" data-label="U_MCU.1
6
+ x-" data-x="8.9" data-y="15.5" cx="100.44213263979202" cy="123.38101430429128" r="3" fill="hsl(144, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.2
7
+ x-" data-x="8.9" data-y="15.3" cx="100.44213263979202" cy="137.94538361508444" r="3" fill="hsl(145, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.3
8
+ x-" data-x="8.9" data-y="15.1" cx="100.44213263979202" cy="152.50975292587782" r="3" fill="hsl(146, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.4
9
+ x-" data-x="8.9" data-y="14.9" cx="100.44213263979202" cy="167.07412223667097" r="3" fill="hsl(147, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.5
10
+ x-" data-x="8.9" data-y="14.7" cx="100.44213263979202" cy="181.63849154746435" r="3" fill="hsl(148, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.6
11
+ x-" data-x="8.9" data-y="14.5" cx="100.44213263979202" cy="196.2028608582575" r="3" fill="hsl(149, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.7
12
+ x-" data-x="8.9" data-y="14.3" cx="100.44213263979202" cy="210.76723016905066" r="3" fill="hsl(150, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.8
13
+ x-" data-x="8.9" data-y="14.1" cx="100.44213263979202" cy="225.33159947984404" r="3" fill="hsl(151, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.9
14
+ x-" data-x="8.9" data-y="13.9" cx="100.44213263979202" cy="239.8959687906372" r="3" fill="hsl(152, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.10
15
+ x-" data-x="8.9" data-y="13.700000000000001" cx="100.44213263979202" cy="254.46033810143035" r="3" fill="hsl(192, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.11
16
+ x-" data-x="8.9" data-y="13.5" cx="100.44213263979202" cy="269.02470741222373" r="3" fill="hsl(193, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.12
17
+ x-" data-x="8.9" data-y="13.3" cx="100.44213263979202" cy="283.5890767230169" r="3" fill="hsl(194, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.13
18
+ x-" data-x="8.9" data-y="13.1" cx="100.44213263979202" cy="298.15344603381016" r="3" fill="hsl(195, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.14
19
+ x-" data-x="8.9" data-y="12.9" cx="100.44213263979202" cy="312.7178153446034" r="3" fill="hsl(196, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.15
20
+ x-" data-x="8.9" data-y="12.7" cx="100.44213263979202" cy="327.2821846553967" r="3" fill="hsl(197, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.16
21
+ x-" data-x="8.9" data-y="12.5" cx="100.44213263979202" cy="341.84655396618996" r="3" fill="hsl(198, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.17
22
+ x+" data-x="11.1" data-y="12.5" cx="260.6501950585176" cy="341.84655396618996" r="3" fill="hsl(199, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.18
23
+ x+" data-x="11.1" data-y="12.7" cx="260.6501950585176" cy="327.2821846553967" r="3" fill="hsl(200, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.19
24
+ x+" data-x="11.1" data-y="12.9" cx="260.6501950585176" cy="312.7178153446034" r="3" fill="hsl(201, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.20
25
+ x+" data-x="11.1" data-y="13.1" cx="260.6501950585176" cy="298.15344603381016" r="3" fill="hsl(223, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.21
26
+ x+" data-x="11.1" data-y="13.3" cx="260.6501950585176" cy="283.5890767230169" r="3" fill="hsl(224, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.22
27
+ x+" data-x="11.1" data-y="13.5" cx="260.6501950585176" cy="269.02470741222373" r="3" fill="hsl(225, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.23
28
+ x+" data-x="11.1" data-y="13.7" cx="260.6501950585176" cy="254.46033810143047" r="3" fill="hsl(226, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.24
29
+ x+" data-x="11.1" data-y="13.9" cx="260.6501950585176" cy="239.8959687906372" r="3" fill="hsl(227, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.25
30
+ x+" data-x="11.1" data-y="14.1" cx="260.6501950585176" cy="225.33159947984404" r="3" fill="hsl(228, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.26
31
+ x+" data-x="11.1" data-y="14.299999999999999" cx="260.6501950585176" cy="210.7672301690509" r="3" fill="hsl(229, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.27
32
+ x+" data-x="11.1" data-y="14.5" cx="260.6501950585176" cy="196.2028608582575" r="3" fill="hsl(230, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.28
33
+ x+" data-x="11.1" data-y="14.7" cx="260.6501950585176" cy="181.63849154746435" r="3" fill="hsl(231, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.29
34
+ x+" data-x="11.1" data-y="14.9" cx="260.6501950585176" cy="167.07412223667097" r="3" fill="hsl(232, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.30
35
+ x+" data-x="11.1" data-y="15.1" cx="260.6501950585176" cy="152.50975292587782" r="3" fill="hsl(254, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.31
36
+ x+" data-x="11.1" data-y="15.3" cx="260.6501950585176" cy="137.94538361508444" r="3" fill="hsl(255, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.32
37
+ x+" data-x="11.1" data-y="15.5" cx="260.6501950585176" cy="123.38101430429128" r="3" fill="hsl(256, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R_FAULT_PULLUP.1
38
+ x-" data-x="13.16" data-y="10" cx="410.663198959688" cy="523.9011703511054" r="3" fill="hsl(344, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R_FAULT_PULLUP.2
39
+ x+" data-x="14.84" data-y="10" cx="533.0039011703514" cy="523.9011703511054" r="3" fill="hsl(344, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
40
+ orientation: y-" data-x="8.31" data-y="14.699" cx="57.477243172951944" cy="181.71131339401813" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
41
+ orientation: y-" data-x="12.341" data-y="13.249" cx="351.0221066319897" cy="287.3029908972692" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
42
+ orientation: y+" data-x="11.614999999999998" data-y="12.7" cx="298.15344603381016" cy="327.2821846553967" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
43
+ orientation: x+" data-x="15.04" data-y="15.5" cx="547.5682704811445" cy="123.38101430429128" 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[
44
+ document.currentScript.parentElement.addEventListener('mousemove', (e) => {
45
+ const svg = e.currentTarget;
46
+ const rect = svg.getBoundingClientRect();
47
+ const x = e.clientX - rect.left;
48
+ const y = e.clientY - rect.top;
49
+ const crosshair = svg.getElementById('crosshair');
50
+ const h = svg.getElementById('crosshair-h');
51
+ const v = svg.getElementById('crosshair-v');
52
+ const coords = svg.getElementById('coordinates');
53
+
54
+ crosshair.style.display = 'block';
55
+ h.setAttribute('x1', '0');
56
+ h.setAttribute('x2', '640');
57
+ h.setAttribute('y1', y);
58
+ h.setAttribute('y2', y);
59
+ v.setAttribute('x1', x);
60
+ v.setAttribute('x2', x);
61
+ v.setAttribute('y1', '0');
62
+ v.setAttribute('y2', '640');
63
+
64
+ // Calculate real coordinates using inverse transformation
65
+ const matrix = {"a":72.82184655396621,"c":0,"e":-547.6723016905073,"b":0,"d":-72.82184655396621,"f":1252.1196358907675};
66
+ // Manually invert and apply the affine transform
67
+ // Since we only use translate and scale, we can directly compute:
68
+ // x' = (x - tx) / sx
69
+ // y' = (y - ty) / sy
70
+ const sx = matrix.a;
71
+ const sy = matrix.d;
72
+ const tx = matrix.e;
73
+ const ty = matrix.f;
74
+ const realPoint = {
75
+ x: (x - tx) / sx,
76
+ y: (y - ty) / sy // Flip y back since we used negative scale
77
+ }
78
+
79
+ coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
80
+ coords.setAttribute('x', (x + 5).toString());
81
+ coords.setAttribute('y', (y - 5).toString());
82
+ });
83
+ document.currentScript.parentElement.addEventListener('mouseleave', () => {
84
+ document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
85
+ });
86
+ ]]></script></svg>
@@ -0,0 +1,155 @@
1
+ {
2
+ "chips": [
3
+ {
4
+ "chipId": "schematic_component_0",
5
+ "center": {
6
+ "x": 11.095,
7
+ "y": 8.7
8
+ },
9
+ "width": 1.0899999999999999,
10
+ "height": 0.6000000000000014,
11
+ "pins": [
12
+ {
13
+ "pinId": "R3.1",
14
+ "x": 11,
15
+ "y": 8.399999999999999,
16
+ "_facingDirection": "y-"
17
+ },
18
+ {
19
+ "pinId": "R3.2",
20
+ "x": 11,
21
+ "y": 9,
22
+ "_facingDirection": "y+"
23
+ }
24
+ ],
25
+ "sectionId": "boot"
26
+ },
27
+ {
28
+ "chipId": "schematic_component_1",
29
+ "center": {
30
+ "x": 9.4,
31
+ "y": 6.8
32
+ },
33
+ "width": 0.6000000000000014,
34
+ "height": 0.6799999999999997,
35
+ "pins": [
36
+ {
37
+ "pinId": "R2.1",
38
+ "x": 9.1,
39
+ "y": 6.8,
40
+ "_facingDirection": "x-"
41
+ },
42
+ {
43
+ "pinId": "R2.2",
44
+ "x": 9.700000000000001,
45
+ "y": 6.8,
46
+ "_facingDirection": "x+"
47
+ }
48
+ ],
49
+ "sectionId": "boot"
50
+ },
51
+ {
52
+ "chipId": "schematic_component_2",
53
+ "center": {
54
+ "x": 9.4,
55
+ "y": 5.4
56
+ },
57
+ "width": 0.9400000000000013,
58
+ "height": 0.7189106999999986,
59
+ "pins": [
60
+ {
61
+ "pinId": "SW3.1",
62
+ "x": 8.93,
63
+ "y": 5.3500000000000005,
64
+ "_facingDirection": "x-"
65
+ },
66
+ {
67
+ "pinId": "SW3.2",
68
+ "x": 9.870000000000001,
69
+ "y": 5.3500000000000005,
70
+ "_facingDirection": "x+"
71
+ }
72
+ ],
73
+ "sectionId": "boot"
74
+ },
75
+ {
76
+ "chipId": "schematic_component_3",
77
+ "center": {
78
+ "x": 12.5,
79
+ "y": 5.4
80
+ },
81
+ "width": 0.9400000000000013,
82
+ "height": 0.7189106999999986,
83
+ "pins": [
84
+ {
85
+ "pinId": "SW2.1",
86
+ "x": 12.03,
87
+ "y": 5.3500000000000005,
88
+ "_facingDirection": "x-"
89
+ },
90
+ {
91
+ "pinId": "SW2.2",
92
+ "x": 12.97,
93
+ "y": 5.3500000000000005,
94
+ "_facingDirection": "x+"
95
+ }
96
+ ],
97
+ "sectionId": "boot"
98
+ }
99
+ ],
100
+ "directConnections": [],
101
+ "netConnections": [
102
+ {
103
+ "netId": "V3V3",
104
+ "pinIds": [
105
+ "R3.1",
106
+ "R2.1"
107
+ ],
108
+ "netLabelWidth": 0.42,
109
+ "netLabelHeight": 0.6
110
+ },
111
+ {
112
+ "netId": "RESET",
113
+ "pinIds": [
114
+ "R3.2",
115
+ "SW2.1"
116
+ ],
117
+ "netLabelWidth": 0.72
118
+ },
119
+ {
120
+ "netId": "USBOOT",
121
+ "pinIds": [
122
+ "R2.2",
123
+ "SW3.1"
124
+ ],
125
+ "netLabelWidth": 0.84
126
+ },
127
+ {
128
+ "netId": "GND",
129
+ "pinIds": [
130
+ "SW3.2",
131
+ "SW2.2"
132
+ ],
133
+ "netLabelWidth": 0.42,
134
+ "netLabelHeight": 0.48
135
+ }
136
+ ],
137
+ "textBoxes": [],
138
+ "availableNetLabelOrientations": {
139
+ "V3V3": [
140
+ "y+"
141
+ ],
142
+ "RESET": [
143
+ "x-",
144
+ "x+"
145
+ ],
146
+ "USBOOT": [
147
+ "x-",
148
+ "x+"
149
+ ],
150
+ "GND": [
151
+ "y-"
152
+ ]
153
+ },
154
+ "maxMspPairDistance": 2.4
155
+ }
@@ -0,0 +1,115 @@
1
+ {
2
+ "chips": [
3
+ {
4
+ "chipId": "schematic_component_0",
5
+ "center": {
6
+ "x": -4,
7
+ "y": 3
8
+ },
9
+ "width": 0.9499999999999997,
10
+ "height": 0.29000000000000004,
11
+ "pins": [
12
+ {
13
+ "pinId": "B1.1",
14
+ "x": -4.45,
15
+ "y": 2.9699999999999998,
16
+ "_facingDirection": "x-"
17
+ },
18
+ {
19
+ "pinId": "B1.2",
20
+ "x": -3.55,
21
+ "y": 2.9699999999999998,
22
+ "_facingDirection": "x+"
23
+ }
24
+ ],
25
+ "sectionId": "power"
26
+ },
27
+ {
28
+ "chipId": "schematic_component_1",
29
+ "center": {
30
+ "x": -2,
31
+ "y": 3
32
+ },
33
+ "width": 0.7599999999999998,
34
+ "height": 0.5,
35
+ "pins": [
36
+ {
37
+ "pinId": "SW1.1",
38
+ "x": -2.38,
39
+ "y": 3,
40
+ "_facingDirection": "x-"
41
+ },
42
+ {
43
+ "pinId": "SW1.2",
44
+ "x": -1.62,
45
+ "y": 3,
46
+ "_facingDirection": "x+"
47
+ }
48
+ ],
49
+ "sectionId": "power"
50
+ },
51
+ {
52
+ "chipId": "schematic_component_2",
53
+ "center": {
54
+ "x": -3,
55
+ "y": 1.5
56
+ },
57
+ "width": 0.5999999999999996,
58
+ "height": 0.8399999999999999,
59
+ "pins": [
60
+ {
61
+ "pinId": "C3.1",
62
+ "x": -3.3,
63
+ "y": 1.5,
64
+ "_facingDirection": "x-"
65
+ },
66
+ {
67
+ "pinId": "C3.2",
68
+ "x": -2.7,
69
+ "y": 1.5,
70
+ "_facingDirection": "x+"
71
+ }
72
+ ],
73
+ "sectionId": "power"
74
+ }
75
+ ],
76
+ "directConnections": [
77
+ {
78
+ "pinIds": [
79
+ "B1.1",
80
+ "SW1.1"
81
+ ],
82
+ "netId": ".B1 > .pin1 to .SW1 > .pin1"
83
+ }
84
+ ],
85
+ "netConnections": [
86
+ {
87
+ "netId": "GND",
88
+ "pinIds": [
89
+ "B1.2",
90
+ "C3.2"
91
+ ],
92
+ "netLabelWidth": 0.42,
93
+ "netLabelHeight": 0.48
94
+ },
95
+ {
96
+ "netId": "VCC",
97
+ "pinIds": [
98
+ "SW1.2",
99
+ "C3.1"
100
+ ],
101
+ "netLabelWidth": 0.42,
102
+ "netLabelHeight": 0.48
103
+ }
104
+ ],
105
+ "textBoxes": [],
106
+ "availableNetLabelOrientations": {
107
+ "VCC": [
108
+ "y+"
109
+ ],
110
+ "GND": [
111
+ "y-"
112
+ ]
113
+ },
114
+ "maxMspPairDistance": 2.4
115
+ }