@tscircuit/schematic-trace-solver 0.0.196 → 0.0.198

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/index.d.ts +5 -0
  2. package/dist/index.js +120 -7
  3. package/lib/solvers/NetLabelToTraceSolver/NetLabelToTraceSolver.ts +42 -1
  4. package/lib/solvers/NetLabelToTraceSolver/getSimpleElbowPath.ts +31 -0
  5. package/lib/solvers/RailNetLabelCornerPlacementSolver/RailNetLabelCornerPlacementSolver.ts +128 -2
  6. package/lib/solvers/RailNetLabelCornerPlacementSolver/types.ts +1 -0
  7. package/lib/solvers/SchematicTracePipelineSolver/SchematicTracePipelineSolver.ts +2 -0
  8. package/package.json +1 -1
  9. package/site/SchematicTracePipelineSolver/repro-am3352-sheet3-power-rails.page.tsx +7 -0
  10. package/site/bug-reports/bug-report-20260911T195723Z.page.tsx +4 -0
  11. package/site/bug-reports/enc-scl-hop.page.tsx +6 -0
  12. package/tests/assets/enc-scl-hop.json +185 -0
  13. package/tests/bug-reports/bug-report-20260707T134549Z/__snapshots__/bug-report-20260707T134549Z.snap.svg +13 -31
  14. package/tests/bug-reports/bug-report-20260901T064117Z/__snapshots__/bug-report-20260901T064117Z.snap.svg +25 -61
  15. package/tests/bug-reports/bug-report-20260911T195723Z/__snapshots__/bug-report-20260911T195723Z.snap.svg +559 -0
  16. package/tests/bug-reports/bug-report-20260911T195723Z/bug-report-20260911T195723Z.json +1792 -0
  17. package/tests/bug-reports/bug-report-20260911T195723Z/bug-report-20260911T195723Z.test.ts +35 -0
  18. package/tests/repros/__snapshots__/repro-am3352-sheet3-power-rails.snap.svg +187 -0
  19. package/tests/repros/__snapshots__/repro-mcp73831-charger-traces.snap.svg +5 -23
  20. package/tests/repros/__snapshots__/repro-normal-net-label-branch-from-junction.snap.svg +31 -31
  21. package/tests/repros/__snapshots__/repro-trellis-core-gnd-net-label-overlap.snap.svg +25 -61
  22. package/tests/repros/__snapshots__/rp2040-robot-controller-disconnected-gnd.snap.svg +12 -26
  23. package/tests/repros/assets/repro-am3352-sheet3-power-rails.input.json +698 -0
  24. package/tests/repros/repro-am3352-sheet3-power-rails.md +66 -0
  25. package/tests/repros/repro-am3352-sheet3-power-rails.test.ts +39 -0
  26. package/tests/repros/repro-normal-net-label-branch-from-junction.test.ts +13 -0
  27. package/tests/solvers/SchematicTracePipelineSolver/__snapshots__/enc-scl-hop.snap.svg +101 -0
  28. package/tests/solvers/SchematicTracePipelineSolver/__snapshots__/explicit-hop.snap.svg +101 -0
  29. package/tests/solvers/SchematicTracePipelineSolver/enc-scl-hop.test.ts +139 -0
@@ -0,0 +1,185 @@
1
+ {
2
+ "chips": [
3
+ {
4
+ "chipId": "R_ENC_SDA",
5
+ "center": {
6
+ "x": 0.0,
7
+ "y": 1.8
8
+ },
9
+ "width": 0.16000000000000003,
10
+ "height": 0.4,
11
+ "pins": [
12
+ {
13
+ "pinId": "R_ENC_SDA.1",
14
+ "x": 0.0,
15
+ "y": 2.1,
16
+ "_facingDirection": "y+"
17
+ },
18
+ {
19
+ "pinId": "R_ENC_SDA.2",
20
+ "x": 0.0,
21
+ "y": 1.5,
22
+ "_facingDirection": "y-"
23
+ }
24
+ ]
25
+ },
26
+ {
27
+ "chipId": "R_ENC_SCL",
28
+ "center": {
29
+ "x": 2.0,
30
+ "y": 1.8
31
+ },
32
+ "width": 0.16000000000000003,
33
+ "height": 0.4,
34
+ "pins": [
35
+ {
36
+ "pinId": "R_ENC_SCL.1",
37
+ "x": 2.0,
38
+ "y": 2.1,
39
+ "_facingDirection": "y+"
40
+ },
41
+ {
42
+ "pinId": "R_ENC_SCL.2",
43
+ "x": 2.0,
44
+ "y": 1.5,
45
+ "_facingDirection": "y-"
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ "chipId": "U_ENCODER",
51
+ "center": {
52
+ "x": 6.0,
53
+ "y": 0.0
54
+ },
55
+ "width": 1.7600000000000002,
56
+ "height": 1.6,
57
+ "pins": [
58
+ {
59
+ "pinId": "U_ENCODER.6",
60
+ "displayName": "SDA",
61
+ "x": 4.720000000000001,
62
+ "y": 0.1,
63
+ "_facingDirection": "x-"
64
+ },
65
+ {
66
+ "pinId": "U_ENCODER.7",
67
+ "displayName": "SCL",
68
+ "x": 4.720000000000001,
69
+ "y": -0.1,
70
+ "_facingDirection": "x-"
71
+ },
72
+ {
73
+ "pinId": "U_ENCODER.1",
74
+ "displayName": "VDD5V",
75
+ "x": 5.9,
76
+ "y": 1.2000000000000002,
77
+ "_facingDirection": "y+"
78
+ },
79
+ {
80
+ "pinId": "U_ENCODER.2",
81
+ "displayName": "VDD3V3",
82
+ "x": 6.1000000000000005,
83
+ "y": 1.2000000000000002,
84
+ "_facingDirection": "y+"
85
+ },
86
+ {
87
+ "pinId": "U_ENCODER.4",
88
+ "displayName": "GND",
89
+ "x": 5.9,
90
+ "y": -1.2000000000000002,
91
+ "_facingDirection": "y-"
92
+ },
93
+ {
94
+ "pinId": "U_ENCODER.8",
95
+ "displayName": "DIR",
96
+ "x": 6.1000000000000005,
97
+ "y": -1.2000000000000002,
98
+ "_facingDirection": "y-"
99
+ },
100
+ {
101
+ "pinId": "U_ENCODER.3",
102
+ "displayName": "OUT",
103
+ "x": 7.28,
104
+ "y": 0.1,
105
+ "_facingDirection": "x+"
106
+ },
107
+ {
108
+ "pinId": "U_ENCODER.5",
109
+ "displayName": "PGO",
110
+ "x": 7.28,
111
+ "y": -0.1,
112
+ "_facingDirection": "x+"
113
+ }
114
+ ]
115
+ }
116
+ ],
117
+ "directConnections": [
118
+ {
119
+ "netId": "ENC_SDA",
120
+ "netLabelText": "ENC_SDA",
121
+ "pinIds": [
122
+ "R_ENC_SDA.2",
123
+ "U_ENCODER.6"
124
+ ]
125
+ },
126
+ {
127
+ "pinIds": [
128
+ "R_ENC_SDA.1",
129
+ "R_ENC_SCL.1"
130
+ ],
131
+ "netId": "V3V3"
132
+ },
133
+ {
134
+ "pinIds": [
135
+ "U_ENCODER.1",
136
+ "U_ENCODER.2"
137
+ ],
138
+ "netId": "V3V3"
139
+ }
140
+ ],
141
+ "netConnections": [
142
+ {
143
+ "netId": "ENC_SDA",
144
+ "netLabelText": "ENC_SDA",
145
+ "pinIds": [
146
+ "R_ENC_SDA.2",
147
+ "U_ENCODER.6"
148
+ ]
149
+ },
150
+ {
151
+ "netId": "ENC_SCL",
152
+ "netLabelText": "ENC_SCL",
153
+ "pinIds": [
154
+ "R_ENC_SCL.2",
155
+ "U_ENCODER.7"
156
+ ]
157
+ },
158
+ {
159
+ "netId": "V3V3",
160
+ "netLabelText": "V3V3",
161
+ "pinIds": [
162
+ "R_ENC_SDA.1",
163
+ "R_ENC_SCL.1",
164
+ "U_ENCODER.1",
165
+ "U_ENCODER.2"
166
+ ]
167
+ },
168
+ {
169
+ "netId": "GND",
170
+ "netLabelText": "GND",
171
+ "pinIds": [
172
+ "U_ENCODER.4",
173
+ "U_ENCODER.8"
174
+ ]
175
+ }
176
+ ],
177
+ "availableNetLabelOrientations": {
178
+ "V3V3": [
179
+ "y+"
180
+ ],
181
+ "GND": [
182
+ "y-"
183
+ ]
184
+ }
185
+ }