@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.
- package/dist/index.d.ts +129 -102
- package/dist/index.js +644 -237
- 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.
|
|
655
|
+
diameter: 0.3,
|
|
656
656
|
position: {
|
|
657
|
-
x:
|
|
658
|
-
y: 0.
|
|
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.
|
|
663
|
+
diameter: 0.3,
|
|
664
664
|
position: {
|
|
665
|
-
x: -0.
|
|
666
|
-
y:
|
|
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.
|
|
673
|
+
diameter: 0.3,
|
|
674
674
|
position: {
|
|
675
|
-
x: -
|
|
676
|
-
y: -
|
|
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.
|
|
681
|
+
diameter: 0.3,
|
|
682
682
|
position: {
|
|
683
|
-
x:
|
|
684
|
-
y:
|
|
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.
|
|
691
|
+
diameter: 0.3,
|
|
692
692
|
position: {
|
|
693
|
-
x: -0.
|
|
694
|
-
y:
|
|
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.
|
|
699
|
+
diameter: 0.3,
|
|
700
700
|
position: {
|
|
701
|
-
x: -
|
|
702
|
-
y: 0.
|
|
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.
|
|
707
|
+
diameter: 0.3,
|
|
708
708
|
position: {
|
|
709
|
-
x:
|
|
710
|
-
y: -
|
|
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.
|
|
717
|
+
diameter: 0.3,
|
|
718
718
|
position: {
|
|
719
|
-
x: 0.
|
|
720
|
-
y: -0.
|
|
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.
|
|
725
|
+
diameter: 0.3,
|
|
726
726
|
position: {
|
|
727
|
-
x: 0.
|
|
728
|
-
y:
|
|
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.
|
|
733
|
+
diameter: 0.3,
|
|
734
734
|
position: {
|
|
735
|
-
x: -
|
|
736
|
-
y: -0.
|
|
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:
|
|
750
|
-
y: 0.
|
|
749
|
+
x: 0.815244,
|
|
750
|
+
y: -0.055081
|
|
751
751
|
},
|
|
752
752
|
{
|
|
753
|
-
x: 1.
|
|
754
|
-
y: -0.
|
|
753
|
+
x: 1.01282,
|
|
754
|
+
y: -0.252657
|
|
755
755
|
},
|
|
756
756
|
{
|
|
757
|
-
x:
|
|
758
|
-
y: -
|
|
757
|
+
x: 1.01282,
|
|
758
|
+
y: -0.563283
|
|
759
759
|
},
|
|
760
760
|
{
|
|
761
|
-
x:
|
|
762
|
-
y: -1.
|
|
761
|
+
x: 0.444829,
|
|
762
|
+
y: -1.131274
|
|
763
763
|
},
|
|
764
764
|
{
|
|
765
|
-
x: -0.
|
|
766
|
-
y: -1.
|
|
765
|
+
x: -0.093033,
|
|
766
|
+
y: -1.131274
|
|
767
767
|
},
|
|
768
768
|
{
|
|
769
|
-
x: -0.
|
|
770
|
-
y: 0.
|
|
769
|
+
x: -0.382222,
|
|
770
|
+
y: -0.842085
|
|
771
771
|
},
|
|
772
772
|
{
|
|
773
|
-
x: -0.
|
|
774
|
-
y: 0.
|
|
773
|
+
x: -0.382222,
|
|
774
|
+
y: 0.433097
|
|
775
775
|
},
|
|
776
776
|
{
|
|
777
|
-
x: -0.
|
|
778
|
-
y:
|
|
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: -
|
|
790
|
-
y: -
|
|
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:
|
|
794
|
-
y: -1.
|
|
805
|
+
x: 0.590217,
|
|
806
|
+
y: -1.482274
|
|
795
807
|
},
|
|
796
808
|
{
|
|
797
|
-
x:
|
|
798
|
-
y: -
|
|
809
|
+
x: 1.36382,
|
|
810
|
+
y: -0.708672
|
|
799
811
|
},
|
|
800
812
|
{
|
|
801
|
-
x: 1.
|
|
802
|
-
y: -
|
|
813
|
+
x: 1.36382,
|
|
814
|
+
y: -1202e-6
|
|
803
815
|
},
|
|
804
816
|
{
|
|
805
|
-
x:
|
|
806
|
-
y: 0.
|
|
817
|
+
x: 0.92513,
|
|
818
|
+
y: 0.437488
|
|
807
819
|
},
|
|
808
820
|
{
|
|
809
|
-
x:
|
|
810
|
-
y:
|
|
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.
|
|
822
|
-
y:
|
|
833
|
+
x: -0.029,
|
|
834
|
+
y: 0.691542
|
|
823
835
|
},
|
|
824
836
|
{
|
|
825
|
-
x: -0.
|
|
826
|
-
y:
|
|
837
|
+
x: -0.029,
|
|
838
|
+
y: -0.592852
|
|
827
839
|
},
|
|
828
840
|
{
|
|
829
|
-
x:
|
|
830
|
-
y: -
|
|
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.
|
|
842
|
-
y:
|
|
853
|
+
x: -0.029,
|
|
854
|
+
y: 0.691542
|
|
843
855
|
},
|
|
844
856
|
{
|
|
845
|
-
x: -0.
|
|
846
|
-
y:
|
|
857
|
+
x: -0.029,
|
|
858
|
+
y: 0.778747
|
|
847
859
|
},
|
|
848
860
|
{
|
|
849
|
-
x: -
|
|
850
|
-
y: 1.
|
|
861
|
+
x: -0.352308,
|
|
862
|
+
y: 1.102055
|
|
851
863
|
},
|
|
852
864
|
{
|
|
853
|
-
x: -
|
|
854
|
-
y: 1.
|
|
865
|
+
x: -0.705218,
|
|
866
|
+
y: 1.102055
|
|
855
867
|
},
|
|
856
868
|
{
|
|
857
|
-
x: -
|
|
858
|
-
y: 0.
|
|
869
|
+
x: -0.954763,
|
|
870
|
+
y: 0.85251
|
|
859
871
|
},
|
|
860
872
|
{
|
|
861
|
-
x: -
|
|
862
|
-
y: 0.
|
|
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.
|
|
874
|
-
y: -0.
|
|
889
|
+
x: 0.517145,
|
|
890
|
+
y: -0.456503
|
|
875
891
|
},
|
|
876
892
|
{
|
|
877
|
-
x: 0.
|
|
878
|
-
y:
|
|
893
|
+
x: 0.389244,
|
|
894
|
+
y: -0.328602
|
|
879
895
|
},
|
|
880
896
|
{
|
|
881
|
-
x: 0.
|
|
882
|
-
y:
|
|
897
|
+
x: 0.389244,
|
|
898
|
+
y: 0.610646
|
|
883
899
|
},
|
|
884
900
|
{
|
|
885
|
-
x: 0.
|
|
886
|
-
y:
|
|
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.
|
|
898
|
-
y:
|
|
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.
|
|
902
|
-
y: 1.
|
|
925
|
+
x: -0.850606,
|
|
926
|
+
y: 1.453055
|
|
903
927
|
},
|
|
904
928
|
{
|
|
905
|
-
x: -1.
|
|
906
|
-
y:
|
|
929
|
+
x: -1.305763,
|
|
930
|
+
y: 0.997899
|
|
907
931
|
},
|
|
908
932
|
{
|
|
909
|
-
x: -1.
|
|
910
|
-
y:
|
|
933
|
+
x: -1.305763,
|
|
934
|
+
y: 0.151728
|
|
911
935
|
},
|
|
912
936
|
{
|
|
913
|
-
x: -
|
|
914
|
-
y: 0.
|
|
937
|
+
x: -0.926917,
|
|
938
|
+
y: -0.227118
|
|
915
939
|
},
|
|
916
940
|
{
|
|
917
|
-
x: -
|
|
918
|
-
y: -0.
|
|
941
|
+
x: -0.833162,
|
|
942
|
+
y: -0.227118
|
|
919
943
|
}
|
|
920
944
|
]
|
|
921
945
|
}
|
|
922
946
|
];
|
|
923
|
-
var tileWidth =
|
|
924
|
-
var tileHeight =
|
|
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
|
-
*
|
|
1085
|
-
*
|
|
1086
|
-
*
|
|
1087
|
-
*
|
|
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;
|