@tscircuit/capacity-autorouter 0.0.717 → 0.0.719

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/README.md CHANGED
@@ -59,6 +59,7 @@ interface SimpleRouteJson {
59
59
  minTraceWidth: number
60
60
  obstacles: Obstacle[]
61
61
  connections: Array<SimpleRouteConnection>
62
+ buses?: Array<SimpleRouteBus>
62
63
  bounds: { minX: number; maxX: number; minY: number; maxY: number }
63
64
  traces?: SimplifiedPcbTraces // Optional for input
64
65
  }
@@ -79,8 +80,18 @@ interface SimpleRouteConnection {
79
80
  name: string
80
81
  pointsToConnect: Array<{ x: number; y: number; layer: string }>
81
82
  }
83
+
84
+ interface SimpleRouteBus {
85
+ busId: string
86
+ connectionNames: string[] // Ordered SimpleRouteConnection names
87
+ maxLengthSkew?: number // Maximum routed-length difference in millimeters
88
+ }
82
89
  ```
83
90
 
91
+ `maxLengthSkew` records the maximum permitted routed-length difference for the
92
+ bus. Bus metadata is preserved in the output so routing implementations can
93
+ apply the constraint without losing the original membership or ordering.
94
+
84
95
  ### Output Format
85
96
 
86
97
  The `getOutputSimpleRouteJson()` method returns the original `SimpleRouteJson` with a populated `traces` property. The traces are represented as `SimplifiedPcbTraces`:
package/dist/index.d.ts CHANGED
@@ -11,7 +11,7 @@ import { JumperGraphSolver, JRegion, JPort, HyperGraph, RegionPort, Region, Regi
11
11
  import { ConnectivityMap as ConnectivityMap$1 } from 'connectivity-map';
12
12
  import { HighDensityForceImproveSolver } from 'high-density-repair01/lib/HighDensityForceImproveSolver';
13
13
  import { GlobalDrcForceImproveSolver, GlobalDrcBranchPortfolioSolver } from 'high-density-repair03/lib';
14
- export { DrcError, DrcEvaluator, DrcSnapshot, GlobalDrcBranchPortfolioSolver, GlobalDrcBranchPortfolioSolverParams, GlobalDrcForceImproveSolver, GlobalDrcForceImproveSolverParams, HighDensityRoute, SimpleRouteJson, SimplifiedPcbTrace } from 'high-density-repair03/lib';
14
+ export { DrcError, DrcEvaluator, DrcSnapshot, GlobalDrcBranchPortfolioSolver, GlobalDrcBranchPortfolioSolverParams, GlobalDrcForceImproveSolver, GlobalDrcForceImproveSolverParams, HighDensityRoute } from 'high-density-repair03/lib';
15
15
  import { DatasetSample, HighDensityRepairSolver } from 'high-density-repair02';
16
16
  import { LayerMergeMode, ConvexRegionsComputeResult, SerializedPolyHyperGraph } from 'pcb-poly-hyper-graph';
17
17
  import { PolyHyperGraphLoadResult, PolyHyperGraphSolver } from 'tiny-hypergraph-poly/lib/index';
@@ -106,9 +106,11 @@ interface SimpleRouteJson {
106
106
  min_via_pad_diameter?: number;
107
107
  defaultObstacleMargin?: number;
108
108
  minTraceToPadEdgeClearance?: number;
109
+ minViaEdgeToPadEdgeClearance?: number;
109
110
  obstacles: Obstacle[];
110
111
  connections: Array<SimpleRouteConnection>;
111
112
  differentialPairs?: Array<DifferentialPair>;
113
+ buses?: Array<SimpleRouteBus>;
112
114
  bounds: {
113
115
  minX: number;
114
116
  maxX: number;
@@ -127,7 +129,14 @@ interface SimpleRouteJson {
127
129
  }
128
130
  interface DifferentialPair {
129
131
  connectionNames: [string, string];
130
- lengthTolerance: 0.1;
132
+ lengthTolerance: number;
133
+ }
134
+ interface SimpleRouteBus {
135
+ busId: BusId;
136
+ /** SimpleRouteJson connection names belonging to this bus, in bus order. */
137
+ connectionNames: string[];
138
+ /** Maximum permitted routed-length difference in millimeters. */
139
+ maxLengthSkew?: number;
131
140
  }
132
141
  interface Obstacle {
133
142
  obstacleId?: string;
@@ -135,6 +144,9 @@ interface Obstacle {
135
144
  componentId?: string;
136
145
  type: "rect";
137
146
  layers: string[];
147
+ /** Public z-layer indexes supplied by SimpleRouteJson producers. */
148
+ zLayers?: number[];
149
+ /** Canonicalized z-layer indexes used by autorouter internals. */
138
150
  __zLayers?: number[];
139
151
  center: {
140
152
  x: number;
@@ -151,8 +163,11 @@ interface Obstacle {
151
163
  }
152
164
  interface SimpleRouteConnection {
153
165
  name: string;
166
+ rootConnectionName?: RootConnectionName;
167
+ mergedConnectionNames?: string[];
154
168
  __rootConnectionNames?: string[];
155
169
  isOffBoard?: boolean;
170
+ netConnectionName?: string;
156
171
  __netConnectionName?: string;
157
172
  nominalTraceWidth?: number;
158
173
  pointsToConnect: Array<ConnectionPoint$1>;
@@ -170,6 +185,8 @@ interface SimplifiedPcbTrace {
170
185
  y: number;
171
186
  width: number;
172
187
  layer: string;
188
+ start_pcb_port_id?: string;
189
+ end_pcb_port_id?: string;
173
190
  } | {
174
191
  route_type: "via";
175
192
  x: number;
@@ -7022,4 +7039,4 @@ declare const HyperSingleIntraNodeSolver: typeof PortfolioSingleIntraNodeSolver;
7022
7039
  */
7023
7040
  type HyperSingleIntraNodeSolver = InstanceType<typeof PortfolioSingleIntraNodeSolver>;
7024
7041
 
7025
- export { AssignableAutoroutingPipeline1Solver, AssignableAutoroutingPipeline2, AssignableAutoroutingPipeline3, AttachProjectedRectsSolver, AutoroutingPipeline1_OriginalUnravel, AutoroutingPipelineSolver7_MultiGraph as AutoroutingPipelineSolver, AutoroutingPipelineSolver2_PortPointPathing, AutoroutingPipelineSolver3_HgPortPointPathing, AutoroutingPipelineSolver4_TinyHypergraph as AutoroutingPipelineSolver4, AutoroutingPipelineSolver4_TinyHypergraph, AutoroutingPipelineSolver5_HdCache as AutoroutingPipelineSolver5, AutoroutingPipelineSolver5_HdCache, AutoroutingPipelineSolver6_PolyHypergraph as AutoroutingPipelineSolver6, AutoroutingPipelineSolver6_PolyHypergraph, AutoroutingPipelineSolver7_MultiGraph, AutoroutingPipelineSolver8, type AutoroutingPipelineSolverOptions, type CachableSolver, type CacheProvider, CapacityMeshSolver, type ConvertSrjToGraphicsObjectOptions, CurvyIntraNodeSolver, GrowShrinkHighDensityIntraNodeSolver, type HighDensityIntraNodeRouteWithJumpers, JumperHighDensitySolver as HighDensitySolver, HyperSingleIntraNodeSolver, InMemoryCache, IntraNodeSolverWithJumpers, type Jumper, LocalStorageCache, PolyHighDensitySolver, PolySingleIntraNodeSolver as PolyIntraNodeSolver, PolySingleIntraNodeSolver, PortfolioSingleIntraNodeSolver, ProjectHighDensityToPolygonSolver, type RerouteRectRegion, SingleHighDensityRouteWithJumpersSolver, type TraceColorMode, calculateOptimalCapacityDepth, convertSrjToGraphicsObject, getGlobalInMemoryCache, getGlobalLocalStorageCache, getRerouteSimpleRouteJson, getTunedTotalCapacity1, reconnectReroutedSimpleRouteJsonRegion, setupGlobalCaches };
7042
+ export { AssignableAutoroutingPipeline1Solver, AssignableAutoroutingPipeline2, AssignableAutoroutingPipeline3, AttachProjectedRectsSolver, AutoroutingPipeline1_OriginalUnravel, AutoroutingPipelineSolver7_MultiGraph as AutoroutingPipelineSolver, AutoroutingPipelineSolver2_PortPointPathing, AutoroutingPipelineSolver3_HgPortPointPathing, AutoroutingPipelineSolver4_TinyHypergraph as AutoroutingPipelineSolver4, AutoroutingPipelineSolver4_TinyHypergraph, AutoroutingPipelineSolver5_HdCache as AutoroutingPipelineSolver5, AutoroutingPipelineSolver5_HdCache, AutoroutingPipelineSolver6_PolyHypergraph as AutoroutingPipelineSolver6, AutoroutingPipelineSolver6_PolyHypergraph, AutoroutingPipelineSolver7_MultiGraph, AutoroutingPipelineSolver8, type AutoroutingPipelineSolverOptions, type BusId, type CachableSolver, type CacheProvider, CapacityMeshSolver, type ConnectionPoint$1 as ConnectionPoint, type ConvertSrjToGraphicsObjectOptions, CurvyIntraNodeSolver, type DifferentialPair, GrowShrinkHighDensityIntraNodeSolver, type HighDensityIntraNodeRouteWithJumpers, JumperHighDensitySolver as HighDensitySolver, HyperSingleIntraNodeSolver, InMemoryCache, IntraNodeSolverWithJumpers, type Jumper, LocalStorageCache, type MultiLayerConnectionPoint, type Obstacle, PolyHighDensitySolver, PolySingleIntraNodeSolver as PolyIntraNodeSolver, PolySingleIntraNodeSolver, PortfolioSingleIntraNodeSolver, ProjectHighDensityToPolygonSolver, type RerouteRectRegion, type SimpleRouteBus, type SimpleRouteConnection, type SimpleRouteJson, type SimplifiedPcbTrace, type SimplifiedPcbTraces, SingleHighDensityRouteWithJumpersSolver, type SingleLayerConnectionPoint, type TerminalViaHint, type TraceColorMode, calculateOptimalCapacityDepth, convertSrjToGraphicsObject, getGlobalInMemoryCache, getGlobalLocalStorageCache, getRerouteSimpleRouteJson, getTunedTotalCapacity1, reconnectReroutedSimpleRouteJsonRegion, setupGlobalCaches };