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