@tscircuit/hypergraph 0.0.44 → 0.0.46

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.
Files changed (3) hide show
  1. package/dist/index.d.ts +129 -102
  2. package/dist/index.js +644 -237
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -652,88 +652,88 @@ var viasByNet = {
652
652
  net1: [
653
653
  {
654
654
  viaId: "14ee4bf1-e7e7-4351-ad16-ba1a8aac0af3",
655
- diameter: 0.6,
655
+ diameter: 0.3,
656
656
  position: {
657
- x: 1.187494,
658
- y: 0.226901
657
+ x: 0.815244,
658
+ y: -0.055081
659
659
  }
660
660
  },
661
661
  {
662
662
  viaId: "8a898812-db2b-4b81-899d-f953b3222f9a",
663
- diameter: 0.6,
663
+ diameter: 0.3,
664
664
  position: {
665
- x: -0.890462,
666
- y: 1.024371
665
+ x: -0.528763,
666
+ y: 0.676055
667
667
  }
668
668
  }
669
669
  ],
670
670
  net3: [
671
671
  {
672
672
  viaId: "13cd75da-d582-4eed-bc2c-fee6fa78bc6a",
673
- diameter: 0.6,
673
+ diameter: 0.3,
674
674
  position: {
675
- x: -1.229928,
676
- y: -1.159683
675
+ x: -0.808222,
676
+ y: -0.726499
677
677
  }
678
678
  },
679
679
  {
680
680
  viaId: "9f188f9d-bce8-46c7-b9e8-542b8599d48d",
681
- diameter: 0.6,
681
+ diameter: 0.3,
682
682
  position: {
683
- x: 1.364053,
684
- y: 1.083575
683
+ x: 0.901143,
684
+ y: 0.437488
685
685
  }
686
686
  }
687
687
  ],
688
688
  net4: [
689
689
  {
690
690
  viaId: "2ef3b96b-58c4-4150-b5d1-e90f74b92b25",
691
- diameter: 0.6,
691
+ diameter: 0.3,
692
692
  position: {
693
- x: -0.134894,
694
- y: 1.042149
693
+ x: -0.029,
694
+ y: 0.691542
695
695
  }
696
696
  },
697
697
  {
698
698
  viaId: "37a70467-7553-415f-8ad7-8b88a5e56ca8",
699
- diameter: 0.6,
699
+ diameter: 0.3,
700
700
  position: {
701
- x: -1.195947,
702
- y: 0.339403
701
+ x: -0.824388,
702
+ y: 0.272808
703
703
  }
704
704
  },
705
705
  {
706
706
  viaId: "6d182b7d-a260-427b-8c43-a09409422252",
707
- diameter: 0.6,
707
+ diameter: 0.3,
708
708
  position: {
709
- x: -0.141929,
710
- y: -1.050896
709
+ x: 0.083422,
710
+ y: -0.705274
711
711
  }
712
712
  }
713
713
  ],
714
714
  net5: [
715
715
  {
716
716
  viaId: "346c301a-f2b4-44d7-b975-5438ddaa0bde",
717
- diameter: 0.6,
717
+ diameter: 0.3,
718
718
  position: {
719
- x: 0.587494,
720
- y: -0.438741
719
+ x: 0.517145,
720
+ y: -0.456503
721
721
  }
722
722
  },
723
723
  {
724
724
  viaId: "c54b4b94-90e0-4240-97ef-883cf097d79d",
725
- diameter: 0.6,
725
+ diameter: 0.3,
726
726
  position: {
727
- x: 0.614052,
728
- y: 1.081959
727
+ x: 0.471002,
728
+ y: 0.692404
729
729
  }
730
730
  },
731
731
  {
732
732
  viaId: "f3cb916e-b0fd-4c5e-b14b-3779f4f9bd01",
733
- diameter: 0.6,
733
+ diameter: 0.3,
734
734
  position: {
735
- x: -1.192929,
736
- y: -0.410594
735
+ x: -0.833162,
736
+ y: -0.227118
737
737
  }
738
738
  }
739
739
  ]
@@ -746,36 +746,40 @@ var routeSegments = [
746
746
  layer: "bottom",
747
747
  segments: [
748
748
  {
749
- x: 1.187494,
750
- y: 0.226901
749
+ x: 0.815244,
750
+ y: -0.055081
751
751
  },
752
752
  {
753
- x: 1.187494,
754
- y: -0.582618
753
+ x: 1.01282,
754
+ y: -0.252657
755
755
  },
756
756
  {
757
- x: 0.193216,
758
- y: -1.576896
757
+ x: 1.01282,
758
+ y: -0.563283
759
759
  },
760
760
  {
761
- x: -0.359806,
762
- y: -1.576896
761
+ x: 0.444829,
762
+ y: -1.131274
763
763
  },
764
764
  {
765
- x: -0.667929,
766
- y: -1.268773
765
+ x: -0.093033,
766
+ y: -1.131274
767
767
  },
768
768
  {
769
- x: -0.667929,
770
- y: 0.561982
769
+ x: -0.382222,
770
+ y: -0.842085
771
771
  },
772
772
  {
773
- x: -0.890462,
774
- y: 0.784515
773
+ x: -0.382222,
774
+ y: 0.433097
775
775
  },
776
776
  {
777
- x: -0.890462,
778
- y: 1.024371
777
+ x: -0.528763,
778
+ y: 0.579638
779
+ },
780
+ {
781
+ x: -0.528763,
782
+ y: 0.676055
779
783
  }
780
784
  ]
781
785
  },
@@ -786,28 +790,36 @@ var routeSegments = [
786
790
  layer: "bottom",
787
791
  segments: [
788
792
  {
789
- x: -1.229928,
790
- y: -1.159683
793
+ x: -0.808222,
794
+ y: -0.726499
795
+ },
796
+ {
797
+ x: -0.808222,
798
+ y: -0.912474
799
+ },
800
+ {
801
+ x: -0.238422,
802
+ y: -1.482274
791
803
  },
792
804
  {
793
- x: -0.511715,
794
- y: -1.877896
805
+ x: 0.590217,
806
+ y: -1.482274
795
807
  },
796
808
  {
797
- x: 0.317894,
798
- y: -1.877896
809
+ x: 1.36382,
810
+ y: -0.708672
799
811
  },
800
812
  {
801
- x: 1.713494,
802
- y: -0.482296
813
+ x: 1.36382,
814
+ y: -1202e-6
803
815
  },
804
816
  {
805
- x: 1.713494,
806
- y: 0.734134
817
+ x: 0.92513,
818
+ y: 0.437488
807
819
  },
808
820
  {
809
- x: 1.364053,
810
- y: 1.083575
821
+ x: 0.901143,
822
+ y: 0.437488
811
823
  }
812
824
  ]
813
825
  },
@@ -818,16 +830,16 @@ var routeSegments = [
818
830
  layer: "bottom",
819
831
  segments: [
820
832
  {
821
- x: -0.134894,
822
- y: 1.042149
833
+ x: -0.029,
834
+ y: 0.691542
823
835
  },
824
836
  {
825
- x: -0.141929,
826
- y: 1.035114
837
+ x: -0.029,
838
+ y: -0.592852
827
839
  },
828
840
  {
829
- x: -0.141929,
830
- y: -1.050896
841
+ x: 0.083422,
842
+ y: -0.705274
831
843
  }
832
844
  ]
833
845
  },
@@ -838,28 +850,32 @@ var routeSegments = [
838
850
  layer: "bottom",
839
851
  segments: [
840
852
  {
841
- x: -0.134894,
842
- y: 1.042149
853
+ x: -0.029,
854
+ y: 0.691542
843
855
  },
844
856
  {
845
- x: -0.643116,
846
- y: 1.550371
857
+ x: -0.029,
858
+ y: 0.778747
847
859
  },
848
860
  {
849
- x: -1.108339,
850
- y: 1.550371
861
+ x: -0.352308,
862
+ y: 1.102055
851
863
  },
852
864
  {
853
- x: -1.416462,
854
- y: 1.242248
865
+ x: -0.705218,
866
+ y: 1.102055
855
867
  },
856
868
  {
857
- x: -1.416462,
858
- y: 0.559918
869
+ x: -0.954763,
870
+ y: 0.85251
859
871
  },
860
872
  {
861
- x: -1.195947,
862
- y: 0.339403
873
+ x: -0.954763,
874
+ y: 0.403183
875
+ },
876
+ {
877
+ x: -0.824388,
878
+ y: 0.272808
863
879
  }
864
880
  ]
865
881
  },
@@ -870,20 +886,20 @@ var routeSegments = [
870
886
  layer: "bottom",
871
887
  segments: [
872
888
  {
873
- x: 0.587494,
874
- y: -0.438741
889
+ x: 0.517145,
890
+ y: -0.456503
875
891
  },
876
892
  {
877
- x: 0.587494,
878
- y: 1.080547
893
+ x: 0.389244,
894
+ y: -0.328602
879
895
  },
880
896
  {
881
- x: 0.588906,
882
- y: 1.081959
897
+ x: 0.389244,
898
+ y: 0.610646
883
899
  },
884
900
  {
885
- x: 0.614052,
886
- y: 1.081959
901
+ x: 0.471002,
902
+ y: 0.692404
887
903
  }
888
904
  ]
889
905
  },
@@ -894,34 +910,42 @@ var routeSegments = [
894
910
  layer: "bottom",
895
911
  segments: [
896
912
  {
897
- x: 0.614052,
898
- y: 1.081959
913
+ x: 0.471002,
914
+ y: 0.692404
915
+ },
916
+ {
917
+ x: 0.471002,
918
+ y: 1.111132
919
+ },
920
+ {
921
+ x: 0.129079,
922
+ y: 1.453055
899
923
  },
900
924
  {
901
- x: -0.15536,
902
- y: 1.851371
925
+ x: -0.850606,
926
+ y: 1.453055
903
927
  },
904
928
  {
905
- x: -1.233017,
906
- y: 1.851371
929
+ x: -1.305763,
930
+ y: 0.997899
907
931
  },
908
932
  {
909
- x: -1.721947,
910
- y: 1.362441
933
+ x: -1.305763,
934
+ y: 0.151728
911
935
  },
912
936
  {
913
- x: -1.721947,
914
- y: 0.118424
937
+ x: -0.926917,
938
+ y: -0.227118
915
939
  },
916
940
  {
917
- x: -1.192929,
918
- y: -0.410594
941
+ x: -0.833162,
942
+ y: -0.227118
919
943
  }
920
944
  ]
921
945
  }
922
946
  ];
923
- var tileWidth = 3.735441;
924
- var tileHeight = 4.029267;
947
+ var tileWidth = 2.9695829999999996;
948
+ var tileHeight = 3.2353289999999997;
925
949
  var viaTile4Regions = {
926
950
  viasByNet: viasByNet,
927
951
  routeSegments: routeSegments,
@@ -1081,10 +1105,13 @@ type Bounds = {
1081
1105
  /**
1082
1106
  * Generates a via topology using convex regions computed by ConvexRegionsSolver.
1083
1107
  *
1084
- * 1. Via tiles are placed on a grid (5mm tiles by default)
1085
- * 2. Per-net via region polygons are created within each tile
1086
- * 3. Convex regions are computed globally with via region polygons as obstacles
1087
- * 4. Ports are created between adjacent convex regions and between convex/via regions
1108
+ * New tiled approach:
1109
+ * 1. Compute convex regions for a single unit tile (centered at origin)
1110
+ * 2. Replicate the tile's regions across the grid by translation
1111
+ * 3. Create rectangular filler regions for outer areas:
1112
+ * - Top/bottom regions extend horizontally across full bounds width
1113
+ * - Left/right regions extend vertically between top/bottom regions
1114
+ * 4. Create ports between adjacent tiles and between tiles and filler regions
1088
1115
  */
1089
1116
  declare function generateConvexViaTopologyRegions(opts: {
1090
1117
  viaTile: ViaTile;