circuit-json 0.0.432 → 0.0.433
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 +22 -0
- package/dist/index.d.mts +706 -22
- package/dist/index.mjs +507 -481
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2716,243 +2716,266 @@ var pcb_silkscreen_oval = z120.object({
|
|
|
2716
2716
|
}).describe("Defines a silkscreen oval on the PCB");
|
|
2717
2717
|
expectTypesMatch(true);
|
|
2718
2718
|
|
|
2719
|
-
// src/pcb/
|
|
2719
|
+
// src/pcb/pcb_silkscreen_graphic.ts
|
|
2720
2720
|
import { z as z121 } from "zod";
|
|
2721
|
-
var
|
|
2722
|
-
type: z121.literal("
|
|
2723
|
-
|
|
2721
|
+
var pcb_silkscreen_graphic_base = z121.object({
|
|
2722
|
+
type: z121.literal("pcb_silkscreen_graphic"),
|
|
2723
|
+
pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
|
|
2724
|
+
"pcb_silkscreen_graphic"
|
|
2725
|
+
),
|
|
2724
2726
|
pcb_component_id: z121.string(),
|
|
2725
2727
|
pcb_group_id: z121.string().optional(),
|
|
2726
2728
|
subcircuit_id: z121.string().optional(),
|
|
2729
|
+
layer: visible_layer,
|
|
2730
|
+
image_asset: asset.optional()
|
|
2731
|
+
});
|
|
2732
|
+
var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
|
|
2733
|
+
shape: z121.literal("brep"),
|
|
2734
|
+
brep_shape
|
|
2735
|
+
}).describe("Defines a BRep silkscreen graphic on the PCB");
|
|
2736
|
+
expectTypesMatch(
|
|
2737
|
+
true
|
|
2738
|
+
);
|
|
2739
|
+
var pcb_silkscreen_graphic = z121.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
|
|
2740
|
+
expectTypesMatch(true);
|
|
2741
|
+
|
|
2742
|
+
// src/pcb/pcb_silkscreen_pill.ts
|
|
2743
|
+
import { z as z122 } from "zod";
|
|
2744
|
+
var pcb_silkscreen_pill = z122.object({
|
|
2745
|
+
type: z122.literal("pcb_silkscreen_pill"),
|
|
2746
|
+
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
2747
|
+
pcb_component_id: z122.string(),
|
|
2748
|
+
pcb_group_id: z122.string().optional(),
|
|
2749
|
+
subcircuit_id: z122.string().optional(),
|
|
2727
2750
|
center: point,
|
|
2728
2751
|
width: length,
|
|
2729
2752
|
height: length,
|
|
2730
2753
|
layer: layer_ref,
|
|
2731
|
-
ccw_rotation:
|
|
2754
|
+
ccw_rotation: z122.number().optional()
|
|
2732
2755
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
2733
2756
|
expectTypesMatch(true);
|
|
2734
2757
|
|
|
2735
2758
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
2736
|
-
import { z as
|
|
2737
|
-
var pcb_fabrication_note_text =
|
|
2738
|
-
type:
|
|
2759
|
+
import { z as z123 } from "zod";
|
|
2760
|
+
var pcb_fabrication_note_text = z123.object({
|
|
2761
|
+
type: z123.literal("pcb_fabrication_note_text"),
|
|
2739
2762
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2740
2763
|
"pcb_fabrication_note_text"
|
|
2741
2764
|
),
|
|
2742
|
-
subcircuit_id:
|
|
2743
|
-
pcb_group_id:
|
|
2744
|
-
font:
|
|
2765
|
+
subcircuit_id: z123.string().optional(),
|
|
2766
|
+
pcb_group_id: z123.string().optional(),
|
|
2767
|
+
font: z123.literal("tscircuit2024").default("tscircuit2024"),
|
|
2745
2768
|
font_size: distance.default("1mm"),
|
|
2746
|
-
pcb_component_id:
|
|
2747
|
-
text:
|
|
2748
|
-
ccw_rotation:
|
|
2769
|
+
pcb_component_id: z123.string(),
|
|
2770
|
+
text: z123.string(),
|
|
2771
|
+
ccw_rotation: z123.number().optional(),
|
|
2749
2772
|
layer: visible_layer,
|
|
2750
2773
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2751
|
-
anchor_alignment:
|
|
2752
|
-
color:
|
|
2774
|
+
anchor_alignment: z123.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2775
|
+
color: z123.string().optional()
|
|
2753
2776
|
}).describe(
|
|
2754
2777
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2755
2778
|
);
|
|
2756
2779
|
expectTypesMatch(true);
|
|
2757
2780
|
|
|
2758
2781
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2759
|
-
import { z as
|
|
2760
|
-
var pcb_fabrication_note_path =
|
|
2761
|
-
type:
|
|
2782
|
+
import { z as z124 } from "zod";
|
|
2783
|
+
var pcb_fabrication_note_path = z124.object({
|
|
2784
|
+
type: z124.literal("pcb_fabrication_note_path"),
|
|
2762
2785
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2763
2786
|
"pcb_fabrication_note_path"
|
|
2764
2787
|
),
|
|
2765
|
-
pcb_component_id:
|
|
2766
|
-
subcircuit_id:
|
|
2788
|
+
pcb_component_id: z124.string(),
|
|
2789
|
+
subcircuit_id: z124.string().optional(),
|
|
2767
2790
|
layer: layer_ref,
|
|
2768
|
-
route:
|
|
2791
|
+
route: z124.array(point),
|
|
2769
2792
|
stroke_width: length,
|
|
2770
|
-
color:
|
|
2793
|
+
color: z124.string().optional()
|
|
2771
2794
|
}).describe(
|
|
2772
2795
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2773
2796
|
);
|
|
2774
2797
|
expectTypesMatch(true);
|
|
2775
2798
|
|
|
2776
2799
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2777
|
-
import { z as
|
|
2778
|
-
var pcb_fabrication_note_rect =
|
|
2779
|
-
type:
|
|
2800
|
+
import { z as z125 } from "zod";
|
|
2801
|
+
var pcb_fabrication_note_rect = z125.object({
|
|
2802
|
+
type: z125.literal("pcb_fabrication_note_rect"),
|
|
2780
2803
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2781
2804
|
"pcb_fabrication_note_rect"
|
|
2782
2805
|
),
|
|
2783
|
-
pcb_component_id:
|
|
2784
|
-
pcb_group_id:
|
|
2785
|
-
subcircuit_id:
|
|
2806
|
+
pcb_component_id: z125.string(),
|
|
2807
|
+
pcb_group_id: z125.string().optional(),
|
|
2808
|
+
subcircuit_id: z125.string().optional(),
|
|
2786
2809
|
center: point,
|
|
2787
2810
|
width: length,
|
|
2788
2811
|
height: length,
|
|
2789
2812
|
layer: visible_layer,
|
|
2790
2813
|
stroke_width: length.default("0.1mm"),
|
|
2791
2814
|
corner_radius: length.optional(),
|
|
2792
|
-
is_filled:
|
|
2793
|
-
has_stroke:
|
|
2794
|
-
is_stroke_dashed:
|
|
2795
|
-
color:
|
|
2815
|
+
is_filled: z125.boolean().optional(),
|
|
2816
|
+
has_stroke: z125.boolean().optional(),
|
|
2817
|
+
is_stroke_dashed: z125.boolean().optional(),
|
|
2818
|
+
color: z125.string().optional()
|
|
2796
2819
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2797
2820
|
expectTypesMatch(true);
|
|
2798
2821
|
|
|
2799
2822
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2800
|
-
import { z as
|
|
2801
|
-
var pcb_fabrication_note_dimension =
|
|
2802
|
-
type:
|
|
2823
|
+
import { z as z126 } from "zod";
|
|
2824
|
+
var pcb_fabrication_note_dimension = z126.object({
|
|
2825
|
+
type: z126.literal("pcb_fabrication_note_dimension"),
|
|
2803
2826
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2804
2827
|
"pcb_fabrication_note_dimension"
|
|
2805
2828
|
),
|
|
2806
|
-
pcb_component_id:
|
|
2807
|
-
pcb_group_id:
|
|
2808
|
-
subcircuit_id:
|
|
2829
|
+
pcb_component_id: z126.string(),
|
|
2830
|
+
pcb_group_id: z126.string().optional(),
|
|
2831
|
+
subcircuit_id: z126.string().optional(),
|
|
2809
2832
|
layer: visible_layer,
|
|
2810
2833
|
from: point,
|
|
2811
2834
|
to: point,
|
|
2812
|
-
text:
|
|
2813
|
-
text_ccw_rotation:
|
|
2835
|
+
text: z126.string().optional(),
|
|
2836
|
+
text_ccw_rotation: z126.number().optional(),
|
|
2814
2837
|
offset: length.optional(),
|
|
2815
2838
|
offset_distance: length.optional(),
|
|
2816
|
-
offset_direction:
|
|
2817
|
-
x:
|
|
2818
|
-
y:
|
|
2839
|
+
offset_direction: z126.object({
|
|
2840
|
+
x: z126.number(),
|
|
2841
|
+
y: z126.number()
|
|
2819
2842
|
}).optional(),
|
|
2820
|
-
font:
|
|
2843
|
+
font: z126.literal("tscircuit2024").default("tscircuit2024"),
|
|
2821
2844
|
font_size: length.default("1mm"),
|
|
2822
|
-
color:
|
|
2845
|
+
color: z126.string().optional(),
|
|
2823
2846
|
arrow_size: length.default("1mm")
|
|
2824
2847
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2825
2848
|
expectTypesMatch(true);
|
|
2826
2849
|
|
|
2827
2850
|
// src/pcb/pcb_note_text.ts
|
|
2828
|
-
import { z as z126 } from "zod";
|
|
2829
|
-
var pcb_note_text = z126.object({
|
|
2830
|
-
type: z126.literal("pcb_note_text"),
|
|
2831
|
-
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2832
|
-
pcb_component_id: z126.string().optional(),
|
|
2833
|
-
pcb_group_id: z126.string().optional(),
|
|
2834
|
-
subcircuit_id: z126.string().optional(),
|
|
2835
|
-
name: z126.string().optional(),
|
|
2836
|
-
font: z126.literal("tscircuit2024").default("tscircuit2024"),
|
|
2837
|
-
font_size: distance.default("1mm"),
|
|
2838
|
-
text: z126.string().optional(),
|
|
2839
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2840
|
-
anchor_alignment: z126.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2841
|
-
layer: visible_layer.default("top"),
|
|
2842
|
-
is_mirrored_from_top_view: z126.boolean().optional(),
|
|
2843
|
-
color: z126.string().optional()
|
|
2844
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
2845
|
-
expectTypesMatch(true);
|
|
2846
|
-
|
|
2847
|
-
// src/pcb/pcb_note_rect.ts
|
|
2848
2851
|
import { z as z127 } from "zod";
|
|
2849
|
-
var
|
|
2850
|
-
type: z127.literal("
|
|
2851
|
-
|
|
2852
|
+
var pcb_note_text = z127.object({
|
|
2853
|
+
type: z127.literal("pcb_note_text"),
|
|
2854
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2852
2855
|
pcb_component_id: z127.string().optional(),
|
|
2853
2856
|
pcb_group_id: z127.string().optional(),
|
|
2854
2857
|
subcircuit_id: z127.string().optional(),
|
|
2855
2858
|
name: z127.string().optional(),
|
|
2859
|
+
font: z127.literal("tscircuit2024").default("tscircuit2024"),
|
|
2860
|
+
font_size: distance.default("1mm"),
|
|
2856
2861
|
text: z127.string().optional(),
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
height: length,
|
|
2862
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2863
|
+
anchor_alignment: z127.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2860
2864
|
layer: visible_layer.default("top"),
|
|
2861
|
-
|
|
2862
|
-
corner_radius: length.optional(),
|
|
2863
|
-
is_filled: z127.boolean().optional(),
|
|
2864
|
-
has_stroke: z127.boolean().optional(),
|
|
2865
|
-
is_stroke_dashed: z127.boolean().optional(),
|
|
2865
|
+
is_mirrored_from_top_view: z127.boolean().optional(),
|
|
2866
2866
|
color: z127.string().optional()
|
|
2867
|
-
}).describe("Defines a
|
|
2867
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
2868
2868
|
expectTypesMatch(true);
|
|
2869
2869
|
|
|
2870
|
-
// src/pcb/
|
|
2870
|
+
// src/pcb/pcb_note_rect.ts
|
|
2871
2871
|
import { z as z128 } from "zod";
|
|
2872
|
-
var
|
|
2873
|
-
type: z128.literal("
|
|
2874
|
-
|
|
2872
|
+
var pcb_note_rect = z128.object({
|
|
2873
|
+
type: z128.literal("pcb_note_rect"),
|
|
2874
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2875
2875
|
pcb_component_id: z128.string().optional(),
|
|
2876
2876
|
pcb_group_id: z128.string().optional(),
|
|
2877
2877
|
subcircuit_id: z128.string().optional(),
|
|
2878
2878
|
name: z128.string().optional(),
|
|
2879
2879
|
text: z128.string().optional(),
|
|
2880
|
-
|
|
2880
|
+
center: point,
|
|
2881
|
+
width: length,
|
|
2882
|
+
height: length,
|
|
2881
2883
|
layer: visible_layer.default("top"),
|
|
2882
2884
|
stroke_width: length.default("0.1mm"),
|
|
2885
|
+
corner_radius: length.optional(),
|
|
2886
|
+
is_filled: z128.boolean().optional(),
|
|
2887
|
+
has_stroke: z128.boolean().optional(),
|
|
2888
|
+
is_stroke_dashed: z128.boolean().optional(),
|
|
2883
2889
|
color: z128.string().optional()
|
|
2884
|
-
}).describe("Defines a
|
|
2890
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
2885
2891
|
expectTypesMatch(true);
|
|
2886
2892
|
|
|
2887
|
-
// src/pcb/
|
|
2893
|
+
// src/pcb/pcb_note_path.ts
|
|
2888
2894
|
import { z as z129 } from "zod";
|
|
2889
|
-
var
|
|
2890
|
-
type: z129.literal("
|
|
2891
|
-
|
|
2895
|
+
var pcb_note_path = z129.object({
|
|
2896
|
+
type: z129.literal("pcb_note_path"),
|
|
2897
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
2892
2898
|
pcb_component_id: z129.string().optional(),
|
|
2893
2899
|
pcb_group_id: z129.string().optional(),
|
|
2894
2900
|
subcircuit_id: z129.string().optional(),
|
|
2895
2901
|
name: z129.string().optional(),
|
|
2896
2902
|
text: z129.string().optional(),
|
|
2903
|
+
route: z129.array(point),
|
|
2904
|
+
layer: visible_layer.default("top"),
|
|
2905
|
+
stroke_width: length.default("0.1mm"),
|
|
2906
|
+
color: z129.string().optional()
|
|
2907
|
+
}).describe("Defines a polyline documentation note on the PCB");
|
|
2908
|
+
expectTypesMatch(true);
|
|
2909
|
+
|
|
2910
|
+
// src/pcb/pcb_note_line.ts
|
|
2911
|
+
import { z as z130 } from "zod";
|
|
2912
|
+
var pcb_note_line = z130.object({
|
|
2913
|
+
type: z130.literal("pcb_note_line"),
|
|
2914
|
+
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
2915
|
+
pcb_component_id: z130.string().optional(),
|
|
2916
|
+
pcb_group_id: z130.string().optional(),
|
|
2917
|
+
subcircuit_id: z130.string().optional(),
|
|
2918
|
+
name: z130.string().optional(),
|
|
2919
|
+
text: z130.string().optional(),
|
|
2897
2920
|
x1: distance,
|
|
2898
2921
|
y1: distance,
|
|
2899
2922
|
x2: distance,
|
|
2900
2923
|
y2: distance,
|
|
2901
2924
|
layer: visible_layer.default("top"),
|
|
2902
2925
|
stroke_width: distance.default("0.1mm"),
|
|
2903
|
-
color:
|
|
2904
|
-
is_dashed:
|
|
2926
|
+
color: z130.string().optional(),
|
|
2927
|
+
is_dashed: z130.boolean().optional()
|
|
2905
2928
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
2906
2929
|
expectTypesMatch(true);
|
|
2907
2930
|
|
|
2908
2931
|
// src/pcb/pcb_note_dimension.ts
|
|
2909
|
-
import { z as
|
|
2910
|
-
var pcb_note_dimension =
|
|
2911
|
-
type:
|
|
2932
|
+
import { z as z131 } from "zod";
|
|
2933
|
+
var pcb_note_dimension = z131.object({
|
|
2934
|
+
type: z131.literal("pcb_note_dimension"),
|
|
2912
2935
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
2913
|
-
pcb_component_id:
|
|
2914
|
-
pcb_group_id:
|
|
2915
|
-
subcircuit_id:
|
|
2916
|
-
name:
|
|
2936
|
+
pcb_component_id: z131.string().optional(),
|
|
2937
|
+
pcb_group_id: z131.string().optional(),
|
|
2938
|
+
subcircuit_id: z131.string().optional(),
|
|
2939
|
+
name: z131.string().optional(),
|
|
2917
2940
|
from: point,
|
|
2918
2941
|
to: point,
|
|
2919
|
-
text:
|
|
2920
|
-
text_ccw_rotation:
|
|
2942
|
+
text: z131.string().optional(),
|
|
2943
|
+
text_ccw_rotation: z131.number().optional(),
|
|
2921
2944
|
offset_distance: length.optional(),
|
|
2922
|
-
offset_direction:
|
|
2923
|
-
x:
|
|
2924
|
-
y:
|
|
2945
|
+
offset_direction: z131.object({
|
|
2946
|
+
x: z131.number(),
|
|
2947
|
+
y: z131.number()
|
|
2925
2948
|
}).optional(),
|
|
2926
|
-
font:
|
|
2949
|
+
font: z131.literal("tscircuit2024").default("tscircuit2024"),
|
|
2927
2950
|
font_size: length.default("1mm"),
|
|
2928
2951
|
layer: visible_layer.default("top"),
|
|
2929
|
-
color:
|
|
2952
|
+
color: z131.string().optional(),
|
|
2930
2953
|
arrow_size: length.default("1mm")
|
|
2931
2954
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
2932
2955
|
expectTypesMatch(true);
|
|
2933
2956
|
|
|
2934
2957
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
2935
|
-
import { z as
|
|
2958
|
+
import { z as z132 } from "zod";
|
|
2936
2959
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
2937
|
-
type:
|
|
2960
|
+
type: z132.literal("pcb_footprint_overlap_error"),
|
|
2938
2961
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2939
|
-
error_type:
|
|
2940
|
-
pcb_smtpad_ids:
|
|
2941
|
-
pcb_plated_hole_ids:
|
|
2942
|
-
pcb_hole_ids:
|
|
2943
|
-
pcb_keepout_ids:
|
|
2962
|
+
error_type: z132.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
2963
|
+
pcb_smtpad_ids: z132.array(z132.string()).optional(),
|
|
2964
|
+
pcb_plated_hole_ids: z132.array(z132.string()).optional(),
|
|
2965
|
+
pcb_hole_ids: z132.array(z132.string()).optional(),
|
|
2966
|
+
pcb_keepout_ids: z132.array(z132.string()).optional()
|
|
2944
2967
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
2945
2968
|
expectTypesMatch(
|
|
2946
2969
|
true
|
|
2947
2970
|
);
|
|
2948
2971
|
|
|
2949
2972
|
// src/pcb/pcb_courtyard_overlap_error.ts
|
|
2950
|
-
import { z as
|
|
2973
|
+
import { z as z133 } from "zod";
|
|
2951
2974
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
2952
|
-
type:
|
|
2975
|
+
type: z133.literal("pcb_courtyard_overlap_error"),
|
|
2953
2976
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2954
|
-
error_type:
|
|
2955
|
-
pcb_component_ids:
|
|
2977
|
+
error_type: z133.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
|
|
2978
|
+
pcb_component_ids: z133.tuple([z133.string(), z133.string()])
|
|
2956
2979
|
}).describe(
|
|
2957
2980
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
2958
2981
|
);
|
|
@@ -2961,49 +2984,49 @@ expectTypesMatch(
|
|
|
2961
2984
|
);
|
|
2962
2985
|
|
|
2963
2986
|
// src/pcb/pcb_keepout.ts
|
|
2964
|
-
import { z as
|
|
2965
|
-
var pcb_keepout =
|
|
2966
|
-
type:
|
|
2967
|
-
shape:
|
|
2968
|
-
pcb_group_id:
|
|
2969
|
-
subcircuit_id:
|
|
2987
|
+
import { z as z134 } from "zod";
|
|
2988
|
+
var pcb_keepout = z134.object({
|
|
2989
|
+
type: z134.literal("pcb_keepout"),
|
|
2990
|
+
shape: z134.literal("rect"),
|
|
2991
|
+
pcb_group_id: z134.string().optional(),
|
|
2992
|
+
subcircuit_id: z134.string().optional(),
|
|
2970
2993
|
center: point,
|
|
2971
2994
|
width: distance,
|
|
2972
2995
|
height: distance,
|
|
2973
|
-
pcb_keepout_id:
|
|
2974
|
-
layers:
|
|
2996
|
+
pcb_keepout_id: z134.string(),
|
|
2997
|
+
layers: z134.array(z134.string()),
|
|
2975
2998
|
// Specify layers where the keepout applies
|
|
2976
|
-
description:
|
|
2999
|
+
description: z134.string().optional()
|
|
2977
3000
|
// Optional description of the keepout
|
|
2978
3001
|
}).or(
|
|
2979
|
-
|
|
2980
|
-
type:
|
|
2981
|
-
shape:
|
|
2982
|
-
pcb_group_id:
|
|
2983
|
-
subcircuit_id:
|
|
3002
|
+
z134.object({
|
|
3003
|
+
type: z134.literal("pcb_keepout"),
|
|
3004
|
+
shape: z134.literal("circle"),
|
|
3005
|
+
pcb_group_id: z134.string().optional(),
|
|
3006
|
+
subcircuit_id: z134.string().optional(),
|
|
2984
3007
|
center: point,
|
|
2985
3008
|
radius: distance,
|
|
2986
|
-
pcb_keepout_id:
|
|
2987
|
-
layers:
|
|
3009
|
+
pcb_keepout_id: z134.string(),
|
|
3010
|
+
layers: z134.array(z134.string()),
|
|
2988
3011
|
// Specify layers where the keepout applies
|
|
2989
|
-
description:
|
|
3012
|
+
description: z134.string().optional()
|
|
2990
3013
|
// Optional description of the keepout
|
|
2991
3014
|
})
|
|
2992
3015
|
);
|
|
2993
3016
|
expectTypesMatch(true);
|
|
2994
3017
|
|
|
2995
3018
|
// src/pcb/pcb_cutout.ts
|
|
2996
|
-
import { z as
|
|
2997
|
-
var pcb_cutout_base =
|
|
2998
|
-
type:
|
|
3019
|
+
import { z as z135 } from "zod";
|
|
3020
|
+
var pcb_cutout_base = z135.object({
|
|
3021
|
+
type: z135.literal("pcb_cutout"),
|
|
2999
3022
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
3000
|
-
pcb_group_id:
|
|
3001
|
-
subcircuit_id:
|
|
3002
|
-
pcb_board_id:
|
|
3003
|
-
pcb_panel_id:
|
|
3023
|
+
pcb_group_id: z135.string().optional(),
|
|
3024
|
+
subcircuit_id: z135.string().optional(),
|
|
3025
|
+
pcb_board_id: z135.string().optional(),
|
|
3026
|
+
pcb_panel_id: z135.string().optional()
|
|
3004
3027
|
});
|
|
3005
3028
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
3006
|
-
shape:
|
|
3029
|
+
shape: z135.literal("rect"),
|
|
3007
3030
|
center: point,
|
|
3008
3031
|
width: length,
|
|
3009
3032
|
height: length,
|
|
@@ -3012,26 +3035,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
3012
3035
|
});
|
|
3013
3036
|
expectTypesMatch(true);
|
|
3014
3037
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
3015
|
-
shape:
|
|
3038
|
+
shape: z135.literal("circle"),
|
|
3016
3039
|
center: point,
|
|
3017
3040
|
radius: length
|
|
3018
3041
|
});
|
|
3019
3042
|
expectTypesMatch(true);
|
|
3020
3043
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
3021
|
-
shape:
|
|
3022
|
-
points:
|
|
3044
|
+
shape: z135.literal("polygon"),
|
|
3045
|
+
points: z135.array(point)
|
|
3023
3046
|
});
|
|
3024
3047
|
expectTypesMatch(true);
|
|
3025
3048
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
3026
|
-
shape:
|
|
3027
|
-
route:
|
|
3049
|
+
shape: z135.literal("path"),
|
|
3050
|
+
route: z135.array(point),
|
|
3028
3051
|
slot_width: length,
|
|
3029
3052
|
slot_length: length.optional(),
|
|
3030
3053
|
space_between_slots: length.optional(),
|
|
3031
3054
|
slot_corner_radius: length.optional()
|
|
3032
3055
|
});
|
|
3033
3056
|
expectTypesMatch(true);
|
|
3034
|
-
var pcb_cutout =
|
|
3057
|
+
var pcb_cutout = z135.discriminatedUnion("shape", [
|
|
3035
3058
|
pcb_cutout_rect,
|
|
3036
3059
|
pcb_cutout_circle,
|
|
3037
3060
|
pcb_cutout_polygon,
|
|
@@ -3040,169 +3063,169 @@ var pcb_cutout = z134.discriminatedUnion("shape", [
|
|
|
3040
3063
|
expectTypesMatch(true);
|
|
3041
3064
|
|
|
3042
3065
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
3043
|
-
import { z as
|
|
3066
|
+
import { z as z136 } from "zod";
|
|
3044
3067
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
3045
|
-
type:
|
|
3068
|
+
type: z136.literal("pcb_missing_footprint_error"),
|
|
3046
3069
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
3047
3070
|
"pcb_missing_footprint_error"
|
|
3048
3071
|
),
|
|
3049
|
-
pcb_group_id:
|
|
3050
|
-
subcircuit_id:
|
|
3051
|
-
error_type:
|
|
3052
|
-
source_component_id:
|
|
3072
|
+
pcb_group_id: z136.string().optional(),
|
|
3073
|
+
subcircuit_id: z136.string().optional(),
|
|
3074
|
+
error_type: z136.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
3075
|
+
source_component_id: z136.string()
|
|
3053
3076
|
}).describe("Defines a missing footprint error on the PCB");
|
|
3054
3077
|
expectTypesMatch(
|
|
3055
3078
|
true
|
|
3056
3079
|
);
|
|
3057
3080
|
|
|
3058
3081
|
// src/pcb/external_footprint_load_error.ts
|
|
3059
|
-
import { z as
|
|
3082
|
+
import { z as z137 } from "zod";
|
|
3060
3083
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
3061
|
-
type:
|
|
3084
|
+
type: z137.literal("external_footprint_load_error"),
|
|
3062
3085
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3063
3086
|
"external_footprint_load_error"
|
|
3064
3087
|
),
|
|
3065
|
-
pcb_component_id:
|
|
3066
|
-
source_component_id:
|
|
3067
|
-
pcb_group_id:
|
|
3068
|
-
subcircuit_id:
|
|
3069
|
-
footprinter_string:
|
|
3070
|
-
error_type:
|
|
3088
|
+
pcb_component_id: z137.string(),
|
|
3089
|
+
source_component_id: z137.string(),
|
|
3090
|
+
pcb_group_id: z137.string().optional(),
|
|
3091
|
+
subcircuit_id: z137.string().optional(),
|
|
3092
|
+
footprinter_string: z137.string().optional(),
|
|
3093
|
+
error_type: z137.literal("external_footprint_load_error").default("external_footprint_load_error")
|
|
3071
3094
|
}).describe("Defines an error when an external footprint fails to load");
|
|
3072
3095
|
expectTypesMatch(true);
|
|
3073
3096
|
|
|
3074
3097
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
3075
|
-
import { z as
|
|
3098
|
+
import { z as z138 } from "zod";
|
|
3076
3099
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
3077
|
-
type:
|
|
3100
|
+
type: z138.literal("circuit_json_footprint_load_error"),
|
|
3078
3101
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3079
3102
|
"circuit_json_footprint_load_error"
|
|
3080
3103
|
),
|
|
3081
|
-
pcb_component_id:
|
|
3082
|
-
source_component_id:
|
|
3083
|
-
pcb_group_id:
|
|
3084
|
-
subcircuit_id:
|
|
3085
|
-
error_type:
|
|
3086
|
-
circuit_json:
|
|
3104
|
+
pcb_component_id: z138.string(),
|
|
3105
|
+
source_component_id: z138.string(),
|
|
3106
|
+
pcb_group_id: z138.string().optional(),
|
|
3107
|
+
subcircuit_id: z138.string().optional(),
|
|
3108
|
+
error_type: z138.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
3109
|
+
circuit_json: z138.array(z138.any()).optional()
|
|
3087
3110
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
3088
3111
|
expectTypesMatch(true);
|
|
3089
3112
|
|
|
3090
3113
|
// src/pcb/pcb_group.ts
|
|
3091
|
-
import { z as
|
|
3092
|
-
var pcb_group =
|
|
3093
|
-
type:
|
|
3114
|
+
import { z as z139 } from "zod";
|
|
3115
|
+
var pcb_group = z139.object({
|
|
3116
|
+
type: z139.literal("pcb_group"),
|
|
3094
3117
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
3095
|
-
source_group_id:
|
|
3096
|
-
is_subcircuit:
|
|
3097
|
-
subcircuit_id:
|
|
3118
|
+
source_group_id: z139.string(),
|
|
3119
|
+
is_subcircuit: z139.boolean().optional(),
|
|
3120
|
+
subcircuit_id: z139.string().optional(),
|
|
3098
3121
|
width: length.optional(),
|
|
3099
3122
|
height: length.optional(),
|
|
3100
3123
|
center: point,
|
|
3101
|
-
display_offset_x:
|
|
3124
|
+
display_offset_x: z139.string().optional().describe(
|
|
3102
3125
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
3103
3126
|
),
|
|
3104
|
-
display_offset_y:
|
|
3127
|
+
display_offset_y: z139.string().optional().describe(
|
|
3105
3128
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
3106
3129
|
),
|
|
3107
|
-
outline:
|
|
3130
|
+
outline: z139.array(point).optional(),
|
|
3108
3131
|
anchor_position: point.optional(),
|
|
3109
3132
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
3110
|
-
position_mode:
|
|
3111
|
-
positioned_relative_to_pcb_group_id:
|
|
3112
|
-
positioned_relative_to_pcb_board_id:
|
|
3113
|
-
pcb_component_ids:
|
|
3114
|
-
child_layout_mode:
|
|
3115
|
-
name:
|
|
3116
|
-
description:
|
|
3117
|
-
layout_mode:
|
|
3118
|
-
autorouter_configuration:
|
|
3133
|
+
position_mode: z139.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
3134
|
+
positioned_relative_to_pcb_group_id: z139.string().optional(),
|
|
3135
|
+
positioned_relative_to_pcb_board_id: z139.string().optional(),
|
|
3136
|
+
pcb_component_ids: z139.array(z139.string()),
|
|
3137
|
+
child_layout_mode: z139.enum(["packed", "none"]).optional(),
|
|
3138
|
+
name: z139.string().optional(),
|
|
3139
|
+
description: z139.string().optional(),
|
|
3140
|
+
layout_mode: z139.string().optional(),
|
|
3141
|
+
autorouter_configuration: z139.object({
|
|
3119
3142
|
trace_clearance: length
|
|
3120
3143
|
}).optional(),
|
|
3121
|
-
autorouter_used_string:
|
|
3144
|
+
autorouter_used_string: z139.string().optional()
|
|
3122
3145
|
}).describe("Defines a group of components on the PCB");
|
|
3123
3146
|
expectTypesMatch(true);
|
|
3124
3147
|
|
|
3125
3148
|
// src/pcb/pcb_autorouting_error.ts
|
|
3126
|
-
import { z as
|
|
3149
|
+
import { z as z140 } from "zod";
|
|
3127
3150
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
3128
|
-
type:
|
|
3151
|
+
type: z140.literal("pcb_autorouting_error"),
|
|
3129
3152
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
3130
|
-
error_type:
|
|
3131
|
-
subcircuit_id:
|
|
3153
|
+
error_type: z140.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
3154
|
+
subcircuit_id: z140.string().optional()
|
|
3132
3155
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
3133
3156
|
expectTypesMatch(true);
|
|
3134
3157
|
|
|
3135
3158
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
3136
|
-
import { z as
|
|
3137
|
-
var pcb_manual_edit_conflict_warning =
|
|
3138
|
-
type:
|
|
3159
|
+
import { z as z141 } from "zod";
|
|
3160
|
+
var pcb_manual_edit_conflict_warning = z141.object({
|
|
3161
|
+
type: z141.literal("pcb_manual_edit_conflict_warning"),
|
|
3139
3162
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
3140
3163
|
"pcb_manual_edit_conflict_warning"
|
|
3141
3164
|
),
|
|
3142
|
-
warning_type:
|
|
3143
|
-
message:
|
|
3144
|
-
pcb_component_id:
|
|
3145
|
-
pcb_group_id:
|
|
3146
|
-
subcircuit_id:
|
|
3147
|
-
source_component_id:
|
|
3165
|
+
warning_type: z141.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
3166
|
+
message: z141.string(),
|
|
3167
|
+
pcb_component_id: z141.string(),
|
|
3168
|
+
pcb_group_id: z141.string().optional(),
|
|
3169
|
+
subcircuit_id: z141.string().optional(),
|
|
3170
|
+
source_component_id: z141.string()
|
|
3148
3171
|
}).describe(
|
|
3149
3172
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3150
3173
|
);
|
|
3151
3174
|
expectTypesMatch(true);
|
|
3152
3175
|
|
|
3153
3176
|
// src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts
|
|
3154
|
-
import { z as
|
|
3155
|
-
var connectorOrientationDirection =
|
|
3156
|
-
var pcb_connector_not_in_accessible_orientation_warning =
|
|
3157
|
-
type:
|
|
3177
|
+
import { z as z142 } from "zod";
|
|
3178
|
+
var connectorOrientationDirection = z142.enum(["x-", "x+", "y+", "y-"]);
|
|
3179
|
+
var pcb_connector_not_in_accessible_orientation_warning = z142.object({
|
|
3180
|
+
type: z142.literal("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3158
3181
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3159
3182
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3160
3183
|
),
|
|
3161
|
-
warning_type:
|
|
3162
|
-
message:
|
|
3163
|
-
pcb_component_id:
|
|
3164
|
-
source_component_id:
|
|
3165
|
-
pcb_board_id:
|
|
3184
|
+
warning_type: z142.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3185
|
+
message: z142.string(),
|
|
3186
|
+
pcb_component_id: z142.string(),
|
|
3187
|
+
source_component_id: z142.string().optional(),
|
|
3188
|
+
pcb_board_id: z142.string().optional(),
|
|
3166
3189
|
facing_direction: connectorOrientationDirection,
|
|
3167
3190
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3168
|
-
subcircuit_id:
|
|
3191
|
+
subcircuit_id: z142.string().optional()
|
|
3169
3192
|
}).describe(
|
|
3170
3193
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
3171
3194
|
);
|
|
3172
3195
|
expectTypesMatch(true);
|
|
3173
3196
|
|
|
3174
3197
|
// src/pcb/supplier_footprint_mismatch_warning.ts
|
|
3175
|
-
import { z as
|
|
3176
|
-
var supplier_footprint_mismatch_warning =
|
|
3177
|
-
type:
|
|
3198
|
+
import { z as z143 } from "zod";
|
|
3199
|
+
var supplier_footprint_mismatch_warning = z143.object({
|
|
3200
|
+
type: z143.literal("supplier_footprint_mismatch_warning"),
|
|
3178
3201
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
3179
3202
|
"supplier_footprint_mismatch_warning"
|
|
3180
3203
|
),
|
|
3181
|
-
warning_type:
|
|
3182
|
-
message:
|
|
3183
|
-
source_component_id:
|
|
3184
|
-
pcb_component_id:
|
|
3185
|
-
pcb_group_id:
|
|
3186
|
-
subcircuit_id:
|
|
3204
|
+
warning_type: z143.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
|
|
3205
|
+
message: z143.string(),
|
|
3206
|
+
source_component_id: z143.string(),
|
|
3207
|
+
pcb_component_id: z143.string().optional(),
|
|
3208
|
+
pcb_group_id: z143.string().optional(),
|
|
3209
|
+
subcircuit_id: z143.string().optional(),
|
|
3187
3210
|
supplier_name: supplier_name.optional(),
|
|
3188
|
-
supplier_part_number:
|
|
3189
|
-
supplier_footprint_url:
|
|
3190
|
-
footprint_copper_intersection_over_union:
|
|
3211
|
+
supplier_part_number: z143.string().optional(),
|
|
3212
|
+
supplier_footprint_url: z143.string().optional(),
|
|
3213
|
+
footprint_copper_intersection_over_union: z143.number()
|
|
3191
3214
|
}).describe(
|
|
3192
3215
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
3193
3216
|
);
|
|
3194
3217
|
expectTypesMatch(true);
|
|
3195
3218
|
|
|
3196
3219
|
// src/pcb/pcb_breakout_point.ts
|
|
3197
|
-
import { z as
|
|
3198
|
-
var pcb_breakout_point =
|
|
3199
|
-
type:
|
|
3220
|
+
import { z as z144 } from "zod";
|
|
3221
|
+
var pcb_breakout_point = z144.object({
|
|
3222
|
+
type: z144.literal("pcb_breakout_point"),
|
|
3200
3223
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
3201
|
-
pcb_group_id:
|
|
3202
|
-
subcircuit_id:
|
|
3203
|
-
source_trace_id:
|
|
3204
|
-
source_port_id:
|
|
3205
|
-
source_net_id:
|
|
3224
|
+
pcb_group_id: z144.string(),
|
|
3225
|
+
subcircuit_id: z144.string().optional(),
|
|
3226
|
+
source_trace_id: z144.string().optional(),
|
|
3227
|
+
source_port_id: z144.string().optional(),
|
|
3228
|
+
source_net_id: z144.string().optional(),
|
|
3206
3229
|
x: distance,
|
|
3207
3230
|
y: distance
|
|
3208
3231
|
}).describe(
|
|
@@ -3211,61 +3234,61 @@ var pcb_breakout_point = z143.object({
|
|
|
3211
3234
|
expectTypesMatch(true);
|
|
3212
3235
|
|
|
3213
3236
|
// src/pcb/pcb_ground_plane.ts
|
|
3214
|
-
import { z as
|
|
3215
|
-
var pcb_ground_plane =
|
|
3216
|
-
type:
|
|
3237
|
+
import { z as z145 } from "zod";
|
|
3238
|
+
var pcb_ground_plane = z145.object({
|
|
3239
|
+
type: z145.literal("pcb_ground_plane"),
|
|
3217
3240
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
3218
|
-
source_pcb_ground_plane_id:
|
|
3219
|
-
source_net_id:
|
|
3220
|
-
pcb_group_id:
|
|
3221
|
-
subcircuit_id:
|
|
3241
|
+
source_pcb_ground_plane_id: z145.string(),
|
|
3242
|
+
source_net_id: z145.string(),
|
|
3243
|
+
pcb_group_id: z145.string().optional(),
|
|
3244
|
+
subcircuit_id: z145.string().optional()
|
|
3222
3245
|
}).describe("Defines a ground plane on the PCB");
|
|
3223
3246
|
expectTypesMatch(true);
|
|
3224
3247
|
|
|
3225
3248
|
// src/pcb/pcb_ground_plane_region.ts
|
|
3226
|
-
import { z as
|
|
3227
|
-
var pcb_ground_plane_region =
|
|
3228
|
-
type:
|
|
3249
|
+
import { z as z146 } from "zod";
|
|
3250
|
+
var pcb_ground_plane_region = z146.object({
|
|
3251
|
+
type: z146.literal("pcb_ground_plane_region"),
|
|
3229
3252
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3230
3253
|
"pcb_ground_plane_region"
|
|
3231
3254
|
),
|
|
3232
|
-
pcb_ground_plane_id:
|
|
3233
|
-
pcb_group_id:
|
|
3234
|
-
subcircuit_id:
|
|
3255
|
+
pcb_ground_plane_id: z146.string(),
|
|
3256
|
+
pcb_group_id: z146.string().optional(),
|
|
3257
|
+
subcircuit_id: z146.string().optional(),
|
|
3235
3258
|
layer: layer_ref,
|
|
3236
|
-
points:
|
|
3259
|
+
points: z146.array(point)
|
|
3237
3260
|
}).describe("Defines a polygon region of a ground plane");
|
|
3238
3261
|
expectTypesMatch(true);
|
|
3239
3262
|
|
|
3240
3263
|
// src/pcb/pcb_thermal_spoke.ts
|
|
3241
|
-
import { z as
|
|
3242
|
-
var pcb_thermal_spoke =
|
|
3243
|
-
type:
|
|
3264
|
+
import { z as z147 } from "zod";
|
|
3265
|
+
var pcb_thermal_spoke = z147.object({
|
|
3266
|
+
type: z147.literal("pcb_thermal_spoke"),
|
|
3244
3267
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3245
|
-
pcb_ground_plane_id:
|
|
3246
|
-
shape:
|
|
3247
|
-
spoke_count:
|
|
3268
|
+
pcb_ground_plane_id: z147.string(),
|
|
3269
|
+
shape: z147.string(),
|
|
3270
|
+
spoke_count: z147.number(),
|
|
3248
3271
|
spoke_thickness: distance,
|
|
3249
3272
|
spoke_inner_diameter: distance,
|
|
3250
3273
|
spoke_outer_diameter: distance,
|
|
3251
|
-
pcb_plated_hole_id:
|
|
3252
|
-
subcircuit_id:
|
|
3274
|
+
pcb_plated_hole_id: z147.string().optional(),
|
|
3275
|
+
subcircuit_id: z147.string().optional()
|
|
3253
3276
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3254
3277
|
expectTypesMatch(true);
|
|
3255
3278
|
|
|
3256
3279
|
// src/pcb/pcb_copper_pour.ts
|
|
3257
|
-
import { z as
|
|
3258
|
-
var pcb_copper_pour_base =
|
|
3259
|
-
type:
|
|
3280
|
+
import { z as z148 } from "zod";
|
|
3281
|
+
var pcb_copper_pour_base = z148.object({
|
|
3282
|
+
type: z148.literal("pcb_copper_pour"),
|
|
3260
3283
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3261
|
-
pcb_group_id:
|
|
3262
|
-
subcircuit_id:
|
|
3284
|
+
pcb_group_id: z148.string().optional(),
|
|
3285
|
+
subcircuit_id: z148.string().optional(),
|
|
3263
3286
|
layer: layer_ref,
|
|
3264
|
-
source_net_id:
|
|
3265
|
-
covered_with_solder_mask:
|
|
3287
|
+
source_net_id: z148.string().optional(),
|
|
3288
|
+
covered_with_solder_mask: z148.boolean().optional().default(true)
|
|
3266
3289
|
});
|
|
3267
3290
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3268
|
-
shape:
|
|
3291
|
+
shape: z148.literal("rect"),
|
|
3269
3292
|
center: point,
|
|
3270
3293
|
width: length,
|
|
3271
3294
|
height: length,
|
|
@@ -3273,16 +3296,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3273
3296
|
});
|
|
3274
3297
|
expectTypesMatch(true);
|
|
3275
3298
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3276
|
-
shape:
|
|
3299
|
+
shape: z148.literal("brep"),
|
|
3277
3300
|
brep_shape
|
|
3278
3301
|
});
|
|
3279
3302
|
expectTypesMatch(true);
|
|
3280
3303
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3281
|
-
shape:
|
|
3282
|
-
points:
|
|
3304
|
+
shape: z148.literal("polygon"),
|
|
3305
|
+
points: z148.array(point)
|
|
3283
3306
|
});
|
|
3284
3307
|
expectTypesMatch(true);
|
|
3285
|
-
var pcb_copper_pour =
|
|
3308
|
+
var pcb_copper_pour = z148.discriminatedUnion("shape", [
|
|
3286
3309
|
pcb_copper_pour_rect,
|
|
3287
3310
|
pcb_copper_pour_brep,
|
|
3288
3311
|
pcb_copper_pour_polygon
|
|
@@ -3290,99 +3313,99 @@ var pcb_copper_pour = z147.discriminatedUnion("shape", [
|
|
|
3290
3313
|
expectTypesMatch(true);
|
|
3291
3314
|
|
|
3292
3315
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
3293
|
-
import { z as
|
|
3316
|
+
import { z as z149 } from "zod";
|
|
3294
3317
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3295
|
-
type:
|
|
3318
|
+
type: z149.literal("pcb_component_outside_board_error"),
|
|
3296
3319
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3297
3320
|
"pcb_component_outside_board_error"
|
|
3298
3321
|
),
|
|
3299
|
-
error_type:
|
|
3300
|
-
pcb_component_id:
|
|
3301
|
-
pcb_board_id:
|
|
3322
|
+
error_type: z149.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
3323
|
+
pcb_component_id: z149.string(),
|
|
3324
|
+
pcb_board_id: z149.string(),
|
|
3302
3325
|
component_center: point,
|
|
3303
|
-
component_bounds:
|
|
3304
|
-
min_x:
|
|
3305
|
-
max_x:
|
|
3306
|
-
min_y:
|
|
3307
|
-
max_y:
|
|
3326
|
+
component_bounds: z149.object({
|
|
3327
|
+
min_x: z149.number(),
|
|
3328
|
+
max_x: z149.number(),
|
|
3329
|
+
min_y: z149.number(),
|
|
3330
|
+
max_y: z149.number()
|
|
3308
3331
|
}),
|
|
3309
|
-
subcircuit_id:
|
|
3310
|
-
source_component_id:
|
|
3332
|
+
subcircuit_id: z149.string().optional(),
|
|
3333
|
+
source_component_id: z149.string().optional()
|
|
3311
3334
|
}).describe(
|
|
3312
3335
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3313
3336
|
);
|
|
3314
3337
|
expectTypesMatch(true);
|
|
3315
3338
|
|
|
3316
3339
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
3317
|
-
import { z as
|
|
3340
|
+
import { z as z150 } from "zod";
|
|
3318
3341
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3319
|
-
type:
|
|
3342
|
+
type: z150.literal("pcb_component_not_on_board_edge_error"),
|
|
3320
3343
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3321
3344
|
"pcb_component_not_on_board_edge_error"
|
|
3322
3345
|
),
|
|
3323
|
-
error_type:
|
|
3324
|
-
pcb_component_id:
|
|
3325
|
-
pcb_board_id:
|
|
3346
|
+
error_type: z150.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
3347
|
+
pcb_component_id: z150.string(),
|
|
3348
|
+
pcb_board_id: z150.string(),
|
|
3326
3349
|
component_center: point,
|
|
3327
|
-
pad_to_nearest_board_edge_distance:
|
|
3328
|
-
source_component_id:
|
|
3329
|
-
subcircuit_id:
|
|
3350
|
+
pad_to_nearest_board_edge_distance: z150.number(),
|
|
3351
|
+
source_component_id: z150.string().optional(),
|
|
3352
|
+
subcircuit_id: z150.string().optional()
|
|
3330
3353
|
}).describe(
|
|
3331
3354
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3332
3355
|
);
|
|
3333
3356
|
expectTypesMatch(true);
|
|
3334
3357
|
|
|
3335
3358
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
3336
|
-
import { z as
|
|
3359
|
+
import { z as z151 } from "zod";
|
|
3337
3360
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3338
|
-
type:
|
|
3361
|
+
type: z151.literal("pcb_component_invalid_layer_error"),
|
|
3339
3362
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3340
3363
|
"pcb_component_invalid_layer_error"
|
|
3341
3364
|
),
|
|
3342
|
-
error_type:
|
|
3343
|
-
pcb_component_id:
|
|
3344
|
-
source_component_id:
|
|
3365
|
+
error_type: z151.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
3366
|
+
pcb_component_id: z151.string().optional(),
|
|
3367
|
+
source_component_id: z151.string(),
|
|
3345
3368
|
layer: layer_ref,
|
|
3346
|
-
subcircuit_id:
|
|
3369
|
+
subcircuit_id: z151.string().optional()
|
|
3347
3370
|
}).describe(
|
|
3348
3371
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
3349
3372
|
);
|
|
3350
3373
|
expectTypesMatch(true);
|
|
3351
3374
|
|
|
3352
3375
|
// src/pcb/pcb_via_clearance_error.ts
|
|
3353
|
-
import { z as
|
|
3376
|
+
import { z as z152 } from "zod";
|
|
3354
3377
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
3355
|
-
type:
|
|
3378
|
+
type: z152.literal("pcb_via_clearance_error"),
|
|
3356
3379
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3357
|
-
error_type:
|
|
3358
|
-
pcb_via_ids:
|
|
3380
|
+
error_type: z152.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
3381
|
+
pcb_via_ids: z152.array(z152.string()).min(2),
|
|
3359
3382
|
minimum_clearance: distance.optional(),
|
|
3360
3383
|
actual_clearance: distance.optional(),
|
|
3361
|
-
pcb_center:
|
|
3362
|
-
x:
|
|
3363
|
-
y:
|
|
3384
|
+
pcb_center: z152.object({
|
|
3385
|
+
x: z152.number().optional(),
|
|
3386
|
+
y: z152.number().optional()
|
|
3364
3387
|
}).optional(),
|
|
3365
|
-
subcircuit_id:
|
|
3388
|
+
subcircuit_id: z152.string().optional()
|
|
3366
3389
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
3367
3390
|
expectTypesMatch(true);
|
|
3368
3391
|
|
|
3369
3392
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
3370
|
-
import { z as
|
|
3393
|
+
import { z as z153 } from "zod";
|
|
3371
3394
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
3372
|
-
type:
|
|
3395
|
+
type: z153.literal("pcb_via_trace_clearance_error"),
|
|
3373
3396
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3374
3397
|
"pcb_via_trace_clearance_error"
|
|
3375
3398
|
),
|
|
3376
|
-
error_type:
|
|
3377
|
-
pcb_via_id:
|
|
3378
|
-
pcb_trace_id:
|
|
3399
|
+
error_type: z153.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
3400
|
+
pcb_via_id: z153.string(),
|
|
3401
|
+
pcb_trace_id: z153.string(),
|
|
3379
3402
|
minimum_clearance: distance.optional(),
|
|
3380
3403
|
actual_clearance: distance.optional(),
|
|
3381
|
-
center:
|
|
3382
|
-
x:
|
|
3383
|
-
y:
|
|
3404
|
+
center: z153.object({
|
|
3405
|
+
x: z153.number().optional(),
|
|
3406
|
+
y: z153.number().optional()
|
|
3384
3407
|
}).optional(),
|
|
3385
|
-
subcircuit_id:
|
|
3408
|
+
subcircuit_id: z153.string().optional()
|
|
3386
3409
|
}).describe(
|
|
3387
3410
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
3388
3411
|
);
|
|
@@ -3391,41 +3414,41 @@ expectTypesMatch(
|
|
|
3391
3414
|
);
|
|
3392
3415
|
|
|
3393
3416
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
3394
|
-
import { z as
|
|
3417
|
+
import { z as z154 } from "zod";
|
|
3395
3418
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
3396
|
-
type:
|
|
3419
|
+
type: z154.literal("pcb_pad_pad_clearance_error"),
|
|
3397
3420
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3398
3421
|
"pcb_pad_pad_clearance_error"
|
|
3399
3422
|
),
|
|
3400
|
-
error_type:
|
|
3401
|
-
pcb_pad_ids:
|
|
3423
|
+
error_type: z154.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
3424
|
+
pcb_pad_ids: z154.array(z154.string()).min(2),
|
|
3402
3425
|
minimum_clearance: distance.optional(),
|
|
3403
3426
|
actual_clearance: distance.optional(),
|
|
3404
|
-
center:
|
|
3405
|
-
x:
|
|
3406
|
-
y:
|
|
3427
|
+
center: z154.object({
|
|
3428
|
+
x: z154.number().optional(),
|
|
3429
|
+
y: z154.number().optional()
|
|
3407
3430
|
}).optional(),
|
|
3408
|
-
subcircuit_id:
|
|
3431
|
+
subcircuit_id: z154.string().optional()
|
|
3409
3432
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
3410
3433
|
expectTypesMatch(true);
|
|
3411
3434
|
|
|
3412
3435
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
3413
|
-
import { z as
|
|
3436
|
+
import { z as z155 } from "zod";
|
|
3414
3437
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
3415
|
-
type:
|
|
3438
|
+
type: z155.literal("pcb_pad_trace_clearance_error"),
|
|
3416
3439
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3417
3440
|
"pcb_pad_trace_clearance_error"
|
|
3418
3441
|
),
|
|
3419
|
-
error_type:
|
|
3420
|
-
pcb_pad_id:
|
|
3421
|
-
pcb_trace_id:
|
|
3442
|
+
error_type: z155.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
3443
|
+
pcb_pad_id: z155.string(),
|
|
3444
|
+
pcb_trace_id: z155.string(),
|
|
3422
3445
|
minimum_clearance: distance.optional(),
|
|
3423
3446
|
actual_clearance: distance.optional(),
|
|
3424
|
-
center:
|
|
3425
|
-
x:
|
|
3426
|
-
y:
|
|
3447
|
+
center: z155.object({
|
|
3448
|
+
x: z155.number().optional(),
|
|
3449
|
+
y: z155.number().optional()
|
|
3427
3450
|
}).optional(),
|
|
3428
|
-
subcircuit_id:
|
|
3451
|
+
subcircuit_id: z155.string().optional()
|
|
3429
3452
|
}).describe(
|
|
3430
3453
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
3431
3454
|
);
|
|
@@ -3434,89 +3457,89 @@ expectTypesMatch(
|
|
|
3434
3457
|
);
|
|
3435
3458
|
|
|
3436
3459
|
// src/pcb/pcb_courtyard_rect.ts
|
|
3437
|
-
import { z as
|
|
3438
|
-
var pcb_courtyard_rect =
|
|
3439
|
-
type:
|
|
3460
|
+
import { z as z156 } from "zod";
|
|
3461
|
+
var pcb_courtyard_rect = z156.object({
|
|
3462
|
+
type: z156.literal("pcb_courtyard_rect"),
|
|
3440
3463
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
3441
|
-
pcb_component_id:
|
|
3442
|
-
pcb_group_id:
|
|
3443
|
-
subcircuit_id:
|
|
3464
|
+
pcb_component_id: z156.string(),
|
|
3465
|
+
pcb_group_id: z156.string().optional(),
|
|
3466
|
+
subcircuit_id: z156.string().optional(),
|
|
3444
3467
|
center: point,
|
|
3445
3468
|
width: length,
|
|
3446
3469
|
height: length,
|
|
3447
3470
|
layer: visible_layer,
|
|
3448
3471
|
ccw_rotation: rotation.optional(),
|
|
3449
|
-
color:
|
|
3472
|
+
color: z156.string().optional()
|
|
3450
3473
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
3451
3474
|
expectTypesMatch(true);
|
|
3452
3475
|
|
|
3453
3476
|
// src/pcb/pcb_courtyard_outline.ts
|
|
3454
|
-
import { z as
|
|
3455
|
-
var pcb_courtyard_outline =
|
|
3456
|
-
type:
|
|
3477
|
+
import { z as z157 } from "zod";
|
|
3478
|
+
var pcb_courtyard_outline = z157.object({
|
|
3479
|
+
type: z157.literal("pcb_courtyard_outline"),
|
|
3457
3480
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
3458
3481
|
"pcb_courtyard_outline"
|
|
3459
3482
|
),
|
|
3460
|
-
pcb_component_id:
|
|
3461
|
-
pcb_group_id:
|
|
3462
|
-
subcircuit_id:
|
|
3483
|
+
pcb_component_id: z157.string(),
|
|
3484
|
+
pcb_group_id: z157.string().optional(),
|
|
3485
|
+
subcircuit_id: z157.string().optional(),
|
|
3463
3486
|
layer: visible_layer,
|
|
3464
|
-
outline:
|
|
3487
|
+
outline: z157.array(point).min(2)
|
|
3465
3488
|
}).describe("Defines a courtyard outline on the PCB");
|
|
3466
3489
|
expectTypesMatch(true);
|
|
3467
3490
|
|
|
3468
3491
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
3469
|
-
import { z as
|
|
3470
|
-
var pcb_courtyard_polygon =
|
|
3471
|
-
type:
|
|
3492
|
+
import { z as z158 } from "zod";
|
|
3493
|
+
var pcb_courtyard_polygon = z158.object({
|
|
3494
|
+
type: z158.literal("pcb_courtyard_polygon"),
|
|
3472
3495
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
3473
3496
|
"pcb_courtyard_polygon"
|
|
3474
3497
|
),
|
|
3475
|
-
pcb_component_id:
|
|
3476
|
-
pcb_group_id:
|
|
3477
|
-
subcircuit_id:
|
|
3498
|
+
pcb_component_id: z158.string(),
|
|
3499
|
+
pcb_group_id: z158.string().optional(),
|
|
3500
|
+
subcircuit_id: z158.string().optional(),
|
|
3478
3501
|
layer: visible_layer,
|
|
3479
|
-
points:
|
|
3480
|
-
color:
|
|
3502
|
+
points: z158.array(point).min(3),
|
|
3503
|
+
color: z158.string().optional()
|
|
3481
3504
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
3482
3505
|
expectTypesMatch(true);
|
|
3483
3506
|
|
|
3484
3507
|
// src/pcb/pcb_courtyard_circle.ts
|
|
3485
|
-
import { z as
|
|
3486
|
-
var pcb_courtyard_circle =
|
|
3487
|
-
type:
|
|
3508
|
+
import { z as z159 } from "zod";
|
|
3509
|
+
var pcb_courtyard_circle = z159.object({
|
|
3510
|
+
type: z159.literal("pcb_courtyard_circle"),
|
|
3488
3511
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
3489
3512
|
"pcb_courtyard_circle"
|
|
3490
3513
|
),
|
|
3491
|
-
pcb_component_id:
|
|
3492
|
-
pcb_group_id:
|
|
3493
|
-
subcircuit_id:
|
|
3514
|
+
pcb_component_id: z159.string(),
|
|
3515
|
+
pcb_group_id: z159.string().optional(),
|
|
3516
|
+
subcircuit_id: z159.string().optional(),
|
|
3494
3517
|
center: point,
|
|
3495
3518
|
radius: length,
|
|
3496
3519
|
layer: visible_layer,
|
|
3497
|
-
color:
|
|
3520
|
+
color: z159.string().optional()
|
|
3498
3521
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3499
3522
|
expectTypesMatch(true);
|
|
3500
3523
|
|
|
3501
3524
|
// src/pcb/pcb_courtyard_pill.ts
|
|
3502
|
-
import { z as
|
|
3503
|
-
var pcb_courtyard_pill =
|
|
3504
|
-
type:
|
|
3525
|
+
import { z as z160 } from "zod";
|
|
3526
|
+
var pcb_courtyard_pill = z160.object({
|
|
3527
|
+
type: z160.literal("pcb_courtyard_pill"),
|
|
3505
3528
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
3506
|
-
pcb_component_id:
|
|
3507
|
-
pcb_group_id:
|
|
3508
|
-
subcircuit_id:
|
|
3529
|
+
pcb_component_id: z160.string(),
|
|
3530
|
+
pcb_group_id: z160.string().optional(),
|
|
3531
|
+
subcircuit_id: z160.string().optional(),
|
|
3509
3532
|
center: point,
|
|
3510
3533
|
width: length,
|
|
3511
3534
|
height: length,
|
|
3512
3535
|
radius: length,
|
|
3513
3536
|
layer: visible_layer,
|
|
3514
|
-
color:
|
|
3537
|
+
color: z160.string().optional()
|
|
3515
3538
|
}).describe("Defines a courtyard pill on the PCB");
|
|
3516
3539
|
expectTypesMatch(true);
|
|
3517
3540
|
|
|
3518
3541
|
// src/cad/cad_component.ts
|
|
3519
|
-
import { z as
|
|
3542
|
+
import { z as z161 } from "zod";
|
|
3520
3543
|
|
|
3521
3544
|
// src/cad/cad_model_conventions.ts
|
|
3522
3545
|
var cad_model_formats = [
|
|
@@ -3547,49 +3570,49 @@ var cadModelDefaultDirectionMap = {
|
|
|
3547
3570
|
};
|
|
3548
3571
|
|
|
3549
3572
|
// src/cad/cad_component.ts
|
|
3550
|
-
var cad_component =
|
|
3551
|
-
type:
|
|
3552
|
-
cad_component_id:
|
|
3553
|
-
pcb_component_id:
|
|
3554
|
-
source_component_id:
|
|
3573
|
+
var cad_component = z161.object({
|
|
3574
|
+
type: z161.literal("cad_component"),
|
|
3575
|
+
cad_component_id: z161.string(),
|
|
3576
|
+
pcb_component_id: z161.string(),
|
|
3577
|
+
source_component_id: z161.string(),
|
|
3555
3578
|
position: point3,
|
|
3556
3579
|
rotation: point3.optional(),
|
|
3557
3580
|
size: point3.optional(),
|
|
3558
3581
|
layer: layer_ref.optional(),
|
|
3559
|
-
subcircuit_id:
|
|
3582
|
+
subcircuit_id: z161.string().optional(),
|
|
3560
3583
|
// These are all ways to generate/load the 3d model
|
|
3561
|
-
footprinter_string:
|
|
3562
|
-
model_obj_url:
|
|
3563
|
-
model_stl_url:
|
|
3564
|
-
model_3mf_url:
|
|
3565
|
-
model_gltf_url:
|
|
3566
|
-
model_glb_url:
|
|
3567
|
-
model_step_url:
|
|
3568
|
-
model_wrl_url:
|
|
3584
|
+
footprinter_string: z161.string().optional(),
|
|
3585
|
+
model_obj_url: z161.string().optional(),
|
|
3586
|
+
model_stl_url: z161.string().optional(),
|
|
3587
|
+
model_3mf_url: z161.string().optional(),
|
|
3588
|
+
model_gltf_url: z161.string().optional(),
|
|
3589
|
+
model_glb_url: z161.string().optional(),
|
|
3590
|
+
model_step_url: z161.string().optional(),
|
|
3591
|
+
model_wrl_url: z161.string().optional(),
|
|
3569
3592
|
model_asset: asset.optional(),
|
|
3570
|
-
model_unit_to_mm_scale_factor:
|
|
3571
|
-
model_board_normal_direction:
|
|
3593
|
+
model_unit_to_mm_scale_factor: z161.number().optional(),
|
|
3594
|
+
model_board_normal_direction: z161.enum(cad_model_axis_directions).optional().describe(
|
|
3572
3595
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
3573
3596
|
),
|
|
3574
3597
|
model_origin_position: point3.optional(),
|
|
3575
|
-
model_origin_alignment:
|
|
3598
|
+
model_origin_alignment: z161.enum([
|
|
3576
3599
|
"unknown",
|
|
3577
3600
|
"center",
|
|
3578
3601
|
"center_of_component_on_board_surface",
|
|
3579
3602
|
"bottom_center_of_component"
|
|
3580
3603
|
]).optional(),
|
|
3581
|
-
model_object_fit:
|
|
3582
|
-
model_jscad:
|
|
3583
|
-
show_as_translucent_model:
|
|
3584
|
-
show_as_bounding_box:
|
|
3585
|
-
anchor_alignment:
|
|
3604
|
+
model_object_fit: z161.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
3605
|
+
model_jscad: z161.any().optional(),
|
|
3606
|
+
show_as_translucent_model: z161.boolean().optional(),
|
|
3607
|
+
show_as_bounding_box: z161.boolean().optional(),
|
|
3608
|
+
anchor_alignment: z161.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
3586
3609
|
}).describe("Defines a component on the PCB");
|
|
3587
3610
|
expectTypesMatch(true);
|
|
3588
3611
|
|
|
3589
3612
|
// src/simulation/simulation_voltage_source.ts
|
|
3590
|
-
import { z as
|
|
3591
|
-
var wave_shape =
|
|
3592
|
-
var percentage =
|
|
3613
|
+
import { z as z162 } from "zod";
|
|
3614
|
+
var wave_shape = z162.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
3615
|
+
var percentage = z162.union([z162.string(), z162.number()]).transform((val) => {
|
|
3593
3616
|
if (typeof val === "string") {
|
|
3594
3617
|
if (val.endsWith("%")) {
|
|
3595
3618
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3598,30 +3621,30 @@ var percentage = z161.union([z161.string(), z161.number()]).transform((val) => {
|
|
|
3598
3621
|
}
|
|
3599
3622
|
return val;
|
|
3600
3623
|
}).pipe(
|
|
3601
|
-
|
|
3624
|
+
z162.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3602
3625
|
);
|
|
3603
|
-
var simulation_dc_voltage_source =
|
|
3604
|
-
type:
|
|
3626
|
+
var simulation_dc_voltage_source = z162.object({
|
|
3627
|
+
type: z162.literal("simulation_voltage_source"),
|
|
3605
3628
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3606
3629
|
"simulation_voltage_source"
|
|
3607
3630
|
),
|
|
3608
|
-
is_dc_source:
|
|
3609
|
-
positive_source_port_id:
|
|
3610
|
-
negative_source_port_id:
|
|
3611
|
-
positive_source_net_id:
|
|
3612
|
-
negative_source_net_id:
|
|
3631
|
+
is_dc_source: z162.literal(true).optional().default(true),
|
|
3632
|
+
positive_source_port_id: z162.string().optional(),
|
|
3633
|
+
negative_source_port_id: z162.string().optional(),
|
|
3634
|
+
positive_source_net_id: z162.string().optional(),
|
|
3635
|
+
negative_source_net_id: z162.string().optional(),
|
|
3613
3636
|
voltage
|
|
3614
3637
|
}).describe("Defines a DC voltage source for simulation");
|
|
3615
|
-
var simulation_ac_voltage_source =
|
|
3616
|
-
type:
|
|
3638
|
+
var simulation_ac_voltage_source = z162.object({
|
|
3639
|
+
type: z162.literal("simulation_voltage_source"),
|
|
3617
3640
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3618
3641
|
"simulation_voltage_source"
|
|
3619
3642
|
),
|
|
3620
|
-
is_dc_source:
|
|
3621
|
-
terminal1_source_port_id:
|
|
3622
|
-
terminal2_source_port_id:
|
|
3623
|
-
terminal1_source_net_id:
|
|
3624
|
-
terminal2_source_net_id:
|
|
3643
|
+
is_dc_source: z162.literal(false),
|
|
3644
|
+
terminal1_source_port_id: z162.string().optional(),
|
|
3645
|
+
terminal2_source_port_id: z162.string().optional(),
|
|
3646
|
+
terminal1_source_net_id: z162.string().optional(),
|
|
3647
|
+
terminal2_source_net_id: z162.string().optional(),
|
|
3625
3648
|
voltage: voltage.optional(),
|
|
3626
3649
|
frequency: frequency.optional(),
|
|
3627
3650
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -3629,14 +3652,14 @@ var simulation_ac_voltage_source = z161.object({
|
|
|
3629
3652
|
phase: rotation.optional(),
|
|
3630
3653
|
duty_cycle: percentage.optional()
|
|
3631
3654
|
}).describe("Defines an AC voltage source for simulation");
|
|
3632
|
-
var simulation_voltage_source =
|
|
3655
|
+
var simulation_voltage_source = z162.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
3633
3656
|
expectTypesMatch(true);
|
|
3634
3657
|
expectTypesMatch(true);
|
|
3635
3658
|
expectTypesMatch(true);
|
|
3636
3659
|
|
|
3637
3660
|
// src/simulation/simulation_current_source.ts
|
|
3638
|
-
import { z as
|
|
3639
|
-
var percentage2 =
|
|
3661
|
+
import { z as z163 } from "zod";
|
|
3662
|
+
var percentage2 = z163.union([z163.string(), z163.number()]).transform((val) => {
|
|
3640
3663
|
if (typeof val === "string") {
|
|
3641
3664
|
if (val.endsWith("%")) {
|
|
3642
3665
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3645,30 +3668,30 @@ var percentage2 = z162.union([z162.string(), z162.number()]).transform((val) =>
|
|
|
3645
3668
|
}
|
|
3646
3669
|
return val;
|
|
3647
3670
|
}).pipe(
|
|
3648
|
-
|
|
3671
|
+
z163.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3649
3672
|
);
|
|
3650
|
-
var simulation_dc_current_source =
|
|
3651
|
-
type:
|
|
3673
|
+
var simulation_dc_current_source = z163.object({
|
|
3674
|
+
type: z163.literal("simulation_current_source"),
|
|
3652
3675
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3653
3676
|
"simulation_current_source"
|
|
3654
3677
|
),
|
|
3655
|
-
is_dc_source:
|
|
3656
|
-
positive_source_port_id:
|
|
3657
|
-
negative_source_port_id:
|
|
3658
|
-
positive_source_net_id:
|
|
3659
|
-
negative_source_net_id:
|
|
3678
|
+
is_dc_source: z163.literal(true).optional().default(true),
|
|
3679
|
+
positive_source_port_id: z163.string().optional(),
|
|
3680
|
+
negative_source_port_id: z163.string().optional(),
|
|
3681
|
+
positive_source_net_id: z163.string().optional(),
|
|
3682
|
+
negative_source_net_id: z163.string().optional(),
|
|
3660
3683
|
current
|
|
3661
3684
|
}).describe("Defines a DC current source for simulation");
|
|
3662
|
-
var simulation_ac_current_source =
|
|
3663
|
-
type:
|
|
3685
|
+
var simulation_ac_current_source = z163.object({
|
|
3686
|
+
type: z163.literal("simulation_current_source"),
|
|
3664
3687
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3665
3688
|
"simulation_current_source"
|
|
3666
3689
|
),
|
|
3667
|
-
is_dc_source:
|
|
3668
|
-
terminal1_source_port_id:
|
|
3669
|
-
terminal2_source_port_id:
|
|
3670
|
-
terminal1_source_net_id:
|
|
3671
|
-
terminal2_source_net_id:
|
|
3690
|
+
is_dc_source: z163.literal(false),
|
|
3691
|
+
terminal1_source_port_id: z163.string().optional(),
|
|
3692
|
+
terminal2_source_port_id: z163.string().optional(),
|
|
3693
|
+
terminal1_source_net_id: z163.string().optional(),
|
|
3694
|
+
terminal2_source_net_id: z163.string().optional(),
|
|
3672
3695
|
current: current.optional(),
|
|
3673
3696
|
frequency: frequency.optional(),
|
|
3674
3697
|
peak_to_peak_current: current.optional(),
|
|
@@ -3676,25 +3699,25 @@ var simulation_ac_current_source = z162.object({
|
|
|
3676
3699
|
phase: rotation.optional(),
|
|
3677
3700
|
duty_cycle: percentage2.optional()
|
|
3678
3701
|
}).describe("Defines an AC current source for simulation");
|
|
3679
|
-
var simulation_current_source =
|
|
3702
|
+
var simulation_current_source = z163.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
3680
3703
|
expectTypesMatch(true);
|
|
3681
3704
|
expectTypesMatch(true);
|
|
3682
3705
|
expectTypesMatch(true);
|
|
3683
3706
|
|
|
3684
3707
|
// src/simulation/simulation_experiment.ts
|
|
3685
|
-
import { z as
|
|
3686
|
-
var experiment_type =
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3708
|
+
import { z as z164 } from "zod";
|
|
3709
|
+
var experiment_type = z164.union([
|
|
3710
|
+
z164.literal("spice_dc_sweep"),
|
|
3711
|
+
z164.literal("spice_dc_operating_point"),
|
|
3712
|
+
z164.literal("spice_transient_analysis"),
|
|
3713
|
+
z164.literal("spice_ac_analysis")
|
|
3691
3714
|
]);
|
|
3692
|
-
var simulation_experiment =
|
|
3693
|
-
type:
|
|
3715
|
+
var simulation_experiment = z164.object({
|
|
3716
|
+
type: z164.literal("simulation_experiment"),
|
|
3694
3717
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
3695
3718
|
"simulation_experiment"
|
|
3696
3719
|
),
|
|
3697
|
-
name:
|
|
3720
|
+
name: z164.string(),
|
|
3698
3721
|
experiment_type,
|
|
3699
3722
|
time_per_step: duration_ms.optional(),
|
|
3700
3723
|
start_time_ms: ms.optional(),
|
|
@@ -3703,53 +3726,53 @@ var simulation_experiment = z163.object({
|
|
|
3703
3726
|
expectTypesMatch(true);
|
|
3704
3727
|
|
|
3705
3728
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
3706
|
-
import { z as
|
|
3707
|
-
var simulation_transient_voltage_graph =
|
|
3708
|
-
type:
|
|
3729
|
+
import { z as z165 } from "zod";
|
|
3730
|
+
var simulation_transient_voltage_graph = z165.object({
|
|
3731
|
+
type: z165.literal("simulation_transient_voltage_graph"),
|
|
3709
3732
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
3710
3733
|
"simulation_transient_voltage_graph"
|
|
3711
3734
|
),
|
|
3712
|
-
simulation_experiment_id:
|
|
3713
|
-
timestamps_ms:
|
|
3714
|
-
voltage_levels:
|
|
3715
|
-
source_component_id:
|
|
3716
|
-
subcircuit_connectivity_map_key:
|
|
3735
|
+
simulation_experiment_id: z165.string(),
|
|
3736
|
+
timestamps_ms: z165.array(z165.number()).optional(),
|
|
3737
|
+
voltage_levels: z165.array(z165.number()),
|
|
3738
|
+
source_component_id: z165.string().optional(),
|
|
3739
|
+
subcircuit_connectivity_map_key: z165.string().optional(),
|
|
3717
3740
|
time_per_step: duration_ms,
|
|
3718
3741
|
start_time_ms: ms,
|
|
3719
3742
|
end_time_ms: ms,
|
|
3720
|
-
name:
|
|
3721
|
-
color:
|
|
3743
|
+
name: z165.string().optional(),
|
|
3744
|
+
color: z165.string().optional()
|
|
3722
3745
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
3723
3746
|
expectTypesMatch(true);
|
|
3724
3747
|
|
|
3725
3748
|
// src/simulation/simulation_switch.ts
|
|
3726
|
-
import { z as
|
|
3727
|
-
var simulation_switch =
|
|
3728
|
-
type:
|
|
3749
|
+
import { z as z166 } from "zod";
|
|
3750
|
+
var simulation_switch = z166.object({
|
|
3751
|
+
type: z166.literal("simulation_switch"),
|
|
3729
3752
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
3730
|
-
source_component_id:
|
|
3753
|
+
source_component_id: z166.string().optional(),
|
|
3731
3754
|
closes_at: ms.optional(),
|
|
3732
3755
|
opens_at: ms.optional(),
|
|
3733
|
-
starts_closed:
|
|
3756
|
+
starts_closed: z166.boolean().optional(),
|
|
3734
3757
|
switching_frequency: frequency.optional()
|
|
3735
3758
|
}).describe("Defines a switch for simulation timing control");
|
|
3736
3759
|
expectTypesMatch(true);
|
|
3737
3760
|
|
|
3738
3761
|
// src/simulation/simulation_voltage_probe.ts
|
|
3739
|
-
import { z as
|
|
3740
|
-
var simulation_voltage_probe =
|
|
3741
|
-
type:
|
|
3762
|
+
import { z as z167 } from "zod";
|
|
3763
|
+
var simulation_voltage_probe = z167.object({
|
|
3764
|
+
type: z167.literal("simulation_voltage_probe"),
|
|
3742
3765
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
3743
3766
|
"simulation_voltage_probe"
|
|
3744
3767
|
),
|
|
3745
|
-
source_component_id:
|
|
3746
|
-
name:
|
|
3747
|
-
signal_input_source_port_id:
|
|
3748
|
-
signal_input_source_net_id:
|
|
3749
|
-
reference_input_source_port_id:
|
|
3750
|
-
reference_input_source_net_id:
|
|
3751
|
-
subcircuit_id:
|
|
3752
|
-
color:
|
|
3768
|
+
source_component_id: z167.string().optional(),
|
|
3769
|
+
name: z167.string().optional(),
|
|
3770
|
+
signal_input_source_port_id: z167.string().optional(),
|
|
3771
|
+
signal_input_source_net_id: z167.string().optional(),
|
|
3772
|
+
reference_input_source_port_id: z167.string().optional(),
|
|
3773
|
+
reference_input_source_net_id: z167.string().optional(),
|
|
3774
|
+
subcircuit_id: z167.string().optional(),
|
|
3775
|
+
color: z167.string().optional()
|
|
3753
3776
|
}).describe(
|
|
3754
3777
|
"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."
|
|
3755
3778
|
).superRefine((data, ctx) => {
|
|
@@ -3759,20 +3782,20 @@ var simulation_voltage_probe = z166.object({
|
|
|
3759
3782
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
3760
3783
|
if (has_ports && has_nets) {
|
|
3761
3784
|
ctx.addIssue({
|
|
3762
|
-
code:
|
|
3785
|
+
code: z167.ZodIssueCode.custom,
|
|
3763
3786
|
message: "Cannot mix port and net connections in a differential probe."
|
|
3764
3787
|
});
|
|
3765
3788
|
} else if (has_ports) {
|
|
3766
3789
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
3767
3790
|
ctx.addIssue({
|
|
3768
|
-
code:
|
|
3791
|
+
code: z167.ZodIssueCode.custom,
|
|
3769
3792
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
3770
3793
|
});
|
|
3771
3794
|
}
|
|
3772
3795
|
} else if (has_nets) {
|
|
3773
3796
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
3774
3797
|
ctx.addIssue({
|
|
3775
|
-
code:
|
|
3798
|
+
code: z167.ZodIssueCode.custom,
|
|
3776
3799
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
3777
3800
|
});
|
|
3778
3801
|
}
|
|
@@ -3780,7 +3803,7 @@ var simulation_voltage_probe = z166.object({
|
|
|
3780
3803
|
} else {
|
|
3781
3804
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
3782
3805
|
ctx.addIssue({
|
|
3783
|
-
code:
|
|
3806
|
+
code: z167.ZodIssueCode.custom,
|
|
3784
3807
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
3785
3808
|
});
|
|
3786
3809
|
}
|
|
@@ -3789,50 +3812,50 @@ var simulation_voltage_probe = z166.object({
|
|
|
3789
3812
|
expectTypesMatch(true);
|
|
3790
3813
|
|
|
3791
3814
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
3792
|
-
import { z as
|
|
3815
|
+
import { z as z168 } from "zod";
|
|
3793
3816
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
3794
|
-
type:
|
|
3817
|
+
type: z168.literal("simulation_unknown_experiment_error"),
|
|
3795
3818
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
3796
3819
|
"simulation_unknown_experiment_error"
|
|
3797
3820
|
),
|
|
3798
|
-
error_type:
|
|
3799
|
-
simulation_experiment_id:
|
|
3800
|
-
subcircuit_id:
|
|
3821
|
+
error_type: z168.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
3822
|
+
simulation_experiment_id: z168.string().optional(),
|
|
3823
|
+
subcircuit_id: z168.string().optional()
|
|
3801
3824
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
3802
3825
|
expectTypesMatch(true);
|
|
3803
3826
|
|
|
3804
3827
|
// src/simulation/simulation_op_amp.ts
|
|
3805
|
-
import { z as
|
|
3806
|
-
var simulation_op_amp =
|
|
3807
|
-
type:
|
|
3828
|
+
import { z as z169 } from "zod";
|
|
3829
|
+
var simulation_op_amp = z169.object({
|
|
3830
|
+
type: z169.literal("simulation_op_amp"),
|
|
3808
3831
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
3809
|
-
source_component_id:
|
|
3810
|
-
inverting_input_source_port_id:
|
|
3811
|
-
non_inverting_input_source_port_id:
|
|
3812
|
-
output_source_port_id:
|
|
3813
|
-
positive_supply_source_port_id:
|
|
3814
|
-
negative_supply_source_port_id:
|
|
3832
|
+
source_component_id: z169.string().optional(),
|
|
3833
|
+
inverting_input_source_port_id: z169.string(),
|
|
3834
|
+
non_inverting_input_source_port_id: z169.string(),
|
|
3835
|
+
output_source_port_id: z169.string(),
|
|
3836
|
+
positive_supply_source_port_id: z169.string(),
|
|
3837
|
+
negative_supply_source_port_id: z169.string()
|
|
3815
3838
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
3816
3839
|
expectTypesMatch(true);
|
|
3817
3840
|
|
|
3818
3841
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
3819
|
-
import { z as
|
|
3820
|
-
var simulation_spice_subcircuit =
|
|
3821
|
-
type:
|
|
3842
|
+
import { z as z170 } from "zod";
|
|
3843
|
+
var simulation_spice_subcircuit = z170.object({
|
|
3844
|
+
type: z170.literal("simulation_spice_subcircuit"),
|
|
3822
3845
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
3823
3846
|
"simulation_spice_subcircuit"
|
|
3824
3847
|
),
|
|
3825
|
-
source_component_id:
|
|
3826
|
-
spice_pin_to_source_port_map:
|
|
3827
|
-
subcircuit_source:
|
|
3848
|
+
source_component_id: z170.string(),
|
|
3849
|
+
spice_pin_to_source_port_map: z170.record(z170.string(), z170.string()),
|
|
3850
|
+
subcircuit_source: z170.string()
|
|
3828
3851
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
3829
3852
|
expectTypesMatch(
|
|
3830
3853
|
true
|
|
3831
3854
|
);
|
|
3832
3855
|
|
|
3833
3856
|
// src/any_circuit_element.ts
|
|
3834
|
-
import { z as
|
|
3835
|
-
var any_circuit_element =
|
|
3857
|
+
import { z as z171 } from "zod";
|
|
3858
|
+
var any_circuit_element = z171.union([
|
|
3836
3859
|
source_trace,
|
|
3837
3860
|
source_port,
|
|
3838
3861
|
source_component_internal_connection,
|
|
@@ -3903,6 +3926,7 @@ var any_circuit_element = z170.union([
|
|
|
3903
3926
|
pcb_silkscreen_rect,
|
|
3904
3927
|
pcb_silkscreen_circle,
|
|
3905
3928
|
pcb_silkscreen_oval,
|
|
3929
|
+
pcb_silkscreen_graphic,
|
|
3906
3930
|
pcb_trace_error,
|
|
3907
3931
|
pcb_trace_missing_error,
|
|
3908
3932
|
pcb_placement_error,
|
|
@@ -4079,6 +4103,8 @@ export {
|
|
|
4079
4103
|
pcb_route_hint,
|
|
4080
4104
|
pcb_route_hints,
|
|
4081
4105
|
pcb_silkscreen_circle,
|
|
4106
|
+
pcb_silkscreen_graphic,
|
|
4107
|
+
pcb_silkscreen_graphic_brep,
|
|
4082
4108
|
pcb_silkscreen_line,
|
|
4083
4109
|
pcb_silkscreen_oval,
|
|
4084
4110
|
pcb_silkscreen_path,
|