circuit-json 0.0.327 → 0.0.329
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 +15 -0
- package/dist/index.d.mts +64 -1
- package/dist/index.mjs +1161 -1148
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -690,80 +690,91 @@ var source_port = z38.object({
|
|
|
690
690
|
});
|
|
691
691
|
expectTypesMatch(true);
|
|
692
692
|
|
|
693
|
-
// src/source/
|
|
693
|
+
// src/source/source_component_internal_connection.ts
|
|
694
694
|
import { z as z39 } from "zod";
|
|
695
|
-
var
|
|
696
|
-
type: z39.literal("
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
subcircuit_id: z39.string().optional()
|
|
701
|
-
subcircuit_connectivity_map_key: z39.string().optional(),
|
|
702
|
-
max_length: z39.number().optional(),
|
|
703
|
-
min_trace_thickness: z39.number().optional(),
|
|
704
|
-
display_name: z39.string().optional()
|
|
695
|
+
var source_component_internal_connection = z39.object({
|
|
696
|
+
type: z39.literal("source_component_internal_connection"),
|
|
697
|
+
source_component_internal_connection_id: z39.string(),
|
|
698
|
+
source_component_id: z39.string(),
|
|
699
|
+
source_port_ids: z39.array(z39.string()),
|
|
700
|
+
subcircuit_id: z39.string().optional()
|
|
705
701
|
});
|
|
706
702
|
expectTypesMatch(true);
|
|
707
703
|
|
|
708
|
-
// src/source/
|
|
704
|
+
// src/source/source_trace.ts
|
|
709
705
|
import { z as z40 } from "zod";
|
|
710
|
-
var
|
|
711
|
-
type: z40.literal("
|
|
712
|
-
|
|
706
|
+
var source_trace = z40.object({
|
|
707
|
+
type: z40.literal("source_trace"),
|
|
708
|
+
source_trace_id: z40.string(),
|
|
709
|
+
connected_source_port_ids: z40.array(z40.string()),
|
|
710
|
+
connected_source_net_ids: z40.array(z40.string()),
|
|
713
711
|
subcircuit_id: z40.string().optional(),
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
name: z40.string().optional(),
|
|
719
|
-
was_automatically_named: z40.boolean().optional()
|
|
712
|
+
subcircuit_connectivity_map_key: z40.string().optional(),
|
|
713
|
+
max_length: z40.number().optional(),
|
|
714
|
+
min_trace_thickness: z40.number().optional(),
|
|
715
|
+
display_name: z40.string().optional()
|
|
720
716
|
});
|
|
721
717
|
expectTypesMatch(true);
|
|
722
718
|
|
|
723
|
-
// src/source/
|
|
719
|
+
// src/source/source_group.ts
|
|
724
720
|
import { z as z41 } from "zod";
|
|
725
|
-
var
|
|
726
|
-
type: z41.literal("
|
|
727
|
-
|
|
728
|
-
name: z41.string(),
|
|
729
|
-
member_source_group_ids: z41.array(z41.string()),
|
|
730
|
-
is_power: z41.boolean().optional(),
|
|
731
|
-
is_ground: z41.boolean().optional(),
|
|
732
|
-
is_digital_signal: z41.boolean().optional(),
|
|
733
|
-
is_analog_signal: z41.boolean().optional(),
|
|
734
|
-
is_positive_voltage_source: z41.boolean().optional(),
|
|
735
|
-
trace_width: z41.number().optional(),
|
|
721
|
+
var source_group = z41.object({
|
|
722
|
+
type: z41.literal("source_group"),
|
|
723
|
+
source_group_id: z41.string(),
|
|
736
724
|
subcircuit_id: z41.string().optional(),
|
|
737
|
-
|
|
725
|
+
parent_subcircuit_id: z41.string().optional(),
|
|
726
|
+
parent_source_group_id: z41.string().optional(),
|
|
727
|
+
is_subcircuit: z41.boolean().optional(),
|
|
728
|
+
show_as_schematic_box: z41.boolean().optional(),
|
|
729
|
+
name: z41.string().optional(),
|
|
730
|
+
was_automatically_named: z41.boolean().optional()
|
|
738
731
|
});
|
|
739
732
|
expectTypesMatch(true);
|
|
740
733
|
|
|
741
|
-
// src/source/
|
|
734
|
+
// src/source/source_net.ts
|
|
742
735
|
import { z as z42 } from "zod";
|
|
743
|
-
var
|
|
744
|
-
type: z42.literal("
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
736
|
+
var source_net = z42.object({
|
|
737
|
+
type: z42.literal("source_net"),
|
|
738
|
+
source_net_id: z42.string(),
|
|
739
|
+
name: z42.string(),
|
|
740
|
+
member_source_group_ids: z42.array(z42.string()),
|
|
741
|
+
is_power: z42.boolean().optional(),
|
|
742
|
+
is_ground: z42.boolean().optional(),
|
|
743
|
+
is_digital_signal: z42.boolean().optional(),
|
|
744
|
+
is_analog_signal: z42.boolean().optional(),
|
|
745
|
+
is_positive_voltage_source: z42.boolean().optional(),
|
|
746
|
+
trace_width: z42.number().optional(),
|
|
747
|
+
subcircuit_id: z42.string().optional(),
|
|
748
|
+
subcircuit_connectivity_map_key: z42.string().optional()
|
|
749
|
+
});
|
|
749
750
|
expectTypesMatch(true);
|
|
750
751
|
|
|
751
|
-
// src/source/
|
|
752
|
+
// src/source/source_board.ts
|
|
752
753
|
import { z as z43 } from "zod";
|
|
753
|
-
var
|
|
754
|
-
type: z43.literal("
|
|
755
|
-
|
|
754
|
+
var source_board = z43.object({
|
|
755
|
+
type: z43.literal("source_board"),
|
|
756
|
+
source_board_id: z43.string(),
|
|
756
757
|
source_group_id: z43.string(),
|
|
757
|
-
|
|
758
|
-
|
|
758
|
+
title: z43.string().optional()
|
|
759
|
+
}).describe("Defines a board in the source domain");
|
|
760
|
+
expectTypesMatch(true);
|
|
761
|
+
|
|
762
|
+
// src/source/source_pcb_ground_plane.ts
|
|
763
|
+
import { z as z44 } from "zod";
|
|
764
|
+
var source_pcb_ground_plane = z44.object({
|
|
765
|
+
type: z44.literal("source_pcb_ground_plane"),
|
|
766
|
+
source_pcb_ground_plane_id: z44.string(),
|
|
767
|
+
source_group_id: z44.string(),
|
|
768
|
+
source_net_id: z44.string(),
|
|
769
|
+
subcircuit_id: z44.string().optional()
|
|
759
770
|
}).describe("Defines a ground plane in the source domain");
|
|
760
771
|
expectTypesMatch(true);
|
|
761
772
|
|
|
762
773
|
// src/source/source_manually_placed_via.ts
|
|
763
|
-
import { z as
|
|
774
|
+
import { z as z46 } from "zod";
|
|
764
775
|
|
|
765
776
|
// src/pcb/properties/layer_ref.ts
|
|
766
|
-
import { z as
|
|
777
|
+
import { z as z45 } from "zod";
|
|
767
778
|
var all_layers = [
|
|
768
779
|
"top",
|
|
769
780
|
"bottom",
|
|
@@ -774,9 +785,9 @@ var all_layers = [
|
|
|
774
785
|
"inner5",
|
|
775
786
|
"inner6"
|
|
776
787
|
];
|
|
777
|
-
var layer_string =
|
|
788
|
+
var layer_string = z45.enum(all_layers);
|
|
778
789
|
var layer_ref = layer_string.or(
|
|
779
|
-
|
|
790
|
+
z45.object({
|
|
780
791
|
name: layer_string
|
|
781
792
|
})
|
|
782
793
|
).transform((layer) => {
|
|
@@ -786,253 +797,253 @@ var layer_ref = layer_string.or(
|
|
|
786
797
|
return layer.name;
|
|
787
798
|
});
|
|
788
799
|
expectTypesMatch(true);
|
|
789
|
-
var visible_layer =
|
|
800
|
+
var visible_layer = z45.enum(["top", "bottom"]);
|
|
790
801
|
|
|
791
802
|
// src/source/source_manually_placed_via.ts
|
|
792
|
-
var source_manually_placed_via =
|
|
793
|
-
type:
|
|
794
|
-
source_manually_placed_via_id:
|
|
795
|
-
source_group_id:
|
|
796
|
-
source_net_id:
|
|
797
|
-
subcircuit_id:
|
|
798
|
-
source_trace_id:
|
|
803
|
+
var source_manually_placed_via = z46.object({
|
|
804
|
+
type: z46.literal("source_manually_placed_via"),
|
|
805
|
+
source_manually_placed_via_id: z46.string(),
|
|
806
|
+
source_group_id: z46.string(),
|
|
807
|
+
source_net_id: z46.string(),
|
|
808
|
+
subcircuit_id: z46.string().optional(),
|
|
809
|
+
source_trace_id: z46.string().optional()
|
|
799
810
|
}).describe("Defines a via that is manually placed in the source domain");
|
|
800
811
|
expectTypesMatch(true);
|
|
801
812
|
|
|
802
813
|
// src/source/source_pin_must_be_connected_error.ts
|
|
803
|
-
import { z as
|
|
804
|
-
var source_pin_must_be_connected_error =
|
|
805
|
-
type:
|
|
814
|
+
import { z as z47 } from "zod";
|
|
815
|
+
var source_pin_must_be_connected_error = z47.object({
|
|
816
|
+
type: z47.literal("source_pin_must_be_connected_error"),
|
|
806
817
|
source_pin_must_be_connected_error_id: getZodPrefixedIdWithDefault(
|
|
807
818
|
"source_pin_must_be_connected_error"
|
|
808
819
|
),
|
|
809
|
-
error_type:
|
|
810
|
-
message:
|
|
811
|
-
source_component_id:
|
|
812
|
-
source_port_id:
|
|
813
|
-
subcircuit_id:
|
|
820
|
+
error_type: z47.literal("source_pin_must_be_connected_error").default("source_pin_must_be_connected_error"),
|
|
821
|
+
message: z47.string(),
|
|
822
|
+
source_component_id: z47.string(),
|
|
823
|
+
source_port_id: z47.string(),
|
|
824
|
+
subcircuit_id: z47.string().optional()
|
|
814
825
|
}).describe(
|
|
815
826
|
"Error emitted when a pin with mustBeConnected attribute is not connected to any trace"
|
|
816
827
|
);
|
|
817
828
|
expectTypesMatch(true);
|
|
818
829
|
|
|
819
830
|
// src/source/unknown_error_finding_part.ts
|
|
820
|
-
import { z as
|
|
821
|
-
var unknown_error_finding_part =
|
|
822
|
-
type:
|
|
831
|
+
import { z as z48 } from "zod";
|
|
832
|
+
var unknown_error_finding_part = z48.object({
|
|
833
|
+
type: z48.literal("unknown_error_finding_part"),
|
|
823
834
|
unknown_error_finding_part_id: getZodPrefixedIdWithDefault(
|
|
824
835
|
"unknown_error_finding_part"
|
|
825
836
|
),
|
|
826
|
-
error_type:
|
|
827
|
-
message:
|
|
828
|
-
source_component_id:
|
|
829
|
-
subcircuit_id:
|
|
837
|
+
error_type: z48.literal("unknown_error_finding_part").default("unknown_error_finding_part"),
|
|
838
|
+
message: z48.string(),
|
|
839
|
+
source_component_id: z48.string().optional(),
|
|
840
|
+
subcircuit_id: z48.string().optional()
|
|
830
841
|
}).describe(
|
|
831
842
|
"Error emitted when an unexpected error occurs while finding a part"
|
|
832
843
|
);
|
|
833
844
|
expectTypesMatch(true);
|
|
834
845
|
|
|
835
846
|
// src/schematic/schematic_box.ts
|
|
836
|
-
import { z as
|
|
837
|
-
var schematic_box =
|
|
838
|
-
type:
|
|
839
|
-
schematic_component_id:
|
|
847
|
+
import { z as z49 } from "zod";
|
|
848
|
+
var schematic_box = z49.object({
|
|
849
|
+
type: z49.literal("schematic_box"),
|
|
850
|
+
schematic_component_id: z49.string().optional(),
|
|
840
851
|
width: distance,
|
|
841
852
|
height: distance,
|
|
842
|
-
is_dashed:
|
|
853
|
+
is_dashed: z49.boolean().default(false),
|
|
843
854
|
x: distance,
|
|
844
855
|
y: distance,
|
|
845
|
-
subcircuit_id:
|
|
856
|
+
subcircuit_id: z49.string().optional()
|
|
846
857
|
}).describe("Draws a box on the schematic");
|
|
847
858
|
expectTypesMatch(true);
|
|
848
859
|
|
|
849
860
|
// src/schematic/schematic_path.ts
|
|
850
|
-
import { z as
|
|
851
|
-
var schematic_path =
|
|
852
|
-
type:
|
|
853
|
-
schematic_component_id:
|
|
854
|
-
fill_color:
|
|
855
|
-
is_filled:
|
|
856
|
-
points:
|
|
857
|
-
subcircuit_id:
|
|
861
|
+
import { z as z50 } from "zod";
|
|
862
|
+
var schematic_path = z50.object({
|
|
863
|
+
type: z50.literal("schematic_path"),
|
|
864
|
+
schematic_component_id: z50.string(),
|
|
865
|
+
fill_color: z50.enum(["red", "blue"]).optional(),
|
|
866
|
+
is_filled: z50.boolean().optional(),
|
|
867
|
+
points: z50.array(point),
|
|
868
|
+
subcircuit_id: z50.string().optional()
|
|
858
869
|
});
|
|
859
870
|
expectTypesMatch(true);
|
|
860
871
|
|
|
861
872
|
// src/schematic/schematic_component.ts
|
|
862
|
-
import { z as
|
|
863
|
-
var schematic_pin_styles =
|
|
864
|
-
|
|
873
|
+
import { z as z51 } from "zod";
|
|
874
|
+
var schematic_pin_styles = z51.record(
|
|
875
|
+
z51.object({
|
|
865
876
|
left_margin: length.optional(),
|
|
866
877
|
right_margin: length.optional(),
|
|
867
878
|
top_margin: length.optional(),
|
|
868
879
|
bottom_margin: length.optional()
|
|
869
880
|
})
|
|
870
881
|
);
|
|
871
|
-
var schematic_component_port_arrangement_by_size =
|
|
872
|
-
left_size:
|
|
873
|
-
right_size:
|
|
874
|
-
top_size:
|
|
875
|
-
bottom_size:
|
|
882
|
+
var schematic_component_port_arrangement_by_size = z51.object({
|
|
883
|
+
left_size: z51.number(),
|
|
884
|
+
right_size: z51.number(),
|
|
885
|
+
top_size: z51.number().optional(),
|
|
886
|
+
bottom_size: z51.number().optional()
|
|
876
887
|
});
|
|
877
888
|
expectTypesMatch(true);
|
|
878
|
-
var schematic_component_port_arrangement_by_sides =
|
|
879
|
-
left_side:
|
|
880
|
-
pins:
|
|
889
|
+
var schematic_component_port_arrangement_by_sides = z51.object({
|
|
890
|
+
left_side: z51.object({
|
|
891
|
+
pins: z51.array(z51.number()),
|
|
881
892
|
// @ts-ignore
|
|
882
|
-
direction:
|
|
893
|
+
direction: z51.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
883
894
|
}).optional(),
|
|
884
|
-
right_side:
|
|
885
|
-
pins:
|
|
895
|
+
right_side: z51.object({
|
|
896
|
+
pins: z51.array(z51.number()),
|
|
886
897
|
// @ts-ignore
|
|
887
|
-
direction:
|
|
898
|
+
direction: z51.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
888
899
|
}).optional(),
|
|
889
|
-
top_side:
|
|
890
|
-
pins:
|
|
900
|
+
top_side: z51.object({
|
|
901
|
+
pins: z51.array(z51.number()),
|
|
891
902
|
// @ts-ignore
|
|
892
|
-
direction:
|
|
903
|
+
direction: z51.enum(["left-to-right", "right-to-left"]).optional()
|
|
893
904
|
}).optional(),
|
|
894
|
-
bottom_side:
|
|
895
|
-
pins:
|
|
905
|
+
bottom_side: z51.object({
|
|
906
|
+
pins: z51.array(z51.number()),
|
|
896
907
|
// @ts-ignore
|
|
897
|
-
direction:
|
|
908
|
+
direction: z51.enum(["left-to-right", "right-to-left"]).optional()
|
|
898
909
|
}).optional()
|
|
899
910
|
});
|
|
900
911
|
expectTypesMatch(true);
|
|
901
|
-
var port_arrangement =
|
|
912
|
+
var port_arrangement = z51.union([
|
|
902
913
|
schematic_component_port_arrangement_by_size,
|
|
903
914
|
schematic_component_port_arrangement_by_sides
|
|
904
915
|
]);
|
|
905
|
-
var schematic_component =
|
|
906
|
-
type:
|
|
916
|
+
var schematic_component = z51.object({
|
|
917
|
+
type: z51.literal("schematic_component"),
|
|
907
918
|
size,
|
|
908
919
|
center: point,
|
|
909
|
-
source_component_id:
|
|
910
|
-
schematic_component_id:
|
|
920
|
+
source_component_id: z51.string().optional(),
|
|
921
|
+
schematic_component_id: z51.string(),
|
|
911
922
|
pin_spacing: length.optional(),
|
|
912
923
|
pin_styles: schematic_pin_styles.optional(),
|
|
913
924
|
box_width: length.optional(),
|
|
914
|
-
symbol_name:
|
|
925
|
+
symbol_name: z51.string().optional(),
|
|
915
926
|
port_arrangement: port_arrangement.optional(),
|
|
916
|
-
port_labels:
|
|
917
|
-
symbol_display_value:
|
|
918
|
-
subcircuit_id:
|
|
919
|
-
schematic_group_id:
|
|
920
|
-
is_schematic_group:
|
|
921
|
-
source_group_id:
|
|
922
|
-
is_box_with_pins:
|
|
927
|
+
port_labels: z51.record(z51.string()).optional(),
|
|
928
|
+
symbol_display_value: z51.string().optional(),
|
|
929
|
+
subcircuit_id: z51.string().optional(),
|
|
930
|
+
schematic_group_id: z51.string().optional(),
|
|
931
|
+
is_schematic_group: z51.boolean().optional(),
|
|
932
|
+
source_group_id: z51.string().optional(),
|
|
933
|
+
is_box_with_pins: z51.boolean().optional().default(true)
|
|
923
934
|
});
|
|
924
935
|
expectTypesMatch(true);
|
|
925
936
|
|
|
926
937
|
// src/schematic/schematic_line.ts
|
|
927
|
-
import { z as
|
|
928
|
-
var schematic_line =
|
|
929
|
-
type:
|
|
938
|
+
import { z as z52 } from "zod";
|
|
939
|
+
var schematic_line = z52.object({
|
|
940
|
+
type: z52.literal("schematic_line"),
|
|
930
941
|
schematic_line_id: getZodPrefixedIdWithDefault("schematic_line"),
|
|
931
|
-
schematic_component_id:
|
|
942
|
+
schematic_component_id: z52.string(),
|
|
932
943
|
x1: distance,
|
|
933
944
|
y1: distance,
|
|
934
945
|
x2: distance,
|
|
935
946
|
y2: distance,
|
|
936
947
|
stroke_width: distance.nullable().optional(),
|
|
937
|
-
color:
|
|
938
|
-
is_dashed:
|
|
939
|
-
subcircuit_id:
|
|
948
|
+
color: z52.string().default("#000000"),
|
|
949
|
+
is_dashed: z52.boolean().default(false),
|
|
950
|
+
subcircuit_id: z52.string().optional()
|
|
940
951
|
}).describe("Draws a styled line on the schematic");
|
|
941
952
|
expectTypesMatch(true);
|
|
942
953
|
|
|
943
954
|
// src/schematic/schematic_rect.ts
|
|
944
|
-
import { z as
|
|
945
|
-
var schematic_rect =
|
|
946
|
-
type:
|
|
955
|
+
import { z as z53 } from "zod";
|
|
956
|
+
var schematic_rect = z53.object({
|
|
957
|
+
type: z53.literal("schematic_rect"),
|
|
947
958
|
schematic_rect_id: getZodPrefixedIdWithDefault("schematic_rect"),
|
|
948
|
-
schematic_component_id:
|
|
959
|
+
schematic_component_id: z53.string(),
|
|
949
960
|
center: point,
|
|
950
961
|
width: distance,
|
|
951
962
|
height: distance,
|
|
952
963
|
rotation: rotation.default(0),
|
|
953
964
|
stroke_width: distance.nullable().optional(),
|
|
954
|
-
color:
|
|
955
|
-
is_filled:
|
|
956
|
-
fill_color:
|
|
957
|
-
is_dashed:
|
|
958
|
-
subcircuit_id:
|
|
965
|
+
color: z53.string().default("#000000"),
|
|
966
|
+
is_filled: z53.boolean().default(false),
|
|
967
|
+
fill_color: z53.string().optional(),
|
|
968
|
+
is_dashed: z53.boolean().default(false),
|
|
969
|
+
subcircuit_id: z53.string().optional()
|
|
959
970
|
}).describe("Draws a styled rectangle on the schematic");
|
|
960
971
|
expectTypesMatch(true);
|
|
961
972
|
|
|
962
973
|
// src/schematic/schematic_circle.ts
|
|
963
|
-
import { z as
|
|
964
|
-
var schematic_circle =
|
|
965
|
-
type:
|
|
974
|
+
import { z as z54 } from "zod";
|
|
975
|
+
var schematic_circle = z54.object({
|
|
976
|
+
type: z54.literal("schematic_circle"),
|
|
966
977
|
schematic_circle_id: getZodPrefixedIdWithDefault("schematic_circle"),
|
|
967
|
-
schematic_component_id:
|
|
978
|
+
schematic_component_id: z54.string(),
|
|
968
979
|
center: point,
|
|
969
980
|
radius: distance,
|
|
970
981
|
stroke_width: distance.nullable().optional(),
|
|
971
|
-
color:
|
|
972
|
-
is_filled:
|
|
973
|
-
fill_color:
|
|
974
|
-
is_dashed:
|
|
975
|
-
subcircuit_id:
|
|
982
|
+
color: z54.string().default("#000000"),
|
|
983
|
+
is_filled: z54.boolean().default(false),
|
|
984
|
+
fill_color: z54.string().optional(),
|
|
985
|
+
is_dashed: z54.boolean().default(false),
|
|
986
|
+
subcircuit_id: z54.string().optional()
|
|
976
987
|
}).describe("Draws a styled circle on the schematic");
|
|
977
988
|
expectTypesMatch(true);
|
|
978
989
|
|
|
979
990
|
// src/schematic/schematic_arc.ts
|
|
980
|
-
import { z as
|
|
981
|
-
var schematic_arc =
|
|
982
|
-
type:
|
|
991
|
+
import { z as z55 } from "zod";
|
|
992
|
+
var schematic_arc = z55.object({
|
|
993
|
+
type: z55.literal("schematic_arc"),
|
|
983
994
|
schematic_arc_id: getZodPrefixedIdWithDefault("schematic_arc"),
|
|
984
|
-
schematic_component_id:
|
|
995
|
+
schematic_component_id: z55.string(),
|
|
985
996
|
center: point,
|
|
986
997
|
radius: distance,
|
|
987
998
|
start_angle_degrees: rotation,
|
|
988
999
|
end_angle_degrees: rotation,
|
|
989
|
-
direction:
|
|
1000
|
+
direction: z55.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
990
1001
|
stroke_width: distance.nullable().optional(),
|
|
991
|
-
color:
|
|
992
|
-
is_dashed:
|
|
993
|
-
subcircuit_id:
|
|
1002
|
+
color: z55.string().default("#000000"),
|
|
1003
|
+
is_dashed: z55.boolean().default(false),
|
|
1004
|
+
subcircuit_id: z55.string().optional()
|
|
994
1005
|
}).describe("Draws a styled arc on the schematic");
|
|
995
1006
|
expectTypesMatch(true);
|
|
996
1007
|
|
|
997
1008
|
// src/schematic/schematic_trace.ts
|
|
998
|
-
import { z as
|
|
999
|
-
var schematic_trace =
|
|
1000
|
-
type:
|
|
1001
|
-
schematic_trace_id:
|
|
1002
|
-
source_trace_id:
|
|
1003
|
-
junctions:
|
|
1004
|
-
|
|
1005
|
-
x:
|
|
1006
|
-
y:
|
|
1009
|
+
import { z as z56 } from "zod";
|
|
1010
|
+
var schematic_trace = z56.object({
|
|
1011
|
+
type: z56.literal("schematic_trace"),
|
|
1012
|
+
schematic_trace_id: z56.string(),
|
|
1013
|
+
source_trace_id: z56.string().optional(),
|
|
1014
|
+
junctions: z56.array(
|
|
1015
|
+
z56.object({
|
|
1016
|
+
x: z56.number(),
|
|
1017
|
+
y: z56.number()
|
|
1007
1018
|
})
|
|
1008
1019
|
),
|
|
1009
|
-
edges:
|
|
1010
|
-
|
|
1011
|
-
from:
|
|
1012
|
-
x:
|
|
1013
|
-
y:
|
|
1020
|
+
edges: z56.array(
|
|
1021
|
+
z56.object({
|
|
1022
|
+
from: z56.object({
|
|
1023
|
+
x: z56.number(),
|
|
1024
|
+
y: z56.number()
|
|
1014
1025
|
}),
|
|
1015
|
-
to:
|
|
1016
|
-
x:
|
|
1017
|
-
y:
|
|
1026
|
+
to: z56.object({
|
|
1027
|
+
x: z56.number(),
|
|
1028
|
+
y: z56.number()
|
|
1018
1029
|
}),
|
|
1019
|
-
is_crossing:
|
|
1020
|
-
from_schematic_port_id:
|
|
1021
|
-
to_schematic_port_id:
|
|
1030
|
+
is_crossing: z56.boolean().optional(),
|
|
1031
|
+
from_schematic_port_id: z56.string().optional(),
|
|
1032
|
+
to_schematic_port_id: z56.string().optional()
|
|
1022
1033
|
})
|
|
1023
1034
|
),
|
|
1024
|
-
subcircuit_id:
|
|
1035
|
+
subcircuit_id: z56.string().optional(),
|
|
1025
1036
|
// TODO: make required in a future release
|
|
1026
|
-
subcircuit_connectivity_map_key:
|
|
1037
|
+
subcircuit_connectivity_map_key: z56.string().optional()
|
|
1027
1038
|
});
|
|
1028
1039
|
expectTypesMatch(true);
|
|
1029
1040
|
|
|
1030
1041
|
// src/schematic/schematic_text.ts
|
|
1031
|
-
import { z as
|
|
1042
|
+
import { z as z58 } from "zod";
|
|
1032
1043
|
|
|
1033
1044
|
// src/common/FivePointAnchor.ts
|
|
1034
|
-
import { z as
|
|
1035
|
-
var fivePointAnchor =
|
|
1045
|
+
import { z as z57 } from "zod";
|
|
1046
|
+
var fivePointAnchor = z57.enum([
|
|
1036
1047
|
"center",
|
|
1037
1048
|
"left",
|
|
1038
1049
|
"right",
|
|
@@ -1042,111 +1053,111 @@ var fivePointAnchor = z56.enum([
|
|
|
1042
1053
|
expectTypesMatch(true);
|
|
1043
1054
|
|
|
1044
1055
|
// src/schematic/schematic_text.ts
|
|
1045
|
-
var schematic_text =
|
|
1046
|
-
type:
|
|
1047
|
-
schematic_component_id:
|
|
1048
|
-
schematic_text_id:
|
|
1049
|
-
text:
|
|
1050
|
-
font_size:
|
|
1051
|
-
position:
|
|
1056
|
+
var schematic_text = z58.object({
|
|
1057
|
+
type: z58.literal("schematic_text"),
|
|
1058
|
+
schematic_component_id: z58.string().optional(),
|
|
1059
|
+
schematic_text_id: z58.string(),
|
|
1060
|
+
text: z58.string(),
|
|
1061
|
+
font_size: z58.number().default(0.18),
|
|
1062
|
+
position: z58.object({
|
|
1052
1063
|
x: distance,
|
|
1053
1064
|
y: distance
|
|
1054
1065
|
}),
|
|
1055
|
-
rotation:
|
|
1056
|
-
anchor:
|
|
1057
|
-
color:
|
|
1058
|
-
subcircuit_id:
|
|
1066
|
+
rotation: z58.number().default(0),
|
|
1067
|
+
anchor: z58.union([fivePointAnchor.describe("legacy"), ninePointAnchor]).default("center"),
|
|
1068
|
+
color: z58.string().default("#000000"),
|
|
1069
|
+
subcircuit_id: z58.string().optional()
|
|
1059
1070
|
});
|
|
1060
1071
|
expectTypesMatch(true);
|
|
1061
1072
|
|
|
1062
1073
|
// src/schematic/schematic_port.ts
|
|
1063
|
-
import { z as
|
|
1064
|
-
var schematic_port =
|
|
1065
|
-
type:
|
|
1066
|
-
schematic_port_id:
|
|
1067
|
-
source_port_id:
|
|
1068
|
-
schematic_component_id:
|
|
1074
|
+
import { z as z59 } from "zod";
|
|
1075
|
+
var schematic_port = z59.object({
|
|
1076
|
+
type: z59.literal("schematic_port"),
|
|
1077
|
+
schematic_port_id: z59.string(),
|
|
1078
|
+
source_port_id: z59.string(),
|
|
1079
|
+
schematic_component_id: z59.string().optional(),
|
|
1069
1080
|
center: point,
|
|
1070
|
-
facing_direction:
|
|
1071
|
-
distance_from_component_edge:
|
|
1072
|
-
side_of_component:
|
|
1073
|
-
true_ccw_index:
|
|
1074
|
-
pin_number:
|
|
1075
|
-
display_pin_label:
|
|
1076
|
-
subcircuit_id:
|
|
1077
|
-
is_connected:
|
|
1078
|
-
has_input_arrow:
|
|
1079
|
-
has_output_arrow:
|
|
1081
|
+
facing_direction: z59.enum(["up", "down", "left", "right"]).optional(),
|
|
1082
|
+
distance_from_component_edge: z59.number().optional(),
|
|
1083
|
+
side_of_component: z59.enum(["top", "bottom", "left", "right"]).optional(),
|
|
1084
|
+
true_ccw_index: z59.number().optional(),
|
|
1085
|
+
pin_number: z59.number().optional(),
|
|
1086
|
+
display_pin_label: z59.string().optional(),
|
|
1087
|
+
subcircuit_id: z59.string().optional(),
|
|
1088
|
+
is_connected: z59.boolean().optional(),
|
|
1089
|
+
has_input_arrow: z59.boolean().optional(),
|
|
1090
|
+
has_output_arrow: z59.boolean().optional()
|
|
1080
1091
|
}).describe("Defines a port on a schematic component");
|
|
1081
1092
|
expectTypesMatch(true);
|
|
1082
1093
|
|
|
1083
1094
|
// src/schematic/schematic_net_label.ts
|
|
1084
|
-
import { z as
|
|
1085
|
-
var schematic_net_label =
|
|
1086
|
-
type:
|
|
1095
|
+
import { z as z60 } from "zod";
|
|
1096
|
+
var schematic_net_label = z60.object({
|
|
1097
|
+
type: z60.literal("schematic_net_label"),
|
|
1087
1098
|
schematic_net_label_id: getZodPrefixedIdWithDefault("schematic_net_label"),
|
|
1088
|
-
schematic_trace_id:
|
|
1089
|
-
source_trace_id:
|
|
1090
|
-
source_net_id:
|
|
1099
|
+
schematic_trace_id: z60.string().optional(),
|
|
1100
|
+
source_trace_id: z60.string().optional(),
|
|
1101
|
+
source_net_id: z60.string(),
|
|
1091
1102
|
center: point,
|
|
1092
1103
|
anchor_position: point.optional(),
|
|
1093
|
-
anchor_side:
|
|
1094
|
-
text:
|
|
1095
|
-
symbol_name:
|
|
1096
|
-
is_movable:
|
|
1097
|
-
subcircuit_id:
|
|
1104
|
+
anchor_side: z60.enum(["top", "bottom", "left", "right"]),
|
|
1105
|
+
text: z60.string(),
|
|
1106
|
+
symbol_name: z60.string().optional(),
|
|
1107
|
+
is_movable: z60.boolean().optional(),
|
|
1108
|
+
subcircuit_id: z60.string().optional()
|
|
1098
1109
|
});
|
|
1099
1110
|
expectTypesMatch(true);
|
|
1100
1111
|
|
|
1101
1112
|
// src/schematic/schematic_error.ts
|
|
1102
|
-
import { z as
|
|
1103
|
-
var schematic_error =
|
|
1104
|
-
type:
|
|
1105
|
-
schematic_error_id:
|
|
1113
|
+
import { z as z61 } from "zod";
|
|
1114
|
+
var schematic_error = z61.object({
|
|
1115
|
+
type: z61.literal("schematic_error"),
|
|
1116
|
+
schematic_error_id: z61.string(),
|
|
1106
1117
|
// eventually each error type should be broken out into a dir of files
|
|
1107
|
-
error_type:
|
|
1108
|
-
message:
|
|
1109
|
-
subcircuit_id:
|
|
1118
|
+
error_type: z61.literal("schematic_port_not_found").default("schematic_port_not_found"),
|
|
1119
|
+
message: z61.string(),
|
|
1120
|
+
subcircuit_id: z61.string().optional()
|
|
1110
1121
|
}).describe("Defines a schematic error on the schematic");
|
|
1111
1122
|
expectTypesMatch(true);
|
|
1112
1123
|
|
|
1113
1124
|
// src/schematic/schematic_layout_error.ts
|
|
1114
|
-
import { z as
|
|
1115
|
-
var schematic_layout_error =
|
|
1116
|
-
type:
|
|
1125
|
+
import { z as z62 } from "zod";
|
|
1126
|
+
var schematic_layout_error = z62.object({
|
|
1127
|
+
type: z62.literal("schematic_layout_error"),
|
|
1117
1128
|
schematic_layout_error_id: getZodPrefixedIdWithDefault(
|
|
1118
1129
|
"schematic_layout_error"
|
|
1119
1130
|
),
|
|
1120
|
-
error_type:
|
|
1121
|
-
message:
|
|
1122
|
-
source_group_id:
|
|
1123
|
-
schematic_group_id:
|
|
1124
|
-
subcircuit_id:
|
|
1131
|
+
error_type: z62.literal("schematic_layout_error").default("schematic_layout_error"),
|
|
1132
|
+
message: z62.string(),
|
|
1133
|
+
source_group_id: z62.string(),
|
|
1134
|
+
schematic_group_id: z62.string(),
|
|
1135
|
+
subcircuit_id: z62.string().optional()
|
|
1125
1136
|
}).describe("Error emitted when schematic layout fails for a group");
|
|
1126
1137
|
expectTypesMatch(true);
|
|
1127
1138
|
|
|
1128
1139
|
// src/schematic/schematic_debug_object.ts
|
|
1129
|
-
import { z as
|
|
1130
|
-
var schematic_debug_object_base =
|
|
1131
|
-
type:
|
|
1132
|
-
label:
|
|
1133
|
-
subcircuit_id:
|
|
1140
|
+
import { z as z63 } from "zod";
|
|
1141
|
+
var schematic_debug_object_base = z63.object({
|
|
1142
|
+
type: z63.literal("schematic_debug_object"),
|
|
1143
|
+
label: z63.string().optional(),
|
|
1144
|
+
subcircuit_id: z63.string().optional()
|
|
1134
1145
|
});
|
|
1135
1146
|
var schematic_debug_rect = schematic_debug_object_base.extend({
|
|
1136
|
-
shape:
|
|
1147
|
+
shape: z63.literal("rect"),
|
|
1137
1148
|
center: point,
|
|
1138
1149
|
size
|
|
1139
1150
|
});
|
|
1140
1151
|
var schematic_debug_line = schematic_debug_object_base.extend({
|
|
1141
|
-
shape:
|
|
1152
|
+
shape: z63.literal("line"),
|
|
1142
1153
|
start: point,
|
|
1143
1154
|
end: point
|
|
1144
1155
|
});
|
|
1145
1156
|
var schematic_debug_point = schematic_debug_object_base.extend({
|
|
1146
|
-
shape:
|
|
1157
|
+
shape: z63.literal("point"),
|
|
1147
1158
|
center: point
|
|
1148
1159
|
});
|
|
1149
|
-
var schematic_debug_object =
|
|
1160
|
+
var schematic_debug_object = z63.discriminatedUnion("shape", [
|
|
1150
1161
|
schematic_debug_rect,
|
|
1151
1162
|
schematic_debug_line,
|
|
1152
1163
|
schematic_debug_point
|
|
@@ -1154,268 +1165,268 @@ var schematic_debug_object = z62.discriminatedUnion("shape", [
|
|
|
1154
1165
|
expectTypesMatch(true);
|
|
1155
1166
|
|
|
1156
1167
|
// src/schematic/schematic_voltage_probe.ts
|
|
1157
|
-
import { z as
|
|
1158
|
-
var schematic_voltage_probe =
|
|
1159
|
-
type:
|
|
1160
|
-
schematic_voltage_probe_id:
|
|
1161
|
-
source_component_id:
|
|
1162
|
-
name:
|
|
1168
|
+
import { z as z64 } from "zod";
|
|
1169
|
+
var schematic_voltage_probe = z64.object({
|
|
1170
|
+
type: z64.literal("schematic_voltage_probe"),
|
|
1171
|
+
schematic_voltage_probe_id: z64.string(),
|
|
1172
|
+
source_component_id: z64.string().optional(),
|
|
1173
|
+
name: z64.string().optional(),
|
|
1163
1174
|
position: point,
|
|
1164
|
-
schematic_trace_id:
|
|
1175
|
+
schematic_trace_id: z64.string(),
|
|
1165
1176
|
voltage: voltage.optional(),
|
|
1166
|
-
subcircuit_id:
|
|
1167
|
-
color:
|
|
1177
|
+
subcircuit_id: z64.string().optional(),
|
|
1178
|
+
color: z64.string().optional()
|
|
1168
1179
|
}).describe("Defines a voltage probe measurement point on a schematic trace");
|
|
1169
1180
|
expectTypesMatch(true);
|
|
1170
1181
|
|
|
1171
1182
|
// src/schematic/schematic_manual_edit_conflict_warning.ts
|
|
1172
|
-
import { z as
|
|
1173
|
-
var schematic_manual_edit_conflict_warning =
|
|
1174
|
-
type:
|
|
1183
|
+
import { z as z65 } from "zod";
|
|
1184
|
+
var schematic_manual_edit_conflict_warning = z65.object({
|
|
1185
|
+
type: z65.literal("schematic_manual_edit_conflict_warning"),
|
|
1175
1186
|
schematic_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
1176
1187
|
"schematic_manual_edit_conflict_warning"
|
|
1177
1188
|
),
|
|
1178
|
-
warning_type:
|
|
1179
|
-
message:
|
|
1180
|
-
schematic_component_id:
|
|
1181
|
-
schematic_group_id:
|
|
1182
|
-
subcircuit_id:
|
|
1183
|
-
source_component_id:
|
|
1189
|
+
warning_type: z65.literal("schematic_manual_edit_conflict_warning").default("schematic_manual_edit_conflict_warning"),
|
|
1190
|
+
message: z65.string(),
|
|
1191
|
+
schematic_component_id: z65.string(),
|
|
1192
|
+
schematic_group_id: z65.string().optional(),
|
|
1193
|
+
subcircuit_id: z65.string().optional(),
|
|
1194
|
+
source_component_id: z65.string()
|
|
1184
1195
|
}).describe(
|
|
1185
1196
|
"Warning emitted when a component has both manual placement and explicit schX/schY coordinates"
|
|
1186
1197
|
);
|
|
1187
1198
|
expectTypesMatch(true);
|
|
1188
1199
|
|
|
1189
1200
|
// src/schematic/schematic_group.ts
|
|
1190
|
-
import { z as
|
|
1191
|
-
var schematic_group =
|
|
1192
|
-
type:
|
|
1201
|
+
import { z as z66 } from "zod";
|
|
1202
|
+
var schematic_group = z66.object({
|
|
1203
|
+
type: z66.literal("schematic_group"),
|
|
1193
1204
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
1194
|
-
source_group_id:
|
|
1195
|
-
is_subcircuit:
|
|
1196
|
-
subcircuit_id:
|
|
1205
|
+
source_group_id: z66.string(),
|
|
1206
|
+
is_subcircuit: z66.boolean().optional(),
|
|
1207
|
+
subcircuit_id: z66.string().optional(),
|
|
1197
1208
|
width: length,
|
|
1198
1209
|
height: length,
|
|
1199
1210
|
center: point,
|
|
1200
|
-
schematic_component_ids:
|
|
1201
|
-
show_as_schematic_box:
|
|
1202
|
-
name:
|
|
1203
|
-
description:
|
|
1211
|
+
schematic_component_ids: z66.array(z66.string()),
|
|
1212
|
+
show_as_schematic_box: z66.boolean().optional(),
|
|
1213
|
+
name: z66.string().optional(),
|
|
1214
|
+
description: z66.string().optional()
|
|
1204
1215
|
}).describe("Defines a group of components on the schematic");
|
|
1205
1216
|
expectTypesMatch(true);
|
|
1206
1217
|
|
|
1207
1218
|
// src/schematic/schematic_table.ts
|
|
1208
|
-
import { z as
|
|
1209
|
-
var schematic_table =
|
|
1210
|
-
type:
|
|
1219
|
+
import { z as z67 } from "zod";
|
|
1220
|
+
var schematic_table = z67.object({
|
|
1221
|
+
type: z67.literal("schematic_table"),
|
|
1211
1222
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
1212
1223
|
anchor_position: point,
|
|
1213
|
-
column_widths:
|
|
1214
|
-
row_heights:
|
|
1224
|
+
column_widths: z67.array(distance),
|
|
1225
|
+
row_heights: z67.array(distance),
|
|
1215
1226
|
cell_padding: distance.optional(),
|
|
1216
1227
|
border_width: distance.optional(),
|
|
1217
|
-
subcircuit_id:
|
|
1218
|
-
schematic_component_id:
|
|
1228
|
+
subcircuit_id: z67.string().optional(),
|
|
1229
|
+
schematic_component_id: z67.string().optional(),
|
|
1219
1230
|
anchor: ninePointAnchor.optional()
|
|
1220
1231
|
}).describe("Defines a table on the schematic");
|
|
1221
1232
|
expectTypesMatch(true);
|
|
1222
1233
|
|
|
1223
1234
|
// src/schematic/schematic_table_cell.ts
|
|
1224
|
-
import { z as
|
|
1225
|
-
var schematic_table_cell =
|
|
1226
|
-
type:
|
|
1235
|
+
import { z as z68 } from "zod";
|
|
1236
|
+
var schematic_table_cell = z68.object({
|
|
1237
|
+
type: z68.literal("schematic_table_cell"),
|
|
1227
1238
|
schematic_table_cell_id: getZodPrefixedIdWithDefault(
|
|
1228
1239
|
"schematic_table_cell"
|
|
1229
1240
|
),
|
|
1230
|
-
schematic_table_id:
|
|
1231
|
-
start_row_index:
|
|
1232
|
-
end_row_index:
|
|
1233
|
-
start_column_index:
|
|
1234
|
-
end_column_index:
|
|
1235
|
-
text:
|
|
1241
|
+
schematic_table_id: z68.string(),
|
|
1242
|
+
start_row_index: z68.number(),
|
|
1243
|
+
end_row_index: z68.number(),
|
|
1244
|
+
start_column_index: z68.number(),
|
|
1245
|
+
end_column_index: z68.number(),
|
|
1246
|
+
text: z68.string().optional(),
|
|
1236
1247
|
center: point,
|
|
1237
1248
|
width: distance,
|
|
1238
1249
|
height: distance,
|
|
1239
|
-
horizontal_align:
|
|
1240
|
-
vertical_align:
|
|
1250
|
+
horizontal_align: z68.enum(["left", "center", "right"]).optional(),
|
|
1251
|
+
vertical_align: z68.enum(["top", "middle", "bottom"]).optional(),
|
|
1241
1252
|
font_size: distance.optional(),
|
|
1242
|
-
subcircuit_id:
|
|
1253
|
+
subcircuit_id: z68.string().optional()
|
|
1243
1254
|
}).describe("Defines a cell within a schematic_table");
|
|
1244
1255
|
expectTypesMatch(true);
|
|
1245
1256
|
|
|
1246
1257
|
// src/schematic/schematic_sheet.ts
|
|
1247
|
-
import { z as
|
|
1248
|
-
var schematic_sheet =
|
|
1249
|
-
type:
|
|
1258
|
+
import { z as z69 } from "zod";
|
|
1259
|
+
var schematic_sheet = z69.object({
|
|
1260
|
+
type: z69.literal("schematic_sheet"),
|
|
1250
1261
|
schematic_sheet_id: getZodPrefixedIdWithDefault("schematic_sheet"),
|
|
1251
|
-
name:
|
|
1252
|
-
subcircuit_id:
|
|
1262
|
+
name: z69.string().optional(),
|
|
1263
|
+
subcircuit_id: z69.string().optional()
|
|
1253
1264
|
}).describe(
|
|
1254
1265
|
"Defines a schematic sheet or page that components can be placed on"
|
|
1255
1266
|
);
|
|
1256
1267
|
expectTypesMatch(true);
|
|
1257
1268
|
|
|
1258
1269
|
// src/pcb/properties/brep.ts
|
|
1259
|
-
import { z as
|
|
1260
|
-
var point_with_bulge =
|
|
1270
|
+
import { z as z70 } from "zod";
|
|
1271
|
+
var point_with_bulge = z70.object({
|
|
1261
1272
|
x: distance,
|
|
1262
1273
|
y: distance,
|
|
1263
|
-
bulge:
|
|
1274
|
+
bulge: z70.number().optional()
|
|
1264
1275
|
});
|
|
1265
1276
|
expectTypesMatch(true);
|
|
1266
|
-
var ring =
|
|
1267
|
-
vertices:
|
|
1277
|
+
var ring = z70.object({
|
|
1278
|
+
vertices: z70.array(point_with_bulge)
|
|
1268
1279
|
});
|
|
1269
1280
|
expectTypesMatch(true);
|
|
1270
|
-
var brep_shape =
|
|
1281
|
+
var brep_shape = z70.object({
|
|
1271
1282
|
outer_ring: ring,
|
|
1272
|
-
inner_rings:
|
|
1283
|
+
inner_rings: z70.array(ring).default([])
|
|
1273
1284
|
});
|
|
1274
1285
|
expectTypesMatch(true);
|
|
1275
1286
|
|
|
1276
1287
|
// src/pcb/properties/pcb_route_hints.ts
|
|
1277
|
-
import { z as
|
|
1278
|
-
var pcb_route_hint =
|
|
1288
|
+
import { z as z71 } from "zod";
|
|
1289
|
+
var pcb_route_hint = z71.object({
|
|
1279
1290
|
x: distance,
|
|
1280
1291
|
y: distance,
|
|
1281
|
-
via:
|
|
1292
|
+
via: z71.boolean().optional(),
|
|
1282
1293
|
via_to_layer: layer_ref.optional()
|
|
1283
1294
|
});
|
|
1284
|
-
var pcb_route_hints =
|
|
1295
|
+
var pcb_route_hints = z71.array(pcb_route_hint);
|
|
1285
1296
|
expectTypesMatch(true);
|
|
1286
1297
|
expectTypesMatch(true);
|
|
1287
1298
|
|
|
1288
1299
|
// src/pcb/properties/route_hint_point.ts
|
|
1289
|
-
import { z as
|
|
1290
|
-
var route_hint_point =
|
|
1300
|
+
import { z as z72 } from "zod";
|
|
1301
|
+
var route_hint_point = z72.object({
|
|
1291
1302
|
x: distance,
|
|
1292
1303
|
y: distance,
|
|
1293
|
-
via:
|
|
1304
|
+
via: z72.boolean().optional(),
|
|
1294
1305
|
to_layer: layer_ref.optional(),
|
|
1295
1306
|
trace_width: distance.optional()
|
|
1296
1307
|
});
|
|
1297
1308
|
expectTypesMatch(true);
|
|
1298
1309
|
|
|
1299
1310
|
// src/pcb/pcb_component.ts
|
|
1300
|
-
import { z as
|
|
1301
|
-
var pcb_component =
|
|
1302
|
-
type:
|
|
1311
|
+
import { z as z73 } from "zod";
|
|
1312
|
+
var pcb_component = z73.object({
|
|
1313
|
+
type: z73.literal("pcb_component"),
|
|
1303
1314
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
1304
|
-
source_component_id:
|
|
1315
|
+
source_component_id: z73.string(),
|
|
1305
1316
|
center: point,
|
|
1306
1317
|
layer: layer_ref,
|
|
1307
1318
|
rotation,
|
|
1308
1319
|
width: length,
|
|
1309
1320
|
height: length,
|
|
1310
|
-
do_not_place:
|
|
1311
|
-
subcircuit_id:
|
|
1312
|
-
pcb_group_id:
|
|
1313
|
-
position_mode:
|
|
1314
|
-
positioned_relative_to_pcb_group_id:
|
|
1315
|
-
obstructs_within_bounds:
|
|
1321
|
+
do_not_place: z73.boolean().optional(),
|
|
1322
|
+
subcircuit_id: z73.string().optional(),
|
|
1323
|
+
pcb_group_id: z73.string().optional(),
|
|
1324
|
+
position_mode: z73.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
1325
|
+
positioned_relative_to_pcb_group_id: z73.string().optional(),
|
|
1326
|
+
obstructs_within_bounds: z73.boolean().default(true).describe(
|
|
1316
1327
|
"Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath"
|
|
1317
1328
|
)
|
|
1318
1329
|
}).describe("Defines a component on the PCB");
|
|
1319
1330
|
expectTypesMatch(true);
|
|
1320
1331
|
|
|
1321
1332
|
// src/pcb/pcb_hole.ts
|
|
1322
|
-
import { z as
|
|
1323
|
-
var pcb_hole_circle =
|
|
1324
|
-
type:
|
|
1333
|
+
import { z as z74 } from "zod";
|
|
1334
|
+
var pcb_hole_circle = z74.object({
|
|
1335
|
+
type: z74.literal("pcb_hole"),
|
|
1325
1336
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1326
|
-
pcb_group_id:
|
|
1327
|
-
subcircuit_id:
|
|
1328
|
-
hole_shape:
|
|
1329
|
-
hole_diameter:
|
|
1337
|
+
pcb_group_id: z74.string().optional(),
|
|
1338
|
+
subcircuit_id: z74.string().optional(),
|
|
1339
|
+
hole_shape: z74.literal("circle"),
|
|
1340
|
+
hole_diameter: z74.number(),
|
|
1330
1341
|
x: distance,
|
|
1331
1342
|
y: distance,
|
|
1332
|
-
is_covered_with_solder_mask:
|
|
1333
|
-
soldermask_margin:
|
|
1343
|
+
is_covered_with_solder_mask: z74.boolean().optional(),
|
|
1344
|
+
soldermask_margin: z74.number().optional()
|
|
1334
1345
|
});
|
|
1335
1346
|
var pcb_hole_circle_shape = pcb_hole_circle.describe(
|
|
1336
1347
|
"Defines a circular hole on the PCB"
|
|
1337
1348
|
);
|
|
1338
1349
|
expectTypesMatch(true);
|
|
1339
|
-
var pcb_hole_rect =
|
|
1340
|
-
type:
|
|
1350
|
+
var pcb_hole_rect = z74.object({
|
|
1351
|
+
type: z74.literal("pcb_hole"),
|
|
1341
1352
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1342
|
-
pcb_group_id:
|
|
1343
|
-
subcircuit_id:
|
|
1344
|
-
hole_shape:
|
|
1345
|
-
hole_width:
|
|
1346
|
-
hole_height:
|
|
1353
|
+
pcb_group_id: z74.string().optional(),
|
|
1354
|
+
subcircuit_id: z74.string().optional(),
|
|
1355
|
+
hole_shape: z74.literal("rect"),
|
|
1356
|
+
hole_width: z74.number(),
|
|
1357
|
+
hole_height: z74.number(),
|
|
1347
1358
|
x: distance,
|
|
1348
1359
|
y: distance,
|
|
1349
|
-
is_covered_with_solder_mask:
|
|
1350
|
-
soldermask_margin:
|
|
1360
|
+
is_covered_with_solder_mask: z74.boolean().optional(),
|
|
1361
|
+
soldermask_margin: z74.number().optional()
|
|
1351
1362
|
});
|
|
1352
1363
|
var pcb_hole_rect_shape = pcb_hole_rect.describe(
|
|
1353
1364
|
"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."
|
|
1354
1365
|
);
|
|
1355
1366
|
expectTypesMatch(true);
|
|
1356
|
-
var pcb_hole_circle_or_square =
|
|
1357
|
-
type:
|
|
1367
|
+
var pcb_hole_circle_or_square = z74.object({
|
|
1368
|
+
type: z74.literal("pcb_hole"),
|
|
1358
1369
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1359
|
-
pcb_group_id:
|
|
1360
|
-
subcircuit_id:
|
|
1361
|
-
hole_shape:
|
|
1362
|
-
hole_diameter:
|
|
1370
|
+
pcb_group_id: z74.string().optional(),
|
|
1371
|
+
subcircuit_id: z74.string().optional(),
|
|
1372
|
+
hole_shape: z74.enum(["circle", "square"]),
|
|
1373
|
+
hole_diameter: z74.number(),
|
|
1363
1374
|
x: distance,
|
|
1364
1375
|
y: distance,
|
|
1365
|
-
is_covered_with_solder_mask:
|
|
1366
|
-
soldermask_margin:
|
|
1376
|
+
is_covered_with_solder_mask: z74.boolean().optional(),
|
|
1377
|
+
soldermask_margin: z74.number().optional()
|
|
1367
1378
|
});
|
|
1368
1379
|
var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
1369
1380
|
"Defines a circular or square hole on the PCB"
|
|
1370
1381
|
);
|
|
1371
1382
|
expectTypesMatch(true);
|
|
1372
|
-
var pcb_hole_oval =
|
|
1373
|
-
type:
|
|
1383
|
+
var pcb_hole_oval = z74.object({
|
|
1384
|
+
type: z74.literal("pcb_hole"),
|
|
1374
1385
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1375
|
-
pcb_group_id:
|
|
1376
|
-
subcircuit_id:
|
|
1377
|
-
hole_shape:
|
|
1378
|
-
hole_width:
|
|
1379
|
-
hole_height:
|
|
1386
|
+
pcb_group_id: z74.string().optional(),
|
|
1387
|
+
subcircuit_id: z74.string().optional(),
|
|
1388
|
+
hole_shape: z74.literal("oval"),
|
|
1389
|
+
hole_width: z74.number(),
|
|
1390
|
+
hole_height: z74.number(),
|
|
1380
1391
|
x: distance,
|
|
1381
1392
|
y: distance,
|
|
1382
|
-
is_covered_with_solder_mask:
|
|
1383
|
-
soldermask_margin:
|
|
1393
|
+
is_covered_with_solder_mask: z74.boolean().optional(),
|
|
1394
|
+
soldermask_margin: z74.number().optional()
|
|
1384
1395
|
});
|
|
1385
1396
|
var pcb_hole_oval_shape = pcb_hole_oval.describe(
|
|
1386
1397
|
"Defines an oval hole on the PCB"
|
|
1387
1398
|
);
|
|
1388
1399
|
expectTypesMatch(true);
|
|
1389
|
-
var pcb_hole_pill =
|
|
1390
|
-
type:
|
|
1400
|
+
var pcb_hole_pill = z74.object({
|
|
1401
|
+
type: z74.literal("pcb_hole"),
|
|
1391
1402
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1392
|
-
pcb_group_id:
|
|
1393
|
-
subcircuit_id:
|
|
1394
|
-
hole_shape:
|
|
1395
|
-
hole_width:
|
|
1396
|
-
hole_height:
|
|
1403
|
+
pcb_group_id: z74.string().optional(),
|
|
1404
|
+
subcircuit_id: z74.string().optional(),
|
|
1405
|
+
hole_shape: z74.literal("pill"),
|
|
1406
|
+
hole_width: z74.number(),
|
|
1407
|
+
hole_height: z74.number(),
|
|
1397
1408
|
x: distance,
|
|
1398
1409
|
y: distance,
|
|
1399
|
-
is_covered_with_solder_mask:
|
|
1400
|
-
soldermask_margin:
|
|
1410
|
+
is_covered_with_solder_mask: z74.boolean().optional(),
|
|
1411
|
+
soldermask_margin: z74.number().optional()
|
|
1401
1412
|
});
|
|
1402
1413
|
var pcb_hole_pill_shape = pcb_hole_pill.describe(
|
|
1403
1414
|
"Defines a pill-shaped hole on the PCB"
|
|
1404
1415
|
);
|
|
1405
1416
|
expectTypesMatch(true);
|
|
1406
|
-
var pcb_hole_rotated_pill =
|
|
1407
|
-
type:
|
|
1417
|
+
var pcb_hole_rotated_pill = z74.object({
|
|
1418
|
+
type: z74.literal("pcb_hole"),
|
|
1408
1419
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1409
|
-
pcb_group_id:
|
|
1410
|
-
subcircuit_id:
|
|
1411
|
-
hole_shape:
|
|
1412
|
-
hole_width:
|
|
1413
|
-
hole_height:
|
|
1420
|
+
pcb_group_id: z74.string().optional(),
|
|
1421
|
+
subcircuit_id: z74.string().optional(),
|
|
1422
|
+
hole_shape: z74.literal("rotated_pill"),
|
|
1423
|
+
hole_width: z74.number(),
|
|
1424
|
+
hole_height: z74.number(),
|
|
1414
1425
|
x: distance,
|
|
1415
1426
|
y: distance,
|
|
1416
1427
|
ccw_rotation: rotation,
|
|
1417
|
-
is_covered_with_solder_mask:
|
|
1418
|
-
soldermask_margin:
|
|
1428
|
+
is_covered_with_solder_mask: z74.boolean().optional(),
|
|
1429
|
+
soldermask_margin: z74.number().optional()
|
|
1419
1430
|
});
|
|
1420
1431
|
var pcb_hole_rotated_pill_shape = pcb_hole_rotated_pill.describe(
|
|
1421
1432
|
"Defines a rotated pill-shaped hole on the PCB"
|
|
@@ -1424,145 +1435,145 @@ expectTypesMatch(true);
|
|
|
1424
1435
|
var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval).or(pcb_hole_pill).or(pcb_hole_rotated_pill).or(pcb_hole_circle).or(pcb_hole_rect);
|
|
1425
1436
|
|
|
1426
1437
|
// src/pcb/pcb_plated_hole.ts
|
|
1427
|
-
import { z as
|
|
1428
|
-
var pcb_plated_hole_circle =
|
|
1429
|
-
type:
|
|
1430
|
-
shape:
|
|
1431
|
-
pcb_group_id:
|
|
1432
|
-
subcircuit_id:
|
|
1433
|
-
outer_diameter:
|
|
1434
|
-
hole_diameter:
|
|
1435
|
-
is_covered_with_solder_mask:
|
|
1438
|
+
import { z as z75 } from "zod";
|
|
1439
|
+
var pcb_plated_hole_circle = z75.object({
|
|
1440
|
+
type: z75.literal("pcb_plated_hole"),
|
|
1441
|
+
shape: z75.literal("circle"),
|
|
1442
|
+
pcb_group_id: z75.string().optional(),
|
|
1443
|
+
subcircuit_id: z75.string().optional(),
|
|
1444
|
+
outer_diameter: z75.number(),
|
|
1445
|
+
hole_diameter: z75.number(),
|
|
1446
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1436
1447
|
x: distance,
|
|
1437
1448
|
y: distance,
|
|
1438
|
-
layers:
|
|
1439
|
-
port_hints:
|
|
1440
|
-
pcb_component_id:
|
|
1441
|
-
pcb_port_id:
|
|
1449
|
+
layers: z75.array(layer_ref),
|
|
1450
|
+
port_hints: z75.array(z75.string()).optional(),
|
|
1451
|
+
pcb_component_id: z75.string().optional(),
|
|
1452
|
+
pcb_port_id: z75.string().optional(),
|
|
1442
1453
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1443
|
-
soldermask_margin:
|
|
1454
|
+
soldermask_margin: z75.number().optional()
|
|
1444
1455
|
});
|
|
1445
|
-
var pcb_plated_hole_oval =
|
|
1446
|
-
type:
|
|
1447
|
-
shape:
|
|
1448
|
-
pcb_group_id:
|
|
1449
|
-
subcircuit_id:
|
|
1450
|
-
outer_width:
|
|
1451
|
-
outer_height:
|
|
1452
|
-
hole_width:
|
|
1453
|
-
hole_height:
|
|
1454
|
-
is_covered_with_solder_mask:
|
|
1456
|
+
var pcb_plated_hole_oval = z75.object({
|
|
1457
|
+
type: z75.literal("pcb_plated_hole"),
|
|
1458
|
+
shape: z75.enum(["oval", "pill"]),
|
|
1459
|
+
pcb_group_id: z75.string().optional(),
|
|
1460
|
+
subcircuit_id: z75.string().optional(),
|
|
1461
|
+
outer_width: z75.number(),
|
|
1462
|
+
outer_height: z75.number(),
|
|
1463
|
+
hole_width: z75.number(),
|
|
1464
|
+
hole_height: z75.number(),
|
|
1465
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1455
1466
|
x: distance,
|
|
1456
1467
|
y: distance,
|
|
1457
1468
|
ccw_rotation: rotation,
|
|
1458
|
-
layers:
|
|
1459
|
-
port_hints:
|
|
1460
|
-
pcb_component_id:
|
|
1461
|
-
pcb_port_id:
|
|
1469
|
+
layers: z75.array(layer_ref),
|
|
1470
|
+
port_hints: z75.array(z75.string()).optional(),
|
|
1471
|
+
pcb_component_id: z75.string().optional(),
|
|
1472
|
+
pcb_port_id: z75.string().optional(),
|
|
1462
1473
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1463
|
-
soldermask_margin:
|
|
1474
|
+
soldermask_margin: z75.number().optional()
|
|
1464
1475
|
});
|
|
1465
|
-
var pcb_circular_hole_with_rect_pad =
|
|
1466
|
-
type:
|
|
1467
|
-
shape:
|
|
1468
|
-
pcb_group_id:
|
|
1469
|
-
subcircuit_id:
|
|
1470
|
-
hole_shape:
|
|
1471
|
-
pad_shape:
|
|
1472
|
-
hole_diameter:
|
|
1473
|
-
rect_pad_width:
|
|
1474
|
-
rect_pad_height:
|
|
1475
|
-
rect_border_radius:
|
|
1476
|
+
var pcb_circular_hole_with_rect_pad = z75.object({
|
|
1477
|
+
type: z75.literal("pcb_plated_hole"),
|
|
1478
|
+
shape: z75.literal("circular_hole_with_rect_pad"),
|
|
1479
|
+
pcb_group_id: z75.string().optional(),
|
|
1480
|
+
subcircuit_id: z75.string().optional(),
|
|
1481
|
+
hole_shape: z75.literal("circle"),
|
|
1482
|
+
pad_shape: z75.literal("rect"),
|
|
1483
|
+
hole_diameter: z75.number(),
|
|
1484
|
+
rect_pad_width: z75.number(),
|
|
1485
|
+
rect_pad_height: z75.number(),
|
|
1486
|
+
rect_border_radius: z75.number().optional(),
|
|
1476
1487
|
hole_offset_x: distance.default(0),
|
|
1477
1488
|
hole_offset_y: distance.default(0),
|
|
1478
|
-
is_covered_with_solder_mask:
|
|
1489
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1479
1490
|
x: distance,
|
|
1480
1491
|
y: distance,
|
|
1481
|
-
layers:
|
|
1482
|
-
port_hints:
|
|
1483
|
-
pcb_component_id:
|
|
1484
|
-
pcb_port_id:
|
|
1492
|
+
layers: z75.array(layer_ref),
|
|
1493
|
+
port_hints: z75.array(z75.string()).optional(),
|
|
1494
|
+
pcb_component_id: z75.string().optional(),
|
|
1495
|
+
pcb_port_id: z75.string().optional(),
|
|
1485
1496
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1486
|
-
soldermask_margin:
|
|
1497
|
+
soldermask_margin: z75.number().optional()
|
|
1487
1498
|
});
|
|
1488
|
-
var pcb_pill_hole_with_rect_pad =
|
|
1489
|
-
type:
|
|
1490
|
-
shape:
|
|
1491
|
-
pcb_group_id:
|
|
1492
|
-
subcircuit_id:
|
|
1493
|
-
hole_shape:
|
|
1494
|
-
pad_shape:
|
|
1495
|
-
hole_width:
|
|
1496
|
-
hole_height:
|
|
1497
|
-
rect_pad_width:
|
|
1498
|
-
rect_pad_height:
|
|
1499
|
-
rect_border_radius:
|
|
1499
|
+
var pcb_pill_hole_with_rect_pad = z75.object({
|
|
1500
|
+
type: z75.literal("pcb_plated_hole"),
|
|
1501
|
+
shape: z75.literal("pill_hole_with_rect_pad"),
|
|
1502
|
+
pcb_group_id: z75.string().optional(),
|
|
1503
|
+
subcircuit_id: z75.string().optional(),
|
|
1504
|
+
hole_shape: z75.literal("pill"),
|
|
1505
|
+
pad_shape: z75.literal("rect"),
|
|
1506
|
+
hole_width: z75.number(),
|
|
1507
|
+
hole_height: z75.number(),
|
|
1508
|
+
rect_pad_width: z75.number(),
|
|
1509
|
+
rect_pad_height: z75.number(),
|
|
1510
|
+
rect_border_radius: z75.number().optional(),
|
|
1500
1511
|
hole_offset_x: distance.default(0),
|
|
1501
1512
|
hole_offset_y: distance.default(0),
|
|
1502
|
-
is_covered_with_solder_mask:
|
|
1513
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1503
1514
|
x: distance,
|
|
1504
1515
|
y: distance,
|
|
1505
|
-
layers:
|
|
1506
|
-
port_hints:
|
|
1507
|
-
pcb_component_id:
|
|
1508
|
-
pcb_port_id:
|
|
1516
|
+
layers: z75.array(layer_ref),
|
|
1517
|
+
port_hints: z75.array(z75.string()).optional(),
|
|
1518
|
+
pcb_component_id: z75.string().optional(),
|
|
1519
|
+
pcb_port_id: z75.string().optional(),
|
|
1509
1520
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1510
|
-
soldermask_margin:
|
|
1521
|
+
soldermask_margin: z75.number().optional()
|
|
1511
1522
|
});
|
|
1512
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
1513
|
-
type:
|
|
1514
|
-
shape:
|
|
1515
|
-
pcb_group_id:
|
|
1516
|
-
subcircuit_id:
|
|
1517
|
-
hole_shape:
|
|
1518
|
-
pad_shape:
|
|
1519
|
-
hole_width:
|
|
1520
|
-
hole_height:
|
|
1523
|
+
var pcb_rotated_pill_hole_with_rect_pad = z75.object({
|
|
1524
|
+
type: z75.literal("pcb_plated_hole"),
|
|
1525
|
+
shape: z75.literal("rotated_pill_hole_with_rect_pad"),
|
|
1526
|
+
pcb_group_id: z75.string().optional(),
|
|
1527
|
+
subcircuit_id: z75.string().optional(),
|
|
1528
|
+
hole_shape: z75.literal("rotated_pill"),
|
|
1529
|
+
pad_shape: z75.literal("rect"),
|
|
1530
|
+
hole_width: z75.number(),
|
|
1531
|
+
hole_height: z75.number(),
|
|
1521
1532
|
hole_ccw_rotation: rotation,
|
|
1522
|
-
rect_pad_width:
|
|
1523
|
-
rect_pad_height:
|
|
1524
|
-
rect_border_radius:
|
|
1533
|
+
rect_pad_width: z75.number(),
|
|
1534
|
+
rect_pad_height: z75.number(),
|
|
1535
|
+
rect_border_radius: z75.number().optional(),
|
|
1525
1536
|
rect_ccw_rotation: rotation,
|
|
1526
1537
|
hole_offset_x: distance.default(0),
|
|
1527
1538
|
hole_offset_y: distance.default(0),
|
|
1528
|
-
is_covered_with_solder_mask:
|
|
1539
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1529
1540
|
x: distance,
|
|
1530
1541
|
y: distance,
|
|
1531
|
-
layers:
|
|
1532
|
-
port_hints:
|
|
1533
|
-
pcb_component_id:
|
|
1534
|
-
pcb_port_id:
|
|
1542
|
+
layers: z75.array(layer_ref),
|
|
1543
|
+
port_hints: z75.array(z75.string()).optional(),
|
|
1544
|
+
pcb_component_id: z75.string().optional(),
|
|
1545
|
+
pcb_port_id: z75.string().optional(),
|
|
1535
1546
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1536
|
-
soldermask_margin:
|
|
1547
|
+
soldermask_margin: z75.number().optional()
|
|
1537
1548
|
});
|
|
1538
|
-
var pcb_hole_with_polygon_pad =
|
|
1539
|
-
type:
|
|
1540
|
-
shape:
|
|
1541
|
-
pcb_group_id:
|
|
1542
|
-
subcircuit_id:
|
|
1543
|
-
hole_shape:
|
|
1544
|
-
hole_diameter:
|
|
1545
|
-
hole_width:
|
|
1546
|
-
hole_height:
|
|
1547
|
-
pad_outline:
|
|
1548
|
-
|
|
1549
|
+
var pcb_hole_with_polygon_pad = z75.object({
|
|
1550
|
+
type: z75.literal("pcb_plated_hole"),
|
|
1551
|
+
shape: z75.literal("hole_with_polygon_pad"),
|
|
1552
|
+
pcb_group_id: z75.string().optional(),
|
|
1553
|
+
subcircuit_id: z75.string().optional(),
|
|
1554
|
+
hole_shape: z75.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
1555
|
+
hole_diameter: z75.number().optional(),
|
|
1556
|
+
hole_width: z75.number().optional(),
|
|
1557
|
+
hole_height: z75.number().optional(),
|
|
1558
|
+
pad_outline: z75.array(
|
|
1559
|
+
z75.object({
|
|
1549
1560
|
x: distance,
|
|
1550
1561
|
y: distance
|
|
1551
1562
|
})
|
|
1552
1563
|
).min(3),
|
|
1553
1564
|
hole_offset_x: distance.default(0),
|
|
1554
1565
|
hole_offset_y: distance.default(0),
|
|
1555
|
-
is_covered_with_solder_mask:
|
|
1566
|
+
is_covered_with_solder_mask: z75.boolean().optional(),
|
|
1556
1567
|
x: distance,
|
|
1557
1568
|
y: distance,
|
|
1558
|
-
layers:
|
|
1559
|
-
port_hints:
|
|
1560
|
-
pcb_component_id:
|
|
1561
|
-
pcb_port_id:
|
|
1569
|
+
layers: z75.array(layer_ref),
|
|
1570
|
+
port_hints: z75.array(z75.string()).optional(),
|
|
1571
|
+
pcb_component_id: z75.string().optional(),
|
|
1572
|
+
pcb_port_id: z75.string().optional(),
|
|
1562
1573
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
1563
|
-
soldermask_margin:
|
|
1574
|
+
soldermask_margin: z75.number().optional()
|
|
1564
1575
|
});
|
|
1565
|
-
var pcb_plated_hole =
|
|
1576
|
+
var pcb_plated_hole = z75.union([
|
|
1566
1577
|
pcb_plated_hole_circle,
|
|
1567
1578
|
pcb_plated_hole_oval,
|
|
1568
1579
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -1580,130 +1591,130 @@ expectTypesMatch(true);
|
|
|
1580
1591
|
expectTypesMatch(true);
|
|
1581
1592
|
|
|
1582
1593
|
// src/pcb/pcb_port.ts
|
|
1583
|
-
import { z as
|
|
1584
|
-
var pcb_port =
|
|
1585
|
-
type:
|
|
1594
|
+
import { z as z76 } from "zod";
|
|
1595
|
+
var pcb_port = z76.object({
|
|
1596
|
+
type: z76.literal("pcb_port"),
|
|
1586
1597
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
1587
|
-
pcb_group_id:
|
|
1588
|
-
subcircuit_id:
|
|
1589
|
-
source_port_id:
|
|
1590
|
-
pcb_component_id:
|
|
1598
|
+
pcb_group_id: z76.string().optional(),
|
|
1599
|
+
subcircuit_id: z76.string().optional(),
|
|
1600
|
+
source_port_id: z76.string(),
|
|
1601
|
+
pcb_component_id: z76.string().optional(),
|
|
1591
1602
|
x: distance,
|
|
1592
1603
|
y: distance,
|
|
1593
|
-
layers:
|
|
1594
|
-
is_board_pinout:
|
|
1604
|
+
layers: z76.array(layer_ref),
|
|
1605
|
+
is_board_pinout: z76.boolean().optional()
|
|
1595
1606
|
}).describe("Defines a port on the PCB");
|
|
1596
1607
|
expectTypesMatch(true);
|
|
1597
1608
|
|
|
1598
1609
|
// src/pcb/pcb_smtpad.ts
|
|
1599
|
-
import { z as
|
|
1600
|
-
var pcb_smtpad_circle =
|
|
1601
|
-
type:
|
|
1602
|
-
shape:
|
|
1610
|
+
import { z as z77 } from "zod";
|
|
1611
|
+
var pcb_smtpad_circle = z77.object({
|
|
1612
|
+
type: z77.literal("pcb_smtpad"),
|
|
1613
|
+
shape: z77.literal("circle"),
|
|
1603
1614
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1604
|
-
pcb_group_id:
|
|
1605
|
-
subcircuit_id:
|
|
1615
|
+
pcb_group_id: z77.string().optional(),
|
|
1616
|
+
subcircuit_id: z77.string().optional(),
|
|
1606
1617
|
x: distance,
|
|
1607
1618
|
y: distance,
|
|
1608
|
-
radius:
|
|
1619
|
+
radius: z77.number(),
|
|
1609
1620
|
layer: layer_ref,
|
|
1610
|
-
port_hints:
|
|
1611
|
-
pcb_component_id:
|
|
1612
|
-
pcb_port_id:
|
|
1613
|
-
is_covered_with_solder_mask:
|
|
1614
|
-
soldermask_margin:
|
|
1621
|
+
port_hints: z77.array(z77.string()).optional(),
|
|
1622
|
+
pcb_component_id: z77.string().optional(),
|
|
1623
|
+
pcb_port_id: z77.string().optional(),
|
|
1624
|
+
is_covered_with_solder_mask: z77.boolean().optional(),
|
|
1625
|
+
soldermask_margin: z77.number().optional()
|
|
1615
1626
|
});
|
|
1616
|
-
var pcb_smtpad_rect =
|
|
1617
|
-
type:
|
|
1618
|
-
shape:
|
|
1627
|
+
var pcb_smtpad_rect = z77.object({
|
|
1628
|
+
type: z77.literal("pcb_smtpad"),
|
|
1629
|
+
shape: z77.literal("rect"),
|
|
1619
1630
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1620
|
-
pcb_group_id:
|
|
1621
|
-
subcircuit_id:
|
|
1631
|
+
pcb_group_id: z77.string().optional(),
|
|
1632
|
+
subcircuit_id: z77.string().optional(),
|
|
1622
1633
|
x: distance,
|
|
1623
1634
|
y: distance,
|
|
1624
|
-
width:
|
|
1625
|
-
height:
|
|
1626
|
-
rect_border_radius:
|
|
1627
|
-
corner_radius:
|
|
1635
|
+
width: z77.number(),
|
|
1636
|
+
height: z77.number(),
|
|
1637
|
+
rect_border_radius: z77.number().optional(),
|
|
1638
|
+
corner_radius: z77.number().optional(),
|
|
1628
1639
|
layer: layer_ref,
|
|
1629
|
-
port_hints:
|
|
1630
|
-
pcb_component_id:
|
|
1631
|
-
pcb_port_id:
|
|
1632
|
-
is_covered_with_solder_mask:
|
|
1633
|
-
soldermask_margin:
|
|
1640
|
+
port_hints: z77.array(z77.string()).optional(),
|
|
1641
|
+
pcb_component_id: z77.string().optional(),
|
|
1642
|
+
pcb_port_id: z77.string().optional(),
|
|
1643
|
+
is_covered_with_solder_mask: z77.boolean().optional(),
|
|
1644
|
+
soldermask_margin: z77.number().optional()
|
|
1634
1645
|
});
|
|
1635
|
-
var pcb_smtpad_rotated_rect =
|
|
1636
|
-
type:
|
|
1637
|
-
shape:
|
|
1646
|
+
var pcb_smtpad_rotated_rect = z77.object({
|
|
1647
|
+
type: z77.literal("pcb_smtpad"),
|
|
1648
|
+
shape: z77.literal("rotated_rect"),
|
|
1638
1649
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1639
|
-
pcb_group_id:
|
|
1640
|
-
subcircuit_id:
|
|
1650
|
+
pcb_group_id: z77.string().optional(),
|
|
1651
|
+
subcircuit_id: z77.string().optional(),
|
|
1641
1652
|
x: distance,
|
|
1642
1653
|
y: distance,
|
|
1643
|
-
width:
|
|
1644
|
-
height:
|
|
1645
|
-
rect_border_radius:
|
|
1646
|
-
corner_radius:
|
|
1654
|
+
width: z77.number(),
|
|
1655
|
+
height: z77.number(),
|
|
1656
|
+
rect_border_radius: z77.number().optional(),
|
|
1657
|
+
corner_radius: z77.number().optional(),
|
|
1647
1658
|
ccw_rotation: rotation,
|
|
1648
1659
|
layer: layer_ref,
|
|
1649
|
-
port_hints:
|
|
1650
|
-
pcb_component_id:
|
|
1651
|
-
pcb_port_id:
|
|
1652
|
-
is_covered_with_solder_mask:
|
|
1653
|
-
soldermask_margin:
|
|
1660
|
+
port_hints: z77.array(z77.string()).optional(),
|
|
1661
|
+
pcb_component_id: z77.string().optional(),
|
|
1662
|
+
pcb_port_id: z77.string().optional(),
|
|
1663
|
+
is_covered_with_solder_mask: z77.boolean().optional(),
|
|
1664
|
+
soldermask_margin: z77.number().optional()
|
|
1654
1665
|
});
|
|
1655
|
-
var pcb_smtpad_pill =
|
|
1656
|
-
type:
|
|
1657
|
-
shape:
|
|
1666
|
+
var pcb_smtpad_pill = z77.object({
|
|
1667
|
+
type: z77.literal("pcb_smtpad"),
|
|
1668
|
+
shape: z77.literal("pill"),
|
|
1658
1669
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1659
|
-
pcb_group_id:
|
|
1660
|
-
subcircuit_id:
|
|
1670
|
+
pcb_group_id: z77.string().optional(),
|
|
1671
|
+
subcircuit_id: z77.string().optional(),
|
|
1661
1672
|
x: distance,
|
|
1662
1673
|
y: distance,
|
|
1663
|
-
width:
|
|
1664
|
-
height:
|
|
1665
|
-
radius:
|
|
1674
|
+
width: z77.number(),
|
|
1675
|
+
height: z77.number(),
|
|
1676
|
+
radius: z77.number(),
|
|
1666
1677
|
layer: layer_ref,
|
|
1667
|
-
port_hints:
|
|
1668
|
-
pcb_component_id:
|
|
1669
|
-
pcb_port_id:
|
|
1670
|
-
is_covered_with_solder_mask:
|
|
1671
|
-
soldermask_margin:
|
|
1678
|
+
port_hints: z77.array(z77.string()).optional(),
|
|
1679
|
+
pcb_component_id: z77.string().optional(),
|
|
1680
|
+
pcb_port_id: z77.string().optional(),
|
|
1681
|
+
is_covered_with_solder_mask: z77.boolean().optional(),
|
|
1682
|
+
soldermask_margin: z77.number().optional()
|
|
1672
1683
|
});
|
|
1673
|
-
var pcb_smtpad_rotated_pill =
|
|
1674
|
-
type:
|
|
1675
|
-
shape:
|
|
1684
|
+
var pcb_smtpad_rotated_pill = z77.object({
|
|
1685
|
+
type: z77.literal("pcb_smtpad"),
|
|
1686
|
+
shape: z77.literal("rotated_pill"),
|
|
1676
1687
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1677
|
-
pcb_group_id:
|
|
1678
|
-
subcircuit_id:
|
|
1688
|
+
pcb_group_id: z77.string().optional(),
|
|
1689
|
+
subcircuit_id: z77.string().optional(),
|
|
1679
1690
|
x: distance,
|
|
1680
1691
|
y: distance,
|
|
1681
|
-
width:
|
|
1682
|
-
height:
|
|
1683
|
-
radius:
|
|
1692
|
+
width: z77.number(),
|
|
1693
|
+
height: z77.number(),
|
|
1694
|
+
radius: z77.number(),
|
|
1684
1695
|
ccw_rotation: rotation,
|
|
1685
1696
|
layer: layer_ref,
|
|
1686
|
-
port_hints:
|
|
1687
|
-
pcb_component_id:
|
|
1688
|
-
pcb_port_id:
|
|
1689
|
-
is_covered_with_solder_mask:
|
|
1690
|
-
soldermask_margin:
|
|
1697
|
+
port_hints: z77.array(z77.string()).optional(),
|
|
1698
|
+
pcb_component_id: z77.string().optional(),
|
|
1699
|
+
pcb_port_id: z77.string().optional(),
|
|
1700
|
+
is_covered_with_solder_mask: z77.boolean().optional(),
|
|
1701
|
+
soldermask_margin: z77.number().optional()
|
|
1691
1702
|
});
|
|
1692
|
-
var pcb_smtpad_polygon =
|
|
1693
|
-
type:
|
|
1694
|
-
shape:
|
|
1703
|
+
var pcb_smtpad_polygon = z77.object({
|
|
1704
|
+
type: z77.literal("pcb_smtpad"),
|
|
1705
|
+
shape: z77.literal("polygon"),
|
|
1695
1706
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
1696
|
-
pcb_group_id:
|
|
1697
|
-
subcircuit_id:
|
|
1698
|
-
points:
|
|
1707
|
+
pcb_group_id: z77.string().optional(),
|
|
1708
|
+
subcircuit_id: z77.string().optional(),
|
|
1709
|
+
points: z77.array(point),
|
|
1699
1710
|
layer: layer_ref,
|
|
1700
|
-
port_hints:
|
|
1701
|
-
pcb_component_id:
|
|
1702
|
-
pcb_port_id:
|
|
1703
|
-
is_covered_with_solder_mask:
|
|
1704
|
-
soldermask_margin:
|
|
1711
|
+
port_hints: z77.array(z77.string()).optional(),
|
|
1712
|
+
pcb_component_id: z77.string().optional(),
|
|
1713
|
+
pcb_port_id: z77.string().optional(),
|
|
1714
|
+
is_covered_with_solder_mask: z77.boolean().optional(),
|
|
1715
|
+
soldermask_margin: z77.number().optional()
|
|
1705
1716
|
});
|
|
1706
|
-
var pcb_smtpad =
|
|
1717
|
+
var pcb_smtpad = z77.discriminatedUnion("shape", [
|
|
1707
1718
|
pcb_smtpad_circle,
|
|
1708
1719
|
pcb_smtpad_rect,
|
|
1709
1720
|
pcb_smtpad_rotated_rect,
|
|
@@ -1719,79 +1730,79 @@ expectTypesMatch(true);
|
|
|
1719
1730
|
expectTypesMatch(true);
|
|
1720
1731
|
|
|
1721
1732
|
// src/pcb/pcb_solder_paste.ts
|
|
1722
|
-
import { z as
|
|
1723
|
-
var pcb_solder_paste_circle =
|
|
1724
|
-
type:
|
|
1725
|
-
shape:
|
|
1733
|
+
import { z as z78 } from "zod";
|
|
1734
|
+
var pcb_solder_paste_circle = z78.object({
|
|
1735
|
+
type: z78.literal("pcb_solder_paste"),
|
|
1736
|
+
shape: z78.literal("circle"),
|
|
1726
1737
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1727
|
-
pcb_group_id:
|
|
1728
|
-
subcircuit_id:
|
|
1738
|
+
pcb_group_id: z78.string().optional(),
|
|
1739
|
+
subcircuit_id: z78.string().optional(),
|
|
1729
1740
|
x: distance,
|
|
1730
1741
|
y: distance,
|
|
1731
|
-
radius:
|
|
1742
|
+
radius: z78.number(),
|
|
1732
1743
|
layer: layer_ref,
|
|
1733
|
-
pcb_component_id:
|
|
1734
|
-
pcb_smtpad_id:
|
|
1744
|
+
pcb_component_id: z78.string().optional(),
|
|
1745
|
+
pcb_smtpad_id: z78.string().optional()
|
|
1735
1746
|
});
|
|
1736
|
-
var pcb_solder_paste_rect =
|
|
1737
|
-
type:
|
|
1738
|
-
shape:
|
|
1747
|
+
var pcb_solder_paste_rect = z78.object({
|
|
1748
|
+
type: z78.literal("pcb_solder_paste"),
|
|
1749
|
+
shape: z78.literal("rect"),
|
|
1739
1750
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1740
|
-
pcb_group_id:
|
|
1741
|
-
subcircuit_id:
|
|
1751
|
+
pcb_group_id: z78.string().optional(),
|
|
1752
|
+
subcircuit_id: z78.string().optional(),
|
|
1742
1753
|
x: distance,
|
|
1743
1754
|
y: distance,
|
|
1744
|
-
width:
|
|
1745
|
-
height:
|
|
1755
|
+
width: z78.number(),
|
|
1756
|
+
height: z78.number(),
|
|
1746
1757
|
layer: layer_ref,
|
|
1747
|
-
pcb_component_id:
|
|
1748
|
-
pcb_smtpad_id:
|
|
1758
|
+
pcb_component_id: z78.string().optional(),
|
|
1759
|
+
pcb_smtpad_id: z78.string().optional()
|
|
1749
1760
|
});
|
|
1750
|
-
var pcb_solder_paste_pill =
|
|
1751
|
-
type:
|
|
1752
|
-
shape:
|
|
1761
|
+
var pcb_solder_paste_pill = z78.object({
|
|
1762
|
+
type: z78.literal("pcb_solder_paste"),
|
|
1763
|
+
shape: z78.literal("pill"),
|
|
1753
1764
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1754
|
-
pcb_group_id:
|
|
1755
|
-
subcircuit_id:
|
|
1765
|
+
pcb_group_id: z78.string().optional(),
|
|
1766
|
+
subcircuit_id: z78.string().optional(),
|
|
1756
1767
|
x: distance,
|
|
1757
1768
|
y: distance,
|
|
1758
|
-
width:
|
|
1759
|
-
height:
|
|
1760
|
-
radius:
|
|
1769
|
+
width: z78.number(),
|
|
1770
|
+
height: z78.number(),
|
|
1771
|
+
radius: z78.number(),
|
|
1761
1772
|
layer: layer_ref,
|
|
1762
|
-
pcb_component_id:
|
|
1763
|
-
pcb_smtpad_id:
|
|
1773
|
+
pcb_component_id: z78.string().optional(),
|
|
1774
|
+
pcb_smtpad_id: z78.string().optional()
|
|
1764
1775
|
});
|
|
1765
|
-
var pcb_solder_paste_rotated_rect =
|
|
1766
|
-
type:
|
|
1767
|
-
shape:
|
|
1776
|
+
var pcb_solder_paste_rotated_rect = z78.object({
|
|
1777
|
+
type: z78.literal("pcb_solder_paste"),
|
|
1778
|
+
shape: z78.literal("rotated_rect"),
|
|
1768
1779
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1769
|
-
pcb_group_id:
|
|
1770
|
-
subcircuit_id:
|
|
1780
|
+
pcb_group_id: z78.string().optional(),
|
|
1781
|
+
subcircuit_id: z78.string().optional(),
|
|
1771
1782
|
x: distance,
|
|
1772
1783
|
y: distance,
|
|
1773
|
-
width:
|
|
1774
|
-
height:
|
|
1784
|
+
width: z78.number(),
|
|
1785
|
+
height: z78.number(),
|
|
1775
1786
|
ccw_rotation: distance,
|
|
1776
1787
|
layer: layer_ref,
|
|
1777
|
-
pcb_component_id:
|
|
1778
|
-
pcb_smtpad_id:
|
|
1788
|
+
pcb_component_id: z78.string().optional(),
|
|
1789
|
+
pcb_smtpad_id: z78.string().optional()
|
|
1779
1790
|
});
|
|
1780
|
-
var pcb_solder_paste_oval =
|
|
1781
|
-
type:
|
|
1782
|
-
shape:
|
|
1791
|
+
var pcb_solder_paste_oval = z78.object({
|
|
1792
|
+
type: z78.literal("pcb_solder_paste"),
|
|
1793
|
+
shape: z78.literal("oval"),
|
|
1783
1794
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
1784
|
-
pcb_group_id:
|
|
1785
|
-
subcircuit_id:
|
|
1795
|
+
pcb_group_id: z78.string().optional(),
|
|
1796
|
+
subcircuit_id: z78.string().optional(),
|
|
1786
1797
|
x: distance,
|
|
1787
1798
|
y: distance,
|
|
1788
|
-
width:
|
|
1789
|
-
height:
|
|
1799
|
+
width: z78.number(),
|
|
1800
|
+
height: z78.number(),
|
|
1790
1801
|
layer: layer_ref,
|
|
1791
|
-
pcb_component_id:
|
|
1792
|
-
pcb_smtpad_id:
|
|
1802
|
+
pcb_component_id: z78.string().optional(),
|
|
1803
|
+
pcb_smtpad_id: z78.string().optional()
|
|
1793
1804
|
});
|
|
1794
|
-
var pcb_solder_paste =
|
|
1805
|
+
var pcb_solder_paste = z78.union([
|
|
1795
1806
|
pcb_solder_paste_circle,
|
|
1796
1807
|
pcb_solder_paste_rect,
|
|
1797
1808
|
pcb_solder_paste_pill,
|
|
@@ -1807,146 +1818,146 @@ expectTypesMatch(
|
|
|
1807
1818
|
expectTypesMatch(true);
|
|
1808
1819
|
|
|
1809
1820
|
// src/pcb/pcb_text.ts
|
|
1810
|
-
import { z as
|
|
1811
|
-
var pcb_text =
|
|
1812
|
-
type:
|
|
1821
|
+
import { z as z79 } from "zod";
|
|
1822
|
+
var pcb_text = z79.object({
|
|
1823
|
+
type: z79.literal("pcb_text"),
|
|
1813
1824
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
1814
|
-
pcb_group_id:
|
|
1815
|
-
subcircuit_id:
|
|
1816
|
-
text:
|
|
1825
|
+
pcb_group_id: z79.string().optional(),
|
|
1826
|
+
subcircuit_id: z79.string().optional(),
|
|
1827
|
+
text: z79.string(),
|
|
1817
1828
|
center: point,
|
|
1818
1829
|
layer: layer_ref,
|
|
1819
1830
|
width: length,
|
|
1820
1831
|
height: length,
|
|
1821
|
-
lines:
|
|
1832
|
+
lines: z79.number(),
|
|
1822
1833
|
// @ts-ignore
|
|
1823
|
-
align:
|
|
1834
|
+
align: z79.enum(["bottom-left"])
|
|
1824
1835
|
}).describe("Defines text on the PCB");
|
|
1825
1836
|
expectTypesMatch(true);
|
|
1826
1837
|
|
|
1827
1838
|
// src/pcb/pcb_trace.ts
|
|
1828
|
-
import { z as
|
|
1829
|
-
var pcb_trace_route_point_wire =
|
|
1830
|
-
route_type:
|
|
1839
|
+
import { z as z80 } from "zod";
|
|
1840
|
+
var pcb_trace_route_point_wire = z80.object({
|
|
1841
|
+
route_type: z80.literal("wire"),
|
|
1831
1842
|
x: distance,
|
|
1832
1843
|
y: distance,
|
|
1833
1844
|
width: distance,
|
|
1834
|
-
start_pcb_port_id:
|
|
1835
|
-
end_pcb_port_id:
|
|
1845
|
+
start_pcb_port_id: z80.string().optional(),
|
|
1846
|
+
end_pcb_port_id: z80.string().optional(),
|
|
1836
1847
|
layer: layer_ref
|
|
1837
1848
|
});
|
|
1838
|
-
var pcb_trace_route_point_via =
|
|
1839
|
-
route_type:
|
|
1849
|
+
var pcb_trace_route_point_via = z80.object({
|
|
1850
|
+
route_type: z80.literal("via"),
|
|
1840
1851
|
x: distance,
|
|
1841
1852
|
y: distance,
|
|
1842
1853
|
hole_diameter: distance.optional(),
|
|
1843
1854
|
outer_diameter: distance.optional(),
|
|
1844
|
-
from_layer:
|
|
1845
|
-
to_layer:
|
|
1855
|
+
from_layer: z80.string(),
|
|
1856
|
+
to_layer: z80.string()
|
|
1846
1857
|
});
|
|
1847
|
-
var pcb_trace_route_point =
|
|
1858
|
+
var pcb_trace_route_point = z80.union([
|
|
1848
1859
|
pcb_trace_route_point_wire,
|
|
1849
1860
|
pcb_trace_route_point_via
|
|
1850
1861
|
]);
|
|
1851
|
-
var pcb_trace =
|
|
1852
|
-
type:
|
|
1853
|
-
source_trace_id:
|
|
1854
|
-
pcb_component_id:
|
|
1862
|
+
var pcb_trace = z80.object({
|
|
1863
|
+
type: z80.literal("pcb_trace"),
|
|
1864
|
+
source_trace_id: z80.string().optional(),
|
|
1865
|
+
pcb_component_id: z80.string().optional(),
|
|
1855
1866
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
1856
|
-
pcb_group_id:
|
|
1857
|
-
subcircuit_id:
|
|
1858
|
-
route_thickness_mode:
|
|
1859
|
-
route_order_index:
|
|
1860
|
-
should_round_corners:
|
|
1861
|
-
trace_length:
|
|
1862
|
-
highlight_color:
|
|
1863
|
-
route:
|
|
1867
|
+
pcb_group_id: z80.string().optional(),
|
|
1868
|
+
subcircuit_id: z80.string().optional(),
|
|
1869
|
+
route_thickness_mode: z80.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
1870
|
+
route_order_index: z80.number().optional(),
|
|
1871
|
+
should_round_corners: z80.boolean().optional(),
|
|
1872
|
+
trace_length: z80.number().optional(),
|
|
1873
|
+
highlight_color: z80.string().optional(),
|
|
1874
|
+
route: z80.array(pcb_trace_route_point)
|
|
1864
1875
|
}).describe("Defines a trace on the PCB");
|
|
1865
1876
|
expectTypesMatch(true);
|
|
1866
1877
|
expectTypesMatch(true);
|
|
1867
1878
|
|
|
1868
1879
|
// src/pcb/pcb_trace_error.ts
|
|
1869
|
-
import { z as
|
|
1870
|
-
var pcb_trace_error =
|
|
1871
|
-
type:
|
|
1880
|
+
import { z as z81 } from "zod";
|
|
1881
|
+
var pcb_trace_error = z81.object({
|
|
1882
|
+
type: z81.literal("pcb_trace_error"),
|
|
1872
1883
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
1873
|
-
error_type:
|
|
1874
|
-
message:
|
|
1884
|
+
error_type: z81.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
1885
|
+
message: z81.string(),
|
|
1875
1886
|
center: point.optional(),
|
|
1876
|
-
pcb_trace_id:
|
|
1877
|
-
source_trace_id:
|
|
1878
|
-
pcb_component_ids:
|
|
1879
|
-
pcb_port_ids:
|
|
1880
|
-
subcircuit_id:
|
|
1887
|
+
pcb_trace_id: z81.string(),
|
|
1888
|
+
source_trace_id: z81.string(),
|
|
1889
|
+
pcb_component_ids: z81.array(z81.string()),
|
|
1890
|
+
pcb_port_ids: z81.array(z81.string()),
|
|
1891
|
+
subcircuit_id: z81.string().optional()
|
|
1881
1892
|
}).describe("Defines a trace error on the PCB");
|
|
1882
1893
|
expectTypesMatch(true);
|
|
1883
1894
|
|
|
1884
1895
|
// src/pcb/pcb_trace_missing_error.ts
|
|
1885
|
-
import { z as
|
|
1886
|
-
var pcb_trace_missing_error =
|
|
1887
|
-
type:
|
|
1896
|
+
import { z as z82 } from "zod";
|
|
1897
|
+
var pcb_trace_missing_error = z82.object({
|
|
1898
|
+
type: z82.literal("pcb_trace_missing_error"),
|
|
1888
1899
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
1889
1900
|
"pcb_trace_missing_error"
|
|
1890
1901
|
),
|
|
1891
|
-
error_type:
|
|
1892
|
-
message:
|
|
1902
|
+
error_type: z82.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
1903
|
+
message: z82.string(),
|
|
1893
1904
|
center: point.optional(),
|
|
1894
|
-
source_trace_id:
|
|
1895
|
-
pcb_component_ids:
|
|
1896
|
-
pcb_port_ids:
|
|
1897
|
-
subcircuit_id:
|
|
1905
|
+
source_trace_id: z82.string(),
|
|
1906
|
+
pcb_component_ids: z82.array(z82.string()),
|
|
1907
|
+
pcb_port_ids: z82.array(z82.string()),
|
|
1908
|
+
subcircuit_id: z82.string().optional()
|
|
1898
1909
|
}).describe(
|
|
1899
1910
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
1900
1911
|
);
|
|
1901
1912
|
expectTypesMatch(true);
|
|
1902
1913
|
|
|
1903
1914
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
1904
|
-
import { z as
|
|
1905
|
-
var pcb_port_not_matched_error =
|
|
1906
|
-
type:
|
|
1915
|
+
import { z as z83 } from "zod";
|
|
1916
|
+
var pcb_port_not_matched_error = z83.object({
|
|
1917
|
+
type: z83.literal("pcb_port_not_matched_error"),
|
|
1907
1918
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
1908
|
-
error_type:
|
|
1909
|
-
message:
|
|
1910
|
-
pcb_component_ids:
|
|
1911
|
-
subcircuit_id:
|
|
1919
|
+
error_type: z83.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
1920
|
+
message: z83.string(),
|
|
1921
|
+
pcb_component_ids: z83.array(z83.string()),
|
|
1922
|
+
subcircuit_id: z83.string().optional()
|
|
1912
1923
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
1913
1924
|
expectTypesMatch(true);
|
|
1914
1925
|
|
|
1915
1926
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
1916
|
-
import { z as
|
|
1917
|
-
var pcb_port_not_connected_error =
|
|
1918
|
-
type:
|
|
1927
|
+
import { z as z84 } from "zod";
|
|
1928
|
+
var pcb_port_not_connected_error = z84.object({
|
|
1929
|
+
type: z84.literal("pcb_port_not_connected_error"),
|
|
1919
1930
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
1920
1931
|
"pcb_port_not_connected_error"
|
|
1921
1932
|
),
|
|
1922
|
-
error_type:
|
|
1923
|
-
message:
|
|
1924
|
-
pcb_port_ids:
|
|
1925
|
-
pcb_component_ids:
|
|
1926
|
-
subcircuit_id:
|
|
1933
|
+
error_type: z84.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
1934
|
+
message: z84.string(),
|
|
1935
|
+
pcb_port_ids: z84.array(z84.string()),
|
|
1936
|
+
pcb_component_ids: z84.array(z84.string()),
|
|
1937
|
+
subcircuit_id: z84.string().optional()
|
|
1927
1938
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
1928
1939
|
expectTypesMatch(
|
|
1929
1940
|
true
|
|
1930
1941
|
);
|
|
1931
1942
|
|
|
1932
1943
|
// src/pcb/pcb_net.ts
|
|
1933
|
-
import { z as
|
|
1934
|
-
var pcb_net =
|
|
1935
|
-
type:
|
|
1944
|
+
import { z as z85 } from "zod";
|
|
1945
|
+
var pcb_net = z85.object({
|
|
1946
|
+
type: z85.literal("pcb_net"),
|
|
1936
1947
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
1937
|
-
source_net_id:
|
|
1938
|
-
highlight_color:
|
|
1948
|
+
source_net_id: z85.string().optional(),
|
|
1949
|
+
highlight_color: z85.string().optional()
|
|
1939
1950
|
}).describe("Defines a net on the PCB");
|
|
1940
1951
|
expectTypesMatch(true);
|
|
1941
1952
|
|
|
1942
1953
|
// src/pcb/pcb_via.ts
|
|
1943
|
-
import { z as
|
|
1944
|
-
var pcb_via =
|
|
1945
|
-
type:
|
|
1954
|
+
import { z as z86 } from "zod";
|
|
1955
|
+
var pcb_via = z86.object({
|
|
1956
|
+
type: z86.literal("pcb_via"),
|
|
1946
1957
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
1947
|
-
pcb_group_id:
|
|
1948
|
-
subcircuit_id:
|
|
1949
|
-
subcircuit_connectivity_map_key:
|
|
1958
|
+
pcb_group_id: z86.string().optional(),
|
|
1959
|
+
subcircuit_id: z86.string().optional(),
|
|
1960
|
+
subcircuit_connectivity_map_key: z86.string().optional(),
|
|
1950
1961
|
x: distance,
|
|
1951
1962
|
y: distance,
|
|
1952
1963
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -1955,76 +1966,76 @@ var pcb_via = z85.object({
|
|
|
1955
1966
|
from_layer: layer_ref.optional(),
|
|
1956
1967
|
/** @deprecated */
|
|
1957
1968
|
to_layer: layer_ref.optional(),
|
|
1958
|
-
layers:
|
|
1959
|
-
pcb_trace_id:
|
|
1960
|
-
net_is_assignable:
|
|
1961
|
-
net_assigned:
|
|
1962
|
-
is_tented:
|
|
1969
|
+
layers: z86.array(layer_ref),
|
|
1970
|
+
pcb_trace_id: z86.string().optional(),
|
|
1971
|
+
net_is_assignable: z86.boolean().optional(),
|
|
1972
|
+
net_assigned: z86.boolean().optional(),
|
|
1973
|
+
is_tented: z86.boolean().optional()
|
|
1963
1974
|
}).describe("Defines a via on the PCB");
|
|
1964
1975
|
expectTypesMatch(true);
|
|
1965
1976
|
|
|
1966
1977
|
// src/pcb/pcb_board.ts
|
|
1967
|
-
import { z as
|
|
1968
|
-
var pcb_board =
|
|
1969
|
-
type:
|
|
1978
|
+
import { z as z87 } from "zod";
|
|
1979
|
+
var pcb_board = z87.object({
|
|
1980
|
+
type: z87.literal("pcb_board"),
|
|
1970
1981
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
1971
|
-
pcb_panel_id:
|
|
1972
|
-
is_subcircuit:
|
|
1973
|
-
subcircuit_id:
|
|
1982
|
+
pcb_panel_id: z87.string().optional(),
|
|
1983
|
+
is_subcircuit: z87.boolean().optional(),
|
|
1984
|
+
subcircuit_id: z87.string().optional(),
|
|
1974
1985
|
width: length.optional(),
|
|
1975
1986
|
height: length.optional(),
|
|
1976
1987
|
center: point,
|
|
1977
1988
|
thickness: length.optional().default(1.4),
|
|
1978
|
-
num_layers:
|
|
1979
|
-
outline:
|
|
1980
|
-
shape:
|
|
1981
|
-
material:
|
|
1989
|
+
num_layers: z87.number().optional().default(4),
|
|
1990
|
+
outline: z87.array(point).optional(),
|
|
1991
|
+
shape: z87.enum(["rect", "polygon"]).optional(),
|
|
1992
|
+
material: z87.enum(["fr4", "fr1"]).default("fr4")
|
|
1982
1993
|
}).describe("Defines the board outline of the PCB");
|
|
1983
1994
|
expectTypesMatch(true);
|
|
1984
1995
|
|
|
1985
1996
|
// src/pcb/pcb_panel.ts
|
|
1986
|
-
import { z as
|
|
1987
|
-
var pcb_panel =
|
|
1988
|
-
type:
|
|
1997
|
+
import { z as z88 } from "zod";
|
|
1998
|
+
var pcb_panel = z88.object({
|
|
1999
|
+
type: z88.literal("pcb_panel"),
|
|
1989
2000
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
1990
2001
|
width: length,
|
|
1991
2002
|
height: length,
|
|
1992
2003
|
center: point,
|
|
1993
|
-
covered_with_solder_mask:
|
|
2004
|
+
covered_with_solder_mask: z88.boolean().optional().default(true)
|
|
1994
2005
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
1995
2006
|
expectTypesMatch(true);
|
|
1996
2007
|
|
|
1997
2008
|
// src/pcb/pcb_placement_error.ts
|
|
1998
|
-
import { z as
|
|
1999
|
-
var pcb_placement_error =
|
|
2000
|
-
type:
|
|
2009
|
+
import { z as z89 } from "zod";
|
|
2010
|
+
var pcb_placement_error = z89.object({
|
|
2011
|
+
type: z89.literal("pcb_placement_error"),
|
|
2001
2012
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
2002
|
-
error_type:
|
|
2003
|
-
message:
|
|
2004
|
-
subcircuit_id:
|
|
2013
|
+
error_type: z89.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
2014
|
+
message: z89.string(),
|
|
2015
|
+
subcircuit_id: z89.string().optional()
|
|
2005
2016
|
}).describe("Defines a placement error on the PCB");
|
|
2006
2017
|
expectTypesMatch(true);
|
|
2007
2018
|
|
|
2008
2019
|
// src/pcb/pcb_trace_hint.ts
|
|
2009
|
-
import { z as
|
|
2010
|
-
var pcb_trace_hint =
|
|
2011
|
-
type:
|
|
2020
|
+
import { z as z90 } from "zod";
|
|
2021
|
+
var pcb_trace_hint = z90.object({
|
|
2022
|
+
type: z90.literal("pcb_trace_hint"),
|
|
2012
2023
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
2013
|
-
pcb_port_id:
|
|
2014
|
-
pcb_component_id:
|
|
2015
|
-
route:
|
|
2016
|
-
subcircuit_id:
|
|
2024
|
+
pcb_port_id: z90.string(),
|
|
2025
|
+
pcb_component_id: z90.string(),
|
|
2026
|
+
route: z90.array(route_hint_point),
|
|
2027
|
+
subcircuit_id: z90.string().optional()
|
|
2017
2028
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
2018
2029
|
expectTypesMatch(true);
|
|
2019
2030
|
|
|
2020
2031
|
// src/pcb/pcb_silkscreen_line.ts
|
|
2021
|
-
import { z as
|
|
2022
|
-
var pcb_silkscreen_line =
|
|
2023
|
-
type:
|
|
2032
|
+
import { z as z91 } from "zod";
|
|
2033
|
+
var pcb_silkscreen_line = z91.object({
|
|
2034
|
+
type: z91.literal("pcb_silkscreen_line"),
|
|
2024
2035
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
2025
|
-
pcb_component_id:
|
|
2026
|
-
pcb_group_id:
|
|
2027
|
-
subcircuit_id:
|
|
2036
|
+
pcb_component_id: z91.string(),
|
|
2037
|
+
pcb_group_id: z91.string().optional(),
|
|
2038
|
+
subcircuit_id: z91.string().optional(),
|
|
2028
2039
|
stroke_width: distance.default("0.1mm"),
|
|
2029
2040
|
x1: distance,
|
|
2030
2041
|
y1: distance,
|
|
@@ -2035,32 +2046,32 @@ var pcb_silkscreen_line = z90.object({
|
|
|
2035
2046
|
expectTypesMatch(true);
|
|
2036
2047
|
|
|
2037
2048
|
// src/pcb/pcb_silkscreen_path.ts
|
|
2038
|
-
import { z as
|
|
2039
|
-
var pcb_silkscreen_path =
|
|
2040
|
-
type:
|
|
2049
|
+
import { z as z92 } from "zod";
|
|
2050
|
+
var pcb_silkscreen_path = z92.object({
|
|
2051
|
+
type: z92.literal("pcb_silkscreen_path"),
|
|
2041
2052
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
2042
|
-
pcb_component_id:
|
|
2043
|
-
pcb_group_id:
|
|
2044
|
-
subcircuit_id:
|
|
2053
|
+
pcb_component_id: z92.string(),
|
|
2054
|
+
pcb_group_id: z92.string().optional(),
|
|
2055
|
+
subcircuit_id: z92.string().optional(),
|
|
2045
2056
|
layer: visible_layer,
|
|
2046
|
-
route:
|
|
2057
|
+
route: z92.array(point),
|
|
2047
2058
|
stroke_width: length
|
|
2048
2059
|
}).describe("Defines a silkscreen path on the PCB");
|
|
2049
2060
|
expectTypesMatch(true);
|
|
2050
2061
|
|
|
2051
2062
|
// src/pcb/pcb_silkscreen_text.ts
|
|
2052
|
-
import { z as
|
|
2053
|
-
var pcb_silkscreen_text =
|
|
2054
|
-
type:
|
|
2063
|
+
import { z as z93 } from "zod";
|
|
2064
|
+
var pcb_silkscreen_text = z93.object({
|
|
2065
|
+
type: z93.literal("pcb_silkscreen_text"),
|
|
2055
2066
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
2056
|
-
pcb_group_id:
|
|
2057
|
-
subcircuit_id:
|
|
2058
|
-
font:
|
|
2067
|
+
pcb_group_id: z93.string().optional(),
|
|
2068
|
+
subcircuit_id: z93.string().optional(),
|
|
2069
|
+
font: z93.literal("tscircuit2024").default("tscircuit2024"),
|
|
2059
2070
|
font_size: distance.default("0.2mm"),
|
|
2060
|
-
pcb_component_id:
|
|
2061
|
-
text:
|
|
2062
|
-
is_knockout:
|
|
2063
|
-
knockout_padding:
|
|
2071
|
+
pcb_component_id: z93.string(),
|
|
2072
|
+
text: z93.string(),
|
|
2073
|
+
is_knockout: z93.boolean().default(false).optional(),
|
|
2074
|
+
knockout_padding: z93.object({
|
|
2064
2075
|
left: length,
|
|
2065
2076
|
top: length,
|
|
2066
2077
|
bottom: length,
|
|
@@ -2071,27 +2082,27 @@ var pcb_silkscreen_text = z92.object({
|
|
|
2071
2082
|
bottom: "0.2mm",
|
|
2072
2083
|
right: "0.2mm"
|
|
2073
2084
|
}).optional(),
|
|
2074
|
-
ccw_rotation:
|
|
2085
|
+
ccw_rotation: z93.number().optional(),
|
|
2075
2086
|
layer: layer_ref,
|
|
2076
|
-
is_mirrored:
|
|
2087
|
+
is_mirrored: z93.boolean().default(false).optional(),
|
|
2077
2088
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2078
2089
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2079
2090
|
}).describe("Defines silkscreen text on the PCB");
|
|
2080
2091
|
expectTypesMatch(true);
|
|
2081
2092
|
|
|
2082
2093
|
// src/pcb/pcb_copper_text.ts
|
|
2083
|
-
import { z as
|
|
2084
|
-
var pcb_copper_text =
|
|
2085
|
-
type:
|
|
2094
|
+
import { z as z94 } from "zod";
|
|
2095
|
+
var pcb_copper_text = z94.object({
|
|
2096
|
+
type: z94.literal("pcb_copper_text"),
|
|
2086
2097
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2087
|
-
pcb_group_id:
|
|
2088
|
-
subcircuit_id:
|
|
2089
|
-
font:
|
|
2098
|
+
pcb_group_id: z94.string().optional(),
|
|
2099
|
+
subcircuit_id: z94.string().optional(),
|
|
2100
|
+
font: z94.literal("tscircuit2024").default("tscircuit2024"),
|
|
2090
2101
|
font_size: distance.default("0.2mm"),
|
|
2091
|
-
pcb_component_id:
|
|
2092
|
-
text:
|
|
2093
|
-
is_knockout:
|
|
2094
|
-
knockout_padding:
|
|
2102
|
+
pcb_component_id: z94.string(),
|
|
2103
|
+
text: z94.string(),
|
|
2104
|
+
is_knockout: z94.boolean().default(false).optional(),
|
|
2105
|
+
knockout_padding: z94.object({
|
|
2095
2106
|
left: length,
|
|
2096
2107
|
top: length,
|
|
2097
2108
|
bottom: length,
|
|
@@ -2102,44 +2113,44 @@ var pcb_copper_text = z93.object({
|
|
|
2102
2113
|
bottom: "0.2mm",
|
|
2103
2114
|
right: "0.2mm"
|
|
2104
2115
|
}).optional(),
|
|
2105
|
-
ccw_rotation:
|
|
2116
|
+
ccw_rotation: z94.number().optional(),
|
|
2106
2117
|
layer: layer_ref,
|
|
2107
|
-
is_mirrored:
|
|
2118
|
+
is_mirrored: z94.boolean().default(false).optional(),
|
|
2108
2119
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2109
2120
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2110
2121
|
}).describe("Defines copper text on the PCB");
|
|
2111
2122
|
expectTypesMatch(true);
|
|
2112
2123
|
|
|
2113
2124
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
2114
|
-
import { z as
|
|
2115
|
-
var pcb_silkscreen_rect =
|
|
2116
|
-
type:
|
|
2125
|
+
import { z as z95 } from "zod";
|
|
2126
|
+
var pcb_silkscreen_rect = z95.object({
|
|
2127
|
+
type: z95.literal("pcb_silkscreen_rect"),
|
|
2117
2128
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2118
|
-
pcb_component_id:
|
|
2119
|
-
pcb_group_id:
|
|
2120
|
-
subcircuit_id:
|
|
2129
|
+
pcb_component_id: z95.string(),
|
|
2130
|
+
pcb_group_id: z95.string().optional(),
|
|
2131
|
+
subcircuit_id: z95.string().optional(),
|
|
2121
2132
|
center: point,
|
|
2122
2133
|
width: length,
|
|
2123
2134
|
height: length,
|
|
2124
2135
|
layer: layer_ref,
|
|
2125
2136
|
stroke_width: length.default("1mm"),
|
|
2126
2137
|
corner_radius: length.optional(),
|
|
2127
|
-
is_filled:
|
|
2128
|
-
has_stroke:
|
|
2129
|
-
is_stroke_dashed:
|
|
2138
|
+
is_filled: z95.boolean().default(true).optional(),
|
|
2139
|
+
has_stroke: z95.boolean().optional(),
|
|
2140
|
+
is_stroke_dashed: z95.boolean().optional()
|
|
2130
2141
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2131
2142
|
expectTypesMatch(true);
|
|
2132
2143
|
|
|
2133
2144
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
2134
|
-
import { z as
|
|
2135
|
-
var pcb_silkscreen_circle =
|
|
2136
|
-
type:
|
|
2145
|
+
import { z as z96 } from "zod";
|
|
2146
|
+
var pcb_silkscreen_circle = z96.object({
|
|
2147
|
+
type: z96.literal("pcb_silkscreen_circle"),
|
|
2137
2148
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2138
2149
|
"pcb_silkscreen_circle"
|
|
2139
2150
|
),
|
|
2140
|
-
pcb_component_id:
|
|
2141
|
-
pcb_group_id:
|
|
2142
|
-
subcircuit_id:
|
|
2151
|
+
pcb_component_id: z96.string(),
|
|
2152
|
+
pcb_group_id: z96.string().optional(),
|
|
2153
|
+
subcircuit_id: z96.string().optional(),
|
|
2143
2154
|
center: point,
|
|
2144
2155
|
radius: length,
|
|
2145
2156
|
layer: visible_layer,
|
|
@@ -2148,13 +2159,13 @@ var pcb_silkscreen_circle = z95.object({
|
|
|
2148
2159
|
expectTypesMatch(true);
|
|
2149
2160
|
|
|
2150
2161
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
2151
|
-
import { z as
|
|
2152
|
-
var pcb_silkscreen_oval =
|
|
2153
|
-
type:
|
|
2162
|
+
import { z as z97 } from "zod";
|
|
2163
|
+
var pcb_silkscreen_oval = z97.object({
|
|
2164
|
+
type: z97.literal("pcb_silkscreen_oval"),
|
|
2154
2165
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
2155
|
-
pcb_component_id:
|
|
2156
|
-
pcb_group_id:
|
|
2157
|
-
subcircuit_id:
|
|
2166
|
+
pcb_component_id: z97.string(),
|
|
2167
|
+
pcb_group_id: z97.string().optional(),
|
|
2168
|
+
subcircuit_id: z97.string().optional(),
|
|
2158
2169
|
center: point,
|
|
2159
2170
|
radius_x: distance,
|
|
2160
2171
|
radius_y: distance,
|
|
@@ -2163,257 +2174,257 @@ var pcb_silkscreen_oval = z96.object({
|
|
|
2163
2174
|
expectTypesMatch(true);
|
|
2164
2175
|
|
|
2165
2176
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
2166
|
-
import { z as
|
|
2167
|
-
var pcb_fabrication_note_text =
|
|
2168
|
-
type:
|
|
2177
|
+
import { z as z98 } from "zod";
|
|
2178
|
+
var pcb_fabrication_note_text = z98.object({
|
|
2179
|
+
type: z98.literal("pcb_fabrication_note_text"),
|
|
2169
2180
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2170
2181
|
"pcb_fabrication_note_text"
|
|
2171
2182
|
),
|
|
2172
|
-
subcircuit_id:
|
|
2173
|
-
pcb_group_id:
|
|
2174
|
-
font:
|
|
2183
|
+
subcircuit_id: z98.string().optional(),
|
|
2184
|
+
pcb_group_id: z98.string().optional(),
|
|
2185
|
+
font: z98.literal("tscircuit2024").default("tscircuit2024"),
|
|
2175
2186
|
font_size: distance.default("1mm"),
|
|
2176
|
-
pcb_component_id:
|
|
2177
|
-
text:
|
|
2187
|
+
pcb_component_id: z98.string(),
|
|
2188
|
+
text: z98.string(),
|
|
2178
2189
|
layer: visible_layer,
|
|
2179
2190
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2180
|
-
anchor_alignment:
|
|
2181
|
-
color:
|
|
2191
|
+
anchor_alignment: z98.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2192
|
+
color: z98.string().optional()
|
|
2182
2193
|
}).describe(
|
|
2183
2194
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2184
2195
|
);
|
|
2185
2196
|
expectTypesMatch(true);
|
|
2186
2197
|
|
|
2187
2198
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2188
|
-
import { z as
|
|
2189
|
-
var pcb_fabrication_note_path =
|
|
2190
|
-
type:
|
|
2199
|
+
import { z as z99 } from "zod";
|
|
2200
|
+
var pcb_fabrication_note_path = z99.object({
|
|
2201
|
+
type: z99.literal("pcb_fabrication_note_path"),
|
|
2191
2202
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2192
2203
|
"pcb_fabrication_note_path"
|
|
2193
2204
|
),
|
|
2194
|
-
pcb_component_id:
|
|
2195
|
-
subcircuit_id:
|
|
2205
|
+
pcb_component_id: z99.string(),
|
|
2206
|
+
subcircuit_id: z99.string().optional(),
|
|
2196
2207
|
layer: layer_ref,
|
|
2197
|
-
route:
|
|
2208
|
+
route: z99.array(point),
|
|
2198
2209
|
stroke_width: length,
|
|
2199
|
-
color:
|
|
2210
|
+
color: z99.string().optional()
|
|
2200
2211
|
}).describe(
|
|
2201
2212
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2202
2213
|
);
|
|
2203
2214
|
expectTypesMatch(true);
|
|
2204
2215
|
|
|
2205
2216
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2206
|
-
import { z as
|
|
2207
|
-
var pcb_fabrication_note_rect =
|
|
2208
|
-
type:
|
|
2217
|
+
import { z as z100 } from "zod";
|
|
2218
|
+
var pcb_fabrication_note_rect = z100.object({
|
|
2219
|
+
type: z100.literal("pcb_fabrication_note_rect"),
|
|
2209
2220
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2210
2221
|
"pcb_fabrication_note_rect"
|
|
2211
2222
|
),
|
|
2212
|
-
pcb_component_id:
|
|
2213
|
-
pcb_group_id:
|
|
2214
|
-
subcircuit_id:
|
|
2223
|
+
pcb_component_id: z100.string(),
|
|
2224
|
+
pcb_group_id: z100.string().optional(),
|
|
2225
|
+
subcircuit_id: z100.string().optional(),
|
|
2215
2226
|
center: point,
|
|
2216
2227
|
width: length,
|
|
2217
2228
|
height: length,
|
|
2218
2229
|
layer: visible_layer,
|
|
2219
2230
|
stroke_width: length.default("0.1mm"),
|
|
2220
2231
|
corner_radius: length.optional(),
|
|
2221
|
-
is_filled:
|
|
2222
|
-
has_stroke:
|
|
2223
|
-
is_stroke_dashed:
|
|
2224
|
-
color:
|
|
2232
|
+
is_filled: z100.boolean().optional(),
|
|
2233
|
+
has_stroke: z100.boolean().optional(),
|
|
2234
|
+
is_stroke_dashed: z100.boolean().optional(),
|
|
2235
|
+
color: z100.string().optional()
|
|
2225
2236
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2226
2237
|
expectTypesMatch(true);
|
|
2227
2238
|
|
|
2228
2239
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2229
|
-
import { z as
|
|
2230
|
-
var pcb_fabrication_note_dimension =
|
|
2231
|
-
type:
|
|
2240
|
+
import { z as z101 } from "zod";
|
|
2241
|
+
var pcb_fabrication_note_dimension = z101.object({
|
|
2242
|
+
type: z101.literal("pcb_fabrication_note_dimension"),
|
|
2232
2243
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2233
2244
|
"pcb_fabrication_note_dimension"
|
|
2234
2245
|
),
|
|
2235
|
-
pcb_component_id:
|
|
2236
|
-
pcb_group_id:
|
|
2237
|
-
subcircuit_id:
|
|
2246
|
+
pcb_component_id: z101.string(),
|
|
2247
|
+
pcb_group_id: z101.string().optional(),
|
|
2248
|
+
subcircuit_id: z101.string().optional(),
|
|
2238
2249
|
layer: visible_layer,
|
|
2239
2250
|
from: point,
|
|
2240
2251
|
to: point,
|
|
2241
|
-
text:
|
|
2242
|
-
text_ccw_rotation:
|
|
2252
|
+
text: z101.string().optional(),
|
|
2253
|
+
text_ccw_rotation: z101.number().optional(),
|
|
2243
2254
|
offset: length.optional(),
|
|
2244
2255
|
offset_distance: length.optional(),
|
|
2245
|
-
offset_direction:
|
|
2246
|
-
x:
|
|
2247
|
-
y:
|
|
2256
|
+
offset_direction: z101.object({
|
|
2257
|
+
x: z101.number(),
|
|
2258
|
+
y: z101.number()
|
|
2248
2259
|
}).optional(),
|
|
2249
|
-
font:
|
|
2260
|
+
font: z101.literal("tscircuit2024").default("tscircuit2024"),
|
|
2250
2261
|
font_size: length.default("1mm"),
|
|
2251
|
-
color:
|
|
2262
|
+
color: z101.string().optional(),
|
|
2252
2263
|
arrow_size: length.default("1mm")
|
|
2253
2264
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2254
2265
|
expectTypesMatch(true);
|
|
2255
2266
|
|
|
2256
2267
|
// src/pcb/pcb_note_text.ts
|
|
2257
|
-
import { z as z101 } from "zod";
|
|
2258
|
-
var pcb_note_text = z101.object({
|
|
2259
|
-
type: z101.literal("pcb_note_text"),
|
|
2260
|
-
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2261
|
-
pcb_component_id: z101.string().optional(),
|
|
2262
|
-
pcb_group_id: z101.string().optional(),
|
|
2263
|
-
subcircuit_id: z101.string().optional(),
|
|
2264
|
-
name: z101.string().optional(),
|
|
2265
|
-
font: z101.literal("tscircuit2024").default("tscircuit2024"),
|
|
2266
|
-
font_size: distance.default("1mm"),
|
|
2267
|
-
text: z101.string().optional(),
|
|
2268
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2269
|
-
anchor_alignment: z101.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2270
|
-
color: z101.string().optional()
|
|
2271
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
2272
|
-
expectTypesMatch(true);
|
|
2273
|
-
|
|
2274
|
-
// src/pcb/pcb_note_rect.ts
|
|
2275
2268
|
import { z as z102 } from "zod";
|
|
2276
|
-
var
|
|
2277
|
-
type: z102.literal("
|
|
2278
|
-
|
|
2269
|
+
var pcb_note_text = z102.object({
|
|
2270
|
+
type: z102.literal("pcb_note_text"),
|
|
2271
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2279
2272
|
pcb_component_id: z102.string().optional(),
|
|
2280
2273
|
pcb_group_id: z102.string().optional(),
|
|
2281
2274
|
subcircuit_id: z102.string().optional(),
|
|
2282
2275
|
name: z102.string().optional(),
|
|
2276
|
+
font: z102.literal("tscircuit2024").default("tscircuit2024"),
|
|
2277
|
+
font_size: distance.default("1mm"),
|
|
2283
2278
|
text: z102.string().optional(),
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
height: length,
|
|
2287
|
-
stroke_width: length.default("0.1mm"),
|
|
2288
|
-
corner_radius: length.optional(),
|
|
2289
|
-
is_filled: z102.boolean().optional(),
|
|
2290
|
-
has_stroke: z102.boolean().optional(),
|
|
2291
|
-
is_stroke_dashed: z102.boolean().optional(),
|
|
2279
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2280
|
+
anchor_alignment: z102.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2292
2281
|
color: z102.string().optional()
|
|
2293
|
-
}).describe("Defines a
|
|
2282
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
2294
2283
|
expectTypesMatch(true);
|
|
2295
2284
|
|
|
2296
|
-
// src/pcb/
|
|
2285
|
+
// src/pcb/pcb_note_rect.ts
|
|
2297
2286
|
import { z as z103 } from "zod";
|
|
2298
|
-
var
|
|
2299
|
-
type: z103.literal("
|
|
2300
|
-
|
|
2287
|
+
var pcb_note_rect = z103.object({
|
|
2288
|
+
type: z103.literal("pcb_note_rect"),
|
|
2289
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2301
2290
|
pcb_component_id: z103.string().optional(),
|
|
2302
2291
|
pcb_group_id: z103.string().optional(),
|
|
2303
2292
|
subcircuit_id: z103.string().optional(),
|
|
2304
2293
|
name: z103.string().optional(),
|
|
2305
2294
|
text: z103.string().optional(),
|
|
2306
|
-
|
|
2295
|
+
center: point,
|
|
2296
|
+
width: length,
|
|
2297
|
+
height: length,
|
|
2307
2298
|
stroke_width: length.default("0.1mm"),
|
|
2299
|
+
corner_radius: length.optional(),
|
|
2300
|
+
is_filled: z103.boolean().optional(),
|
|
2301
|
+
has_stroke: z103.boolean().optional(),
|
|
2302
|
+
is_stroke_dashed: z103.boolean().optional(),
|
|
2308
2303
|
color: z103.string().optional()
|
|
2309
|
-
}).describe("Defines a
|
|
2304
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
2310
2305
|
expectTypesMatch(true);
|
|
2311
2306
|
|
|
2312
|
-
// src/pcb/
|
|
2307
|
+
// src/pcb/pcb_note_path.ts
|
|
2313
2308
|
import { z as z104 } from "zod";
|
|
2314
|
-
var
|
|
2315
|
-
type: z104.literal("
|
|
2316
|
-
|
|
2309
|
+
var pcb_note_path = z104.object({
|
|
2310
|
+
type: z104.literal("pcb_note_path"),
|
|
2311
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
2317
2312
|
pcb_component_id: z104.string().optional(),
|
|
2318
2313
|
pcb_group_id: z104.string().optional(),
|
|
2319
2314
|
subcircuit_id: z104.string().optional(),
|
|
2320
2315
|
name: z104.string().optional(),
|
|
2321
2316
|
text: z104.string().optional(),
|
|
2317
|
+
route: z104.array(point),
|
|
2318
|
+
stroke_width: length.default("0.1mm"),
|
|
2319
|
+
color: z104.string().optional()
|
|
2320
|
+
}).describe("Defines a polyline documentation note on the PCB");
|
|
2321
|
+
expectTypesMatch(true);
|
|
2322
|
+
|
|
2323
|
+
// src/pcb/pcb_note_line.ts
|
|
2324
|
+
import { z as z105 } from "zod";
|
|
2325
|
+
var pcb_note_line = z105.object({
|
|
2326
|
+
type: z105.literal("pcb_note_line"),
|
|
2327
|
+
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
2328
|
+
pcb_component_id: z105.string().optional(),
|
|
2329
|
+
pcb_group_id: z105.string().optional(),
|
|
2330
|
+
subcircuit_id: z105.string().optional(),
|
|
2331
|
+
name: z105.string().optional(),
|
|
2332
|
+
text: z105.string().optional(),
|
|
2322
2333
|
x1: distance,
|
|
2323
2334
|
y1: distance,
|
|
2324
2335
|
x2: distance,
|
|
2325
2336
|
y2: distance,
|
|
2326
2337
|
stroke_width: distance.default("0.1mm"),
|
|
2327
|
-
color:
|
|
2328
|
-
is_dashed:
|
|
2338
|
+
color: z105.string().optional(),
|
|
2339
|
+
is_dashed: z105.boolean().optional()
|
|
2329
2340
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
2330
2341
|
expectTypesMatch(true);
|
|
2331
2342
|
|
|
2332
2343
|
// src/pcb/pcb_note_dimension.ts
|
|
2333
|
-
import { z as
|
|
2334
|
-
var pcb_note_dimension =
|
|
2335
|
-
type:
|
|
2344
|
+
import { z as z106 } from "zod";
|
|
2345
|
+
var pcb_note_dimension = z106.object({
|
|
2346
|
+
type: z106.literal("pcb_note_dimension"),
|
|
2336
2347
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
2337
|
-
pcb_component_id:
|
|
2338
|
-
pcb_group_id:
|
|
2339
|
-
subcircuit_id:
|
|
2340
|
-
name:
|
|
2348
|
+
pcb_component_id: z106.string().optional(),
|
|
2349
|
+
pcb_group_id: z106.string().optional(),
|
|
2350
|
+
subcircuit_id: z106.string().optional(),
|
|
2351
|
+
name: z106.string().optional(),
|
|
2341
2352
|
from: point,
|
|
2342
2353
|
to: point,
|
|
2343
|
-
text:
|
|
2344
|
-
text_ccw_rotation:
|
|
2354
|
+
text: z106.string().optional(),
|
|
2355
|
+
text_ccw_rotation: z106.number().optional(),
|
|
2345
2356
|
offset_distance: length.optional(),
|
|
2346
|
-
offset_direction:
|
|
2347
|
-
x:
|
|
2348
|
-
y:
|
|
2357
|
+
offset_direction: z106.object({
|
|
2358
|
+
x: z106.number(),
|
|
2359
|
+
y: z106.number()
|
|
2349
2360
|
}).optional(),
|
|
2350
|
-
font:
|
|
2361
|
+
font: z106.literal("tscircuit2024").default("tscircuit2024"),
|
|
2351
2362
|
font_size: length.default("1mm"),
|
|
2352
|
-
color:
|
|
2363
|
+
color: z106.string().optional(),
|
|
2353
2364
|
arrow_size: length.default("1mm")
|
|
2354
2365
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
2355
2366
|
expectTypesMatch(true);
|
|
2356
2367
|
|
|
2357
2368
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
2358
|
-
import { z as
|
|
2359
|
-
var pcb_footprint_overlap_error =
|
|
2360
|
-
type:
|
|
2369
|
+
import { z as z107 } from "zod";
|
|
2370
|
+
var pcb_footprint_overlap_error = z107.object({
|
|
2371
|
+
type: z107.literal("pcb_footprint_overlap_error"),
|
|
2361
2372
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2362
|
-
error_type:
|
|
2363
|
-
message:
|
|
2364
|
-
pcb_smtpad_ids:
|
|
2365
|
-
pcb_plated_hole_ids:
|
|
2366
|
-
pcb_hole_ids:
|
|
2367
|
-
pcb_keepout_ids:
|
|
2373
|
+
error_type: z107.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
2374
|
+
message: z107.string(),
|
|
2375
|
+
pcb_smtpad_ids: z107.array(z107.string()).optional(),
|
|
2376
|
+
pcb_plated_hole_ids: z107.array(z107.string()).optional(),
|
|
2377
|
+
pcb_hole_ids: z107.array(z107.string()).optional(),
|
|
2378
|
+
pcb_keepout_ids: z107.array(z107.string()).optional()
|
|
2368
2379
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
2369
2380
|
expectTypesMatch(
|
|
2370
2381
|
true
|
|
2371
2382
|
);
|
|
2372
2383
|
|
|
2373
2384
|
// src/pcb/pcb_keepout.ts
|
|
2374
|
-
import { z as
|
|
2375
|
-
var pcb_keepout =
|
|
2376
|
-
type:
|
|
2377
|
-
shape:
|
|
2378
|
-
pcb_group_id:
|
|
2379
|
-
subcircuit_id:
|
|
2385
|
+
import { z as z108 } from "zod";
|
|
2386
|
+
var pcb_keepout = z108.object({
|
|
2387
|
+
type: z108.literal("pcb_keepout"),
|
|
2388
|
+
shape: z108.literal("rect"),
|
|
2389
|
+
pcb_group_id: z108.string().optional(),
|
|
2390
|
+
subcircuit_id: z108.string().optional(),
|
|
2380
2391
|
center: point,
|
|
2381
2392
|
width: distance,
|
|
2382
2393
|
height: distance,
|
|
2383
|
-
pcb_keepout_id:
|
|
2384
|
-
layers:
|
|
2394
|
+
pcb_keepout_id: z108.string(),
|
|
2395
|
+
layers: z108.array(z108.string()),
|
|
2385
2396
|
// Specify layers where the keepout applies
|
|
2386
|
-
description:
|
|
2397
|
+
description: z108.string().optional()
|
|
2387
2398
|
// Optional description of the keepout
|
|
2388
2399
|
}).or(
|
|
2389
|
-
|
|
2390
|
-
type:
|
|
2391
|
-
shape:
|
|
2392
|
-
pcb_group_id:
|
|
2393
|
-
subcircuit_id:
|
|
2400
|
+
z108.object({
|
|
2401
|
+
type: z108.literal("pcb_keepout"),
|
|
2402
|
+
shape: z108.literal("circle"),
|
|
2403
|
+
pcb_group_id: z108.string().optional(),
|
|
2404
|
+
subcircuit_id: z108.string().optional(),
|
|
2394
2405
|
center: point,
|
|
2395
2406
|
radius: distance,
|
|
2396
|
-
pcb_keepout_id:
|
|
2397
|
-
layers:
|
|
2407
|
+
pcb_keepout_id: z108.string(),
|
|
2408
|
+
layers: z108.array(z108.string()),
|
|
2398
2409
|
// Specify layers where the keepout applies
|
|
2399
|
-
description:
|
|
2410
|
+
description: z108.string().optional()
|
|
2400
2411
|
// Optional description of the keepout
|
|
2401
2412
|
})
|
|
2402
2413
|
);
|
|
2403
2414
|
expectTypesMatch(true);
|
|
2404
2415
|
|
|
2405
2416
|
// src/pcb/pcb_cutout.ts
|
|
2406
|
-
import { z as
|
|
2407
|
-
var pcb_cutout_base =
|
|
2408
|
-
type:
|
|
2417
|
+
import { z as z109 } from "zod";
|
|
2418
|
+
var pcb_cutout_base = z109.object({
|
|
2419
|
+
type: z109.literal("pcb_cutout"),
|
|
2409
2420
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
2410
|
-
pcb_group_id:
|
|
2411
|
-
subcircuit_id:
|
|
2412
|
-
pcb_board_id:
|
|
2413
|
-
pcb_panel_id:
|
|
2421
|
+
pcb_group_id: z109.string().optional(),
|
|
2422
|
+
subcircuit_id: z109.string().optional(),
|
|
2423
|
+
pcb_board_id: z109.string().optional(),
|
|
2424
|
+
pcb_panel_id: z109.string().optional()
|
|
2414
2425
|
});
|
|
2415
2426
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
2416
|
-
shape:
|
|
2427
|
+
shape: z109.literal("rect"),
|
|
2417
2428
|
center: point,
|
|
2418
2429
|
width: length,
|
|
2419
2430
|
height: length,
|
|
@@ -2422,26 +2433,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
2422
2433
|
});
|
|
2423
2434
|
expectTypesMatch(true);
|
|
2424
2435
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
2425
|
-
shape:
|
|
2436
|
+
shape: z109.literal("circle"),
|
|
2426
2437
|
center: point,
|
|
2427
2438
|
radius: length
|
|
2428
2439
|
});
|
|
2429
2440
|
expectTypesMatch(true);
|
|
2430
2441
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
2431
|
-
shape:
|
|
2432
|
-
points:
|
|
2442
|
+
shape: z109.literal("polygon"),
|
|
2443
|
+
points: z109.array(point)
|
|
2433
2444
|
});
|
|
2434
2445
|
expectTypesMatch(true);
|
|
2435
2446
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
2436
|
-
shape:
|
|
2437
|
-
route:
|
|
2447
|
+
shape: z109.literal("path"),
|
|
2448
|
+
route: z109.array(point),
|
|
2438
2449
|
slot_width: length,
|
|
2439
2450
|
slot_length: length.optional(),
|
|
2440
2451
|
space_between_slots: length.optional(),
|
|
2441
2452
|
slot_corner_radius: length.optional()
|
|
2442
2453
|
});
|
|
2443
2454
|
expectTypesMatch(true);
|
|
2444
|
-
var pcb_cutout =
|
|
2455
|
+
var pcb_cutout = z109.discriminatedUnion("shape", [
|
|
2445
2456
|
pcb_cutout_rect,
|
|
2446
2457
|
pcb_cutout_circle,
|
|
2447
2458
|
pcb_cutout_polygon,
|
|
@@ -2450,121 +2461,121 @@ var pcb_cutout = z108.discriminatedUnion("shape", [
|
|
|
2450
2461
|
expectTypesMatch(true);
|
|
2451
2462
|
|
|
2452
2463
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
2453
|
-
import { z as
|
|
2454
|
-
var pcb_missing_footprint_error =
|
|
2455
|
-
type:
|
|
2464
|
+
import { z as z110 } from "zod";
|
|
2465
|
+
var pcb_missing_footprint_error = z110.object({
|
|
2466
|
+
type: z110.literal("pcb_missing_footprint_error"),
|
|
2456
2467
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
2457
2468
|
"pcb_missing_footprint_error"
|
|
2458
2469
|
),
|
|
2459
|
-
pcb_group_id:
|
|
2460
|
-
subcircuit_id:
|
|
2461
|
-
error_type:
|
|
2462
|
-
source_component_id:
|
|
2463
|
-
message:
|
|
2470
|
+
pcb_group_id: z110.string().optional(),
|
|
2471
|
+
subcircuit_id: z110.string().optional(),
|
|
2472
|
+
error_type: z110.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
2473
|
+
source_component_id: z110.string(),
|
|
2474
|
+
message: z110.string()
|
|
2464
2475
|
}).describe("Defines a missing footprint error on the PCB");
|
|
2465
2476
|
expectTypesMatch(
|
|
2466
2477
|
true
|
|
2467
2478
|
);
|
|
2468
2479
|
|
|
2469
2480
|
// src/pcb/external_footprint_load_error.ts
|
|
2470
|
-
import { z as
|
|
2471
|
-
var external_footprint_load_error =
|
|
2472
|
-
type:
|
|
2481
|
+
import { z as z111 } from "zod";
|
|
2482
|
+
var external_footprint_load_error = z111.object({
|
|
2483
|
+
type: z111.literal("external_footprint_load_error"),
|
|
2473
2484
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2474
2485
|
"external_footprint_load_error"
|
|
2475
2486
|
),
|
|
2476
|
-
pcb_component_id:
|
|
2477
|
-
source_component_id:
|
|
2478
|
-
pcb_group_id:
|
|
2479
|
-
subcircuit_id:
|
|
2480
|
-
footprinter_string:
|
|
2481
|
-
error_type:
|
|
2482
|
-
message:
|
|
2487
|
+
pcb_component_id: z111.string(),
|
|
2488
|
+
source_component_id: z111.string(),
|
|
2489
|
+
pcb_group_id: z111.string().optional(),
|
|
2490
|
+
subcircuit_id: z111.string().optional(),
|
|
2491
|
+
footprinter_string: z111.string().optional(),
|
|
2492
|
+
error_type: z111.literal("external_footprint_load_error").default("external_footprint_load_error"),
|
|
2493
|
+
message: z111.string()
|
|
2483
2494
|
}).describe("Defines an error when an external footprint fails to load");
|
|
2484
2495
|
expectTypesMatch(true);
|
|
2485
2496
|
|
|
2486
2497
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
2487
|
-
import { z as
|
|
2488
|
-
var circuit_json_footprint_load_error =
|
|
2489
|
-
type:
|
|
2498
|
+
import { z as z112 } from "zod";
|
|
2499
|
+
var circuit_json_footprint_load_error = z112.object({
|
|
2500
|
+
type: z112.literal("circuit_json_footprint_load_error"),
|
|
2490
2501
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2491
2502
|
"circuit_json_footprint_load_error"
|
|
2492
2503
|
),
|
|
2493
|
-
pcb_component_id:
|
|
2494
|
-
source_component_id:
|
|
2495
|
-
pcb_group_id:
|
|
2496
|
-
subcircuit_id:
|
|
2497
|
-
error_type:
|
|
2498
|
-
message:
|
|
2499
|
-
circuit_json:
|
|
2504
|
+
pcb_component_id: z112.string(),
|
|
2505
|
+
source_component_id: z112.string(),
|
|
2506
|
+
pcb_group_id: z112.string().optional(),
|
|
2507
|
+
subcircuit_id: z112.string().optional(),
|
|
2508
|
+
error_type: z112.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
2509
|
+
message: z112.string(),
|
|
2510
|
+
circuit_json: z112.array(z112.any()).optional()
|
|
2500
2511
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
2501
2512
|
expectTypesMatch(true);
|
|
2502
2513
|
|
|
2503
2514
|
// src/pcb/pcb_group.ts
|
|
2504
|
-
import { z as
|
|
2505
|
-
var pcb_group =
|
|
2506
|
-
type:
|
|
2515
|
+
import { z as z113 } from "zod";
|
|
2516
|
+
var pcb_group = z113.object({
|
|
2517
|
+
type: z113.literal("pcb_group"),
|
|
2507
2518
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
2508
|
-
source_group_id:
|
|
2509
|
-
is_subcircuit:
|
|
2510
|
-
subcircuit_id:
|
|
2519
|
+
source_group_id: z113.string(),
|
|
2520
|
+
is_subcircuit: z113.boolean().optional(),
|
|
2521
|
+
subcircuit_id: z113.string().optional(),
|
|
2511
2522
|
width: length.optional(),
|
|
2512
2523
|
height: length.optional(),
|
|
2513
2524
|
center: point,
|
|
2514
|
-
outline:
|
|
2525
|
+
outline: z113.array(point).optional(),
|
|
2515
2526
|
anchor_position: point.optional(),
|
|
2516
|
-
anchor_alignment:
|
|
2517
|
-
pcb_component_ids:
|
|
2518
|
-
child_layout_mode:
|
|
2519
|
-
name:
|
|
2520
|
-
description:
|
|
2521
|
-
layout_mode:
|
|
2522
|
-
autorouter_configuration:
|
|
2527
|
+
anchor_alignment: z113.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).optional(),
|
|
2528
|
+
pcb_component_ids: z113.array(z113.string()),
|
|
2529
|
+
child_layout_mode: z113.enum(["packed", "none"]).optional(),
|
|
2530
|
+
name: z113.string().optional(),
|
|
2531
|
+
description: z113.string().optional(),
|
|
2532
|
+
layout_mode: z113.string().optional(),
|
|
2533
|
+
autorouter_configuration: z113.object({
|
|
2523
2534
|
trace_clearance: length
|
|
2524
2535
|
}).optional(),
|
|
2525
|
-
autorouter_used_string:
|
|
2536
|
+
autorouter_used_string: z113.string().optional()
|
|
2526
2537
|
}).describe("Defines a group of components on the PCB");
|
|
2527
2538
|
expectTypesMatch(true);
|
|
2528
2539
|
|
|
2529
2540
|
// src/pcb/pcb_autorouting_error.ts
|
|
2530
|
-
import { z as
|
|
2531
|
-
var pcb_autorouting_error =
|
|
2532
|
-
type:
|
|
2541
|
+
import { z as z114 } from "zod";
|
|
2542
|
+
var pcb_autorouting_error = z114.object({
|
|
2543
|
+
type: z114.literal("pcb_autorouting_error"),
|
|
2533
2544
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
2534
|
-
error_type:
|
|
2535
|
-
message:
|
|
2536
|
-
subcircuit_id:
|
|
2545
|
+
error_type: z114.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
2546
|
+
message: z114.string(),
|
|
2547
|
+
subcircuit_id: z114.string().optional()
|
|
2537
2548
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
2538
2549
|
expectTypesMatch(true);
|
|
2539
2550
|
|
|
2540
2551
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
2541
|
-
import { z as
|
|
2542
|
-
var pcb_manual_edit_conflict_warning =
|
|
2543
|
-
type:
|
|
2552
|
+
import { z as z115 } from "zod";
|
|
2553
|
+
var pcb_manual_edit_conflict_warning = z115.object({
|
|
2554
|
+
type: z115.literal("pcb_manual_edit_conflict_warning"),
|
|
2544
2555
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
2545
2556
|
"pcb_manual_edit_conflict_warning"
|
|
2546
2557
|
),
|
|
2547
|
-
warning_type:
|
|
2548
|
-
message:
|
|
2549
|
-
pcb_component_id:
|
|
2550
|
-
pcb_group_id:
|
|
2551
|
-
subcircuit_id:
|
|
2552
|
-
source_component_id:
|
|
2558
|
+
warning_type: z115.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
2559
|
+
message: z115.string(),
|
|
2560
|
+
pcb_component_id: z115.string(),
|
|
2561
|
+
pcb_group_id: z115.string().optional(),
|
|
2562
|
+
subcircuit_id: z115.string().optional(),
|
|
2563
|
+
source_component_id: z115.string()
|
|
2553
2564
|
}).describe(
|
|
2554
2565
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
2555
2566
|
);
|
|
2556
2567
|
expectTypesMatch(true);
|
|
2557
2568
|
|
|
2558
2569
|
// src/pcb/pcb_breakout_point.ts
|
|
2559
|
-
import { z as
|
|
2560
|
-
var pcb_breakout_point =
|
|
2561
|
-
type:
|
|
2570
|
+
import { z as z116 } from "zod";
|
|
2571
|
+
var pcb_breakout_point = z116.object({
|
|
2572
|
+
type: z116.literal("pcb_breakout_point"),
|
|
2562
2573
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
2563
|
-
pcb_group_id:
|
|
2564
|
-
subcircuit_id:
|
|
2565
|
-
source_trace_id:
|
|
2566
|
-
source_port_id:
|
|
2567
|
-
source_net_id:
|
|
2574
|
+
pcb_group_id: z116.string(),
|
|
2575
|
+
subcircuit_id: z116.string().optional(),
|
|
2576
|
+
source_trace_id: z116.string().optional(),
|
|
2577
|
+
source_port_id: z116.string().optional(),
|
|
2578
|
+
source_net_id: z116.string().optional(),
|
|
2568
2579
|
x: distance,
|
|
2569
2580
|
y: distance
|
|
2570
2581
|
}).describe(
|
|
@@ -2573,61 +2584,61 @@ var pcb_breakout_point = z115.object({
|
|
|
2573
2584
|
expectTypesMatch(true);
|
|
2574
2585
|
|
|
2575
2586
|
// src/pcb/pcb_ground_plane.ts
|
|
2576
|
-
import { z as
|
|
2577
|
-
var pcb_ground_plane =
|
|
2578
|
-
type:
|
|
2587
|
+
import { z as z117 } from "zod";
|
|
2588
|
+
var pcb_ground_plane = z117.object({
|
|
2589
|
+
type: z117.literal("pcb_ground_plane"),
|
|
2579
2590
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
2580
|
-
source_pcb_ground_plane_id:
|
|
2581
|
-
source_net_id:
|
|
2582
|
-
pcb_group_id:
|
|
2583
|
-
subcircuit_id:
|
|
2591
|
+
source_pcb_ground_plane_id: z117.string(),
|
|
2592
|
+
source_net_id: z117.string(),
|
|
2593
|
+
pcb_group_id: z117.string().optional(),
|
|
2594
|
+
subcircuit_id: z117.string().optional()
|
|
2584
2595
|
}).describe("Defines a ground plane on the PCB");
|
|
2585
2596
|
expectTypesMatch(true);
|
|
2586
2597
|
|
|
2587
2598
|
// src/pcb/pcb_ground_plane_region.ts
|
|
2588
|
-
import { z as
|
|
2589
|
-
var pcb_ground_plane_region =
|
|
2590
|
-
type:
|
|
2599
|
+
import { z as z118 } from "zod";
|
|
2600
|
+
var pcb_ground_plane_region = z118.object({
|
|
2601
|
+
type: z118.literal("pcb_ground_plane_region"),
|
|
2591
2602
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
2592
2603
|
"pcb_ground_plane_region"
|
|
2593
2604
|
),
|
|
2594
|
-
pcb_ground_plane_id:
|
|
2595
|
-
pcb_group_id:
|
|
2596
|
-
subcircuit_id:
|
|
2605
|
+
pcb_ground_plane_id: z118.string(),
|
|
2606
|
+
pcb_group_id: z118.string().optional(),
|
|
2607
|
+
subcircuit_id: z118.string().optional(),
|
|
2597
2608
|
layer: layer_ref,
|
|
2598
|
-
points:
|
|
2609
|
+
points: z118.array(point)
|
|
2599
2610
|
}).describe("Defines a polygon region of a ground plane");
|
|
2600
2611
|
expectTypesMatch(true);
|
|
2601
2612
|
|
|
2602
2613
|
// src/pcb/pcb_thermal_spoke.ts
|
|
2603
|
-
import { z as
|
|
2604
|
-
var pcb_thermal_spoke =
|
|
2605
|
-
type:
|
|
2614
|
+
import { z as z119 } from "zod";
|
|
2615
|
+
var pcb_thermal_spoke = z119.object({
|
|
2616
|
+
type: z119.literal("pcb_thermal_spoke"),
|
|
2606
2617
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
2607
|
-
pcb_ground_plane_id:
|
|
2608
|
-
shape:
|
|
2609
|
-
spoke_count:
|
|
2618
|
+
pcb_ground_plane_id: z119.string(),
|
|
2619
|
+
shape: z119.string(),
|
|
2620
|
+
spoke_count: z119.number(),
|
|
2610
2621
|
spoke_thickness: distance,
|
|
2611
2622
|
spoke_inner_diameter: distance,
|
|
2612
2623
|
spoke_outer_diameter: distance,
|
|
2613
|
-
pcb_plated_hole_id:
|
|
2614
|
-
subcircuit_id:
|
|
2624
|
+
pcb_plated_hole_id: z119.string().optional(),
|
|
2625
|
+
subcircuit_id: z119.string().optional()
|
|
2615
2626
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
2616
2627
|
expectTypesMatch(true);
|
|
2617
2628
|
|
|
2618
2629
|
// src/pcb/pcb_copper_pour.ts
|
|
2619
|
-
import { z as
|
|
2620
|
-
var pcb_copper_pour_base =
|
|
2621
|
-
type:
|
|
2630
|
+
import { z as z120 } from "zod";
|
|
2631
|
+
var pcb_copper_pour_base = z120.object({
|
|
2632
|
+
type: z120.literal("pcb_copper_pour"),
|
|
2622
2633
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
2623
|
-
pcb_group_id:
|
|
2624
|
-
subcircuit_id:
|
|
2634
|
+
pcb_group_id: z120.string().optional(),
|
|
2635
|
+
subcircuit_id: z120.string().optional(),
|
|
2625
2636
|
layer: layer_ref,
|
|
2626
|
-
source_net_id:
|
|
2627
|
-
covered_with_solder_mask:
|
|
2637
|
+
source_net_id: z120.string().optional(),
|
|
2638
|
+
covered_with_solder_mask: z120.boolean().optional().default(true)
|
|
2628
2639
|
});
|
|
2629
2640
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
2630
|
-
shape:
|
|
2641
|
+
shape: z120.literal("rect"),
|
|
2631
2642
|
center: point,
|
|
2632
2643
|
width: length,
|
|
2633
2644
|
height: length,
|
|
@@ -2635,16 +2646,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
2635
2646
|
});
|
|
2636
2647
|
expectTypesMatch(true);
|
|
2637
2648
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
2638
|
-
shape:
|
|
2649
|
+
shape: z120.literal("brep"),
|
|
2639
2650
|
brep_shape
|
|
2640
2651
|
});
|
|
2641
2652
|
expectTypesMatch(true);
|
|
2642
2653
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
2643
|
-
shape:
|
|
2644
|
-
points:
|
|
2654
|
+
shape: z120.literal("polygon"),
|
|
2655
|
+
points: z120.array(point)
|
|
2645
2656
|
});
|
|
2646
2657
|
expectTypesMatch(true);
|
|
2647
|
-
var pcb_copper_pour =
|
|
2658
|
+
var pcb_copper_pour = z120.discriminatedUnion("shape", [
|
|
2648
2659
|
pcb_copper_pour_rect,
|
|
2649
2660
|
pcb_copper_pour_brep,
|
|
2650
2661
|
pcb_copper_pour_polygon
|
|
@@ -2652,148 +2663,148 @@ var pcb_copper_pour = z119.discriminatedUnion("shape", [
|
|
|
2652
2663
|
expectTypesMatch(true);
|
|
2653
2664
|
|
|
2654
2665
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
2655
|
-
import { z as
|
|
2656
|
-
var pcb_component_outside_board_error =
|
|
2657
|
-
type:
|
|
2666
|
+
import { z as z121 } from "zod";
|
|
2667
|
+
var pcb_component_outside_board_error = z121.object({
|
|
2668
|
+
type: z121.literal("pcb_component_outside_board_error"),
|
|
2658
2669
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
2659
2670
|
"pcb_component_outside_board_error"
|
|
2660
2671
|
),
|
|
2661
|
-
error_type:
|
|
2662
|
-
message:
|
|
2663
|
-
pcb_component_id:
|
|
2664
|
-
pcb_board_id:
|
|
2672
|
+
error_type: z121.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
2673
|
+
message: z121.string(),
|
|
2674
|
+
pcb_component_id: z121.string(),
|
|
2675
|
+
pcb_board_id: z121.string(),
|
|
2665
2676
|
component_center: point,
|
|
2666
|
-
component_bounds:
|
|
2667
|
-
min_x:
|
|
2668
|
-
max_x:
|
|
2669
|
-
min_y:
|
|
2670
|
-
max_y:
|
|
2677
|
+
component_bounds: z121.object({
|
|
2678
|
+
min_x: z121.number(),
|
|
2679
|
+
max_x: z121.number(),
|
|
2680
|
+
min_y: z121.number(),
|
|
2681
|
+
max_y: z121.number()
|
|
2671
2682
|
}),
|
|
2672
|
-
subcircuit_id:
|
|
2673
|
-
source_component_id:
|
|
2683
|
+
subcircuit_id: z121.string().optional(),
|
|
2684
|
+
source_component_id: z121.string().optional()
|
|
2674
2685
|
}).describe(
|
|
2675
2686
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
2676
2687
|
);
|
|
2677
2688
|
expectTypesMatch(true);
|
|
2678
2689
|
|
|
2679
2690
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
2680
|
-
import { z as
|
|
2681
|
-
var pcb_component_invalid_layer_error =
|
|
2682
|
-
type:
|
|
2691
|
+
import { z as z122 } from "zod";
|
|
2692
|
+
var pcb_component_invalid_layer_error = z122.object({
|
|
2693
|
+
type: z122.literal("pcb_component_invalid_layer_error"),
|
|
2683
2694
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
2684
2695
|
"pcb_component_invalid_layer_error"
|
|
2685
2696
|
),
|
|
2686
|
-
error_type:
|
|
2687
|
-
message:
|
|
2688
|
-
pcb_component_id:
|
|
2689
|
-
source_component_id:
|
|
2697
|
+
error_type: z122.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
2698
|
+
message: z122.string(),
|
|
2699
|
+
pcb_component_id: z122.string().optional(),
|
|
2700
|
+
source_component_id: z122.string(),
|
|
2690
2701
|
layer: layer_ref,
|
|
2691
|
-
subcircuit_id:
|
|
2702
|
+
subcircuit_id: z122.string().optional()
|
|
2692
2703
|
}).describe(
|
|
2693
2704
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
2694
2705
|
);
|
|
2695
2706
|
expectTypesMatch(true);
|
|
2696
2707
|
|
|
2697
2708
|
// src/pcb/pcb_via_clearance_error.ts
|
|
2698
|
-
import { z as
|
|
2699
|
-
var pcb_via_clearance_error =
|
|
2700
|
-
type:
|
|
2709
|
+
import { z as z123 } from "zod";
|
|
2710
|
+
var pcb_via_clearance_error = z123.object({
|
|
2711
|
+
type: z123.literal("pcb_via_clearance_error"),
|
|
2701
2712
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2702
|
-
error_type:
|
|
2703
|
-
message:
|
|
2704
|
-
pcb_via_ids:
|
|
2713
|
+
error_type: z123.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
2714
|
+
message: z123.string(),
|
|
2715
|
+
pcb_via_ids: z123.array(z123.string()).min(2),
|
|
2705
2716
|
minimum_clearance: distance.optional(),
|
|
2706
2717
|
actual_clearance: distance.optional(),
|
|
2707
|
-
pcb_center:
|
|
2708
|
-
x:
|
|
2709
|
-
y:
|
|
2718
|
+
pcb_center: z123.object({
|
|
2719
|
+
x: z123.number().optional(),
|
|
2720
|
+
y: z123.number().optional()
|
|
2710
2721
|
}).optional(),
|
|
2711
|
-
subcircuit_id:
|
|
2722
|
+
subcircuit_id: z123.string().optional()
|
|
2712
2723
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
2713
2724
|
expectTypesMatch(true);
|
|
2714
2725
|
|
|
2715
2726
|
// src/pcb/pcb_courtyard_rect.ts
|
|
2716
|
-
import { z as
|
|
2717
|
-
var pcb_courtyard_rect =
|
|
2718
|
-
type:
|
|
2727
|
+
import { z as z124 } from "zod";
|
|
2728
|
+
var pcb_courtyard_rect = z124.object({
|
|
2729
|
+
type: z124.literal("pcb_courtyard_rect"),
|
|
2719
2730
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
2720
|
-
pcb_component_id:
|
|
2721
|
-
pcb_group_id:
|
|
2722
|
-
subcircuit_id:
|
|
2731
|
+
pcb_component_id: z124.string(),
|
|
2732
|
+
pcb_group_id: z124.string().optional(),
|
|
2733
|
+
subcircuit_id: z124.string().optional(),
|
|
2723
2734
|
center: point,
|
|
2724
2735
|
width: length,
|
|
2725
2736
|
height: length,
|
|
2726
2737
|
layer: visible_layer,
|
|
2727
|
-
color:
|
|
2738
|
+
color: z124.string().optional()
|
|
2728
2739
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
2729
2740
|
expectTypesMatch(true);
|
|
2730
2741
|
|
|
2731
2742
|
// src/pcb/pcb_courtyard_outline.ts
|
|
2732
|
-
import { z as
|
|
2733
|
-
var pcb_courtyard_outline =
|
|
2734
|
-
type:
|
|
2743
|
+
import { z as z125 } from "zod";
|
|
2744
|
+
var pcb_courtyard_outline = z125.object({
|
|
2745
|
+
type: z125.literal("pcb_courtyard_outline"),
|
|
2735
2746
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
2736
2747
|
"pcb_courtyard_outline"
|
|
2737
2748
|
),
|
|
2738
|
-
pcb_component_id:
|
|
2739
|
-
pcb_group_id:
|
|
2740
|
-
subcircuit_id:
|
|
2749
|
+
pcb_component_id: z125.string(),
|
|
2750
|
+
pcb_group_id: z125.string().optional(),
|
|
2751
|
+
subcircuit_id: z125.string().optional(),
|
|
2741
2752
|
layer: visible_layer,
|
|
2742
|
-
outline:
|
|
2753
|
+
outline: z125.array(point).min(2),
|
|
2743
2754
|
stroke_width: length.default("0.1mm"),
|
|
2744
|
-
is_closed:
|
|
2745
|
-
is_stroke_dashed:
|
|
2746
|
-
color:
|
|
2755
|
+
is_closed: z125.boolean().optional(),
|
|
2756
|
+
is_stroke_dashed: z125.boolean().optional(),
|
|
2757
|
+
color: z125.string().optional()
|
|
2747
2758
|
}).describe("Defines a courtyard outline on the PCB");
|
|
2748
2759
|
expectTypesMatch(true);
|
|
2749
2760
|
|
|
2750
2761
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
2751
|
-
import { z as
|
|
2752
|
-
var pcb_courtyard_polygon =
|
|
2753
|
-
type:
|
|
2762
|
+
import { z as z126 } from "zod";
|
|
2763
|
+
var pcb_courtyard_polygon = z126.object({
|
|
2764
|
+
type: z126.literal("pcb_courtyard_polygon"),
|
|
2754
2765
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
2755
2766
|
"pcb_courtyard_polygon"
|
|
2756
2767
|
),
|
|
2757
|
-
pcb_component_id:
|
|
2758
|
-
pcb_group_id:
|
|
2759
|
-
subcircuit_id:
|
|
2768
|
+
pcb_component_id: z126.string(),
|
|
2769
|
+
pcb_group_id: z126.string().optional(),
|
|
2770
|
+
subcircuit_id: z126.string().optional(),
|
|
2760
2771
|
layer: visible_layer,
|
|
2761
|
-
points:
|
|
2762
|
-
color:
|
|
2772
|
+
points: z126.array(point).min(3),
|
|
2773
|
+
color: z126.string().optional()
|
|
2763
2774
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
2764
2775
|
expectTypesMatch(true);
|
|
2765
2776
|
|
|
2766
2777
|
// src/cad/cad_component.ts
|
|
2767
|
-
import { z as
|
|
2768
|
-
var cad_component =
|
|
2769
|
-
type:
|
|
2770
|
-
cad_component_id:
|
|
2771
|
-
pcb_component_id:
|
|
2772
|
-
source_component_id:
|
|
2778
|
+
import { z as z127 } from "zod";
|
|
2779
|
+
var cad_component = z127.object({
|
|
2780
|
+
type: z127.literal("cad_component"),
|
|
2781
|
+
cad_component_id: z127.string(),
|
|
2782
|
+
pcb_component_id: z127.string(),
|
|
2783
|
+
source_component_id: z127.string(),
|
|
2773
2784
|
position: point3,
|
|
2774
2785
|
rotation: point3.optional(),
|
|
2775
2786
|
size: point3.optional(),
|
|
2776
2787
|
layer: layer_ref.optional(),
|
|
2777
|
-
subcircuit_id:
|
|
2788
|
+
subcircuit_id: z127.string().optional(),
|
|
2778
2789
|
// These are all ways to generate/load the 3d model
|
|
2779
|
-
footprinter_string:
|
|
2780
|
-
model_obj_url:
|
|
2781
|
-
model_stl_url:
|
|
2782
|
-
model_3mf_url:
|
|
2783
|
-
model_gltf_url:
|
|
2784
|
-
model_glb_url:
|
|
2785
|
-
model_step_url:
|
|
2786
|
-
model_wrl_url:
|
|
2787
|
-
model_unit_to_mm_scale_factor:
|
|
2788
|
-
model_jscad:
|
|
2789
|
-
show_as_translucent_model:
|
|
2790
|
+
footprinter_string: z127.string().optional(),
|
|
2791
|
+
model_obj_url: z127.string().optional(),
|
|
2792
|
+
model_stl_url: z127.string().optional(),
|
|
2793
|
+
model_3mf_url: z127.string().optional(),
|
|
2794
|
+
model_gltf_url: z127.string().optional(),
|
|
2795
|
+
model_glb_url: z127.string().optional(),
|
|
2796
|
+
model_step_url: z127.string().optional(),
|
|
2797
|
+
model_wrl_url: z127.string().optional(),
|
|
2798
|
+
model_unit_to_mm_scale_factor: z127.number().optional(),
|
|
2799
|
+
model_jscad: z127.any().optional(),
|
|
2800
|
+
show_as_translucent_model: z127.boolean().optional()
|
|
2790
2801
|
}).describe("Defines a component on the PCB");
|
|
2791
2802
|
expectTypesMatch(true);
|
|
2792
2803
|
|
|
2793
2804
|
// src/simulation/simulation_voltage_source.ts
|
|
2794
|
-
import { z as
|
|
2795
|
-
var wave_shape =
|
|
2796
|
-
var percentage =
|
|
2805
|
+
import { z as z128 } from "zod";
|
|
2806
|
+
var wave_shape = z128.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
2807
|
+
var percentage = z128.union([z128.string(), z128.number()]).transform((val) => {
|
|
2797
2808
|
if (typeof val === "string") {
|
|
2798
2809
|
if (val.endsWith("%")) {
|
|
2799
2810
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -2802,30 +2813,30 @@ var percentage = z127.union([z127.string(), z127.number()]).transform((val) => {
|
|
|
2802
2813
|
}
|
|
2803
2814
|
return val;
|
|
2804
2815
|
}).pipe(
|
|
2805
|
-
|
|
2816
|
+
z128.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
2806
2817
|
);
|
|
2807
|
-
var simulation_dc_voltage_source =
|
|
2808
|
-
type:
|
|
2818
|
+
var simulation_dc_voltage_source = z128.object({
|
|
2819
|
+
type: z128.literal("simulation_voltage_source"),
|
|
2809
2820
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2810
2821
|
"simulation_voltage_source"
|
|
2811
2822
|
),
|
|
2812
|
-
is_dc_source:
|
|
2813
|
-
positive_source_port_id:
|
|
2814
|
-
negative_source_port_id:
|
|
2815
|
-
positive_source_net_id:
|
|
2816
|
-
negative_source_net_id:
|
|
2823
|
+
is_dc_source: z128.literal(true).optional().default(true),
|
|
2824
|
+
positive_source_port_id: z128.string().optional(),
|
|
2825
|
+
negative_source_port_id: z128.string().optional(),
|
|
2826
|
+
positive_source_net_id: z128.string().optional(),
|
|
2827
|
+
negative_source_net_id: z128.string().optional(),
|
|
2817
2828
|
voltage
|
|
2818
2829
|
}).describe("Defines a DC voltage source for simulation");
|
|
2819
|
-
var simulation_ac_voltage_source =
|
|
2820
|
-
type:
|
|
2830
|
+
var simulation_ac_voltage_source = z128.object({
|
|
2831
|
+
type: z128.literal("simulation_voltage_source"),
|
|
2821
2832
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
2822
2833
|
"simulation_voltage_source"
|
|
2823
2834
|
),
|
|
2824
|
-
is_dc_source:
|
|
2825
|
-
terminal1_source_port_id:
|
|
2826
|
-
terminal2_source_port_id:
|
|
2827
|
-
terminal1_source_net_id:
|
|
2828
|
-
terminal2_source_net_id:
|
|
2835
|
+
is_dc_source: z128.literal(false),
|
|
2836
|
+
terminal1_source_port_id: z128.string().optional(),
|
|
2837
|
+
terminal2_source_port_id: z128.string().optional(),
|
|
2838
|
+
terminal1_source_net_id: z128.string().optional(),
|
|
2839
|
+
terminal2_source_net_id: z128.string().optional(),
|
|
2829
2840
|
voltage: voltage.optional(),
|
|
2830
2841
|
frequency: frequency.optional(),
|
|
2831
2842
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -2833,25 +2844,25 @@ var simulation_ac_voltage_source = z127.object({
|
|
|
2833
2844
|
phase: rotation.optional(),
|
|
2834
2845
|
duty_cycle: percentage.optional()
|
|
2835
2846
|
}).describe("Defines an AC voltage source for simulation");
|
|
2836
|
-
var simulation_voltage_source =
|
|
2847
|
+
var simulation_voltage_source = z128.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
2837
2848
|
expectTypesMatch(true);
|
|
2838
2849
|
expectTypesMatch(true);
|
|
2839
2850
|
expectTypesMatch(true);
|
|
2840
2851
|
|
|
2841
2852
|
// src/simulation/simulation_experiment.ts
|
|
2842
|
-
import { z as
|
|
2843
|
-
var experiment_type =
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2853
|
+
import { z as z129 } from "zod";
|
|
2854
|
+
var experiment_type = z129.union([
|
|
2855
|
+
z129.literal("spice_dc_sweep"),
|
|
2856
|
+
z129.literal("spice_dc_operating_point"),
|
|
2857
|
+
z129.literal("spice_transient_analysis"),
|
|
2858
|
+
z129.literal("spice_ac_analysis")
|
|
2848
2859
|
]);
|
|
2849
|
-
var simulation_experiment =
|
|
2850
|
-
type:
|
|
2860
|
+
var simulation_experiment = z129.object({
|
|
2861
|
+
type: z129.literal("simulation_experiment"),
|
|
2851
2862
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
2852
2863
|
"simulation_experiment"
|
|
2853
2864
|
),
|
|
2854
|
-
name:
|
|
2865
|
+
name: z129.string(),
|
|
2855
2866
|
experiment_type,
|
|
2856
2867
|
time_per_step: duration_ms.optional(),
|
|
2857
2868
|
start_time_ms: ms.optional(),
|
|
@@ -2860,53 +2871,53 @@ var simulation_experiment = z128.object({
|
|
|
2860
2871
|
expectTypesMatch(true);
|
|
2861
2872
|
|
|
2862
2873
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
2863
|
-
import { z as
|
|
2864
|
-
var simulation_transient_voltage_graph =
|
|
2865
|
-
type:
|
|
2874
|
+
import { z as z130 } from "zod";
|
|
2875
|
+
var simulation_transient_voltage_graph = z130.object({
|
|
2876
|
+
type: z130.literal("simulation_transient_voltage_graph"),
|
|
2866
2877
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
2867
2878
|
"simulation_transient_voltage_graph"
|
|
2868
2879
|
),
|
|
2869
|
-
simulation_experiment_id:
|
|
2870
|
-
timestamps_ms:
|
|
2871
|
-
voltage_levels:
|
|
2872
|
-
source_component_id:
|
|
2873
|
-
subcircuit_connectivity_map_key:
|
|
2880
|
+
simulation_experiment_id: z130.string(),
|
|
2881
|
+
timestamps_ms: z130.array(z130.number()).optional(),
|
|
2882
|
+
voltage_levels: z130.array(z130.number()),
|
|
2883
|
+
source_component_id: z130.string().optional(),
|
|
2884
|
+
subcircuit_connectivity_map_key: z130.string().optional(),
|
|
2874
2885
|
time_per_step: duration_ms,
|
|
2875
2886
|
start_time_ms: ms,
|
|
2876
2887
|
end_time_ms: ms,
|
|
2877
|
-
name:
|
|
2878
|
-
color:
|
|
2888
|
+
name: z130.string().optional(),
|
|
2889
|
+
color: z130.string().optional()
|
|
2879
2890
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
2880
2891
|
expectTypesMatch(true);
|
|
2881
2892
|
|
|
2882
2893
|
// src/simulation/simulation_switch.ts
|
|
2883
|
-
import { z as
|
|
2884
|
-
var simulation_switch =
|
|
2885
|
-
type:
|
|
2894
|
+
import { z as z131 } from "zod";
|
|
2895
|
+
var simulation_switch = z131.object({
|
|
2896
|
+
type: z131.literal("simulation_switch"),
|
|
2886
2897
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
2887
|
-
source_component_id:
|
|
2898
|
+
source_component_id: z131.string().optional(),
|
|
2888
2899
|
closes_at: ms.optional(),
|
|
2889
2900
|
opens_at: ms.optional(),
|
|
2890
|
-
starts_closed:
|
|
2901
|
+
starts_closed: z131.boolean().optional(),
|
|
2891
2902
|
switching_frequency: frequency.optional()
|
|
2892
2903
|
}).describe("Defines a switch for simulation timing control");
|
|
2893
2904
|
expectTypesMatch(true);
|
|
2894
2905
|
|
|
2895
2906
|
// src/simulation/simulation_voltage_probe.ts
|
|
2896
|
-
import { z as
|
|
2897
|
-
var simulation_voltage_probe =
|
|
2898
|
-
type:
|
|
2907
|
+
import { z as z132 } from "zod";
|
|
2908
|
+
var simulation_voltage_probe = z132.object({
|
|
2909
|
+
type: z132.literal("simulation_voltage_probe"),
|
|
2899
2910
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
2900
2911
|
"simulation_voltage_probe"
|
|
2901
2912
|
),
|
|
2902
|
-
source_component_id:
|
|
2903
|
-
name:
|
|
2904
|
-
signal_input_source_port_id:
|
|
2905
|
-
signal_input_source_net_id:
|
|
2906
|
-
reference_input_source_port_id:
|
|
2907
|
-
reference_input_source_net_id:
|
|
2908
|
-
subcircuit_id:
|
|
2909
|
-
color:
|
|
2913
|
+
source_component_id: z132.string().optional(),
|
|
2914
|
+
name: z132.string().optional(),
|
|
2915
|
+
signal_input_source_port_id: z132.string().optional(),
|
|
2916
|
+
signal_input_source_net_id: z132.string().optional(),
|
|
2917
|
+
reference_input_source_port_id: z132.string().optional(),
|
|
2918
|
+
reference_input_source_net_id: z132.string().optional(),
|
|
2919
|
+
subcircuit_id: z132.string().optional(),
|
|
2920
|
+
color: z132.string().optional()
|
|
2910
2921
|
}).describe(
|
|
2911
2922
|
"Defines a voltage probe for simulation. If a reference input is not provided, it measures against ground. If a reference input is provided, it measures the differential voltage between two points."
|
|
2912
2923
|
).superRefine((data, ctx) => {
|
|
@@ -2916,20 +2927,20 @@ var simulation_voltage_probe = z131.object({
|
|
|
2916
2927
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
2917
2928
|
if (has_ports && has_nets) {
|
|
2918
2929
|
ctx.addIssue({
|
|
2919
|
-
code:
|
|
2930
|
+
code: z132.ZodIssueCode.custom,
|
|
2920
2931
|
message: "Cannot mix port and net connections in a differential probe."
|
|
2921
2932
|
});
|
|
2922
2933
|
} else if (has_ports) {
|
|
2923
2934
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
2924
2935
|
ctx.addIssue({
|
|
2925
|
-
code:
|
|
2936
|
+
code: z132.ZodIssueCode.custom,
|
|
2926
2937
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
2927
2938
|
});
|
|
2928
2939
|
}
|
|
2929
2940
|
} else if (has_nets) {
|
|
2930
2941
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
2931
2942
|
ctx.addIssue({
|
|
2932
|
-
code:
|
|
2943
|
+
code: z132.ZodIssueCode.custom,
|
|
2933
2944
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
2934
2945
|
});
|
|
2935
2946
|
}
|
|
@@ -2937,7 +2948,7 @@ var simulation_voltage_probe = z131.object({
|
|
|
2937
2948
|
} else {
|
|
2938
2949
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
2939
2950
|
ctx.addIssue({
|
|
2940
|
-
code:
|
|
2951
|
+
code: z132.ZodIssueCode.custom,
|
|
2941
2952
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
2942
2953
|
});
|
|
2943
2954
|
}
|
|
@@ -2946,24 +2957,25 @@ var simulation_voltage_probe = z131.object({
|
|
|
2946
2957
|
expectTypesMatch(true);
|
|
2947
2958
|
|
|
2948
2959
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
2949
|
-
import { z as
|
|
2950
|
-
var simulation_unknown_experiment_error =
|
|
2951
|
-
type:
|
|
2960
|
+
import { z as z133 } from "zod";
|
|
2961
|
+
var simulation_unknown_experiment_error = z133.object({
|
|
2962
|
+
type: z133.literal("simulation_unknown_experiment_error"),
|
|
2952
2963
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
2953
2964
|
"simulation_unknown_experiment_error"
|
|
2954
2965
|
),
|
|
2955
|
-
error_type:
|
|
2956
|
-
message:
|
|
2957
|
-
simulation_experiment_id:
|
|
2958
|
-
subcircuit_id:
|
|
2966
|
+
error_type: z133.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
2967
|
+
message: z133.string(),
|
|
2968
|
+
simulation_experiment_id: z133.string().optional(),
|
|
2969
|
+
subcircuit_id: z133.string().optional()
|
|
2959
2970
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
2960
2971
|
expectTypesMatch(true);
|
|
2961
2972
|
|
|
2962
2973
|
// src/any_circuit_element.ts
|
|
2963
|
-
import { z as
|
|
2964
|
-
var any_circuit_element =
|
|
2974
|
+
import { z as z134 } from "zod";
|
|
2975
|
+
var any_circuit_element = z134.union([
|
|
2965
2976
|
source_trace,
|
|
2966
2977
|
source_port,
|
|
2978
|
+
source_component_internal_connection,
|
|
2967
2979
|
any_source_component,
|
|
2968
2980
|
source_net,
|
|
2969
2981
|
source_group,
|
|
@@ -3219,6 +3231,7 @@ export {
|
|
|
3219
3231
|
size,
|
|
3220
3232
|
source_board,
|
|
3221
3233
|
source_component_base,
|
|
3234
|
+
source_component_internal_connection,
|
|
3222
3235
|
source_failed_to_create_component_error,
|
|
3223
3236
|
source_group,
|
|
3224
3237
|
source_interconnect,
|