@tscircuit/schematic-trace-solver 0.0.62 → 0.0.64
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 +7 -0
- package/dist/index.js +126 -52
- package/lib/solvers/AvailableNetOrientationSolver/AvailableNetOrientationSolver.ts +67 -36
- package/lib/solvers/AvailableNetOrientationSolver/geometry.ts +13 -0
- package/lib/solvers/NetLabelNetLabelCollisionSolver/NetLabelNetLabelCollisionSolver.ts +8 -0
- package/lib/solvers/NetLabelPlacementSolver/NetLabelPlacementSolver.ts +24 -0
- package/lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/SingleNetLabelPlacementSolver.ts +7 -1
- package/lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/geometry.ts +9 -4
- package/lib/solvers/NetLabelPlacementSolver/SingleNetLabelPlacementSolver/solvePortOnlyPin.ts +3 -0
- package/lib/solvers/NetLabelTraceCollisionSolver/NetLabelTraceCollisionSolver.ts +9 -13
- package/lib/solvers/TraceAnchoredNetLabelOverlapSolver/candidates.ts +19 -0
- package/lib/types/InputProblem.ts +1 -0
- package/package.json +1 -1
- package/tests/assets/example41.json +2 -1
- package/tests/examples/__snapshots__/example34.snap.svg +23 -19
- package/tests/examples/__snapshots__/example41.snap.svg +2 -2
- package/tests/examples/example34.test.ts +8 -0
- package/tests/fixtures/traceLabelCollisions.ts +42 -0
- package/tests/repros/__snapshots__/netlabel-connector-through-rail-label.snap.svg +273 -0
- package/tests/repros/__snapshots__/trace-overlap-box-resistor.snap.svg +113 -0
- package/tests/repros/assets/repro-netlabel-connector-through-label.input.json +139 -0
- package/tests/repros/assets/repro126-trace-overlap-box-resistor.input.json +74 -0
- package/tests/repros/netlabel-connector-through-rail-label.test.ts +19 -0
- package/tests/repros/trace-overlap-box-resistor.test.ts +14 -0
|
@@ -0,0 +1,273 @@
|
|
|
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="U1.3
|
|
5
|
+
x+" data-x="3.3774999999999995" data-y="-2.7900000000000005" cx="574.6987951807228" cy="508.49397590361446" r="3" fill="hsl(321, 100%, 50%, 0.8)" />
|
|
6
|
+
</g>
|
|
7
|
+
<g>
|
|
8
|
+
<circle data-type="point" data-label="U1.7
|
|
9
|
+
x-" data-x="0.3774999999999997" data-y="-1.39" cx="321.6867469879518" cy="390.4216867469879" r="3" fill="hsl(325, 100%, 50%, 0.8)" />
|
|
10
|
+
</g>
|
|
11
|
+
<g>
|
|
12
|
+
<circle data-type="point" data-label="U1.10
|
|
13
|
+
x-" data-x="0.3774999999999997" data-y="0.3100000000000005" cx="321.6867469879518" cy="247.04819277108427" r="3" fill="hsl(217, 100%, 50%, 0.8)" />
|
|
14
|
+
</g>
|
|
15
|
+
<g>
|
|
16
|
+
<circle data-type="point" data-label="U1.13
|
|
17
|
+
x-" data-x="0.3774999999999997" data-y="-0.1899999999999995" cx="321.6867469879518" cy="289.21686746987945" r="3" fill="hsl(220, 100%, 50%, 0.8)" />
|
|
18
|
+
</g>
|
|
19
|
+
<g>
|
|
20
|
+
<circle data-type="point" data-label="U1.18
|
|
21
|
+
x+" data-x="3.3774999999999995" data-y="-2.5900000000000003" cx="574.6987951807228" cy="491.6265060240964" r="3" fill="hsl(225, 100%, 50%, 0.8)" />
|
|
22
|
+
</g>
|
|
23
|
+
<g>
|
|
24
|
+
<circle data-type="point" data-label="U1.22
|
|
25
|
+
x+" data-x="3.3774999999999995" data-y="1.7100000000000004" cx="574.6987951807228" cy="128.97590361445776" r="3" fill="hsl(250, 100%, 50%, 0.8)" />
|
|
26
|
+
</g>
|
|
27
|
+
<g>
|
|
28
|
+
<circle data-type="point" data-label="U1.28
|
|
29
|
+
x+" data-x="3.3774999999999995" data-y="1.5100000000000002" cx="574.6987951807228" cy="145.84337349397586" r="3" fill="hsl(256, 100%, 50%, 0.8)" />
|
|
30
|
+
</g>
|
|
31
|
+
<g>
|
|
32
|
+
<circle data-type="point" data-label="U1.29
|
|
33
|
+
x+" data-x="3.3774999999999995" data-y="-2.3900000000000006" cx="574.6987951807228" cy="474.7590361445783" r="3" fill="hsl(257, 100%, 50%, 0.8)" />
|
|
34
|
+
</g>
|
|
35
|
+
<g>
|
|
36
|
+
<circle data-type="point" data-label="J2.1
|
|
37
|
+
x-" data-x="-1.2225000000000006" data-y="0.6600000000000018" cx="186.74698795180717" cy="217.53012048192753" r="3" fill="hsl(99, 100%, 50%, 0.8)" />
|
|
38
|
+
</g>
|
|
39
|
+
<g>
|
|
40
|
+
<circle data-type="point" data-label="J2.2
|
|
41
|
+
y-" data-x="-0.7725000000000006" data-y="0.2950000000000018" cx="224.6987951807228" cy="248.31325301204802" r="3" fill="hsl(100, 100%, 50%, 0.8)" />
|
|
42
|
+
</g>
|
|
43
|
+
<g>
|
|
44
|
+
<circle data-type="point" data-label="J2.3
|
|
45
|
+
x+" data-x="-0.3225000000000006" data-y="0.6600000000000018" cx="262.6506024096385" cy="217.53012048192753" r="3" fill="hsl(101, 100%, 50%, 0.8)" />
|
|
46
|
+
</g>
|
|
47
|
+
<g>
|
|
48
|
+
<circle data-type="point" data-label="J3.1
|
|
49
|
+
y-" data-x="-2.4125" data-y="-1.84" cx="86.38554216867468" cy="428.37349397590356" r="3" fill="hsl(340, 100%, 50%, 0.8)" />
|
|
50
|
+
</g>
|
|
51
|
+
<g>
|
|
52
|
+
<circle data-type="point" data-label="J3.2
|
|
53
|
+
x+" data-x="-2.0475" data-y="-1.39" cx="117.16867469879517" cy="390.4216867469879" r="3" fill="hsl(341, 100%, 50%, 0.8)" />
|
|
54
|
+
</g>
|
|
55
|
+
<g>
|
|
56
|
+
<circle data-type="point" data-label="J3.3
|
|
57
|
+
y+" data-x="-2.4125" data-y="-0.9399999999999997" cx="86.38554216867468" cy="352.4698795180722" r="3" fill="hsl(342, 100%, 50%, 0.8)" />
|
|
58
|
+
</g>
|
|
59
|
+
<g>
|
|
60
|
+
<circle data-type="point" data-label="anchorPoint
|
|
61
|
+
orientation: y-" data-x="3.5774999999999997" data-y="-2.7900000000000005" cx="591.566265060241" cy="508.49397590361446" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
62
|
+
</g>
|
|
63
|
+
<g>
|
|
64
|
+
<circle data-type="point" data-label="anchorPoint
|
|
65
|
+
orientation: y-" data-x="0.20249999999999962" data-y="-0.1899999999999995" cx="306.92771084337346" cy="289.21686746987945" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
66
|
+
</g>
|
|
67
|
+
<g>
|
|
68
|
+
<circle data-type="point" data-label="anchorPoint
|
|
69
|
+
orientation: y-" data-x="-2.7125000000000004" data-y="-0.9909999999999998" cx="61.08433734939754" cy="356.77108433734935" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
70
|
+
</g>
|
|
71
|
+
<g>
|
|
72
|
+
<circle data-type="point" data-label="anchorPoint
|
|
73
|
+
orientation: y+" data-x="-0.8350000000000001" data-y="-1.39" cx="219.42771084337346" cy="390.4216867469879" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
74
|
+
</g>
|
|
75
|
+
<g>
|
|
76
|
+
<circle data-type="point" data-label="anchorPoint
|
|
77
|
+
orientation: x-" data-x="-0.7725000000000006" data-y="0.09500000000000186" cx="224.6987951807228" cy="265.18072289156606" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
78
|
+
</g>
|
|
79
|
+
<g>
|
|
80
|
+
<circle data-type="point" data-label="anchorPoint
|
|
81
|
+
orientation: y-" data-x="3.5774999999999997" data-y="1.5100000000000002" cx="591.566265060241" cy="145.84337349397586" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
82
|
+
</g>
|
|
83
|
+
<g>
|
|
84
|
+
<circle data-type="point" data-label="anchorPoint
|
|
85
|
+
orientation: y+" data-x="-1.3235000000000006" data-y="0.8610000000000018" cx="178.22891566265054" cy="200.57831325301186" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
86
|
+
</g>
|
|
87
|
+
<g>
|
|
88
|
+
<circle data-type="point" data-label="anchorPoint
|
|
89
|
+
orientation: y+" data-x="-2.8625000000000003" data-y="-0.989" cx="48.433734939759006" cy="356.6024096385542" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
90
|
+
</g>
|
|
91
|
+
<g>
|
|
92
|
+
<polyline data-points="3.3774999999999995,1.5100000000000002 3.3774999999999995,1.7100000000000004" data-type="line" data-label="" points="574.6987951807228,145.84337349397586 574.6987951807228,128.97590361445776" fill="none" stroke="hsl(176, 100%, 50%, 0.8)" stroke-width="1" />
|
|
93
|
+
</g>
|
|
94
|
+
<g>
|
|
95
|
+
<polyline data-points="-0.7725000000000006,0.2950000000000018 0.3774999999999997,0.3100000000000005" data-type="line" data-label="" points="224.6987951807228,248.31325301204802 321.6867469879518,247.04819277108427" fill="none" stroke="hsl(48, 100%, 50%, 0.8)" stroke-width="1" />
|
|
96
|
+
</g>
|
|
97
|
+
<g>
|
|
98
|
+
<polyline data-points="-2.0475,-1.39 0.3774999999999997,-1.39" data-type="line" data-label="" points="117.16867469879517,390.4216867469879 321.6867469879518,390.4216867469879" fill="none" stroke="hsl(312, 100%, 50%, 0.8)" stroke-width="1" />
|
|
99
|
+
</g>
|
|
100
|
+
<g>
|
|
101
|
+
<polyline data-points="3.3774999999999995,-2.7900000000000005 0.3774999999999997,-0.1899999999999995" data-type="line" data-label="" points="574.6987951807228,508.49397590361446 321.6867469879518,289.21686746987945" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
102
|
+
</g>
|
|
103
|
+
<g>
|
|
104
|
+
<polyline data-points="3.3774999999999995,-2.7900000000000005 3.3774999999999995,-2.5900000000000003" data-type="line" data-label="" points="574.6987951807228,508.49397590361446 574.6987951807228,491.6265060240964" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
105
|
+
</g>
|
|
106
|
+
<g>
|
|
107
|
+
<polyline data-points="3.3774999999999995,-2.7900000000000005 3.3774999999999995,-2.3900000000000006" data-type="line" data-label="" points="574.6987951807228,508.49397590361446 574.6987951807228,474.7590361445783" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
108
|
+
</g>
|
|
109
|
+
<g>
|
|
110
|
+
<polyline data-points="3.3774999999999995,-2.7900000000000005 -0.3225000000000006,0.6600000000000018" data-type="line" data-label="" points="574.6987951807228,508.49397590361446 262.6506024096385,217.53012048192753" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
111
|
+
</g>
|
|
112
|
+
<g>
|
|
113
|
+
<polyline data-points="3.3774999999999995,-2.7900000000000005 -2.4125,-0.9399999999999997" data-type="line" data-label="" points="574.6987951807228,508.49397590361446 86.38554216867468,352.4698795180722" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
114
|
+
</g>
|
|
115
|
+
<g>
|
|
116
|
+
<polyline data-points="0.3774999999999997,-0.1899999999999995 3.3774999999999995,-2.5900000000000003" data-type="line" data-label="" points="321.6867469879518,289.21686746987945 574.6987951807228,491.6265060240964" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
117
|
+
</g>
|
|
118
|
+
<g>
|
|
119
|
+
<polyline data-points="0.3774999999999997,-0.1899999999999995 3.3774999999999995,-2.3900000000000006" data-type="line" data-label="" points="321.6867469879518,289.21686746987945 574.6987951807228,474.7590361445783" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
120
|
+
</g>
|
|
121
|
+
<g>
|
|
122
|
+
<polyline data-points="0.3774999999999997,-0.1899999999999995 -0.3225000000000006,0.6600000000000018" data-type="line" data-label="" points="321.6867469879518,289.21686746987945 262.6506024096385,217.53012048192753" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
123
|
+
</g>
|
|
124
|
+
<g>
|
|
125
|
+
<polyline data-points="0.3774999999999997,-0.1899999999999995 -2.4125,-0.9399999999999997" data-type="line" data-label="" points="321.6867469879518,289.21686746987945 86.38554216867468,352.4698795180722" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
126
|
+
</g>
|
|
127
|
+
<g>
|
|
128
|
+
<polyline data-points="3.3774999999999995,-2.5900000000000003 3.3774999999999995,-2.3900000000000006" data-type="line" data-label="" points="574.6987951807228,491.6265060240964 574.6987951807228,474.7590361445783" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
129
|
+
</g>
|
|
130
|
+
<g>
|
|
131
|
+
<polyline data-points="3.3774999999999995,-2.5900000000000003 -0.3225000000000006,0.6600000000000018" data-type="line" data-label="" points="574.6987951807228,491.6265060240964 262.6506024096385,217.53012048192753" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
132
|
+
</g>
|
|
133
|
+
<g>
|
|
134
|
+
<polyline data-points="3.3774999999999995,-2.5900000000000003 -2.4125,-0.9399999999999997" data-type="line" data-label="" points="574.6987951807228,491.6265060240964 86.38554216867468,352.4698795180722" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
135
|
+
</g>
|
|
136
|
+
<g>
|
|
137
|
+
<polyline data-points="3.3774999999999995,-2.3900000000000006 -0.3225000000000006,0.6600000000000018" data-type="line" data-label="" points="574.6987951807228,474.7590361445783 262.6506024096385,217.53012048192753" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
138
|
+
</g>
|
|
139
|
+
<g>
|
|
140
|
+
<polyline data-points="3.3774999999999995,-2.3900000000000006 -2.4125,-0.9399999999999997" data-type="line" data-label="" points="574.6987951807228,474.7590361445783 86.38554216867468,352.4698795180722" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
141
|
+
</g>
|
|
142
|
+
<g>
|
|
143
|
+
<polyline data-points="-0.3225000000000006,0.6600000000000018 -2.4125,-0.9399999999999997" data-type="line" data-label="" points="262.6506024096385,217.53012048192753 86.38554216867468,352.4698795180722" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
144
|
+
</g>
|
|
145
|
+
<g>
|
|
146
|
+
<polyline data-points="-1.2225000000000006,0.6600000000000018 -2.4125,-1.84" data-type="line" data-label="" points="186.74698795180717,217.53012048192753 86.38554216867468,428.37349397590356" fill="none" stroke="hsl(186, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
147
|
+
</g>
|
|
148
|
+
<g>
|
|
149
|
+
<polyline data-points="3.3774999999999995,1.5100000000000002 3.5774999999999997,1.5100000000000002 3.5774999999999997,1.7100000000000004 3.3774999999999995,1.7100000000000004" data-type="line" data-label="" points="574.6987951807228,145.84337349397586 591.566265060241,145.84337349397586 591.566265060241,128.97590361445776 574.6987951807228,128.97590361445776" fill="none" stroke="purple" stroke-width="1" />
|
|
150
|
+
</g>
|
|
151
|
+
<g>
|
|
152
|
+
<polyline data-points="-0.7725000000000006,0.2950000000000018 -0.7725000000000006,0.09500000000000186 0.17749999999999966,0.09500000000000186 0.17749999999999966,0.3100000000000005 0.3774999999999997,0.3100000000000005" data-type="line" data-label="" points="224.6987951807228,248.31325301204802 224.6987951807228,265.18072289156606 304.8192771084337,265.18072289156606 304.8192771084337,247.04819277108427 321.6867469879518,247.04819277108427" fill="none" stroke="purple" stroke-width="1" />
|
|
153
|
+
</g>
|
|
154
|
+
<g>
|
|
155
|
+
<polyline data-points="0.3774999999999997,-0.1899999999999995 0.027499999999999553,-0.1899999999999995 0.027499999999999553,0.6600000000000018 -0.3225000000000006,0.6600000000000018" data-type="line" data-label="" points="321.6867469879518,289.21686746987945 292.16867469879514,289.21686746987945 292.16867469879514,217.53012048192753 262.6506024096385,217.53012048192753" fill="none" stroke="purple" stroke-width="1" />
|
|
156
|
+
</g>
|
|
157
|
+
<g>
|
|
158
|
+
<polyline data-points="3.3774999999999995,-2.3900000000000006 3.5774999999999997,-2.3900000000000006 3.5774999999999997,-2.5900000000000003 3.3774999999999995,-2.5900000000000003" data-type="line" data-label="" points="574.6987951807228,474.7590361445783 591.566265060241,474.7590361445783 591.566265060241,491.6265060240964 574.6987951807228,491.6265060240964" fill="none" stroke="purple" stroke-width="1" />
|
|
159
|
+
</g>
|
|
160
|
+
<g>
|
|
161
|
+
<polyline data-points="3.3774999999999995,-2.7900000000000005 3.5774999999999997,-2.7900000000000005 3.5774999999999997,-2.5900000000000003 3.3774999999999995,-2.5900000000000003" data-type="line" data-label="" points="574.6987951807228,508.49397590361446 591.566265060241,508.49397590361446 591.566265060241,491.6265060240964 574.6987951807228,491.6265060240964" fill="none" stroke="purple" stroke-width="1" />
|
|
162
|
+
</g>
|
|
163
|
+
<g>
|
|
164
|
+
<polyline data-points="-2.0475,-1.39 0.3774999999999997,-1.39" data-type="line" data-label="" points="117.16867469879517,390.4216867469879 321.6867469879518,390.4216867469879" fill="none" stroke="purple" stroke-width="1" />
|
|
165
|
+
</g>
|
|
166
|
+
<g>
|
|
167
|
+
<polyline data-points="-2.4125,-0.9399999999999997 -2.4125,-0.8899999999999997 -2.7125000000000004,-0.8899999999999997 -2.7125000000000004,-0.9909999999999998" data-type="line" data-label="" points="86.38554216867468,352.4698795180722 86.38554216867468,348.2530120481927 61.08433734939754,348.2530120481927 61.08433734939754,356.77108433734935" fill="none" stroke="purple" stroke-width="1" />
|
|
168
|
+
</g>
|
|
169
|
+
<g>
|
|
170
|
+
<polyline data-points="-1.2225000000000006,0.6600000000000018 -1.3235000000000006,0.6600000000000018 -1.3235000000000006,0.8610000000000018" data-type="line" data-label="" points="186.74698795180717,217.53012048192753 178.22891566265054,217.53012048192753 178.22891566265054,200.57831325301186" fill="none" stroke="purple" stroke-width="1" />
|
|
171
|
+
</g>
|
|
172
|
+
<g>
|
|
173
|
+
<polyline data-points="-2.4125,-1.84 -2.4125,-1.8900000000000001 -2.8625000000000003,-1.8900000000000001 -2.8625000000000003,-0.989" data-type="line" data-label="" points="86.38554216867468,428.37349397590356 86.38554216867468,432.5903614457831 48.433734939759006,432.5903614457831 48.433734939759006,356.6024096385542" fill="none" stroke="purple" stroke-width="1" />
|
|
174
|
+
</g>
|
|
175
|
+
<g>
|
|
176
|
+
<rect data-type="rect" data-label="schematic_component_0" data-x="1.8774999999999997" data-y="-0.43999999999999995" x="321.6867469879518" y="91.02409638554212" width="253.01204819277098" height="438.55421686746996" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.011857142857142858" />
|
|
177
|
+
</g>
|
|
178
|
+
<g>
|
|
179
|
+
<rect data-type="rect" data-label="schematic_component_6" data-x="-0.7725000000000006" data-y="0.5600000000000018" x="186.74698795180717" y="203.61445783132513" width="75.90361445783134" height="44.6987951807229" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.011857142857142858" />
|
|
180
|
+
</g>
|
|
181
|
+
<g>
|
|
182
|
+
<rect data-type="rect" data-label="schematic_component_7" data-x="-2.3125" data-y="-1.39" x="72.46987951807228" y="352.4698795180722" width="44.6987951807229" height="75.90361445783134" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.011857142857142858" />
|
|
183
|
+
</g>
|
|
184
|
+
<g>
|
|
185
|
+
<rect data-type="rect" data-label="netId: GND
|
|
186
|
+
globalConnNetId: connectivity_net3" data-x="3.5774999999999997" data-y="-3.0300000000000002" x="583.1325301204819" y="508.49397590361446" width="16.867469879518126" height="40.481927710843365" fill="#00000066" stroke="#000000" stroke-width="0.011857142857142858" />
|
|
187
|
+
</g>
|
|
188
|
+
<g>
|
|
189
|
+
<rect data-type="rect" data-label="netId: GND
|
|
190
|
+
globalConnNetId: connectivity_net3" data-x="0.20249999999999962" data-y="-0.4299999999999995" x="298.4939759036144" y="289.21686746987945" width="16.86746987951807" height="40.481927710843365" fill="#00000066" stroke="#000000" stroke-width="0.011857142857142858" />
|
|
191
|
+
</g>
|
|
192
|
+
<g>
|
|
193
|
+
<rect data-type="rect" data-label="netId: GND
|
|
194
|
+
globalConnNetId: connectivity_net3" data-x="-2.7125000000000004" data-y="-1.2309999999999999" x="52.65060240963851" y="356.77108433734935" width="16.867469879518097" height="40.481927710843365" fill="#00000066" stroke="#000000" stroke-width="0.011857142857142858" />
|
|
195
|
+
</g>
|
|
196
|
+
<g>
|
|
197
|
+
<rect data-type="rect" data-label="netId: .J3 > .pin2 to .U1 > .pin7
|
|
198
|
+
globalConnNetId: connectivity_net2" data-x="-0.8350000000000001" data-y="-1.1649999999999998" x="210.99397590361446" y="352.4698795180723" width="16.86746987951807" height="37.95180722891564" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.011857142857142858" />
|
|
199
|
+
</g>
|
|
200
|
+
<g>
|
|
201
|
+
<rect data-type="rect" data-label="netId: .J2 > .pin2 to .U1 > .pin10
|
|
202
|
+
globalConnNetId: connectivity_net1" data-x="-0.9975000000000006" data-y="0.09500000000000186" x="186.74698795180717" y="256.74698795180706" width="37.95180722891564" height="16.86746987951807" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.011857142857142858" />
|
|
203
|
+
</g>
|
|
204
|
+
<g>
|
|
205
|
+
<rect data-type="rect" data-label="netId: .U1 > .VS2 to .U1 > .pin22
|
|
206
|
+
globalConnNetId: connectivity_net0" data-x="3.5774999999999997" data-y="1.2850000000000001" x="583.1325301204819" y="145.84337349397586" width="16.867469879518126" height="37.95180722891567" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.011857142857142858" />
|
|
207
|
+
</g>
|
|
208
|
+
<g>
|
|
209
|
+
<rect data-type="rect" data-label="netId: VCC_3
|
|
210
|
+
globalConnNetId: connectivity_net4" data-x="-1.3235000000000006" data-y="1.2210000000000019" x="169.7951807228915" y="139.8554216867468" width="16.867469879518097" height="60.72289156626505" fill="#ef444466" stroke="#ef4444" stroke-width="0.011857142857142858" />
|
|
211
|
+
</g>
|
|
212
|
+
<g>
|
|
213
|
+
<rect data-type="rect" data-label="netId: VCC_3
|
|
214
|
+
globalConnNetId: connectivity_net4" data-x="-2.8625000000000003" data-y="-0.629" x="39.99999999999997" y="295.8795180722891" width="16.86746987951807" height="60.722891566265105" fill="#ef444466" stroke="#ef4444" stroke-width="0.011857142857142858" />
|
|
215
|
+
</g>
|
|
216
|
+
<g id="crosshair" style="display: none">
|
|
217
|
+
<line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
|
|
218
|
+
<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>
|
|
219
|
+
</g>
|
|
220
|
+
<script>
|
|
221
|
+
<![CDATA[
|
|
222
|
+
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
223
|
+
const svg = e.currentTarget;
|
|
224
|
+
const rect = svg.getBoundingClientRect();
|
|
225
|
+
const x = e.clientX - rect.left;
|
|
226
|
+
const y = e.clientY - rect.top;
|
|
227
|
+
const crosshair = svg.getElementById('crosshair');
|
|
228
|
+
const h = svg.getElementById('crosshair-h');
|
|
229
|
+
const v = svg.getElementById('crosshair-v');
|
|
230
|
+
const coords = svg.getElementById('coordinates');
|
|
231
|
+
|
|
232
|
+
crosshair.style.display = 'block';
|
|
233
|
+
h.setAttribute('x1', '0');
|
|
234
|
+
h.setAttribute('x2', '640');
|
|
235
|
+
h.setAttribute('y1', y);
|
|
236
|
+
h.setAttribute('y2', y);
|
|
237
|
+
v.setAttribute('x1', x);
|
|
238
|
+
v.setAttribute('x2', x);
|
|
239
|
+
v.setAttribute('y1', '0');
|
|
240
|
+
v.setAttribute('y2', '640');
|
|
241
|
+
|
|
242
|
+
// Calculate real coordinates using inverse transformation
|
|
243
|
+
const matrix = {
|
|
244
|
+
"a": 84.33734939759036,
|
|
245
|
+
"c": 0,
|
|
246
|
+
"e": 289.84939759036143,
|
|
247
|
+
"b": 0,
|
|
248
|
+
"d": -84.33734939759036,
|
|
249
|
+
"f": 273.1927710843373
|
|
250
|
+
};
|
|
251
|
+
// Manually invert and apply the affine transform
|
|
252
|
+
// Since we only use translate and scale, we can directly compute:
|
|
253
|
+
// x' = (x - tx) / sx
|
|
254
|
+
// y' = (y - ty) / sy
|
|
255
|
+
const sx = matrix.a;
|
|
256
|
+
const sy = matrix.d;
|
|
257
|
+
const tx = matrix.e;
|
|
258
|
+
const ty = matrix.f;
|
|
259
|
+
const realPoint = {
|
|
260
|
+
x: (x - tx) / sx,
|
|
261
|
+
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
265
|
+
coords.setAttribute('x', (x + 5).toString());
|
|
266
|
+
coords.setAttribute('y', (y - 5).toString());
|
|
267
|
+
});
|
|
268
|
+
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
269
|
+
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
270
|
+
});
|
|
271
|
+
]]>
|
|
272
|
+
</script>
|
|
273
|
+
</svg>
|
|
@@ -0,0 +1,113 @@
|
|
|
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="U1.3
|
|
5
|
+
x+" data-x="1.7999999999999998" data-y="-0.975" cx="458.8517829187396" cy="381.2935323383084" r="3" fill="hsl(321, 100%, 50%, 0.8)" />
|
|
6
|
+
</g>
|
|
7
|
+
<g>
|
|
8
|
+
<circle data-type="point" data-label="U1.4
|
|
9
|
+
x+" data-x="1.7999999999999998" data-y="-0.32499999999999996" cx="458.8517829187396" cy="320.9286898839137" r="3" fill="hsl(322, 100%, 50%, 0.8)" />
|
|
10
|
+
</g>
|
|
11
|
+
<g>
|
|
12
|
+
<circle data-type="point" data-label="R1.2
|
|
13
|
+
y-" data-x="2.25" data-y="-0.9" cx="500.642827694859" cy="374.3283582089552" r="3" fill="hsl(227, 100%, 50%, 0.8)" />
|
|
14
|
+
</g>
|
|
15
|
+
<g>
|
|
16
|
+
<circle data-type="point" data-label="R2.2
|
|
17
|
+
y-" data-x="2.25" data-y="-2.6500000000000004" cx="500.642827694859" cy="536.849087893864" r="3" fill="hsl(108, 100%, 50%, 0.8)" />
|
|
18
|
+
</g>
|
|
19
|
+
<g>
|
|
20
|
+
<circle data-type="point" data-label="anchorPoint
|
|
21
|
+
orientation: y-" data-x="2.125" data-y="-2.8500000000000005" cx="489.034204145937" cy="555.4228855721392" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
22
|
+
</g>
|
|
23
|
+
<g>
|
|
24
|
+
<circle data-type="point" data-label="anchorPoint
|
|
25
|
+
orientation: y+" data-x="1.9249999999999998" data-y="-0.32499999999999996" cx="470.46040646766164" cy="320.9286898839137" r="3" fill="hsl(40, 100%, 50%, 0.9)" />
|
|
26
|
+
</g>
|
|
27
|
+
<g>
|
|
28
|
+
<polyline data-points="1.7999999999999998,-0.32499999999999996 2.25,-0.9" data-type="line" data-label="" points="458.8517829187396,320.9286898839137 500.642827694859,374.3283582089552" fill="none" stroke="hsl(112, 100%, 50%, 0.8)" stroke-width="1" />
|
|
29
|
+
</g>
|
|
30
|
+
<g>
|
|
31
|
+
<polyline data-points="1.7999999999999998,-0.975 2.25,-2.6500000000000004" data-type="line" data-label="" points="458.8517829187396,381.2935323383084 500.642827694859,536.849087893864" fill="none" stroke="hsl(157, 100%, 50%, 0.8)" stroke-width="1" stroke-dasharray="4 2" />
|
|
32
|
+
</g>
|
|
33
|
+
<g>
|
|
34
|
+
<polyline data-points="1.7999999999999998,-0.32499999999999996 1.9249999999999998,-0.32499999999999996 1.9249999999999998,-1.1 2.25,-1.1 2.25,-0.9" data-type="line" data-label="" points="458.8517829187396,320.9286898839137 470.46040646766164,320.9286898839137 470.46040646766164,392.9021558872305 500.642827694859,392.9021558872305 500.642827694859,374.3283582089552" fill="none" stroke="purple" stroke-width="1" />
|
|
35
|
+
</g>
|
|
36
|
+
<g>
|
|
37
|
+
<polyline data-points="1.7999999999999998,-0.975 2.125,-0.975 2.125,-2.8500000000000005 2.25,-2.8500000000000005 2.25,-2.6500000000000004" data-type="line" data-label="" points="458.8517829187396,381.2935323383084 489.034204145937,381.2935323383084 489.034204145937,555.4228855721392 500.642827694859,555.4228855721392 500.642827694859,536.849087893864" fill="none" stroke="purple" stroke-width="1" />
|
|
38
|
+
</g>
|
|
39
|
+
<g>
|
|
40
|
+
<rect data-type="rect" data-label="schematic_component_0" data-x="0" data-y="0" x="124.52342470978448" y="40" width="334.32835820895514" height="501.49253731343276" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.010767857142857145" />
|
|
41
|
+
</g>
|
|
42
|
+
<g>
|
|
43
|
+
<rect data-type="rect" data-label="schematic_component_4" data-x="2.25" data-y="-0.35" x="485.8090800995025" y="272.1724709784411" width="29.667495190713055" height="102.15588723051411" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.010767857142857145" />
|
|
44
|
+
</g>
|
|
45
|
+
<g>
|
|
46
|
+
<rect data-type="rect" data-label="schematic_component_5" data-x="2.25" data-y="-2.1" x="485.8090800995025" y="434.6932006633499" width="29.667495190713055" height="102.15588723051405" fill="hsl(24, 100%, 50%, 0.8)" stroke="black" stroke-width="0.010767857142857145" />
|
|
47
|
+
</g>
|
|
48
|
+
<g>
|
|
49
|
+
<rect data-type="rect" data-label="netId: GND
|
|
50
|
+
globalConnNetId: connectivity_net1" data-x="2.125" data-y="-3.0900000000000007" x="479.7473053067993" y="555.4228855721392" width="18.573797678275298" height="44.577114427860806" fill="#00000066" stroke="#000000" stroke-width="0.010767857142857145" />
|
|
51
|
+
</g>
|
|
52
|
+
<g>
|
|
53
|
+
<rect data-type="rect" data-label="netId: U1.FB to R1.pin2
|
|
54
|
+
globalConnNetId: connectivity_net0" data-x="1.9249999999999998" data-y="-0.09999999999999995" x="461.173507628524" y="279.1376451077943" width="18.573797678275298" height="41.791044776119406" fill="hsl(40, 100%, 50%, 0.35)" stroke="black" stroke-width="0.010767857142857145" />
|
|
55
|
+
</g>
|
|
56
|
+
<g id="crosshair" style="display: none">
|
|
57
|
+
<line id="crosshair-h" y1="0" y2="640" stroke="#666" stroke-width="0.5" />
|
|
58
|
+
<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>
|
|
59
|
+
</g>
|
|
60
|
+
<script>
|
|
61
|
+
<![CDATA[
|
|
62
|
+
document.currentScript.parentElement.addEventListener('mousemove', (e) => {
|
|
63
|
+
const svg = e.currentTarget;
|
|
64
|
+
const rect = svg.getBoundingClientRect();
|
|
65
|
+
const x = e.clientX - rect.left;
|
|
66
|
+
const y = e.clientY - rect.top;
|
|
67
|
+
const crosshair = svg.getElementById('crosshair');
|
|
68
|
+
const h = svg.getElementById('crosshair-h');
|
|
69
|
+
const v = svg.getElementById('crosshair-v');
|
|
70
|
+
const coords = svg.getElementById('coordinates');
|
|
71
|
+
|
|
72
|
+
crosshair.style.display = 'block';
|
|
73
|
+
h.setAttribute('x1', '0');
|
|
74
|
+
h.setAttribute('x2', '640');
|
|
75
|
+
h.setAttribute('y1', y);
|
|
76
|
+
h.setAttribute('y2', y);
|
|
77
|
+
v.setAttribute('x1', x);
|
|
78
|
+
v.setAttribute('x2', x);
|
|
79
|
+
v.setAttribute('y1', '0');
|
|
80
|
+
v.setAttribute('y2', '640');
|
|
81
|
+
|
|
82
|
+
// Calculate real coordinates using inverse transformation
|
|
83
|
+
const matrix = {
|
|
84
|
+
"a": 92.86898839137643,
|
|
85
|
+
"c": 0,
|
|
86
|
+
"e": 291.68760381426205,
|
|
87
|
+
"b": 0,
|
|
88
|
+
"d": -92.86898839137643,
|
|
89
|
+
"f": 290.7462686567164
|
|
90
|
+
};
|
|
91
|
+
// Manually invert and apply the affine transform
|
|
92
|
+
// Since we only use translate and scale, we can directly compute:
|
|
93
|
+
// x' = (x - tx) / sx
|
|
94
|
+
// y' = (y - ty) / sy
|
|
95
|
+
const sx = matrix.a;
|
|
96
|
+
const sy = matrix.d;
|
|
97
|
+
const tx = matrix.e;
|
|
98
|
+
const ty = matrix.f;
|
|
99
|
+
const realPoint = {
|
|
100
|
+
x: (x - tx) / sx,
|
|
101
|
+
y: (y - ty) / sy // Flip y back since we used negative scale
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
coords.textContent = `(${realPoint.x.toFixed(2)}, ${realPoint.y.toFixed(2)})`;
|
|
105
|
+
coords.setAttribute('x', (x + 5).toString());
|
|
106
|
+
coords.setAttribute('y', (y - 5).toString());
|
|
107
|
+
});
|
|
108
|
+
document.currentScript.parentElement.addEventListener('mouseleave', () => {
|
|
109
|
+
document.currentScript.parentElement.getElementById('crosshair').style.display = 'none';
|
|
110
|
+
});
|
|
111
|
+
]]>
|
|
112
|
+
</script>
|
|
113
|
+
</svg>
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
{
|
|
2
|
+
"chips": [
|
|
3
|
+
{
|
|
4
|
+
"chipId": "schematic_component_0",
|
|
5
|
+
"center": {
|
|
6
|
+
"x": 1.8774999999999997,
|
|
7
|
+
"y": -0.43999999999999995
|
|
8
|
+
},
|
|
9
|
+
"width": 2.2,
|
|
10
|
+
"height": 5.2,
|
|
11
|
+
"pins": [
|
|
12
|
+
{
|
|
13
|
+
"pinId": "U1.3",
|
|
14
|
+
"x": 3.3774999999999995,
|
|
15
|
+
"y": -2.7900000000000005
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"pinId": "U1.7",
|
|
19
|
+
"x": 0.3774999999999997,
|
|
20
|
+
"y": -1.39
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"pinId": "U1.10",
|
|
24
|
+
"x": 0.3774999999999997,
|
|
25
|
+
"y": 0.3100000000000005
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"pinId": "U1.13",
|
|
29
|
+
"x": 0.3774999999999997,
|
|
30
|
+
"y": -0.1899999999999995
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"pinId": "U1.18",
|
|
34
|
+
"x": 3.3774999999999995,
|
|
35
|
+
"y": -2.5900000000000003
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"pinId": "U1.22",
|
|
39
|
+
"x": 3.3774999999999995,
|
|
40
|
+
"y": 1.7100000000000004
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"pinId": "U1.28",
|
|
44
|
+
"x": 3.3774999999999995,
|
|
45
|
+
"y": 1.5100000000000002
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"pinId": "U1.29",
|
|
49
|
+
"x": 3.3774999999999995,
|
|
50
|
+
"y": -2.3900000000000006
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"chipId": "schematic_component_6",
|
|
56
|
+
"center": {
|
|
57
|
+
"x": -0.7725000000000006,
|
|
58
|
+
"y": 0.5600000000000018
|
|
59
|
+
},
|
|
60
|
+
"width": 0.9,
|
|
61
|
+
"height": 0.53,
|
|
62
|
+
"pins": [
|
|
63
|
+
{
|
|
64
|
+
"pinId": "J2.1",
|
|
65
|
+
"x": -1.2225000000000006,
|
|
66
|
+
"y": 0.6600000000000018
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"pinId": "J2.2",
|
|
70
|
+
"x": -0.7725000000000006,
|
|
71
|
+
"y": 0.31000000000000183
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"pinId": "J2.3",
|
|
75
|
+
"x": -0.3225000000000006,
|
|
76
|
+
"y": 0.6600000000000018
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"chipId": "schematic_component_7",
|
|
82
|
+
"center": {
|
|
83
|
+
"x": -2.3125,
|
|
84
|
+
"y": -1.39
|
|
85
|
+
},
|
|
86
|
+
"width": 0.53,
|
|
87
|
+
"height": 0.9,
|
|
88
|
+
"pins": [
|
|
89
|
+
{
|
|
90
|
+
"pinId": "J3.1",
|
|
91
|
+
"x": -2.4125,
|
|
92
|
+
"y": -1.84
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"pinId": "J3.2",
|
|
96
|
+
"x": -2.0625,
|
|
97
|
+
"y": -1.39
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"pinId": "J3.3",
|
|
101
|
+
"x": -2.4125,
|
|
102
|
+
"y": -0.94
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"directConnections": [
|
|
108
|
+
{
|
|
109
|
+
"pinIds": ["U1.28", "U1.22"],
|
|
110
|
+
"netId": ".U1 > .VS2 to .U1 > .pin22"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"pinIds": ["J2.2", "U1.10"],
|
|
114
|
+
"netId": ".J2 > .pin2 to .U1 > .pin10"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"pinIds": ["J3.2", "U1.7"],
|
|
118
|
+
"netId": ".J3 > .pin2 to .U1 > .pin7"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"netConnections": [
|
|
122
|
+
{
|
|
123
|
+
"netId": "GND",
|
|
124
|
+
"pinIds": ["U1.3", "U1.13", "U1.18", "U1.29", "J2.3", "J3.3"],
|
|
125
|
+
"netLabelWidth": 0.48
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"netId": "VCC_3",
|
|
129
|
+
"pinIds": ["J2.1", "J3.1"],
|
|
130
|
+
"netLabelWidth": 0.72
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"availableNetLabelOrientations": {
|
|
134
|
+
"GND": ["y-"],
|
|
135
|
+
"VCC_5": ["y+"],
|
|
136
|
+
"VCC_3": ["y+"]
|
|
137
|
+
},
|
|
138
|
+
"maxMspPairDistance": 2.4
|
|
139
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"chips": [
|
|
3
|
+
{
|
|
4
|
+
"chipId": "schematic_component_0",
|
|
5
|
+
"center": {
|
|
6
|
+
"x": 0,
|
|
7
|
+
"y": 0
|
|
8
|
+
},
|
|
9
|
+
"width": 2.8,
|
|
10
|
+
"height": 5.4,
|
|
11
|
+
"pins": [
|
|
12
|
+
{
|
|
13
|
+
"pinId": "U1.3",
|
|
14
|
+
"x": 1.7999999999999998,
|
|
15
|
+
"y": -0.975
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"pinId": "U1.4",
|
|
19
|
+
"x": 1.7999999999999998,
|
|
20
|
+
"y": -0.32499999999999996
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"chipId": "schematic_component_4",
|
|
26
|
+
"center": {
|
|
27
|
+
"x": 2.25,
|
|
28
|
+
"y": -0.35
|
|
29
|
+
},
|
|
30
|
+
"width": 0.3194553499999995,
|
|
31
|
+
"height": 1.1,
|
|
32
|
+
"pins": [
|
|
33
|
+
{
|
|
34
|
+
"pinId": "R1.2",
|
|
35
|
+
"x": 2.25,
|
|
36
|
+
"y": -0.8999999999999999
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"chipId": "schematic_component_5",
|
|
42
|
+
"center": {
|
|
43
|
+
"x": 2.25,
|
|
44
|
+
"y": -2.1
|
|
45
|
+
},
|
|
46
|
+
"width": 0.3194553499999995,
|
|
47
|
+
"height": 1.1,
|
|
48
|
+
"pins": [
|
|
49
|
+
{
|
|
50
|
+
"pinId": "R2.2",
|
|
51
|
+
"x": 2.25,
|
|
52
|
+
"y": -2.65
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"directConnections": [
|
|
58
|
+
{
|
|
59
|
+
"pinIds": ["U1.4", "R1.2"],
|
|
60
|
+
"netId": "U1.FB to R1.pin2"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"netConnections": [
|
|
64
|
+
{
|
|
65
|
+
"netId": "GND",
|
|
66
|
+
"pinIds": ["U1.3", "R2.2"],
|
|
67
|
+
"netLabelWidth": 0.48
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"availableNetLabelOrientations": {
|
|
71
|
+
"GND": ["y-"]
|
|
72
|
+
},
|
|
73
|
+
"maxMspPairDistance": 2.4
|
|
74
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { test, expect } from "bun:test"
|
|
2
|
+
import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
|
|
3
|
+
import ip from "./assets/repro-netlabel-connector-through-label.input.json"
|
|
4
|
+
import "tests/fixtures/matcher"
|
|
5
|
+
import { getTraceLabelCollisions } from "tests/fixtures/traceLabelCollisions"
|
|
6
|
+
|
|
7
|
+
test("netlabel connector trace should not pass through a rail label", () => {
|
|
8
|
+
const solver = new SchematicTracePipelineSolver(ip as any)
|
|
9
|
+
solver.solve()
|
|
10
|
+
|
|
11
|
+
expect(
|
|
12
|
+
getTraceLabelCollisions(
|
|
13
|
+
solver.netLabelNetLabelCollisionSolver!.traces,
|
|
14
|
+
solver.netLabelNetLabelCollisionSolver!.outputNetLabelPlacements,
|
|
15
|
+
),
|
|
16
|
+
).toEqual([])
|
|
17
|
+
|
|
18
|
+
expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
19
|
+
})
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { expect, test } from "bun:test"
|
|
2
|
+
import { SchematicTracePipelineSolver } from "lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver"
|
|
3
|
+
import inputProblem from "./assets/repro126-trace-overlap-box-resistor.input.json"
|
|
4
|
+
import "tests/fixtures/matcher"
|
|
5
|
+
|
|
6
|
+
test("repro126 trace overlaps R2 box", () => {
|
|
7
|
+
const solver = new SchematicTracePipelineSolver(inputProblem as any)
|
|
8
|
+
solver.solve()
|
|
9
|
+
|
|
10
|
+
expect(
|
|
11
|
+
solver.traceOverlapShiftSolver!.correctedTraceMap["U1.3-R2.2"],
|
|
12
|
+
).toBeDefined()
|
|
13
|
+
expect(solver).toMatchSolverSnapshot(import.meta.path)
|
|
14
|
+
})
|