@tscircuit/capacity-autorouter 0.0.27 → 0.0.29

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 CHANGED
@@ -74,6 +74,7 @@ interface CapacityMeshNode {
74
74
  _containsTarget?: boolean;
75
75
  _targetConnectionName?: string;
76
76
  _strawNode?: boolean;
77
+ _strawParentCapacityMeshNodeId?: CapacityMeshNodeId;
77
78
  _parent?: CapacityMeshNode;
78
79
  }
79
80
  interface CapacityMeshEdge {
@@ -171,6 +172,7 @@ interface CapacityMeshNodeSolverOptions {
171
172
  declare class CapacityMeshNodeSolver2_NodeUnderObstacle extends CapacityMeshNodeSolver {
172
173
  srj: SimpleRouteJson;
173
174
  opts: CapacityMeshNodeSolverOptions;
175
+ VIA_DIAMETER: number;
174
176
  constructor(srj: SimpleRouteJson, opts?: CapacityMeshNodeSolverOptions);
175
177
  isNodeCompletelyOutsideBounds(node: CapacityMeshNode): boolean;
176
178
  isNodePartiallyOutsideBounds(node: CapacityMeshNode): boolean;
@@ -251,7 +253,7 @@ declare class CapacityPathingSolver extends BaseSolver {
251
253
  getBacktrackedPath(candidate: Candidate): CapacityMeshNode[];
252
254
  getNeighboringNodes(node: CapacityMeshNode): CapacityMeshNode[];
253
255
  getCapacityPaths(): CapacityPath[];
254
- doesNodeHaveCapacityForTrace(node: CapacityMeshNode): boolean;
256
+ doesNodeHaveCapacityForTrace(node: CapacityMeshNode, prevNode: CapacityMeshNode): boolean;
255
257
  canTravelThroughObstacle(node: CapacityMeshNode, connectionName: string): boolean;
256
258
  getDistanceBetweenNodes(A: CapacityMeshNode, B: CapacityMeshNode): number;
257
259
  reduceCapacityAlongPath(nextConnection: {
@@ -345,6 +347,7 @@ type HighDensityIntraNodeRoute = {
345
347
  y: number;
346
348
  }>;
347
349
  };
350
+ type HighDensityRoute = HighDensityIntraNodeRoute;
348
351
 
349
352
  interface SegmentWithAssignedPoints extends NodePortSegment {
350
353
  assignedPoints?: {
@@ -1190,6 +1193,52 @@ declare class SingleLayerNodeMergerSolver extends BaseSolver {
1190
1193
  visualize(): GraphicsObject;
1191
1194
  }
1192
1195
 
1196
+ interface Point {
1197
+ x: number;
1198
+ y: number;
1199
+ z: number;
1200
+ }
1201
+ declare class SingleSimplifiedPathSolver extends BaseSolver {
1202
+ newRoute: HighDensityIntraNodeRoute["route"];
1203
+ newVias: HighDensityIntraNodeRoute["vias"];
1204
+ headIndex: number;
1205
+ tailIndex: number;
1206
+ inputRoute: HighDensityIntraNodeRoute;
1207
+ otherHdRoutes: HighDensityIntraNodeRoute[];
1208
+ obstacles: Obstacle[];
1209
+ connMap: ConnectivityMap;
1210
+ colorMap: Record<string, string>;
1211
+ constructor(params: {
1212
+ inputRoute: HighDensityIntraNodeRoute;
1213
+ otherHdRoutes: HighDensityIntraNodeRoute[];
1214
+ obstacles: Obstacle[];
1215
+ connMap: ConnectivityMap;
1216
+ colorMap: Record<string, string>;
1217
+ });
1218
+ get simplifiedRoute(): HighDensityIntraNodeRoute;
1219
+ isValidPath(pointsInRoute: Point[]): boolean;
1220
+ _step(): void;
1221
+ getVisualsForNewRouteAndObstacles(): Required<GraphicsObject>;
1222
+ }
1223
+
1224
+ declare class MultiSimplifiedPathSolver extends BaseSolver {
1225
+ simplifiedHdRoutes: HighDensityIntraNodeRoute[];
1226
+ currentUnsimplifiedHdRouteIndex: number;
1227
+ activeSubSolver: SingleSimplifiedPathSolver | null;
1228
+ unsimplifiedHdRoutes: HighDensityIntraNodeRoute[];
1229
+ obstacles: Obstacle[];
1230
+ connMap: ConnectivityMap;
1231
+ colorMap: Record<string, string>;
1232
+ constructor(params: {
1233
+ unsimplifiedHdRoutes: HighDensityIntraNodeRoute[];
1234
+ obstacles: Obstacle[];
1235
+ connMap?: ConnectivityMap;
1236
+ colorMap?: Record<string, string>;
1237
+ });
1238
+ _step(): void;
1239
+ visualize(): GraphicsObject;
1240
+ }
1241
+
1193
1242
  interface CapacityMeshSolverOptions {
1194
1243
  capacityDepth?: number;
1195
1244
  targetMinCapacity?: number;
@@ -1217,6 +1266,7 @@ declare class CapacityMeshSolver extends BaseSolver {
1217
1266
  highDensityStitchSolver?: MultipleHighDensityRouteStitchSolver;
1218
1267
  singleLayerNodeMerger?: SingleLayerNodeMergerSolver;
1219
1268
  strawSolver?: StrawSolver;
1269
+ multiSimplifiedPathSolver?: MultiSimplifiedPathSolver;
1220
1270
  startTimeOfPhase: Record<string, number>;
1221
1271
  endTimeOfPhase: Record<string, number>;
1222
1272
  timeSpentOnPhase: Record<string, number>;
@@ -1224,7 +1274,7 @@ declare class CapacityMeshSolver extends BaseSolver {
1224
1274
  connMap: ConnectivityMap;
1225
1275
  srjWithPointPairs?: SimpleRouteJson;
1226
1276
  capacityNodes: CapacityMeshNode[] | null;
1227
- pipelineDef: (PipelineStep<typeof NetToPointPairsSolver> | PipelineStep<typeof CapacityMeshNodeSolver2_NodeUnderObstacle> | PipelineStep<typeof SingleLayerNodeMergerSolver> | PipelineStep<typeof StrawSolver> | PipelineStep<typeof CapacityMeshEdgeSolver> | PipelineStep<typeof CapacityPathingSolver5> | PipelineStep<typeof CapacityEdgeToPortSegmentSolver> | PipelineStep<typeof CapacitySegmentToPointSolver> | PipelineStep<typeof UnravelMultiSectionSolver> | PipelineStep<typeof HighDensitySolver> | PipelineStep<typeof MultipleHighDensityRouteStitchSolver>)[];
1277
+ pipelineDef: (PipelineStep<typeof NetToPointPairsSolver> | PipelineStep<typeof CapacityMeshNodeSolver2_NodeUnderObstacle> | PipelineStep<typeof SingleLayerNodeMergerSolver> | PipelineStep<typeof StrawSolver> | PipelineStep<typeof CapacityMeshEdgeSolver> | PipelineStep<typeof CapacityPathingSolver5> | PipelineStep<typeof CapacityEdgeToPortSegmentSolver> | PipelineStep<typeof CapacitySegmentToPointSolver> | PipelineStep<typeof UnravelMultiSectionSolver> | PipelineStep<typeof HighDensitySolver> | PipelineStep<typeof MultipleHighDensityRouteStitchSolver> | PipelineStep<typeof MultiSimplifiedPathSolver>)[];
1228
1278
  constructor(srj: SimpleRouteJson, opts?: CapacityMeshSolverOptions);
1229
1279
  currentPipelineStepIndex: number;
1230
1280
  _step(): void;
@@ -1236,6 +1286,7 @@ declare class CapacityMeshSolver extends BaseSolver {
1236
1286
  * @returns The original connection name (e.g. "connection1")
1237
1287
  */
1238
1288
  private getOriginalConnectionName;
1289
+ _getOutputHdRoutes(): HighDensityRoute[];
1239
1290
  /**
1240
1291
  * Returns the SimpleRouteJson with routes converted to SimplifiedPcbTraces
1241
1292
  */