@tscircuit/schematic-trace-solver 0.0.54 → 0.0.56
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 +31 -2
- package/dist/index.js +268 -2
- package/lib/solvers/LongDistancePairSolver/LongDistancePairSolver.ts +10 -1
- package/lib/solvers/MspConnectionPairSolver/MspConnectionPairSolver.ts +14 -0
- package/lib/solvers/NetLabelTraceCollisionSolver/NetLabelTraceCollisionSolver.ts +294 -0
- package/lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver.ts +15 -0
- package/lib/solvers/SchematicTracePipelineSolver/visualizeInputProblem.ts +7 -0
- package/lib/types/InputProblem.ts +2 -0
- package/lib/utils/arePinsInDifferentSchematicSections.ts +39 -0
- package/package.json +1 -1
- package/site/examples/example32.page.tsx +4 -0
- package/site/examples/example33.page.tsx +4 -0
- package/tests/assets/example32.json +148 -0
- package/tests/assets/example33.json +132 -0
- package/tests/examples/__snapshots__/example32.snap.svg +391 -0
- package/tests/examples/__snapshots__/example33.snap.svg +181 -0
- package/tests/examples/example32.test.ts +12 -0
- package/tests/examples/example33.test.ts +12 -0
- package/tests/solvers/MspConnectionPairSolver/MspConnectionPairSolver_schematicSections.test.ts +70 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"chips": [
|
|
3
|
+
{
|
|
4
|
+
"chipId": "schematic_component_0",
|
|
5
|
+
"center": {
|
|
6
|
+
"x": -1.4,
|
|
7
|
+
"y": -6.6
|
|
8
|
+
},
|
|
9
|
+
"width": 1.1,
|
|
10
|
+
"height": 0.388910699999999,
|
|
11
|
+
"pins": [
|
|
12
|
+
{
|
|
13
|
+
"pinId": "R7.1",
|
|
14
|
+
"x": -1.95,
|
|
15
|
+
"y": -6.6
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"pinId": "R7.2",
|
|
19
|
+
"x": -0.8499999999999999,
|
|
20
|
+
"y": -6.6
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"sectionId": "qspi"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"chipId": "schematic_component_1",
|
|
27
|
+
"center": {
|
|
28
|
+
"x": 0,
|
|
29
|
+
"y": -8.4
|
|
30
|
+
},
|
|
31
|
+
"width": 3.045,
|
|
32
|
+
"height": 1,
|
|
33
|
+
"pins": [
|
|
34
|
+
{
|
|
35
|
+
"pinId": "U5.1",
|
|
36
|
+
"x": -1.5225,
|
|
37
|
+
"y": -8.1
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"pinId": "U5.2",
|
|
41
|
+
"x": -1.5225,
|
|
42
|
+
"y": -8.3
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"pinId": "U5.3",
|
|
46
|
+
"x": -1.5225,
|
|
47
|
+
"y": -8.5
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"pinId": "U5.4",
|
|
51
|
+
"x": -1.5225,
|
|
52
|
+
"y": -8.700000000000001
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"pinId": "U5.5",
|
|
56
|
+
"x": 1.5225,
|
|
57
|
+
"y": -8.1
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"pinId": "U5.6",
|
|
61
|
+
"x": 1.5225,
|
|
62
|
+
"y": -8.3
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"pinId": "U5.7",
|
|
66
|
+
"x": 1.5225,
|
|
67
|
+
"y": -8.700000000000001
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"pinId": "U5.8",
|
|
71
|
+
"x": 1.5225,
|
|
72
|
+
"y": -8.5
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"sectionId": "qspi"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"directConnections": [],
|
|
79
|
+
"netConnections": [
|
|
80
|
+
{
|
|
81
|
+
"netId": "V3V3",
|
|
82
|
+
"pinIds": ["R7.1", "U5.8"],
|
|
83
|
+
"netLabelWidth": 0.4
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"netId": "QSPI_CS",
|
|
87
|
+
"pinIds": ["R7.2", "U5.4"],
|
|
88
|
+
"netLabelWidth": 0.7
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"netId": "QSPI_SCK",
|
|
92
|
+
"pinIds": ["U5.1"],
|
|
93
|
+
"netLabelWidth": 0.8
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"netId": "QSPI_DATA0",
|
|
97
|
+
"pinIds": ["U5.2"],
|
|
98
|
+
"netLabelWidth": 1
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"netId": "QSPI_DATA1",
|
|
102
|
+
"pinIds": ["U5.3"],
|
|
103
|
+
"netLabelWidth": 1
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"netId": "QSPI_DATA2",
|
|
107
|
+
"pinIds": ["U5.5"],
|
|
108
|
+
"netLabelWidth": 1
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"netId": "QSPI_DATA3",
|
|
112
|
+
"pinIds": ["U5.6"],
|
|
113
|
+
"netLabelWidth": 1
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"netId": "GND",
|
|
117
|
+
"pinIds": ["U5.7"],
|
|
118
|
+
"netLabelWidth": 0.3
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"availableNetLabelOrientations": {
|
|
122
|
+
"V3V3": ["y+"],
|
|
123
|
+
"QSPI_CS": ["x-", "x+"],
|
|
124
|
+
"QSPI_SCK": ["x-", "x+"],
|
|
125
|
+
"QSPI_DATA0": ["x-", "x+"],
|
|
126
|
+
"QSPI_DATA1": ["x-", "x+"],
|
|
127
|
+
"QSPI_DATA2": ["x-", "x+"],
|
|
128
|
+
"QSPI_DATA3": ["x-", "x+"],
|
|
129
|
+
"GND": ["y-"]
|
|
130
|
+
},
|
|
131
|
+
"maxMspPairDistance": 2.4
|
|
132
|
+
}
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
<svg width="640" height="640" viewBox="0 0 640 640" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="100%" height="100%" fill="white" />
|
|
3
|
+
<g>
|
|
4
|
+
<circle data-type="point" data-label="B1.1
|
|
5
|
+
x-" data-x="-4.475" data-y="2.9699999999999998" cx="64.53944811504081" cy="160.57520404197436" r="3" fill="hsl(210, 100%, 50%, 0.8)" />
|
|
6
|
+
</g>
|
|
7
|
+
<g>
|
|
8
|
+
<circle data-type="point" data-label="B1.2
|
|
9
|
+
x+" data-x="-3.525" data-y="2.9699999999999998" cx="116.23008161678973" cy="160.57520404197436" r="3" fill="hsl(211, 100%, 50%, 0.8)" />
|
|
10
|
+
</g>
|
|
11
|
+
<g>
|
|
12
|
+
<circle data-type="point" data-label="SW1.1
|
|
13
|
+
x-" data-x="-2.38" data-y="3" cx="178.5308977846871" cy="158.94286824718228" r="3" fill="hsl(104, 100%, 50%, 0.8)" />
|
|
14
|
+
</g>
|
|
15
|
+
<g>
|
|
16
|
+
<circle data-type="point" data-label="SW1.2
|
|
17
|
+
x+" data-x="-1.62" data-y="3" cx="219.88340458608627" cy="158.94286824718228" r="3" fill="hsl(105, 100%, 50%, 0.8)" />
|
|
18
|
+
</g>
|
|
19
|
+
<g>
|
|
20
|
+
<circle data-type="point" data-label="C3.1
|
|
21
|
+
x-" data-x="-3.55" data-y="1.5" cx="114.86980178779635" cy="240.55965798678585" r="3" fill="hsl(243, 100%, 50%, 0.8)" />
|
|
22
|
+
</g>
|
|
23
|
+
<g>
|
|
24
|
+
<circle data-type="point" data-label="C3.2
|
|
25
|
+
x+" data-x="-2.45" data-y="1.5" cx="174.7221142635056" cy="240.55965798678585" r="3" fill="hsl(244, 100%, 50%, 0.8)" />
|
|
26
|
+
</g>
|
|
27
|
+
<g>
|
|
28
|
+
<circle data-type="point" data-label="U1.1
|
|
29
|
+
x+" data-x="2.7" data-y="2.2" cx="454.93975903614455" cy="202.47182277497086" r="3" fill="hsl(319, 100%, 50%, 0.8)" />
|
|
30
|
+
</g>
|
|
31
|
+
<g>
|
|
32
|
+
<circle data-type="point" data-label="U1.2
|
|
33
|
+
x-" data-x="0.2999999999999998" data-y="2.2" cx="324.35289545277885" cy="202.47182277497086" r="3" fill="hsl(320, 100%, 50%, 0.8)" />
|
|
34
|
+
</g>
|
|
35
|
+
<g>
|
|
36
|
+
<circle data-type="point" data-label="U1.3
|
|
37
|
+
x+" data-x="2.7" data-y="2.6" cx="454.93975903614455" cy="180.70734551107657" r="3" fill="hsl(321, 100%, 50%, 0.8)" />
|
|
38
|
+
</g>
|
|
39
|
+
<g>
|
|
40
|
+
<circle data-type="point" data-label="U1.4
|
|
41
|
+
x-" data-x="0.2999999999999998" data-y="2.8" cx="324.35289545277885" cy="169.82510687912944" r="3" fill="hsl(322, 100%, 50%, 0.8)" />
|
|
42
|
+
</g>
|
|
43
|
+
<g>
|
|
44
|
+
<circle data-type="point" data-label="U1.5
|
|
45
|
+
x-" data-x="0.2999999999999998" data-y="2.6" cx="324.35289545277885" cy="180.70734551107657" r="3" fill="hsl(323, 100%, 50%, 0.8)" />
|
|
46
|
+
</g>
|
|
47
|
+
<g>
|
|
48
|
+
<circle data-type="point" data-label="U1.6
|
|
49
|
+
x-" data-x="0.2999999999999998" data-y="2.4" cx="324.35289545277885" cy="191.5895841430237" r="3" fill="hsl(324, 100%, 50%, 0.8)" />
|
|
50
|
+
</g>
|
|
51
|
+
<g>
|
|
52
|
+
<circle data-type="point" data-label="U1.7
|
|
53
|
+
x+" data-x="2.7" data-y="2.4" cx="454.93975903614455" cy="191.5895841430237" r="3" fill="hsl(325, 100%, 50%, 0.8)" />
|
|
54
|
+
</g>
|
|
55
|
+
<g>
|
|
56
|
+
<circle data-type="point" data-label="U1.8
|
|
57
|
+
x+" data-x="2.7" data-y="2.8" cx="454.93975903614455" cy="169.82510687912944" r="3" fill="hsl(326, 100%, 50%, 0.8)" />
|
|
58
|
+
</g>
|
|
59
|
+
<g>
|
|
60
|
+
<circle data-type="point" data-label="C2.1
|
|
61
|
+
x-" data-x="3.45" data-y="1.5" cx="495.74815390594637" cy="240.55965798678585" r="3" fill="hsl(2, 100%, 50%, 0.8)" />
|
|
62
|
+
</g>
|
|
63
|
+
<g>
|
|
64
|
+
<circle data-type="point" data-label="C2.2
|
|
65
|
+
x+" data-x="4.55" data-y="1.5" cx="555.6004663816557" cy="240.55965798678585" r="3" fill="hsl(3, 100%, 50%, 0.8)" />
|
|
66
|
+
</g>
|
|
67
|
+
<g>
|
|
68
|
+
<circle data-type="point" data-label="R1.1
|
|
69
|
+
x-" data-x="-4.550000000000001" data-y="-1.5" cx="60.458608628060574" cy="403.793237465993" r="3" fill="hsl(226, 100%, 50%, 0.8)" />
|
|
70
|
+
</g>
|
|
71
|
+
<g>
|
|
72
|
+
<circle data-type="point" data-label="R1.2
|
|
73
|
+
x+" data-x="-3.4499999999999997" data-y="-1.5" cx="120.31092110376991" cy="403.793237465993" r="3" fill="hsl(227, 100%, 50%, 0.8)" />
|
|
74
|
+
</g>
|
|
75
|
+
<g>
|
|
76
|
+
<circle data-type="point" data-label="R2.1
|
|
77
|
+
x-" data-x="-2.55" data-y="-1.5" cx="169.28099494753206" cy="403.793237465993" r="3" fill="hsl(107, 100%, 50%, 0.8)" />
|
|
78
|
+
</g>
|
|
79
|
+
<g>
|
|
80
|
+
<circle data-type="point" data-label="R2.2
|
|
81
|
+
x+" data-x="-1.45" data-y="-1.5" cx="229.13330742324132" cy="403.793237465993" r="3" fill="hsl(108, 100%, 50%, 0.8)" />
|
|
82
|
+
</g>
|
|
83
|
+
<g>
|
|
84
|
+
<circle data-type="point" data-label="C1.1
|
|
85
|
+
x-" data-x="-3.55" data-y="-3" cx="114.86980178779635" cy="485.4100272055966" r="3" fill="hsl(121, 100%, 50%, 0.8)" />
|
|
86
|
+
</g>
|
|
87
|
+
<g>
|
|
88
|
+
<circle data-type="point" data-label="C1.2
|
|
89
|
+
x+" data-x="-2.45" data-y="-3" cx="174.7221142635056" cy="485.4100272055966" r="3" fill="hsl(122, 100%, 50%, 0.8)" />
|
|
90
|
+
</g>
|
|
91
|
+
<g>
|
|
92
|
+
<circle data-type="point" data-label="R3.1
|
|
93
|
+
x-" data-x="1.95" data-y="-1.5" cx="414.1313641663428" cy="403.793237465993" r="3" fill="hsl(348, 100%, 50%, 0.8)" />
|
|
94
|
+
</g>
|
|
95
|
+
<g>
|
|
96
|
+
<circle data-type="point" data-label="R3.2
|
|
97
|
+
x+" data-x="3.05" data-y="-1.5" cx="473.98367664205205" cy="403.793237465993" r="3" fill="hsl(349, 100%, 50%, 0.8)" />
|
|
98
|
+
</g>
|
|
99
|
+
<g>
|
|
100
|
+
<circle data-type="point" data-label="D1.1
|
|
101
|
+
x-" data-x="3.935" data-y="-1.5" cx="522.1375825884181" cy="403.793237465993" r="3" fill="hsl(32, 100%, 50%, 0.8)" />
|
|
102
|
+
</g>
|
|
103
|
+
<g>
|
|
104
|
+
<circle data-type="point" data-label="D1.2
|
|
105
|
+
x+" data-x="5.0649999999999995" data-y="-1.5" cx="583.6222308589195" cy="403.793237465993" r="3" fill="hsl(33, 100%, 50%, 0.8)" />
|
|
106
|
+
</g>
|
|
107
|
+
<g>
|
|
108
|
+
<circle data-type="point" data-label="anchorPoint
|
|
109
|
+
orientation: x-" data-x="-4.475" data-y="2.9699999999999998" cx="64.53944811504081" cy="160.57520404197436" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
110
|
+
</g>
|
|
111
|
+
<g>
|
|
112
|
+
<circle data-type="point" data-label="anchorPoint
|
|
113
|
+
orientation: x-" data-x="-2.38" data-y="3" cx="178.5308977846871" cy="158.94286824718228" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
114
|
+
</g>
|
|
115
|
+
<g>
|
|
116
|
+
<circle data-type="point" data-label="anchorPoint
|
|
117
|
+
orientation: y-" data-x="-2.9699999999999998" data-y="2.9699999999999998" cx="146.42829382044306" cy="160.57520404197436" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
118
|
+
</g>
|
|
119
|
+
<g>
|
|
120
|
+
<circle data-type="point" data-label="anchorPoint
|
|
121
|
+
orientation: y-" data-x="4.75" data-y="1.5" cx="566.4827050136028" cy="240.55965798678585" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
122
|
+
</g>
|
|
123
|
+
<g>
|
|
124
|
+
<circle data-type="point" data-label="anchorPoint
|
|
125
|
+
orientation: x+" data-x="-2.45" data-y="-3" cx="174.7221142635056" cy="485.4100272055966" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
126
|
+
</g>
|
|
127
|
+
<g>
|
|
128
|
+
<circle data-type="point" data-label="anchorPoint
|
|
129
|
+
orientation: x+" data-x="5.0649999999999995" data-y="-1.5" cx="583.6222308589195" cy="403.793237465993" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
130
|
+
</g>
|
|
131
|
+
<g>
|
|
132
|
+
<circle data-type="point" data-label="anchorPoint
|
|
133
|
+
orientation: x+" data-x="-1.62" data-y="3" cx="219.88340458608627" cy="158.94286824718228" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
134
|
+
</g>
|
|
135
|
+
<g>
|
|
136
|
+
<circle data-type="point" data-label="anchorPoint
|
|
137
|
+
orientation: x-" data-x="-3.55" data-y="1.5" cx="114.86980178779635" cy="240.55965798678585" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
138
|
+
</g>
|
|
139
|
+
<g>
|
|
140
|
+
<circle data-type="point" data-label="anchorPoint
|
|
141
|
+
orientation: y+" data-x="0.09999999999999981" data-y="3.2" cx="313.47065682083166" cy="148.06062961523511" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
142
|
+
</g>
|
|
143
|
+
<g>
|
|
144
|
+
<circle data-type="point" data-label="anchorPoint
|
|
145
|
+
orientation: x-" data-x="-4.550000000000001" data-y="-1.5" cx="60.458608628060574" cy="403.793237465993" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
146
|
+
</g>
|
|
147
|
+
<g>
|
|
148
|
+
<circle data-type="point" data-label="anchorPoint
|
|
149
|
+
orientation: x-" data-x="0.09999999999999981" data-y="2.4" cx="313.47065682083166" cy="191.5895841430237" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
150
|
+
</g>
|
|
151
|
+
<g>
|
|
152
|
+
<circle data-type="point" data-label="anchorPoint
|
|
153
|
+
orientation: y+" data-x="-1.25" data-y="-1.5" cx="240.01554605518848" cy="403.793237465993" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
154
|
+
</g>
|
|
155
|
+
<g>
|
|
156
|
+
<circle data-type="point" data-label="anchorPoint
|
|
157
|
+
orientation: x+" data-x="2.7" data-y="2.6" cx="454.93975903614455" cy="180.70734551107657" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
158
|
+
</g>
|
|
159
|
+
<g>
|
|
160
|
+
<circle data-type="point" data-label="anchorPoint
|
|
161
|
+
orientation: x-" data-x="1.95" data-y="-1.5" cx="414.1313641663428" cy="403.793237465993" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
162
|
+
</g>
|
|
163
|
+
<g>
|
|
164
|
+
<circle data-type="point" data-label="anchorPoint
|
|
165
|
+
orientation: x-" data-x="0.2999999999999998" data-y="2.6" cx="324.35289545277885" cy="180.70734551107657" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
166
|
+
</g>
|
|
167
|
+
<g>
|
|
168
|
+
<circle data-type="point" data-label="anchorPoint
|
|
169
|
+
orientation: x-" data-x="3.45" data-y="1.5" cx="495.74815390594637" cy="240.55965798678585" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
170
|
+
</g>
|
|
171
|
+
<g>
|
|
172
|
+
<circle data-type="point" data-label="anchorPoint
|
|
173
|
+
orientation: y+" data-x="-3" data-y="-1.5" cx="144.79595802565098" cy="403.793237465993" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
174
|
+
</g>
|
|
175
|
+
<g>
|
|
176
|
+
<circle data-type="point" data-label="anchorPoint
|
|
177
|
+
orientation: x+" data-x="2.7" data-y="2.4" cx="454.93975903614455" cy="191.5895841430237" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
178
|
+
</g>
|
|
179
|
+
<g>
|
|
180
|
+
<circle data-type="point" data-label="anchorPoint
|
|
181
|
+
orientation: y+" data-x="3.4924999999999997" data-y="-1.5" cx="498.06062961523514" cy="403.793237465993" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
182
|
+
</g>
|
|
183
|
+
<g>
|
|
184
|
+
<polyline data-points="-4.475,2.9699999999999998 -2.38,3" data-type="line" data-label="" points="64.53944811504081,160.57520404197436 178.5308977846871,158.94286824718228" fill="none" stroke="hsl(192, 100%, 50%, 0.8)" stroke-width="1" />
|
|
185
|
+
</g>
|
|
186
|
+
<g>
|
|
187
|
+
<polyline data-points="0.2999999999999998,2.6 3.45,1.5" data-type="line" data-label="" points="324.35289545277885,180.70734551107657 495.74815390594637,240.55965798678585" fill="none" stroke="hsl(120, 100%, 50%, 0.8)" stroke-width="1" />
|
|
188
|
+
</g>
|
|
189
|
+
<g>
|
|
190
|
+
<polyline data-points="0.2999999999999998,2.4 0.2999999999999998,2.2" data-type="line" data-label="" points="324.35289545277885,191.5895841430237 324.35289545277885,202.47182277497086" fill="none" stroke="hsl(192, 100%, 50%, 0.8)" stroke-width="1" />
|
|
191
|
+
</g>
|
|
192
|
+
<g>
|
|
193
|
+
<polyline data-points="3.05,-1.5 3.935,-1.5" data-type="line" data-label="" points="473.98367664205205,403.793237465993 522.1375825884181,403.793237465993" fill="none" stroke="hsl(344, 100%, 50%, 0.8)" stroke-width="1" />
|
|
194
|
+
</g>
|
|
195
|
+
<g>
|
|
196
|
+
<polyline data-points="-3.525,2.9699999999999998 -2.45,1.5" data-type="line" data-label="" points="116.23008161678973,160.57520404197436 174.7221142635056,240.55965798678585" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
197
|
+
</g>
|
|
198
|
+
<g>
|
|
199
|
+
<polyline data-points="2.7,2.2 4.55,1.5" data-type="line" data-label="" points="454.93975903614455,202.47182277497086 555.6004663816557,240.55965798678585" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
200
|
+
</g>
|
|
201
|
+
<g>
|
|
202
|
+
<polyline data-points="-1.62,3 -3.55,1.5" data-type="line" data-label="" points="219.88340458608627,158.94286824718228 114.86980178779635,240.55965798678585" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
203
|
+
</g>
|
|
204
|
+
<g>
|
|
205
|
+
<polyline data-points="0.2999999999999998,2.8 2.7,2.8" data-type="line" data-label="" points="324.35289545277885,169.82510687912944 454.93975903614455,169.82510687912944" fill="none" stroke="hsl(190, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
206
|
+
</g>
|
|
207
|
+
<g>
|
|
208
|
+
<polyline data-points="0.2999999999999998,2.4 0.09999999999999981,2.4 0.09999999999999981,2.2 0.2999999999999998,2.2" data-type="line" data-label="" points="324.35289545277885,191.5895841430237 313.47065682083166,191.5895841430237 313.47065682083166,202.47182277497086 324.35289545277885,202.47182277497086" fill="none" stroke="purple" stroke-width="1" />
|
|
209
|
+
</g>
|
|
210
|
+
<g>
|
|
211
|
+
<polyline data-points="-2.55,-1.5 -3.4499999999999997,-1.5" data-type="line" data-label="" points="169.28099494753206,403.793237465993 120.31092110376991,403.793237465993" fill="none" stroke="purple" stroke-width="1" />
|
|
212
|
+
</g>
|
|
213
|
+
<g>
|
|
214
|
+
<polyline data-points="3.05,-1.5 3.935,-1.5" data-type="line" data-label="" points="473.98367664205205,403.793237465993 522.1375825884181,403.793237465993" fill="none" stroke="purple" stroke-width="1" />
|
|
215
|
+
</g>
|
|
216
|
+
<g>
|
|
217
|
+
<polyline data-points="-1.4500000000000002,-1.5 -1.25,-1.5 -1.25,-2.25 -3.75,-2.25 -3.75,-3 -3.55,-3" data-type="line" data-label="" points="229.13330742324132,403.793237465993 240.01554605518848,403.793237465993 240.01554605518848,444.60163233579476 103.98756315584919,444.60163233579476 103.98756315584919,485.4100272055966 114.86980178779635,485.4100272055966" fill="none" stroke="purple" stroke-width="1" />
|
|
218
|
+
</g>
|
|
219
|
+
<g>
|
|
220
|
+
<polyline data-points="-3.525,2.9699999999999998 -2.415,2.9699999999999998 -2.415,1.5 -2.45,1.5" data-type="line" data-label="" points="116.23008161678973,160.57520404197436 176.62650602409636,160.57520404197436 176.62650602409636,240.55965798678585 174.7221142635056,240.55965798678585" fill="none" stroke="purple" stroke-width="1" />
|
|
221
|
+
</g>
|
|
222
|
+
<g>
|
|
223
|
+
<polyline data-points="2.7,2.2 4.75,2.2 4.75,1.5 4.55,1.5" data-type="line" data-label="" points="454.93975903614455,202.47182277497086 566.4827050136028,202.47182277497086 566.4827050136028,240.55965798678585 555.6004663816557,240.55965798678585" fill="none" stroke="purple" stroke-width="1" />
|
|
224
|
+
</g>
|
|
225
|
+
<g>
|
|
226
|
+
<polyline data-points="0.2999999999999998,2.8 0.09999999999999981,2.8 0.09999999999999981,3.2 2.9000000000000004,3.2 2.9000000000000004,2.8 2.7,2.8" data-type="line" data-label="" points="324.35289545277885,169.82510687912944 313.47065682083166,169.82510687912944 313.47065682083166,148.06062961523511 465.82199766809174,148.06062961523511 465.82199766809174,169.82510687912944 454.93975903614455,169.82510687912944" fill="none" stroke="purple" stroke-width="1" />
|
|
227
|
+
</g>
|
|
228
|
+
<g>
|
|
229
|
+
<rect data-type="rect" data-label="schematic_component_0" data-x="-4" data-y="3" x="64.53944811504081" y="151.05324523902058" width="51.69063350174892" height="15.779246016323384" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018378571428571428" />
|
|
230
|
+
</g>
|
|
231
|
+
<g>
|
|
232
|
+
<rect data-type="rect" data-label="schematic_component_1" data-x="-2" data-y="3" x="178.5308977846871" y="145.34006995724835" width="41.35250680139916" height="27.20559657986786" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018378571428571428" />
|
|
233
|
+
</g>
|
|
234
|
+
<g>
|
|
235
|
+
<rect data-type="rect" data-label="schematic_component_2" data-x="-3" data-y="1.5" x="114.86980178779635" y="217.70695685969685" width="59.852312475709255" height="45.70540225417801" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018378571428571428" />
|
|
236
|
+
</g>
|
|
237
|
+
<g>
|
|
238
|
+
<rect data-type="rect" data-label="schematic_component_3" data-x="1.5" data-y="2.5" x="324.35289545277885" y="158.94286824718228" width="130.5868635833657" height="54.41119315973572" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018378571428571428" />
|
|
239
|
+
</g>
|
|
240
|
+
<g>
|
|
241
|
+
<rect data-type="rect" data-label="schematic_component_4" data-x="4" data-y="1.5" x="495.74815390594637" y="217.70695685969685" width="59.85231247570931" height="45.70540225417801" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018378571428571428" />
|
|
242
|
+
</g>
|
|
243
|
+
<g>
|
|
244
|
+
<rect data-type="rect" data-label="schematic_component_5" data-x="-4" data-y="-1.5" x="60.458608628060574" y="393.212689856199" width="59.85231247570934" height="21.161095219587992" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018378571428571428" />
|
|
245
|
+
</g>
|
|
246
|
+
<g>
|
|
247
|
+
<rect data-type="rect" data-label="schematic_component_6" data-x="-2" data-y="-1.5" x="169.28099494753206" y="393.212689856199" width="59.852312475709255" height="21.161095219587992" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018378571428571428" />
|
|
248
|
+
</g>
|
|
249
|
+
<g>
|
|
250
|
+
<rect data-type="rect" data-label="schematic_component_7" data-x="-3" data-y="-3" x="114.86980178779635" y="462.5573260785076" width="59.852312475709255" height="45.70540225417801" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018378571428571428" />
|
|
251
|
+
</g>
|
|
252
|
+
<g>
|
|
253
|
+
<rect data-type="rect" data-label="schematic_component_8" data-x="2.5" data-y="-1.5" x="414.1313641663428" y="393.212689856199" width="59.852312475709255" height="21.161095219587992" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018378571428571428" />
|
|
254
|
+
</g>
|
|
255
|
+
<g>
|
|
256
|
+
<rect data-type="rect" data-label="schematic_component_9" data-x="4.5" data-y="-1.5" x="522.1375825884181" y="386.1095996890789" width="61.48464827050134" height="35.36727555382822" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.018378571428571428" />
|
|
257
|
+
</g>
|
|
258
|
+
<g>
|
|
259
|
+
<rect data-type="rect" data-label="netId: .B1 > .pin1 to .SW1 > .pin1
|
|
260
|
+
globalConnNetId: connectivity_net0" data-x="-4.701" data-y="2.9699999999999998" x="40" y="155.1340847260008" width="24.48503692188106" height="10.882238631947132" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.018378571428571428" />
|
|
261
|
+
</g>
|
|
262
|
+
<g>
|
|
263
|
+
<rect data-type="rect" data-label="netId: .B1 > .pin1 to .SW1 > .pin1
|
|
264
|
+
globalConnNetId: connectivity_net0" data-x="-2.606" data-y="3" x="153.9914496696463" y="153.5017489312087" width="24.48503692188109" height="10.882238631947132" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.018378571428571428" />
|
|
265
|
+
</g>
|
|
266
|
+
<g>
|
|
267
|
+
<rect data-type="rect" data-label="netId: GND
|
|
268
|
+
globalConnNetId: connectivity_net6" data-x="-2.9699999999999998" data-y="2.82" x="140.9871745044695" y="160.57520404197436" width="10.882238631947132" height="16.323357947920698" fill="#00000066" stroke="#000000" stroke-width="0.018378571428571428" />
|
|
269
|
+
</g>
|
|
270
|
+
<g>
|
|
271
|
+
<rect data-type="rect" data-label="netId: GND
|
|
272
|
+
globalConnNetId: connectivity_net6" data-x="4.75" data-y="1.35" x="561.0415856976292" y="240.55965798678585" width="10.882238631947075" height="16.323357947920726" fill="#00000066" stroke="#000000" stroke-width="0.018378571428571428" />
|
|
273
|
+
</g>
|
|
274
|
+
<g>
|
|
275
|
+
<rect data-type="rect" data-label="netId: GND
|
|
276
|
+
globalConnNetId: connectivity_net6" data-x="-2.2990000000000004" data-y="-3" x="174.77652545666535" y="479.968907889623" width="16.323357947920698" height="10.882238631947189" fill="#00000066" stroke="#000000" stroke-width="0.018378571428571428" />
|
|
277
|
+
</g>
|
|
278
|
+
<g>
|
|
279
|
+
<rect data-type="rect" data-label="netId: GND
|
|
280
|
+
globalConnNetId: connectivity_net6" data-x="5.216" data-y="-1.5" x="583.6766420520793" y="398.3521181500194" width="16.323357947920726" height="10.882238631947189" fill="#00000066" stroke="#000000" stroke-width="0.018378571428571428" />
|
|
281
|
+
</g>
|
|
282
|
+
<g>
|
|
283
|
+
<rect data-type="rect" data-label="netId: VCC
|
|
284
|
+
globalConnNetId: connectivity_net7" data-x="-1.4690000000000003" data-y="3" x="219.937815779246" y="153.5017489312087" width="16.323357947920698" height="10.882238631947132" fill="#ef444466" stroke="#ef4444" stroke-width="0.018378571428571428" />
|
|
285
|
+
</g>
|
|
286
|
+
<g>
|
|
287
|
+
<rect data-type="rect" data-label="netId: VCC
|
|
288
|
+
globalConnNetId: connectivity_net7" data-x="-3.7009999999999996" data-y="1.5" x="98.4920326467159" y="235.11853867081226" width="16.323357947920698" height="10.882238631947189" fill="#ef444466" stroke="#ef4444" stroke-width="0.018378571428571428" />
|
|
289
|
+
</g>
|
|
290
|
+
<g>
|
|
291
|
+
<rect data-type="rect" data-label="netId: VCC
|
|
292
|
+
globalConnNetId: connectivity_net7" data-x="0.09999999999999981" data-y="3.35" x="308.0295375048581" y="131.73727166731442" width="10.882238631947132" height="16.323357947920698" fill="#ef444466" stroke="#ef4444" stroke-width="0.018378571428571428" />
|
|
293
|
+
</g>
|
|
294
|
+
<g>
|
|
295
|
+
<rect data-type="rect" data-label="netId: VCC
|
|
296
|
+
globalConnNetId: connectivity_net7" data-x="-4.701000000000001" data-y="-1.5" x="44.08083948698004" y="398.3521181500194" width="16.323357947920783" height="10.882238631947189" fill="#ef444466" stroke="#ef4444" stroke-width="0.018378571428571428" />
|
|
297
|
+
</g>
|
|
298
|
+
<g>
|
|
299
|
+
<rect data-type="rect" data-label="netId: .U1 > .THRES to .C1 > .pin1
|
|
300
|
+
globalConnNetId: connectivity_net2" data-x="-0.1250000000000002" data-y="2.4" x="288.98561989895063" y="186.14846482705013" width="24.485036921881033" height="10.882238631947132" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.018378571428571428" />
|
|
301
|
+
</g>
|
|
302
|
+
<g>
|
|
303
|
+
<rect data-type="rect" data-label="netId: .R2 > .pin2 to .U1 > .THRES
|
|
304
|
+
globalConnNetId: connectivity_net2" data-x="-1.25" data-y="-1.275" x="234.5744267392149" y="379.3082005441119" width="10.882238631947132" height="24.48503692188109" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.018378571428571428" />
|
|
305
|
+
</g>
|
|
306
|
+
<g>
|
|
307
|
+
<rect data-type="rect" data-label="netId: .U1 > .OUT to .R3 > .pin1
|
|
308
|
+
globalConnNetId: connectivity_net4" data-x="2.926" data-y="2.6" x="454.9941702293043" y="175.26622619510297" width="24.48503692188109" height="10.88223863194716" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.018378571428571428" />
|
|
309
|
+
</g>
|
|
310
|
+
<g>
|
|
311
|
+
<rect data-type="rect" data-label="netId: .U1 > .OUT to .R3 > .pin1
|
|
312
|
+
globalConnNetId: connectivity_net4" data-x="1.724" data-y="-1.5" x="389.59191605130195" y="398.3521181500194" width="24.48503692188109" height="10.882238631947189" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.018378571428571428" />
|
|
313
|
+
</g>
|
|
314
|
+
<g>
|
|
315
|
+
<rect data-type="rect" data-label="netId: .U1 > .CTRL to .C2 > .pin1
|
|
316
|
+
globalConnNetId: connectivity_net1" data-x="0.07399999999999982" data-y="2.6" x="299.813447337738" y="175.26622619510297" width="24.48503692188109" height="10.88223863194716" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.018378571428571428" />
|
|
317
|
+
</g>
|
|
318
|
+
<g>
|
|
319
|
+
<rect data-type="rect" data-label="netId: .U1 > .CTRL to .C2 > .pin1
|
|
320
|
+
globalConnNetId: connectivity_net1" data-x="3.224" data-y="1.5" x="471.2087057909056" y="235.11853867081226" width="24.485036921881033" height="10.882238631947189" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.018378571428571428" />
|
|
321
|
+
</g>
|
|
322
|
+
<g>
|
|
323
|
+
<rect data-type="rect" data-label="netId: .U1 > .DISCH to .R2 > .pin1
|
|
324
|
+
globalConnNetId: connectivity_net3" data-x="-3" data-y="-1.275" x="139.3548387096774" y="379.3082005441119" width="10.882238631947132" height="24.48503692188109" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.018378571428571428" />
|
|
325
|
+
</g>
|
|
326
|
+
<g>
|
|
327
|
+
<rect data-type="rect" data-label="netId: .U1 > .DISCH to .R2 > .pin1
|
|
328
|
+
globalConnNetId: connectivity_net3" data-x="2.926" data-y="2.4" x="454.9941702293043" y="186.14846482705013" width="24.48503692188109" height="10.882238631947132" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.018378571428571428" />
|
|
329
|
+
</g>
|
|
330
|
+
<g>
|
|
331
|
+
<rect data-type="rect" data-label="netId: .R3 > .pin2 to .D1 > .pin1
|
|
332
|
+
globalConnNetId: connectivity_net5" data-x="3.4924999999999997" data-y="-1.275" x="492.6195102992615" y="379.3082005441119" width="10.882238631947189" height="24.48503692188109" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.018378571428571428" />
|
|
333
|
+
</g>
|
|
334
|
+
<g id="crosshair" style="display: none">
|
|
335
|
+
<line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
|
|
336
|
+
<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>
|
|
337
|
+
</g>
|
|
338
|
+
<script>
|
|
339
|
+
<![CDATA[
|
|
340
|
+
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
341
|
+
const svg = e.currentTarget;
|
|
342
|
+
const rect = svg.getBoundingClientRect();
|
|
343
|
+
const x = e.clientX - rect.left;
|
|
344
|
+
const y = e.clientY - rect.top;
|
|
345
|
+
const crosshair = svg.getElementById('crosshair');
|
|
346
|
+
const h = svg.getElementById('crosshair-h');
|
|
347
|
+
const v = svg.getElementById('crosshair-v');
|
|
348
|
+
const coords = svg.getElementById('coordinates');
|
|
349
|
+
|
|
350
|
+
crosshair.style.display = 'block';
|
|
351
|
+
h.setAttribute('x1', '0');
|
|
352
|
+
h.setAttribute('x2', '640');
|
|
353
|
+
h.setAttribute('y1', y);
|
|
354
|
+
h.setAttribute('y2', y);
|
|
355
|
+
v.setAttribute('x1', x);
|
|
356
|
+
v.setAttribute('x2', x);
|
|
357
|
+
v.setAttribute('y1', '0');
|
|
358
|
+
v.setAttribute('y2', '640');
|
|
359
|
+
|
|
360
|
+
// Calculate real coordinates using inverse transformation
|
|
361
|
+
const matrix = {
|
|
362
|
+
"a": 54.41119315973572,
|
|
363
|
+
"c": 0,
|
|
364
|
+
"e": 308.0295375048581,
|
|
365
|
+
"b": 0,
|
|
366
|
+
"d": -54.41119315973572,
|
|
367
|
+
"f": 322.1764477263894
|
|
368
|
+
};
|
|
369
|
+
// Manually invert and apply the affine transform
|
|
370
|
+
// Since we only use translate and scale, we can directly compute:
|
|
371
|
+
// x' = (x - tx) / sx
|
|
372
|
+
// y' = (y - ty) / sy
|
|
373
|
+
const sx = matrix.a;
|
|
374
|
+
const sy = matrix.d;
|
|
375
|
+
const tx = matrix.e;
|
|
376
|
+
const ty = matrix.f;
|
|
377
|
+
const realPoint = {
|
|
378
|
+
x: (x - tx) / sx,
|
|
379
|
+
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
383
|
+
coords.setAttribute('x', (x + 5).toString());
|
|
384
|
+
coords.setAttribute('y', (y - 5).toString());
|
|
385
|
+
});
|
|
386
|
+
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
387
|
+
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
388
|
+
});
|
|
389
|
+
]]>
|
|
390
|
+
</script>
|
|
391
|
+
</svg>
|