@tscircuit/capacity-autorouter 0.0.196 → 0.0.198

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
@@ -12,6 +12,8 @@ Want to understand how the autorouter works? Check out a stage-by-stage breakdow
12
12
  2. Run `bun run bug-report <bug-report-url>` to download the report and create a debugging fixture file in the `examples/bug-reports` directory, you can then find the bug report in the server (via `bun run start`)
13
13
  3. Or run `bun run bug-report-with-test <bug-report-url>` to download the report, create the fixture, and scaffold a matching snapshot test under `tests/bugs`
14
14
 
15
+ Or [run the Create Bug Report workflow](https://github.com/tscircuit/capacity-autorouter/actions/workflows/create-bug-report.yml) to automatically create a PR with the bug report (maintainers only)
16
+
15
17
  ## Installation
16
18
 
17
19
  ```bash
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as graphics_debug from 'graphics-debug';
2
- import { GraphicsObject, Rect, Circle, Line, Point as Point$3 } from 'graphics-debug';
2
+ import { GraphicsObject, Rect, Circle, Line, Point as Point$5 } from 'graphics-debug';
3
3
  import { ConnectivityMap } from 'circuit-json-to-connectivity-map';
4
4
  import { RectDiffPipeline } from '@tscircuit/rectdiff';
5
5
  import { ConnectivityMap as ConnectivityMap$1 } from 'connectivity-map';
@@ -530,26 +530,26 @@ declare class HyperParameterSupervisorSolver<T extends BaseSolver> extends BaseS
530
530
  visualize(): GraphicsObject;
531
531
  }
532
532
 
533
- type Point$2 = {
533
+ type Point$4 = {
534
534
  x: number;
535
535
  y: number;
536
536
  z?: number;
537
537
  };
538
- type Route = {
539
- startPort: Point$2;
540
- endPort: Point$2;
538
+ type Route$2 = {
539
+ startPort: Point$4;
540
+ endPort: Point$4;
541
541
  connectionName: string;
542
542
  };
543
543
  declare class TwoCrossingRoutesHighDensitySolver extends BaseSolver {
544
544
  nodeWithPortPoints: NodeWithPortPoints;
545
- routes: Route[];
545
+ routes: Route$2[];
546
546
  viaDiameter: number;
547
547
  traceThickness: number;
548
548
  obstacleMargin: number;
549
549
  layerCount: number;
550
550
  debugViaPositions: {
551
- via1: Point$2;
552
- via2: Point$2;
551
+ via1: Point$4;
552
+ via2: Point$4;
553
553
  }[];
554
554
  escapeLayer: number;
555
555
  solvedRoutes: HighDensityIntraNodeRoute$1[];
@@ -601,7 +601,116 @@ declare class TwoCrossingRoutesHighDensitySolver extends BaseSolver {
601
601
  getSolvedRoutes(): HighDensityIntraNodeRoute$1[];
602
602
  }
603
603
 
604
- declare class HyperSingleIntraNodeSolver extends HyperParameterSupervisorSolver<IntraNodeRouteSolver | TwoCrossingRoutesHighDensitySolver> {
604
+ type Point$3 = {
605
+ x: number;
606
+ y: number;
607
+ z?: number;
608
+ };
609
+ type Route$1 = {
610
+ A: Point$3;
611
+ B: Point$3;
612
+ connectionName: string;
613
+ };
614
+ declare class SingleTransitionCrossingRouteSolver extends BaseSolver {
615
+ nodeWithPortPoints: NodeWithPortPoints;
616
+ routes: Route$1[];
617
+ viaDiameter: number;
618
+ traceThickness: number;
619
+ obstacleMargin: number;
620
+ layerCount: number;
621
+ debugViaPositions: {
622
+ via: Point$3;
623
+ }[];
624
+ solvedRoutes: HighDensityIntraNodeRoute$1[];
625
+ bounds: {
626
+ minX: number;
627
+ maxX: number;
628
+ minY: number;
629
+ maxY: number;
630
+ };
631
+ constructor(params: {
632
+ nodeWithPortPoints: NodeWithPortPoints;
633
+ viaDiameter?: number;
634
+ traceThickness?: number;
635
+ obstacleMargin?: number;
636
+ layerCount?: number;
637
+ });
638
+ /**
639
+ * Extract routes that need to be connected from the node data
640
+ */
641
+ private extractRoutesFromNode;
642
+ /**
643
+ * Calculate the bounding box of the node
644
+ */
645
+ private calculateBounds;
646
+ /**
647
+ * Check if two routes are crossing
648
+ */
649
+ private doRoutesCross;
650
+ private calculateViaPosition;
651
+ /**
652
+ * Create a single transition route with properly placed via
653
+ */
654
+ private createTransitionRoute;
655
+ /**
656
+ * Create the non-transition route
657
+ */
658
+ private createFlatRoute;
659
+ /**
660
+ * Try to solve with one route having a transition and the other staying flat
661
+ */
662
+ private trySolve;
663
+ /**
664
+ * Main step method that attempts to solve the routes
665
+ */
666
+ _step(): void;
667
+ /**
668
+ * Visualization for debugging
669
+ */
670
+ visualize(): GraphicsObject;
671
+ /**
672
+ * Get the solved routes
673
+ */
674
+ getSolvedRoutes(): HighDensityIntraNodeRoute$1[];
675
+ }
676
+
677
+ type Point$2 = {
678
+ x: number;
679
+ y: number;
680
+ z?: number;
681
+ };
682
+ type Route = {
683
+ A: Point$2;
684
+ B: Point$2;
685
+ connectionName: string;
686
+ };
687
+ declare class SingleTransitionIntraNodeSolver extends BaseSolver {
688
+ nodeWithPortPoints: NodeWithPortPoints;
689
+ routes: Route[];
690
+ viaDiameter: number;
691
+ traceThickness: number;
692
+ obstacleMargin: number;
693
+ solvedRoutes: HighDensityIntraNodeRoute$1[];
694
+ bounds: {
695
+ minX: number;
696
+ maxX: number;
697
+ minY: number;
698
+ maxY: number;
699
+ };
700
+ constructor(params: {
701
+ nodeWithPortPoints: NodeWithPortPoints;
702
+ viaDiameter?: number;
703
+ traceThickness?: number;
704
+ obstacleMargin?: number;
705
+ });
706
+ private extractRoutesFromNode;
707
+ private calculateBounds;
708
+ private createTransitionRoute;
709
+ _step(): void;
710
+ visualize(): GraphicsObject;
711
+ }
712
+
713
+ declare class HyperSingleIntraNodeSolver extends HyperParameterSupervisorSolver<IntraNodeRouteSolver | TwoCrossingRoutesHighDensitySolver | SingleTransitionCrossingRouteSolver | SingleTransitionIntraNodeSolver> {
605
714
  constructorParams: ConstructorParameters<typeof CachedIntraNodeRouteSolver>[0];
606
715
  solvedRoutes: HighDensityIntraNodeRoute$1[];
607
716
  nodeWithPortPoints: NodeWithPortPoints;
@@ -653,6 +762,11 @@ declare class HyperSingleIntraNodeSolver extends HyperParameterSupervisorSolver<
653
762
  CLOSED_FORM_TWO_TRACE_TRANSITION_CROSSING: boolean;
654
763
  CLOSED_FORM_TWO_TRACE_SAME_LAYER?: undefined;
655
764
  })[];
765
+ } | {
766
+ name: string;
767
+ possibleValues: {
768
+ CLOSED_FORM_SINGLE_TRANSITION: boolean;
769
+ }[];
656
770
  } | {
657
771
  name: string;
658
772
  possibleValues: ({
@@ -3741,7 +3855,7 @@ declare const convertSrjToGraphicsObject: (srj: SimpleRouteJson) => {
3741
3855
  rects: Rect[];
3742
3856
  circles: Circle[];
3743
3857
  lines: Line[];
3744
- points: Point$3[];
3858
+ points: Point$5[];
3745
3859
  };
3746
3860
 
3747
3861
  export { AssignableAutoroutingPipeline1Solver, AssignableAutoroutingPipeline2, AutoroutingPipeline1_OriginalUnravel, AutoroutingPipelineSolver2_PortPointPathing as AutoroutingPipelineSolver, type AutoroutingPipelineSolverOptions, type CachableSolver, type CacheProvider, CapacityMeshSolver, InMemoryCache, LocalStorageCache, calculateOptimalCapacityDepth, convertSrjToGraphicsObject, getGlobalInMemoryCache, getGlobalLocalStorageCache, getTunedTotalCapacity1, setupGlobalCaches };