@tscircuit/capacity-autorouter 0.0.662 → 0.0.664

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
@@ -235,6 +235,7 @@ interface CapacityMeshNode {
235
235
  _qfpRegionType?: "center" | "pad" | "pad-gap" | "corner";
236
236
  _isNarrowQfpPadGap?: boolean;
237
237
  _soicRegionType?: "center" | "pad" | "pad-gap";
238
+ _isComponentTopologyNode?: boolean;
238
239
  _parent?: CapacityMeshNode;
239
240
  }
240
241
  interface CapacityMeshEdge {
@@ -5092,13 +5093,25 @@ declare class MultipleHighDensityRouteStitchSolver3 extends BaseSolver {
5092
5093
  visualize(): GraphicsObject;
5093
5094
  }
5094
5095
 
5096
+ type TraceColorMode = "layer" | "net";
5097
+ type ConvertSrjToGraphicsObjectOptions = {
5098
+ traceColorMode?: TraceColorMode;
5099
+ };
5100
+ declare const convertSrjToGraphicsObject: (srj: SimpleRouteJson, options?: ConvertSrjToGraphicsObjectOptions) => {
5101
+ rects: Rect[];
5102
+ circles: Circle[];
5103
+ lines: Line[];
5104
+ points: Point$5[];
5105
+ };
5106
+
5095
5107
  declare class PreprocessSimpleRouteJsonSolver$1 extends BaseSolver {
5096
5108
  readonly inputSrj: SimpleRouteJson;
5109
+ readonly visualizationOptions: ConvertSrjToGraphicsObjectOptions;
5097
5110
  outputSrj?: SimpleRouteJson;
5098
- constructor(inputSrj: SimpleRouteJson);
5111
+ constructor(inputSrj: SimpleRouteJson, visualizationOptions?: ConvertSrjToGraphicsObjectOptions);
5099
5112
  _step(): void;
5100
5113
  getOutputSimpleRouteJson(): SimpleRouteJson;
5101
- getConstructorParams(): readonly [SimpleRouteJson];
5114
+ getConstructorParams(): readonly [SimpleRouteJson, ConvertSrjToGraphicsObjectOptions];
5102
5115
  visualize(): GraphicsObject;
5103
5116
  }
5104
5117
 
@@ -5602,11 +5615,10 @@ interface MultiGraphTopologyPlannerSolverOutput {
5602
5615
  componentNoConnectionSrjs: SimpleRouteJson[];
5603
5616
  globalMeshNodes: CapacityMeshNode[];
5604
5617
  componentMeshNodes: CapacityMeshNode[][];
5605
- mergedMeshNodes: CapacityMeshNode[];
5606
5618
  }
5607
5619
  /**
5608
- * Produces a merged routing topology where component replacement regions from
5609
- * the global solve are substituted with component-local routing regions.
5620
+ * Produces the global and component-local topology groups consumed by the
5621
+ * Pipeline 7 topology merging stage.
5610
5622
  */
5611
5623
  declare class MultiGraphTopologyPlannerSolver extends BasePipelineSolver<MultiGraphTopologyPlannerSolverParams> {
5612
5624
  globalTopologySolver?: RectDiffPipeline;
@@ -5616,8 +5628,8 @@ declare class MultiGraphTopologyPlannerSolver extends BasePipelineSolver<MultiGr
5616
5628
  constructor(params: MultiGraphTopologyPlannerSolverParams);
5617
5629
  getConstructorParams(): readonly [MultiGraphTopologyPlannerSolverParams];
5618
5630
  /**
5619
- * Returns the global solve, the per-component solves, and the merged routing
5620
- * regions used by downstream stages.
5631
+ * Returns the global solve and the independently generated component-local
5632
+ * topology groups.
5621
5633
  */
5622
5634
  getOutput(): MultiGraphTopologyPlannerSolverOutput;
5623
5635
  finalVisualize(): GraphicsObject | null;
@@ -5643,6 +5655,35 @@ declare class MultiGraphTopologyPlannerSolver extends BasePipelineSolver<MultiGr
5643
5655
  private filterGlobalRectDiffNodesFromVisualization;
5644
5656
  }
5645
5657
 
5658
+ interface TopologyMergingNodeGroup {
5659
+ groupId: string;
5660
+ nodes: CapacityMeshNode[];
5661
+ isComponent: boolean;
5662
+ }
5663
+ interface TopologyMergingSolverParams {
5664
+ nodeGroups: readonly TopologyMergingNodeGroup[];
5665
+ layerCount: number;
5666
+ }
5667
+
5668
+ declare class TopologyMergingSolver extends BaseSolver$1 {
5669
+ readonly inputProblem: TopologyMergingSolverParams;
5670
+ private readonly preparedNodes;
5671
+ private readonly preparedNodeBySourceKey;
5672
+ private readonly outputProvenance;
5673
+ private readonly xCoordinates;
5674
+ private readonly atomicRegions;
5675
+ private outputNodes;
5676
+ private currentXIndex;
5677
+ constructor(inputProblem: TopologyMergingSolverParams);
5678
+ getConstructorParams(): [TopologyMergingSolverParams];
5679
+ _step(): void;
5680
+ getOutput(): CapacityMeshNode[];
5681
+ computeProgress(): number;
5682
+ visualize(): GraphicsObject;
5683
+ private completePassthroughTopology;
5684
+ private processCurrentXSlab;
5685
+ }
5686
+
5646
5687
  declare class MergedComponentTopologyView extends BaseSolver {
5647
5688
  private readonly topologyPlanningSolver;
5648
5689
  constructor(topologyPlanningSolver: MultiGraphTopologyPlannerSolver);
@@ -5659,6 +5700,7 @@ interface CapacityMeshSolverOptions$2 {
5659
5700
  maxNodeDimension?: number;
5660
5701
  maxNodeRatio?: number;
5661
5702
  minNodeArea?: number;
5703
+ visualizationTraceColorMode?: TraceColorMode;
5662
5704
  }
5663
5705
  type PipelineStep$2<T extends new (...args: any[]) => BaseSolver> = {
5664
5706
  solverName: string;
@@ -5675,6 +5717,7 @@ declare class AutoroutingPipelineSolver7_MultiGraph extends BaseSolver {
5675
5717
  netToPointPairsSolver?: NetToPointPairsSolver;
5676
5718
  componentTopologyGeneratorSolver?: MergedComponentTopologyView;
5677
5719
  topologyPlanningSolver?: MultiGraphTopologyPlannerSolver;
5720
+ topologyMergingSolver?: TopologyMergingSolver;
5678
5721
  globalTopologyGeneratorSolver?: RectDiffPipeline;
5679
5722
  nodeDimensionSubdivisionSolver?: NodeDimensionSubdivisionSolver;
5680
5723
  nodeTargetMerger?: CapacityNodeTargetMerger;
@@ -5703,6 +5746,7 @@ declare class AutoroutingPipelineSolver7_MultiGraph extends BaseSolver {
5703
5746
  maxNodeDimension: number;
5704
5747
  maxNodeRatio: number;
5705
5748
  minNodeArea: number;
5749
+ visualizationTraceColorMode: TraceColorMode;
5706
5750
  startTimeOfPhase: Record<string, number>;
5707
5751
  endTimeOfPhase: Record<string, number>;
5708
5752
  timeSpentOnPhase: Record<string, number>;
@@ -5717,7 +5761,7 @@ declare class AutoroutingPipelineSolver7_MultiGraph extends BaseSolver {
5717
5761
  sharedEdgeSegmentsWithNecessaryCrampedPortPoints?: SharedEdgeSegment[];
5718
5762
  highDensityNodePortPoints?: NodeWithPortPoints[];
5719
5763
  cacheProvider: CacheProvider | null;
5720
- pipelineDef: (PipelineStep$2<typeof PreprocessSimpleRouteJsonSolver$1> | PipelineStep$2<typeof ComponentDetectionSolver> | PipelineStep$2<typeof EscapeViaLocationSolver> | PipelineStep$2<typeof NetToPointPairsSolver2_OffBoardConnection> | PipelineStep$2<typeof MultiGraphTopologyPlannerSolver> | PipelineStep$2<typeof NodeDimensionSubdivisionSolver> | PipelineStep$2<typeof CapacityMeshEdgeSolver2_NodeTreeOptimization> | PipelineStep$2<typeof AvailableSegmentPointSolver> | PipelineStep$2<typeof MultiTargetNecessaryCrampedPortPointSolver> | PipelineStep$2<typeof TinyHypergraphPortPointPathingSolver> | PipelineStep$2<typeof UniformPortDistributionSolver> | PipelineStep$2<typeof HighDensitySolver> | PipelineStep$2<typeof HighDensityForceImproveSolver> | PipelineStep$2<typeof Pipeline4HighDensityRepairSolver> | PipelineStep$2<typeof MultipleHighDensityRouteStitchSolver3> | PipelineStep$2<typeof TraceSimplificationSolver> | PipelineStep$2<typeof TraceWidthSolver> | PipelineStep$2<typeof GlobalDrcForceImproveSolver>)[];
5764
+ pipelineDef: (PipelineStep$2<typeof PreprocessSimpleRouteJsonSolver$1> | PipelineStep$2<typeof ComponentDetectionSolver> | PipelineStep$2<typeof EscapeViaLocationSolver> | PipelineStep$2<typeof NetToPointPairsSolver2_OffBoardConnection> | PipelineStep$2<typeof MultiGraphTopologyPlannerSolver> | PipelineStep$2<typeof TopologyMergingSolver> | PipelineStep$2<typeof NodeDimensionSubdivisionSolver> | PipelineStep$2<typeof CapacityMeshEdgeSolver2_NodeTreeOptimization> | PipelineStep$2<typeof AvailableSegmentPointSolver> | PipelineStep$2<typeof MultiTargetNecessaryCrampedPortPointSolver> | PipelineStep$2<typeof TinyHypergraphPortPointPathingSolver> | PipelineStep$2<typeof UniformPortDistributionSolver> | PipelineStep$2<typeof HighDensitySolver> | PipelineStep$2<typeof HighDensityForceImproveSolver> | PipelineStep$2<typeof Pipeline4HighDensityRepairSolver> | PipelineStep$2<typeof MultipleHighDensityRouteStitchSolver3> | PipelineStep$2<typeof TraceSimplificationSolver> | PipelineStep$2<typeof TraceWidthSolver> | PipelineStep$2<typeof GlobalDrcForceImproveSolver>)[];
5721
5765
  constructor(srj: SimpleRouteJson, opts?: CapacityMeshSolverOptions$2);
5722
5766
  private setSimpleRouteJson;
5723
5767
  getConstructorParams(): readonly [SimpleRouteJson, CapacityMeshSolverOptions$2];
@@ -5726,6 +5770,10 @@ declare class AutoroutingPipelineSolver7_MultiGraph extends BaseSolver {
5726
5770
  solveUntilPhase(phase: string): void;
5727
5771
  getCurrentPhase(): string;
5728
5772
  visualize(): GraphicsObject;
5773
+ visualizeStage(stageSolver: {
5774
+ visualize: () => GraphicsObject;
5775
+ }): GraphicsObject;
5776
+ visualizeFinalOutput(): GraphicsObject;
5729
5777
  preview(): GraphicsObject;
5730
5778
  _getOutputHdRoutes(): HighDensityRoute$1[];
5731
5779
  getOutputSimplifiedPcbTraces(): SimplifiedPcbTraces;
@@ -6450,13 +6498,6 @@ declare class AssignableAutoroutingPipeline1Solver extends BaseSolver {
6450
6498
  getOutputSimpleRouteJson(): SimpleRouteJson;
6451
6499
  }
6452
6500
 
6453
- declare const convertSrjToGraphicsObject: (srj: SimpleRouteJson) => {
6454
- rects: Rect[];
6455
- circles: Circle[];
6456
- lines: Line[];
6457
- points: Point$5[];
6458
- };
6459
-
6460
6501
  type RerouteRectRegion = {
6461
6502
  shape: "rect";
6462
6503
  minX: number;
@@ -6889,4 +6930,4 @@ declare class IntraNodeSolverWithJumpers extends BaseSolver {
6889
6930
  visualize(): GraphicsObject;
6890
6931
  }
6891
6932
 
6892
- 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, CurvyIntraNodeSolver, GrowShrinkHighDensityIntraNodeSolver, type HighDensityIntraNodeRouteWithJumpers, JumperHighDensitySolver as HighDensitySolver, HyperSingleIntraNodeSolver, InMemoryCache, IntraNodeSolverWithJumpers, type Jumper, LocalStorageCache, PolyHighDensitySolver, PolySingleIntraNodeSolver as PolyIntraNodeSolver, PolySingleIntraNodeSolver, ProjectHighDensityToPolygonSolver, type RerouteRectRegion, SingleHighDensityRouteWithJumpersSolver, calculateOptimalCapacityDepth, convertSrjToGraphicsObject, getGlobalInMemoryCache, getGlobalLocalStorageCache, getRerouteSimpleRouteJson, getTunedTotalCapacity1, reconnectReroutedSimpleRouteJsonRegion, setupGlobalCaches };
6933
+ 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, ProjectHighDensityToPolygonSolver, type RerouteRectRegion, SingleHighDensityRouteWithJumpersSolver, type TraceColorMode, calculateOptimalCapacityDepth, convertSrjToGraphicsObject, getGlobalInMemoryCache, getGlobalLocalStorageCache, getRerouteSimpleRouteJson, getTunedTotalCapacity1, reconnectReroutedSimpleRouteJsonRegion, setupGlobalCaches };