@tscircuit/schematic-trace-solver 0.0.128 → 0.0.130
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.
- package/dist/index.d.ts +15 -6
- package/dist/index.js +97 -10
- package/lib/solvers/InlineNetLabelSolver/InlineNetLabelSolver.ts +142 -23
- package/lib/solvers/LongDistancePairSolver/LongDistancePairSolver.ts +23 -2
- package/package.json +1 -1
- package/site/bug-reports/bug-report-20260811T075142Z.page.tsx +4 -0
- package/tests/assets/inline-net-label02.json +112 -0
- package/tests/bug-reports/bug-report-20260706T220324Z/__snapshots__/bug-report-20260706T220324Z.snap.svg +34 -22
- package/tests/bug-reports/bug-report-20260707T134549Z/__snapshots__/bug-report-20260707T134549Z.snap.svg +5 -3
- package/tests/bug-reports/bug-report-20260721T221026Z/__snapshots__/bug-report-20260721T221026Z.snap.svg +305 -303
- package/tests/bug-reports/bug-report-20260804T095800Z/__snapshots__/bug-report-20260804T095800Z.snap.svg +5 -3
- package/tests/bug-reports/bug-report-20260811T075142Z/__snapshots__/bug-report-20260811T075142Z.snap.svg +74 -0
- package/tests/bug-reports/bug-report-20260811T075142Z/bug-report-20260811T075142Z.json +194 -0
- package/tests/bug-reports/bug-report-20260811T075142Z/bug-report-20260811T075142Z.test.ts +12 -0
- package/tests/examples/__snapshots__/example10.snap.svg +20 -16
- package/tests/examples/__snapshots__/example31.snap.svg +8 -6
- package/tests/examples/__snapshots__/example33.snap.svg +32 -30
- package/tests/examples/__snapshots__/example46.snap.svg +5 -3
- package/tests/examples/__snapshots__/example48.snap.svg +25 -23
- package/tests/examples/__snapshots__/example50.snap.svg +32 -30
- package/tests/repros/__snapshots__/repro-atmega328p-fault-pullup.snap.svg +48 -46
- package/tests/repros/__snapshots__/repro-bq24074-battery-charger.snap.svg +7 -5
- package/tests/repros/__snapshots__/repro-missing-trace-netlabel.snap.svg +24 -18
- package/tests/repros/__snapshots__/repro51-overlap-junction-crossing.snap.svg +25 -23
- package/tests/repros/__snapshots__/small-variant-resistor-facing-direction.snap.svg +46 -44
- package/tests/repros/repro-max-msp-pair-distance-fallback.test.ts +45 -0
- package/tests/repros/repro-missing-trace-netlabel.test.ts +9 -11
- package/tests/repros/rotated-components-rail-label.test.ts +5 -11
- package/tests/solvers/InlineNetLabelSolver/__snapshots__/inline-net-label02.snap.svg +57 -0
- package/tests/solvers/InlineNetLabelSolver/inline-net-label02.test.ts +59 -0
|
@@ -1,20 +1,26 @@
|
|
|
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="
|
|
2
|
-
globalConnNetId: connectivity_net0" data-x="
|
|
3
|
-
globalConnNetId:
|
|
4
|
-
globalConnNetId:
|
|
5
|
-
globalConnNetId:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
x
|
|
12
|
-
x
|
|
13
|
-
x
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
orientation: y
|
|
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="322.82714054927305,149.24071082390958 107.96445880452347,330.17770597738274" 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="322.82714054927305,81.38933764135697 439.30533117932123,494.1518578352178" 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="175.81583198707608,330.17770597738274 88.73990306946689,494.1518578352178" 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="195.04038772213266,494.1518578352178 545.605815831987,494.1518578352178" 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="175.81583198707608,330.17770597738274 198.43295638126028,330.17770597738274 198.43295638126028,412.1647819063003 66.1227786752828,412.1647819063003 66.1227786752828,494.1518578352178 88.73990306946689,494.1518578352178" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="11,8.399999999999999 11,8.349999999999998 10.2,8.349999999999998 10.2,8.450999999999999" data-type="line" data-label="" points="322.82714054927305,149.24071082390958 322.82714054927305,154.8949919224557 232.35864297253624,154.8949919224557 232.35864297253624,143.4733441033926" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="9.1,6.8 8.799,6.8 8.799,7.151" data-type="line" data-label="" points="107.96445880452347,330.17770597738274 73.9256865912763,330.17770597738274 73.9256865912763,290.4846526655896" 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="322.82714054927305,81.38933764135697 322.82714054927305,69.967689822294 271.8255250403879,69.967689822294" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="9.870000000000001,5.3500000000000005 10.111,5.3500000000000005 10.111,4.9990000000000006" data-type="line" data-label="" points="195.04038772213266,494.1518578352178 222.29402261712448,494.1518578352178 222.29402261712448,533.844911147011" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="12.97,5.3500000000000005 13.211,5.3500000000000005 13.211,4.9990000000000006" data-type="line" data-label="" points="545.605815831987,494.1518578352178 572.8594507269788,494.1518578352178 572.8594507269788,533.844911147011" 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="271.93861066235866" y="81.38933764135697" width="123.26332794830364" height="67.8513731825526" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008842857142857145"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="9.4" data-y="6.8" x="107.96445880452336" y="291.7285945072697" width="67.8513731825526" height="76.8982229402261" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008842857142857145"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="9.4" data-y="5.4" x="88.73990306946678" y="447.84834491114685" width="106.30048465266577" height="81.29846365104993" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008842857142857145"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="12.5" data-y="5.4" x="439.30533117932134" y="447.84834491114685" width="106.30048465266577" height="81.29846365104993" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008842857142857145"/></g><g><rect data-type="rect" data-label="netId: V3V3
|
|
2
|
+
globalConnNetId: connectivity_net0" data-x="10.2" data-y="8.661" x="198.43295638125994" y="95.97738287560571" width="67.8513731825526" height="47.49596122778689" fill="#ef444466" stroke="#ef4444" stroke-width="0.008842857142857145"/></g><g><rect data-type="rect" data-label="netId: V3V3
|
|
3
|
+
globalConnNetId: connectivity_net0" data-x="8.799" data-y="7.361" x="39.99999999999994" y="242.98869143780274" width="67.85137318255272" height="47.49596122778678" fill="#ef444466" stroke="#ef4444" stroke-width="0.008842857142857145"/></g><g><rect data-type="rect" data-label="netId: RESET
|
|
4
|
+
globalConnNetId: connectivity_net1" data-x="10.189000000000002" data-y="9.100999999999999" x="190.40387722132505" y="58.65912762520196" width="81.42164781906285" height="22.61712439418409" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008842857142857145"/></g><g><rect data-type="rect" data-label="netId: RESET
|
|
5
|
+
globalConnNetId: connectivity_net1" data-x="11.669" data-y="5.3500000000000005" x="357.77059773828785" y="482.8432956381258" width="81.42164781906263" height="22.617124394183975" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008842857142857145"/></g><g><rect data-type="rect" data-label="netId: USBOOT
|
|
6
|
+
globalConnNetId: connectivity_net2" data-x="10.320000000000002" data-y="6.8" x="198.4329563812604" y="318.8691437802907" width="94.99192245557356" height="22.61712439418409" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008842857142857145"/></g><g><rect data-type="rect" data-label="netId: GND
|
|
7
|
+
globalConnNetId: connectivity_net3" data-x="10.111" data-y="4.789000000000001" x="195.15347334410353" y="533.8449111470111" width="54.2810985460419" height="47.49596122778678" fill="#00000066" stroke="#000000" stroke-width="0.008842857142857145"/></g><g><rect data-type="rect" data-label="netId: GND
|
|
8
|
+
globalConnNetId: connectivity_net3" data-x="13.211" data-y="4.789000000000001" x="545.7189014539578" y="533.8449111470111" width="54.28109854604213" height="47.49596122778678" fill="#00000066" stroke="#000000" stroke-width="0.008842857142857145"/></g><g><circle data-type="point" data-label="R3.1
|
|
9
|
+
y-" data-x="11" data-y="8.399999999999999" cx="322.82714054927305" cy="149.24071082390958" r="3" fill="hsl(348, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R3.2
|
|
10
|
+
y+" data-x="11" data-y="9" cx="322.82714054927305" cy="81.38933764135697" r="3" fill="hsl(349, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R2.1
|
|
11
|
+
x-" data-x="9.1" data-y="6.8" cx="107.96445880452347" cy="330.17770597738274" r="3" fill="hsl(107, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R2.2
|
|
12
|
+
x+" data-x="9.700000000000001" data-y="6.8" cx="175.81583198707608" cy="330.17770597738274" r="3" fill="hsl(108, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="SW3.1
|
|
13
|
+
x-" data-x="8.93" data-y="5.3500000000000005" cx="88.73990306946689" cy="494.1518578352178" r="3" fill="hsl(226, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="SW3.2
|
|
14
|
+
x+" data-x="9.870000000000001" data-y="5.3500000000000005" cx="195.04038772213266" cy="494.1518578352178" r="3" fill="hsl(227, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="SW2.1
|
|
15
|
+
x-" data-x="12.03" data-y="5.3500000000000005" cx="439.30533117932123" cy="494.1518578352178" r="3" fill="hsl(345, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="SW2.2
|
|
16
|
+
x+" data-x="12.97" data-y="5.3500000000000005" cx="545.605815831987" cy="494.1518578352178" r="3" fill="hsl(346, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
17
|
+
orientation: y+" data-x="10.2" data-y="8.450999999999999" cx="232.35864297253624" cy="143.4733441033926" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
18
|
+
orientation: y+" data-x="8.799" data-y="7.151" cx="73.9256865912763" cy="290.4846526655896" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
19
|
+
orientation: x-" data-x="10.549000000000001" data-y="9.100999999999999" cx="271.8255250403879" cy="69.967689822294" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
20
|
+
orientation: x-" data-x="12.03" data-y="5.3500000000000005" cx="439.30533117932123" cy="494.1518578352178" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
21
|
+
orientation: x+" data-x="9.900000000000002" data-y="6.8" cx="198.43295638126028" cy="330.17770597738274" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
22
|
+
orientation: y-" data-x="10.111" data-y="4.9990000000000006" cx="222.29402261712448" cy="533.844911147011" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
23
|
+
orientation: y-" data-x="13.211" data-y="4.9990000000000006" cx="572.8594507269788" cy="533.844911147011" 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
24
|
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
19
25
|
const svg = e.currentTarget;
|
|
20
26
|
const rect = svg.getBoundingClientRect();
|
|
@@ -36,7 +42,7 @@ orientation: y-" data-x="10.07" data-y="4.840544650000001" cx="226.4649705217612
|
|
|
36
42
|
v.setAttribute('y2', '640');
|
|
37
43
|
|
|
38
44
|
// Calculate real coordinates using inverse transformation
|
|
39
|
-
const matrix = {"a":
|
|
45
|
+
const matrix = {"a":113.0856219709208,"c":0,"e":-921.1147011308558,"b":0,"d":-113.0856219709208,"f":1099.1599353796441};
|
|
40
46
|
// Manually invert and apply the affine transform
|
|
41
47
|
// Since we only use translate and scale, we can directly compute:
|
|
42
48
|
// x' = (x - tx) / sx
|
|
@@ -1,25 +1,27 @@
|
|
|
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="1.2000000000000002,-0.30000000000000004 1.6,2.1049999999999995" data-type="line" data-label="" points="308.80000000000007,
|
|
2
|
-
globalConnNetId: connectivity_net0" data-x="1.
|
|
3
|
-
globalConnNetId:
|
|
4
|
-
globalConnNetId: connectivity_net1" data-x="1.
|
|
5
|
-
globalConnNetId:
|
|
6
|
-
globalConnNetId: connectivity_net2" data-x="1.
|
|
7
|
-
|
|
8
|
-
x
|
|
9
|
-
x
|
|
10
|
-
x
|
|
11
|
-
x-" data-x="-1.2000000000000002" data-y="0.
|
|
12
|
-
x-" data-x="-1.2000000000000002" data-y="
|
|
13
|
-
x
|
|
14
|
-
x+" data-x="1.2000000000000002" data-y="0.
|
|
15
|
-
x
|
|
16
|
-
x-" data-x="1.6" data-y="2.
|
|
17
|
-
x-" data-x="1.6" data-y="2.
|
|
18
|
-
|
|
19
|
-
orientation:
|
|
20
|
-
orientation:
|
|
21
|
-
orientation:
|
|
22
|
-
orientation:
|
|
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="1.2000000000000002,-0.30000000000000004 1.6,2.1049999999999995" data-type="line" data-label="" points="308.80000000000007,477.08 353.6,207.72000000000003" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.2000000000000002,0.09999999999999998 1.6,2.3049999999999997" data-type="line" data-label="" points="308.80000000000007,432.28 353.6,185.32" fill="none" stroke="hsl(158, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.2000000000000002,0.30000000000000004 1.6,2.505" data-type="line" data-label="" points="308.80000000000007,409.87999999999994 353.6,162.91999999999996" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="1.2000000000000002,-0.30000000000000004 1.411,-0.30000000000000004 1.411,-0.5010000000000001" data-type="line" data-label="" points="308.80000000000007,477.08 332.432,477.08 332.432,499.592" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.6,2.1049999999999995 1.3890000000000002,2.1049999999999995 1.3890000000000002,1.9039999999999997" data-type="line" data-label="" points="353.6,207.72000000000003 329.9680000000001,207.72000000000003 329.9680000000001,230.232" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.2000000000000002,0.30000000000000004 1.411,0.30000000000000004 1.411,0.5010000000000001" data-type="line" data-label="" points="308.80000000000007,409.87999999999994 332.432,409.87999999999994 332.432,387.36799999999994" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.6,2.505 1.3890000000000002,2.505 1.3890000000000002,2.706" data-type="line" data-label="" points="353.6,162.91999999999996 329.9680000000001,162.91999999999996 329.9680000000001,140.40799999999996" 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="40" y="387.47999999999996" width="268.80000000000007" height="112" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008928571428571428"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="2.7" data-y="2.3049999999999997" x="353.6000000000001" y="140.51999999999998" width="246.39999999999998" height="89.6" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.008928571428571428"/></g><g><rect data-type="rect" data-label="U1" data-x="-0.68" data-y="0.63" x="84.80000000000001" y="362.84" width="26.88000000000001" height="20.159999999999968" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.008928571428571428"/></g><g><rect data-type="rect" data-label="J1" data-x="2.12" data-y="2.835" x="398.4" y="115.88" width="26.880000000000052" height="20.159999999999968" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.008928571428571428"/></g><g><rect data-type="rect" data-label="netId: GND
|
|
2
|
+
globalConnNetId: connectivity_net0" data-x="1.411" data-y="-0.7410000000000001" x="308.91200000000003" y="499.592" width="47.039999999999964" height="53.75999999999999" fill="#00000066" stroke="#000000" stroke-width="0.008928571428571428"/></g><g><rect data-type="rect" data-label="netId: GND
|
|
3
|
+
globalConnNetId: connectivity_net0" data-x="1.3890000000000002" data-y="1.6639999999999997" x="306.4480000000001" y="230.23199999999997" width="47.039999999999964" height="53.75999999999996" fill="#00000066" stroke="#000000" stroke-width="0.008928571428571428"/></g><g><rect data-type="rect" data-label="netId: OUT
|
|
4
|
+
globalConnNetId: connectivity_net1" data-x="1.441" data-y="0.09999999999999998" x="308.91200000000003" y="421.08" width="53.75999999999999" height="22.399999999999977" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008928571428571428"/></g><g><rect data-type="rect" data-label="netId: OUT
|
|
5
|
+
globalConnNetId: connectivity_net1" data-x="1.3590000000000002" data-y="2.3049999999999997" x="299.72800000000007" y="174.12" width="53.75999999999999" height="22.400000000000006" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.008928571428571428"/></g><g><rect data-type="rect" data-label="netId: VCC
|
|
6
|
+
globalConnNetId: connectivity_net2" data-x="1.411" data-y="0.7410000000000001" x="308.91200000000003" y="333.60799999999995" width="47.039999999999964" height="53.75999999999999" fill="#ef444466" stroke="#ef4444" stroke-width="0.008928571428571428"/></g><g><rect data-type="rect" data-label="netId: VCC
|
|
7
|
+
globalConnNetId: connectivity_net2" data-x="1.3890000000000002" data-y="2.9459999999999997" x="306.4480000000001" y="86.64799999999994" width="47.039999999999964" height="53.76000000000005" fill="#ef444466" stroke="#ef4444" stroke-width="0.008928571428571428"/></g><g><circle data-type="point" data-label="U1.1
|
|
8
|
+
x+" data-x="1.2000000000000002" data-y="-0.30000000000000004" cx="308.80000000000007" cy="477.08" r="3" fill="hsl(319, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.2
|
|
9
|
+
x-" data-x="-1.2000000000000002" data-y="-0.30000000000000004" cx="40" cy="477.08" r="3" fill="hsl(320, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.3
|
|
10
|
+
x+" data-x="1.2000000000000002" data-y="0.09999999999999998" cx="308.80000000000007" cy="432.28" r="3" fill="hsl(321, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.4
|
|
11
|
+
x-" data-x="-1.2000000000000002" data-y="0.30000000000000004" cx="40" cy="409.87999999999994" r="3" fill="hsl(322, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.5
|
|
12
|
+
x-" data-x="-1.2000000000000002" data-y="0.10000000000000003" cx="40" cy="432.28" r="3" fill="hsl(323, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.6
|
|
13
|
+
x-" data-x="-1.2000000000000002" data-y="-0.09999999999999998" cx="40" cy="454.67999999999995" r="3" fill="hsl(324, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.7
|
|
14
|
+
x+" data-x="1.2000000000000002" data-y="-0.10000000000000003" cx="308.80000000000007" cy="454.67999999999995" r="3" fill="hsl(325, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.8
|
|
15
|
+
x+" data-x="1.2000000000000002" data-y="0.30000000000000004" cx="308.80000000000007" cy="409.87999999999994" r="3" fill="hsl(326, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="J1.1
|
|
16
|
+
x-" data-x="1.6" data-y="2.505" cx="353.6" cy="162.91999999999996" r="3" fill="hsl(218, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="J1.2
|
|
17
|
+
x-" data-x="1.6" data-y="2.3049999999999997" cx="353.6" cy="185.32" r="3" fill="hsl(219, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="J1.3
|
|
18
|
+
x-" data-x="1.6" data-y="2.1049999999999995" cx="353.6" cy="207.72000000000003" r="3" fill="hsl(220, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
19
|
+
orientation: y-" data-x="1.411" data-y="-0.5010000000000001" cx="332.432" cy="499.592" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
20
|
+
orientation: y-" data-x="1.3890000000000002" data-y="1.9039999999999997" cx="329.9680000000001" cy="230.232" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
21
|
+
orientation: x+" data-x="1.2000000000000002" data-y="0.09999999999999998" cx="308.80000000000007" cy="432.28" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
22
|
+
orientation: x-" data-x="1.6" data-y="2.3049999999999997" cx="353.6" cy="185.32" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
23
|
+
orientation: y+" data-x="1.411" data-y="0.5010000000000001" cx="332.432" cy="387.36799999999994" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
24
|
+
orientation: y+" data-x="1.3890000000000002" data-y="2.706" cx="329.9680000000001" cy="140.40799999999996" 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[
|
|
23
25
|
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
24
26
|
const svg = e.currentTarget;
|
|
25
27
|
const rect = svg.getBoundingClientRect();
|
|
@@ -41,7 +43,7 @@ orientation: y+" data-x="1.3890000000000002" data-y="2.706" cx="329.968000000000
|
|
|
41
43
|
v.setAttribute('y2', '640');
|
|
42
44
|
|
|
43
45
|
// Calculate real coordinates using inverse transformation
|
|
44
|
-
const matrix = {"a":112,"c":0,"e":174.40000000000003,"b":0,"d":-112,"f":
|
|
46
|
+
const matrix = {"a":112,"c":0,"e":174.40000000000003,"b":0,"d":-112,"f":443.47999999999996};
|
|
45
47
|
// Manually invert and apply the affine transform
|
|
46
48
|
// Since we only use translate and scale, we can directly compute:
|
|
47
49
|
// x' = (x - tx) / sx
|
|
@@ -1,46 +1,48 @@
|
|
|
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="
|
|
2
|
-
globalConnNetId: connectivity_net0" data-x="8.31" data-y="14.488999999999999" x="40" y="
|
|
3
|
-
globalConnNetId: connectivity_net0" data-x="12.341" data-y="13.039" x="
|
|
4
|
-
globalConnNetId: connectivity_net1" data-x="11.614999999999998" data-y="12.91" x="
|
|
5
|
-
globalConnNetId: connectivity_net2" data-x="
|
|
6
|
-
|
|
7
|
-
x-" data-x="8.9" data-y="15.
|
|
8
|
-
x-" data-x="8.9" data-y="15.
|
|
9
|
-
x-" data-x="8.9" data-y="
|
|
10
|
-
x-" data-x="8.9" data-y="14.
|
|
11
|
-
x-" data-x="8.9" data-y="14.
|
|
12
|
-
x-" data-x="8.9" data-y="14.
|
|
13
|
-
x-" data-x="8.9" data-y="14.
|
|
14
|
-
x-" data-x="8.9" data-y="
|
|
15
|
-
x-" data-x="8.9" data-y="13.
|
|
16
|
-
x-" data-x="8.9" data-y="13.
|
|
17
|
-
x-" data-x="8.9" data-y="13.
|
|
18
|
-
x-" data-x="8.9" data-y="13.
|
|
19
|
-
x-" data-x="8.9" data-y="
|
|
20
|
-
x-" data-x="8.9" data-y="12.
|
|
21
|
-
x-" data-x="8.9" data-y="12.
|
|
22
|
-
x
|
|
23
|
-
x+" data-x="11.1" data-y="12.
|
|
24
|
-
x+" data-x="11.1" data-y="12.
|
|
25
|
-
x+" data-x="11.1" data-y="
|
|
26
|
-
x+" data-x="11.1" data-y="13.
|
|
27
|
-
x+" data-x="11.1" data-y="13.
|
|
28
|
-
x+" data-x="11.1" data-y="13.
|
|
29
|
-
x+" data-x="11.1" data-y="13.
|
|
30
|
-
x+" data-x="11.1" data-y="
|
|
31
|
-
x+" data-x="11.1" data-y="14.
|
|
32
|
-
x+" data-x="11.1" data-y="14.
|
|
33
|
-
x+" data-x="11.1" data-y="14.
|
|
34
|
-
x+" data-x="11.1" data-y="14.
|
|
35
|
-
x+" data-x="11.1" data-y="
|
|
36
|
-
x+" data-x="11.1" data-y="15.
|
|
37
|
-
x+" data-x="11.1" data-y="15.
|
|
38
|
-
x
|
|
39
|
-
x
|
|
40
|
-
|
|
41
|
-
orientation: y-" data-x="
|
|
42
|
-
orientation: y
|
|
43
|
-
orientation:
|
|
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="102.04779068215191,148.06033907355481 102.04779068215191,177.9628887998931" 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="102.04779068215191,148.06033907355481 266.5118141770124,282.621812842077" 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="102.04779068215191,177.9628887998931 266.5118141770124,282.621812842077" 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="102.04779068215191,163.01161393672396 102.04779068215191,192.91416366306225" 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="102.04779068215191,163.01161393672396 266.5118141770124,327.4756374315846" 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="102.04779068215191,163.01161393672396 420.50994526765464,529.3178480843678" 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="102.04779068215191,192.91416366306225 266.5118141770124,327.4756374315846" 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="102.04779068215191,192.91416366306225 420.50994526765464,529.3178480843678" 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="266.5118141770124,327.4756374315846 420.50994526765464,529.3178480843678" 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="266.5118141770124,118.15778934721652 546.1006541182754,529.3178480843678" 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="102.04779068215191,177.9628887998931 79.6208783873983,177.9628887998931 79.6208783873983,148.06033907355481 102.04779068215191,148.06033907355481" 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="102.04779068215191,192.91416366306225 94.57215325056734,192.91416366306225 94.57215325056734,163.01161393672396 102.04779068215191,163.01161393672396" 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="266.5118141770124,327.4756374315846 343.51087972233347,327.4756374315846 343.51087972233347,529.3178480843678 420.50994526765464,529.3178480843678" 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="79.6208783873983,177.9628887998931 57.94152983580295,177.9628887998931 57.94152983580295,178.03764517420882" 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="266.5118141770124,282.621812842077 359.2844747029769,282.621812842077 359.2844747029769,286.43438793218513" 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="102.04779068215197" y="103.20651448404743" width="164.4640234948605" height="254.17167267387538" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01337678571428571"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="14" data-y="10" x="420.50994526765453" y="503.90068081698024" width="125.59070885062079" height="50.83433453477517" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.01337678571428571"/></g><g><rect data-type="rect" data-label="ATMEGA328P_AU" data-x="10.080000000000002" data-y="12.17" x="131.9503404084902" y="360.3684421305565" width="116.61994393271948" height="13.4561473768523" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.01337678571428571"/></g><g><rect data-type="rect" data-label="U_MCU" data-x="9.600000000000001" data-y="15.815" x="127.46495794953961" y="85.26498464824442" width="53.82458950740886" height="18.68909357896132" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.01337678571428571"/></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="178.03764517420893" width="35.883059671605906" height="31.39767721265548" fill="#00000066" stroke="#000000" stroke-width="0.01337678571428571"/></g><g><rect data-type="rect" data-label="netId: GND
|
|
3
|
+
globalConnNetId: connectivity_net0" data-x="12.341" data-y="13.039" x="341.34294486717397" y="286.4343879321851" width="35.883059671605906" height="31.397677212655367" fill="#00000066" stroke="#000000" stroke-width="0.01337678571428571"/></g><g><rect data-type="rect" data-label="netId: VCC_3V3
|
|
4
|
+
globalConnNetId: connectivity_net1" data-x="11.614999999999998" data-y="12.91" x="269.1282872780669" y="296.07796021892915" width="71.76611934321193" height="31.397677212655367" fill="#ef444466" stroke="#ef4444" stroke-width="0.01337678571428571"/></g><g><rect data-type="rect" data-label="netId: FAULT
|
|
5
|
+
globalConnNetId: connectivity_net2" data-x="11.460999999999999" data-y="15.5" x="266.58657055132824" y="110.68215191563195" width="53.824589507408746" height="14.951274863169147" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.01337678571428571"/></g><g><rect data-type="rect" data-label="netId: FAULT
|
|
6
|
+
globalConnNetId: connectivity_net2" data-x="15.200999999999999" data-y="10" x="546.1754104925911" y="521.8422106527833" width="53.824589507408746" height="14.951274863169033" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.01337678571428571"/></g><g><circle data-type="point" data-label="U_MCU.1
|
|
7
|
+
x-" data-x="8.9" data-y="15.5" cx="102.04779068215191" cy="118.15778934721652" r="3" fill="hsl(144, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.2
|
|
8
|
+
x-" data-x="8.9" data-y="15.3" cx="102.04779068215191" cy="133.10906421038567" r="3" fill="hsl(145, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.3
|
|
9
|
+
x-" data-x="8.9" data-y="15.1" cx="102.04779068215191" cy="148.06033907355481" r="3" fill="hsl(146, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.4
|
|
10
|
+
x-" data-x="8.9" data-y="14.9" cx="102.04779068215191" cy="163.01161393672396" r="3" fill="hsl(147, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.5
|
|
11
|
+
x-" data-x="8.9" data-y="14.7" cx="102.04779068215191" cy="177.9628887998931" r="3" fill="hsl(148, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.6
|
|
12
|
+
x-" data-x="8.9" data-y="14.5" cx="102.04779068215191" cy="192.91416366306225" r="3" fill="hsl(149, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.7
|
|
13
|
+
x-" data-x="8.9" data-y="14.3" cx="102.04779068215191" cy="207.8654385262314" r="3" fill="hsl(150, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.8
|
|
14
|
+
x-" data-x="8.9" data-y="14.1" cx="102.04779068215191" cy="222.81671338940055" r="3" fill="hsl(151, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.9
|
|
15
|
+
x-" data-x="8.9" data-y="13.9" cx="102.04779068215191" cy="237.7679882525697" r="3" fill="hsl(152, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.10
|
|
16
|
+
x-" data-x="8.9" data-y="13.700000000000001" cx="102.04779068215191" cy="252.7192631157386" r="3" fill="hsl(192, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.11
|
|
17
|
+
x-" data-x="8.9" data-y="13.5" cx="102.04779068215191" cy="267.6705379789079" r="3" fill="hsl(193, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.12
|
|
18
|
+
x-" data-x="8.9" data-y="13.3" cx="102.04779068215191" cy="282.621812842077" r="3" fill="hsl(194, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.13
|
|
19
|
+
x-" data-x="8.9" data-y="13.1" cx="102.04779068215191" cy="297.5730877052463" r="3" fill="hsl(195, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.14
|
|
20
|
+
x-" data-x="8.9" data-y="12.9" cx="102.04779068215191" cy="312.5243625684153" r="3" fill="hsl(196, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.15
|
|
21
|
+
x-" data-x="8.9" data-y="12.7" cx="102.04779068215191" cy="327.4756374315846" r="3" fill="hsl(197, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.16
|
|
22
|
+
x-" data-x="8.9" data-y="12.5" cx="102.04779068215191" cy="342.4269122947536" r="3" fill="hsl(198, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.17
|
|
23
|
+
x+" data-x="11.1" data-y="12.5" cx="266.5118141770124" cy="342.4269122947536" r="3" fill="hsl(199, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.18
|
|
24
|
+
x+" data-x="11.1" data-y="12.7" cx="266.5118141770124" cy="327.4756374315846" r="3" fill="hsl(200, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.19
|
|
25
|
+
x+" data-x="11.1" data-y="12.9" cx="266.5118141770124" cy="312.5243625684153" r="3" fill="hsl(201, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.20
|
|
26
|
+
x+" data-x="11.1" data-y="13.1" cx="266.5118141770124" cy="297.5730877052463" r="3" fill="hsl(223, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.21
|
|
27
|
+
x+" data-x="11.1" data-y="13.3" cx="266.5118141770124" cy="282.621812842077" r="3" fill="hsl(224, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.22
|
|
28
|
+
x+" data-x="11.1" data-y="13.5" cx="266.5118141770124" cy="267.6705379789079" r="3" fill="hsl(225, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.23
|
|
29
|
+
x+" data-x="11.1" data-y="13.7" cx="266.5118141770124" cy="252.71926311573884" r="3" fill="hsl(226, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.24
|
|
30
|
+
x+" data-x="11.1" data-y="13.9" cx="266.5118141770124" cy="237.7679882525697" r="3" fill="hsl(227, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.25
|
|
31
|
+
x+" data-x="11.1" data-y="14.1" cx="266.5118141770124" cy="222.81671338940055" r="3" fill="hsl(228, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.26
|
|
32
|
+
x+" data-x="11.1" data-y="14.299999999999999" cx="266.5118141770124" cy="207.8654385262314" r="3" fill="hsl(229, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.27
|
|
33
|
+
x+" data-x="11.1" data-y="14.5" cx="266.5118141770124" cy="192.91416366306225" r="3" fill="hsl(230, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.28
|
|
34
|
+
x+" data-x="11.1" data-y="14.7" cx="266.5118141770124" cy="177.9628887998931" r="3" fill="hsl(231, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.29
|
|
35
|
+
x+" data-x="11.1" data-y="14.9" cx="266.5118141770124" cy="163.01161393672396" r="3" fill="hsl(232, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.30
|
|
36
|
+
x+" data-x="11.1" data-y="15.1" cx="266.5118141770124" cy="148.06033907355481" r="3" fill="hsl(254, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.31
|
|
37
|
+
x+" data-x="11.1" data-y="15.3" cx="266.5118141770124" cy="133.10906421038567" r="3" fill="hsl(255, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U_MCU.32
|
|
38
|
+
x+" data-x="11.1" data-y="15.5" cx="266.5118141770124" cy="118.15778934721652" r="3" fill="hsl(256, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R_FAULT_PULLUP.1
|
|
39
|
+
x-" data-x="13.16" data-y="10" cx="420.50994526765464" cy="529.3178480843678" r="3" fill="hsl(344, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R_FAULT_PULLUP.2
|
|
40
|
+
x+" data-x="14.84" data-y="10" cx="546.1006541182754" cy="529.3178480843678" r="3" fill="hsl(344, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
41
|
+
orientation: y-" data-x="8.31" data-y="14.699" cx="57.94152983580295" cy="178.03764517420882" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
42
|
+
orientation: y-" data-x="12.341" data-y="13.249" cx="359.2844747029769" cy="286.43438793218513" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
43
|
+
orientation: y+" data-x="11.614999999999998" data-y="12.7" cx="305.0113469496729" cy="327.4756374315846" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
44
|
+
orientation: x+" data-x="11.1" data-y="15.5" cx="266.5118141770124" cy="118.15778934721652" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
45
|
+
orientation: x+" data-x="14.84" data-y="10" cx="546.1006541182754" cy="529.3178480843678" 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
46
|
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
45
47
|
const svg = e.currentTarget;
|
|
46
48
|
const rect = svg.getBoundingClientRect();
|
|
@@ -62,7 +64,7 @@ orientation: x+" data-x="15.04" data-y="15.5" cx="547.5682704811445" cy="123.381
|
|
|
62
64
|
v.setAttribute('y2', '640');
|
|
63
65
|
|
|
64
66
|
// Calculate real coordinates using inverse transformation
|
|
65
|
-
const matrix = {"a":
|
|
67
|
+
const matrix = {"a":74.7563743158457,"c":0,"e":-563.2839407288749,"b":0,"d":-74.7563743158457,"f":1276.881591242825};
|
|
66
68
|
// Manually invert and apply the affine transform
|
|
67
69
|
// Since we only use translate and scale, we can directly compute:
|
|
68
70
|
// x' = (x - tx) / sx
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
|
|
3
|
+
import type { InputProblem } from "lib/types/InputProblem"
|
|
4
|
+
|
|
5
|
+
const inputProblem: InputProblem = {
|
|
6
|
+
chips: [
|
|
7
|
+
{
|
|
8
|
+
chipId: "U1",
|
|
9
|
+
center: { x: -3, y: 0 },
|
|
10
|
+
width: 1,
|
|
11
|
+
height: 1,
|
|
12
|
+
pins: [{ pinId: "U1.1", x: -2.5, y: 0, _facingDirection: "x+" }],
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
chipId: "U2",
|
|
16
|
+
center: { x: 3, y: 0 },
|
|
17
|
+
width: 1,
|
|
18
|
+
height: 1,
|
|
19
|
+
pins: [{ pinId: "U2.1", x: 2.5, y: 0, _facingDirection: "x-" }],
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
|
+
directConnections: [],
|
|
23
|
+
netConnections: [
|
|
24
|
+
{
|
|
25
|
+
netId: "SIGNAL",
|
|
26
|
+
pinIds: ["U1.1", "U2.1"],
|
|
27
|
+
netLabelWidth: 0.72,
|
|
28
|
+
netLabelHeight: 0.42,
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
availableNetLabelOrientations: {
|
|
32
|
+
SIGNAL: ["x+", "x-"],
|
|
33
|
+
},
|
|
34
|
+
maxMspPairDistance: 2,
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
test("named connections beyond maxMspPairDistance fall back to net labels", () => {
|
|
38
|
+
const solver = new SchematicTracePipelineSolver(inputProblem)
|
|
39
|
+
|
|
40
|
+
solver.solve()
|
|
41
|
+
|
|
42
|
+
const labels =
|
|
43
|
+
solver.netLabelNetLabelCollisionSolver!.getOutput().netLabelPlacements
|
|
44
|
+
expect(labels).toHaveLength(2)
|
|
45
|
+
})
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { expect, test } from "bun:test"
|
|
2
|
-
import { getTraceCorners } from "lib/solvers/RailNetLabelCornerPlacementSolver/geometry"
|
|
3
2
|
import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
|
|
4
3
|
import inputProblem from "./assets/repro-missing-trace-netlabel.input.json"
|
|
5
4
|
import "tests/fixtures/matcher"
|
|
@@ -11,16 +10,15 @@ test("repro148 missing trace becomes net labels", () => {
|
|
|
11
10
|
|
|
12
11
|
solver.solve()
|
|
13
12
|
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
(label) => label.netId === "
|
|
17
|
-
)!
|
|
18
|
-
const powerTrace = output.traces.find((trace) =>
|
|
19
|
-
powerLabel.mspConnectionPairIds.includes(trace.mspPairId),
|
|
20
|
-
)!
|
|
21
|
-
|
|
22
|
-
expect(getTraceCorners(powerTrace.tracePath)).toContainEqual(
|
|
23
|
-
powerLabel.anchorPoint,
|
|
13
|
+
const finalOutput = solver.sameNetJunctionAlignmentSolver!.getOutput()
|
|
14
|
+
const resetLabels = finalOutput.netLabelPlacements.filter(
|
|
15
|
+
(label) => label.netId === "RESET",
|
|
24
16
|
)
|
|
17
|
+
|
|
18
|
+
expect(solver.longDistancePairSolver!.getOutput().newTraces).toHaveLength(0)
|
|
19
|
+
expect(resetLabels.map((label) => label.pinIds)).toEqual([
|
|
20
|
+
["R3.2"],
|
|
21
|
+
["SW2.1"],
|
|
22
|
+
])
|
|
25
23
|
expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
26
24
|
})
|
|
@@ -48,21 +48,15 @@ const inputProblem: InputProblem = {
|
|
|
48
48
|
maxMspPairDistance: 0.1,
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
test("rotated component rail
|
|
51
|
+
test("rotated component rail labels replace over-distance traces", () => {
|
|
52
52
|
const solver = new SchematicTracePipelineSolver(inputProblem)
|
|
53
53
|
solver.solve()
|
|
54
54
|
|
|
55
|
-
const traces = solver.netLabelTraceCollisionSolver!.getOutput().traces
|
|
56
55
|
const labels =
|
|
57
56
|
solver.netLabelNetLabelCollisionSolver!.getOutput().netLabelPlacements
|
|
58
|
-
const
|
|
57
|
+
const gndLabels = labels.filter((label) => label.netId === "GND")
|
|
59
58
|
|
|
60
|
-
expect(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
),
|
|
64
|
-
).toBe(false)
|
|
65
|
-
expect(gndLabel?.orientation).toBe("y-")
|
|
66
|
-
expect(gndLabel?.anchorPoint.x).toBeCloseTo(10.72)
|
|
67
|
-
expect(gndLabel?.anchorPoint.y).toBeCloseTo(0)
|
|
59
|
+
expect(solver.longDistancePairSolver!.getOutput().newTraces).toHaveLength(0)
|
|
60
|
+
expect(gndLabels.map((label) => label.pinIds)).toEqual([["D1.2"], ["D2.2"]])
|
|
61
|
+
expect(gndLabels.every((label) => label.orientation === "y-")).toBe(true)
|
|
68
62
|
})
|