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