@tscircuit/capacity-autorouter 0.0.32 → 0.0.34

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
@@ -216,6 +216,7 @@ declare class CapacityMeshNodeSolver2_NodeUnderObstacle extends CapacityMeshNode
216
216
  srj: SimpleRouteJson;
217
217
  opts: CapacityMeshNodeSolverOptions;
218
218
  VIA_DIAMETER: number;
219
+ OBSTACLE_MARGIN: number;
219
220
  constructor(srj: SimpleRouteJson, opts?: CapacityMeshNodeSolverOptions);
220
221
  isNodeCompletelyOutsideBounds(node: CapacityMeshNode): boolean;
221
222
  isNodePartiallyOutsideBounds(node: CapacityMeshNode): boolean;
@@ -644,7 +645,83 @@ declare class HyperParameterSupervisorSolver<T extends BaseSolver> extends BaseS
644
645
  visualize(): GraphicsObject;
645
646
  }
646
647
 
647
- declare class HyperSingleIntraNodeSolver extends HyperParameterSupervisorSolver<IntraNodeRouteSolver> {
648
+ type Point$1 = {
649
+ x: number;
650
+ y: number;
651
+ z?: number;
652
+ };
653
+ type Route = {
654
+ startPort: Point$1;
655
+ endPort: Point$1;
656
+ connectionName: string;
657
+ };
658
+ declare class TwoCrossingRoutesHighDensitySolver extends BaseSolver {
659
+ nodeWithPortPoints: NodeWithPortPoints;
660
+ routes: Route[];
661
+ viaDiameter: number;
662
+ traceThickness: number;
663
+ obstacleMargin: number;
664
+ layerCount: number;
665
+ debugViaPositions: {
666
+ via1: Point$1;
667
+ via2: Point$1;
668
+ }[];
669
+ solvedRoutes: HighDensityIntraNodeRoute[];
670
+ bounds: {
671
+ minX: number;
672
+ maxX: number;
673
+ minY: number;
674
+ maxY: number;
675
+ };
676
+ constructor(params: {
677
+ nodeWithPortPoints: NodeWithPortPoints;
678
+ viaDiameter?: number;
679
+ traceThickness?: number;
680
+ obstacleMargin?: number;
681
+ layerCount?: number;
682
+ });
683
+ /**
684
+ * Extract routes that need to be connected from the node data
685
+ */
686
+ private extractRoutesFromNode;
687
+ /**
688
+ * Calculate the bounding box of the node
689
+ */
690
+ private calculateBounds;
691
+ /**
692
+ * Check if two routes are crossing
693
+ */
694
+ private doRoutesCross;
695
+ private calculateViaPositions;
696
+ /**
697
+ * Create a route with properly placed vias
698
+ */
699
+ private createRoute;
700
+ /**
701
+ * Try to solve with routeA going over and routeB staying on layer 0
702
+ */
703
+ private trySolveAOverB;
704
+ private optimizeViaPositions;
705
+ /**
706
+ * Calculate the orthogonal route points for the second route
707
+ */
708
+ private calculateConservativeOrthogonalRoutePoints;
709
+ private calculateShortestOrthogonalRoutePoints;
710
+ /**
711
+ * Main step method that attempts to solve the two crossing routes
712
+ */
713
+ _step(): void;
714
+ /**
715
+ * Visualization for debugging
716
+ */
717
+ visualize(): GraphicsObject;
718
+ /**
719
+ * Get the solved routes
720
+ */
721
+ getSolvedRoutes(): HighDensityIntraNodeRoute[];
722
+ }
723
+
724
+ declare class HyperSingleIntraNodeSolver extends HyperParameterSupervisorSolver<IntraNodeRouteSolver | TwoCrossingRoutesHighDensitySolver> {
648
725
  constructorParams: ConstructorParameters<typeof IntraNodeRouteSolver>[0];
649
726
  solvedRoutes: HighDensityIntraNodeRoute[];
650
727
  nodeWithPortPoints: NodeWithPortPoints;
@@ -686,6 +763,11 @@ declare class HyperSingleIntraNodeSolver extends HyperParameterSupervisorSolver<
686
763
  CELL_SIZE_FACTOR: number;
687
764
  VIA_PENALTY_FACTOR_2: number;
688
765
  }[];
766
+ } | {
767
+ name: string;
768
+ possibleValues: {
769
+ CLOSED_FORM_TWO_TRACE_SAME_LAYER: boolean;
770
+ }[];
689
771
  })[];
690
772
  computeG(solver: IntraNodeRouteSolver): number;
691
773
  computeH(solver: IntraNodeRouteSolver): number;
@@ -905,6 +987,7 @@ declare class SingleHighDensityRouteStitchSolver extends BaseSolver {
905
987
  z: number;
906
988
  };
907
989
  constructor(opts: {
990
+ connectionName?: string;
908
991
  hdRoutes: HighDensityIntraNodeRoute[];
909
992
  start: {
910
993
  x: number;