circuit-json 0.0.496 → 0.0.498
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 +87 -1
- package/dist/index.d.mts +948 -12
- package/dist/index.mjs +873 -789
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2810,74 +2810,150 @@ var pcb_board = z128.object({
|
|
|
2810
2810
|
}).merge(manufacturing_drc_properties).describe("Defines the board outline of the PCB");
|
|
2811
2811
|
expectTypesMatch(true);
|
|
2812
2812
|
|
|
2813
|
-
// src/pcb/
|
|
2813
|
+
// src/pcb/pcb_bend.ts
|
|
2814
2814
|
import { z as z129 } from "zod";
|
|
2815
|
-
var
|
|
2816
|
-
|
|
2815
|
+
var finite_point = point.extend({
|
|
2816
|
+
x: length.pipe(z129.number().finite()),
|
|
2817
|
+
y: length.pipe(z129.number().finite())
|
|
2818
|
+
});
|
|
2819
|
+
var pcb_bend = z129.object({
|
|
2820
|
+
type: z129.literal("pcb_bend"),
|
|
2821
|
+
pcb_bend_id: getZodPrefixedIdWithDefault("pcb_bend"),
|
|
2822
|
+
pcb_board_id: z129.string(),
|
|
2823
|
+
pcb_group_id: z129.string().optional(),
|
|
2824
|
+
subcircuit_id: z129.string().optional(),
|
|
2825
|
+
name: z129.string().optional(),
|
|
2826
|
+
start: finite_point,
|
|
2827
|
+
end: finite_point,
|
|
2828
|
+
bend_angle: rotation.pipe(z129.number().finite()),
|
|
2829
|
+
bend_radius: length.pipe(z129.number().finite().positive()),
|
|
2830
|
+
bend_side: z129.enum(["left", "right"])
|
|
2831
|
+
}).refine(({ start, end }) => start.x !== end.x || start.y !== end.y, {
|
|
2832
|
+
message: "Bend centerline endpoints must be distinct",
|
|
2833
|
+
path: ["end"]
|
|
2834
|
+
}).describe(
|
|
2835
|
+
"Defines a finite-radius bend on a flat PCB for runtime CAD folding"
|
|
2836
|
+
);
|
|
2837
|
+
expectTypesMatch(true);
|
|
2838
|
+
|
|
2839
|
+
// src/pcb/pcb_stiffener.ts
|
|
2840
|
+
import { z as z130 } from "zod";
|
|
2841
|
+
var positive_length = length.pipe(z130.number().finite().positive());
|
|
2842
|
+
var finite_point2 = point.extend({
|
|
2843
|
+
x: length.pipe(z130.number().finite()),
|
|
2844
|
+
y: length.pipe(z130.number().finite())
|
|
2845
|
+
});
|
|
2846
|
+
var pcb_stiffener_base = z130.object({
|
|
2847
|
+
type: z130.literal("pcb_stiffener"),
|
|
2848
|
+
pcb_stiffener_id: getZodPrefixedIdWithDefault("pcb_stiffener"),
|
|
2849
|
+
pcb_board_id: z130.string(),
|
|
2850
|
+
pcb_group_id: z130.string().optional(),
|
|
2851
|
+
subcircuit_id: z130.string().optional(),
|
|
2852
|
+
name: z130.string().optional(),
|
|
2853
|
+
layer: z130.enum(["top", "bottom"]),
|
|
2854
|
+
material: z130.enum(["fr4", "polyimide", "stainless_steel", "aluminum"]),
|
|
2855
|
+
thickness: positive_length,
|
|
2856
|
+
adhesive_thickness: length.pipe(z130.number().finite().nonnegative()).optional()
|
|
2857
|
+
});
|
|
2858
|
+
var pcb_stiffener_rect = pcb_stiffener_base.extend({
|
|
2859
|
+
shape: z130.literal("rect"),
|
|
2860
|
+
center: finite_point2,
|
|
2861
|
+
rotation: rotation.pipe(z130.number().finite()).optional(),
|
|
2862
|
+
width: positive_length,
|
|
2863
|
+
height: positive_length,
|
|
2864
|
+
outline: z130.never().optional()
|
|
2865
|
+
});
|
|
2866
|
+
expectTypesMatch(true);
|
|
2867
|
+
var pcb_stiffener_polygon = pcb_stiffener_base.extend({
|
|
2868
|
+
shape: z130.literal("polygon"),
|
|
2869
|
+
outline: z130.array(finite_point2).min(3).refine((points) => {
|
|
2870
|
+
const twice_area = points.reduce((sum, p, i) => {
|
|
2871
|
+
const next = points[(i + 1) % points.length];
|
|
2872
|
+
return sum + p.x * next.y - next.x * p.y;
|
|
2873
|
+
}, 0);
|
|
2874
|
+
return Number.isFinite(twice_area) && twice_area !== 0;
|
|
2875
|
+
}, "Stiffener outline must enclose a nonzero area"),
|
|
2876
|
+
center: z130.never().optional(),
|
|
2877
|
+
rotation: z130.never().optional(),
|
|
2878
|
+
width: z130.never().optional(),
|
|
2879
|
+
height: z130.never().optional()
|
|
2880
|
+
});
|
|
2881
|
+
expectTypesMatch(
|
|
2882
|
+
true
|
|
2883
|
+
);
|
|
2884
|
+
var pcb_stiffener = z130.discriminatedUnion("shape", [pcb_stiffener_rect, pcb_stiffener_polygon]).describe(
|
|
2885
|
+
"Defines bonded mechanical PCB reinforcement without adding copper layers"
|
|
2886
|
+
);
|
|
2887
|
+
expectTypesMatch(true);
|
|
2888
|
+
|
|
2889
|
+
// src/pcb/pcb_panel.ts
|
|
2890
|
+
import { z as z131 } from "zod";
|
|
2891
|
+
var pcb_panel = z131.object({
|
|
2892
|
+
type: z131.literal("pcb_panel"),
|
|
2817
2893
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
2818
2894
|
width: length,
|
|
2819
2895
|
height: length,
|
|
2820
2896
|
center: point,
|
|
2821
2897
|
thickness: length.optional().default(1.4),
|
|
2822
|
-
covered_with_solder_mask:
|
|
2898
|
+
covered_with_solder_mask: z131.boolean().optional().default(true)
|
|
2823
2899
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
2824
2900
|
expectTypesMatch(true);
|
|
2825
2901
|
|
|
2826
2902
|
// src/pcb/pcb_placement_error.ts
|
|
2827
|
-
import { z as
|
|
2903
|
+
import { z as z132 } from "zod";
|
|
2828
2904
|
var pcb_placement_error = base_circuit_json_error.extend({
|
|
2829
|
-
type:
|
|
2905
|
+
type: z132.literal("pcb_placement_error"),
|
|
2830
2906
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
2831
|
-
error_type:
|
|
2832
|
-
subcircuit_id:
|
|
2907
|
+
error_type: z132.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
2908
|
+
subcircuit_id: z132.string().optional()
|
|
2833
2909
|
}).describe("Defines a placement error on the PCB");
|
|
2834
2910
|
expectTypesMatch(true);
|
|
2835
2911
|
|
|
2836
2912
|
// src/pcb/pcb_packing_error.ts
|
|
2837
|
-
import { z as
|
|
2913
|
+
import { z as z133 } from "zod";
|
|
2838
2914
|
var pcb_packing_error = base_circuit_json_error.extend({
|
|
2839
|
-
type:
|
|
2915
|
+
type: z133.literal("pcb_packing_error"),
|
|
2840
2916
|
pcb_packing_error_id: getZodPrefixedIdWithDefault("pcb_packing_error"),
|
|
2841
|
-
error_type:
|
|
2842
|
-
pcb_group_id:
|
|
2843
|
-
subcircuit_id:
|
|
2917
|
+
error_type: z133.literal("pcb_packing_error").default("pcb_packing_error"),
|
|
2918
|
+
pcb_group_id: z133.string().optional(),
|
|
2919
|
+
subcircuit_id: z133.string().optional()
|
|
2844
2920
|
}).describe("Defines a failure to pack PCB components within layout bounds");
|
|
2845
2921
|
expectTypesMatch(true);
|
|
2846
2922
|
|
|
2847
2923
|
// src/pcb/pcb_panelization_placement_error.ts
|
|
2848
|
-
import { z as
|
|
2924
|
+
import { z as z134 } from "zod";
|
|
2849
2925
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
2850
|
-
type:
|
|
2926
|
+
type: z134.literal("pcb_panelization_placement_error"),
|
|
2851
2927
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
2852
2928
|
"pcb_panelization_placement_error"
|
|
2853
2929
|
),
|
|
2854
|
-
error_type:
|
|
2855
|
-
pcb_panel_id:
|
|
2856
|
-
pcb_board_id:
|
|
2857
|
-
subcircuit_id:
|
|
2930
|
+
error_type: z134.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
|
|
2931
|
+
pcb_panel_id: z134.string().optional(),
|
|
2932
|
+
pcb_board_id: z134.string().optional(),
|
|
2933
|
+
subcircuit_id: z134.string().optional()
|
|
2858
2934
|
}).describe("Defines a panelization placement error on the PCB");
|
|
2859
2935
|
expectTypesMatch(true);
|
|
2860
2936
|
|
|
2861
2937
|
// src/pcb/pcb_trace_hint.ts
|
|
2862
|
-
import { z as
|
|
2863
|
-
var pcb_trace_hint =
|
|
2864
|
-
type:
|
|
2938
|
+
import { z as z135 } from "zod";
|
|
2939
|
+
var pcb_trace_hint = z135.object({
|
|
2940
|
+
type: z135.literal("pcb_trace_hint"),
|
|
2865
2941
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
2866
|
-
pcb_port_id:
|
|
2867
|
-
pcb_component_id:
|
|
2868
|
-
route:
|
|
2869
|
-
subcircuit_id:
|
|
2942
|
+
pcb_port_id: z135.string(),
|
|
2943
|
+
pcb_component_id: z135.string(),
|
|
2944
|
+
route: z135.array(route_hint_point),
|
|
2945
|
+
subcircuit_id: z135.string().optional()
|
|
2870
2946
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
2871
2947
|
expectTypesMatch(true);
|
|
2872
2948
|
|
|
2873
2949
|
// src/pcb/pcb_silkscreen_line.ts
|
|
2874
|
-
import { z as
|
|
2875
|
-
var pcb_silkscreen_line =
|
|
2876
|
-
type:
|
|
2950
|
+
import { z as z136 } from "zod";
|
|
2951
|
+
var pcb_silkscreen_line = z136.object({
|
|
2952
|
+
type: z136.literal("pcb_silkscreen_line"),
|
|
2877
2953
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
2878
|
-
pcb_component_id:
|
|
2879
|
-
pcb_group_id:
|
|
2880
|
-
subcircuit_id:
|
|
2954
|
+
pcb_component_id: z136.string(),
|
|
2955
|
+
pcb_group_id: z136.string().optional(),
|
|
2956
|
+
subcircuit_id: z136.string().optional(),
|
|
2881
2957
|
stroke_width: distance.default("0.1mm"),
|
|
2882
2958
|
x1: distance,
|
|
2883
2959
|
y1: distance,
|
|
@@ -2888,32 +2964,32 @@ var pcb_silkscreen_line = z134.object({
|
|
|
2888
2964
|
expectTypesMatch(true);
|
|
2889
2965
|
|
|
2890
2966
|
// src/pcb/pcb_silkscreen_path.ts
|
|
2891
|
-
import { z as
|
|
2892
|
-
var pcb_silkscreen_path =
|
|
2893
|
-
type:
|
|
2967
|
+
import { z as z137 } from "zod";
|
|
2968
|
+
var pcb_silkscreen_path = z137.object({
|
|
2969
|
+
type: z137.literal("pcb_silkscreen_path"),
|
|
2894
2970
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
2895
|
-
pcb_component_id:
|
|
2896
|
-
pcb_group_id:
|
|
2897
|
-
subcircuit_id:
|
|
2971
|
+
pcb_component_id: z137.string(),
|
|
2972
|
+
pcb_group_id: z137.string().optional(),
|
|
2973
|
+
subcircuit_id: z137.string().optional(),
|
|
2898
2974
|
layer: visible_layer,
|
|
2899
|
-
route:
|
|
2975
|
+
route: z137.array(point),
|
|
2900
2976
|
stroke_width: length
|
|
2901
2977
|
}).describe("Defines a silkscreen path on the PCB");
|
|
2902
2978
|
expectTypesMatch(true);
|
|
2903
2979
|
|
|
2904
2980
|
// src/pcb/pcb_silkscreen_text.ts
|
|
2905
|
-
import { z as
|
|
2906
|
-
var pcb_silkscreen_text =
|
|
2907
|
-
type:
|
|
2981
|
+
import { z as z138 } from "zod";
|
|
2982
|
+
var pcb_silkscreen_text = z138.object({
|
|
2983
|
+
type: z138.literal("pcb_silkscreen_text"),
|
|
2908
2984
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
2909
|
-
pcb_group_id:
|
|
2910
|
-
subcircuit_id:
|
|
2911
|
-
font:
|
|
2985
|
+
pcb_group_id: z138.string().optional(),
|
|
2986
|
+
subcircuit_id: z138.string().optional(),
|
|
2987
|
+
font: z138.literal("tscircuit2024").default("tscircuit2024"),
|
|
2912
2988
|
font_size: distance.default("0.2mm"),
|
|
2913
|
-
pcb_component_id:
|
|
2914
|
-
text:
|
|
2915
|
-
is_knockout:
|
|
2916
|
-
knockout_padding:
|
|
2989
|
+
pcb_component_id: z138.string(),
|
|
2990
|
+
text: z138.string(),
|
|
2991
|
+
is_knockout: z138.boolean().default(false).optional(),
|
|
2992
|
+
knockout_padding: z138.object({
|
|
2917
2993
|
left: length,
|
|
2918
2994
|
top: length,
|
|
2919
2995
|
bottom: length,
|
|
@@ -2924,27 +3000,27 @@ var pcb_silkscreen_text = z136.object({
|
|
|
2924
3000
|
bottom: "0.2mm",
|
|
2925
3001
|
right: "0.2mm"
|
|
2926
3002
|
}).optional(),
|
|
2927
|
-
ccw_rotation:
|
|
3003
|
+
ccw_rotation: z138.number().optional(),
|
|
2928
3004
|
layer: layer_ref,
|
|
2929
|
-
is_mirrored:
|
|
3005
|
+
is_mirrored: z138.boolean().default(false).optional(),
|
|
2930
3006
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2931
3007
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2932
3008
|
}).describe("Defines silkscreen text on the PCB");
|
|
2933
3009
|
expectTypesMatch(true);
|
|
2934
3010
|
|
|
2935
3011
|
// src/pcb/pcb_copper_text.ts
|
|
2936
|
-
import { z as
|
|
2937
|
-
var pcb_copper_text =
|
|
2938
|
-
type:
|
|
3012
|
+
import { z as z139 } from "zod";
|
|
3013
|
+
var pcb_copper_text = z139.object({
|
|
3014
|
+
type: z139.literal("pcb_copper_text"),
|
|
2939
3015
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2940
|
-
pcb_group_id:
|
|
2941
|
-
subcircuit_id:
|
|
2942
|
-
font:
|
|
3016
|
+
pcb_group_id: z139.string().optional(),
|
|
3017
|
+
subcircuit_id: z139.string().optional(),
|
|
3018
|
+
font: z139.literal("tscircuit2024").default("tscircuit2024"),
|
|
2943
3019
|
font_size: distance.default("0.2mm"),
|
|
2944
|
-
pcb_component_id:
|
|
2945
|
-
text:
|
|
2946
|
-
is_knockout:
|
|
2947
|
-
knockout_padding:
|
|
3020
|
+
pcb_component_id: z139.string(),
|
|
3021
|
+
text: z139.string(),
|
|
3022
|
+
is_knockout: z139.boolean().default(false).optional(),
|
|
3023
|
+
knockout_padding: z139.object({
|
|
2948
3024
|
left: length,
|
|
2949
3025
|
top: length,
|
|
2950
3026
|
bottom: length,
|
|
@@ -2955,61 +3031,61 @@ var pcb_copper_text = z137.object({
|
|
|
2955
3031
|
bottom: "0.2mm",
|
|
2956
3032
|
right: "0.2mm"
|
|
2957
3033
|
}).optional(),
|
|
2958
|
-
ccw_rotation:
|
|
3034
|
+
ccw_rotation: z139.number().optional(),
|
|
2959
3035
|
layer: layer_ref,
|
|
2960
|
-
is_mirrored:
|
|
3036
|
+
is_mirrored: z139.boolean().default(false).optional(),
|
|
2961
3037
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2962
3038
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2963
3039
|
}).describe("Defines copper text on the PCB");
|
|
2964
3040
|
expectTypesMatch(true);
|
|
2965
3041
|
|
|
2966
3042
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
2967
|
-
import { z as
|
|
2968
|
-
var pcb_silkscreen_rect =
|
|
2969
|
-
type:
|
|
3043
|
+
import { z as z140 } from "zod";
|
|
3044
|
+
var pcb_silkscreen_rect = z140.object({
|
|
3045
|
+
type: z140.literal("pcb_silkscreen_rect"),
|
|
2970
3046
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2971
|
-
pcb_component_id:
|
|
2972
|
-
pcb_group_id:
|
|
2973
|
-
subcircuit_id:
|
|
3047
|
+
pcb_component_id: z140.string(),
|
|
3048
|
+
pcb_group_id: z140.string().optional(),
|
|
3049
|
+
subcircuit_id: z140.string().optional(),
|
|
2974
3050
|
center: point,
|
|
2975
3051
|
width: length,
|
|
2976
3052
|
height: length,
|
|
2977
3053
|
layer: layer_ref,
|
|
2978
3054
|
stroke_width: length.default("1mm"),
|
|
2979
3055
|
corner_radius: length.optional(),
|
|
2980
|
-
is_filled:
|
|
2981
|
-
has_stroke:
|
|
2982
|
-
is_stroke_dashed:
|
|
2983
|
-
ccw_rotation:
|
|
3056
|
+
is_filled: z140.boolean().default(true).optional(),
|
|
3057
|
+
has_stroke: z140.boolean().optional(),
|
|
3058
|
+
is_stroke_dashed: z140.boolean().optional(),
|
|
3059
|
+
ccw_rotation: z140.number().optional()
|
|
2984
3060
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2985
3061
|
expectTypesMatch(true);
|
|
2986
3062
|
|
|
2987
3063
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
2988
|
-
import { z as
|
|
2989
|
-
var pcb_silkscreen_circle =
|
|
2990
|
-
type:
|
|
3064
|
+
import { z as z141 } from "zod";
|
|
3065
|
+
var pcb_silkscreen_circle = z141.object({
|
|
3066
|
+
type: z141.literal("pcb_silkscreen_circle"),
|
|
2991
3067
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2992
3068
|
"pcb_silkscreen_circle"
|
|
2993
3069
|
),
|
|
2994
|
-
pcb_component_id:
|
|
2995
|
-
pcb_group_id:
|
|
2996
|
-
subcircuit_id:
|
|
3070
|
+
pcb_component_id: z141.string(),
|
|
3071
|
+
pcb_group_id: z141.string().optional(),
|
|
3072
|
+
subcircuit_id: z141.string().optional(),
|
|
2997
3073
|
center: point,
|
|
2998
3074
|
radius: length,
|
|
2999
3075
|
layer: visible_layer,
|
|
3000
3076
|
stroke_width: length.default("1mm"),
|
|
3001
|
-
is_filled:
|
|
3077
|
+
is_filled: z141.boolean().optional()
|
|
3002
3078
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
3003
3079
|
expectTypesMatch(true);
|
|
3004
3080
|
|
|
3005
3081
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
3006
|
-
import { z as
|
|
3007
|
-
var pcb_silkscreen_oval =
|
|
3008
|
-
type:
|
|
3082
|
+
import { z as z142 } from "zod";
|
|
3083
|
+
var pcb_silkscreen_oval = z142.object({
|
|
3084
|
+
type: z142.literal("pcb_silkscreen_oval"),
|
|
3009
3085
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
3010
|
-
pcb_component_id:
|
|
3011
|
-
pcb_group_id:
|
|
3012
|
-
subcircuit_id:
|
|
3086
|
+
pcb_component_id: z142.string(),
|
|
3087
|
+
pcb_group_id: z142.string().optional(),
|
|
3088
|
+
subcircuit_id: z142.string().optional(),
|
|
3013
3089
|
center: point,
|
|
3014
3090
|
radius_x: distance,
|
|
3015
3091
|
radius_y: distance,
|
|
@@ -3019,265 +3095,265 @@ var pcb_silkscreen_oval = z140.object({
|
|
|
3019
3095
|
expectTypesMatch(true);
|
|
3020
3096
|
|
|
3021
3097
|
// src/pcb/pcb_silkscreen_graphic.ts
|
|
3022
|
-
import { z as
|
|
3023
|
-
var pcb_silkscreen_graphic_base =
|
|
3024
|
-
type:
|
|
3098
|
+
import { z as z143 } from "zod";
|
|
3099
|
+
var pcb_silkscreen_graphic_base = z143.object({
|
|
3100
|
+
type: z143.literal("pcb_silkscreen_graphic"),
|
|
3025
3101
|
pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
|
|
3026
3102
|
"pcb_silkscreen_graphic"
|
|
3027
3103
|
),
|
|
3028
|
-
pcb_component_id:
|
|
3029
|
-
pcb_group_id:
|
|
3030
|
-
subcircuit_id:
|
|
3104
|
+
pcb_component_id: z143.string(),
|
|
3105
|
+
pcb_group_id: z143.string().optional(),
|
|
3106
|
+
subcircuit_id: z143.string().optional(),
|
|
3031
3107
|
layer: visible_layer,
|
|
3032
3108
|
image_asset: asset.optional()
|
|
3033
3109
|
});
|
|
3034
3110
|
var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
|
|
3035
|
-
shape:
|
|
3111
|
+
shape: z143.literal("brep"),
|
|
3036
3112
|
brep_shape
|
|
3037
3113
|
}).describe("Defines a BRep silkscreen graphic on the PCB");
|
|
3038
3114
|
expectTypesMatch(
|
|
3039
3115
|
true
|
|
3040
3116
|
);
|
|
3041
|
-
var pcb_silkscreen_graphic =
|
|
3117
|
+
var pcb_silkscreen_graphic = z143.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
|
|
3042
3118
|
expectTypesMatch(true);
|
|
3043
3119
|
|
|
3044
3120
|
// src/pcb/pcb_silkscreen_pill.ts
|
|
3045
|
-
import { z as
|
|
3046
|
-
var pcb_silkscreen_pill =
|
|
3047
|
-
type:
|
|
3121
|
+
import { z as z144 } from "zod";
|
|
3122
|
+
var pcb_silkscreen_pill = z144.object({
|
|
3123
|
+
type: z144.literal("pcb_silkscreen_pill"),
|
|
3048
3124
|
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
3049
|
-
pcb_component_id:
|
|
3050
|
-
pcb_group_id:
|
|
3051
|
-
subcircuit_id:
|
|
3125
|
+
pcb_component_id: z144.string(),
|
|
3126
|
+
pcb_group_id: z144.string().optional(),
|
|
3127
|
+
subcircuit_id: z144.string().optional(),
|
|
3052
3128
|
center: point,
|
|
3053
3129
|
width: length,
|
|
3054
3130
|
height: length,
|
|
3055
3131
|
layer: layer_ref,
|
|
3056
|
-
ccw_rotation:
|
|
3132
|
+
ccw_rotation: z144.number().optional()
|
|
3057
3133
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
3058
3134
|
expectTypesMatch(true);
|
|
3059
3135
|
|
|
3060
3136
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
3061
|
-
import { z as
|
|
3062
|
-
var pcb_fabrication_note_text =
|
|
3063
|
-
type:
|
|
3137
|
+
import { z as z145 } from "zod";
|
|
3138
|
+
var pcb_fabrication_note_text = z145.object({
|
|
3139
|
+
type: z145.literal("pcb_fabrication_note_text"),
|
|
3064
3140
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
3065
3141
|
"pcb_fabrication_note_text"
|
|
3066
3142
|
),
|
|
3067
|
-
subcircuit_id:
|
|
3068
|
-
pcb_group_id:
|
|
3069
|
-
font:
|
|
3143
|
+
subcircuit_id: z145.string().optional(),
|
|
3144
|
+
pcb_group_id: z145.string().optional(),
|
|
3145
|
+
font: z145.literal("tscircuit2024").default("tscircuit2024"),
|
|
3070
3146
|
font_size: distance.default("1mm"),
|
|
3071
|
-
pcb_component_id:
|
|
3072
|
-
text:
|
|
3073
|
-
ccw_rotation:
|
|
3147
|
+
pcb_component_id: z145.string(),
|
|
3148
|
+
text: z145.string(),
|
|
3149
|
+
ccw_rotation: z145.number().optional(),
|
|
3074
3150
|
layer: visible_layer,
|
|
3075
3151
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3076
|
-
anchor_alignment:
|
|
3077
|
-
color:
|
|
3152
|
+
anchor_alignment: z145.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3153
|
+
color: z145.string().optional()
|
|
3078
3154
|
}).describe(
|
|
3079
3155
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
3080
3156
|
);
|
|
3081
3157
|
expectTypesMatch(true);
|
|
3082
3158
|
|
|
3083
3159
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
3084
|
-
import { z as
|
|
3085
|
-
var pcb_fabrication_note_path =
|
|
3086
|
-
type:
|
|
3160
|
+
import { z as z146 } from "zod";
|
|
3161
|
+
var pcb_fabrication_note_path = z146.object({
|
|
3162
|
+
type: z146.literal("pcb_fabrication_note_path"),
|
|
3087
3163
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
3088
3164
|
"pcb_fabrication_note_path"
|
|
3089
3165
|
),
|
|
3090
|
-
pcb_component_id:
|
|
3091
|
-
subcircuit_id:
|
|
3166
|
+
pcb_component_id: z146.string(),
|
|
3167
|
+
subcircuit_id: z146.string().optional(),
|
|
3092
3168
|
layer: layer_ref,
|
|
3093
|
-
route:
|
|
3169
|
+
route: z146.array(point),
|
|
3094
3170
|
stroke_width: length,
|
|
3095
|
-
color:
|
|
3171
|
+
color: z146.string().optional()
|
|
3096
3172
|
}).describe(
|
|
3097
3173
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
3098
3174
|
);
|
|
3099
3175
|
expectTypesMatch(true);
|
|
3100
3176
|
|
|
3101
3177
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
3102
|
-
import { z as
|
|
3103
|
-
var pcb_fabrication_note_rect =
|
|
3104
|
-
type:
|
|
3178
|
+
import { z as z147 } from "zod";
|
|
3179
|
+
var pcb_fabrication_note_rect = z147.object({
|
|
3180
|
+
type: z147.literal("pcb_fabrication_note_rect"),
|
|
3105
3181
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
3106
3182
|
"pcb_fabrication_note_rect"
|
|
3107
3183
|
),
|
|
3108
|
-
pcb_component_id:
|
|
3109
|
-
pcb_group_id:
|
|
3110
|
-
subcircuit_id:
|
|
3184
|
+
pcb_component_id: z147.string(),
|
|
3185
|
+
pcb_group_id: z147.string().optional(),
|
|
3186
|
+
subcircuit_id: z147.string().optional(),
|
|
3111
3187
|
center: point,
|
|
3112
3188
|
width: length,
|
|
3113
3189
|
height: length,
|
|
3114
3190
|
layer: visible_layer,
|
|
3115
3191
|
stroke_width: length.default("0.1mm"),
|
|
3116
3192
|
corner_radius: length.optional(),
|
|
3117
|
-
is_filled:
|
|
3118
|
-
has_stroke:
|
|
3119
|
-
is_stroke_dashed:
|
|
3120
|
-
color:
|
|
3193
|
+
is_filled: z147.boolean().optional(),
|
|
3194
|
+
has_stroke: z147.boolean().optional(),
|
|
3195
|
+
is_stroke_dashed: z147.boolean().optional(),
|
|
3196
|
+
color: z147.string().optional()
|
|
3121
3197
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
3122
3198
|
expectTypesMatch(true);
|
|
3123
3199
|
|
|
3124
3200
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
3125
|
-
import { z as
|
|
3126
|
-
var pcb_fabrication_note_dimension =
|
|
3127
|
-
type:
|
|
3201
|
+
import { z as z148 } from "zod";
|
|
3202
|
+
var pcb_fabrication_note_dimension = z148.object({
|
|
3203
|
+
type: z148.literal("pcb_fabrication_note_dimension"),
|
|
3128
3204
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
3129
3205
|
"pcb_fabrication_note_dimension"
|
|
3130
3206
|
),
|
|
3131
|
-
pcb_component_id:
|
|
3132
|
-
pcb_group_id:
|
|
3133
|
-
subcircuit_id:
|
|
3207
|
+
pcb_component_id: z148.string(),
|
|
3208
|
+
pcb_group_id: z148.string().optional(),
|
|
3209
|
+
subcircuit_id: z148.string().optional(),
|
|
3134
3210
|
layer: visible_layer,
|
|
3135
3211
|
from: point,
|
|
3136
3212
|
to: point,
|
|
3137
|
-
text:
|
|
3138
|
-
text_ccw_rotation:
|
|
3213
|
+
text: z148.string().optional(),
|
|
3214
|
+
text_ccw_rotation: z148.number().optional(),
|
|
3139
3215
|
offset: length.optional(),
|
|
3140
3216
|
offset_distance: length.optional(),
|
|
3141
|
-
offset_direction:
|
|
3142
|
-
x:
|
|
3143
|
-
y:
|
|
3217
|
+
offset_direction: z148.object({
|
|
3218
|
+
x: z148.number(),
|
|
3219
|
+
y: z148.number()
|
|
3144
3220
|
}).optional(),
|
|
3145
|
-
font:
|
|
3221
|
+
font: z148.literal("tscircuit2024").default("tscircuit2024"),
|
|
3146
3222
|
font_size: length.default("1mm"),
|
|
3147
|
-
color:
|
|
3223
|
+
color: z148.string().optional(),
|
|
3148
3224
|
arrow_size: length.default("1mm")
|
|
3149
3225
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
3150
3226
|
expectTypesMatch(true);
|
|
3151
3227
|
|
|
3152
3228
|
// src/pcb/pcb_note_text.ts
|
|
3153
|
-
import { z as
|
|
3154
|
-
var pcb_note_text =
|
|
3155
|
-
type:
|
|
3229
|
+
import { z as z149 } from "zod";
|
|
3230
|
+
var pcb_note_text = z149.object({
|
|
3231
|
+
type: z149.literal("pcb_note_text"),
|
|
3156
3232
|
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
3157
|
-
pcb_component_id:
|
|
3158
|
-
pcb_group_id:
|
|
3159
|
-
subcircuit_id:
|
|
3160
|
-
name:
|
|
3161
|
-
font:
|
|
3233
|
+
pcb_component_id: z149.string().optional(),
|
|
3234
|
+
pcb_group_id: z149.string().optional(),
|
|
3235
|
+
subcircuit_id: z149.string().optional(),
|
|
3236
|
+
name: z149.string().optional(),
|
|
3237
|
+
font: z149.literal("tscircuit2024").default("tscircuit2024"),
|
|
3162
3238
|
font_size: distance.default("1mm"),
|
|
3163
|
-
text:
|
|
3239
|
+
text: z149.string().optional(),
|
|
3164
3240
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3165
|
-
anchor_alignment:
|
|
3241
|
+
anchor_alignment: z149.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3166
3242
|
layer: visible_layer.default("top"),
|
|
3167
|
-
is_mirrored_from_top_view:
|
|
3168
|
-
color:
|
|
3243
|
+
is_mirrored_from_top_view: z149.boolean().optional(),
|
|
3244
|
+
color: z149.string().optional()
|
|
3169
3245
|
}).describe("Defines a documentation note in text on the PCB");
|
|
3170
3246
|
expectTypesMatch(true);
|
|
3171
3247
|
|
|
3172
3248
|
// src/pcb/pcb_note_rect.ts
|
|
3173
|
-
import { z as
|
|
3174
|
-
var pcb_note_rect =
|
|
3175
|
-
type:
|
|
3249
|
+
import { z as z150 } from "zod";
|
|
3250
|
+
var pcb_note_rect = z150.object({
|
|
3251
|
+
type: z150.literal("pcb_note_rect"),
|
|
3176
3252
|
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
3177
|
-
pcb_component_id:
|
|
3178
|
-
pcb_group_id:
|
|
3179
|
-
subcircuit_id:
|
|
3180
|
-
name:
|
|
3181
|
-
text:
|
|
3253
|
+
pcb_component_id: z150.string().optional(),
|
|
3254
|
+
pcb_group_id: z150.string().optional(),
|
|
3255
|
+
subcircuit_id: z150.string().optional(),
|
|
3256
|
+
name: z150.string().optional(),
|
|
3257
|
+
text: z150.string().optional(),
|
|
3182
3258
|
center: point,
|
|
3183
3259
|
width: length,
|
|
3184
3260
|
height: length,
|
|
3185
3261
|
layer: visible_layer.default("top"),
|
|
3186
3262
|
stroke_width: length.default("0.1mm"),
|
|
3187
3263
|
corner_radius: length.optional(),
|
|
3188
|
-
is_filled:
|
|
3189
|
-
has_stroke:
|
|
3190
|
-
is_stroke_dashed:
|
|
3191
|
-
color:
|
|
3264
|
+
is_filled: z150.boolean().optional(),
|
|
3265
|
+
has_stroke: z150.boolean().optional(),
|
|
3266
|
+
is_stroke_dashed: z150.boolean().optional(),
|
|
3267
|
+
color: z150.string().optional()
|
|
3192
3268
|
}).describe("Defines a rectangular documentation note on the PCB");
|
|
3193
3269
|
expectTypesMatch(true);
|
|
3194
3270
|
|
|
3195
3271
|
// src/pcb/pcb_note_path.ts
|
|
3196
|
-
import { z as
|
|
3197
|
-
var pcb_note_path =
|
|
3198
|
-
type:
|
|
3272
|
+
import { z as z151 } from "zod";
|
|
3273
|
+
var pcb_note_path = z151.object({
|
|
3274
|
+
type: z151.literal("pcb_note_path"),
|
|
3199
3275
|
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
3200
|
-
pcb_component_id:
|
|
3201
|
-
pcb_group_id:
|
|
3202
|
-
subcircuit_id:
|
|
3203
|
-
name:
|
|
3204
|
-
text:
|
|
3205
|
-
route:
|
|
3276
|
+
pcb_component_id: z151.string().optional(),
|
|
3277
|
+
pcb_group_id: z151.string().optional(),
|
|
3278
|
+
subcircuit_id: z151.string().optional(),
|
|
3279
|
+
name: z151.string().optional(),
|
|
3280
|
+
text: z151.string().optional(),
|
|
3281
|
+
route: z151.array(point),
|
|
3206
3282
|
layer: visible_layer.default("top"),
|
|
3207
3283
|
stroke_width: length.default("0.1mm"),
|
|
3208
|
-
color:
|
|
3284
|
+
color: z151.string().optional()
|
|
3209
3285
|
}).describe("Defines a polyline documentation note on the PCB");
|
|
3210
3286
|
expectTypesMatch(true);
|
|
3211
3287
|
|
|
3212
3288
|
// src/pcb/pcb_note_line.ts
|
|
3213
|
-
import { z as
|
|
3214
|
-
var pcb_note_line =
|
|
3215
|
-
type:
|
|
3289
|
+
import { z as z152 } from "zod";
|
|
3290
|
+
var pcb_note_line = z152.object({
|
|
3291
|
+
type: z152.literal("pcb_note_line"),
|
|
3216
3292
|
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
3217
|
-
pcb_component_id:
|
|
3218
|
-
pcb_group_id:
|
|
3219
|
-
subcircuit_id:
|
|
3220
|
-
name:
|
|
3221
|
-
text:
|
|
3293
|
+
pcb_component_id: z152.string().optional(),
|
|
3294
|
+
pcb_group_id: z152.string().optional(),
|
|
3295
|
+
subcircuit_id: z152.string().optional(),
|
|
3296
|
+
name: z152.string().optional(),
|
|
3297
|
+
text: z152.string().optional(),
|
|
3222
3298
|
x1: distance,
|
|
3223
3299
|
y1: distance,
|
|
3224
3300
|
x2: distance,
|
|
3225
3301
|
y2: distance,
|
|
3226
3302
|
layer: visible_layer.default("top"),
|
|
3227
3303
|
stroke_width: distance.default("0.1mm"),
|
|
3228
|
-
color:
|
|
3229
|
-
is_dashed:
|
|
3304
|
+
color: z152.string().optional(),
|
|
3305
|
+
is_dashed: z152.boolean().optional()
|
|
3230
3306
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
3231
3307
|
expectTypesMatch(true);
|
|
3232
3308
|
|
|
3233
3309
|
// src/pcb/pcb_note_dimension.ts
|
|
3234
|
-
import { z as
|
|
3235
|
-
var pcb_note_dimension =
|
|
3236
|
-
type:
|
|
3310
|
+
import { z as z153 } from "zod";
|
|
3311
|
+
var pcb_note_dimension = z153.object({
|
|
3312
|
+
type: z153.literal("pcb_note_dimension"),
|
|
3237
3313
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
3238
|
-
pcb_component_id:
|
|
3239
|
-
pcb_group_id:
|
|
3240
|
-
subcircuit_id:
|
|
3241
|
-
name:
|
|
3314
|
+
pcb_component_id: z153.string().optional(),
|
|
3315
|
+
pcb_group_id: z153.string().optional(),
|
|
3316
|
+
subcircuit_id: z153.string().optional(),
|
|
3317
|
+
name: z153.string().optional(),
|
|
3242
3318
|
from: point,
|
|
3243
3319
|
to: point,
|
|
3244
|
-
text:
|
|
3245
|
-
text_ccw_rotation:
|
|
3320
|
+
text: z153.string().optional(),
|
|
3321
|
+
text_ccw_rotation: z153.number().optional(),
|
|
3246
3322
|
offset_distance: length.optional(),
|
|
3247
|
-
offset_direction:
|
|
3248
|
-
x:
|
|
3249
|
-
y:
|
|
3323
|
+
offset_direction: z153.object({
|
|
3324
|
+
x: z153.number(),
|
|
3325
|
+
y: z153.number()
|
|
3250
3326
|
}).optional(),
|
|
3251
|
-
font:
|
|
3327
|
+
font: z153.literal("tscircuit2024").default("tscircuit2024"),
|
|
3252
3328
|
font_size: length.default("1mm"),
|
|
3253
3329
|
layer: visible_layer.default("top"),
|
|
3254
|
-
color:
|
|
3330
|
+
color: z153.string().optional(),
|
|
3255
3331
|
arrow_size: length.default("1mm")
|
|
3256
3332
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
3257
3333
|
expectTypesMatch(true);
|
|
3258
3334
|
|
|
3259
3335
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
3260
|
-
import { z as
|
|
3336
|
+
import { z as z154 } from "zod";
|
|
3261
3337
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
3262
|
-
type:
|
|
3338
|
+
type: z154.literal("pcb_footprint_overlap_error"),
|
|
3263
3339
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3264
|
-
error_type:
|
|
3265
|
-
pcb_smtpad_ids:
|
|
3266
|
-
pcb_plated_hole_ids:
|
|
3267
|
-
pcb_hole_ids:
|
|
3268
|
-
pcb_keepout_ids:
|
|
3340
|
+
error_type: z154.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
3341
|
+
pcb_smtpad_ids: z154.array(z154.string()).optional(),
|
|
3342
|
+
pcb_plated_hole_ids: z154.array(z154.string()).optional(),
|
|
3343
|
+
pcb_hole_ids: z154.array(z154.string()).optional(),
|
|
3344
|
+
pcb_keepout_ids: z154.array(z154.string()).optional()
|
|
3269
3345
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
3270
3346
|
expectTypesMatch(
|
|
3271
3347
|
true
|
|
3272
3348
|
);
|
|
3273
3349
|
|
|
3274
3350
|
// src/pcb/pcb_courtyard_overlap_error.ts
|
|
3275
|
-
import { z as
|
|
3351
|
+
import { z as z155 } from "zod";
|
|
3276
3352
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
3277
|
-
type:
|
|
3353
|
+
type: z155.literal("pcb_courtyard_overlap_error"),
|
|
3278
3354
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3279
|
-
error_type:
|
|
3280
|
-
pcb_component_ids:
|
|
3355
|
+
error_type: z155.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
|
|
3356
|
+
pcb_component_ids: z155.tuple([z155.string(), z155.string()])
|
|
3281
3357
|
}).describe(
|
|
3282
3358
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
3283
3359
|
);
|
|
@@ -3286,78 +3362,78 @@ expectTypesMatch(
|
|
|
3286
3362
|
);
|
|
3287
3363
|
|
|
3288
3364
|
// src/pcb/pcb_keepout.ts
|
|
3289
|
-
import { z as
|
|
3290
|
-
var pcb_keepout_outline =
|
|
3291
|
-
type:
|
|
3292
|
-
shape:
|
|
3293
|
-
pcb_group_id:
|
|
3294
|
-
subcircuit_id:
|
|
3295
|
-
outline:
|
|
3365
|
+
import { z as z156 } from "zod";
|
|
3366
|
+
var pcb_keepout_outline = z156.object({
|
|
3367
|
+
type: z156.literal("pcb_keepout"),
|
|
3368
|
+
shape: z156.literal("outline"),
|
|
3369
|
+
pcb_group_id: z156.string().optional(),
|
|
3370
|
+
subcircuit_id: z156.string().optional(),
|
|
3371
|
+
outline: z156.array(point).min(2),
|
|
3296
3372
|
stroke_width: length,
|
|
3297
|
-
pcb_keepout_id:
|
|
3298
|
-
layers:
|
|
3299
|
-
description:
|
|
3300
|
-
excluded_pcb_component_ids:
|
|
3301
|
-
warning_only:
|
|
3302
|
-
allow_traces:
|
|
3303
|
-
allow_placements:
|
|
3304
|
-
});
|
|
3305
|
-
var pcb_keepout =
|
|
3306
|
-
type:
|
|
3307
|
-
shape:
|
|
3308
|
-
pcb_group_id:
|
|
3309
|
-
subcircuit_id:
|
|
3373
|
+
pcb_keepout_id: z156.string(),
|
|
3374
|
+
layers: z156.array(z156.string()),
|
|
3375
|
+
description: z156.string().optional(),
|
|
3376
|
+
excluded_pcb_component_ids: z156.array(z156.string()).optional(),
|
|
3377
|
+
warning_only: z156.boolean().optional(),
|
|
3378
|
+
allow_traces: z156.boolean().optional(),
|
|
3379
|
+
allow_placements: z156.boolean().optional()
|
|
3380
|
+
});
|
|
3381
|
+
var pcb_keepout = z156.object({
|
|
3382
|
+
type: z156.literal("pcb_keepout"),
|
|
3383
|
+
shape: z156.literal("rect"),
|
|
3384
|
+
pcb_group_id: z156.string().optional(),
|
|
3385
|
+
subcircuit_id: z156.string().optional(),
|
|
3310
3386
|
center: point,
|
|
3311
3387
|
width: distance,
|
|
3312
3388
|
height: distance,
|
|
3313
|
-
pcb_keepout_id:
|
|
3314
|
-
layers:
|
|
3389
|
+
pcb_keepout_id: z156.string(),
|
|
3390
|
+
layers: z156.array(z156.string()),
|
|
3315
3391
|
// Specify layers where the keepout applies
|
|
3316
|
-
description:
|
|
3392
|
+
description: z156.string().optional(),
|
|
3317
3393
|
// Optional description of the keepout
|
|
3318
|
-
excluded_pcb_component_ids:
|
|
3319
|
-
warning_only:
|
|
3320
|
-
allow_traces:
|
|
3321
|
-
allow_placements:
|
|
3394
|
+
excluded_pcb_component_ids: z156.array(z156.string()).optional(),
|
|
3395
|
+
warning_only: z156.boolean().optional(),
|
|
3396
|
+
allow_traces: z156.boolean().optional(),
|
|
3397
|
+
allow_placements: z156.boolean().optional()
|
|
3322
3398
|
}).or(
|
|
3323
|
-
|
|
3324
|
-
type:
|
|
3325
|
-
shape:
|
|
3326
|
-
pcb_group_id:
|
|
3327
|
-
subcircuit_id:
|
|
3399
|
+
z156.object({
|
|
3400
|
+
type: z156.literal("pcb_keepout"),
|
|
3401
|
+
shape: z156.literal("circle"),
|
|
3402
|
+
pcb_group_id: z156.string().optional(),
|
|
3403
|
+
subcircuit_id: z156.string().optional(),
|
|
3328
3404
|
center: point,
|
|
3329
3405
|
radius: distance,
|
|
3330
|
-
pcb_keepout_id:
|
|
3331
|
-
layers:
|
|
3406
|
+
pcb_keepout_id: z156.string(),
|
|
3407
|
+
layers: z156.array(z156.string()),
|
|
3332
3408
|
// Specify layers where the keepout applies
|
|
3333
|
-
description:
|
|
3409
|
+
description: z156.string().optional(),
|
|
3334
3410
|
// Optional description of the keepout
|
|
3335
|
-
excluded_pcb_component_ids:
|
|
3336
|
-
warning_only:
|
|
3337
|
-
allow_traces:
|
|
3338
|
-
allow_placements:
|
|
3411
|
+
excluded_pcb_component_ids: z156.array(z156.string()).optional(),
|
|
3412
|
+
warning_only: z156.boolean().optional(),
|
|
3413
|
+
allow_traces: z156.boolean().optional(),
|
|
3414
|
+
allow_placements: z156.boolean().optional()
|
|
3339
3415
|
})
|
|
3340
3416
|
).or(pcb_keepout_outline);
|
|
3341
3417
|
expectTypesMatch(true);
|
|
3342
3418
|
expectTypesMatch(true);
|
|
3343
3419
|
|
|
3344
3420
|
// src/pcb/pcb_keepout_overlap_warning.ts
|
|
3345
|
-
import { z as
|
|
3346
|
-
var pcb_keepout_overlap_warning =
|
|
3347
|
-
type:
|
|
3421
|
+
import { z as z157 } from "zod";
|
|
3422
|
+
var pcb_keepout_overlap_warning = z157.object({
|
|
3423
|
+
type: z157.literal("pcb_keepout_overlap_warning"),
|
|
3348
3424
|
pcb_keepout_overlap_warning_id: getZodPrefixedIdWithDefault(
|
|
3349
3425
|
"pcb_keepout_overlap_warning"
|
|
3350
3426
|
),
|
|
3351
|
-
warning_type:
|
|
3352
|
-
message:
|
|
3353
|
-
pcb_keepout_id:
|
|
3354
|
-
pcb_component_ids:
|
|
3355
|
-
pcb_trace_ids:
|
|
3356
|
-
pcb_smtpad_ids:
|
|
3357
|
-
pcb_plated_hole_ids:
|
|
3358
|
-
pcb_via_ids:
|
|
3427
|
+
warning_type: z157.literal("pcb_keepout_overlap_warning").default("pcb_keepout_overlap_warning"),
|
|
3428
|
+
message: z157.string(),
|
|
3429
|
+
pcb_keepout_id: z157.string(),
|
|
3430
|
+
pcb_component_ids: z157.array(z157.string()).optional(),
|
|
3431
|
+
pcb_trace_ids: z157.array(z157.string()).optional(),
|
|
3432
|
+
pcb_smtpad_ids: z157.array(z157.string()).optional(),
|
|
3433
|
+
pcb_plated_hole_ids: z157.array(z157.string()).optional(),
|
|
3434
|
+
pcb_via_ids: z157.array(z157.string()).optional(),
|
|
3359
3435
|
center: point.optional(),
|
|
3360
|
-
subcircuit_id:
|
|
3436
|
+
subcircuit_id: z157.string().optional()
|
|
3361
3437
|
}).describe(
|
|
3362
3438
|
"Warning emitted when copper overlaps a PCB keepout with warning_only enabled"
|
|
3363
3439
|
);
|
|
@@ -3366,18 +3442,18 @@ expectTypesMatch(
|
|
|
3366
3442
|
);
|
|
3367
3443
|
|
|
3368
3444
|
// src/pcb/pcb_cutout.ts
|
|
3369
|
-
import { z as
|
|
3370
|
-
var pcb_cutout_base =
|
|
3371
|
-
type:
|
|
3445
|
+
import { z as z158 } from "zod";
|
|
3446
|
+
var pcb_cutout_base = z158.object({
|
|
3447
|
+
type: z158.literal("pcb_cutout"),
|
|
3372
3448
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
3373
|
-
pcb_component_id:
|
|
3374
|
-
pcb_group_id:
|
|
3375
|
-
subcircuit_id:
|
|
3376
|
-
pcb_board_id:
|
|
3377
|
-
pcb_panel_id:
|
|
3449
|
+
pcb_component_id: z158.string().optional(),
|
|
3450
|
+
pcb_group_id: z158.string().optional(),
|
|
3451
|
+
subcircuit_id: z158.string().optional(),
|
|
3452
|
+
pcb_board_id: z158.string().optional(),
|
|
3453
|
+
pcb_panel_id: z158.string().optional()
|
|
3378
3454
|
});
|
|
3379
3455
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
3380
|
-
shape:
|
|
3456
|
+
shape: z158.literal("rect"),
|
|
3381
3457
|
center: point,
|
|
3382
3458
|
width: length,
|
|
3383
3459
|
height: length,
|
|
@@ -3386,26 +3462,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
3386
3462
|
});
|
|
3387
3463
|
expectTypesMatch(true);
|
|
3388
3464
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
3389
|
-
shape:
|
|
3465
|
+
shape: z158.literal("circle"),
|
|
3390
3466
|
center: point,
|
|
3391
3467
|
radius: length
|
|
3392
3468
|
});
|
|
3393
3469
|
expectTypesMatch(true);
|
|
3394
3470
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
3395
|
-
shape:
|
|
3396
|
-
points:
|
|
3471
|
+
shape: z158.literal("polygon"),
|
|
3472
|
+
points: z158.array(point)
|
|
3397
3473
|
});
|
|
3398
3474
|
expectTypesMatch(true);
|
|
3399
3475
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
3400
|
-
shape:
|
|
3401
|
-
route:
|
|
3476
|
+
shape: z158.literal("path"),
|
|
3477
|
+
route: z158.array(point),
|
|
3402
3478
|
slot_width: length,
|
|
3403
3479
|
slot_length: length.optional(),
|
|
3404
3480
|
space_between_slots: length.optional(),
|
|
3405
3481
|
slot_corner_radius: length.optional()
|
|
3406
3482
|
});
|
|
3407
3483
|
expectTypesMatch(true);
|
|
3408
|
-
var pcb_cutout =
|
|
3484
|
+
var pcb_cutout = z158.discriminatedUnion("shape", [
|
|
3409
3485
|
pcb_cutout_rect,
|
|
3410
3486
|
pcb_cutout_circle,
|
|
3411
3487
|
pcb_cutout_polygon,
|
|
@@ -3414,223 +3490,223 @@ var pcb_cutout = z156.discriminatedUnion("shape", [
|
|
|
3414
3490
|
expectTypesMatch(true);
|
|
3415
3491
|
|
|
3416
3492
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
3417
|
-
import { z as
|
|
3493
|
+
import { z as z159 } from "zod";
|
|
3418
3494
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
3419
|
-
type:
|
|
3495
|
+
type: z159.literal("pcb_missing_footprint_error"),
|
|
3420
3496
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
3421
3497
|
"pcb_missing_footprint_error"
|
|
3422
3498
|
),
|
|
3423
|
-
pcb_group_id:
|
|
3424
|
-
subcircuit_id:
|
|
3425
|
-
error_type:
|
|
3426
|
-
source_component_id:
|
|
3499
|
+
pcb_group_id: z159.string().optional(),
|
|
3500
|
+
subcircuit_id: z159.string().optional(),
|
|
3501
|
+
error_type: z159.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
3502
|
+
source_component_id: z159.string()
|
|
3427
3503
|
}).describe("Defines a missing footprint error on the PCB");
|
|
3428
3504
|
expectTypesMatch(
|
|
3429
3505
|
true
|
|
3430
3506
|
);
|
|
3431
3507
|
|
|
3432
3508
|
// src/pcb/external_footprint_load_error.ts
|
|
3433
|
-
import { z as
|
|
3509
|
+
import { z as z160 } from "zod";
|
|
3434
3510
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
3435
|
-
type:
|
|
3511
|
+
type: z160.literal("external_footprint_load_error"),
|
|
3436
3512
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3437
3513
|
"external_footprint_load_error"
|
|
3438
3514
|
),
|
|
3439
|
-
pcb_component_id:
|
|
3440
|
-
source_component_id:
|
|
3441
|
-
pcb_group_id:
|
|
3442
|
-
subcircuit_id:
|
|
3443
|
-
footprinter_string:
|
|
3444
|
-
error_type:
|
|
3515
|
+
pcb_component_id: z160.string(),
|
|
3516
|
+
source_component_id: z160.string(),
|
|
3517
|
+
pcb_group_id: z160.string().optional(),
|
|
3518
|
+
subcircuit_id: z160.string().optional(),
|
|
3519
|
+
footprinter_string: z160.string().optional(),
|
|
3520
|
+
error_type: z160.literal("external_footprint_load_error").default("external_footprint_load_error")
|
|
3445
3521
|
}).describe("Defines an error when an external footprint fails to load");
|
|
3446
3522
|
expectTypesMatch(true);
|
|
3447
3523
|
|
|
3448
3524
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
3449
|
-
import { z as
|
|
3525
|
+
import { z as z161 } from "zod";
|
|
3450
3526
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
3451
|
-
type:
|
|
3527
|
+
type: z161.literal("circuit_json_footprint_load_error"),
|
|
3452
3528
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3453
3529
|
"circuit_json_footprint_load_error"
|
|
3454
3530
|
),
|
|
3455
|
-
pcb_component_id:
|
|
3456
|
-
source_component_id:
|
|
3457
|
-
pcb_group_id:
|
|
3458
|
-
subcircuit_id:
|
|
3459
|
-
error_type:
|
|
3460
|
-
circuit_json:
|
|
3531
|
+
pcb_component_id: z161.string(),
|
|
3532
|
+
source_component_id: z161.string(),
|
|
3533
|
+
pcb_group_id: z161.string().optional(),
|
|
3534
|
+
subcircuit_id: z161.string().optional(),
|
|
3535
|
+
error_type: z161.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
3536
|
+
circuit_json: z161.array(z161.any()).optional()
|
|
3461
3537
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
3462
3538
|
expectTypesMatch(true);
|
|
3463
3539
|
|
|
3464
3540
|
// src/pcb/pcb_group.ts
|
|
3465
|
-
import { z as
|
|
3466
|
-
var pcb_group =
|
|
3467
|
-
type:
|
|
3541
|
+
import { z as z162 } from "zod";
|
|
3542
|
+
var pcb_group = z162.object({
|
|
3543
|
+
type: z162.literal("pcb_group"),
|
|
3468
3544
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
3469
|
-
source_group_id:
|
|
3470
|
-
is_subcircuit:
|
|
3471
|
-
subcircuit_id:
|
|
3545
|
+
source_group_id: z162.string(),
|
|
3546
|
+
is_subcircuit: z162.boolean().optional(),
|
|
3547
|
+
subcircuit_id: z162.string().optional(),
|
|
3472
3548
|
width: length.optional(),
|
|
3473
3549
|
height: length.optional(),
|
|
3474
3550
|
center: point,
|
|
3475
|
-
display_offset_x:
|
|
3551
|
+
display_offset_x: z162.string().optional().describe(
|
|
3476
3552
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
3477
3553
|
),
|
|
3478
|
-
display_offset_y:
|
|
3554
|
+
display_offset_y: z162.string().optional().describe(
|
|
3479
3555
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
3480
3556
|
),
|
|
3481
|
-
outline:
|
|
3557
|
+
outline: z162.array(point).optional(),
|
|
3482
3558
|
anchor_position: point.optional(),
|
|
3483
3559
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
3484
|
-
position_mode:
|
|
3485
|
-
positioned_relative_to_pcb_group_id:
|
|
3486
|
-
positioned_relative_to_pcb_board_id:
|
|
3487
|
-
pcb_component_ids:
|
|
3488
|
-
child_layout_mode:
|
|
3489
|
-
name:
|
|
3490
|
-
description:
|
|
3491
|
-
layout_mode:
|
|
3492
|
-
autorouter_configuration:
|
|
3560
|
+
position_mode: z162.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
3561
|
+
positioned_relative_to_pcb_group_id: z162.string().optional(),
|
|
3562
|
+
positioned_relative_to_pcb_board_id: z162.string().optional(),
|
|
3563
|
+
pcb_component_ids: z162.array(z162.string()),
|
|
3564
|
+
child_layout_mode: z162.enum(["packed", "none"]).optional(),
|
|
3565
|
+
name: z162.string().optional(),
|
|
3566
|
+
description: z162.string().optional(),
|
|
3567
|
+
layout_mode: z162.string().optional(),
|
|
3568
|
+
autorouter_configuration: z162.object({
|
|
3493
3569
|
trace_clearance: length
|
|
3494
3570
|
}).optional(),
|
|
3495
|
-
autorouter_used_string:
|
|
3571
|
+
autorouter_used_string: z162.string().optional()
|
|
3496
3572
|
}).describe("Defines a group of components on the PCB");
|
|
3497
3573
|
expectTypesMatch(true);
|
|
3498
3574
|
|
|
3499
3575
|
// src/pcb/pcb_autorouting_error.ts
|
|
3500
|
-
import { z as
|
|
3576
|
+
import { z as z163 } from "zod";
|
|
3501
3577
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
3502
|
-
type:
|
|
3578
|
+
type: z163.literal("pcb_autorouting_error"),
|
|
3503
3579
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
3504
|
-
error_type:
|
|
3505
|
-
subcircuit_id:
|
|
3580
|
+
error_type: z163.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
3581
|
+
subcircuit_id: z163.string().optional()
|
|
3506
3582
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
3507
3583
|
expectTypesMatch(true);
|
|
3508
3584
|
|
|
3509
3585
|
// src/pcb/pcb_preflight_routing_error.ts
|
|
3510
|
-
import { z as
|
|
3586
|
+
import { z as z164 } from "zod";
|
|
3511
3587
|
var pcb_preflight_routing_error = base_circuit_json_error.extend({
|
|
3512
|
-
type:
|
|
3588
|
+
type: z164.literal("pcb_preflight_routing_error"),
|
|
3513
3589
|
pcb_preflight_routing_error_id: getZodPrefixedIdWithDefault(
|
|
3514
3590
|
"pcb_preflight_routing_error"
|
|
3515
3591
|
),
|
|
3516
|
-
error_type:
|
|
3517
|
-
error_code:
|
|
3518
|
-
subcircuit_id:
|
|
3519
|
-
pcb_group_id:
|
|
3520
|
-
routing_phase_index:
|
|
3521
|
-
phase_name:
|
|
3522
|
-
source_trace_ids:
|
|
3523
|
-
pcb_component_ids:
|
|
3524
|
-
pcb_port_ids:
|
|
3525
|
-
related_error_ids:
|
|
3526
|
-
measurements:
|
|
3592
|
+
error_type: z164.literal("pcb_preflight_routing_error").default("pcb_preflight_routing_error"),
|
|
3593
|
+
error_code: z164.string(),
|
|
3594
|
+
subcircuit_id: z164.string().optional(),
|
|
3595
|
+
pcb_group_id: z164.string().optional(),
|
|
3596
|
+
routing_phase_index: z164.number().int().optional(),
|
|
3597
|
+
phase_name: z164.string().optional(),
|
|
3598
|
+
source_trace_ids: z164.array(z164.string()).optional(),
|
|
3599
|
+
pcb_component_ids: z164.array(z164.string()).optional(),
|
|
3600
|
+
pcb_port_ids: z164.array(z164.string()).optional(),
|
|
3601
|
+
related_error_ids: z164.array(z164.string()).optional(),
|
|
3602
|
+
measurements: z164.record(z164.number().finite()).optional()
|
|
3527
3603
|
});
|
|
3528
3604
|
expectTypesMatch(true);
|
|
3529
3605
|
|
|
3530
3606
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
3531
|
-
import { z as
|
|
3532
|
-
var pcb_manual_edit_conflict_warning =
|
|
3533
|
-
type:
|
|
3607
|
+
import { z as z165 } from "zod";
|
|
3608
|
+
var pcb_manual_edit_conflict_warning = z165.object({
|
|
3609
|
+
type: z165.literal("pcb_manual_edit_conflict_warning"),
|
|
3534
3610
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
3535
3611
|
"pcb_manual_edit_conflict_warning"
|
|
3536
3612
|
),
|
|
3537
|
-
warning_type:
|
|
3538
|
-
message:
|
|
3539
|
-
pcb_component_id:
|
|
3540
|
-
pcb_group_id:
|
|
3541
|
-
subcircuit_id:
|
|
3542
|
-
source_component_id:
|
|
3613
|
+
warning_type: z165.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
3614
|
+
message: z165.string(),
|
|
3615
|
+
pcb_component_id: z165.string(),
|
|
3616
|
+
pcb_group_id: z165.string().optional(),
|
|
3617
|
+
subcircuit_id: z165.string().optional(),
|
|
3618
|
+
source_component_id: z165.string()
|
|
3543
3619
|
}).describe(
|
|
3544
3620
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3545
3621
|
);
|
|
3546
3622
|
expectTypesMatch(true);
|
|
3547
3623
|
|
|
3548
3624
|
// src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts
|
|
3549
|
-
import { z as
|
|
3550
|
-
var connectorOrientationDirection =
|
|
3551
|
-
var pcb_connector_not_in_accessible_orientation_warning =
|
|
3552
|
-
type:
|
|
3625
|
+
import { z as z166 } from "zod";
|
|
3626
|
+
var connectorOrientationDirection = z166.enum(["x-", "x+", "y+", "y-"]);
|
|
3627
|
+
var pcb_connector_not_in_accessible_orientation_warning = z166.object({
|
|
3628
|
+
type: z166.literal("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3553
3629
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3554
3630
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3555
3631
|
),
|
|
3556
|
-
warning_type:
|
|
3557
|
-
message:
|
|
3558
|
-
pcb_component_id:
|
|
3559
|
-
source_component_id:
|
|
3560
|
-
pcb_board_id:
|
|
3632
|
+
warning_type: z166.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3633
|
+
message: z166.string(),
|
|
3634
|
+
pcb_component_id: z166.string(),
|
|
3635
|
+
source_component_id: z166.string().optional(),
|
|
3636
|
+
pcb_board_id: z166.string().optional(),
|
|
3561
3637
|
facing_direction: connectorOrientationDirection,
|
|
3562
3638
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3563
|
-
subcircuit_id:
|
|
3639
|
+
subcircuit_id: z166.string().optional()
|
|
3564
3640
|
}).describe(
|
|
3565
3641
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
3566
3642
|
);
|
|
3567
3643
|
expectTypesMatch(true);
|
|
3568
3644
|
|
|
3569
3645
|
// src/pcb/pcb_component_missing_courtyard_warning.ts
|
|
3570
|
-
import { z as
|
|
3571
|
-
var pcb_component_missing_courtyard_warning =
|
|
3572
|
-
type:
|
|
3646
|
+
import { z as z167 } from "zod";
|
|
3647
|
+
var pcb_component_missing_courtyard_warning = z167.object({
|
|
3648
|
+
type: z167.literal("pcb_component_missing_courtyard_warning"),
|
|
3573
3649
|
pcb_component_missing_courtyard_warning_id: getZodPrefixedIdWithDefault(
|
|
3574
3650
|
"pcb_component_missing_courtyard_warning"
|
|
3575
3651
|
),
|
|
3576
|
-
warning_type:
|
|
3577
|
-
message:
|
|
3578
|
-
pcb_component_id:
|
|
3579
|
-
source_component_id:
|
|
3580
|
-
subcircuit_id:
|
|
3652
|
+
warning_type: z167.literal("pcb_component_missing_courtyard_warning").default("pcb_component_missing_courtyard_warning"),
|
|
3653
|
+
message: z167.string(),
|
|
3654
|
+
pcb_component_id: z167.string(),
|
|
3655
|
+
source_component_id: z167.string().optional(),
|
|
3656
|
+
subcircuit_id: z167.string().optional()
|
|
3581
3657
|
}).describe("Warning emitted when a PCB component has no courtyard geometry");
|
|
3582
3658
|
expectTypesMatch(true);
|
|
3583
3659
|
|
|
3584
3660
|
// src/pcb/supplier_footprint_mismatch_warning.ts
|
|
3585
|
-
import { z as
|
|
3586
|
-
var supplier_footprint_mismatch_warning =
|
|
3587
|
-
type:
|
|
3661
|
+
import { z as z168 } from "zod";
|
|
3662
|
+
var supplier_footprint_mismatch_warning = z168.object({
|
|
3663
|
+
type: z168.literal("supplier_footprint_mismatch_warning"),
|
|
3588
3664
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
3589
3665
|
"supplier_footprint_mismatch_warning"
|
|
3590
3666
|
),
|
|
3591
|
-
warning_type:
|
|
3592
|
-
message:
|
|
3593
|
-
source_component_id:
|
|
3594
|
-
pcb_component_id:
|
|
3595
|
-
pcb_group_id:
|
|
3596
|
-
subcircuit_id:
|
|
3667
|
+
warning_type: z168.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
|
|
3668
|
+
message: z168.string(),
|
|
3669
|
+
source_component_id: z168.string(),
|
|
3670
|
+
pcb_component_id: z168.string().optional(),
|
|
3671
|
+
pcb_group_id: z168.string().optional(),
|
|
3672
|
+
subcircuit_id: z168.string().optional(),
|
|
3597
3673
|
supplier_name: supplier_name.optional(),
|
|
3598
|
-
supplier_part_number:
|
|
3599
|
-
supplier_footprint_url:
|
|
3600
|
-
footprint_copper_intersection_over_union:
|
|
3674
|
+
supplier_part_number: z168.string().optional(),
|
|
3675
|
+
supplier_footprint_url: z168.string().optional(),
|
|
3676
|
+
footprint_copper_intersection_over_union: z168.number()
|
|
3601
3677
|
}).describe(
|
|
3602
3678
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
3603
3679
|
);
|
|
3604
3680
|
expectTypesMatch(true);
|
|
3605
3681
|
|
|
3606
3682
|
// src/pcb/pcb_fabricator_extra_charge_warning.ts
|
|
3607
|
-
import { z as
|
|
3608
|
-
var pcb_fabricator_extra_charge_warning =
|
|
3609
|
-
type:
|
|
3683
|
+
import { z as z169 } from "zod";
|
|
3684
|
+
var pcb_fabricator_extra_charge_warning = z169.object({
|
|
3685
|
+
type: z169.literal("pcb_fabricator_extra_charge_warning"),
|
|
3610
3686
|
pcb_fabricator_extra_charge_warning_id: getZodPrefixedIdWithDefault(
|
|
3611
3687
|
"pcb_fabricator_extra_charge_warning"
|
|
3612
3688
|
),
|
|
3613
|
-
warning_type:
|
|
3614
|
-
message:
|
|
3615
|
-
fabricator_preset:
|
|
3616
|
-
pcb_board_id:
|
|
3617
|
-
pcb_via_ids:
|
|
3618
|
-
subcircuit_id:
|
|
3689
|
+
warning_type: z169.literal("pcb_fabricator_extra_charge_warning").default("pcb_fabricator_extra_charge_warning"),
|
|
3690
|
+
message: z169.string(),
|
|
3691
|
+
fabricator_preset: z169.string(),
|
|
3692
|
+
pcb_board_id: z169.string().optional(),
|
|
3693
|
+
pcb_via_ids: z169.array(z169.string()).optional(),
|
|
3694
|
+
subcircuit_id: z169.string().optional()
|
|
3619
3695
|
}).describe(
|
|
3620
3696
|
"Warning that a design feature incurs an extra charge for the selected fabricator preset, such as via hole diameters below 0.3 mm with JLCPCB economy or standard presets."
|
|
3621
3697
|
);
|
|
3622
3698
|
expectTypesMatch(true);
|
|
3623
3699
|
|
|
3624
3700
|
// src/pcb/pcb_breakout_point.ts
|
|
3625
|
-
import { z as
|
|
3626
|
-
var pcb_breakout_point =
|
|
3627
|
-
type:
|
|
3701
|
+
import { z as z170 } from "zod";
|
|
3702
|
+
var pcb_breakout_point = z170.object({
|
|
3703
|
+
type: z170.literal("pcb_breakout_point"),
|
|
3628
3704
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
3629
|
-
pcb_group_id:
|
|
3630
|
-
subcircuit_id:
|
|
3631
|
-
source_trace_id:
|
|
3632
|
-
source_port_id:
|
|
3633
|
-
source_net_id:
|
|
3705
|
+
pcb_group_id: z170.string(),
|
|
3706
|
+
subcircuit_id: z170.string().optional(),
|
|
3707
|
+
source_trace_id: z170.string().optional(),
|
|
3708
|
+
source_port_id: z170.string().optional(),
|
|
3709
|
+
source_net_id: z170.string().optional(),
|
|
3634
3710
|
layer: layer_ref.optional(),
|
|
3635
3711
|
x: distance,
|
|
3636
3712
|
y: distance
|
|
@@ -3640,61 +3716,61 @@ var pcb_breakout_point = z168.object({
|
|
|
3640
3716
|
expectTypesMatch(true);
|
|
3641
3717
|
|
|
3642
3718
|
// src/pcb/pcb_ground_plane.ts
|
|
3643
|
-
import { z as
|
|
3644
|
-
var pcb_ground_plane =
|
|
3645
|
-
type:
|
|
3719
|
+
import { z as z171 } from "zod";
|
|
3720
|
+
var pcb_ground_plane = z171.object({
|
|
3721
|
+
type: z171.literal("pcb_ground_plane"),
|
|
3646
3722
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
3647
|
-
source_pcb_ground_plane_id:
|
|
3648
|
-
source_net_id:
|
|
3649
|
-
pcb_group_id:
|
|
3650
|
-
subcircuit_id:
|
|
3723
|
+
source_pcb_ground_plane_id: z171.string(),
|
|
3724
|
+
source_net_id: z171.string(),
|
|
3725
|
+
pcb_group_id: z171.string().optional(),
|
|
3726
|
+
subcircuit_id: z171.string().optional()
|
|
3651
3727
|
}).describe("Defines a ground plane on the PCB");
|
|
3652
3728
|
expectTypesMatch(true);
|
|
3653
3729
|
|
|
3654
3730
|
// src/pcb/pcb_ground_plane_region.ts
|
|
3655
|
-
import { z as
|
|
3656
|
-
var pcb_ground_plane_region =
|
|
3657
|
-
type:
|
|
3731
|
+
import { z as z172 } from "zod";
|
|
3732
|
+
var pcb_ground_plane_region = z172.object({
|
|
3733
|
+
type: z172.literal("pcb_ground_plane_region"),
|
|
3658
3734
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3659
3735
|
"pcb_ground_plane_region"
|
|
3660
3736
|
),
|
|
3661
|
-
pcb_ground_plane_id:
|
|
3662
|
-
pcb_group_id:
|
|
3663
|
-
subcircuit_id:
|
|
3737
|
+
pcb_ground_plane_id: z172.string(),
|
|
3738
|
+
pcb_group_id: z172.string().optional(),
|
|
3739
|
+
subcircuit_id: z172.string().optional(),
|
|
3664
3740
|
layer: layer_ref,
|
|
3665
|
-
points:
|
|
3741
|
+
points: z172.array(point)
|
|
3666
3742
|
}).describe("Defines a polygon region of a ground plane");
|
|
3667
3743
|
expectTypesMatch(true);
|
|
3668
3744
|
|
|
3669
3745
|
// src/pcb/pcb_thermal_spoke.ts
|
|
3670
|
-
import { z as
|
|
3671
|
-
var pcb_thermal_spoke =
|
|
3672
|
-
type:
|
|
3746
|
+
import { z as z173 } from "zod";
|
|
3747
|
+
var pcb_thermal_spoke = z173.object({
|
|
3748
|
+
type: z173.literal("pcb_thermal_spoke"),
|
|
3673
3749
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3674
|
-
pcb_ground_plane_id:
|
|
3675
|
-
shape:
|
|
3676
|
-
spoke_count:
|
|
3750
|
+
pcb_ground_plane_id: z173.string(),
|
|
3751
|
+
shape: z173.string(),
|
|
3752
|
+
spoke_count: z173.number(),
|
|
3677
3753
|
spoke_thickness: distance,
|
|
3678
3754
|
spoke_inner_diameter: distance,
|
|
3679
3755
|
spoke_outer_diameter: distance,
|
|
3680
|
-
pcb_plated_hole_id:
|
|
3681
|
-
subcircuit_id:
|
|
3756
|
+
pcb_plated_hole_id: z173.string().optional(),
|
|
3757
|
+
subcircuit_id: z173.string().optional()
|
|
3682
3758
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3683
3759
|
expectTypesMatch(true);
|
|
3684
3760
|
|
|
3685
3761
|
// src/pcb/pcb_copper_pour.ts
|
|
3686
|
-
import { z as
|
|
3687
|
-
var pcb_copper_pour_base =
|
|
3688
|
-
type:
|
|
3762
|
+
import { z as z174 } from "zod";
|
|
3763
|
+
var pcb_copper_pour_base = z174.object({
|
|
3764
|
+
type: z174.literal("pcb_copper_pour"),
|
|
3689
3765
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3690
|
-
pcb_group_id:
|
|
3691
|
-
subcircuit_id:
|
|
3766
|
+
pcb_group_id: z174.string().optional(),
|
|
3767
|
+
subcircuit_id: z174.string().optional(),
|
|
3692
3768
|
layer: layer_ref,
|
|
3693
|
-
source_net_id:
|
|
3694
|
-
covered_with_solder_mask:
|
|
3769
|
+
source_net_id: z174.string().optional(),
|
|
3770
|
+
covered_with_solder_mask: z174.boolean().optional().default(true)
|
|
3695
3771
|
});
|
|
3696
3772
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3697
|
-
shape:
|
|
3773
|
+
shape: z174.literal("rect"),
|
|
3698
3774
|
center: point,
|
|
3699
3775
|
width: length,
|
|
3700
3776
|
height: length,
|
|
@@ -3702,16 +3778,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3702
3778
|
});
|
|
3703
3779
|
expectTypesMatch(true);
|
|
3704
3780
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3705
|
-
shape:
|
|
3781
|
+
shape: z174.literal("brep"),
|
|
3706
3782
|
brep_shape
|
|
3707
3783
|
});
|
|
3708
3784
|
expectTypesMatch(true);
|
|
3709
3785
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3710
|
-
shape:
|
|
3711
|
-
points:
|
|
3786
|
+
shape: z174.literal("polygon"),
|
|
3787
|
+
points: z174.array(point)
|
|
3712
3788
|
});
|
|
3713
3789
|
expectTypesMatch(true);
|
|
3714
|
-
var pcb_copper_pour =
|
|
3790
|
+
var pcb_copper_pour = z174.discriminatedUnion("shape", [
|
|
3715
3791
|
pcb_copper_pour_rect,
|
|
3716
3792
|
pcb_copper_pour_brep,
|
|
3717
3793
|
pcb_copper_pour_polygon
|
|
@@ -3719,99 +3795,99 @@ var pcb_copper_pour = z172.discriminatedUnion("shape", [
|
|
|
3719
3795
|
expectTypesMatch(true);
|
|
3720
3796
|
|
|
3721
3797
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
3722
|
-
import { z as
|
|
3798
|
+
import { z as z175 } from "zod";
|
|
3723
3799
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3724
|
-
type:
|
|
3800
|
+
type: z175.literal("pcb_component_outside_board_error"),
|
|
3725
3801
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3726
3802
|
"pcb_component_outside_board_error"
|
|
3727
3803
|
),
|
|
3728
|
-
error_type:
|
|
3729
|
-
pcb_component_id:
|
|
3730
|
-
pcb_board_id:
|
|
3804
|
+
error_type: z175.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
3805
|
+
pcb_component_id: z175.string(),
|
|
3806
|
+
pcb_board_id: z175.string(),
|
|
3731
3807
|
component_center: point,
|
|
3732
|
-
component_bounds:
|
|
3733
|
-
min_x:
|
|
3734
|
-
max_x:
|
|
3735
|
-
min_y:
|
|
3736
|
-
max_y:
|
|
3808
|
+
component_bounds: z175.object({
|
|
3809
|
+
min_x: z175.number(),
|
|
3810
|
+
max_x: z175.number(),
|
|
3811
|
+
min_y: z175.number(),
|
|
3812
|
+
max_y: z175.number()
|
|
3737
3813
|
}),
|
|
3738
|
-
subcircuit_id:
|
|
3739
|
-
source_component_id:
|
|
3814
|
+
subcircuit_id: z175.string().optional(),
|
|
3815
|
+
source_component_id: z175.string().optional()
|
|
3740
3816
|
}).describe(
|
|
3741
3817
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3742
3818
|
);
|
|
3743
3819
|
expectTypesMatch(true);
|
|
3744
3820
|
|
|
3745
3821
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
3746
|
-
import { z as
|
|
3822
|
+
import { z as z176 } from "zod";
|
|
3747
3823
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3748
|
-
type:
|
|
3824
|
+
type: z176.literal("pcb_component_not_on_board_edge_error"),
|
|
3749
3825
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3750
3826
|
"pcb_component_not_on_board_edge_error"
|
|
3751
3827
|
),
|
|
3752
|
-
error_type:
|
|
3753
|
-
pcb_component_id:
|
|
3754
|
-
pcb_board_id:
|
|
3828
|
+
error_type: z176.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
3829
|
+
pcb_component_id: z176.string(),
|
|
3830
|
+
pcb_board_id: z176.string(),
|
|
3755
3831
|
component_center: point,
|
|
3756
|
-
pad_to_nearest_board_edge_distance:
|
|
3757
|
-
source_component_id:
|
|
3758
|
-
subcircuit_id:
|
|
3832
|
+
pad_to_nearest_board_edge_distance: z176.number(),
|
|
3833
|
+
source_component_id: z176.string().optional(),
|
|
3834
|
+
subcircuit_id: z176.string().optional()
|
|
3759
3835
|
}).describe(
|
|
3760
3836
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3761
3837
|
);
|
|
3762
3838
|
expectTypesMatch(true);
|
|
3763
3839
|
|
|
3764
3840
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
3765
|
-
import { z as
|
|
3841
|
+
import { z as z177 } from "zod";
|
|
3766
3842
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3767
|
-
type:
|
|
3843
|
+
type: z177.literal("pcb_component_invalid_layer_error"),
|
|
3768
3844
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3769
3845
|
"pcb_component_invalid_layer_error"
|
|
3770
3846
|
),
|
|
3771
|
-
error_type:
|
|
3772
|
-
pcb_component_id:
|
|
3773
|
-
source_component_id:
|
|
3847
|
+
error_type: z177.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
3848
|
+
pcb_component_id: z177.string().optional(),
|
|
3849
|
+
source_component_id: z177.string(),
|
|
3774
3850
|
layer: layer_ref,
|
|
3775
|
-
subcircuit_id:
|
|
3851
|
+
subcircuit_id: z177.string().optional()
|
|
3776
3852
|
}).describe(
|
|
3777
3853
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
3778
3854
|
);
|
|
3779
3855
|
expectTypesMatch(true);
|
|
3780
3856
|
|
|
3781
3857
|
// src/pcb/pcb_via_clearance_error.ts
|
|
3782
|
-
import { z as
|
|
3858
|
+
import { z as z178 } from "zod";
|
|
3783
3859
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
3784
|
-
type:
|
|
3860
|
+
type: z178.literal("pcb_via_clearance_error"),
|
|
3785
3861
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3786
|
-
error_type:
|
|
3787
|
-
pcb_via_ids:
|
|
3862
|
+
error_type: z178.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
3863
|
+
pcb_via_ids: z178.array(z178.string()).min(2),
|
|
3788
3864
|
minimum_clearance: distance.optional(),
|
|
3789
3865
|
actual_clearance: distance.optional(),
|
|
3790
|
-
pcb_center:
|
|
3791
|
-
x:
|
|
3792
|
-
y:
|
|
3866
|
+
pcb_center: z178.object({
|
|
3867
|
+
x: z178.number().optional(),
|
|
3868
|
+
y: z178.number().optional()
|
|
3793
3869
|
}).optional(),
|
|
3794
|
-
subcircuit_id:
|
|
3870
|
+
subcircuit_id: z178.string().optional()
|
|
3795
3871
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
3796
3872
|
expectTypesMatch(true);
|
|
3797
3873
|
|
|
3798
3874
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
3799
|
-
import { z as
|
|
3875
|
+
import { z as z179 } from "zod";
|
|
3800
3876
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
3801
|
-
type:
|
|
3877
|
+
type: z179.literal("pcb_via_trace_clearance_error"),
|
|
3802
3878
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3803
3879
|
"pcb_via_trace_clearance_error"
|
|
3804
3880
|
),
|
|
3805
|
-
error_type:
|
|
3806
|
-
pcb_via_id:
|
|
3807
|
-
pcb_trace_id:
|
|
3881
|
+
error_type: z179.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
3882
|
+
pcb_via_id: z179.string(),
|
|
3883
|
+
pcb_trace_id: z179.string(),
|
|
3808
3884
|
minimum_clearance: distance.optional(),
|
|
3809
3885
|
actual_clearance: distance.optional(),
|
|
3810
|
-
center:
|
|
3811
|
-
x:
|
|
3812
|
-
y:
|
|
3886
|
+
center: z179.object({
|
|
3887
|
+
x: z179.number().optional(),
|
|
3888
|
+
y: z179.number().optional()
|
|
3813
3889
|
}).optional(),
|
|
3814
|
-
subcircuit_id:
|
|
3890
|
+
subcircuit_id: z179.string().optional()
|
|
3815
3891
|
}).describe(
|
|
3816
3892
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
3817
3893
|
);
|
|
@@ -3820,41 +3896,41 @@ expectTypesMatch(
|
|
|
3820
3896
|
);
|
|
3821
3897
|
|
|
3822
3898
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
3823
|
-
import { z as
|
|
3899
|
+
import { z as z180 } from "zod";
|
|
3824
3900
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
3825
|
-
type:
|
|
3901
|
+
type: z180.literal("pcb_pad_pad_clearance_error"),
|
|
3826
3902
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3827
3903
|
"pcb_pad_pad_clearance_error"
|
|
3828
3904
|
),
|
|
3829
|
-
error_type:
|
|
3830
|
-
pcb_pad_ids:
|
|
3905
|
+
error_type: z180.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
3906
|
+
pcb_pad_ids: z180.array(z180.string()).min(2),
|
|
3831
3907
|
minimum_clearance: distance.optional(),
|
|
3832
3908
|
actual_clearance: distance.optional(),
|
|
3833
|
-
center:
|
|
3834
|
-
x:
|
|
3835
|
-
y:
|
|
3909
|
+
center: z180.object({
|
|
3910
|
+
x: z180.number().optional(),
|
|
3911
|
+
y: z180.number().optional()
|
|
3836
3912
|
}).optional(),
|
|
3837
|
-
subcircuit_id:
|
|
3913
|
+
subcircuit_id: z180.string().optional()
|
|
3838
3914
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
3839
3915
|
expectTypesMatch(true);
|
|
3840
3916
|
|
|
3841
3917
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
3842
|
-
import { z as
|
|
3918
|
+
import { z as z181 } from "zod";
|
|
3843
3919
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
3844
|
-
type:
|
|
3920
|
+
type: z181.literal("pcb_pad_trace_clearance_error"),
|
|
3845
3921
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3846
3922
|
"pcb_pad_trace_clearance_error"
|
|
3847
3923
|
),
|
|
3848
|
-
error_type:
|
|
3849
|
-
pcb_pad_id:
|
|
3850
|
-
pcb_trace_id:
|
|
3924
|
+
error_type: z181.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
3925
|
+
pcb_pad_id: z181.string(),
|
|
3926
|
+
pcb_trace_id: z181.string(),
|
|
3851
3927
|
minimum_clearance: distance.optional(),
|
|
3852
3928
|
actual_clearance: distance.optional(),
|
|
3853
|
-
center:
|
|
3854
|
-
x:
|
|
3855
|
-
y:
|
|
3929
|
+
center: z181.object({
|
|
3930
|
+
x: z181.number().optional(),
|
|
3931
|
+
y: z181.number().optional()
|
|
3856
3932
|
}).optional(),
|
|
3857
|
-
subcircuit_id:
|
|
3933
|
+
subcircuit_id: z181.string().optional()
|
|
3858
3934
|
}).describe(
|
|
3859
3935
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
3860
3936
|
);
|
|
@@ -3863,89 +3939,89 @@ expectTypesMatch(
|
|
|
3863
3939
|
);
|
|
3864
3940
|
|
|
3865
3941
|
// src/pcb/pcb_courtyard_rect.ts
|
|
3866
|
-
import { z as
|
|
3867
|
-
var pcb_courtyard_rect =
|
|
3868
|
-
type:
|
|
3942
|
+
import { z as z182 } from "zod";
|
|
3943
|
+
var pcb_courtyard_rect = z182.object({
|
|
3944
|
+
type: z182.literal("pcb_courtyard_rect"),
|
|
3869
3945
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
3870
|
-
pcb_component_id:
|
|
3871
|
-
pcb_group_id:
|
|
3872
|
-
subcircuit_id:
|
|
3946
|
+
pcb_component_id: z182.string(),
|
|
3947
|
+
pcb_group_id: z182.string().optional(),
|
|
3948
|
+
subcircuit_id: z182.string().optional(),
|
|
3873
3949
|
center: point,
|
|
3874
3950
|
width: length,
|
|
3875
3951
|
height: length,
|
|
3876
3952
|
layer: visible_layer,
|
|
3877
3953
|
ccw_rotation: rotation.optional(),
|
|
3878
|
-
color:
|
|
3954
|
+
color: z182.string().optional()
|
|
3879
3955
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
3880
3956
|
expectTypesMatch(true);
|
|
3881
3957
|
|
|
3882
3958
|
// src/pcb/pcb_courtyard_outline.ts
|
|
3883
|
-
import { z as
|
|
3884
|
-
var pcb_courtyard_outline =
|
|
3885
|
-
type:
|
|
3959
|
+
import { z as z183 } from "zod";
|
|
3960
|
+
var pcb_courtyard_outline = z183.object({
|
|
3961
|
+
type: z183.literal("pcb_courtyard_outline"),
|
|
3886
3962
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
3887
3963
|
"pcb_courtyard_outline"
|
|
3888
3964
|
),
|
|
3889
|
-
pcb_component_id:
|
|
3890
|
-
pcb_group_id:
|
|
3891
|
-
subcircuit_id:
|
|
3965
|
+
pcb_component_id: z183.string(),
|
|
3966
|
+
pcb_group_id: z183.string().optional(),
|
|
3967
|
+
subcircuit_id: z183.string().optional(),
|
|
3892
3968
|
layer: visible_layer,
|
|
3893
|
-
outline:
|
|
3969
|
+
outline: z183.array(point).min(2)
|
|
3894
3970
|
}).describe("Defines a courtyard outline on the PCB");
|
|
3895
3971
|
expectTypesMatch(true);
|
|
3896
3972
|
|
|
3897
3973
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
3898
|
-
import { z as
|
|
3899
|
-
var pcb_courtyard_polygon =
|
|
3900
|
-
type:
|
|
3974
|
+
import { z as z184 } from "zod";
|
|
3975
|
+
var pcb_courtyard_polygon = z184.object({
|
|
3976
|
+
type: z184.literal("pcb_courtyard_polygon"),
|
|
3901
3977
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
3902
3978
|
"pcb_courtyard_polygon"
|
|
3903
3979
|
),
|
|
3904
|
-
pcb_component_id:
|
|
3905
|
-
pcb_group_id:
|
|
3906
|
-
subcircuit_id:
|
|
3980
|
+
pcb_component_id: z184.string(),
|
|
3981
|
+
pcb_group_id: z184.string().optional(),
|
|
3982
|
+
subcircuit_id: z184.string().optional(),
|
|
3907
3983
|
layer: visible_layer,
|
|
3908
|
-
points:
|
|
3909
|
-
color:
|
|
3984
|
+
points: z184.array(point).min(3),
|
|
3985
|
+
color: z184.string().optional()
|
|
3910
3986
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
3911
3987
|
expectTypesMatch(true);
|
|
3912
3988
|
|
|
3913
3989
|
// src/pcb/pcb_courtyard_circle.ts
|
|
3914
|
-
import { z as
|
|
3915
|
-
var pcb_courtyard_circle =
|
|
3916
|
-
type:
|
|
3990
|
+
import { z as z185 } from "zod";
|
|
3991
|
+
var pcb_courtyard_circle = z185.object({
|
|
3992
|
+
type: z185.literal("pcb_courtyard_circle"),
|
|
3917
3993
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
3918
3994
|
"pcb_courtyard_circle"
|
|
3919
3995
|
),
|
|
3920
|
-
pcb_component_id:
|
|
3921
|
-
pcb_group_id:
|
|
3922
|
-
subcircuit_id:
|
|
3996
|
+
pcb_component_id: z185.string(),
|
|
3997
|
+
pcb_group_id: z185.string().optional(),
|
|
3998
|
+
subcircuit_id: z185.string().optional(),
|
|
3923
3999
|
center: point,
|
|
3924
4000
|
radius: length,
|
|
3925
4001
|
layer: visible_layer,
|
|
3926
|
-
color:
|
|
4002
|
+
color: z185.string().optional()
|
|
3927
4003
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3928
4004
|
expectTypesMatch(true);
|
|
3929
4005
|
|
|
3930
4006
|
// src/pcb/pcb_courtyard_pill.ts
|
|
3931
|
-
import { z as
|
|
3932
|
-
var pcb_courtyard_pill =
|
|
3933
|
-
type:
|
|
4007
|
+
import { z as z186 } from "zod";
|
|
4008
|
+
var pcb_courtyard_pill = z186.object({
|
|
4009
|
+
type: z186.literal("pcb_courtyard_pill"),
|
|
3934
4010
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
3935
|
-
pcb_component_id:
|
|
3936
|
-
pcb_group_id:
|
|
3937
|
-
subcircuit_id:
|
|
4011
|
+
pcb_component_id: z186.string(),
|
|
4012
|
+
pcb_group_id: z186.string().optional(),
|
|
4013
|
+
subcircuit_id: z186.string().optional(),
|
|
3938
4014
|
center: point,
|
|
3939
4015
|
width: length,
|
|
3940
4016
|
height: length,
|
|
3941
4017
|
radius: length,
|
|
3942
4018
|
layer: visible_layer,
|
|
3943
|
-
color:
|
|
4019
|
+
color: z186.string().optional()
|
|
3944
4020
|
}).describe("Defines a courtyard pill on the PCB");
|
|
3945
4021
|
expectTypesMatch(true);
|
|
3946
4022
|
|
|
3947
4023
|
// src/cad/cad_component.ts
|
|
3948
|
-
import { z as
|
|
4024
|
+
import { z as z187 } from "zod";
|
|
3949
4025
|
|
|
3950
4026
|
// src/cad/cad_model_conventions.ts
|
|
3951
4027
|
var cad_model_formats = [
|
|
@@ -3976,50 +4052,52 @@ var cadModelDefaultDirectionMap = {
|
|
|
3976
4052
|
};
|
|
3977
4053
|
|
|
3978
4054
|
// src/cad/cad_component.ts
|
|
3979
|
-
var cad_component =
|
|
3980
|
-
type:
|
|
3981
|
-
cad_component_id:
|
|
3982
|
-
pcb_component_id:
|
|
3983
|
-
|
|
4055
|
+
var cad_component = z187.object({
|
|
4056
|
+
type: z187.literal("cad_component"),
|
|
4057
|
+
cad_component_id: z187.string(),
|
|
4058
|
+
pcb_component_id: z187.string().optional().describe(
|
|
4059
|
+
"Optional PCB component reference; omit for CAD geometry without a PCB component"
|
|
4060
|
+
),
|
|
4061
|
+
source_component_id: z187.string(),
|
|
3984
4062
|
position: point3,
|
|
3985
4063
|
rotation: point3.optional(),
|
|
3986
4064
|
size: point3.optional(),
|
|
3987
4065
|
layer: layer_ref.optional(),
|
|
3988
|
-
subcircuit_id:
|
|
4066
|
+
subcircuit_id: z187.string().optional(),
|
|
3989
4067
|
// These are all ways to generate/load the 3d model
|
|
3990
|
-
footprinter_string:
|
|
3991
|
-
model_obj_url:
|
|
3992
|
-
model_stl_url:
|
|
3993
|
-
model_3mf_url:
|
|
3994
|
-
model_gltf_url:
|
|
3995
|
-
model_glb_url:
|
|
3996
|
-
model_step_url:
|
|
3997
|
-
model_wrl_url:
|
|
4068
|
+
footprinter_string: z187.string().optional(),
|
|
4069
|
+
model_obj_url: z187.string().optional(),
|
|
4070
|
+
model_stl_url: z187.string().optional(),
|
|
4071
|
+
model_3mf_url: z187.string().optional(),
|
|
4072
|
+
model_gltf_url: z187.string().optional(),
|
|
4073
|
+
model_glb_url: z187.string().optional(),
|
|
4074
|
+
model_step_url: z187.string().optional(),
|
|
4075
|
+
model_wrl_url: z187.string().optional(),
|
|
3998
4076
|
model_asset: asset.optional(),
|
|
3999
|
-
model_unit_to_mm_scale_factor:
|
|
4000
|
-
model_board_normal_direction:
|
|
4077
|
+
model_unit_to_mm_scale_factor: z187.number().optional(),
|
|
4078
|
+
model_board_normal_direction: z187.enum(cad_model_axis_directions).optional().describe(
|
|
4001
4079
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
4002
4080
|
),
|
|
4003
4081
|
model_origin_position: point3.optional(),
|
|
4004
|
-
model_origin_alignment:
|
|
4082
|
+
model_origin_alignment: z187.enum([
|
|
4005
4083
|
"unknown",
|
|
4006
4084
|
"center",
|
|
4007
4085
|
"center_of_component_on_board_surface",
|
|
4008
4086
|
"bottom_center_of_component"
|
|
4009
4087
|
]).optional(),
|
|
4010
|
-
model_object_fit:
|
|
4011
|
-
model_jscad:
|
|
4012
|
-
show_as_translucent_model:
|
|
4013
|
-
show_as_bounding_box:
|
|
4014
|
-
show_hidden_edges:
|
|
4015
|
-
anchor_alignment:
|
|
4016
|
-
}).describe("Defines
|
|
4088
|
+
model_object_fit: z187.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
4089
|
+
model_jscad: z187.any().optional(),
|
|
4090
|
+
show_as_translucent_model: z187.boolean().optional(),
|
|
4091
|
+
show_as_bounding_box: z187.boolean().optional(),
|
|
4092
|
+
show_hidden_edges: z187.boolean().optional(),
|
|
4093
|
+
anchor_alignment: z187.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
4094
|
+
}).describe("Defines CAD geometry, optionally associated with a PCB component");
|
|
4017
4095
|
expectTypesMatch(true);
|
|
4018
4096
|
|
|
4019
4097
|
// src/simulation/simulation_voltage_source.ts
|
|
4020
|
-
import { z as
|
|
4021
|
-
var wave_shape =
|
|
4022
|
-
var percentage =
|
|
4098
|
+
import { z as z188 } from "zod";
|
|
4099
|
+
var wave_shape = z188.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
4100
|
+
var percentage = z188.union([z188.string(), z188.number()]).transform((val) => {
|
|
4023
4101
|
if (typeof val === "string") {
|
|
4024
4102
|
if (val.endsWith("%")) {
|
|
4025
4103
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -4028,32 +4106,32 @@ var percentage = z186.union([z186.string(), z186.number()]).transform((val) => {
|
|
|
4028
4106
|
}
|
|
4029
4107
|
return val;
|
|
4030
4108
|
}).pipe(
|
|
4031
|
-
|
|
4109
|
+
z188.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
4032
4110
|
);
|
|
4033
|
-
var simulation_dc_voltage_source =
|
|
4034
|
-
type:
|
|
4111
|
+
var simulation_dc_voltage_source = z188.object({
|
|
4112
|
+
type: z188.literal("simulation_voltage_source"),
|
|
4035
4113
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
4036
4114
|
"simulation_voltage_source"
|
|
4037
4115
|
),
|
|
4038
|
-
is_dc_source:
|
|
4039
|
-
positive_source_port_id:
|
|
4040
|
-
negative_source_port_id:
|
|
4041
|
-
positive_source_net_id:
|
|
4042
|
-
negative_source_net_id:
|
|
4116
|
+
is_dc_source: z188.literal(true).optional().default(true),
|
|
4117
|
+
positive_source_port_id: z188.string().optional(),
|
|
4118
|
+
negative_source_port_id: z188.string().optional(),
|
|
4119
|
+
positive_source_net_id: z188.string().optional(),
|
|
4120
|
+
negative_source_net_id: z188.string().optional(),
|
|
4043
4121
|
voltage,
|
|
4044
4122
|
ac_magnitude: voltage.optional(),
|
|
4045
4123
|
ac_phase: rotation.optional()
|
|
4046
4124
|
}).describe("Defines a DC voltage source for simulation");
|
|
4047
|
-
var simulation_ac_voltage_source =
|
|
4048
|
-
type:
|
|
4125
|
+
var simulation_ac_voltage_source = z188.object({
|
|
4126
|
+
type: z188.literal("simulation_voltage_source"),
|
|
4049
4127
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
4050
4128
|
"simulation_voltage_source"
|
|
4051
4129
|
),
|
|
4052
|
-
is_dc_source:
|
|
4053
|
-
terminal1_source_port_id:
|
|
4054
|
-
terminal2_source_port_id:
|
|
4055
|
-
terminal1_source_net_id:
|
|
4056
|
-
terminal2_source_net_id:
|
|
4130
|
+
is_dc_source: z188.literal(false),
|
|
4131
|
+
terminal1_source_port_id: z188.string().optional(),
|
|
4132
|
+
terminal2_source_port_id: z188.string().optional(),
|
|
4133
|
+
terminal1_source_net_id: z188.string().optional(),
|
|
4134
|
+
terminal2_source_net_id: z188.string().optional(),
|
|
4057
4135
|
voltage: voltage.optional(),
|
|
4058
4136
|
frequency: frequency.optional(),
|
|
4059
4137
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -4068,14 +4146,14 @@ var simulation_ac_voltage_source = z186.object({
|
|
|
4068
4146
|
ac_magnitude: voltage.optional(),
|
|
4069
4147
|
ac_phase: rotation.optional()
|
|
4070
4148
|
}).describe("Defines an AC voltage source for simulation");
|
|
4071
|
-
var simulation_voltage_source =
|
|
4149
|
+
var simulation_voltage_source = z188.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
4072
4150
|
expectTypesMatch(true);
|
|
4073
4151
|
expectTypesMatch(true);
|
|
4074
4152
|
expectTypesMatch(true);
|
|
4075
4153
|
|
|
4076
4154
|
// src/simulation/simulation_current_source.ts
|
|
4077
|
-
import { z as
|
|
4078
|
-
var percentage2 =
|
|
4155
|
+
import { z as z189 } from "zod";
|
|
4156
|
+
var percentage2 = z189.union([z189.string(), z189.number()]).transform((val) => {
|
|
4079
4157
|
if (typeof val === "string") {
|
|
4080
4158
|
if (val.endsWith("%")) {
|
|
4081
4159
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -4084,32 +4162,32 @@ var percentage2 = z187.union([z187.string(), z187.number()]).transform((val) =>
|
|
|
4084
4162
|
}
|
|
4085
4163
|
return val;
|
|
4086
4164
|
}).pipe(
|
|
4087
|
-
|
|
4165
|
+
z189.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
4088
4166
|
);
|
|
4089
|
-
var simulation_dc_current_source =
|
|
4090
|
-
type:
|
|
4167
|
+
var simulation_dc_current_source = z189.object({
|
|
4168
|
+
type: z189.literal("simulation_current_source"),
|
|
4091
4169
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
4092
4170
|
"simulation_current_source"
|
|
4093
4171
|
),
|
|
4094
|
-
is_dc_source:
|
|
4095
|
-
positive_source_port_id:
|
|
4096
|
-
negative_source_port_id:
|
|
4097
|
-
positive_source_net_id:
|
|
4098
|
-
negative_source_net_id:
|
|
4172
|
+
is_dc_source: z189.literal(true).optional().default(true),
|
|
4173
|
+
positive_source_port_id: z189.string().optional(),
|
|
4174
|
+
negative_source_port_id: z189.string().optional(),
|
|
4175
|
+
positive_source_net_id: z189.string().optional(),
|
|
4176
|
+
negative_source_net_id: z189.string().optional(),
|
|
4099
4177
|
current,
|
|
4100
4178
|
ac_magnitude: current.optional(),
|
|
4101
4179
|
ac_phase: rotation.optional()
|
|
4102
4180
|
}).describe("Defines a DC current source for simulation");
|
|
4103
|
-
var simulation_ac_current_source =
|
|
4104
|
-
type:
|
|
4181
|
+
var simulation_ac_current_source = z189.object({
|
|
4182
|
+
type: z189.literal("simulation_current_source"),
|
|
4105
4183
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
4106
4184
|
"simulation_current_source"
|
|
4107
4185
|
),
|
|
4108
|
-
is_dc_source:
|
|
4109
|
-
terminal1_source_port_id:
|
|
4110
|
-
terminal2_source_port_id:
|
|
4111
|
-
terminal1_source_net_id:
|
|
4112
|
-
terminal2_source_net_id:
|
|
4186
|
+
is_dc_source: z189.literal(false),
|
|
4187
|
+
terminal1_source_port_id: z189.string().optional(),
|
|
4188
|
+
terminal2_source_port_id: z189.string().optional(),
|
|
4189
|
+
terminal1_source_net_id: z189.string().optional(),
|
|
4190
|
+
terminal2_source_net_id: z189.string().optional(),
|
|
4113
4191
|
current: current.optional(),
|
|
4114
4192
|
frequency: frequency.optional(),
|
|
4115
4193
|
peak_to_peak_current: current.optional(),
|
|
@@ -4119,58 +4197,58 @@ var simulation_ac_current_source = z187.object({
|
|
|
4119
4197
|
ac_magnitude: current.optional(),
|
|
4120
4198
|
ac_phase: rotation.optional()
|
|
4121
4199
|
}).describe("Defines an AC current source for simulation");
|
|
4122
|
-
var simulation_current_source =
|
|
4200
|
+
var simulation_current_source = z189.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
4123
4201
|
expectTypesMatch(true);
|
|
4124
4202
|
expectTypesMatch(true);
|
|
4125
4203
|
expectTypesMatch(true);
|
|
4126
4204
|
|
|
4127
4205
|
// src/simulation/simulation_experiment.ts
|
|
4128
|
-
import { z as
|
|
4206
|
+
import { z as z191 } from "zod";
|
|
4129
4207
|
|
|
4130
4208
|
// src/simulation/simulation_units.ts
|
|
4131
|
-
import { z as
|
|
4132
|
-
var simulation_dc_sweep_unit =
|
|
4209
|
+
import { z as z190 } from "zod";
|
|
4210
|
+
var simulation_dc_sweep_unit = z190.custom(
|
|
4133
4211
|
(dcSweepUnit) => dcSweepUnit === "V" || dcSweepUnit === "A"
|
|
4134
4212
|
);
|
|
4135
|
-
var simulation_parameter_unit =
|
|
4213
|
+
var simulation_parameter_unit = z190.custom(
|
|
4136
4214
|
(parameterUnit) => parameterUnit === "\u03A9" || parameterUnit === "F" || parameterUnit === "H" || parameterUnit === "V" || parameterUnit === "A"
|
|
4137
4215
|
);
|
|
4138
4216
|
|
|
4139
4217
|
// src/simulation/simulation_experiment.ts
|
|
4140
|
-
var experiment_type =
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4218
|
+
var experiment_type = z191.union([
|
|
4219
|
+
z191.literal("spice_dc_sweep"),
|
|
4220
|
+
z191.literal("spice_dc_operating_point"),
|
|
4221
|
+
z191.literal("spice_transient_analysis"),
|
|
4222
|
+
z191.literal("spice_ac_analysis")
|
|
4145
4223
|
]);
|
|
4146
|
-
var spice_simulation_options =
|
|
4147
|
-
method:
|
|
4148
|
-
reltol:
|
|
4149
|
-
abstol:
|
|
4150
|
-
vntol:
|
|
4224
|
+
var spice_simulation_options = z191.object({
|
|
4225
|
+
method: z191.enum(["trap", "gear"]).optional(),
|
|
4226
|
+
reltol: z191.union([z191.number(), z191.string()]).optional(),
|
|
4227
|
+
abstol: z191.union([z191.number(), z191.string()]).optional(),
|
|
4228
|
+
vntol: z191.union([z191.number(), z191.string()]).optional()
|
|
4151
4229
|
}).describe("SPICE solver options for a simulation experiment");
|
|
4152
|
-
var simulation_experiment =
|
|
4153
|
-
type:
|
|
4230
|
+
var simulation_experiment = z191.object({
|
|
4231
|
+
type: z191.literal("simulation_experiment"),
|
|
4154
4232
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
4155
4233
|
"simulation_experiment"
|
|
4156
4234
|
),
|
|
4157
|
-
name:
|
|
4235
|
+
name: z191.string(),
|
|
4158
4236
|
experiment_type,
|
|
4159
4237
|
time_per_step: duration_ms.optional(),
|
|
4160
4238
|
start_time_ms: ms.optional(),
|
|
4161
4239
|
end_time_ms: ms.optional(),
|
|
4162
4240
|
spice_options: spice_simulation_options.optional(),
|
|
4163
|
-
dc_sweep_voltage_source_id:
|
|
4164
|
-
dc_sweep_current_source_id:
|
|
4165
|
-
dc_sweep_start:
|
|
4166
|
-
dc_sweep_stop:
|
|
4167
|
-
dc_sweep_step:
|
|
4241
|
+
dc_sweep_voltage_source_id: z191.string().optional(),
|
|
4242
|
+
dc_sweep_current_source_id: z191.string().optional(),
|
|
4243
|
+
dc_sweep_start: z191.number().optional(),
|
|
4244
|
+
dc_sweep_stop: z191.number().optional(),
|
|
4245
|
+
dc_sweep_step: z191.number().refine((dcSweepStep) => dcSweepStep !== 0).optional(),
|
|
4168
4246
|
dc_sweep_unit: simulation_dc_sweep_unit.optional(),
|
|
4169
|
-
ac_sweep_type:
|
|
4170
|
-
ac_samples_per_interval:
|
|
4171
|
-
ac_sample_count:
|
|
4172
|
-
ac_start_frequency_hz:
|
|
4173
|
-
ac_stop_frequency_hz:
|
|
4247
|
+
ac_sweep_type: z191.enum(["linear", "decade", "octave"]).optional(),
|
|
4248
|
+
ac_samples_per_interval: z191.number().int().positive().optional(),
|
|
4249
|
+
ac_sample_count: z191.number().int().positive().optional(),
|
|
4250
|
+
ac_start_frequency_hz: z191.number().positive().optional(),
|
|
4251
|
+
ac_stop_frequency_hz: z191.number().positive().optional()
|
|
4174
4252
|
}).superRefine((experiment, context) => {
|
|
4175
4253
|
if (experiment.experiment_type === "spice_dc_sweep") {
|
|
4176
4254
|
const requiredFields = [
|
|
@@ -4182,7 +4260,7 @@ var simulation_experiment = z189.object({
|
|
|
4182
4260
|
for (const field of requiredFields) {
|
|
4183
4261
|
if (experiment[field] === void 0) {
|
|
4184
4262
|
context.addIssue({
|
|
4185
|
-
code:
|
|
4263
|
+
code: z191.ZodIssueCode.custom,
|
|
4186
4264
|
path: [field],
|
|
4187
4265
|
message: `${field} is required for a DC sweep`
|
|
4188
4266
|
});
|
|
@@ -4192,7 +4270,7 @@ var simulation_experiment = z189.object({
|
|
|
4192
4270
|
const hasCurrentSource = experiment.dc_sweep_current_source_id !== void 0;
|
|
4193
4271
|
if (hasVoltageSource === hasCurrentSource) {
|
|
4194
4272
|
context.addIssue({
|
|
4195
|
-
code:
|
|
4273
|
+
code: z191.ZodIssueCode.custom,
|
|
4196
4274
|
path: ["dc_sweep_voltage_source_id"],
|
|
4197
4275
|
message: "Exactly one DC sweep voltage or current source ID is required"
|
|
4198
4276
|
});
|
|
@@ -4201,35 +4279,35 @@ var simulation_experiment = z189.object({
|
|
|
4201
4279
|
if (experiment.experiment_type === "spice_ac_analysis") {
|
|
4202
4280
|
if (experiment.ac_sweep_type === void 0) {
|
|
4203
4281
|
context.addIssue({
|
|
4204
|
-
code:
|
|
4282
|
+
code: z191.ZodIssueCode.custom,
|
|
4205
4283
|
path: ["ac_sweep_type"],
|
|
4206
4284
|
message: "ac_sweep_type is required for an AC analysis"
|
|
4207
4285
|
});
|
|
4208
4286
|
}
|
|
4209
4287
|
if (experiment.ac_start_frequency_hz === void 0) {
|
|
4210
4288
|
context.addIssue({
|
|
4211
|
-
code:
|
|
4289
|
+
code: z191.ZodIssueCode.custom,
|
|
4212
4290
|
path: ["ac_start_frequency_hz"],
|
|
4213
4291
|
message: "ac_start_frequency_hz is required for an AC analysis"
|
|
4214
4292
|
});
|
|
4215
4293
|
}
|
|
4216
4294
|
if (experiment.ac_stop_frequency_hz === void 0) {
|
|
4217
4295
|
context.addIssue({
|
|
4218
|
-
code:
|
|
4296
|
+
code: z191.ZodIssueCode.custom,
|
|
4219
4297
|
path: ["ac_stop_frequency_hz"],
|
|
4220
4298
|
message: "ac_stop_frequency_hz is required for an AC analysis"
|
|
4221
4299
|
});
|
|
4222
4300
|
}
|
|
4223
4301
|
if (experiment.ac_sweep_type === "linear" && experiment.ac_sample_count === void 0) {
|
|
4224
4302
|
context.addIssue({
|
|
4225
|
-
code:
|
|
4303
|
+
code: z191.ZodIssueCode.custom,
|
|
4226
4304
|
path: ["ac_sample_count"],
|
|
4227
4305
|
message: "ac_sample_count is required for a linear AC analysis"
|
|
4228
4306
|
});
|
|
4229
4307
|
}
|
|
4230
4308
|
if ((experiment.ac_sweep_type === "decade" || experiment.ac_sweep_type === "octave") && experiment.ac_samples_per_interval === void 0) {
|
|
4231
4309
|
context.addIssue({
|
|
4232
|
-
code:
|
|
4310
|
+
code: z191.ZodIssueCode.custom,
|
|
4233
4311
|
path: ["ac_samples_per_interval"],
|
|
4234
4312
|
message: "ac_samples_per_interval is required for decade and octave AC analyses"
|
|
4235
4313
|
});
|
|
@@ -4239,87 +4317,87 @@ var simulation_experiment = z189.object({
|
|
|
4239
4317
|
expectTypesMatch(true);
|
|
4240
4318
|
|
|
4241
4319
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
4242
|
-
import { z as
|
|
4320
|
+
import { z as z193 } from "zod";
|
|
4243
4321
|
|
|
4244
4322
|
// src/simulation/simulation_parameter_sweep_coordinate.ts
|
|
4245
|
-
import { z as
|
|
4246
|
-
var simulation_parameter_sweep_coordinate =
|
|
4247
|
-
simulation_parameter_sweep_id:
|
|
4248
|
-
sweep_index:
|
|
4249
|
-
parameter_value:
|
|
4323
|
+
import { z as z192 } from "zod";
|
|
4324
|
+
var simulation_parameter_sweep_coordinate = z192.object({
|
|
4325
|
+
simulation_parameter_sweep_id: z192.string(),
|
|
4326
|
+
sweep_index: z192.number().int().nonnegative(),
|
|
4327
|
+
parameter_value: z192.number(),
|
|
4250
4328
|
parameter_unit: simulation_parameter_unit
|
|
4251
4329
|
});
|
|
4252
4330
|
expectTypesMatch(true);
|
|
4253
4331
|
|
|
4254
4332
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
4255
|
-
var simulation_transient_voltage_graph =
|
|
4256
|
-
type:
|
|
4333
|
+
var simulation_transient_voltage_graph = z193.object({
|
|
4334
|
+
type: z193.literal("simulation_transient_voltage_graph"),
|
|
4257
4335
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4258
4336
|
"simulation_transient_voltage_graph"
|
|
4259
4337
|
),
|
|
4260
|
-
simulation_experiment_id:
|
|
4338
|
+
simulation_experiment_id: z193.string(),
|
|
4261
4339
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4262
|
-
timestamps_ms:
|
|
4263
|
-
voltage_levels:
|
|
4264
|
-
source_component_id:
|
|
4265
|
-
subcircuit_connectivity_map_key:
|
|
4340
|
+
timestamps_ms: z193.array(z193.number()).optional(),
|
|
4341
|
+
voltage_levels: z193.array(z193.number()),
|
|
4342
|
+
source_component_id: z193.string().optional(),
|
|
4343
|
+
subcircuit_connectivity_map_key: z193.string().optional(),
|
|
4266
4344
|
time_per_step: duration_ms,
|
|
4267
4345
|
start_time_ms: ms,
|
|
4268
4346
|
end_time_ms: ms,
|
|
4269
|
-
name:
|
|
4270
|
-
color:
|
|
4347
|
+
name: z193.string().optional(),
|
|
4348
|
+
color: z193.string().optional()
|
|
4271
4349
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
4272
4350
|
expectTypesMatch(true);
|
|
4273
4351
|
|
|
4274
4352
|
// src/simulation/simulation_transient_current_graph.ts
|
|
4275
|
-
import { z as
|
|
4276
|
-
var simulation_transient_current_graph =
|
|
4277
|
-
type:
|
|
4353
|
+
import { z as z194 } from "zod";
|
|
4354
|
+
var simulation_transient_current_graph = z194.object({
|
|
4355
|
+
type: z194.literal("simulation_transient_current_graph"),
|
|
4278
4356
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4279
4357
|
"simulation_transient_current_graph"
|
|
4280
4358
|
),
|
|
4281
|
-
simulation_experiment_id:
|
|
4359
|
+
simulation_experiment_id: z194.string(),
|
|
4282
4360
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4283
|
-
timestamps_ms:
|
|
4284
|
-
current_levels:
|
|
4285
|
-
source_component_id:
|
|
4286
|
-
subcircuit_connectivity_map_key:
|
|
4361
|
+
timestamps_ms: z194.array(z194.number()).optional(),
|
|
4362
|
+
current_levels: z194.array(z194.number()),
|
|
4363
|
+
source_component_id: z194.string().optional(),
|
|
4364
|
+
subcircuit_connectivity_map_key: z194.string().optional(),
|
|
4287
4365
|
time_per_step: duration_ms,
|
|
4288
4366
|
start_time_ms: ms,
|
|
4289
4367
|
end_time_ms: ms,
|
|
4290
|
-
name:
|
|
4291
|
-
color:
|
|
4368
|
+
name: z194.string().optional(),
|
|
4369
|
+
color: z194.string().optional()
|
|
4292
4370
|
}).describe("Stores current measurements over time for a simulation");
|
|
4293
4371
|
expectTypesMatch(true);
|
|
4294
4372
|
|
|
4295
4373
|
// src/simulation/simulation_switch.ts
|
|
4296
|
-
import { z as
|
|
4297
|
-
var simulation_switch =
|
|
4298
|
-
type:
|
|
4374
|
+
import { z as z195 } from "zod";
|
|
4375
|
+
var simulation_switch = z195.object({
|
|
4376
|
+
type: z195.literal("simulation_switch"),
|
|
4299
4377
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
4300
|
-
source_component_id:
|
|
4378
|
+
source_component_id: z195.string().optional(),
|
|
4301
4379
|
closes_at: ms.optional(),
|
|
4302
4380
|
opens_at: ms.optional(),
|
|
4303
|
-
starts_closed:
|
|
4381
|
+
starts_closed: z195.boolean().optional(),
|
|
4304
4382
|
switching_frequency: frequency.optional()
|
|
4305
4383
|
}).describe("Defines a switch for simulation timing control");
|
|
4306
4384
|
expectTypesMatch(true);
|
|
4307
4385
|
|
|
4308
4386
|
// src/simulation/simulation_voltage_probe.ts
|
|
4309
|
-
import { z as
|
|
4310
|
-
var simulation_voltage_probe =
|
|
4311
|
-
type:
|
|
4387
|
+
import { z as z196 } from "zod";
|
|
4388
|
+
var simulation_voltage_probe = z196.object({
|
|
4389
|
+
type: z196.literal("simulation_voltage_probe"),
|
|
4312
4390
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
4313
4391
|
"simulation_voltage_probe"
|
|
4314
4392
|
),
|
|
4315
|
-
source_component_id:
|
|
4316
|
-
name:
|
|
4317
|
-
signal_input_source_port_id:
|
|
4318
|
-
signal_input_source_net_id:
|
|
4319
|
-
reference_input_source_port_id:
|
|
4320
|
-
reference_input_source_net_id:
|
|
4321
|
-
subcircuit_id:
|
|
4322
|
-
color:
|
|
4393
|
+
source_component_id: z196.string().optional(),
|
|
4394
|
+
name: z196.string().optional(),
|
|
4395
|
+
signal_input_source_port_id: z196.string().optional(),
|
|
4396
|
+
signal_input_source_net_id: z196.string().optional(),
|
|
4397
|
+
reference_input_source_port_id: z196.string().optional(),
|
|
4398
|
+
reference_input_source_net_id: z196.string().optional(),
|
|
4399
|
+
subcircuit_id: z196.string().optional(),
|
|
4400
|
+
color: z196.string().optional()
|
|
4323
4401
|
}).describe(
|
|
4324
4402
|
"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."
|
|
4325
4403
|
).superRefine((data, ctx) => {
|
|
@@ -4329,20 +4407,20 @@ var simulation_voltage_probe = z194.object({
|
|
|
4329
4407
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
4330
4408
|
if (has_ports && has_nets) {
|
|
4331
4409
|
ctx.addIssue({
|
|
4332
|
-
code:
|
|
4410
|
+
code: z196.ZodIssueCode.custom,
|
|
4333
4411
|
message: "Cannot mix port and net connections in a differential probe."
|
|
4334
4412
|
});
|
|
4335
4413
|
} else if (has_ports) {
|
|
4336
4414
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
4337
4415
|
ctx.addIssue({
|
|
4338
|
-
code:
|
|
4416
|
+
code: z196.ZodIssueCode.custom,
|
|
4339
4417
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
4340
4418
|
});
|
|
4341
4419
|
}
|
|
4342
4420
|
} else if (has_nets) {
|
|
4343
4421
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
4344
4422
|
ctx.addIssue({
|
|
4345
|
-
code:
|
|
4423
|
+
code: z196.ZodIssueCode.custom,
|
|
4346
4424
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
4347
4425
|
});
|
|
4348
4426
|
}
|
|
@@ -4350,7 +4428,7 @@ var simulation_voltage_probe = z194.object({
|
|
|
4350
4428
|
} else {
|
|
4351
4429
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
4352
4430
|
ctx.addIssue({
|
|
4353
|
-
code:
|
|
4431
|
+
code: z196.ZodIssueCode.custom,
|
|
4354
4432
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
4355
4433
|
});
|
|
4356
4434
|
}
|
|
@@ -4359,20 +4437,20 @@ var simulation_voltage_probe = z194.object({
|
|
|
4359
4437
|
expectTypesMatch(true);
|
|
4360
4438
|
|
|
4361
4439
|
// src/simulation/simulation_current_probe.ts
|
|
4362
|
-
import { z as
|
|
4363
|
-
var simulation_current_probe =
|
|
4364
|
-
type:
|
|
4440
|
+
import { z as z197 } from "zod";
|
|
4441
|
+
var simulation_current_probe = z197.object({
|
|
4442
|
+
type: z197.literal("simulation_current_probe"),
|
|
4365
4443
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
4366
4444
|
"simulation_current_probe"
|
|
4367
4445
|
),
|
|
4368
|
-
source_component_id:
|
|
4369
|
-
name:
|
|
4370
|
-
positive_source_port_id:
|
|
4371
|
-
negative_source_port_id:
|
|
4372
|
-
positive_source_net_id:
|
|
4373
|
-
negative_source_net_id:
|
|
4374
|
-
subcircuit_id:
|
|
4375
|
-
color:
|
|
4446
|
+
source_component_id: z197.string().optional(),
|
|
4447
|
+
name: z197.string().optional(),
|
|
4448
|
+
positive_source_port_id: z197.string().optional(),
|
|
4449
|
+
negative_source_port_id: z197.string().optional(),
|
|
4450
|
+
positive_source_net_id: z197.string().optional(),
|
|
4451
|
+
negative_source_net_id: z197.string().optional(),
|
|
4452
|
+
subcircuit_id: z197.string().optional(),
|
|
4453
|
+
color: z197.string().optional()
|
|
4376
4454
|
}).describe(
|
|
4377
4455
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
4378
4456
|
).superRefine((data, ctx) => {
|
|
@@ -4384,7 +4462,7 @@ var simulation_current_probe = z195.object({
|
|
|
4384
4462
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
4385
4463
|
if (hasPorts && hasNets) {
|
|
4386
4464
|
ctx.addIssue({
|
|
4387
|
-
code:
|
|
4465
|
+
code: z197.ZodIssueCode.custom,
|
|
4388
4466
|
message: "Cannot mix port and net connections in a current probe."
|
|
4389
4467
|
});
|
|
4390
4468
|
return;
|
|
@@ -4392,7 +4470,7 @@ var simulation_current_probe = z195.object({
|
|
|
4392
4470
|
if (hasPorts) {
|
|
4393
4471
|
if (!hasPositivePort || !hasNegativePort) {
|
|
4394
4472
|
ctx.addIssue({
|
|
4395
|
-
code:
|
|
4473
|
+
code: z197.ZodIssueCode.custom,
|
|
4396
4474
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
4397
4475
|
});
|
|
4398
4476
|
}
|
|
@@ -4401,71 +4479,71 @@ var simulation_current_probe = z195.object({
|
|
|
4401
4479
|
if (hasNets) {
|
|
4402
4480
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
4403
4481
|
ctx.addIssue({
|
|
4404
|
-
code:
|
|
4482
|
+
code: z197.ZodIssueCode.custom,
|
|
4405
4483
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
4406
4484
|
});
|
|
4407
4485
|
}
|
|
4408
4486
|
return;
|
|
4409
4487
|
}
|
|
4410
4488
|
ctx.addIssue({
|
|
4411
|
-
code:
|
|
4489
|
+
code: z197.ZodIssueCode.custom,
|
|
4412
4490
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
4413
4491
|
});
|
|
4414
4492
|
});
|
|
4415
4493
|
expectTypesMatch(true);
|
|
4416
4494
|
|
|
4417
4495
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
4418
|
-
import { z as
|
|
4496
|
+
import { z as z198 } from "zod";
|
|
4419
4497
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
4420
|
-
type:
|
|
4498
|
+
type: z198.literal("simulation_unknown_experiment_error"),
|
|
4421
4499
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
4422
4500
|
"simulation_unknown_experiment_error"
|
|
4423
4501
|
),
|
|
4424
|
-
error_type:
|
|
4425
|
-
simulation_experiment_id:
|
|
4426
|
-
subcircuit_id:
|
|
4502
|
+
error_type: z198.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
4503
|
+
simulation_experiment_id: z198.string().optional(),
|
|
4504
|
+
subcircuit_id: z198.string().optional()
|
|
4427
4505
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
4428
4506
|
expectTypesMatch(true);
|
|
4429
4507
|
|
|
4430
4508
|
// src/simulation/simulation_parameter_sweep.ts
|
|
4431
|
-
import { z as
|
|
4432
|
-
var simulation_parameter_type =
|
|
4509
|
+
import { z as z199 } from "zod";
|
|
4510
|
+
var simulation_parameter_type = z199.enum([
|
|
4433
4511
|
"resistance",
|
|
4434
4512
|
"capacitance",
|
|
4435
4513
|
"inductance",
|
|
4436
4514
|
"voltage",
|
|
4437
4515
|
"current"
|
|
4438
4516
|
]);
|
|
4439
|
-
var simulation_parameter_sweep_base =
|
|
4440
|
-
type:
|
|
4517
|
+
var simulation_parameter_sweep_base = z199.object({
|
|
4518
|
+
type: z199.literal("simulation_parameter_sweep"),
|
|
4441
4519
|
simulation_parameter_sweep_id: getZodPrefixedIdWithDefault(
|
|
4442
4520
|
"simulation_parameter_sweep"
|
|
4443
4521
|
),
|
|
4444
|
-
simulation_experiment_id:
|
|
4445
|
-
name:
|
|
4446
|
-
parameter_values:
|
|
4522
|
+
simulation_experiment_id: z199.string(),
|
|
4523
|
+
name: z199.string().optional(),
|
|
4524
|
+
parameter_values: z199.array(z199.number()).min(1),
|
|
4447
4525
|
parameter_unit: simulation_parameter_unit
|
|
4448
4526
|
});
|
|
4449
|
-
var simulation_parameter_sweep =
|
|
4527
|
+
var simulation_parameter_sweep = z199.discriminatedUnion("parameter_type", [
|
|
4450
4528
|
simulation_parameter_sweep_base.extend({
|
|
4451
|
-
parameter_type:
|
|
4452
|
-
resistor_source_component_id:
|
|
4529
|
+
parameter_type: z199.literal("resistance"),
|
|
4530
|
+
resistor_source_component_id: z199.string()
|
|
4453
4531
|
}),
|
|
4454
4532
|
simulation_parameter_sweep_base.extend({
|
|
4455
|
-
parameter_type:
|
|
4456
|
-
capacitor_source_component_id:
|
|
4533
|
+
parameter_type: z199.literal("capacitance"),
|
|
4534
|
+
capacitor_source_component_id: z199.string()
|
|
4457
4535
|
}),
|
|
4458
4536
|
simulation_parameter_sweep_base.extend({
|
|
4459
|
-
parameter_type:
|
|
4460
|
-
inductor_source_component_id:
|
|
4537
|
+
parameter_type: z199.literal("inductance"),
|
|
4538
|
+
inductor_source_component_id: z199.string()
|
|
4461
4539
|
}),
|
|
4462
4540
|
simulation_parameter_sweep_base.extend({
|
|
4463
|
-
parameter_type:
|
|
4464
|
-
source_net_id:
|
|
4541
|
+
parameter_type: z199.literal("voltage"),
|
|
4542
|
+
source_net_id: z199.string()
|
|
4465
4543
|
}),
|
|
4466
4544
|
simulation_parameter_sweep_base.extend({
|
|
4467
|
-
parameter_type:
|
|
4468
|
-
current_source_component_id:
|
|
4545
|
+
parameter_type: z199.literal("current"),
|
|
4546
|
+
current_source_component_id: z199.string()
|
|
4469
4547
|
})
|
|
4470
4548
|
]).describe("Repeats a simulation experiment over component parameter values");
|
|
4471
4549
|
expectTypesMatch(
|
|
@@ -4473,52 +4551,52 @@ expectTypesMatch(
|
|
|
4473
4551
|
);
|
|
4474
4552
|
|
|
4475
4553
|
// src/simulation/simulation_dc_operating_point_voltage.ts
|
|
4476
|
-
import { z as
|
|
4477
|
-
var simulation_dc_operating_point_voltage =
|
|
4478
|
-
type:
|
|
4554
|
+
import { z as z200 } from "zod";
|
|
4555
|
+
var simulation_dc_operating_point_voltage = z200.object({
|
|
4556
|
+
type: z200.literal("simulation_dc_operating_point_voltage"),
|
|
4479
4557
|
simulation_dc_operating_point_voltage_id: getZodPrefixedIdWithDefault(
|
|
4480
4558
|
"simulation_dc_operating_point_voltage"
|
|
4481
4559
|
),
|
|
4482
|
-
simulation_experiment_id:
|
|
4560
|
+
simulation_experiment_id: z200.string(),
|
|
4483
4561
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4484
|
-
simulation_voltage_probe_id:
|
|
4485
|
-
voltage:
|
|
4486
|
-
name:
|
|
4487
|
-
color:
|
|
4562
|
+
simulation_voltage_probe_id: z200.string(),
|
|
4563
|
+
voltage: z200.number(),
|
|
4564
|
+
name: z200.string().optional(),
|
|
4565
|
+
color: z200.string().optional()
|
|
4488
4566
|
});
|
|
4489
4567
|
expectTypesMatch(true);
|
|
4490
4568
|
|
|
4491
4569
|
// src/simulation/simulation_dc_operating_point_current.ts
|
|
4492
|
-
import { z as
|
|
4493
|
-
var simulation_dc_operating_point_current =
|
|
4494
|
-
type:
|
|
4570
|
+
import { z as z201 } from "zod";
|
|
4571
|
+
var simulation_dc_operating_point_current = z201.object({
|
|
4572
|
+
type: z201.literal("simulation_dc_operating_point_current"),
|
|
4495
4573
|
simulation_dc_operating_point_current_id: getZodPrefixedIdWithDefault(
|
|
4496
4574
|
"simulation_dc_operating_point_current"
|
|
4497
4575
|
),
|
|
4498
|
-
simulation_experiment_id:
|
|
4576
|
+
simulation_experiment_id: z201.string(),
|
|
4499
4577
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4500
|
-
simulation_current_probe_id:
|
|
4501
|
-
current:
|
|
4502
|
-
name:
|
|
4503
|
-
color:
|
|
4578
|
+
simulation_current_probe_id: z201.string(),
|
|
4579
|
+
current: z201.number(),
|
|
4580
|
+
name: z201.string().optional(),
|
|
4581
|
+
color: z201.string().optional()
|
|
4504
4582
|
});
|
|
4505
4583
|
expectTypesMatch(true);
|
|
4506
4584
|
|
|
4507
4585
|
// src/simulation/simulation_dc_sweep_voltage_graph.ts
|
|
4508
|
-
import { z as
|
|
4509
|
-
var simulation_dc_sweep_voltage_graph =
|
|
4510
|
-
type:
|
|
4586
|
+
import { z as z202 } from "zod";
|
|
4587
|
+
var simulation_dc_sweep_voltage_graph = z202.object({
|
|
4588
|
+
type: z202.literal("simulation_dc_sweep_voltage_graph"),
|
|
4511
4589
|
simulation_dc_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4512
4590
|
"simulation_dc_sweep_voltage_graph"
|
|
4513
4591
|
),
|
|
4514
|
-
simulation_experiment_id:
|
|
4592
|
+
simulation_experiment_id: z202.string(),
|
|
4515
4593
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4516
|
-
simulation_voltage_probe_id:
|
|
4517
|
-
sweep_values:
|
|
4594
|
+
simulation_voltage_probe_id: z202.string(),
|
|
4595
|
+
sweep_values: z202.array(z202.number()),
|
|
4518
4596
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4519
|
-
voltage_levels:
|
|
4520
|
-
name:
|
|
4521
|
-
color:
|
|
4597
|
+
voltage_levels: z202.array(z202.number()),
|
|
4598
|
+
name: z202.string().optional(),
|
|
4599
|
+
color: z202.string().optional()
|
|
4522
4600
|
}).refine(
|
|
4523
4601
|
(graph) => graph.sweep_values.length === graph.voltage_levels.length,
|
|
4524
4602
|
{
|
|
@@ -4528,20 +4606,20 @@ var simulation_dc_sweep_voltage_graph = z200.object({
|
|
|
4528
4606
|
expectTypesMatch(true);
|
|
4529
4607
|
|
|
4530
4608
|
// src/simulation/simulation_dc_sweep_current_graph.ts
|
|
4531
|
-
import { z as
|
|
4532
|
-
var simulation_dc_sweep_current_graph =
|
|
4533
|
-
type:
|
|
4609
|
+
import { z as z203 } from "zod";
|
|
4610
|
+
var simulation_dc_sweep_current_graph = z203.object({
|
|
4611
|
+
type: z203.literal("simulation_dc_sweep_current_graph"),
|
|
4534
4612
|
simulation_dc_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4535
4613
|
"simulation_dc_sweep_current_graph"
|
|
4536
4614
|
),
|
|
4537
|
-
simulation_experiment_id:
|
|
4615
|
+
simulation_experiment_id: z203.string(),
|
|
4538
4616
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4539
|
-
simulation_current_probe_id:
|
|
4540
|
-
sweep_values:
|
|
4617
|
+
simulation_current_probe_id: z203.string(),
|
|
4618
|
+
sweep_values: z203.array(z203.number()),
|
|
4541
4619
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4542
|
-
current_levels:
|
|
4543
|
-
name:
|
|
4544
|
-
color:
|
|
4620
|
+
current_levels: z203.array(z203.number()),
|
|
4621
|
+
name: z203.string().optional(),
|
|
4622
|
+
color: z203.string().optional()
|
|
4545
4623
|
}).refine(
|
|
4546
4624
|
(graph) => graph.sweep_values.length === graph.current_levels.length,
|
|
4547
4625
|
{
|
|
@@ -4551,29 +4629,29 @@ var simulation_dc_sweep_current_graph = z201.object({
|
|
|
4551
4629
|
expectTypesMatch(true);
|
|
4552
4630
|
|
|
4553
4631
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4554
|
-
import { z as
|
|
4632
|
+
import { z as z205 } from "zod";
|
|
4555
4633
|
|
|
4556
4634
|
// src/simulation/simulation_complex_sample.ts
|
|
4557
|
-
import { z as
|
|
4558
|
-
var simulation_complex_sample =
|
|
4559
|
-
re:
|
|
4560
|
-
im:
|
|
4635
|
+
import { z as z204 } from "zod";
|
|
4636
|
+
var simulation_complex_sample = z204.object({
|
|
4637
|
+
re: z204.number(),
|
|
4638
|
+
im: z204.number()
|
|
4561
4639
|
});
|
|
4562
4640
|
expectTypesMatch(true);
|
|
4563
4641
|
|
|
4564
4642
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4565
|
-
var simulation_ac_sweep_voltage_graph =
|
|
4566
|
-
type:
|
|
4643
|
+
var simulation_ac_sweep_voltage_graph = z205.object({
|
|
4644
|
+
type: z205.literal("simulation_ac_sweep_voltage_graph"),
|
|
4567
4645
|
simulation_ac_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4568
4646
|
"simulation_ac_sweep_voltage_graph"
|
|
4569
4647
|
),
|
|
4570
|
-
simulation_experiment_id:
|
|
4648
|
+
simulation_experiment_id: z205.string(),
|
|
4571
4649
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4572
|
-
simulation_voltage_probe_id:
|
|
4573
|
-
frequencies_hz:
|
|
4574
|
-
complex_voltages:
|
|
4575
|
-
name:
|
|
4576
|
-
color:
|
|
4650
|
+
simulation_voltage_probe_id: z205.string(),
|
|
4651
|
+
frequencies_hz: z205.array(z205.number()),
|
|
4652
|
+
complex_voltages: z205.array(simulation_complex_sample),
|
|
4653
|
+
name: z205.string().optional(),
|
|
4654
|
+
color: z205.string().optional()
|
|
4577
4655
|
}).refine(
|
|
4578
4656
|
(graph) => graph.frequencies_hz.length === graph.complex_voltages.length,
|
|
4579
4657
|
{
|
|
@@ -4583,19 +4661,19 @@ var simulation_ac_sweep_voltage_graph = z203.object({
|
|
|
4583
4661
|
expectTypesMatch(true);
|
|
4584
4662
|
|
|
4585
4663
|
// src/simulation/simulation_ac_sweep_current_graph.ts
|
|
4586
|
-
import { z as
|
|
4587
|
-
var simulation_ac_sweep_current_graph =
|
|
4588
|
-
type:
|
|
4664
|
+
import { z as z206 } from "zod";
|
|
4665
|
+
var simulation_ac_sweep_current_graph = z206.object({
|
|
4666
|
+
type: z206.literal("simulation_ac_sweep_current_graph"),
|
|
4589
4667
|
simulation_ac_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4590
4668
|
"simulation_ac_sweep_current_graph"
|
|
4591
4669
|
),
|
|
4592
|
-
simulation_experiment_id:
|
|
4670
|
+
simulation_experiment_id: z206.string(),
|
|
4593
4671
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4594
|
-
simulation_current_probe_id:
|
|
4595
|
-
frequencies_hz:
|
|
4596
|
-
complex_currents:
|
|
4597
|
-
name:
|
|
4598
|
-
color:
|
|
4672
|
+
simulation_current_probe_id: z206.string(),
|
|
4673
|
+
frequencies_hz: z206.array(z206.number()),
|
|
4674
|
+
complex_currents: z206.array(simulation_complex_sample),
|
|
4675
|
+
name: z206.string().optional(),
|
|
4676
|
+
color: z206.string().optional()
|
|
4599
4677
|
}).refine(
|
|
4600
4678
|
(graph) => graph.frequencies_hz.length === graph.complex_currents.length,
|
|
4601
4679
|
{
|
|
@@ -4605,52 +4683,52 @@ var simulation_ac_sweep_current_graph = z204.object({
|
|
|
4605
4683
|
expectTypesMatch(true);
|
|
4606
4684
|
|
|
4607
4685
|
// src/simulation/simulation_op_amp.ts
|
|
4608
|
-
import { z as
|
|
4609
|
-
var simulation_op_amp =
|
|
4610
|
-
type:
|
|
4686
|
+
import { z as z207 } from "zod";
|
|
4687
|
+
var simulation_op_amp = z207.object({
|
|
4688
|
+
type: z207.literal("simulation_op_amp"),
|
|
4611
4689
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
4612
|
-
source_component_id:
|
|
4613
|
-
inverting_input_source_port_id:
|
|
4614
|
-
non_inverting_input_source_port_id:
|
|
4615
|
-
output_source_port_id:
|
|
4616
|
-
positive_supply_source_port_id:
|
|
4617
|
-
negative_supply_source_port_id:
|
|
4690
|
+
source_component_id: z207.string().optional(),
|
|
4691
|
+
inverting_input_source_port_id: z207.string(),
|
|
4692
|
+
non_inverting_input_source_port_id: z207.string(),
|
|
4693
|
+
output_source_port_id: z207.string(),
|
|
4694
|
+
positive_supply_source_port_id: z207.string(),
|
|
4695
|
+
negative_supply_source_port_id: z207.string()
|
|
4618
4696
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
4619
4697
|
expectTypesMatch(true);
|
|
4620
4698
|
|
|
4621
4699
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
4622
|
-
import { z as
|
|
4623
|
-
var simulation_spice_subcircuit =
|
|
4624
|
-
type:
|
|
4700
|
+
import { z as z208 } from "zod";
|
|
4701
|
+
var simulation_spice_subcircuit = z208.object({
|
|
4702
|
+
type: z208.literal("simulation_spice_subcircuit"),
|
|
4625
4703
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
4626
4704
|
"simulation_spice_subcircuit"
|
|
4627
4705
|
),
|
|
4628
|
-
source_component_id:
|
|
4629
|
-
spice_pin_to_source_port_map:
|
|
4630
|
-
subcircuit_source:
|
|
4706
|
+
source_component_id: z208.string(),
|
|
4707
|
+
spice_pin_to_source_port_map: z208.record(z208.string(), z208.string()),
|
|
4708
|
+
subcircuit_source: z208.string()
|
|
4631
4709
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
4632
4710
|
expectTypesMatch(
|
|
4633
4711
|
true
|
|
4634
4712
|
);
|
|
4635
4713
|
|
|
4636
4714
|
// src/simulation/simulation_oscilloscope_trace.ts
|
|
4637
|
-
import { z as
|
|
4715
|
+
import { z as z209 } from "zod";
|
|
4638
4716
|
var hasValue = (value) => value !== void 0;
|
|
4639
|
-
var simulation_oscilloscope_trace =
|
|
4640
|
-
type:
|
|
4717
|
+
var simulation_oscilloscope_trace = z209.object({
|
|
4718
|
+
type: z209.literal("simulation_oscilloscope_trace"),
|
|
4641
4719
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
4642
4720
|
"simulation_oscilloscope_trace"
|
|
4643
4721
|
),
|
|
4644
|
-
simulation_transient_voltage_graph_id:
|
|
4645
|
-
simulation_transient_current_graph_id:
|
|
4646
|
-
simulation_voltage_probe_id:
|
|
4647
|
-
simulation_current_probe_id:
|
|
4648
|
-
display_name:
|
|
4649
|
-
color:
|
|
4650
|
-
display_center_value:
|
|
4651
|
-
display_center_offset_divs:
|
|
4652
|
-
volts_per_div:
|
|
4653
|
-
amps_per_div:
|
|
4722
|
+
simulation_transient_voltage_graph_id: z209.string().optional(),
|
|
4723
|
+
simulation_transient_current_graph_id: z209.string().optional(),
|
|
4724
|
+
simulation_voltage_probe_id: z209.string().optional(),
|
|
4725
|
+
simulation_current_probe_id: z209.string().optional(),
|
|
4726
|
+
display_name: z209.string().optional(),
|
|
4727
|
+
color: z209.string().optional(),
|
|
4728
|
+
display_center_value: z209.number().optional(),
|
|
4729
|
+
display_center_offset_divs: z209.number().optional(),
|
|
4730
|
+
volts_per_div: z209.number().positive().optional(),
|
|
4731
|
+
amps_per_div: z209.number().positive().optional()
|
|
4654
4732
|
}).describe(
|
|
4655
4733
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
4656
4734
|
).superRefine((data, ctx) => {
|
|
@@ -4664,19 +4742,19 @@ var simulation_oscilloscope_trace = z207.object({
|
|
|
4664
4742
|
].filter(hasValue).length;
|
|
4665
4743
|
if (voltageReferences + currentReferences !== 1) {
|
|
4666
4744
|
ctx.addIssue({
|
|
4667
|
-
code:
|
|
4745
|
+
code: z209.ZodIssueCode.custom,
|
|
4668
4746
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
4669
4747
|
});
|
|
4670
4748
|
}
|
|
4671
4749
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
4672
4750
|
ctx.addIssue({
|
|
4673
|
-
code:
|
|
4751
|
+
code: z209.ZodIssueCode.custom,
|
|
4674
4752
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
4675
4753
|
});
|
|
4676
4754
|
}
|
|
4677
4755
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
4678
4756
|
ctx.addIssue({
|
|
4679
|
-
code:
|
|
4757
|
+
code: z209.ZodIssueCode.custom,
|
|
4680
4758
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
4681
4759
|
});
|
|
4682
4760
|
}
|
|
@@ -4684,8 +4762,8 @@ var simulation_oscilloscope_trace = z207.object({
|
|
|
4684
4762
|
expectTypesMatch(true);
|
|
4685
4763
|
|
|
4686
4764
|
// src/any_circuit_element.ts
|
|
4687
|
-
import { z as
|
|
4688
|
-
var any_circuit_element =
|
|
4765
|
+
import { z as z210 } from "zod";
|
|
4766
|
+
var any_circuit_element = z210.union([
|
|
4689
4767
|
source_trace,
|
|
4690
4768
|
source_bus,
|
|
4691
4769
|
source_port,
|
|
@@ -4758,6 +4836,8 @@ var any_circuit_element = z208.union([
|
|
|
4758
4836
|
pcb_smtpad,
|
|
4759
4837
|
pcb_solder_paste,
|
|
4760
4838
|
pcb_board,
|
|
4839
|
+
pcb_bend,
|
|
4840
|
+
pcb_stiffener,
|
|
4761
4841
|
pcb_panel,
|
|
4762
4842
|
pcb_group,
|
|
4763
4843
|
pcb_trace_hint,
|
|
@@ -4909,6 +4989,7 @@ export {
|
|
|
4909
4989
|
parseAndConvertSiUnit2 as parseAndConvertSiUnit,
|
|
4910
4990
|
pcbRenderLayer,
|
|
4911
4991
|
pcb_autorouting_error,
|
|
4992
|
+
pcb_bend,
|
|
4912
4993
|
pcb_board,
|
|
4913
4994
|
pcb_breakout_point,
|
|
4914
4995
|
pcb_bus_length_skew_error,
|
|
@@ -4992,6 +5073,9 @@ export {
|
|
|
4992
5073
|
pcb_smtpad,
|
|
4993
5074
|
pcb_smtpad_pill,
|
|
4994
5075
|
pcb_solder_paste,
|
|
5076
|
+
pcb_stiffener,
|
|
5077
|
+
pcb_stiffener_polygon,
|
|
5078
|
+
pcb_stiffener_rect,
|
|
4995
5079
|
pcb_text,
|
|
4996
5080
|
pcb_thermal_spoke,
|
|
4997
5081
|
pcb_trace,
|