@tscircuit/schematic-trace-solver 0.0.164 → 0.0.166
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 +5 -1
- package/dist/index.js +370 -24
- package/lib/solvers/NetLabelToTraceSolver/NetLabelToTraceSolver.ts +225 -24
- package/lib/solvers/SameNetJunctionAlignmentSolver/SameNetJunctionAlignmentSolver.ts +11 -5
- package/lib/solvers/SameNetJunctionAlignmentSolver/alignSameNetJunctions.ts +1 -1
- package/lib/solvers/SameNetJunctionAlignmentSolver/collapseSameNetCycles.ts +310 -0
- package/package.json +1 -1
- package/tests/assets/example51.json +6 -0
- package/tests/bug-reports/bug-report-20260721T221026Z/__snapshots__/bug-report-20260721T221026Z.snap.svg +2 -2
- package/tests/examples/__snapshots__/example51.snap.svg +42 -78
- package/tests/examples/example51.test.ts +24 -0
- package/tests/fixtures/convertSolverOutputToCircuitJson.ts +22 -3
- package/tests/repros/__snapshots__/board-1273-trace-overlap-cycle.snap.svg +2 -2
- package/tests/repros/__snapshots__/repro-bluetooth-controller-ground-decoupling-groups.snap.svg +1 -15
- package/tests/repros/__snapshots__/repro-core-ground-inline-label-fallback.snap.svg +2 -16
- package/tests/repros/__snapshots__/repro-isolated-rs485-isow7841.snap.svg +10 -10
- package/tests/repros/__snapshots__/repro-nrf52810-clock-routing.snap.svg +18 -18
- package/tests/repros/__snapshots__/repro-pga300-redundant-ground-traces.snap.svg +1 -15
- package/tests/repros/__snapshots__/repro-pmp11282-isolated-dcdc.snap.svg +33 -47
- package/tests/repros/repro-board-648-esp12f-section.test.ts +3 -0
- package/tests/repros/repro-isolated-rs485-isow7841.test.ts +33 -1
- package/tests/repros/repro-nrf52810-clock-routing.test.ts +26 -1
- package/tests/solvers/SameNetJunctionAlignmentSolver/collapse-same-net-cycles.test.ts +154 -0
package/tests/repros/__snapshots__/repro-bluetooth-controller-ground-decoupling-groups.snap.svg
CHANGED
|
@@ -89,21 +89,7 @@ MLDO_OUT" data-x="7.35" data-y="1.0300000000000002" cx="237.15004191114838" cy="
|
|
|
89
89
|
L 692.9758323406,60.570574814770346
|
|
90
90
|
L 692.9758323406,102.11391306104687
|
|
91
91
|
Z
|
|
92
|
-
" fill="rgba(255, 255, 255, 0.6)" stroke="rgb(132, 0, 0)" stroke-width="2.42282299259px"/><text class="net-label-text sch-net-label-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_0__stack1" x="680.86171737765" y="97.75283167438488" fill="rgb(132, 0, 0)" text-anchor="start" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="21.80540693331px" transform="rotate(-90 680.86171737765 97.75283167438488)">XX</text><path class="net-label sch-net-label" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_1__stack1" d="
|
|
93
|
-
M 680.86171737765,249.17926871126014
|
|
94
|
-
L 692.9758323406,255.72089079125314
|
|
95
|
-
L 692.9758323406,297.2642290375297
|
|
96
|
-
L 668.7476024147,297.2642290375297
|
|
97
|
-
L 668.7476024147,255.72089079125314
|
|
98
|
-
Z
|
|
99
|
-
" fill="rgba(255, 255, 255, 0.6)" stroke="rgb(132, 0, 0)" stroke-width="2.42282299259px"/><text class="net-label-text sch-net-label-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_1__stack1" x="680.86171737765" y="260.08197217791513" fill="rgb(132, 0, 0)" text-anchor="start" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="21.80540693331px" transform="rotate(90 680.86171737765 260.08197217791513)">XX</text><path class="net-label sch-net-label" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_2__stack1" d="
|
|
100
|
-
M 390.1229582668501,691.344464858935
|
|
101
|
-
L 402.2370732298001,697.886086938928
|
|
102
|
-
L 402.2370732298001,739.4294251852045
|
|
103
|
-
L 378.0088433039001,739.4294251852045
|
|
104
|
-
L 378.0088433039001,697.886086938928
|
|
105
|
-
Z
|
|
106
|
-
" fill="rgba(255, 255, 255, 0.6)" stroke="rgb(132, 0, 0)" stroke-width="2.42282299259px"/><text class="net-label-text sch-net-label-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_2__stack1" x="390.1229582668501" y="702.24716832559" fill="rgb(132, 0, 0)" text-anchor="start" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="21.80540693331px" transform="rotate(90 390.1229582668501 702.24716832559)">XX</text><path class="net-label sch-net-label" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_3__stack1" d="
|
|
92
|
+
" fill="rgba(255, 255, 255, 0.6)" stroke="rgb(132, 0, 0)" stroke-width="2.42282299259px"/><text class="net-label-text sch-net-label-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_0__stack1" x="680.86171737765" y="97.75283167438488" fill="rgb(132, 0, 0)" text-anchor="start" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="21.80540693331px" transform="rotate(-90 680.86171737765 97.75283167438488)">XX</text><rect class="component-overlay sch-component-overlay sch-net-label-overlay" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_1__stack1" x="666.32477942211" y="249.17926871126014" width="29.073875911079995" height="21.805406933309996" fill="transparent"/><path class="sch-net-label-symbol-path" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_1__stack1" d="M 666.32477942211 270.98467564457013 L 695.39865533319 270.98467564457013" stroke="rgb(132, 0, 0)" fill="none" stroke-width="2.42282299259px" stroke-linecap="round"/><path class="sch-net-label-symbol-path" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_1__stack1" d="M 680.86171737765 270.98467564457013 L 680.86171737765 249.17926871126014" stroke="rgb(132, 0, 0)" fill="none" stroke-width="2.42282299259px" stroke-linecap="round"/><text class="sch-net-label-symbol-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_1__stack1" x="680.86171737765" y="277.04173312604513" fill="rgb(15, 15, 15)" font-family="sans-serif" text-anchor="middle" dominant-baseline="hanging" font-size="21.80540693331px">XX</text><rect class="component-overlay sch-component-overlay sch-net-label-overlay" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_2__stack1" x="375.5860203113101" y="691.344464858935" width="29.073875911079995" height="21.805406933309996" fill="transparent"/><path class="sch-net-label-symbol-path" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_2__stack1" d="M 375.5860203113101 713.149871792245 L 404.6598962223901 713.149871792245" stroke="rgb(132, 0, 0)" fill="none" stroke-width="2.42282299259px" stroke-linecap="round"/><path class="sch-net-label-symbol-path" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_2__stack1" d="M 390.1229582668501 713.149871792245 L 390.1229582668501 691.344464858935" stroke="rgb(132, 0, 0)" fill="none" stroke-width="2.42282299259px" stroke-linecap="round"/><text class="sch-net-label-symbol-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_2__stack1" x="390.1229582668501" y="719.20692927372" fill="rgb(15, 15, 15)" font-family="sans-serif" text-anchor="middle" dominant-baseline="hanging" font-size="21.80540693331px">XX</text><path class="net-label sch-net-label" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_3__stack1" d="
|
|
107
93
|
M 874.68755678485,575.048961214615
|
|
108
94
|
L 862.5734418219,568.507339134622
|
|
109
95
|
L 862.5734418219,526.9640008883455
|
|
@@ -230,28 +230,14 @@ motor_2b" data-x="6.055" data-y="0.7" cx="570.4492209712271" cy="265.22915955873
|
|
|
230
230
|
L 387.66368555492824,324.85065122396
|
|
231
231
|
L 358.70726232619415,324.85065122396
|
|
232
232
|
Z
|
|
233
|
-
" fill="rgba(255, 255, 255, 0.6)" stroke="rgb(132, 0, 0)" stroke-width="1.688749410696px"/><text class="net-label-text sch-net-label-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_10__stack1" x="361.747011265447" y="316.40690417048" fill="rgb(132, 0, 0)" text-anchor="start" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="15.198744696263999px" transform="">XX</text><path class="net-label sch-net-label" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_11__stack1" d="
|
|
234
|
-
M 889.7767332548187,409.28812175876
|
|
235
|
-
L 898.2204803082988,413.8477451676392
|
|
236
|
-
L 898.2204803082988,442.80416839637326
|
|
237
|
-
L 881.3329862013387,442.80416839637326
|
|
238
|
-
L 881.3329862013387,413.8477451676392
|
|
239
|
-
Z
|
|
240
|
-
" fill="rgba(255, 255, 255, 0.6)" stroke="rgb(132, 0, 0)" stroke-width="1.688749410696px"/><text class="net-label-text sch-net-label-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_11__stack1" x="889.7767332548187" y="416.887494106892" fill="rgb(132, 0, 0)" text-anchor="start" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="15.198744696263999px" transform="rotate(90 889.7767332548187 416.887494106892)">XX</text><path class="net-label sch-net-label" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_12__stack1" d="
|
|
233
|
+
" fill="rgba(255, 255, 255, 0.6)" stroke="rgb(132, 0, 0)" stroke-width="1.688749410696px"/><text class="net-label-text sch-net-label-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_10__stack1" x="361.747011265447" y="316.40690417048" fill="rgb(132, 0, 0)" text-anchor="start" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="15.198744696263999px" transform="">XX</text><rect class="component-overlay sch-component-overlay sch-net-label-overlay" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_11__stack1" x="879.6442367906427" y="409.2881217587599" width="20.264992928352058" height="15.198744696264043" fill="transparent"/><path class="sch-net-label-symbol-path" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_11__stack1" d="M 879.6442367906427 424.48686645502397 L 899.9092297189948 424.48686645502397" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.688749410696px" stroke-linecap="round"/><path class="sch-net-label-symbol-path" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_11__stack1" d="M 889.7767332548187 424.48686645502397 L 889.7767332548187 409.2881217587599" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.688749410696px" stroke-linecap="round"/><text class="sch-net-label-symbol-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_11__stack1" x="889.7767332548187" y="428.7087399817639" fill="rgb(15, 15, 15)" font-family="sans-serif" text-anchor="middle" dominant-baseline="hanging" font-size="15.198744696263999px">XX</text><path class="net-label sch-net-label" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_12__stack1" d="
|
|
241
234
|
M 536.74366894882,307.963157117
|
|
242
235
|
L 532.1840455399407,316.40690417048
|
|
243
236
|
L 503.2276223112067,316.40690417047995
|
|
244
237
|
L 503.2276223112067,299.51941006351996
|
|
245
238
|
L 532.1840455399407,299.51941006351996
|
|
246
239
|
Z
|
|
247
|
-
" fill="rgba(255, 255, 255, 0.6)" stroke="rgb(132, 0, 0)" stroke-width="1.688749410696px"/><text class="net-label-text sch-net-label-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_12__stack1" x="529.144296600688" y="307.963157117" fill="rgb(132, 0, 0)" text-anchor="end" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="15.198744696263999px" transform="">XX</text><path class="net-label sch-net-label" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_13__stack1" d="
|
|
248
|
-
M 1127.046025457607,544.4725120849748
|
|
249
|
-
L 1135.4897725110868,549.0321354938541
|
|
250
|
-
L 1135.4897725110868,577.9885587225881
|
|
251
|
-
L 1118.602278404127,577.9885587225881
|
|
252
|
-
L 1118.602278404127,549.0321354938541
|
|
253
|
-
Z
|
|
254
|
-
" fill="rgba(255, 255, 255, 0.6)" stroke="rgb(132, 0, 0)" stroke-width="1.688749410696px"/><text class="net-label-text sch-net-label-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_13__stack1" x="1127.046025457607" y="552.0718844331068" fill="rgb(132, 0, 0)" text-anchor="start" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="15.198744696263999px" transform="rotate(90 1127.046025457607 552.0718844331068)">XX</text><path class="net-label sch-net-label" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_14__stack1" d="
|
|
240
|
+
" fill="rgba(255, 255, 255, 0.6)" stroke="rgb(132, 0, 0)" stroke-width="1.688749410696px"/><text class="net-label-text sch-net-label-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_12__stack1" x="529.144296600688" y="307.963157117" fill="rgb(132, 0, 0)" text-anchor="end" dominant-baseline="central" font-family="sans-serif" font-variant-numeric="tabular-nums" font-size="15.198744696263999px" transform="">XX</text><rect class="component-overlay sch-component-overlay sch-net-label-overlay" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_13__stack1" x="1116.9135289934309" y="544.4725120849748" width="20.264992928352058" height="15.19874469626393" fill="transparent"/><path class="sch-net-label-symbol-path" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_13__stack1" d="M 1116.9135289934309 559.6712567812388 L 1137.178521921783 559.6712567812388" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.688749410696px" stroke-linecap="round"/><path class="sch-net-label-symbol-path" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_13__stack1" d="M 1127.046025457607 559.6712567812388 L 1127.046025457607 544.4725120849748" stroke="rgb(132, 0, 0)" fill="none" stroke-width="1.688749410696px" stroke-linecap="round"/><text class="sch-net-label-symbol-text" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_13__stack1" x="1127.046025457607" y="563.8931303079788" fill="rgb(15, 15, 15)" font-family="sans-serif" text-anchor="middle" dominant-baseline="hanging" font-size="15.198744696263999px">XX</text><path class="net-label sch-net-label" data-circuit-json-type="schematic_net_label" data-schematic-net-label-id="schematic_net_label_14__stack1" d="
|
|
255
241
|
M 815.4717591841948,274.1037314325452
|
|
256
242
|
L 807.0280121307147,269.544108023666
|
|
257
243
|
L 807.0280121307147,240.58768479493193
|