From 6c80be094ee060c105a9be2d596b8ba7005423c6 Mon Sep 17 00:00:00 2001 From: seveibar Date: Wed, 2 Sep 2026 18:36:41 -0700 Subject: [PATCH 1/4] Default to Pipeline9 and keep footprint copper fixed --- .../autorouting/CapacityMeshAutorouter.ts | 8 +-- .../getPreservedRoutedSubcircuitTraces.ts | 4 ++ package.json | 2 +- .../autoplaced-breakoutpoints1-pcb.snap.svg | 2 +- ...ader-and-passives-autorouting-srj.snap.svg | 8 +-- ...fp16-with-header-and-passives-pcb.snap.svg | 2 +- ...ulator-power-rail-autorouting-srj.snap.svg | 70 +++++++++---------- ...ut-sot23-regulator-power-rail-pcb.snap.svg | 2 +- ...mplicit-breakout-point-solver-pcb.snap.svg | 2 +- ...out-one-point-net-autorouting-srj.snap.svg | 4 +- ...efault-breakout-one-point-net-pcb.snap.svg | 2 +- ...breakout-routes-before-global-pcb.snap.svg | 2 +- ...sor-to-i2c-header-autorouting-srj.snap.svg | 8 +-- ...ut-soic8-sensor-to-i2c-header-pcb.snap.svg | 2 +- ...points-use-default-autorouter-pcb.snap.svg | 2 +- ...ced-breakoutpoint-autorouting-srj.snap.svg | 4 +- .../manualplaced-breakoutpoint-pcb.snap.svg | 2 +- ...ut-qfp16-with-header-and-passives.test.tsx | 6 ++ ...out-breakout-routes-before-global.test.tsx | 3 +- .../antenna-generated-keepout.test.tsx | 20 ++++++ .../solderjumper-circuit.test.tsx | 4 +- .../differential-pair-routing-phase.snap.svg | 24 +++---- .../__snapshots__/routing-phase-pcb.snap.svg | 2 +- ...autorouter-fanout-autorouting-srj.snap.svg | 14 ++-- .../autorouter-fanout-pcb.snap.svg | 2 +- ...ase-index-arrays-horizontal-first.snap.svg | 4 +- ...phase-index-arrays-vertical-first.snap.svg | 4 +- ...tion-phase-index-horizontal-first.snap.svg | 4 +- ...ection-phase-index-vertical-first.snap.svg | 4 +- ...-circuit-json-reroute-builtin-pcb.snap.svg | 2 +- .../breakout-fanout-props-pcb.snap.svg | 2 +- ...aight-line-before-autorouting-pcb.snap.svg | 2 +- ...d-autorouting-net-power-first-pcb.snap.svg | 2 +- tests/features/autorouter-default.test.tsx | 8 +++ ...torouter-version-unknown-fallback.test.tsx | 4 +- .../capacity-mesh-autorouting1.test.tsx | 2 +- ...eakout-fanout-net-handoff-gap-pcb.snap.svg | 2 +- ...16-arduino-uno-reroute-center-pcb.snap.svg | 2 +- ...arduino-uno-reroute-lower-mid-pcb.snap.svg | 2 +- .../repro116-arduino-uno-reroute-pcb.snap.svg | 2 +- ...-crosses-bridged-solderjumper-pcb.snap.svg | 2 +- ...repro79-routing-outside-board-pcb.snap.svg | 2 +- 42 files changed, 147 insertions(+), 104 deletions(-) diff --git a/lib/utils/autorouting/CapacityMeshAutorouter.ts b/lib/utils/autorouting/CapacityMeshAutorouter.ts index 8256762d1b..e725b67f11 100644 --- a/lib/utils/autorouting/CapacityMeshAutorouter.ts +++ b/lib/utils/autorouting/CapacityMeshAutorouter.ts @@ -116,12 +116,12 @@ export class TscircuitAutorouter implements GenericLocalAutorouter { solverName = "AutoroutingPipelineSolver4" } else if (autorouterVersion === "beta_pipeline5") { solverName = "AutoroutingPipelineSolver5" + } else if (autorouterVersion === "beta_pipeline7") { + solverName = "AutoroutingPipelineSolver7_MultiGraph" } else if ( - autorouterVersion === "beta_pipeline7" || + autorouterVersion === "beta_pipeline9" || autorouterVersion === "latest" ) { - solverName = "AutoroutingPipelineSolver7_MultiGraph" - } else if (autorouterVersion === "beta_pipeline9") { solverName = "AutoroutingPipelineSolver9_PreloadedTraceGraph" } else if (useLaserPrefabSolver) { solverName = "AutoroutingPipelineSolver8" @@ -130,7 +130,7 @@ export class TscircuitAutorouter implements GenericLocalAutorouter { } else if (useAssignableSolver) { solverName = "AssignableAutoroutingPipeline2" } else { - solverName = "AutoroutingPipelineSolver7_MultiGraph" + solverName = "AutoroutingPipelineSolver9_PreloadedTraceGraph" } const SolverClass = SOLVERS[solverName] const solverCacheProvider = diff --git a/lib/utils/autorouting/getPreservedRoutedSubcircuitTraces.ts b/lib/utils/autorouting/getPreservedRoutedSubcircuitTraces.ts index b80b28a9b7..a274a47992 100644 --- a/lib/utils/autorouting/getPreservedRoutedSubcircuitTraces.ts +++ b/lib/utils/autorouting/getPreservedRoutedSubcircuitTraces.ts @@ -85,6 +85,9 @@ const getSimpleRouteForPreservedTrace = ( * Converts PCB traces that already exist when autorouting starts into SRJ * `traces`. This includes manual copper rendered in an earlier render phase * and routed child-subcircuit copper. + * Footprint copper without a source trace is already represented as obstacles + * by getSimpleRouteJsonFromCircuitJson. It must not also become a preloaded + * route that the autorouter can reshape or validate against its own keepout. * * `connectsTo` is physical routing state, not electrical-net metadata. It must * contain only the PCB points joined by this exact copper trace so the parent @@ -102,6 +105,7 @@ export const getPreservedRoutedSubcircuitTraces = ({ .list() .filter((trace) => { if (!trace.subcircuit_id) return false + if (trace.pcb_component_id && !trace.source_trace_id) return false return ( relevantSubcircuitIds === null || relevantSubcircuitIds.has(trace.subcircuit_id) diff --git a/package.json b/package.json index f81a9b09c0..02f2554250 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@tsci/tscircuit.ti": "github:tscircuit/ti#57e314be4b2b06bc546d4def7453e619604d1157", "@tscircuit/alphabet": "0.0.25", "@tscircuit/bga-fanout-solver": "github:tscircuit/bga-fanout-solver#247c835cb8d69b65e53891dcf869731079415b39", - "@tscircuit/capacity-autorouter": "^0.0.866", + "@tscircuit/capacity-autorouter": "^0.0.869", "@tscircuit/checks": "^0.0.180", "@tscircuit/circuit-json-util": "^0.0.106", "@tscircuit/common": "^0.0.20", diff --git a/tests/breakout/__snapshots__/autoplaced-breakoutpoints1-pcb.snap.svg b/tests/breakout/__snapshots__/autoplaced-breakoutpoints1-pcb.snap.svg index 3ef1080bdb..61d12a6dda 100644 --- a/tests/breakout/__snapshots__/autoplaced-breakoutpoints1-pcb.snap.svg +++ b/tests/breakout/__snapshots__/autoplaced-breakoutpoints1-pcb.snap.svg @@ -1 +1 @@ -R1C1R2autorouting phase 0autorouting phase 1 \ No newline at end of file +R1C1R2autorouting phase 0autorouting phase 1 \ No newline at end of file diff --git a/tests/breakout/__snapshots__/breakout-qfp16-with-header-and-passives-autorouting-srj.snap.svg b/tests/breakout/__snapshots__/breakout-qfp16-with-header-and-passives-autorouting-srj.snap.svg index a326211c9b..3355b30fa6 100644 --- a/tests/breakout/__snapshots__/breakout-qfp16-with-header-and-passives-autorouting-srj.snap.svg +++ b/tests/breakout/__snapshots__/breakout-qfp16-with-header-and-passives-autorouting-srj.snap.svg @@ -334,7 +334,7 @@ top" data-x="4.899900000000001" data-y="-1.37" cx="608.3317073170732" cy="372.90 >AUTOROUTING PHASE 2 END: 5 CONNECTIONS, 12 TRACES - -