@@ -5,10 +5,11 @@ import {
55 type ViaData ,
66 type ViaByNet ,
77 type ViaTile ,
8- ViaGraphSolver ,
8+ FixedViaHypergraphSolver ,
99 createConvexViaGraphFromXYConnections ,
10- } from "@tscircuit/hypergraph"
10+ } from "@tscircuit/fixed-via- hypergraph-solver/lib/index "
1111import { ConnectivityMap } from "circuit-json-to-connectivity-map"
12+ import type { GraphicsObject } from "graphics-debug"
1213import type {
1314 HighDensityIntraNodeRoute ,
1415 NodeWithPortPoints ,
@@ -54,7 +55,7 @@ export class FixedTopologyHighDensityIntraNodeSolver extends BaseSolver {
5455 connMap ?: ConnectivityMap
5556
5657 rootConnectionNameByConnectionId : Map < string , string | undefined > = new Map ( )
57- lastActiveSubSolver : ViaGraphSolver | null = null
58+ lastActiveSubSolver : FixedViaHypergraphSolver | null = null
5859
5960 solvedRoutes : HighDensityIntraNodeRouteWithVias [ ] = [ ]
6061 vias : ViaRegion [ ] = [ ]
@@ -96,7 +97,7 @@ export class FixedTopologyHighDensityIntraNodeSolver extends BaseSolver {
9697 return 0.3
9798 }
9899
99- private _initializeGraph ( ) : ViaGraphSolver | null {
100+ private _initializeGraph ( ) : FixedViaHypergraphSolver | null {
100101 // Build connections from port points
101102 const connectionMap = new Map <
102103 string ,
@@ -136,7 +137,7 @@ export class FixedTopologyHighDensityIntraNodeSolver extends BaseSolver {
136137 const convexGraph = createConvexViaGraphFromXYConnections ( inputConnections )
137138 this . tiledViasByNet = convexGraph . viaTile . viasByNet ?? { }
138139
139- return new ViaGraphSolver ( {
140+ return new FixedViaHypergraphSolver ( {
140141 inputGraph : {
141142 regions : convexGraph . regions ,
142143 ports : convexGraph . ports ,
@@ -147,7 +148,8 @@ export class FixedTopologyHighDensityIntraNodeSolver extends BaseSolver {
147148 }
148149
149150 _step ( ) {
150- let activeSubSolver = this . activeSubSolver as ViaGraphSolver | null
151+ let activeSubSolver = this
152+ . activeSubSolver as FixedViaHypergraphSolver | null
151153 if ( ! activeSubSolver ) {
152154 activeSubSolver = this . _initializeGraph ( )
153155 if ( ! activeSubSolver ) {
@@ -405,7 +407,7 @@ export class FixedTopologyHighDensityIntraNodeSolver extends BaseSolver {
405407 )
406408 }
407409
408- private _processResults ( viaGraphSolver : ViaGraphSolver ) {
410+ private _processResults ( viaGraphSolver : FixedViaHypergraphSolver ) {
409411 this . solvedRoutes = [ ]
410412 const viaTile = viaGraphSolver . viaTile
411413 const fallbackViaDiameter = viaTile
@@ -588,7 +590,7 @@ export class FixedTopologyHighDensityIntraNodeSolver extends BaseSolver {
588590 return this . vias
589591 }
590592
591- override visualize ( ) {
593+ override visualize ( ) : GraphicsObject {
592594 if ( this . activeSubSolver ) {
593595 return this . activeSubSolver . visualize ( )
594596 }
0 commit comments