@tscircuit/schematic-trace-solver 0.0.90 → 0.0.91
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.js +12 -0
- package/lib/solvers/SchematicTracePipelineSolver/correctPinsInsideChip.ts +19 -0
- package/package.json +1 -1
- package/site/bug-reports/bug-report-20260707T230831Z.page.tsx +4 -0
- package/site/bug-reports/bug-report-20260708T053736Z.page.tsx +4 -0
- package/site/bug-reports/bug-report-20260708T055430Z.page.tsx +4 -0
- package/site/bug-reports/bug-report-20260708T095725Z.page.tsx +4 -0
- package/tests/bug-reports/bug-report-20260707T230831Z/__snapshots__/bug-report-20260707T230831Z.snap.svg +94 -0
- package/tests/bug-reports/bug-report-20260707T230831Z/bug-report-20260707T230831Z.json +347 -0
- package/tests/bug-reports/bug-report-20260707T230831Z/bug-report-20260707T230831Z.test.ts +12 -0
- package/tests/bug-reports/bug-report-20260708T053736Z/__snapshots__/bug-report-20260708T053736Z.snap.svg +52 -0
- package/tests/bug-reports/bug-report-20260708T053736Z/bug-report-20260708T053736Z.json +59 -0
- package/tests/bug-reports/bug-report-20260708T053736Z/bug-report-20260708T053736Z.test.ts +12 -0
- package/tests/bug-reports/bug-report-20260708T055430Z/__snapshots__/bug-report-20260708T055430Z.snap.svg +88 -0
- package/tests/bug-reports/bug-report-20260708T055430Z/bug-report-20260708T055430Z.json +263 -0
- package/tests/bug-reports/bug-report-20260708T055430Z/bug-report-20260708T055430Z.test.ts +12 -0
- package/tests/bug-reports/bug-report-20260708T095725Z/__snapshots__/bug-report-20260708T095725Z.snap.svg +87 -0
- package/tests/bug-reports/bug-report-20260708T095725Z/bug-report-20260708T095725Z.json +277 -0
- package/tests/bug-reports/bug-report-20260708T095725Z/bug-report-20260708T095725Z.test.ts +12 -0
- package/tests/repros/__snapshots__/small-variant-resistor-facing-direction.snap.svg +86 -0
- package/tests/repros/assets/small-variant-resistor-facing-direction.input.json +297 -0
- package/tests/repros/small-variant-resistor-facing-direction.test.ts +35 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"chips": [
|
|
3
|
+
{
|
|
4
|
+
"chipId": "schematic_component_0",
|
|
5
|
+
"center": {
|
|
6
|
+
"x": 1,
|
|
7
|
+
"y": 3
|
|
8
|
+
},
|
|
9
|
+
"width": 0.6000000000000001,
|
|
10
|
+
"height": 0.6800000000000006,
|
|
11
|
+
"pins": [
|
|
12
|
+
{
|
|
13
|
+
"pinId": "R1.1",
|
|
14
|
+
"x": 0.7,
|
|
15
|
+
"y": 3
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"pinId": "R1.2",
|
|
19
|
+
"x": 1.3,
|
|
20
|
+
"y": 3
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"chipId": "schematic_component_1",
|
|
26
|
+
"center": {
|
|
27
|
+
"x": 0,
|
|
28
|
+
"y": 3.1
|
|
29
|
+
},
|
|
30
|
+
"width": 1.055825,
|
|
31
|
+
"height": 0.8677407000000006,
|
|
32
|
+
"pins": [
|
|
33
|
+
{
|
|
34
|
+
"pinId": "L1.1",
|
|
35
|
+
"x": -0.5279125,
|
|
36
|
+
"y": 3.10262455
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"pinId": "L1.2",
|
|
40
|
+
"x": 0.5279125,
|
|
41
|
+
"y": 3.0973754500000004
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"directConnections": [
|
|
47
|
+
{
|
|
48
|
+
"pinIds": [
|
|
49
|
+
"L1.2",
|
|
50
|
+
"R1.1"
|
|
51
|
+
],
|
|
52
|
+
"netId": ".L1 > .pin2 to .R1 > .pin1"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"netConnections": [],
|
|
56
|
+
"textBoxes": [],
|
|
57
|
+
"availableNetLabelOrientations": {},
|
|
58
|
+
"maxMspPairDistance": 2.4
|
|
59
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
|
|
3
|
+
import inputProblem from "./bug-report-20260708T053736Z.json"
|
|
4
|
+
import "tests/fixtures/matcher"
|
|
5
|
+
|
|
6
|
+
test("bug-report-20260708T053736Z", () => {
|
|
7
|
+
const solver = new SchematicTracePipelineSolver(inputProblem as any)
|
|
8
|
+
|
|
9
|
+
solver.solve()
|
|
10
|
+
|
|
11
|
+
expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
12
|
+
})
|
|
@@ -0,0 +1,88 @@
|
|
|
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="108.65583456425406,117.2998522895125 108.65583456425406,150.38700147710483" 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="108.65583456425406,117.2998522895125 290.6351550960118,266.19202363367776" 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="108.65583456425406,150.38700147710483 290.6351550960118,266.19202363367776" 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="108.65583456425406,133.84342688330867 108.65583456425406,166.930576070901" 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="108.65583456425406,133.84342688330867 290.6351550960118,315.8227474150665" 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.7,9.66" data-type="line" data-label="" points="108.65583456425406,133.84342688330867 505.7016248153618,567.285081240768" 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="108.65583456425406,166.930576070901 290.6351550960118,315.8227474150665" 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.7,9.66" data-type="line" data-label="" points="108.65583456425406,166.930576070901 505.7016248153618,567.285081240768" 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.7,9.66" data-type="line" data-label="" points="290.6351550960118,315.8227474150665 505.7016248153618,567.285081240768" 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.3,9.66" data-type="line" data-label="" points="290.6351550960118,84.21270310192017 555.3323485967503,567.285081240768" 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="108.65583456425406,150.38700147710483 83.84047267355993,150.38700147710483 83.84047267355993,117.2998522895125 108.65583456425406,117.2998522895125" 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="108.65583456425406,166.930576070901 100.38404726735598,166.930576070901 100.38404726735598,133.84342688330867 108.65583456425406,133.84342688330867" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="11.1,12.7 12.399999999999999,12.7 12.399999999999999,9.46 12.329000000000002,9.46 12.329000000000002,9.359000000000002 13.249,9.359000000000002 13.249,9.46 13.7,9.46 13.7,9.66" data-type="line" data-label="" points="290.6351550960118,315.8227474150665 398.16838995568673,315.8227474150665 398.16838995568673,583.8286558345641 392.29542097488945,583.8286558345641 392.29542097488945,592.1831610044311 468.3958641063516,592.1831610044311 468.3958641063516,583.8286558345641 505.7016248153618,583.8286558345641 505.7016248153618,567.285081240768" 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="83.84047267355993,150.38700147710483 59.852289512555444,150.38700147710483 59.852289512555444,150.46971935007377" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="11.1,13.3 12.491,13.3 12.491,13.249" data-type="line" data-label="" points="290.6351550960118,266.19202363367776 405.6957163958641,266.19202363367776 405.6957163958641,270.41063515509586" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="14.3,9.66 14.3,9.559000000000001 13.149000000000001,9.559000000000001" data-type="line" data-label="" points="555.3323485967503,567.285081240768 555.3323485967503,575.639586410635 460.1240768094535,575.639586410635" 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="108.65583456425412" y="67.66912850812406" width="181.9793205317577" height="281.2407680945347" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.012089285714285714"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="14" data-y="10" x="461.03397341211223" y="511.036927621861" width="138.96602658788765" height="56.24815361890694" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.012089285714285714"/></g><g><rect data-type="rect" data-label="ATMEGA328P_AU" data-x="10.080000000000002" data-y="12.17" x="141.7429837518464" y="352.2186115214179" width="129.03988183161027" height="14.889217134416526" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.012089285714285714"/></g><g><rect data-type="rect" data-label="U_MCU" data-x="9.600000000000001" data-y="15.815" x="136.7799113737077" y="47.81683899556867" width="59.556868537666105" height="20.67946824224532" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.012089285714285714"/></g><g><rect data-type="rect" data-label="netId: GND
|
|
2
|
+
globalConnNetId: connectivity_net0" data-x="8.31" data-y="14.488999999999999" x="40.00000000000006" y="150.46971935007377" width="39.704579025110775" height="34.741506646972084" fill="#00000066" stroke="#000000" stroke-width="0.012089285714285714"/></g><g><rect data-type="rect" data-label="netId: GND
|
|
3
|
+
globalConnNetId: connectivity_net0" data-x="12.491" data-y="13.039" x="385.84342688330867" y="270.41063515509586" width="39.70457902511089" height="34.741506646972084" fill="#00000066" stroke="#000000" stroke-width="0.012089285714285714"/></g><g><rect data-type="rect" data-label="netId: VCC_3V3
|
|
4
|
+
globalConnNetId: connectivity_net1" data-x="11.75" data-y="12.91" x="304.69719350073854" y="281.0812407680944" width="79.40915805022155" height="34.741506646972084" fill="#ef444466" stroke="#ef4444" stroke-width="0.012089285714285714"/></g><g><rect data-type="rect" data-label="netId: FAULT
|
|
5
|
+
globalConnNetId: connectivity_net2" data-x="11.460999999999999" data-y="15.5" x="290.7178729689807" y="75.94091580502209" width="59.556868537666105" height="16.543574593796166" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.012089285714285714"/></g><g><rect data-type="rect" data-label="netId: FAULT
|
|
6
|
+
globalConnNetId: connectivity_net2" data-x="12.789000000000001" data-y="9.559000000000001" x="400.5672082717874" y="567.367799113737" width="59.556868537666105" height="16.543574593796052" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.012089285714285714"/></g><g><circle data-type="point" data-label="U_MCU.1
|
|
7
|
+
x-" data-x="8.9" data-y="15.5" cx="108.65583456425406" cy="84.21270310192017" 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="108.65583456425406" cy="100.75627769571634" 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="108.65583456425406" cy="117.2998522895125" 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="108.65583456425406" cy="133.84342688330867" 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="108.65583456425406" cy="150.38700147710483" 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="108.65583456425406" cy="166.930576070901" 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="108.65583456425406" cy="183.47415066469716" 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="108.65583456425406" cy="200.01772525849333" 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="108.65583456425406" cy="216.5612998522895" 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="108.65583456425406" cy="233.10487444608543" 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="108.65583456425406" cy="249.64844903988183" 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="108.65583456425406" cy="266.19202363367776" 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="108.65583456425406" cy="282.73559822747416" 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="108.65583456425406" cy="299.2791728212701" 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="108.65583456425406" cy="315.8227474150665" 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="108.65583456425406" cy="332.36632200886265" 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="290.6351550960118" cy="332.36632200886265" 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="290.6351550960118" cy="315.8227474150665" 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="290.6351550960118" cy="299.2791728212701" 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="290.6351550960118" cy="282.73559822747416" 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="290.6351550960118" cy="266.19202363367776" 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="290.6351550960118" cy="249.64844903988183" 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="290.6351550960118" cy="233.10487444608566" 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="290.6351550960118" cy="216.5612998522895" 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="290.6351550960118" cy="200.01772525849333" 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="290.6351550960118" cy="183.47415066469716" 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="290.6351550960118" cy="166.930576070901" 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="290.6351550960118" cy="150.38700147710483" 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="290.6351550960118" cy="133.84342688330867" 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="290.6351550960118" cy="117.2998522895125" 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="290.6351550960118" cy="100.75627769571634" 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="290.6351550960118" cy="84.21270310192017" r="3" fill="hsl(256, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R_FAULT_PULLUP.1
|
|
39
|
+
y-" data-x="13.7" data-y="9.66" cx="505.7016248153618" cy="567.285081240768" r="3" fill="hsl(344, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="R_FAULT_PULLUP.2
|
|
40
|
+
y-" data-x="14.3" data-y="9.66" cx="555.3323485967503" cy="567.285081240768" 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="59.852289512555444" cy="150.46971935007377" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
42
|
+
orientation: y-" data-x="12.491" data-y="13.249" cx="405.6957163958641" cy="270.41063515509586" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
43
|
+
orientation: y+" data-x="11.75" data-y="12.7" cx="344.4017725258493" cy="315.8227474150665" 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="290.6351550960118" cy="84.21270310192017" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
45
|
+
orientation: x-" data-x="13.149000000000001" data-y="9.559000000000001" cx="460.1240768094535" cy="575.639586410635" 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[
|
|
46
|
+
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
47
|
+
const svg = e.currentTarget;
|
|
48
|
+
const rect = svg.getBoundingClientRect();
|
|
49
|
+
const x = e.clientX - rect.left;
|
|
50
|
+
const y = e.clientY - rect.top;
|
|
51
|
+
const crosshair = svg.getElementById('crosshair');
|
|
52
|
+
const h = svg.getElementById('crosshair-h');
|
|
53
|
+
const v = svg.getElementById('crosshair-v');
|
|
54
|
+
const coords = svg.getElementById('coordinates');
|
|
55
|
+
|
|
56
|
+
crosshair.style.display = 'block';
|
|
57
|
+
h.setAttribute('x1', '0');
|
|
58
|
+
h.setAttribute('x2', '640');
|
|
59
|
+
h.setAttribute('y1', y);
|
|
60
|
+
h.setAttribute('y2', y);
|
|
61
|
+
v.setAttribute('x1', x);
|
|
62
|
+
v.setAttribute('x2', x);
|
|
63
|
+
v.setAttribute('y1', '0');
|
|
64
|
+
v.setAttribute('y2', '640');
|
|
65
|
+
|
|
66
|
+
// Calculate real coordinates using inverse transformation
|
|
67
|
+
const matrix = {"a":82.7178729689808,"c":0,"e":-627.5332348596751,"b":0,"d":-82.7178729689808,"f":1366.3397341211225};
|
|
68
|
+
// Manually invert and apply the affine transform
|
|
69
|
+
// Since we only use translate and scale, we can directly compute:
|
|
70
|
+
// x' = (x - tx) / sx
|
|
71
|
+
// y' = (y - ty) / sy
|
|
72
|
+
const sx = matrix.a;
|
|
73
|
+
const sy = matrix.d;
|
|
74
|
+
const tx = matrix.e;
|
|
75
|
+
const ty = matrix.f;
|
|
76
|
+
const realPoint = {
|
|
77
|
+
x: (x - tx) / sx,
|
|
78
|
+
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
82
|
+
coords.setAttribute('x', (x + 5).toString());
|
|
83
|
+
coords.setAttribute('y', (y - 5).toString());
|
|
84
|
+
});
|
|
85
|
+
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
86
|
+
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
87
|
+
});
|
|
88
|
+
]]></script></svg>
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
{
|
|
2
|
+
"chips": [
|
|
3
|
+
{
|
|
4
|
+
"chipId": "schematic_component_0",
|
|
5
|
+
"center": {
|
|
6
|
+
"x": 10,
|
|
7
|
+
"y": 14
|
|
8
|
+
},
|
|
9
|
+
"width": 2.1999999999999993,
|
|
10
|
+
"height": 3.3999999999999986,
|
|
11
|
+
"pins": [
|
|
12
|
+
{
|
|
13
|
+
"pinId": "U_MCU.1",
|
|
14
|
+
"x": 8.9,
|
|
15
|
+
"y": 15.5
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"pinId": "U_MCU.2",
|
|
19
|
+
"x": 8.9,
|
|
20
|
+
"y": 15.3
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"pinId": "U_MCU.3",
|
|
24
|
+
"x": 8.9,
|
|
25
|
+
"y": 15.1
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"pinId": "U_MCU.4",
|
|
29
|
+
"x": 8.9,
|
|
30
|
+
"y": 14.9
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"pinId": "U_MCU.5",
|
|
34
|
+
"x": 8.9,
|
|
35
|
+
"y": 14.7
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"pinId": "U_MCU.6",
|
|
39
|
+
"x": 8.9,
|
|
40
|
+
"y": 14.5
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"pinId": "U_MCU.7",
|
|
44
|
+
"x": 8.9,
|
|
45
|
+
"y": 14.3
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"pinId": "U_MCU.8",
|
|
49
|
+
"x": 8.9,
|
|
50
|
+
"y": 14.1
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"pinId": "U_MCU.9",
|
|
54
|
+
"x": 8.9,
|
|
55
|
+
"y": 13.9
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"pinId": "U_MCU.10",
|
|
59
|
+
"x": 8.9,
|
|
60
|
+
"y": 13.700000000000001
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"pinId": "U_MCU.11",
|
|
64
|
+
"x": 8.9,
|
|
65
|
+
"y": 13.5
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"pinId": "U_MCU.12",
|
|
69
|
+
"x": 8.9,
|
|
70
|
+
"y": 13.3
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"pinId": "U_MCU.13",
|
|
74
|
+
"x": 8.9,
|
|
75
|
+
"y": 13.1
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"pinId": "U_MCU.14",
|
|
79
|
+
"x": 8.9,
|
|
80
|
+
"y": 12.9
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"pinId": "U_MCU.15",
|
|
84
|
+
"x": 8.9,
|
|
85
|
+
"y": 12.7
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"pinId": "U_MCU.16",
|
|
89
|
+
"x": 8.9,
|
|
90
|
+
"y": 12.5
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"pinId": "U_MCU.17",
|
|
94
|
+
"x": 11.1,
|
|
95
|
+
"y": 12.5
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"pinId": "U_MCU.18",
|
|
99
|
+
"x": 11.1,
|
|
100
|
+
"y": 12.7
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"pinId": "U_MCU.19",
|
|
104
|
+
"x": 11.1,
|
|
105
|
+
"y": 12.9
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"pinId": "U_MCU.20",
|
|
109
|
+
"x": 11.1,
|
|
110
|
+
"y": 13.1
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"pinId": "U_MCU.21",
|
|
114
|
+
"x": 11.1,
|
|
115
|
+
"y": 13.3
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"pinId": "U_MCU.22",
|
|
119
|
+
"x": 11.1,
|
|
120
|
+
"y": 13.5
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"pinId": "U_MCU.23",
|
|
124
|
+
"x": 11.1,
|
|
125
|
+
"y": 13.7
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"pinId": "U_MCU.24",
|
|
129
|
+
"x": 11.1,
|
|
130
|
+
"y": 13.9
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"pinId": "U_MCU.25",
|
|
134
|
+
"x": 11.1,
|
|
135
|
+
"y": 14.1
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"pinId": "U_MCU.26",
|
|
139
|
+
"x": 11.1,
|
|
140
|
+
"y": 14.299999999999999
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"pinId": "U_MCU.27",
|
|
144
|
+
"x": 11.1,
|
|
145
|
+
"y": 14.5
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"pinId": "U_MCU.28",
|
|
149
|
+
"x": 11.1,
|
|
150
|
+
"y": 14.7
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"pinId": "U_MCU.29",
|
|
154
|
+
"x": 11.1,
|
|
155
|
+
"y": 14.9
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"pinId": "U_MCU.30",
|
|
159
|
+
"x": 11.1,
|
|
160
|
+
"y": 15.1
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"pinId": "U_MCU.31",
|
|
164
|
+
"x": 11.1,
|
|
165
|
+
"y": 15.3
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"pinId": "U_MCU.32",
|
|
169
|
+
"x": 11.1,
|
|
170
|
+
"y": 15.5
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"chipId": "schematic_component_1",
|
|
176
|
+
"center": {
|
|
177
|
+
"x": 14,
|
|
178
|
+
"y": 10
|
|
179
|
+
},
|
|
180
|
+
"width": 1.6799999999999997,
|
|
181
|
+
"height": 0.6799999999999997,
|
|
182
|
+
"pins": [
|
|
183
|
+
{
|
|
184
|
+
"pinId": "R_FAULT_PULLUP.1",
|
|
185
|
+
"x": 13.7,
|
|
186
|
+
"y": 9.66
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"pinId": "R_FAULT_PULLUP.2",
|
|
190
|
+
"x": 14.3,
|
|
191
|
+
"y": 9.66
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
"directConnections": [],
|
|
197
|
+
"netConnections": [
|
|
198
|
+
{
|
|
199
|
+
"netId": "GND",
|
|
200
|
+
"pinIds": [
|
|
201
|
+
"U_MCU.3",
|
|
202
|
+
"U_MCU.5",
|
|
203
|
+
"U_MCU.21"
|
|
204
|
+
],
|
|
205
|
+
"netLabelWidth": 0.42,
|
|
206
|
+
"netLabelHeight": 0.48
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"netId": "VCC_3V3",
|
|
210
|
+
"pinIds": [
|
|
211
|
+
"U_MCU.4",
|
|
212
|
+
"U_MCU.6",
|
|
213
|
+
"U_MCU.18",
|
|
214
|
+
"R_FAULT_PULLUP.1"
|
|
215
|
+
],
|
|
216
|
+
"netLabelWidth": 0.42,
|
|
217
|
+
"netLabelHeight": 0.96
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"netId": "FAULT",
|
|
221
|
+
"pinIds": [
|
|
222
|
+
"U_MCU.32",
|
|
223
|
+
"R_FAULT_PULLUP.2"
|
|
224
|
+
],
|
|
225
|
+
"netLabelWidth": 0.72
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
"textBoxes": [
|
|
229
|
+
{
|
|
230
|
+
"chipId": "schematic_component_0",
|
|
231
|
+
"center": {
|
|
232
|
+
"x": 10.080000000000002,
|
|
233
|
+
"y": 12.17
|
|
234
|
+
},
|
|
235
|
+
"width": 1.5600000000000005,
|
|
236
|
+
"height": 0.17999999999999972,
|
|
237
|
+
"text": "ATMEGA328P_AU"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"chipId": "schematic_component_0",
|
|
241
|
+
"center": {
|
|
242
|
+
"x": 9.600000000000001,
|
|
243
|
+
"y": 15.815
|
|
244
|
+
},
|
|
245
|
+
"width": 0.7200000000000006,
|
|
246
|
+
"height": 0.25,
|
|
247
|
+
"text": "U_MCU"
|
|
248
|
+
}
|
|
249
|
+
],
|
|
250
|
+
"availableNetLabelOrientations": {
|
|
251
|
+
"VCC_3V3": [
|
|
252
|
+
"y+"
|
|
253
|
+
],
|
|
254
|
+
"GND": [
|
|
255
|
+
"y-"
|
|
256
|
+
],
|
|
257
|
+
"FAULT": [
|
|
258
|
+
"x-",
|
|
259
|
+
"x+"
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
"maxMspPairDistance": 2.4
|
|
263
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
|
|
3
|
+
import inputProblem from "./bug-report-20260708T055430Z.json"
|
|
4
|
+
import "tests/fixtures/matcher"
|
|
5
|
+
|
|
6
|
+
test("bug-report-20260708T055430Z", () => {
|
|
7
|
+
const solver = new SchematicTracePipelineSolver(inputProblem as any)
|
|
8
|
+
|
|
9
|
+
solver.solve()
|
|
10
|
+
|
|
11
|
+
expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
12
|
+
})
|
|
@@ -0,0 +1,87 @@
|
|
|
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.05,0.20000000000000007 -12,-1.6999999999999993" data-type="line" data-label="" points="325.95072409253333,329.4369005078052 51.05886778258409,369.45946962572884" fill="none" stroke="hsl(112, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.05,0.4 -12,0.1100000000000021" data-type="line" data-label="" points="325.95072409253333,325.22399849539215 51.05886778258409,331.332706413391" fill="none" stroke="hsl(24, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-1.05,-0.5 -12,1.9750000000000014" data-type="line" data-label="" points="281.71525296219664,344.18205755125075 51.05886778258409,292.04739514763963" fill="none" stroke="hsl(328, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="1.05,1.1102230246251565e-16 11.7,-1" data-type="line" data-label="" points="325.95072409253333,333.6498025202182 550.2877562535264,354.7143125822833" fill="none" stroke="hsl(8, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="12.3,-1 13.3,-0.9999999999999996" data-type="line" data-label="" points="562.9264622907654,354.7143125822833 583.9909723528306,354.71431258228324" fill="none" stroke="hsl(176, 100%, 50%, 0.8)" stroke-width="1px"/></g><g><polyline data-points="-12,-2.3000000000000007 -12,-0.4899999999999993" data-type="line" data-label="" points="51.05886778258409,382.0981756629679 51.05886778258409,343.97141245063005" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-12,-2.3000000000000007 -12,1.375" data-type="line" data-label="" points="51.05886778258409,382.0981756629679 51.05886778258409,304.68610118487874" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-12,-2.3000000000000007 13.3,-1.600000000000001" data-type="line" data-label="" points="51.05886778258409,382.0981756629679 583.9909723528306,367.35301861952235" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-12,-0.4899999999999993 -12,1.375" data-type="line" data-label="" points="51.05886778258409,343.97141245063005 51.05886778258409,304.68610118487874" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-12,-0.4899999999999993 13.3,-1.600000000000001" data-type="line" data-label="" points="51.05886778258409,343.97141245063005 583.9909723528306,367.35301861952235" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="-12,1.375 13.3,-1.600000000000001" data-type="line" data-label="" points="51.05886778258409,304.68610118487874 583.9909723528306,367.35301861952235" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1px" stroke-dasharray="4 2"/></g><g><polyline data-points="12.3,-1 12.8,-1 12.8,-0.7999999999999996 13.3,-0.7999999999999996 13.3,-0.9999999999999996" data-type="line" data-label="" points="562.9264622907654,354.7143125822833 573.458717321798,354.7143125822833 573.458717321798,350.50141056987025 583.9909723528306,350.50141056987025 583.9909723528306,354.71431258228324" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-12,-0.4899999999999993 -12,-0.6899999999999986 -12.524999999999999,-0.6899999999999986 -12.524999999999999,1.1749999999999998 -12,1.1749999999999998 -12,1.3749999999999991" data-type="line" data-label="" points="51.05886778258409,343.97141245063005 51.05886778258409,348.18431446304305 39.99999999999994,348.18431446304305 39.99999999999994,308.89900319729173 51.05886778258409,308.89900319729173 51.05886778258409,304.68610118487874" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="-12,-2.3000000000000007 -12,-2.5 -12.524999999999999,-2.5 -12.524999999999999,-0.6899999999999977 -12,-0.6899999999999977 -12,-0.48999999999999844" data-type="line" data-label="" points="51.05886778258409,382.0981756629679 51.05886778258409,386.3110776753809 39.99999999999994,386.3110776753809 39.99999999999994,348.18431446304305 51.05886778258409,348.18431446304305 51.05886778258409,343.97141245063005" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.0500000000000007,0.39999999999999947 1.25,0.39999999999999947 1.25,1.0999999999999999 -12,1.0999999999999999 -12,0.1100000000000021" data-type="line" data-label="" points="325.95072409253333,325.2239984953922 330.16362610494633,325.2239984953922 330.16362610494633,310.4788414519466 51.05886778258409,310.4788414519466 51.05886778258409,331.332706413391" fill="none" stroke="purple" stroke-width="1px"/></g><g><polyline data-points="1.0500000000000007,0.1999999999999993 1.25,0.1999999999999993 1.25,-1.0999999999999999 -12,-1.0999999999999999 -12,-1.6999999999999993" data-type="line" data-label="" points="325.95072409253333,329.4369005078052 330.16362610494633,329.4369005078052 330.16362610494633,356.8207635884898 51.05886778258409,356.8207635884898 51.05886778258409,369.45946962572884" 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="281.71525296219664" y="314.69174346435966" width="44.23547113033669" height="37.91611811171708" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="schematic_component_1" data-x="-11.782499999999999" data-y="-2" x="44.212902012412954" y="369.45946962572884" width="22.854993417340637" height="12.638706037239047" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="schematic_component_2" data-x="-11.782499999999999" data-y="-0.18999999999999861" x="44.212902012412954" y="331.33270641339107" width="22.854993417340637" height="12.638706037239047" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="schematic_component_3" data-x="-11.7225" data-y="1.6750000000000007" x="44.21290201241294" y="292.04739514763963" width="25.382734624788384" height="12.638706037239103" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="schematic_component_4" data-x="12" data-y="-1" x="550.2877562535264" y="345.867218356216" width="12.63870603723899" height="17.694188452134654" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="schematic_component_5" data-x="13.517500000000002" data-y="-1.3000000000000003" x="577.1450065826593" y="354.71431258228324" width="22.854993417340665" height="12.638706037239103" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="TPS923655DMTR" data-x="0.13" data-y="-1.0299999999999998" x="290.1410569870227" y="353.45044197855935" width="32.86063569682153" height="3.7916118111717196" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="U1" data-x="-0.53" data-y="1.0150000000000001" x="288.87718638329886" y="309.636261049464" width="7.583223622343382" height="5.2661275155163025" fill="rgba(160, 0, 220, 0.14)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="netId: U1.FAULT to RFAULT.pin1
|
|
2
|
+
globalConnNetId: connectivity_net2" data-x="-2.171" data-y="-0.5" x="234.50968591310885" y="342.07560654504425" width="47.18450253902577" height="4.2129020124129966" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="netId: U1.FAULT to RFAULT.pin1
|
|
3
|
+
globalConnNetId: connectivity_net2" data-x="-12" data-y="3.0960000000000014" x="48.95241677637759" y="244.84182809855184" width="4.2129020124129966" height="47.18450253902574" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="netId: U1.COMP to CCOMP.pos
|
|
4
|
+
globalConnNetId: connectivity_net3" data-x="2.031" data-y="1.1102230246251565e-16" x="325.9717886025953" y="331.5433515140117" width="41.28643972164758" height="4.2129020124129966" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="netId: U1.COMP to CCOMP.pos
|
|
5
|
+
globalConnNetId: connectivity_net3" data-x="10.719" data-y="-1" x="508.9802520218167" y="352.60786157607674" width="41.28643972164758" height="4.212902012413053" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="netId: U1.FSET to RFSET.pin1
|
|
6
|
+
globalConnNetId: connectivity_net0" data-x="2.275" data-y="0.1999999999999993" x="330.1636261049464" y="327.3304495015987" width="43.182245627233385" height="4.2129020124129966" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="netId: U1.TEMP to RTEMP.pin1
|
|
7
|
+
globalConnNetId: connectivity_net1" data-x="2.275" data-y="0.39999999999999947" x="330.1636261049464" y="323.11754748918565" width="43.182245627233385" height="4.212902012413053" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="netId: GND
|
|
8
|
+
globalConnNetId: connectivity_net5" data-x="-12" data-y="-2.71" x="46.00338536768845" y="386.31107767538094" width="10.110964829791271" height="8.847094226067327" fill="#00000066" stroke="#000000" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="netId: GND
|
|
9
|
+
globalConnNetId: connectivity_net5" data-x="13.3" data-y="-1.8110000000000008" x="578.935489937935" y="367.3740831295844" width="10.110964829791214" height="8.847094226067327" fill="#00000066" stroke="#000000" stroke-width="0.047473214285714285"/></g><g><rect data-type="rect" data-label="netId: CCOMP.neg to RCOMP.pin1
|
|
10
|
+
globalConnNetId: connectivity_net4" data-x="12.55" data-y="-0.775" x="566.0861388000752" y="345.235283054354" width="4.2129020124129966" height="9.479029527929299" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.047473214285714285"/></g><g><circle data-type="point" data-label="U1.1
|
|
11
|
+
x-" data-x="-1.05" data-y="0.7" cx="281.71525296219664" cy="318.90464547677266" r="3" fill="hsl(319, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.2
|
|
12
|
+
x-" data-x="-1.05" data-y="0.49999999999999994" cx="281.71525296219664" cy="323.11754748918565" r="3" fill="hsl(320, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.3
|
|
13
|
+
x-" data-x="-1.05" data-y="0.29999999999999993" cx="281.71525296219664" cy="327.3304495015987" r="3" fill="hsl(321, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.4
|
|
14
|
+
x-" data-x="-1.05" data-y="0.09999999999999987" cx="281.71525296219664" cy="331.5433515140117" r="3" fill="hsl(322, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.5
|
|
15
|
+
x-" data-x="-1.05" data-y="-0.10000000000000009" cx="281.71525296219664" cy="335.7562535264247" r="3" fill="hsl(323, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.6
|
|
16
|
+
x-" data-x="-1.05" data-y="-0.30000000000000004" cx="281.71525296219664" cy="339.96915553883775" r="3" fill="hsl(324, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.7
|
|
17
|
+
x-" data-x="-1.05" data-y="-0.5" cx="281.71525296219664" cy="344.18205755125075" r="3" fill="hsl(325, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.8
|
|
18
|
+
x-" data-x="-1.05" data-y="-0.7" cx="281.71525296219664" cy="348.39495956366375" r="3" fill="hsl(326, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.9
|
|
19
|
+
x+" data-x="1.05" data-y="-0.6" cx="325.95072409253333" cy="346.28850855745725" r="3" fill="hsl(327, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.10
|
|
20
|
+
x+" data-x="1.05" data-y="-0.39999999999999997" cx="325.95072409253333" cy="342.07560654504425" r="3" fill="hsl(217, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.11
|
|
21
|
+
x+" data-x="1.05" data-y="-0.19999999999999996" cx="325.95072409253333" cy="337.8627045326312" r="3" fill="hsl(218, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.12
|
|
22
|
+
x+" data-x="1.05" data-y="1.1102230246251565e-16" cx="325.95072409253333" cy="333.6498025202182" r="3" fill="hsl(219, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.13
|
|
23
|
+
x+" data-x="1.05" data-y="0.20000000000000007" cx="325.95072409253333" cy="329.4369005078052" r="3" fill="hsl(220, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.14
|
|
24
|
+
x+" data-x="1.05" data-y="0.4" cx="325.95072409253333" cy="325.22399849539215" r="3" fill="hsl(221, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="U1.15
|
|
25
|
+
x+" data-x="1.05" data-y="0.6" cx="325.95072409253333" cy="321.01109648297916" r="3" fill="hsl(222, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="RFSET.1
|
|
26
|
+
y+" data-x="-12" data-y="-1.6999999999999993" cx="51.05886778258409" cy="369.45946962572884" r="3" fill="hsl(273, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="RFSET.2
|
|
27
|
+
y-" data-x="-12" data-y="-2.3000000000000007" cx="51.05886778258409" cy="382.0981756629679" r="3" fill="hsl(274, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="RTEMP.1
|
|
28
|
+
y+" data-x="-12" data-y="0.1100000000000021" cx="51.05886778258409" cy="331.332706413391" r="3" fill="hsl(97, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="RTEMP.2
|
|
29
|
+
y-" data-x="-12" data-y="-0.4899999999999993" cx="51.05886778258409" cy="343.97141245063005" r="3" fill="hsl(98, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="RFAULT.1
|
|
30
|
+
y+" data-x="-12" data-y="1.9750000000000014" cx="51.05886778258409" cy="292.04739514763963" r="3" fill="hsl(227, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="RFAULT.2
|
|
31
|
+
y-" data-x="-12" data-y="1.375" cx="51.05886778258409" cy="304.68610118487874" r="3" fill="hsl(228, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="CCOMP.1
|
|
32
|
+
x-" data-x="11.7" data-y="-1" cx="550.2877562535264" cy="354.7143125822833" r="3" fill="hsl(165, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="CCOMP.2
|
|
33
|
+
x+" data-x="12.3" data-y="-1" cx="562.9264622907654" cy="354.7143125822833" r="3" fill="hsl(166, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="RCOMP.1
|
|
34
|
+
y+" data-x="13.3" data-y="-0.9999999999999996" cx="583.9909723528306" cy="354.71431258228324" r="3" fill="hsl(180, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="RCOMP.2
|
|
35
|
+
y-" data-x="13.3" data-y="-1.600000000000001" cx="583.9909723528306" cy="367.35301861952235" r="3" fill="hsl(181, 100%, 50%, 0.8)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
36
|
+
orientation: x-" data-x="-1.05" data-y="-0.5" cx="281.71525296219664" cy="344.18205755125075" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
37
|
+
orientation: y+" data-x="-12" data-y="1.9750000000000014" cx="51.05886778258409" cy="292.04739514763963" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
38
|
+
orientation: x+" data-x="1.05" data-y="1.1102230246251565e-16" cx="325.95072409253333" cy="333.6498025202182" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
39
|
+
orientation: x-" data-x="11.7" data-y="-1" cx="550.2877562535264" cy="354.7143125822833" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
40
|
+
orientation: x+" data-x="1.25" data-y="0.1999999999999993" cx="330.16362610494633" cy="329.4369005078052" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
41
|
+
orientation: x+" data-x="1.25" data-y="0.39999999999999947" cx="330.16362610494633" cy="325.2239984953922" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
42
|
+
orientation: y-" data-x="-12" data-y="-2.5" cx="51.05886778258409" cy="386.3110776753809" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
43
|
+
orientation: y-" data-x="13.3" data-y="-1.600000000000001" cx="583.9909723528306" cy="367.35301861952235" r="3" fill="hsl(40, 100%, 50%, 0.9)"/></g><g><circle data-type="point" data-label="anchorPoint
|
|
44
|
+
orientation: y+" data-x="12.55" data-y="-1" cx="568.1925898062817" cy="354.7143125822833" 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[
|
|
45
|
+
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
46
|
+
const svg = e.currentTarget;
|
|
47
|
+
const rect = svg.getBoundingClientRect();
|
|
48
|
+
const x = e.clientX - rect.left;
|
|
49
|
+
const y = e.clientY - rect.top;
|
|
50
|
+
const crosshair = svg.getElementById('crosshair');
|
|
51
|
+
const h = svg.getElementById('crosshair-h');
|
|
52
|
+
const v = svg.getElementById('crosshair-v');
|
|
53
|
+
const coords = svg.getElementById('coordinates');
|
|
54
|
+
|
|
55
|
+
crosshair.style.display = 'block';
|
|
56
|
+
h.setAttribute('x1', '0');
|
|
57
|
+
h.setAttribute('x2', '640');
|
|
58
|
+
h.setAttribute('y1', y);
|
|
59
|
+
h.setAttribute('y2', y);
|
|
60
|
+
v.setAttribute('x1', x);
|
|
61
|
+
v.setAttribute('x2', x);
|
|
62
|
+
v.setAttribute('y1', '0');
|
|
63
|
+
v.setAttribute('y2', '640');
|
|
64
|
+
|
|
65
|
+
// Calculate real coordinates using inverse transformation
|
|
66
|
+
const matrix = {"a":21.064510062065075,"c":0,"e":303.832988527365,"b":0,"d":-21.064510062065075,"f":333.6498025202182};
|
|
67
|
+
// Manually invert and apply the affine transform
|
|
68
|
+
// Since we only use translate and scale, we can directly compute:
|
|
69
|
+
// x' = (x - tx) / sx
|
|
70
|
+
// y' = (y - ty) / sy
|
|
71
|
+
const sx = matrix.a;
|
|
72
|
+
const sy = matrix.d;
|
|
73
|
+
const tx = matrix.e;
|
|
74
|
+
const ty = matrix.f;
|
|
75
|
+
const realPoint = {
|
|
76
|
+
x: (x - tx) / sx,
|
|
77
|
+
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
81
|
+
coords.setAttribute('x', (x + 5).toString());
|
|
82
|
+
coords.setAttribute('y', (y - 5).toString());
|
|
83
|
+
});
|
|
84
|
+
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
85
|
+
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
86
|
+
});
|
|
87
|
+
]]></script></svg>
|