diff --git a/lib/utils/autorouting/CapacityMeshAutorouter.ts b/lib/utils/autorouting/CapacityMeshAutorouter.ts index 8256762d1..e725b67f1 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 b80b28a9b..a274a4799 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 f81a9b09c..02f255425 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 3ef1080bd..61d12a6dd 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 a326211c9..f5d9ce5ce 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 - -