circuit-json 0.0.536 → 0.0.538
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 +2 -0
- package/dist/index.d.mts +244 -35
- package/dist/index.mjs +1298 -1275
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2904,6 +2904,7 @@ var pcb_trace = z126.object({
|
|
|
2904
2904
|
pcb_component_id: z126.string().optional(),
|
|
2905
2905
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
2906
2906
|
pcb_group_id: z126.string().optional(),
|
|
2907
|
+
pcb_panel_id: z126.string().optional(),
|
|
2907
2908
|
subcircuit_id: z126.string().optional(),
|
|
2908
2909
|
route_thickness_mode: z126.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
2909
2910
|
route_order_index: z126.number().optional(),
|
|
@@ -2978,149 +2979,168 @@ var pcb_trace_style_warning = z128.object({
|
|
|
2978
2979
|
);
|
|
2979
2980
|
expectTypesMatch(true);
|
|
2980
2981
|
|
|
2981
|
-
// src/pcb/
|
|
2982
|
+
// src/pcb/pcb_copper_pour_isolated_warning.ts
|
|
2982
2983
|
import { z as z129 } from "zod";
|
|
2983
|
-
var
|
|
2984
|
-
type: z129.literal("
|
|
2985
|
-
|
|
2986
|
-
"
|
|
2984
|
+
var pcb_copper_pour_isolated_warning = z129.object({
|
|
2985
|
+
type: z129.literal("pcb_copper_pour_isolated_warning"),
|
|
2986
|
+
pcb_copper_pour_isolated_warning_id: getZodPrefixedIdWithDefault(
|
|
2987
|
+
"pcb_copper_pour_isolated_warning"
|
|
2987
2988
|
),
|
|
2988
|
-
|
|
2989
|
+
warning_type: z129.literal("pcb_copper_pour_isolated_warning").default("pcb_copper_pour_isolated_warning"),
|
|
2989
2990
|
message: z129.string(),
|
|
2990
|
-
|
|
2991
|
+
pcb_copper_pour_id: z129.string(),
|
|
2991
2992
|
source_net_id: z129.string().optional(),
|
|
2992
|
-
|
|
2993
|
+
subcircuit_id: z129.string().optional(),
|
|
2994
|
+
layer: layer_ref,
|
|
2995
|
+
center: point
|
|
2996
|
+
}).describe(
|
|
2997
|
+
"Warning for an isolated PCB copper pour without a same-net pad or via connection"
|
|
2998
|
+
);
|
|
2999
|
+
expectTypesMatch(true);
|
|
3000
|
+
|
|
3001
|
+
// src/pcb/pcb_trace_too_long_error.ts
|
|
3002
|
+
import { z as z130 } from "zod";
|
|
3003
|
+
var pcb_trace_too_long_error = z130.object({
|
|
3004
|
+
type: z130.literal("pcb_trace_too_long_error"),
|
|
3005
|
+
pcb_trace_too_long_error_id: getZodPrefixedIdWithDefault(
|
|
3006
|
+
"pcb_trace_too_long_error"
|
|
3007
|
+
),
|
|
3008
|
+
error_type: z130.literal("pcb_trace_too_long_error").default("pcb_trace_too_long_error"),
|
|
3009
|
+
message: z130.string(),
|
|
3010
|
+
pcb_trace_id: z130.string(),
|
|
3011
|
+
source_net_id: z130.string().optional(),
|
|
3012
|
+
source_trace_id: z130.string().optional(),
|
|
2993
3013
|
actual_trace_length: distance,
|
|
2994
3014
|
maximum_trace_length: distance,
|
|
2995
|
-
subcircuit_id:
|
|
3015
|
+
subcircuit_id: z130.string().optional()
|
|
2996
3016
|
}).describe(
|
|
2997
3017
|
"Error emitted when a PCB trace is longer than its maximum allowed length"
|
|
2998
3018
|
);
|
|
2999
3019
|
expectTypesMatch(true);
|
|
3000
3020
|
|
|
3001
3021
|
// src/pcb/pcb_bus_length_skew_error.ts
|
|
3002
|
-
import { z as
|
|
3022
|
+
import { z as z131 } from "zod";
|
|
3003
3023
|
var pcb_bus_length_skew_error = base_circuit_json_error.extend({
|
|
3004
|
-
type:
|
|
3024
|
+
type: z131.literal("pcb_bus_length_skew_error"),
|
|
3005
3025
|
pcb_bus_length_skew_error_id: getZodPrefixedIdWithDefault(
|
|
3006
3026
|
"pcb_bus_length_skew_error"
|
|
3007
3027
|
),
|
|
3008
|
-
error_type:
|
|
3009
|
-
source_bus_id:
|
|
3010
|
-
source_trace_ids:
|
|
3011
|
-
pcb_trace_ids:
|
|
3012
|
-
actual_length_skew:
|
|
3013
|
-
maximum_length_skew:
|
|
3014
|
-
subcircuit_id:
|
|
3028
|
+
error_type: z131.literal("pcb_bus_length_skew_error").default("pcb_bus_length_skew_error"),
|
|
3029
|
+
source_bus_id: z131.string(),
|
|
3030
|
+
source_trace_ids: z131.array(z131.string()),
|
|
3031
|
+
pcb_trace_ids: z131.array(z131.string()),
|
|
3032
|
+
actual_length_skew: z131.number().nonnegative().finite(),
|
|
3033
|
+
maximum_length_skew: z131.number().nonnegative().finite(),
|
|
3034
|
+
subcircuit_id: z131.string().optional()
|
|
3015
3035
|
});
|
|
3016
3036
|
expectTypesMatch(true);
|
|
3017
3037
|
|
|
3018
3038
|
// src/pcb/pcb_trace_too_long_warning.ts
|
|
3019
|
-
import { z as
|
|
3020
|
-
var pcb_trace_too_long_warning =
|
|
3021
|
-
type:
|
|
3039
|
+
import { z as z132 } from "zod";
|
|
3040
|
+
var pcb_trace_too_long_warning = z132.object({
|
|
3041
|
+
type: z132.literal("pcb_trace_too_long_warning"),
|
|
3022
3042
|
pcb_trace_too_long_warning_id: getZodPrefixedIdWithDefault(
|
|
3023
3043
|
"pcb_trace_too_long_warning"
|
|
3024
3044
|
),
|
|
3025
|
-
warning_type:
|
|
3026
|
-
message:
|
|
3027
|
-
pcb_trace_id:
|
|
3028
|
-
source_net_id:
|
|
3029
|
-
source_trace_id:
|
|
3045
|
+
warning_type: z132.literal("pcb_trace_too_long_warning").default("pcb_trace_too_long_warning"),
|
|
3046
|
+
message: z132.string(),
|
|
3047
|
+
pcb_trace_id: z132.string(),
|
|
3048
|
+
source_net_id: z132.string().optional(),
|
|
3049
|
+
source_trace_id: z132.string().optional(),
|
|
3030
3050
|
actual_trace_length: distance,
|
|
3031
3051
|
maximum_trace_length: distance,
|
|
3032
|
-
subcircuit_id:
|
|
3052
|
+
subcircuit_id: z132.string().optional()
|
|
3033
3053
|
}).describe(
|
|
3034
3054
|
"Warning emitted when a PCB trace is longer than its maximum allowed length"
|
|
3035
3055
|
);
|
|
3036
3056
|
expectTypesMatch(true);
|
|
3037
3057
|
|
|
3038
3058
|
// src/pcb/pcb_trace_too_many_vias_warning.ts
|
|
3039
|
-
import { z as
|
|
3040
|
-
var pcb_trace_too_many_vias_warning =
|
|
3041
|
-
type:
|
|
3059
|
+
import { z as z133 } from "zod";
|
|
3060
|
+
var pcb_trace_too_many_vias_warning = z133.object({
|
|
3061
|
+
type: z133.literal("pcb_trace_too_many_vias_warning"),
|
|
3042
3062
|
pcb_trace_too_many_vias_warning_id: getZodPrefixedIdWithDefault(
|
|
3043
3063
|
"pcb_trace_too_many_vias_warning"
|
|
3044
3064
|
),
|
|
3045
|
-
warning_type:
|
|
3046
|
-
message:
|
|
3047
|
-
pcb_trace_id:
|
|
3048
|
-
source_net_id:
|
|
3049
|
-
source_trace_id:
|
|
3050
|
-
actual_via_count:
|
|
3051
|
-
maximum_via_count:
|
|
3052
|
-
subcircuit_id:
|
|
3065
|
+
warning_type: z133.literal("pcb_trace_too_many_vias_warning").default("pcb_trace_too_many_vias_warning"),
|
|
3066
|
+
message: z133.string(),
|
|
3067
|
+
pcb_trace_id: z133.string(),
|
|
3068
|
+
source_net_id: z133.string().optional(),
|
|
3069
|
+
source_trace_id: z133.string().optional(),
|
|
3070
|
+
actual_via_count: z133.number().int().nonnegative(),
|
|
3071
|
+
maximum_via_count: z133.number().int().nonnegative(),
|
|
3072
|
+
subcircuit_id: z133.string().optional()
|
|
3053
3073
|
}).describe(
|
|
3054
3074
|
"Warning emitted when a PCB trace has more vias than its maximum allowed count"
|
|
3055
3075
|
);
|
|
3056
3076
|
expectTypesMatch(true);
|
|
3057
3077
|
|
|
3058
3078
|
// src/pcb/pcb_bus_routing_constraint_error.ts
|
|
3059
|
-
import { z as
|
|
3079
|
+
import { z as z134 } from "zod";
|
|
3060
3080
|
var error_base = base_circuit_json_error.extend({
|
|
3061
|
-
type:
|
|
3081
|
+
type: z134.literal("pcb_bus_routing_constraint_error"),
|
|
3062
3082
|
pcb_bus_routing_constraint_error_id: getZodPrefixedIdWithDefault(
|
|
3063
3083
|
"pcb_bus_routing_constraint_error"
|
|
3064
3084
|
),
|
|
3065
|
-
error_type:
|
|
3066
|
-
source_bus_id:
|
|
3067
|
-
source_trace_ids:
|
|
3068
|
-
pcb_trace_ids:
|
|
3069
|
-
subcircuit_id:
|
|
3085
|
+
error_type: z134.literal("pcb_bus_routing_constraint_error").default("pcb_bus_routing_constraint_error"),
|
|
3086
|
+
source_bus_id: z134.string(),
|
|
3087
|
+
source_trace_ids: z134.array(z134.string()).min(1),
|
|
3088
|
+
pcb_trace_ids: z134.array(z134.string()),
|
|
3089
|
+
subcircuit_id: z134.string().optional()
|
|
3070
3090
|
});
|
|
3071
|
-
var pcb_bus_routing_constraint_error =
|
|
3091
|
+
var pcb_bus_routing_constraint_error = z134.discriminatedUnion("routing_rule", [
|
|
3072
3092
|
error_base.extend({
|
|
3073
|
-
routing_rule:
|
|
3074
|
-
actual_length_skew:
|
|
3075
|
-
maximum_length_skew:
|
|
3093
|
+
routing_rule: z134.literal("length_skew"),
|
|
3094
|
+
actual_length_skew: z134.number().nonnegative().finite(),
|
|
3095
|
+
maximum_length_skew: z134.number().nonnegative().finite()
|
|
3076
3096
|
}),
|
|
3077
3097
|
error_base.extend({
|
|
3078
|
-
routing_rule:
|
|
3079
|
-
actual_trace_length:
|
|
3080
|
-
minimum_trace_length:
|
|
3098
|
+
routing_rule: z134.literal("min_length"),
|
|
3099
|
+
actual_trace_length: z134.number().nonnegative().finite(),
|
|
3100
|
+
minimum_trace_length: z134.number().finite()
|
|
3081
3101
|
}),
|
|
3082
3102
|
error_base.extend({
|
|
3083
|
-
routing_rule:
|
|
3084
|
-
actual_trace_length:
|
|
3085
|
-
maximum_trace_length:
|
|
3103
|
+
routing_rule: z134.literal("max_length"),
|
|
3104
|
+
actual_trace_length: z134.number().nonnegative().finite(),
|
|
3105
|
+
maximum_trace_length: z134.number().finite()
|
|
3086
3106
|
}),
|
|
3087
3107
|
error_base.extend({
|
|
3088
|
-
routing_rule:
|
|
3089
|
-
actual_trace_length:
|
|
3090
|
-
target_trace_length:
|
|
3091
|
-
length_tolerance:
|
|
3108
|
+
routing_rule: z134.literal("target_length"),
|
|
3109
|
+
actual_trace_length: z134.number().nonnegative().finite(),
|
|
3110
|
+
target_trace_length: z134.number().finite(),
|
|
3111
|
+
length_tolerance: z134.number().nonnegative().finite()
|
|
3092
3112
|
}),
|
|
3093
3113
|
error_base.extend({
|
|
3094
|
-
routing_rule:
|
|
3095
|
-
other_pcb_trace_id:
|
|
3096
|
-
other_source_trace_id:
|
|
3097
|
-
actual_centerline_spacing:
|
|
3098
|
-
minimum_centerline_spacing:
|
|
3114
|
+
routing_rule: z134.literal("pcb_trace_spacing"),
|
|
3115
|
+
other_pcb_trace_id: z134.string(),
|
|
3116
|
+
other_source_trace_id: z134.string().optional(),
|
|
3117
|
+
actual_centerline_spacing: z134.number().nonnegative().finite(),
|
|
3118
|
+
minimum_centerline_spacing: z134.number().positive().finite()
|
|
3099
3119
|
}),
|
|
3100
3120
|
error_base.extend({
|
|
3101
|
-
routing_rule:
|
|
3102
|
-
other_pcb_trace_id:
|
|
3103
|
-
other_source_trace_id:
|
|
3104
|
-
actual_centerline_spacing:
|
|
3105
|
-
minimum_centerline_spacing:
|
|
3121
|
+
routing_rule: z134.literal("pcb_spacing_to_other_signals"),
|
|
3122
|
+
other_pcb_trace_id: z134.string(),
|
|
3123
|
+
other_source_trace_id: z134.string().optional(),
|
|
3124
|
+
actual_centerline_spacing: z134.number().nonnegative().finite(),
|
|
3125
|
+
minimum_centerline_spacing: z134.number().positive().finite()
|
|
3106
3126
|
}),
|
|
3107
3127
|
error_base.extend({
|
|
3108
|
-
routing_rule:
|
|
3109
|
-
target_impedance:
|
|
3110
|
-
minimum_impedance:
|
|
3111
|
-
maximum_impedance:
|
|
3128
|
+
routing_rule: z134.literal("impedance_target"),
|
|
3129
|
+
target_impedance: z134.number().positive().finite(),
|
|
3130
|
+
minimum_impedance: z134.number().positive().finite().optional(),
|
|
3131
|
+
maximum_impedance: z134.number().positive().finite().optional()
|
|
3112
3132
|
})
|
|
3113
3133
|
]).superRefine((error, ctx) => {
|
|
3114
3134
|
if (error.routing_rule !== "impedance_target") return;
|
|
3115
3135
|
if (error.minimum_impedance === void 0 && error.maximum_impedance === void 0)
|
|
3116
3136
|
ctx.addIssue({
|
|
3117
|
-
code:
|
|
3137
|
+
code: z134.ZodIssueCode.custom,
|
|
3118
3138
|
path: ["minimum_impedance"],
|
|
3119
3139
|
message: "Provide an impedance bound"
|
|
3120
3140
|
});
|
|
3121
3141
|
if (error.minimum_impedance !== void 0 && error.maximum_impedance !== void 0 && error.minimum_impedance > error.maximum_impedance)
|
|
3122
3142
|
ctx.addIssue({
|
|
3123
|
-
code:
|
|
3143
|
+
code: z134.ZodIssueCode.custom,
|
|
3124
3144
|
path: ["maximum_impedance"],
|
|
3125
3145
|
message: "Impedance bounds must be ordered"
|
|
3126
3146
|
});
|
|
@@ -3130,134 +3150,135 @@ var pcb_bus_routing_constraint_error = z133.discriminatedUnion("routing_rule", [
|
|
|
3130
3150
|
expectTypesMatch(true);
|
|
3131
3151
|
|
|
3132
3152
|
// src/pcb/pcb_bus_routing_constraint_warning.ts
|
|
3133
|
-
import { z as
|
|
3134
|
-
var warning_base =
|
|
3135
|
-
type:
|
|
3153
|
+
import { z as z135 } from "zod";
|
|
3154
|
+
var warning_base = z135.object({
|
|
3155
|
+
type: z135.literal("pcb_bus_routing_constraint_warning"),
|
|
3136
3156
|
pcb_bus_routing_constraint_warning_id: getZodPrefixedIdWithDefault(
|
|
3137
3157
|
"pcb_bus_routing_constraint_warning"
|
|
3138
3158
|
),
|
|
3139
|
-
warning_type:
|
|
3140
|
-
source_bus_id:
|
|
3141
|
-
source_trace_ids:
|
|
3142
|
-
pcb_trace_ids:
|
|
3143
|
-
message:
|
|
3144
|
-
subcircuit_id:
|
|
3159
|
+
warning_type: z135.literal("pcb_bus_routing_constraint_warning").default("pcb_bus_routing_constraint_warning"),
|
|
3160
|
+
source_bus_id: z135.string(),
|
|
3161
|
+
source_trace_ids: z135.array(z135.string()).min(1),
|
|
3162
|
+
pcb_trace_ids: z135.array(z135.string()),
|
|
3163
|
+
message: z135.string(),
|
|
3164
|
+
subcircuit_id: z135.string().optional()
|
|
3145
3165
|
}).describe(
|
|
3146
3166
|
"A declared bus or pair constraint could not be verified; this is not a pass."
|
|
3147
3167
|
);
|
|
3148
|
-
var pcb_bus_routing_constraint_warning =
|
|
3168
|
+
var pcb_bus_routing_constraint_warning = z135.discriminatedUnion(
|
|
3149
3169
|
"routing_rule",
|
|
3150
3170
|
[
|
|
3151
|
-
warning_base.extend({ routing_rule:
|
|
3152
|
-
warning_base.extend({ routing_rule:
|
|
3153
|
-
warning_base.extend({ routing_rule:
|
|
3154
|
-
warning_base.extend({ routing_rule:
|
|
3155
|
-
warning_base.extend({ routing_rule:
|
|
3171
|
+
warning_base.extend({ routing_rule: z135.literal("route_geometry") }),
|
|
3172
|
+
warning_base.extend({ routing_rule: z135.literal("reference_geometry") }),
|
|
3173
|
+
warning_base.extend({ routing_rule: z135.literal("spacing_geometry") }),
|
|
3174
|
+
warning_base.extend({ routing_rule: z135.literal("target_length") }),
|
|
3175
|
+
warning_base.extend({ routing_rule: z135.literal("physical_impedance") })
|
|
3156
3176
|
]
|
|
3157
3177
|
);
|
|
3158
3178
|
expectTypesMatch(true);
|
|
3159
3179
|
|
|
3160
3180
|
// src/pcb/pcb_trace_error.ts
|
|
3161
|
-
import { z as
|
|
3181
|
+
import { z as z136 } from "zod";
|
|
3162
3182
|
var pcb_trace_error = base_circuit_json_error.extend({
|
|
3163
|
-
type:
|
|
3183
|
+
type: z136.literal("pcb_trace_error"),
|
|
3164
3184
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
3165
|
-
error_type:
|
|
3185
|
+
error_type: z136.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
3166
3186
|
center: point.optional(),
|
|
3167
|
-
pcb_trace_id:
|
|
3168
|
-
source_trace_id:
|
|
3169
|
-
pcb_component_ids:
|
|
3170
|
-
pcb_port_ids:
|
|
3171
|
-
subcircuit_id:
|
|
3187
|
+
pcb_trace_id: z136.string(),
|
|
3188
|
+
source_trace_id: z136.string(),
|
|
3189
|
+
pcb_component_ids: z136.array(z136.string()),
|
|
3190
|
+
pcb_port_ids: z136.array(z136.string()),
|
|
3191
|
+
subcircuit_id: z136.string().optional()
|
|
3172
3192
|
}).describe("Defines a trace error on the PCB");
|
|
3173
3193
|
expectTypesMatch(true);
|
|
3174
3194
|
|
|
3175
3195
|
// src/pcb/pcb_trace_missing_error.ts
|
|
3176
|
-
import { z as
|
|
3196
|
+
import { z as z137 } from "zod";
|
|
3177
3197
|
var pcb_trace_missing_error = base_circuit_json_error.extend({
|
|
3178
|
-
type:
|
|
3198
|
+
type: z137.literal("pcb_trace_missing_error"),
|
|
3179
3199
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
3180
3200
|
"pcb_trace_missing_error"
|
|
3181
3201
|
),
|
|
3182
|
-
error_type:
|
|
3202
|
+
error_type: z137.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
3183
3203
|
center: point.optional(),
|
|
3184
|
-
source_trace_id:
|
|
3185
|
-
pcb_component_ids:
|
|
3186
|
-
pcb_port_ids:
|
|
3187
|
-
subcircuit_id:
|
|
3204
|
+
source_trace_id: z137.string(),
|
|
3205
|
+
pcb_component_ids: z137.array(z137.string()),
|
|
3206
|
+
pcb_port_ids: z137.array(z137.string()),
|
|
3207
|
+
subcircuit_id: z137.string().optional()
|
|
3188
3208
|
}).describe(
|
|
3189
3209
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
3190
3210
|
);
|
|
3191
3211
|
expectTypesMatch(true);
|
|
3192
3212
|
|
|
3193
3213
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
3194
|
-
import { z as
|
|
3214
|
+
import { z as z138 } from "zod";
|
|
3195
3215
|
var pcb_port_not_matched_error = base_circuit_json_error.extend({
|
|
3196
|
-
type:
|
|
3216
|
+
type: z138.literal("pcb_port_not_matched_error"),
|
|
3197
3217
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3198
|
-
error_type:
|
|
3199
|
-
pcb_component_ids:
|
|
3200
|
-
subcircuit_id:
|
|
3218
|
+
error_type: z138.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
3219
|
+
pcb_component_ids: z138.array(z138.string()),
|
|
3220
|
+
subcircuit_id: z138.string().optional()
|
|
3201
3221
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
3202
3222
|
expectTypesMatch(true);
|
|
3203
3223
|
|
|
3204
3224
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
3205
|
-
import { z as
|
|
3225
|
+
import { z as z139 } from "zod";
|
|
3206
3226
|
var pcb_port_not_connected_error = base_circuit_json_error.extend({
|
|
3207
|
-
type:
|
|
3227
|
+
type: z139.literal("pcb_port_not_connected_error"),
|
|
3208
3228
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
3209
3229
|
"pcb_port_not_connected_error"
|
|
3210
3230
|
),
|
|
3211
|
-
error_type:
|
|
3212
|
-
pcb_port_ids:
|
|
3213
|
-
pcb_component_ids:
|
|
3214
|
-
subcircuit_id:
|
|
3231
|
+
error_type: z139.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
3232
|
+
pcb_port_ids: z139.array(z139.string()),
|
|
3233
|
+
pcb_component_ids: z139.array(z139.string()),
|
|
3234
|
+
subcircuit_id: z139.string().optional()
|
|
3215
3235
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
3216
3236
|
expectTypesMatch(
|
|
3217
3237
|
true
|
|
3218
3238
|
);
|
|
3219
3239
|
|
|
3220
3240
|
// src/pcb/pcb_net.ts
|
|
3221
|
-
import { z as
|
|
3222
|
-
var pcb_net =
|
|
3223
|
-
type:
|
|
3241
|
+
import { z as z140 } from "zod";
|
|
3242
|
+
var pcb_net = z140.object({
|
|
3243
|
+
type: z140.literal("pcb_net"),
|
|
3224
3244
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
3225
|
-
source_net_id:
|
|
3226
|
-
highlight_color:
|
|
3245
|
+
source_net_id: z140.string().optional(),
|
|
3246
|
+
highlight_color: z140.string().optional()
|
|
3227
3247
|
}).describe("Defines a net on the PCB");
|
|
3228
3248
|
expectTypesMatch(true);
|
|
3229
3249
|
|
|
3230
3250
|
// src/pcb/pcb_via.ts
|
|
3231
|
-
import { z as
|
|
3232
|
-
var pcb_via =
|
|
3233
|
-
type:
|
|
3251
|
+
import { z as z141 } from "zod";
|
|
3252
|
+
var pcb_via = z141.object({
|
|
3253
|
+
type: z141.literal("pcb_via"),
|
|
3234
3254
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
3235
|
-
pcb_group_id:
|
|
3236
|
-
|
|
3237
|
-
|
|
3255
|
+
pcb_group_id: z141.string().optional(),
|
|
3256
|
+
pcb_panel_id: z141.string().optional(),
|
|
3257
|
+
subcircuit_id: z141.string().optional(),
|
|
3258
|
+
subcircuit_connectivity_map_key: z141.string().optional(),
|
|
3238
3259
|
x: distance,
|
|
3239
3260
|
y: distance,
|
|
3240
3261
|
outer_diameter: distance.default("0.6mm"),
|
|
3241
3262
|
hole_diameter: distance.default("0.25mm"),
|
|
3242
3263
|
topmost_drill_layer: layer_ref.optional(),
|
|
3243
3264
|
bottommost_drill_layer: layer_ref.optional(),
|
|
3244
|
-
through_hole:
|
|
3265
|
+
through_hole: z141.boolean().optional(),
|
|
3245
3266
|
/** @deprecated */
|
|
3246
3267
|
from_layer: layer_ref.optional(),
|
|
3247
3268
|
/** @deprecated */
|
|
3248
3269
|
to_layer: layer_ref.optional(),
|
|
3249
|
-
layers:
|
|
3270
|
+
layers: z141.array(layer_ref),
|
|
3250
3271
|
/** PCB ports belonging to this via, including layer ports and aliases. */
|
|
3251
|
-
pcb_port_ids:
|
|
3252
|
-
pcb_trace_id:
|
|
3253
|
-
source_trace_id:
|
|
3254
|
-
source_net_id:
|
|
3255
|
-
net_is_assignable:
|
|
3256
|
-
net_assigned:
|
|
3272
|
+
pcb_port_ids: z141.array(z141.string()).optional(),
|
|
3273
|
+
pcb_trace_id: z141.string().optional(),
|
|
3274
|
+
source_trace_id: z141.string().optional(),
|
|
3275
|
+
source_net_id: z141.string().min(1).optional(),
|
|
3276
|
+
net_is_assignable: z141.boolean().optional(),
|
|
3277
|
+
net_assigned: z141.boolean().optional(),
|
|
3257
3278
|
/** @deprecated Use tented_on_top and tented_on_bottom instead. */
|
|
3258
|
-
is_tented:
|
|
3259
|
-
tented_on_top:
|
|
3260
|
-
tented_on_bottom:
|
|
3279
|
+
is_tented: z141.boolean().optional(),
|
|
3280
|
+
tented_on_top: z141.boolean().optional(),
|
|
3281
|
+
tented_on_bottom: z141.boolean().optional()
|
|
3261
3282
|
}).transform(({ is_tented, ...via }) => {
|
|
3262
3283
|
if (is_tented !== void 0) {
|
|
3263
3284
|
via.tented_on_top ??= is_tented;
|
|
@@ -3268,58 +3289,58 @@ var pcb_via = z140.object({
|
|
|
3268
3289
|
expectTypesMatch(true);
|
|
3269
3290
|
|
|
3270
3291
|
// src/pcb/pcb_board.ts
|
|
3271
|
-
import { z as
|
|
3272
|
-
var pcb_board =
|
|
3273
|
-
type:
|
|
3292
|
+
import { z as z142 } from "zod";
|
|
3293
|
+
var pcb_board = z142.object({
|
|
3294
|
+
type: z142.literal("pcb_board"),
|
|
3274
3295
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
3275
|
-
pcb_panel_id:
|
|
3276
|
-
carrier_pcb_board_id:
|
|
3277
|
-
is_subcircuit:
|
|
3278
|
-
subcircuit_id:
|
|
3279
|
-
is_mounted_to_carrier_board:
|
|
3280
|
-
is_via_in_pad_allowed:
|
|
3281
|
-
default_via_tented_on_top:
|
|
3282
|
-
default_via_tented_on_bottom:
|
|
3283
|
-
default_via_plugged:
|
|
3296
|
+
pcb_panel_id: z142.string().optional(),
|
|
3297
|
+
carrier_pcb_board_id: z142.string().optional(),
|
|
3298
|
+
is_subcircuit: z142.boolean().optional(),
|
|
3299
|
+
subcircuit_id: z142.string().optional(),
|
|
3300
|
+
is_mounted_to_carrier_board: z142.boolean().optional(),
|
|
3301
|
+
is_via_in_pad_allowed: z142.boolean().optional(),
|
|
3302
|
+
default_via_tented_on_top: z142.boolean().optional(),
|
|
3303
|
+
default_via_tented_on_bottom: z142.boolean().optional(),
|
|
3304
|
+
default_via_plugged: z142.boolean().optional(),
|
|
3284
3305
|
width: length.optional(),
|
|
3285
3306
|
height: length.optional(),
|
|
3286
3307
|
center: point,
|
|
3287
|
-
display_offset_x:
|
|
3308
|
+
display_offset_x: z142.string().optional().describe(
|
|
3288
3309
|
"How to display the x offset for this board, usually corresponding with how the user specified it"
|
|
3289
3310
|
),
|
|
3290
|
-
display_offset_y:
|
|
3311
|
+
display_offset_y: z142.string().optional().describe(
|
|
3291
3312
|
"How to display the y offset for this board, usually corresponding with how the user specified it"
|
|
3292
3313
|
),
|
|
3293
3314
|
thickness: length.optional().default(1.4),
|
|
3294
|
-
num_layers:
|
|
3295
|
-
allow_blind_and_buried_vias:
|
|
3315
|
+
num_layers: z142.number().optional().default(4),
|
|
3316
|
+
allow_blind_and_buried_vias: z142.boolean().optional().describe(
|
|
3296
3317
|
"Whether autorouters may generate blind and buried vias. False restricts newly generated vias to the full board stack."
|
|
3297
3318
|
),
|
|
3298
|
-
outline:
|
|
3299
|
-
shape:
|
|
3300
|
-
material:
|
|
3301
|
-
solder_mask_color:
|
|
3302
|
-
silkscreen_color:
|
|
3319
|
+
outline: z142.array(point).optional(),
|
|
3320
|
+
shape: z142.enum(["rect", "polygon"]).optional(),
|
|
3321
|
+
material: z142.enum(["fr4", "fr1", "flex"]).default("fr4"),
|
|
3322
|
+
solder_mask_color: z142.string().optional(),
|
|
3323
|
+
silkscreen_color: z142.string().optional(),
|
|
3303
3324
|
anchor_position: point.optional(),
|
|
3304
3325
|
anchor_alignment: ninePointAnchor.optional(),
|
|
3305
|
-
position_mode:
|
|
3326
|
+
position_mode: z142.enum(["relative_to_panel_anchor", "none"]).optional()
|
|
3306
3327
|
}).merge(manufacturing_drc_properties).describe("Defines the board outline of the PCB");
|
|
3307
3328
|
expectTypesMatch(true);
|
|
3308
3329
|
|
|
3309
3330
|
// src/pcb/pcb_stackup.ts
|
|
3310
|
-
import { z as
|
|
3311
|
-
var positive_length = length.pipe(
|
|
3312
|
-
var nonnegative_length = length.pipe(
|
|
3313
|
-
var positive_number =
|
|
3314
|
-
var nonnegative_number =
|
|
3315
|
-
var pcb_stackup_soldermask_layer =
|
|
3316
|
-
layer_type:
|
|
3331
|
+
import { z as z143 } from "zod";
|
|
3332
|
+
var positive_length = length.pipe(z143.number().finite().positive());
|
|
3333
|
+
var nonnegative_length = length.pipe(z143.number().finite().nonnegative());
|
|
3334
|
+
var positive_number = z143.number().finite().positive();
|
|
3335
|
+
var nonnegative_number = z143.number().finite().nonnegative();
|
|
3336
|
+
var pcb_stackup_soldermask_layer = z143.object({
|
|
3337
|
+
layer_type: z143.literal("soldermask").describe("Soldermask layer"),
|
|
3317
3338
|
thickness: positive_length.optional().describe("Soldermask thickness in mm, omitted when unknown"),
|
|
3318
3339
|
relative_permittivity: positive_number.optional().describe("Soldermask relative permittivity")
|
|
3319
3340
|
});
|
|
3320
3341
|
expectTypesMatch(true);
|
|
3321
|
-
var pcb_stackup_copper_layer =
|
|
3322
|
-
layer_type:
|
|
3342
|
+
var pcb_stackup_copper_layer = z143.object({
|
|
3343
|
+
layer_type: z143.literal("copper").describe("Copper layer"),
|
|
3323
3344
|
layer: layer_ref.describe("PCB copper layer, such as top, inner1 or bottom"),
|
|
3324
3345
|
thickness: positive_length.describe("Copper thickness in mm"),
|
|
3325
3346
|
electrical_conductivity_s_per_m: positive_number.optional().describe(
|
|
@@ -3328,10 +3349,10 @@ var pcb_stackup_copper_layer = z142.object({
|
|
|
3328
3349
|
rms_surface_roughness: nonnegative_length.optional().describe("RMS copper surface roughness in mm")
|
|
3329
3350
|
});
|
|
3330
3351
|
expectTypesMatch(true);
|
|
3331
|
-
var pcb_stackup_dielectric_layer =
|
|
3332
|
-
layer_type:
|
|
3333
|
-
dielectric_type:
|
|
3334
|
-
material_name:
|
|
3352
|
+
var pcb_stackup_dielectric_layer = z143.object({
|
|
3353
|
+
layer_type: z143.literal("dielectric").describe("Dielectric layer"),
|
|
3354
|
+
dielectric_type: z143.enum(["core", "prepreg"]).optional().describe("Core or prepreg construction"),
|
|
3355
|
+
material_name: z143.string().optional().describe("Fabricator material name, such as FR-4 or 7628"),
|
|
3335
3356
|
thickness: positive_length.describe("Dielectric thickness in mm"),
|
|
3336
3357
|
relative_permittivity: positive_number.optional().describe("Dielectric relative permittivity, Dk"),
|
|
3337
3358
|
loss_tangent: nonnegative_number.optional().describe("Dielectric loss tangent, Df"),
|
|
@@ -3340,40 +3361,40 @@ var pcb_stackup_dielectric_layer = z142.object({
|
|
|
3340
3361
|
)
|
|
3341
3362
|
});
|
|
3342
3363
|
expectTypesMatch(true);
|
|
3343
|
-
var pcb_stackup_layer =
|
|
3364
|
+
var pcb_stackup_layer = z143.discriminatedUnion("layer_type", [
|
|
3344
3365
|
pcb_stackup_soldermask_layer,
|
|
3345
3366
|
pcb_stackup_copper_layer,
|
|
3346
3367
|
pcb_stackup_dielectric_layer
|
|
3347
3368
|
]);
|
|
3348
3369
|
expectTypesMatch(true);
|
|
3349
|
-
var pcb_stackup =
|
|
3350
|
-
type:
|
|
3370
|
+
var pcb_stackup = z143.object({
|
|
3371
|
+
type: z143.literal("pcb_stackup"),
|
|
3351
3372
|
pcb_stackup_id: getZodPrefixedIdWithDefault("pcb_stackup"),
|
|
3352
|
-
pcb_board_id:
|
|
3353
|
-
subcircuit_id:
|
|
3373
|
+
pcb_board_id: z143.string().describe("Board described by this stackup"),
|
|
3374
|
+
subcircuit_id: z143.string().optional(),
|
|
3354
3375
|
plated_hole_copper_thickness: positive_length.optional().describe("Copper thickness of plated hole and via barrel walls in mm"),
|
|
3355
|
-
layers:
|
|
3376
|
+
layers: z143.array(pcb_stackup_layer).min(1).describe("Physical layers ordered from top to bottom")
|
|
3356
3377
|
}).describe("Physical layer construction and material data for a PCB board");
|
|
3357
3378
|
expectTypesMatch(true);
|
|
3358
3379
|
|
|
3359
3380
|
// src/pcb/pcb_bend.ts
|
|
3360
|
-
import { z as
|
|
3381
|
+
import { z as z144 } from "zod";
|
|
3361
3382
|
var finite_point = point.extend({
|
|
3362
|
-
x: length.pipe(
|
|
3363
|
-
y: length.pipe(
|
|
3383
|
+
x: length.pipe(z144.number().finite()),
|
|
3384
|
+
y: length.pipe(z144.number().finite())
|
|
3364
3385
|
});
|
|
3365
|
-
var pcb_bend =
|
|
3366
|
-
type:
|
|
3386
|
+
var pcb_bend = z144.object({
|
|
3387
|
+
type: z144.literal("pcb_bend"),
|
|
3367
3388
|
pcb_bend_id: getZodPrefixedIdWithDefault("pcb_bend"),
|
|
3368
|
-
pcb_board_id:
|
|
3369
|
-
pcb_group_id:
|
|
3370
|
-
subcircuit_id:
|
|
3371
|
-
name:
|
|
3389
|
+
pcb_board_id: z144.string(),
|
|
3390
|
+
pcb_group_id: z144.string().optional(),
|
|
3391
|
+
subcircuit_id: z144.string().optional(),
|
|
3392
|
+
name: z144.string().optional(),
|
|
3372
3393
|
start: finite_point,
|
|
3373
3394
|
end: finite_point,
|
|
3374
|
-
bend_angle: rotation.pipe(
|
|
3375
|
-
bend_radius: length.pipe(
|
|
3376
|
-
bend_side:
|
|
3395
|
+
bend_angle: rotation.pipe(z144.number().finite()),
|
|
3396
|
+
bend_radius: length.pipe(z144.number().finite().positive()),
|
|
3397
|
+
bend_side: z144.enum(["left", "right"])
|
|
3377
3398
|
}).refine(({ start, end }) => start.x !== end.x || start.y !== end.y, {
|
|
3378
3399
|
message: "Bend centerline endpoints must be distinct",
|
|
3379
3400
|
path: ["end"]
|
|
@@ -3383,123 +3404,123 @@ var pcb_bend = z143.object({
|
|
|
3383
3404
|
expectTypesMatch(true);
|
|
3384
3405
|
|
|
3385
3406
|
// src/pcb/pcb_stiffener.ts
|
|
3386
|
-
import { z as
|
|
3387
|
-
var positive_length2 = length.pipe(
|
|
3407
|
+
import { z as z145 } from "zod";
|
|
3408
|
+
var positive_length2 = length.pipe(z145.number().finite().positive());
|
|
3388
3409
|
var finite_point2 = point.extend({
|
|
3389
|
-
x: length.pipe(
|
|
3390
|
-
y: length.pipe(
|
|
3410
|
+
x: length.pipe(z145.number().finite()),
|
|
3411
|
+
y: length.pipe(z145.number().finite())
|
|
3391
3412
|
});
|
|
3392
|
-
var pcb_stiffener_base =
|
|
3393
|
-
type:
|
|
3413
|
+
var pcb_stiffener_base = z145.object({
|
|
3414
|
+
type: z145.literal("pcb_stiffener"),
|
|
3394
3415
|
pcb_stiffener_id: getZodPrefixedIdWithDefault("pcb_stiffener"),
|
|
3395
|
-
pcb_board_id:
|
|
3396
|
-
pcb_group_id:
|
|
3397
|
-
subcircuit_id:
|
|
3398
|
-
name:
|
|
3399
|
-
layer:
|
|
3400
|
-
material:
|
|
3416
|
+
pcb_board_id: z145.string(),
|
|
3417
|
+
pcb_group_id: z145.string().optional(),
|
|
3418
|
+
subcircuit_id: z145.string().optional(),
|
|
3419
|
+
name: z145.string().optional(),
|
|
3420
|
+
layer: z145.enum(["top", "bottom"]),
|
|
3421
|
+
material: z145.enum(["fr4", "polyimide", "stainless_steel", "aluminum"]),
|
|
3401
3422
|
thickness: positive_length2,
|
|
3402
|
-
adhesive_thickness: length.pipe(
|
|
3423
|
+
adhesive_thickness: length.pipe(z145.number().finite().nonnegative()).optional()
|
|
3403
3424
|
});
|
|
3404
3425
|
var pcb_stiffener_rect = pcb_stiffener_base.extend({
|
|
3405
|
-
shape:
|
|
3426
|
+
shape: z145.literal("rect"),
|
|
3406
3427
|
center: finite_point2,
|
|
3407
|
-
rotation: rotation.pipe(
|
|
3428
|
+
rotation: rotation.pipe(z145.number().finite()).optional(),
|
|
3408
3429
|
width: positive_length2,
|
|
3409
3430
|
height: positive_length2,
|
|
3410
|
-
outline:
|
|
3431
|
+
outline: z145.never().optional()
|
|
3411
3432
|
});
|
|
3412
3433
|
expectTypesMatch(true);
|
|
3413
3434
|
var pcb_stiffener_polygon = pcb_stiffener_base.extend({
|
|
3414
|
-
shape:
|
|
3415
|
-
outline:
|
|
3435
|
+
shape: z145.literal("polygon"),
|
|
3436
|
+
outline: z145.array(finite_point2).min(3).refine((points) => {
|
|
3416
3437
|
const twice_area = points.reduce((sum, p, i) => {
|
|
3417
3438
|
const next = points[(i + 1) % points.length];
|
|
3418
3439
|
return sum + p.x * next.y - next.x * p.y;
|
|
3419
3440
|
}, 0);
|
|
3420
3441
|
return Number.isFinite(twice_area) && twice_area !== 0;
|
|
3421
3442
|
}, "Stiffener outline must enclose a nonzero area"),
|
|
3422
|
-
center:
|
|
3423
|
-
rotation:
|
|
3424
|
-
width:
|
|
3425
|
-
height:
|
|
3443
|
+
center: z145.never().optional(),
|
|
3444
|
+
rotation: z145.never().optional(),
|
|
3445
|
+
width: z145.never().optional(),
|
|
3446
|
+
height: z145.never().optional()
|
|
3426
3447
|
});
|
|
3427
3448
|
expectTypesMatch(
|
|
3428
3449
|
true
|
|
3429
3450
|
);
|
|
3430
|
-
var pcb_stiffener =
|
|
3451
|
+
var pcb_stiffener = z145.discriminatedUnion("shape", [pcb_stiffener_rect, pcb_stiffener_polygon]).describe(
|
|
3431
3452
|
"Defines bonded mechanical PCB reinforcement without adding copper layers"
|
|
3432
3453
|
);
|
|
3433
3454
|
expectTypesMatch(true);
|
|
3434
3455
|
|
|
3435
3456
|
// src/pcb/pcb_panel.ts
|
|
3436
|
-
import { z as
|
|
3437
|
-
var pcb_panel =
|
|
3438
|
-
type:
|
|
3457
|
+
import { z as z146 } from "zod";
|
|
3458
|
+
var pcb_panel = z146.object({
|
|
3459
|
+
type: z146.literal("pcb_panel"),
|
|
3439
3460
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
3440
3461
|
width: length,
|
|
3441
3462
|
height: length,
|
|
3442
3463
|
center: point,
|
|
3443
3464
|
thickness: length.optional().default(1.4),
|
|
3444
|
-
covered_with_solder_mask:
|
|
3465
|
+
covered_with_solder_mask: z146.boolean().optional().default(true)
|
|
3445
3466
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
3446
3467
|
expectTypesMatch(true);
|
|
3447
3468
|
|
|
3448
3469
|
// src/pcb/pcb_placement_error.ts
|
|
3449
|
-
import { z as
|
|
3470
|
+
import { z as z147 } from "zod";
|
|
3450
3471
|
var pcb_placement_error = base_circuit_json_error.extend({
|
|
3451
|
-
type:
|
|
3472
|
+
type: z147.literal("pcb_placement_error"),
|
|
3452
3473
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
3453
|
-
error_type:
|
|
3454
|
-
subcircuit_id:
|
|
3474
|
+
error_type: z147.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
3475
|
+
subcircuit_id: z147.string().optional()
|
|
3455
3476
|
}).describe("Defines a placement error on the PCB");
|
|
3456
3477
|
expectTypesMatch(true);
|
|
3457
3478
|
|
|
3458
3479
|
// src/pcb/pcb_packing_error.ts
|
|
3459
|
-
import { z as
|
|
3480
|
+
import { z as z148 } from "zod";
|
|
3460
3481
|
var pcb_packing_error = base_circuit_json_error.extend({
|
|
3461
|
-
type:
|
|
3482
|
+
type: z148.literal("pcb_packing_error"),
|
|
3462
3483
|
pcb_packing_error_id: getZodPrefixedIdWithDefault("pcb_packing_error"),
|
|
3463
|
-
error_type:
|
|
3464
|
-
pcb_group_id:
|
|
3465
|
-
subcircuit_id:
|
|
3484
|
+
error_type: z148.literal("pcb_packing_error").default("pcb_packing_error"),
|
|
3485
|
+
pcb_group_id: z148.string().optional(),
|
|
3486
|
+
subcircuit_id: z148.string().optional()
|
|
3466
3487
|
}).describe("Defines a failure to pack PCB components within layout bounds");
|
|
3467
3488
|
expectTypesMatch(true);
|
|
3468
3489
|
|
|
3469
3490
|
// src/pcb/pcb_panelization_placement_error.ts
|
|
3470
|
-
import { z as
|
|
3491
|
+
import { z as z149 } from "zod";
|
|
3471
3492
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
3472
|
-
type:
|
|
3493
|
+
type: z149.literal("pcb_panelization_placement_error"),
|
|
3473
3494
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
3474
3495
|
"pcb_panelization_placement_error"
|
|
3475
3496
|
),
|
|
3476
|
-
error_type:
|
|
3477
|
-
pcb_panel_id:
|
|
3478
|
-
pcb_board_id:
|
|
3479
|
-
subcircuit_id:
|
|
3497
|
+
error_type: z149.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
|
|
3498
|
+
pcb_panel_id: z149.string().optional(),
|
|
3499
|
+
pcb_board_id: z149.string().optional(),
|
|
3500
|
+
subcircuit_id: z149.string().optional()
|
|
3480
3501
|
}).describe("Defines a panelization placement error on the PCB");
|
|
3481
3502
|
expectTypesMatch(true);
|
|
3482
3503
|
|
|
3483
3504
|
// src/pcb/pcb_trace_hint.ts
|
|
3484
|
-
import { z as
|
|
3485
|
-
var pcb_trace_hint =
|
|
3486
|
-
type:
|
|
3505
|
+
import { z as z150 } from "zod";
|
|
3506
|
+
var pcb_trace_hint = z150.object({
|
|
3507
|
+
type: z150.literal("pcb_trace_hint"),
|
|
3487
3508
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
3488
|
-
pcb_port_id:
|
|
3489
|
-
pcb_component_id:
|
|
3490
|
-
route:
|
|
3491
|
-
subcircuit_id:
|
|
3509
|
+
pcb_port_id: z150.string(),
|
|
3510
|
+
pcb_component_id: z150.string(),
|
|
3511
|
+
route: z150.array(route_hint_point),
|
|
3512
|
+
subcircuit_id: z150.string().optional()
|
|
3492
3513
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
3493
3514
|
expectTypesMatch(true);
|
|
3494
3515
|
|
|
3495
3516
|
// src/pcb/pcb_silkscreen_line.ts
|
|
3496
|
-
import { z as
|
|
3497
|
-
var pcb_silkscreen_line =
|
|
3498
|
-
type:
|
|
3517
|
+
import { z as z151 } from "zod";
|
|
3518
|
+
var pcb_silkscreen_line = z151.object({
|
|
3519
|
+
type: z151.literal("pcb_silkscreen_line"),
|
|
3499
3520
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
3500
|
-
pcb_component_id:
|
|
3501
|
-
pcb_group_id:
|
|
3502
|
-
subcircuit_id:
|
|
3521
|
+
pcb_component_id: z151.string(),
|
|
3522
|
+
pcb_group_id: z151.string().optional(),
|
|
3523
|
+
subcircuit_id: z151.string().optional(),
|
|
3503
3524
|
stroke_width: distance.default("0.1mm"),
|
|
3504
3525
|
x1: distance,
|
|
3505
3526
|
y1: distance,
|
|
@@ -3510,32 +3531,32 @@ var pcb_silkscreen_line = z150.object({
|
|
|
3510
3531
|
expectTypesMatch(true);
|
|
3511
3532
|
|
|
3512
3533
|
// src/pcb/pcb_silkscreen_path.ts
|
|
3513
|
-
import { z as
|
|
3514
|
-
var pcb_silkscreen_path =
|
|
3515
|
-
type:
|
|
3534
|
+
import { z as z152 } from "zod";
|
|
3535
|
+
var pcb_silkscreen_path = z152.object({
|
|
3536
|
+
type: z152.literal("pcb_silkscreen_path"),
|
|
3516
3537
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
3517
|
-
pcb_component_id:
|
|
3518
|
-
pcb_group_id:
|
|
3519
|
-
subcircuit_id:
|
|
3538
|
+
pcb_component_id: z152.string(),
|
|
3539
|
+
pcb_group_id: z152.string().optional(),
|
|
3540
|
+
subcircuit_id: z152.string().optional(),
|
|
3520
3541
|
layer: visible_layer,
|
|
3521
|
-
route:
|
|
3542
|
+
route: z152.array(point),
|
|
3522
3543
|
stroke_width: length
|
|
3523
3544
|
}).describe("Defines a silkscreen path on the PCB");
|
|
3524
3545
|
expectTypesMatch(true);
|
|
3525
3546
|
|
|
3526
3547
|
// src/pcb/pcb_silkscreen_text.ts
|
|
3527
|
-
import { z as
|
|
3528
|
-
var pcb_silkscreen_text =
|
|
3529
|
-
type:
|
|
3548
|
+
import { z as z153 } from "zod";
|
|
3549
|
+
var pcb_silkscreen_text = z153.object({
|
|
3550
|
+
type: z153.literal("pcb_silkscreen_text"),
|
|
3530
3551
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
3531
|
-
pcb_group_id:
|
|
3532
|
-
subcircuit_id:
|
|
3533
|
-
font:
|
|
3552
|
+
pcb_group_id: z153.string().optional(),
|
|
3553
|
+
subcircuit_id: z153.string().optional(),
|
|
3554
|
+
font: z153.literal("tscircuit2024").default("tscircuit2024"),
|
|
3534
3555
|
font_size: distance.default("0.2mm"),
|
|
3535
|
-
pcb_component_id:
|
|
3536
|
-
text:
|
|
3537
|
-
is_knockout:
|
|
3538
|
-
knockout_padding:
|
|
3556
|
+
pcb_component_id: z153.string(),
|
|
3557
|
+
text: z153.string(),
|
|
3558
|
+
is_knockout: z153.boolean().default(false).optional(),
|
|
3559
|
+
knockout_padding: z153.object({
|
|
3539
3560
|
left: length,
|
|
3540
3561
|
top: length,
|
|
3541
3562
|
bottom: length,
|
|
@@ -3546,27 +3567,27 @@ var pcb_silkscreen_text = z152.object({
|
|
|
3546
3567
|
bottom: "0.2mm",
|
|
3547
3568
|
right: "0.2mm"
|
|
3548
3569
|
}).optional(),
|
|
3549
|
-
ccw_rotation:
|
|
3570
|
+
ccw_rotation: z153.number().optional(),
|
|
3550
3571
|
layer: layer_ref,
|
|
3551
|
-
is_mirrored:
|
|
3572
|
+
is_mirrored: z153.boolean().default(false).optional(),
|
|
3552
3573
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3553
3574
|
anchor_alignment: ninePointAnchor.default("center")
|
|
3554
3575
|
}).describe("Defines silkscreen text on the PCB");
|
|
3555
3576
|
expectTypesMatch(true);
|
|
3556
3577
|
|
|
3557
3578
|
// src/pcb/pcb_copper_text.ts
|
|
3558
|
-
import { z as
|
|
3559
|
-
var pcb_copper_text =
|
|
3560
|
-
type:
|
|
3579
|
+
import { z as z154 } from "zod";
|
|
3580
|
+
var pcb_copper_text = z154.object({
|
|
3581
|
+
type: z154.literal("pcb_copper_text"),
|
|
3561
3582
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
3562
|
-
pcb_group_id:
|
|
3563
|
-
subcircuit_id:
|
|
3564
|
-
font:
|
|
3583
|
+
pcb_group_id: z154.string().optional(),
|
|
3584
|
+
subcircuit_id: z154.string().optional(),
|
|
3585
|
+
font: z154.literal("tscircuit2024").default("tscircuit2024"),
|
|
3565
3586
|
font_size: distance.default("0.2mm"),
|
|
3566
|
-
pcb_component_id:
|
|
3567
|
-
text:
|
|
3568
|
-
is_knockout:
|
|
3569
|
-
knockout_padding:
|
|
3587
|
+
pcb_component_id: z154.string(),
|
|
3588
|
+
text: z154.string(),
|
|
3589
|
+
is_knockout: z154.boolean().default(false).optional(),
|
|
3590
|
+
knockout_padding: z154.object({
|
|
3570
3591
|
left: length,
|
|
3571
3592
|
top: length,
|
|
3572
3593
|
bottom: length,
|
|
@@ -3577,61 +3598,61 @@ var pcb_copper_text = z153.object({
|
|
|
3577
3598
|
bottom: "0.2mm",
|
|
3578
3599
|
right: "0.2mm"
|
|
3579
3600
|
}).optional(),
|
|
3580
|
-
ccw_rotation:
|
|
3601
|
+
ccw_rotation: z154.number().optional(),
|
|
3581
3602
|
layer: layer_ref,
|
|
3582
|
-
is_mirrored:
|
|
3603
|
+
is_mirrored: z154.boolean().default(false).optional(),
|
|
3583
3604
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3584
3605
|
anchor_alignment: ninePointAnchor.default("center")
|
|
3585
3606
|
}).describe("Defines copper text on the PCB");
|
|
3586
3607
|
expectTypesMatch(true);
|
|
3587
3608
|
|
|
3588
3609
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
3589
|
-
import { z as
|
|
3590
|
-
var pcb_silkscreen_rect =
|
|
3591
|
-
type:
|
|
3610
|
+
import { z as z155 } from "zod";
|
|
3611
|
+
var pcb_silkscreen_rect = z155.object({
|
|
3612
|
+
type: z155.literal("pcb_silkscreen_rect"),
|
|
3592
3613
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
3593
|
-
pcb_component_id:
|
|
3594
|
-
pcb_group_id:
|
|
3595
|
-
subcircuit_id:
|
|
3614
|
+
pcb_component_id: z155.string(),
|
|
3615
|
+
pcb_group_id: z155.string().optional(),
|
|
3616
|
+
subcircuit_id: z155.string().optional(),
|
|
3596
3617
|
center: point,
|
|
3597
3618
|
width: length,
|
|
3598
3619
|
height: length,
|
|
3599
3620
|
layer: layer_ref,
|
|
3600
3621
|
stroke_width: length.default("1mm"),
|
|
3601
3622
|
corner_radius: length.optional(),
|
|
3602
|
-
is_filled:
|
|
3603
|
-
has_stroke:
|
|
3604
|
-
is_stroke_dashed:
|
|
3605
|
-
ccw_rotation:
|
|
3623
|
+
is_filled: z155.boolean().default(true).optional(),
|
|
3624
|
+
has_stroke: z155.boolean().optional(),
|
|
3625
|
+
is_stroke_dashed: z155.boolean().optional(),
|
|
3626
|
+
ccw_rotation: z155.number().optional()
|
|
3606
3627
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
3607
3628
|
expectTypesMatch(true);
|
|
3608
3629
|
|
|
3609
3630
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
3610
|
-
import { z as
|
|
3611
|
-
var pcb_silkscreen_circle =
|
|
3612
|
-
type:
|
|
3631
|
+
import { z as z156 } from "zod";
|
|
3632
|
+
var pcb_silkscreen_circle = z156.object({
|
|
3633
|
+
type: z156.literal("pcb_silkscreen_circle"),
|
|
3613
3634
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
3614
3635
|
"pcb_silkscreen_circle"
|
|
3615
3636
|
),
|
|
3616
|
-
pcb_component_id:
|
|
3617
|
-
pcb_group_id:
|
|
3618
|
-
subcircuit_id:
|
|
3637
|
+
pcb_component_id: z156.string(),
|
|
3638
|
+
pcb_group_id: z156.string().optional(),
|
|
3639
|
+
subcircuit_id: z156.string().optional(),
|
|
3619
3640
|
center: point,
|
|
3620
3641
|
radius: length,
|
|
3621
3642
|
layer: visible_layer,
|
|
3622
3643
|
stroke_width: length.default("1mm"),
|
|
3623
|
-
is_filled:
|
|
3644
|
+
is_filled: z156.boolean().optional()
|
|
3624
3645
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
3625
3646
|
expectTypesMatch(true);
|
|
3626
3647
|
|
|
3627
3648
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
3628
|
-
import { z as
|
|
3629
|
-
var pcb_silkscreen_oval =
|
|
3630
|
-
type:
|
|
3649
|
+
import { z as z157 } from "zod";
|
|
3650
|
+
var pcb_silkscreen_oval = z157.object({
|
|
3651
|
+
type: z157.literal("pcb_silkscreen_oval"),
|
|
3631
3652
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
3632
|
-
pcb_component_id:
|
|
3633
|
-
pcb_group_id:
|
|
3634
|
-
subcircuit_id:
|
|
3653
|
+
pcb_component_id: z157.string(),
|
|
3654
|
+
pcb_group_id: z157.string().optional(),
|
|
3655
|
+
subcircuit_id: z157.string().optional(),
|
|
3635
3656
|
center: point,
|
|
3636
3657
|
radius_x: distance,
|
|
3637
3658
|
radius_y: distance,
|
|
@@ -3641,267 +3662,267 @@ var pcb_silkscreen_oval = z156.object({
|
|
|
3641
3662
|
expectTypesMatch(true);
|
|
3642
3663
|
|
|
3643
3664
|
// src/pcb/pcb_silkscreen_graphic.ts
|
|
3644
|
-
import { z as
|
|
3645
|
-
var pcb_silkscreen_graphic_base =
|
|
3646
|
-
type:
|
|
3665
|
+
import { z as z158 } from "zod";
|
|
3666
|
+
var pcb_silkscreen_graphic_base = z158.object({
|
|
3667
|
+
type: z158.literal("pcb_silkscreen_graphic"),
|
|
3647
3668
|
pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
|
|
3648
3669
|
"pcb_silkscreen_graphic"
|
|
3649
3670
|
),
|
|
3650
|
-
pcb_component_id:
|
|
3651
|
-
pcb_group_id:
|
|
3652
|
-
subcircuit_id:
|
|
3671
|
+
pcb_component_id: z158.string(),
|
|
3672
|
+
pcb_group_id: z158.string().optional(),
|
|
3673
|
+
subcircuit_id: z158.string().optional(),
|
|
3653
3674
|
layer: visible_layer,
|
|
3654
3675
|
image_asset: asset.optional()
|
|
3655
3676
|
});
|
|
3656
3677
|
var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
|
|
3657
|
-
shape:
|
|
3678
|
+
shape: z158.literal("brep"),
|
|
3658
3679
|
brep_shape
|
|
3659
3680
|
}).describe("Defines a BRep silkscreen graphic on the PCB");
|
|
3660
3681
|
expectTypesMatch(
|
|
3661
3682
|
true
|
|
3662
3683
|
);
|
|
3663
|
-
var pcb_silkscreen_graphic =
|
|
3684
|
+
var pcb_silkscreen_graphic = z158.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
|
|
3664
3685
|
expectTypesMatch(true);
|
|
3665
3686
|
|
|
3666
3687
|
// src/pcb/pcb_silkscreen_pill.ts
|
|
3667
|
-
import { z as
|
|
3668
|
-
var pcb_silkscreen_pill =
|
|
3669
|
-
type:
|
|
3688
|
+
import { z as z159 } from "zod";
|
|
3689
|
+
var pcb_silkscreen_pill = z159.object({
|
|
3690
|
+
type: z159.literal("pcb_silkscreen_pill"),
|
|
3670
3691
|
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
3671
|
-
pcb_component_id:
|
|
3672
|
-
pcb_group_id:
|
|
3673
|
-
subcircuit_id:
|
|
3692
|
+
pcb_component_id: z159.string(),
|
|
3693
|
+
pcb_group_id: z159.string().optional(),
|
|
3694
|
+
subcircuit_id: z159.string().optional(),
|
|
3674
3695
|
center: point,
|
|
3675
3696
|
width: length,
|
|
3676
3697
|
height: length,
|
|
3677
3698
|
layer: layer_ref,
|
|
3678
|
-
ccw_rotation:
|
|
3699
|
+
ccw_rotation: z159.number().optional()
|
|
3679
3700
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
3680
3701
|
expectTypesMatch(true);
|
|
3681
3702
|
|
|
3682
3703
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
3683
|
-
import { z as
|
|
3684
|
-
var pcb_fabrication_note_text =
|
|
3685
|
-
type:
|
|
3704
|
+
import { z as z160 } from "zod";
|
|
3705
|
+
var pcb_fabrication_note_text = z160.object({
|
|
3706
|
+
type: z160.literal("pcb_fabrication_note_text"),
|
|
3686
3707
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
3687
3708
|
"pcb_fabrication_note_text"
|
|
3688
3709
|
),
|
|
3689
|
-
subcircuit_id:
|
|
3690
|
-
pcb_group_id:
|
|
3691
|
-
font:
|
|
3710
|
+
subcircuit_id: z160.string().optional(),
|
|
3711
|
+
pcb_group_id: z160.string().optional(),
|
|
3712
|
+
font: z160.literal("tscircuit2024").default("tscircuit2024"),
|
|
3692
3713
|
font_size: distance.default("1mm"),
|
|
3693
|
-
pcb_component_id:
|
|
3694
|
-
text:
|
|
3695
|
-
ccw_rotation:
|
|
3714
|
+
pcb_component_id: z160.string(),
|
|
3715
|
+
text: z160.string(),
|
|
3716
|
+
ccw_rotation: z160.number().optional(),
|
|
3696
3717
|
layer: visible_layer,
|
|
3697
3718
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3698
|
-
anchor_alignment:
|
|
3699
|
-
color:
|
|
3719
|
+
anchor_alignment: z160.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3720
|
+
color: z160.string().optional()
|
|
3700
3721
|
}).describe(
|
|
3701
3722
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
3702
3723
|
);
|
|
3703
3724
|
expectTypesMatch(true);
|
|
3704
3725
|
|
|
3705
3726
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
3706
|
-
import { z as
|
|
3707
|
-
var pcb_fabrication_note_path =
|
|
3708
|
-
type:
|
|
3727
|
+
import { z as z161 } from "zod";
|
|
3728
|
+
var pcb_fabrication_note_path = z161.object({
|
|
3729
|
+
type: z161.literal("pcb_fabrication_note_path"),
|
|
3709
3730
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
3710
3731
|
"pcb_fabrication_note_path"
|
|
3711
3732
|
),
|
|
3712
|
-
pcb_component_id:
|
|
3713
|
-
subcircuit_id:
|
|
3733
|
+
pcb_component_id: z161.string(),
|
|
3734
|
+
subcircuit_id: z161.string().optional(),
|
|
3714
3735
|
layer: layer_ref,
|
|
3715
|
-
route:
|
|
3736
|
+
route: z161.array(point),
|
|
3716
3737
|
stroke_width: length,
|
|
3717
|
-
color:
|
|
3718
|
-
is_filled:
|
|
3719
|
-
has_stroke:
|
|
3738
|
+
color: z161.string().optional(),
|
|
3739
|
+
is_filled: z161.boolean().optional(),
|
|
3740
|
+
has_stroke: z161.boolean().optional()
|
|
3720
3741
|
}).describe(
|
|
3721
3742
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
3722
3743
|
);
|
|
3723
3744
|
expectTypesMatch(true);
|
|
3724
3745
|
|
|
3725
3746
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
3726
|
-
import { z as
|
|
3727
|
-
var pcb_fabrication_note_rect =
|
|
3728
|
-
type:
|
|
3747
|
+
import { z as z162 } from "zod";
|
|
3748
|
+
var pcb_fabrication_note_rect = z162.object({
|
|
3749
|
+
type: z162.literal("pcb_fabrication_note_rect"),
|
|
3729
3750
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
3730
3751
|
"pcb_fabrication_note_rect"
|
|
3731
3752
|
),
|
|
3732
|
-
pcb_component_id:
|
|
3733
|
-
pcb_group_id:
|
|
3734
|
-
subcircuit_id:
|
|
3753
|
+
pcb_component_id: z162.string(),
|
|
3754
|
+
pcb_group_id: z162.string().optional(),
|
|
3755
|
+
subcircuit_id: z162.string().optional(),
|
|
3735
3756
|
center: point,
|
|
3736
3757
|
width: length,
|
|
3737
3758
|
height: length,
|
|
3738
3759
|
layer: visible_layer,
|
|
3739
3760
|
stroke_width: length.default("0.1mm"),
|
|
3740
3761
|
corner_radius: length.optional(),
|
|
3741
|
-
is_filled:
|
|
3742
|
-
has_stroke:
|
|
3743
|
-
is_stroke_dashed:
|
|
3744
|
-
color:
|
|
3762
|
+
is_filled: z162.boolean().optional(),
|
|
3763
|
+
has_stroke: z162.boolean().optional(),
|
|
3764
|
+
is_stroke_dashed: z162.boolean().optional(),
|
|
3765
|
+
color: z162.string().optional()
|
|
3745
3766
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
3746
3767
|
expectTypesMatch(true);
|
|
3747
3768
|
|
|
3748
3769
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
3749
|
-
import { z as
|
|
3750
|
-
var pcb_fabrication_note_dimension =
|
|
3751
|
-
type:
|
|
3770
|
+
import { z as z163 } from "zod";
|
|
3771
|
+
var pcb_fabrication_note_dimension = z163.object({
|
|
3772
|
+
type: z163.literal("pcb_fabrication_note_dimension"),
|
|
3752
3773
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
3753
3774
|
"pcb_fabrication_note_dimension"
|
|
3754
3775
|
),
|
|
3755
|
-
pcb_component_id:
|
|
3756
|
-
pcb_group_id:
|
|
3757
|
-
subcircuit_id:
|
|
3776
|
+
pcb_component_id: z163.string(),
|
|
3777
|
+
pcb_group_id: z163.string().optional(),
|
|
3778
|
+
subcircuit_id: z163.string().optional(),
|
|
3758
3779
|
layer: visible_layer,
|
|
3759
3780
|
from: point,
|
|
3760
3781
|
to: point,
|
|
3761
|
-
text:
|
|
3762
|
-
text_ccw_rotation:
|
|
3782
|
+
text: z163.string().optional(),
|
|
3783
|
+
text_ccw_rotation: z163.number().optional(),
|
|
3763
3784
|
offset: length.optional(),
|
|
3764
3785
|
offset_distance: length.optional(),
|
|
3765
|
-
offset_direction:
|
|
3766
|
-
x:
|
|
3767
|
-
y:
|
|
3786
|
+
offset_direction: z163.object({
|
|
3787
|
+
x: z163.number(),
|
|
3788
|
+
y: z163.number()
|
|
3768
3789
|
}).optional(),
|
|
3769
|
-
font:
|
|
3790
|
+
font: z163.literal("tscircuit2024").default("tscircuit2024"),
|
|
3770
3791
|
font_size: length.default("1mm"),
|
|
3771
|
-
color:
|
|
3792
|
+
color: z163.string().optional(),
|
|
3772
3793
|
arrow_size: length.default("1mm")
|
|
3773
3794
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
3774
3795
|
expectTypesMatch(true);
|
|
3775
3796
|
|
|
3776
3797
|
// src/pcb/pcb_note_text.ts
|
|
3777
|
-
import { z as z163 } from "zod";
|
|
3778
|
-
var pcb_note_text = z163.object({
|
|
3779
|
-
type: z163.literal("pcb_note_text"),
|
|
3780
|
-
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
3781
|
-
pcb_component_id: z163.string().optional(),
|
|
3782
|
-
pcb_group_id: z163.string().optional(),
|
|
3783
|
-
subcircuit_id: z163.string().optional(),
|
|
3784
|
-
name: z163.string().optional(),
|
|
3785
|
-
font: z163.literal("tscircuit2024").default("tscircuit2024"),
|
|
3786
|
-
font_size: distance.default("1mm"),
|
|
3787
|
-
text: z163.string().optional(),
|
|
3788
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3789
|
-
anchor_alignment: z163.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3790
|
-
layer: visible_layer.default("top"),
|
|
3791
|
-
is_mirrored_from_top_view: z163.boolean().optional(),
|
|
3792
|
-
color: z163.string().optional()
|
|
3793
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
3794
|
-
expectTypesMatch(true);
|
|
3795
|
-
|
|
3796
|
-
// src/pcb/pcb_note_rect.ts
|
|
3797
3798
|
import { z as z164 } from "zod";
|
|
3798
|
-
var
|
|
3799
|
-
type: z164.literal("
|
|
3800
|
-
|
|
3799
|
+
var pcb_note_text = z164.object({
|
|
3800
|
+
type: z164.literal("pcb_note_text"),
|
|
3801
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
3801
3802
|
pcb_component_id: z164.string().optional(),
|
|
3802
3803
|
pcb_group_id: z164.string().optional(),
|
|
3803
3804
|
subcircuit_id: z164.string().optional(),
|
|
3804
3805
|
name: z164.string().optional(),
|
|
3806
|
+
font: z164.literal("tscircuit2024").default("tscircuit2024"),
|
|
3807
|
+
font_size: distance.default("1mm"),
|
|
3805
3808
|
text: z164.string().optional(),
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
height: length,
|
|
3809
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3810
|
+
anchor_alignment: z164.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3809
3811
|
layer: visible_layer.default("top"),
|
|
3810
|
-
|
|
3811
|
-
corner_radius: length.optional(),
|
|
3812
|
-
is_filled: z164.boolean().optional(),
|
|
3813
|
-
has_stroke: z164.boolean().optional(),
|
|
3814
|
-
is_stroke_dashed: z164.boolean().optional(),
|
|
3812
|
+
is_mirrored_from_top_view: z164.boolean().optional(),
|
|
3815
3813
|
color: z164.string().optional()
|
|
3816
|
-
}).describe("Defines a
|
|
3814
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
3817
3815
|
expectTypesMatch(true);
|
|
3818
3816
|
|
|
3819
|
-
// src/pcb/
|
|
3817
|
+
// src/pcb/pcb_note_rect.ts
|
|
3820
3818
|
import { z as z165 } from "zod";
|
|
3821
|
-
var
|
|
3822
|
-
type: z165.literal("
|
|
3823
|
-
|
|
3819
|
+
var pcb_note_rect = z165.object({
|
|
3820
|
+
type: z165.literal("pcb_note_rect"),
|
|
3821
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
3824
3822
|
pcb_component_id: z165.string().optional(),
|
|
3825
3823
|
pcb_group_id: z165.string().optional(),
|
|
3826
3824
|
subcircuit_id: z165.string().optional(),
|
|
3827
3825
|
name: z165.string().optional(),
|
|
3828
3826
|
text: z165.string().optional(),
|
|
3829
|
-
|
|
3827
|
+
center: point,
|
|
3828
|
+
width: length,
|
|
3829
|
+
height: length,
|
|
3830
3830
|
layer: visible_layer.default("top"),
|
|
3831
3831
|
stroke_width: length.default("0.1mm"),
|
|
3832
|
+
corner_radius: length.optional(),
|
|
3833
|
+
is_filled: z165.boolean().optional(),
|
|
3834
|
+
has_stroke: z165.boolean().optional(),
|
|
3835
|
+
is_stroke_dashed: z165.boolean().optional(),
|
|
3832
3836
|
color: z165.string().optional()
|
|
3833
|
-
}).describe("Defines a
|
|
3837
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
3834
3838
|
expectTypesMatch(true);
|
|
3835
3839
|
|
|
3836
|
-
// src/pcb/
|
|
3840
|
+
// src/pcb/pcb_note_path.ts
|
|
3837
3841
|
import { z as z166 } from "zod";
|
|
3838
|
-
var
|
|
3839
|
-
type: z166.literal("
|
|
3840
|
-
|
|
3842
|
+
var pcb_note_path = z166.object({
|
|
3843
|
+
type: z166.literal("pcb_note_path"),
|
|
3844
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
3841
3845
|
pcb_component_id: z166.string().optional(),
|
|
3842
3846
|
pcb_group_id: z166.string().optional(),
|
|
3843
3847
|
subcircuit_id: z166.string().optional(),
|
|
3844
3848
|
name: z166.string().optional(),
|
|
3845
3849
|
text: z166.string().optional(),
|
|
3850
|
+
route: z166.array(point),
|
|
3851
|
+
layer: visible_layer.default("top"),
|
|
3852
|
+
stroke_width: length.default("0.1mm"),
|
|
3853
|
+
color: z166.string().optional()
|
|
3854
|
+
}).describe("Defines a polyline documentation note on the PCB");
|
|
3855
|
+
expectTypesMatch(true);
|
|
3856
|
+
|
|
3857
|
+
// src/pcb/pcb_note_line.ts
|
|
3858
|
+
import { z as z167 } from "zod";
|
|
3859
|
+
var pcb_note_line = z167.object({
|
|
3860
|
+
type: z167.literal("pcb_note_line"),
|
|
3861
|
+
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
3862
|
+
pcb_component_id: z167.string().optional(),
|
|
3863
|
+
pcb_group_id: z167.string().optional(),
|
|
3864
|
+
subcircuit_id: z167.string().optional(),
|
|
3865
|
+
name: z167.string().optional(),
|
|
3866
|
+
text: z167.string().optional(),
|
|
3846
3867
|
x1: distance,
|
|
3847
3868
|
y1: distance,
|
|
3848
3869
|
x2: distance,
|
|
3849
3870
|
y2: distance,
|
|
3850
3871
|
layer: visible_layer.default("top"),
|
|
3851
3872
|
stroke_width: distance.default("0.1mm"),
|
|
3852
|
-
color:
|
|
3853
|
-
is_dashed:
|
|
3873
|
+
color: z167.string().optional(),
|
|
3874
|
+
is_dashed: z167.boolean().optional()
|
|
3854
3875
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
3855
3876
|
expectTypesMatch(true);
|
|
3856
3877
|
|
|
3857
3878
|
// src/pcb/pcb_note_dimension.ts
|
|
3858
|
-
import { z as
|
|
3859
|
-
var pcb_note_dimension =
|
|
3860
|
-
type:
|
|
3879
|
+
import { z as z168 } from "zod";
|
|
3880
|
+
var pcb_note_dimension = z168.object({
|
|
3881
|
+
type: z168.literal("pcb_note_dimension"),
|
|
3861
3882
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
3862
|
-
pcb_component_id:
|
|
3863
|
-
pcb_group_id:
|
|
3864
|
-
subcircuit_id:
|
|
3865
|
-
name:
|
|
3883
|
+
pcb_component_id: z168.string().optional(),
|
|
3884
|
+
pcb_group_id: z168.string().optional(),
|
|
3885
|
+
subcircuit_id: z168.string().optional(),
|
|
3886
|
+
name: z168.string().optional(),
|
|
3866
3887
|
from: point,
|
|
3867
3888
|
to: point,
|
|
3868
|
-
text:
|
|
3869
|
-
text_ccw_rotation:
|
|
3889
|
+
text: z168.string().optional(),
|
|
3890
|
+
text_ccw_rotation: z168.number().optional(),
|
|
3870
3891
|
offset_distance: length.optional(),
|
|
3871
|
-
offset_direction:
|
|
3872
|
-
x:
|
|
3873
|
-
y:
|
|
3892
|
+
offset_direction: z168.object({
|
|
3893
|
+
x: z168.number(),
|
|
3894
|
+
y: z168.number()
|
|
3874
3895
|
}).optional(),
|
|
3875
|
-
font:
|
|
3896
|
+
font: z168.literal("tscircuit2024").default("tscircuit2024"),
|
|
3876
3897
|
font_size: length.default("1mm"),
|
|
3877
3898
|
layer: visible_layer.default("top"),
|
|
3878
|
-
color:
|
|
3899
|
+
color: z168.string().optional(),
|
|
3879
3900
|
arrow_size: length.default("1mm")
|
|
3880
3901
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
3881
3902
|
expectTypesMatch(true);
|
|
3882
3903
|
|
|
3883
3904
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
3884
|
-
import { z as
|
|
3905
|
+
import { z as z169 } from "zod";
|
|
3885
3906
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
3886
|
-
type:
|
|
3907
|
+
type: z169.literal("pcb_footprint_overlap_error"),
|
|
3887
3908
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3888
|
-
error_type:
|
|
3889
|
-
pcb_smtpad_ids:
|
|
3890
|
-
pcb_plated_hole_ids:
|
|
3891
|
-
pcb_hole_ids:
|
|
3892
|
-
pcb_keepout_ids:
|
|
3909
|
+
error_type: z169.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
3910
|
+
pcb_smtpad_ids: z169.array(z169.string()).optional(),
|
|
3911
|
+
pcb_plated_hole_ids: z169.array(z169.string()).optional(),
|
|
3912
|
+
pcb_hole_ids: z169.array(z169.string()).optional(),
|
|
3913
|
+
pcb_keepout_ids: z169.array(z169.string()).optional()
|
|
3893
3914
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
3894
3915
|
expectTypesMatch(
|
|
3895
3916
|
true
|
|
3896
3917
|
);
|
|
3897
3918
|
|
|
3898
3919
|
// src/pcb/pcb_courtyard_overlap_error.ts
|
|
3899
|
-
import { z as
|
|
3920
|
+
import { z as z170 } from "zod";
|
|
3900
3921
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
3901
|
-
type:
|
|
3922
|
+
type: z170.literal("pcb_courtyard_overlap_error"),
|
|
3902
3923
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3903
|
-
error_type:
|
|
3904
|
-
pcb_component_ids:
|
|
3924
|
+
error_type: z170.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
|
|
3925
|
+
pcb_component_ids: z170.tuple([z170.string(), z170.string()])
|
|
3905
3926
|
}).describe(
|
|
3906
3927
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
3907
3928
|
);
|
|
@@ -3910,81 +3931,81 @@ expectTypesMatch(
|
|
|
3910
3931
|
);
|
|
3911
3932
|
|
|
3912
3933
|
// src/pcb/pcb_keepout.ts
|
|
3913
|
-
import { z as
|
|
3914
|
-
var pcb_keepout_outline =
|
|
3915
|
-
type:
|
|
3916
|
-
shape:
|
|
3917
|
-
pcb_component_id:
|
|
3918
|
-
pcb_group_id:
|
|
3919
|
-
subcircuit_id:
|
|
3920
|
-
outline:
|
|
3934
|
+
import { z as z171 } from "zod";
|
|
3935
|
+
var pcb_keepout_outline = z171.object({
|
|
3936
|
+
type: z171.literal("pcb_keepout"),
|
|
3937
|
+
shape: z171.literal("outline"),
|
|
3938
|
+
pcb_component_id: z171.string().optional(),
|
|
3939
|
+
pcb_group_id: z171.string().optional(),
|
|
3940
|
+
subcircuit_id: z171.string().optional(),
|
|
3941
|
+
outline: z171.array(point).min(2),
|
|
3921
3942
|
stroke_width: length,
|
|
3922
|
-
pcb_keepout_id:
|
|
3923
|
-
layers:
|
|
3924
|
-
description:
|
|
3925
|
-
excluded_pcb_component_ids:
|
|
3926
|
-
warning_only:
|
|
3927
|
-
allow_traces:
|
|
3928
|
-
allow_placements:
|
|
3929
|
-
});
|
|
3930
|
-
var pcb_keepout =
|
|
3931
|
-
type:
|
|
3932
|
-
shape:
|
|
3933
|
-
pcb_component_id:
|
|
3934
|
-
pcb_group_id:
|
|
3935
|
-
subcircuit_id:
|
|
3943
|
+
pcb_keepout_id: z171.string(),
|
|
3944
|
+
layers: z171.array(z171.string()),
|
|
3945
|
+
description: z171.string().optional(),
|
|
3946
|
+
excluded_pcb_component_ids: z171.array(z171.string()).optional(),
|
|
3947
|
+
warning_only: z171.boolean().optional(),
|
|
3948
|
+
allow_traces: z171.boolean().optional(),
|
|
3949
|
+
allow_placements: z171.boolean().optional()
|
|
3950
|
+
});
|
|
3951
|
+
var pcb_keepout = z171.object({
|
|
3952
|
+
type: z171.literal("pcb_keepout"),
|
|
3953
|
+
shape: z171.literal("rect"),
|
|
3954
|
+
pcb_component_id: z171.string().optional(),
|
|
3955
|
+
pcb_group_id: z171.string().optional(),
|
|
3956
|
+
subcircuit_id: z171.string().optional(),
|
|
3936
3957
|
center: point,
|
|
3937
3958
|
width: distance,
|
|
3938
3959
|
height: distance,
|
|
3939
|
-
pcb_keepout_id:
|
|
3940
|
-
layers:
|
|
3960
|
+
pcb_keepout_id: z171.string(),
|
|
3961
|
+
layers: z171.array(z171.string()),
|
|
3941
3962
|
// Specify layers where the keepout applies
|
|
3942
|
-
description:
|
|
3963
|
+
description: z171.string().optional(),
|
|
3943
3964
|
// Optional description of the keepout
|
|
3944
|
-
excluded_pcb_component_ids:
|
|
3945
|
-
warning_only:
|
|
3946
|
-
allow_traces:
|
|
3947
|
-
allow_placements:
|
|
3965
|
+
excluded_pcb_component_ids: z171.array(z171.string()).optional(),
|
|
3966
|
+
warning_only: z171.boolean().optional(),
|
|
3967
|
+
allow_traces: z171.boolean().optional(),
|
|
3968
|
+
allow_placements: z171.boolean().optional()
|
|
3948
3969
|
}).or(
|
|
3949
|
-
|
|
3950
|
-
type:
|
|
3951
|
-
shape:
|
|
3952
|
-
pcb_component_id:
|
|
3953
|
-
pcb_group_id:
|
|
3954
|
-
subcircuit_id:
|
|
3970
|
+
z171.object({
|
|
3971
|
+
type: z171.literal("pcb_keepout"),
|
|
3972
|
+
shape: z171.literal("circle"),
|
|
3973
|
+
pcb_component_id: z171.string().optional(),
|
|
3974
|
+
pcb_group_id: z171.string().optional(),
|
|
3975
|
+
subcircuit_id: z171.string().optional(),
|
|
3955
3976
|
center: point,
|
|
3956
3977
|
radius: distance,
|
|
3957
|
-
pcb_keepout_id:
|
|
3958
|
-
layers:
|
|
3978
|
+
pcb_keepout_id: z171.string(),
|
|
3979
|
+
layers: z171.array(z171.string()),
|
|
3959
3980
|
// Specify layers where the keepout applies
|
|
3960
|
-
description:
|
|
3981
|
+
description: z171.string().optional(),
|
|
3961
3982
|
// Optional description of the keepout
|
|
3962
|
-
excluded_pcb_component_ids:
|
|
3963
|
-
warning_only:
|
|
3964
|
-
allow_traces:
|
|
3965
|
-
allow_placements:
|
|
3983
|
+
excluded_pcb_component_ids: z171.array(z171.string()).optional(),
|
|
3984
|
+
warning_only: z171.boolean().optional(),
|
|
3985
|
+
allow_traces: z171.boolean().optional(),
|
|
3986
|
+
allow_placements: z171.boolean().optional()
|
|
3966
3987
|
})
|
|
3967
3988
|
).or(pcb_keepout_outline);
|
|
3968
3989
|
expectTypesMatch(true);
|
|
3969
3990
|
expectTypesMatch(true);
|
|
3970
3991
|
|
|
3971
3992
|
// src/pcb/pcb_keepout_overlap_warning.ts
|
|
3972
|
-
import { z as
|
|
3973
|
-
var pcb_keepout_overlap_warning =
|
|
3974
|
-
type:
|
|
3993
|
+
import { z as z172 } from "zod";
|
|
3994
|
+
var pcb_keepout_overlap_warning = z172.object({
|
|
3995
|
+
type: z172.literal("pcb_keepout_overlap_warning"),
|
|
3975
3996
|
pcb_keepout_overlap_warning_id: getZodPrefixedIdWithDefault(
|
|
3976
3997
|
"pcb_keepout_overlap_warning"
|
|
3977
3998
|
),
|
|
3978
|
-
warning_type:
|
|
3979
|
-
message:
|
|
3980
|
-
pcb_keepout_id:
|
|
3981
|
-
pcb_component_ids:
|
|
3982
|
-
pcb_trace_ids:
|
|
3983
|
-
pcb_smtpad_ids:
|
|
3984
|
-
pcb_plated_hole_ids:
|
|
3985
|
-
pcb_via_ids:
|
|
3999
|
+
warning_type: z172.literal("pcb_keepout_overlap_warning").default("pcb_keepout_overlap_warning"),
|
|
4000
|
+
message: z172.string(),
|
|
4001
|
+
pcb_keepout_id: z172.string(),
|
|
4002
|
+
pcb_component_ids: z172.array(z172.string()).optional(),
|
|
4003
|
+
pcb_trace_ids: z172.array(z172.string()).optional(),
|
|
4004
|
+
pcb_smtpad_ids: z172.array(z172.string()).optional(),
|
|
4005
|
+
pcb_plated_hole_ids: z172.array(z172.string()).optional(),
|
|
4006
|
+
pcb_via_ids: z172.array(z172.string()).optional(),
|
|
3986
4007
|
center: point.optional(),
|
|
3987
|
-
subcircuit_id:
|
|
4008
|
+
subcircuit_id: z172.string().optional()
|
|
3988
4009
|
}).describe(
|
|
3989
4010
|
"Warning emitted when copper overlaps a PCB keepout with warning_only enabled"
|
|
3990
4011
|
);
|
|
@@ -3993,18 +4014,18 @@ expectTypesMatch(
|
|
|
3993
4014
|
);
|
|
3994
4015
|
|
|
3995
4016
|
// src/pcb/pcb_cutout.ts
|
|
3996
|
-
import { z as
|
|
3997
|
-
var pcb_cutout_base =
|
|
3998
|
-
type:
|
|
4017
|
+
import { z as z173 } from "zod";
|
|
4018
|
+
var pcb_cutout_base = z173.object({
|
|
4019
|
+
type: z173.literal("pcb_cutout"),
|
|
3999
4020
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
4000
|
-
pcb_component_id:
|
|
4001
|
-
pcb_group_id:
|
|
4002
|
-
subcircuit_id:
|
|
4003
|
-
pcb_board_id:
|
|
4004
|
-
pcb_panel_id:
|
|
4021
|
+
pcb_component_id: z173.string().optional(),
|
|
4022
|
+
pcb_group_id: z173.string().optional(),
|
|
4023
|
+
subcircuit_id: z173.string().optional(),
|
|
4024
|
+
pcb_board_id: z173.string().optional(),
|
|
4025
|
+
pcb_panel_id: z173.string().optional()
|
|
4005
4026
|
});
|
|
4006
4027
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
4007
|
-
shape:
|
|
4028
|
+
shape: z173.literal("rect"),
|
|
4008
4029
|
center: point,
|
|
4009
4030
|
width: length,
|
|
4010
4031
|
height: length,
|
|
@@ -4013,26 +4034,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
4013
4034
|
});
|
|
4014
4035
|
expectTypesMatch(true);
|
|
4015
4036
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
4016
|
-
shape:
|
|
4037
|
+
shape: z173.literal("circle"),
|
|
4017
4038
|
center: point,
|
|
4018
4039
|
radius: length
|
|
4019
4040
|
});
|
|
4020
4041
|
expectTypesMatch(true);
|
|
4021
4042
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
4022
|
-
shape:
|
|
4023
|
-
points:
|
|
4043
|
+
shape: z173.literal("polygon"),
|
|
4044
|
+
points: z173.array(point)
|
|
4024
4045
|
});
|
|
4025
4046
|
expectTypesMatch(true);
|
|
4026
4047
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
4027
|
-
shape:
|
|
4028
|
-
route:
|
|
4048
|
+
shape: z173.literal("path"),
|
|
4049
|
+
route: z173.array(point),
|
|
4029
4050
|
slot_width: length,
|
|
4030
4051
|
slot_length: length.optional(),
|
|
4031
4052
|
space_between_slots: length.optional(),
|
|
4032
4053
|
slot_corner_radius: length.optional()
|
|
4033
4054
|
});
|
|
4034
4055
|
expectTypesMatch(true);
|
|
4035
|
-
var pcb_cutout =
|
|
4056
|
+
var pcb_cutout = z173.discriminatedUnion("shape", [
|
|
4036
4057
|
pcb_cutout_rect,
|
|
4037
4058
|
pcb_cutout_circle,
|
|
4038
4059
|
pcb_cutout_polygon,
|
|
@@ -4041,223 +4062,223 @@ var pcb_cutout = z172.discriminatedUnion("shape", [
|
|
|
4041
4062
|
expectTypesMatch(true);
|
|
4042
4063
|
|
|
4043
4064
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
4044
|
-
import { z as
|
|
4065
|
+
import { z as z174 } from "zod";
|
|
4045
4066
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
4046
|
-
type:
|
|
4067
|
+
type: z174.literal("pcb_missing_footprint_error"),
|
|
4047
4068
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
4048
4069
|
"pcb_missing_footprint_error"
|
|
4049
4070
|
),
|
|
4050
|
-
pcb_group_id:
|
|
4051
|
-
subcircuit_id:
|
|
4052
|
-
error_type:
|
|
4053
|
-
source_component_id:
|
|
4071
|
+
pcb_group_id: z174.string().optional(),
|
|
4072
|
+
subcircuit_id: z174.string().optional(),
|
|
4073
|
+
error_type: z174.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
4074
|
+
source_component_id: z174.string()
|
|
4054
4075
|
}).describe("Defines a missing footprint error on the PCB");
|
|
4055
4076
|
expectTypesMatch(
|
|
4056
4077
|
true
|
|
4057
4078
|
);
|
|
4058
4079
|
|
|
4059
4080
|
// src/pcb/external_footprint_load_error.ts
|
|
4060
|
-
import { z as
|
|
4081
|
+
import { z as z175 } from "zod";
|
|
4061
4082
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
4062
|
-
type:
|
|
4083
|
+
type: z175.literal("external_footprint_load_error"),
|
|
4063
4084
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
4064
4085
|
"external_footprint_load_error"
|
|
4065
4086
|
),
|
|
4066
|
-
pcb_component_id:
|
|
4067
|
-
source_component_id:
|
|
4068
|
-
pcb_group_id:
|
|
4069
|
-
subcircuit_id:
|
|
4070
|
-
footprinter_string:
|
|
4071
|
-
error_type:
|
|
4087
|
+
pcb_component_id: z175.string(),
|
|
4088
|
+
source_component_id: z175.string(),
|
|
4089
|
+
pcb_group_id: z175.string().optional(),
|
|
4090
|
+
subcircuit_id: z175.string().optional(),
|
|
4091
|
+
footprinter_string: z175.string().optional(),
|
|
4092
|
+
error_type: z175.literal("external_footprint_load_error").default("external_footprint_load_error")
|
|
4072
4093
|
}).describe("Defines an error when an external footprint fails to load");
|
|
4073
4094
|
expectTypesMatch(true);
|
|
4074
4095
|
|
|
4075
4096
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
4076
|
-
import { z as
|
|
4097
|
+
import { z as z176 } from "zod";
|
|
4077
4098
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
4078
|
-
type:
|
|
4099
|
+
type: z176.literal("circuit_json_footprint_load_error"),
|
|
4079
4100
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
4080
4101
|
"circuit_json_footprint_load_error"
|
|
4081
4102
|
),
|
|
4082
|
-
pcb_component_id:
|
|
4083
|
-
source_component_id:
|
|
4084
|
-
pcb_group_id:
|
|
4085
|
-
subcircuit_id:
|
|
4086
|
-
error_type:
|
|
4087
|
-
circuit_json:
|
|
4103
|
+
pcb_component_id: z176.string(),
|
|
4104
|
+
source_component_id: z176.string(),
|
|
4105
|
+
pcb_group_id: z176.string().optional(),
|
|
4106
|
+
subcircuit_id: z176.string().optional(),
|
|
4107
|
+
error_type: z176.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
4108
|
+
circuit_json: z176.array(z176.any()).optional()
|
|
4088
4109
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
4089
4110
|
expectTypesMatch(true);
|
|
4090
4111
|
|
|
4091
4112
|
// src/pcb/pcb_group.ts
|
|
4092
|
-
import { z as
|
|
4093
|
-
var pcb_group =
|
|
4094
|
-
type:
|
|
4113
|
+
import { z as z177 } from "zod";
|
|
4114
|
+
var pcb_group = z177.object({
|
|
4115
|
+
type: z177.literal("pcb_group"),
|
|
4095
4116
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
4096
|
-
source_group_id:
|
|
4097
|
-
is_subcircuit:
|
|
4098
|
-
subcircuit_id:
|
|
4117
|
+
source_group_id: z177.string(),
|
|
4118
|
+
is_subcircuit: z177.boolean().optional(),
|
|
4119
|
+
subcircuit_id: z177.string().optional(),
|
|
4099
4120
|
width: length.optional(),
|
|
4100
4121
|
height: length.optional(),
|
|
4101
4122
|
center: point,
|
|
4102
|
-
display_offset_x:
|
|
4123
|
+
display_offset_x: z177.string().optional().describe(
|
|
4103
4124
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
4104
4125
|
),
|
|
4105
|
-
display_offset_y:
|
|
4126
|
+
display_offset_y: z177.string().optional().describe(
|
|
4106
4127
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
4107
4128
|
),
|
|
4108
|
-
outline:
|
|
4129
|
+
outline: z177.array(point).optional(),
|
|
4109
4130
|
anchor_position: point.optional(),
|
|
4110
4131
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
4111
|
-
position_mode:
|
|
4112
|
-
positioned_relative_to_pcb_group_id:
|
|
4113
|
-
positioned_relative_to_pcb_board_id:
|
|
4114
|
-
pcb_component_ids:
|
|
4115
|
-
child_layout_mode:
|
|
4116
|
-
name:
|
|
4117
|
-
description:
|
|
4118
|
-
layout_mode:
|
|
4119
|
-
autorouter_configuration:
|
|
4132
|
+
position_mode: z177.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
4133
|
+
positioned_relative_to_pcb_group_id: z177.string().optional(),
|
|
4134
|
+
positioned_relative_to_pcb_board_id: z177.string().optional(),
|
|
4135
|
+
pcb_component_ids: z177.array(z177.string()),
|
|
4136
|
+
child_layout_mode: z177.enum(["packed", "none"]).optional(),
|
|
4137
|
+
name: z177.string().optional(),
|
|
4138
|
+
description: z177.string().optional(),
|
|
4139
|
+
layout_mode: z177.string().optional(),
|
|
4140
|
+
autorouter_configuration: z177.object({
|
|
4120
4141
|
trace_clearance: length
|
|
4121
4142
|
}).optional(),
|
|
4122
|
-
autorouter_used_string:
|
|
4143
|
+
autorouter_used_string: z177.string().optional()
|
|
4123
4144
|
}).describe("Defines a group of components on the PCB");
|
|
4124
4145
|
expectTypesMatch(true);
|
|
4125
4146
|
|
|
4126
4147
|
// src/pcb/pcb_autorouting_error.ts
|
|
4127
|
-
import { z as
|
|
4148
|
+
import { z as z178 } from "zod";
|
|
4128
4149
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
4129
|
-
type:
|
|
4150
|
+
type: z178.literal("pcb_autorouting_error"),
|
|
4130
4151
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
4131
|
-
error_type:
|
|
4132
|
-
subcircuit_id:
|
|
4152
|
+
error_type: z178.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
4153
|
+
subcircuit_id: z178.string().optional()
|
|
4133
4154
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
4134
4155
|
expectTypesMatch(true);
|
|
4135
4156
|
|
|
4136
4157
|
// src/pcb/pcb_preflight_routing_error.ts
|
|
4137
|
-
import { z as
|
|
4158
|
+
import { z as z179 } from "zod";
|
|
4138
4159
|
var pcb_preflight_routing_error = base_circuit_json_error.extend({
|
|
4139
|
-
type:
|
|
4160
|
+
type: z179.literal("pcb_preflight_routing_error"),
|
|
4140
4161
|
pcb_preflight_routing_error_id: getZodPrefixedIdWithDefault(
|
|
4141
4162
|
"pcb_preflight_routing_error"
|
|
4142
4163
|
),
|
|
4143
|
-
error_type:
|
|
4144
|
-
error_code:
|
|
4145
|
-
subcircuit_id:
|
|
4146
|
-
pcb_group_id:
|
|
4147
|
-
routing_phase_index:
|
|
4148
|
-
phase_name:
|
|
4149
|
-
source_trace_ids:
|
|
4150
|
-
pcb_component_ids:
|
|
4151
|
-
pcb_port_ids:
|
|
4152
|
-
related_error_ids:
|
|
4153
|
-
measurements:
|
|
4164
|
+
error_type: z179.literal("pcb_preflight_routing_error").default("pcb_preflight_routing_error"),
|
|
4165
|
+
error_code: z179.string(),
|
|
4166
|
+
subcircuit_id: z179.string().optional(),
|
|
4167
|
+
pcb_group_id: z179.string().optional(),
|
|
4168
|
+
routing_phase_index: z179.number().int().optional(),
|
|
4169
|
+
phase_name: z179.string().optional(),
|
|
4170
|
+
source_trace_ids: z179.array(z179.string()).optional(),
|
|
4171
|
+
pcb_component_ids: z179.array(z179.string()).optional(),
|
|
4172
|
+
pcb_port_ids: z179.array(z179.string()).optional(),
|
|
4173
|
+
related_error_ids: z179.array(z179.string()).optional(),
|
|
4174
|
+
measurements: z179.record(z179.number().finite()).optional()
|
|
4154
4175
|
});
|
|
4155
4176
|
expectTypesMatch(true);
|
|
4156
4177
|
|
|
4157
4178
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
4158
|
-
import { z as
|
|
4159
|
-
var pcb_manual_edit_conflict_warning =
|
|
4160
|
-
type:
|
|
4179
|
+
import { z as z180 } from "zod";
|
|
4180
|
+
var pcb_manual_edit_conflict_warning = z180.object({
|
|
4181
|
+
type: z180.literal("pcb_manual_edit_conflict_warning"),
|
|
4161
4182
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
4162
4183
|
"pcb_manual_edit_conflict_warning"
|
|
4163
4184
|
),
|
|
4164
|
-
warning_type:
|
|
4165
|
-
message:
|
|
4166
|
-
pcb_component_id:
|
|
4167
|
-
pcb_group_id:
|
|
4168
|
-
subcircuit_id:
|
|
4169
|
-
source_component_id:
|
|
4185
|
+
warning_type: z180.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
4186
|
+
message: z180.string(),
|
|
4187
|
+
pcb_component_id: z180.string(),
|
|
4188
|
+
pcb_group_id: z180.string().optional(),
|
|
4189
|
+
subcircuit_id: z180.string().optional(),
|
|
4190
|
+
source_component_id: z180.string()
|
|
4170
4191
|
}).describe(
|
|
4171
4192
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
4172
4193
|
);
|
|
4173
4194
|
expectTypesMatch(true);
|
|
4174
4195
|
|
|
4175
4196
|
// src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts
|
|
4176
|
-
import { z as
|
|
4177
|
-
var connectorOrientationDirection =
|
|
4178
|
-
var pcb_connector_not_in_accessible_orientation_warning =
|
|
4179
|
-
type:
|
|
4197
|
+
import { z as z181 } from "zod";
|
|
4198
|
+
var connectorOrientationDirection = z181.enum(["x-", "x+", "y+", "y-"]);
|
|
4199
|
+
var pcb_connector_not_in_accessible_orientation_warning = z181.object({
|
|
4200
|
+
type: z181.literal("pcb_connector_not_in_accessible_orientation_warning"),
|
|
4180
4201
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
4181
4202
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
4182
4203
|
),
|
|
4183
|
-
warning_type:
|
|
4184
|
-
message:
|
|
4185
|
-
pcb_component_id:
|
|
4186
|
-
source_component_id:
|
|
4187
|
-
pcb_board_id:
|
|
4204
|
+
warning_type: z181.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
|
|
4205
|
+
message: z181.string(),
|
|
4206
|
+
pcb_component_id: z181.string(),
|
|
4207
|
+
source_component_id: z181.string().optional(),
|
|
4208
|
+
pcb_board_id: z181.string().optional(),
|
|
4188
4209
|
facing_direction: connectorOrientationDirection,
|
|
4189
4210
|
recommended_facing_direction: connectorOrientationDirection,
|
|
4190
|
-
subcircuit_id:
|
|
4211
|
+
subcircuit_id: z181.string().optional()
|
|
4191
4212
|
}).describe(
|
|
4192
4213
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
4193
4214
|
);
|
|
4194
4215
|
expectTypesMatch(true);
|
|
4195
4216
|
|
|
4196
4217
|
// src/pcb/pcb_component_missing_courtyard_warning.ts
|
|
4197
|
-
import { z as
|
|
4198
|
-
var pcb_component_missing_courtyard_warning =
|
|
4199
|
-
type:
|
|
4218
|
+
import { z as z182 } from "zod";
|
|
4219
|
+
var pcb_component_missing_courtyard_warning = z182.object({
|
|
4220
|
+
type: z182.literal("pcb_component_missing_courtyard_warning"),
|
|
4200
4221
|
pcb_component_missing_courtyard_warning_id: getZodPrefixedIdWithDefault(
|
|
4201
4222
|
"pcb_component_missing_courtyard_warning"
|
|
4202
4223
|
),
|
|
4203
|
-
warning_type:
|
|
4204
|
-
message:
|
|
4205
|
-
pcb_component_id:
|
|
4206
|
-
source_component_id:
|
|
4207
|
-
subcircuit_id:
|
|
4224
|
+
warning_type: z182.literal("pcb_component_missing_courtyard_warning").default("pcb_component_missing_courtyard_warning"),
|
|
4225
|
+
message: z182.string(),
|
|
4226
|
+
pcb_component_id: z182.string(),
|
|
4227
|
+
source_component_id: z182.string().optional(),
|
|
4228
|
+
subcircuit_id: z182.string().optional()
|
|
4208
4229
|
}).describe("Warning emitted when a PCB component has no courtyard geometry");
|
|
4209
4230
|
expectTypesMatch(true);
|
|
4210
4231
|
|
|
4211
4232
|
// src/pcb/supplier_footprint_mismatch_warning.ts
|
|
4212
|
-
import { z as
|
|
4213
|
-
var supplier_footprint_mismatch_warning =
|
|
4214
|
-
type:
|
|
4233
|
+
import { z as z183 } from "zod";
|
|
4234
|
+
var supplier_footprint_mismatch_warning = z183.object({
|
|
4235
|
+
type: z183.literal("supplier_footprint_mismatch_warning"),
|
|
4215
4236
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
4216
4237
|
"supplier_footprint_mismatch_warning"
|
|
4217
4238
|
),
|
|
4218
|
-
warning_type:
|
|
4219
|
-
message:
|
|
4220
|
-
source_component_id:
|
|
4221
|
-
pcb_component_id:
|
|
4222
|
-
pcb_group_id:
|
|
4223
|
-
subcircuit_id:
|
|
4239
|
+
warning_type: z183.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
|
|
4240
|
+
message: z183.string(),
|
|
4241
|
+
source_component_id: z183.string(),
|
|
4242
|
+
pcb_component_id: z183.string().optional(),
|
|
4243
|
+
pcb_group_id: z183.string().optional(),
|
|
4244
|
+
subcircuit_id: z183.string().optional(),
|
|
4224
4245
|
supplier_name: supplier_name.optional(),
|
|
4225
|
-
supplier_part_number:
|
|
4226
|
-
supplier_footprint_url:
|
|
4227
|
-
footprint_copper_intersection_over_union:
|
|
4246
|
+
supplier_part_number: z183.string().optional(),
|
|
4247
|
+
supplier_footprint_url: z183.string().optional(),
|
|
4248
|
+
footprint_copper_intersection_over_union: z183.number()
|
|
4228
4249
|
}).describe(
|
|
4229
4250
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
4230
4251
|
);
|
|
4231
4252
|
expectTypesMatch(true);
|
|
4232
4253
|
|
|
4233
4254
|
// src/pcb/pcb_fabricator_extra_charge_warning.ts
|
|
4234
|
-
import { z as
|
|
4235
|
-
var pcb_fabricator_extra_charge_warning =
|
|
4236
|
-
type:
|
|
4255
|
+
import { z as z184 } from "zod";
|
|
4256
|
+
var pcb_fabricator_extra_charge_warning = z184.object({
|
|
4257
|
+
type: z184.literal("pcb_fabricator_extra_charge_warning"),
|
|
4237
4258
|
pcb_fabricator_extra_charge_warning_id: getZodPrefixedIdWithDefault(
|
|
4238
4259
|
"pcb_fabricator_extra_charge_warning"
|
|
4239
4260
|
),
|
|
4240
|
-
warning_type:
|
|
4241
|
-
message:
|
|
4242
|
-
fabricator_preset:
|
|
4243
|
-
pcb_board_id:
|
|
4244
|
-
pcb_via_ids:
|
|
4245
|
-
subcircuit_id:
|
|
4261
|
+
warning_type: z184.literal("pcb_fabricator_extra_charge_warning").default("pcb_fabricator_extra_charge_warning"),
|
|
4262
|
+
message: z184.string(),
|
|
4263
|
+
fabricator_preset: z184.string(),
|
|
4264
|
+
pcb_board_id: z184.string().optional(),
|
|
4265
|
+
pcb_via_ids: z184.array(z184.string()).optional(),
|
|
4266
|
+
subcircuit_id: z184.string().optional()
|
|
4246
4267
|
}).describe(
|
|
4247
4268
|
"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."
|
|
4248
4269
|
);
|
|
4249
4270
|
expectTypesMatch(true);
|
|
4250
4271
|
|
|
4251
4272
|
// src/pcb/pcb_breakout_point.ts
|
|
4252
|
-
import { z as
|
|
4253
|
-
var pcb_breakout_point =
|
|
4254
|
-
type:
|
|
4273
|
+
import { z as z185 } from "zod";
|
|
4274
|
+
var pcb_breakout_point = z185.object({
|
|
4275
|
+
type: z185.literal("pcb_breakout_point"),
|
|
4255
4276
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
4256
|
-
pcb_group_id:
|
|
4257
|
-
subcircuit_id:
|
|
4258
|
-
source_trace_id:
|
|
4259
|
-
source_port_id:
|
|
4260
|
-
source_net_id:
|
|
4277
|
+
pcb_group_id: z185.string(),
|
|
4278
|
+
subcircuit_id: z185.string().optional(),
|
|
4279
|
+
source_trace_id: z185.string().optional(),
|
|
4280
|
+
source_port_id: z185.string().optional(),
|
|
4281
|
+
source_net_id: z185.string().optional(),
|
|
4261
4282
|
layer: layer_ref.optional(),
|
|
4262
4283
|
x: distance,
|
|
4263
4284
|
y: distance
|
|
@@ -4267,61 +4288,61 @@ var pcb_breakout_point = z184.object({
|
|
|
4267
4288
|
expectTypesMatch(true);
|
|
4268
4289
|
|
|
4269
4290
|
// src/pcb/pcb_ground_plane.ts
|
|
4270
|
-
import { z as
|
|
4271
|
-
var pcb_ground_plane =
|
|
4272
|
-
type:
|
|
4291
|
+
import { z as z186 } from "zod";
|
|
4292
|
+
var pcb_ground_plane = z186.object({
|
|
4293
|
+
type: z186.literal("pcb_ground_plane"),
|
|
4273
4294
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
4274
|
-
source_pcb_ground_plane_id:
|
|
4275
|
-
source_net_id:
|
|
4276
|
-
pcb_group_id:
|
|
4277
|
-
subcircuit_id:
|
|
4295
|
+
source_pcb_ground_plane_id: z186.string(),
|
|
4296
|
+
source_net_id: z186.string(),
|
|
4297
|
+
pcb_group_id: z186.string().optional(),
|
|
4298
|
+
subcircuit_id: z186.string().optional()
|
|
4278
4299
|
}).describe("Defines a ground plane on the PCB");
|
|
4279
4300
|
expectTypesMatch(true);
|
|
4280
4301
|
|
|
4281
4302
|
// src/pcb/pcb_ground_plane_region.ts
|
|
4282
|
-
import { z as
|
|
4283
|
-
var pcb_ground_plane_region =
|
|
4284
|
-
type:
|
|
4303
|
+
import { z as z187 } from "zod";
|
|
4304
|
+
var pcb_ground_plane_region = z187.object({
|
|
4305
|
+
type: z187.literal("pcb_ground_plane_region"),
|
|
4285
4306
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
4286
4307
|
"pcb_ground_plane_region"
|
|
4287
4308
|
),
|
|
4288
|
-
pcb_ground_plane_id:
|
|
4289
|
-
pcb_group_id:
|
|
4290
|
-
subcircuit_id:
|
|
4309
|
+
pcb_ground_plane_id: z187.string(),
|
|
4310
|
+
pcb_group_id: z187.string().optional(),
|
|
4311
|
+
subcircuit_id: z187.string().optional(),
|
|
4291
4312
|
layer: layer_ref,
|
|
4292
|
-
points:
|
|
4313
|
+
points: z187.array(point)
|
|
4293
4314
|
}).describe("Defines a polygon region of a ground plane");
|
|
4294
4315
|
expectTypesMatch(true);
|
|
4295
4316
|
|
|
4296
4317
|
// src/pcb/pcb_thermal_spoke.ts
|
|
4297
|
-
import { z as
|
|
4298
|
-
var pcb_thermal_spoke =
|
|
4299
|
-
type:
|
|
4318
|
+
import { z as z188 } from "zod";
|
|
4319
|
+
var pcb_thermal_spoke = z188.object({
|
|
4320
|
+
type: z188.literal("pcb_thermal_spoke"),
|
|
4300
4321
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
4301
|
-
pcb_ground_plane_id:
|
|
4302
|
-
shape:
|
|
4303
|
-
spoke_count:
|
|
4322
|
+
pcb_ground_plane_id: z188.string(),
|
|
4323
|
+
shape: z188.string(),
|
|
4324
|
+
spoke_count: z188.number(),
|
|
4304
4325
|
spoke_thickness: distance,
|
|
4305
4326
|
spoke_inner_diameter: distance,
|
|
4306
4327
|
spoke_outer_diameter: distance,
|
|
4307
|
-
pcb_plated_hole_id:
|
|
4308
|
-
subcircuit_id:
|
|
4328
|
+
pcb_plated_hole_id: z188.string().optional(),
|
|
4329
|
+
subcircuit_id: z188.string().optional()
|
|
4309
4330
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
4310
4331
|
expectTypesMatch(true);
|
|
4311
4332
|
|
|
4312
4333
|
// src/pcb/pcb_copper_pour.ts
|
|
4313
|
-
import { z as
|
|
4314
|
-
var pcb_copper_pour_base =
|
|
4315
|
-
type:
|
|
4334
|
+
import { z as z189 } from "zod";
|
|
4335
|
+
var pcb_copper_pour_base = z189.object({
|
|
4336
|
+
type: z189.literal("pcb_copper_pour"),
|
|
4316
4337
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
4317
|
-
pcb_group_id:
|
|
4318
|
-
subcircuit_id:
|
|
4338
|
+
pcb_group_id: z189.string().optional(),
|
|
4339
|
+
subcircuit_id: z189.string().optional(),
|
|
4319
4340
|
layer: layer_ref,
|
|
4320
|
-
source_net_id:
|
|
4321
|
-
covered_with_solder_mask:
|
|
4341
|
+
source_net_id: z189.string().optional(),
|
|
4342
|
+
covered_with_solder_mask: z189.boolean().optional().default(true)
|
|
4322
4343
|
});
|
|
4323
4344
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
4324
|
-
shape:
|
|
4345
|
+
shape: z189.literal("rect"),
|
|
4325
4346
|
center: point,
|
|
4326
4347
|
width: length,
|
|
4327
4348
|
height: length,
|
|
@@ -4329,16 +4350,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
4329
4350
|
});
|
|
4330
4351
|
expectTypesMatch(true);
|
|
4331
4352
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
4332
|
-
shape:
|
|
4353
|
+
shape: z189.literal("brep"),
|
|
4333
4354
|
brep_shape
|
|
4334
4355
|
});
|
|
4335
4356
|
expectTypesMatch(true);
|
|
4336
4357
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
4337
|
-
shape:
|
|
4338
|
-
points:
|
|
4358
|
+
shape: z189.literal("polygon"),
|
|
4359
|
+
points: z189.array(point)
|
|
4339
4360
|
});
|
|
4340
4361
|
expectTypesMatch(true);
|
|
4341
|
-
var pcb_copper_pour =
|
|
4362
|
+
var pcb_copper_pour = z189.discriminatedUnion("shape", [
|
|
4342
4363
|
pcb_copper_pour_rect,
|
|
4343
4364
|
pcb_copper_pour_brep,
|
|
4344
4365
|
pcb_copper_pour_polygon
|
|
@@ -4346,99 +4367,99 @@ var pcb_copper_pour = z188.discriminatedUnion("shape", [
|
|
|
4346
4367
|
expectTypesMatch(true);
|
|
4347
4368
|
|
|
4348
4369
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
4349
|
-
import { z as
|
|
4370
|
+
import { z as z190 } from "zod";
|
|
4350
4371
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
4351
|
-
type:
|
|
4372
|
+
type: z190.literal("pcb_component_outside_board_error"),
|
|
4352
4373
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
4353
4374
|
"pcb_component_outside_board_error"
|
|
4354
4375
|
),
|
|
4355
|
-
error_type:
|
|
4356
|
-
pcb_component_id:
|
|
4357
|
-
pcb_board_id:
|
|
4376
|
+
error_type: z190.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
4377
|
+
pcb_component_id: z190.string(),
|
|
4378
|
+
pcb_board_id: z190.string(),
|
|
4358
4379
|
component_center: point,
|
|
4359
|
-
component_bounds:
|
|
4360
|
-
min_x:
|
|
4361
|
-
max_x:
|
|
4362
|
-
min_y:
|
|
4363
|
-
max_y:
|
|
4380
|
+
component_bounds: z190.object({
|
|
4381
|
+
min_x: z190.number(),
|
|
4382
|
+
max_x: z190.number(),
|
|
4383
|
+
min_y: z190.number(),
|
|
4384
|
+
max_y: z190.number()
|
|
4364
4385
|
}),
|
|
4365
|
-
subcircuit_id:
|
|
4366
|
-
source_component_id:
|
|
4386
|
+
subcircuit_id: z190.string().optional(),
|
|
4387
|
+
source_component_id: z190.string().optional()
|
|
4367
4388
|
}).describe(
|
|
4368
4389
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
4369
4390
|
);
|
|
4370
4391
|
expectTypesMatch(true);
|
|
4371
4392
|
|
|
4372
4393
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
4373
|
-
import { z as
|
|
4394
|
+
import { z as z191 } from "zod";
|
|
4374
4395
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
4375
|
-
type:
|
|
4396
|
+
type: z191.literal("pcb_component_not_on_board_edge_error"),
|
|
4376
4397
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
4377
4398
|
"pcb_component_not_on_board_edge_error"
|
|
4378
4399
|
),
|
|
4379
|
-
error_type:
|
|
4380
|
-
pcb_component_id:
|
|
4381
|
-
pcb_board_id:
|
|
4400
|
+
error_type: z191.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
4401
|
+
pcb_component_id: z191.string(),
|
|
4402
|
+
pcb_board_id: z191.string(),
|
|
4382
4403
|
component_center: point,
|
|
4383
|
-
pad_to_nearest_board_edge_distance:
|
|
4384
|
-
source_component_id:
|
|
4385
|
-
subcircuit_id:
|
|
4404
|
+
pad_to_nearest_board_edge_distance: z191.number(),
|
|
4405
|
+
source_component_id: z191.string().optional(),
|
|
4406
|
+
subcircuit_id: z191.string().optional()
|
|
4386
4407
|
}).describe(
|
|
4387
4408
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
4388
4409
|
);
|
|
4389
4410
|
expectTypesMatch(true);
|
|
4390
4411
|
|
|
4391
4412
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
4392
|
-
import { z as
|
|
4413
|
+
import { z as z192 } from "zod";
|
|
4393
4414
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
4394
|
-
type:
|
|
4415
|
+
type: z192.literal("pcb_component_invalid_layer_error"),
|
|
4395
4416
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
4396
4417
|
"pcb_component_invalid_layer_error"
|
|
4397
4418
|
),
|
|
4398
|
-
error_type:
|
|
4399
|
-
pcb_component_id:
|
|
4400
|
-
source_component_id:
|
|
4419
|
+
error_type: z192.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
4420
|
+
pcb_component_id: z192.string().optional(),
|
|
4421
|
+
source_component_id: z192.string(),
|
|
4401
4422
|
layer: layer_ref,
|
|
4402
|
-
subcircuit_id:
|
|
4423
|
+
subcircuit_id: z192.string().optional()
|
|
4403
4424
|
}).describe(
|
|
4404
4425
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
4405
4426
|
);
|
|
4406
4427
|
expectTypesMatch(true);
|
|
4407
4428
|
|
|
4408
4429
|
// src/pcb/pcb_via_clearance_error.ts
|
|
4409
|
-
import { z as
|
|
4430
|
+
import { z as z193 } from "zod";
|
|
4410
4431
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
4411
|
-
type:
|
|
4432
|
+
type: z193.literal("pcb_via_clearance_error"),
|
|
4412
4433
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
4413
|
-
error_type:
|
|
4414
|
-
pcb_via_ids:
|
|
4434
|
+
error_type: z193.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
4435
|
+
pcb_via_ids: z193.array(z193.string()).min(2),
|
|
4415
4436
|
minimum_clearance: distance.optional(),
|
|
4416
4437
|
actual_clearance: distance.optional(),
|
|
4417
|
-
pcb_center:
|
|
4418
|
-
x:
|
|
4419
|
-
y:
|
|
4438
|
+
pcb_center: z193.object({
|
|
4439
|
+
x: z193.number().optional(),
|
|
4440
|
+
y: z193.number().optional()
|
|
4420
4441
|
}).optional(),
|
|
4421
|
-
subcircuit_id:
|
|
4442
|
+
subcircuit_id: z193.string().optional()
|
|
4422
4443
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
4423
4444
|
expectTypesMatch(true);
|
|
4424
4445
|
|
|
4425
4446
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
4426
|
-
import { z as
|
|
4447
|
+
import { z as z194 } from "zod";
|
|
4427
4448
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
4428
|
-
type:
|
|
4449
|
+
type: z194.literal("pcb_via_trace_clearance_error"),
|
|
4429
4450
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
4430
4451
|
"pcb_via_trace_clearance_error"
|
|
4431
4452
|
),
|
|
4432
|
-
error_type:
|
|
4433
|
-
pcb_via_id:
|
|
4434
|
-
pcb_trace_id:
|
|
4453
|
+
error_type: z194.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
4454
|
+
pcb_via_id: z194.string(),
|
|
4455
|
+
pcb_trace_id: z194.string(),
|
|
4435
4456
|
minimum_clearance: distance.optional(),
|
|
4436
4457
|
actual_clearance: distance.optional(),
|
|
4437
|
-
center:
|
|
4438
|
-
x:
|
|
4439
|
-
y:
|
|
4458
|
+
center: z194.object({
|
|
4459
|
+
x: z194.number().optional(),
|
|
4460
|
+
y: z194.number().optional()
|
|
4440
4461
|
}).optional(),
|
|
4441
|
-
subcircuit_id:
|
|
4462
|
+
subcircuit_id: z194.string().optional()
|
|
4442
4463
|
}).describe(
|
|
4443
4464
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
4444
4465
|
);
|
|
@@ -4447,41 +4468,41 @@ expectTypesMatch(
|
|
|
4447
4468
|
);
|
|
4448
4469
|
|
|
4449
4470
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
4450
|
-
import { z as
|
|
4471
|
+
import { z as z195 } from "zod";
|
|
4451
4472
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
4452
|
-
type:
|
|
4473
|
+
type: z195.literal("pcb_pad_pad_clearance_error"),
|
|
4453
4474
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
4454
4475
|
"pcb_pad_pad_clearance_error"
|
|
4455
4476
|
),
|
|
4456
|
-
error_type:
|
|
4457
|
-
pcb_pad_ids:
|
|
4477
|
+
error_type: z195.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
4478
|
+
pcb_pad_ids: z195.array(z195.string()).min(2),
|
|
4458
4479
|
minimum_clearance: distance.optional(),
|
|
4459
4480
|
actual_clearance: distance.optional(),
|
|
4460
|
-
center:
|
|
4461
|
-
x:
|
|
4462
|
-
y:
|
|
4481
|
+
center: z195.object({
|
|
4482
|
+
x: z195.number().optional(),
|
|
4483
|
+
y: z195.number().optional()
|
|
4463
4484
|
}).optional(),
|
|
4464
|
-
subcircuit_id:
|
|
4485
|
+
subcircuit_id: z195.string().optional()
|
|
4465
4486
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
4466
4487
|
expectTypesMatch(true);
|
|
4467
4488
|
|
|
4468
4489
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
4469
|
-
import { z as
|
|
4490
|
+
import { z as z196 } from "zod";
|
|
4470
4491
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
4471
|
-
type:
|
|
4492
|
+
type: z196.literal("pcb_pad_trace_clearance_error"),
|
|
4472
4493
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
4473
4494
|
"pcb_pad_trace_clearance_error"
|
|
4474
4495
|
),
|
|
4475
|
-
error_type:
|
|
4476
|
-
pcb_pad_id:
|
|
4477
|
-
pcb_trace_id:
|
|
4496
|
+
error_type: z196.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
4497
|
+
pcb_pad_id: z196.string(),
|
|
4498
|
+
pcb_trace_id: z196.string(),
|
|
4478
4499
|
minimum_clearance: distance.optional(),
|
|
4479
4500
|
actual_clearance: distance.optional(),
|
|
4480
|
-
center:
|
|
4481
|
-
x:
|
|
4482
|
-
y:
|
|
4501
|
+
center: z196.object({
|
|
4502
|
+
x: z196.number().optional(),
|
|
4503
|
+
y: z196.number().optional()
|
|
4483
4504
|
}).optional(),
|
|
4484
|
-
subcircuit_id:
|
|
4505
|
+
subcircuit_id: z196.string().optional()
|
|
4485
4506
|
}).describe(
|
|
4486
4507
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
4487
4508
|
);
|
|
@@ -4490,89 +4511,89 @@ expectTypesMatch(
|
|
|
4490
4511
|
);
|
|
4491
4512
|
|
|
4492
4513
|
// src/pcb/pcb_courtyard_rect.ts
|
|
4493
|
-
import { z as
|
|
4494
|
-
var pcb_courtyard_rect =
|
|
4495
|
-
type:
|
|
4514
|
+
import { z as z197 } from "zod";
|
|
4515
|
+
var pcb_courtyard_rect = z197.object({
|
|
4516
|
+
type: z197.literal("pcb_courtyard_rect"),
|
|
4496
4517
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
4497
|
-
pcb_component_id:
|
|
4498
|
-
pcb_group_id:
|
|
4499
|
-
subcircuit_id:
|
|
4518
|
+
pcb_component_id: z197.string(),
|
|
4519
|
+
pcb_group_id: z197.string().optional(),
|
|
4520
|
+
subcircuit_id: z197.string().optional(),
|
|
4500
4521
|
center: point,
|
|
4501
4522
|
width: length,
|
|
4502
4523
|
height: length,
|
|
4503
4524
|
layer: visible_layer,
|
|
4504
4525
|
ccw_rotation: rotation.optional(),
|
|
4505
|
-
color:
|
|
4526
|
+
color: z197.string().optional()
|
|
4506
4527
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
4507
4528
|
expectTypesMatch(true);
|
|
4508
4529
|
|
|
4509
4530
|
// src/pcb/pcb_courtyard_outline.ts
|
|
4510
|
-
import { z as
|
|
4511
|
-
var pcb_courtyard_outline =
|
|
4512
|
-
type:
|
|
4531
|
+
import { z as z198 } from "zod";
|
|
4532
|
+
var pcb_courtyard_outline = z198.object({
|
|
4533
|
+
type: z198.literal("pcb_courtyard_outline"),
|
|
4513
4534
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
4514
4535
|
"pcb_courtyard_outline"
|
|
4515
4536
|
),
|
|
4516
|
-
pcb_component_id:
|
|
4517
|
-
pcb_group_id:
|
|
4518
|
-
subcircuit_id:
|
|
4537
|
+
pcb_component_id: z198.string(),
|
|
4538
|
+
pcb_group_id: z198.string().optional(),
|
|
4539
|
+
subcircuit_id: z198.string().optional(),
|
|
4519
4540
|
layer: visible_layer,
|
|
4520
|
-
outline:
|
|
4541
|
+
outline: z198.array(point).min(2)
|
|
4521
4542
|
}).describe("Defines a courtyard outline on the PCB");
|
|
4522
4543
|
expectTypesMatch(true);
|
|
4523
4544
|
|
|
4524
4545
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
4525
|
-
import { z as
|
|
4526
|
-
var pcb_courtyard_polygon =
|
|
4527
|
-
type:
|
|
4546
|
+
import { z as z199 } from "zod";
|
|
4547
|
+
var pcb_courtyard_polygon = z199.object({
|
|
4548
|
+
type: z199.literal("pcb_courtyard_polygon"),
|
|
4528
4549
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
4529
4550
|
"pcb_courtyard_polygon"
|
|
4530
4551
|
),
|
|
4531
|
-
pcb_component_id:
|
|
4532
|
-
pcb_group_id:
|
|
4533
|
-
subcircuit_id:
|
|
4552
|
+
pcb_component_id: z199.string(),
|
|
4553
|
+
pcb_group_id: z199.string().optional(),
|
|
4554
|
+
subcircuit_id: z199.string().optional(),
|
|
4534
4555
|
layer: visible_layer,
|
|
4535
|
-
points:
|
|
4536
|
-
color:
|
|
4556
|
+
points: z199.array(point).min(3),
|
|
4557
|
+
color: z199.string().optional()
|
|
4537
4558
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
4538
4559
|
expectTypesMatch(true);
|
|
4539
4560
|
|
|
4540
4561
|
// src/pcb/pcb_courtyard_circle.ts
|
|
4541
|
-
import { z as
|
|
4542
|
-
var pcb_courtyard_circle =
|
|
4543
|
-
type:
|
|
4562
|
+
import { z as z200 } from "zod";
|
|
4563
|
+
var pcb_courtyard_circle = z200.object({
|
|
4564
|
+
type: z200.literal("pcb_courtyard_circle"),
|
|
4544
4565
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
4545
4566
|
"pcb_courtyard_circle"
|
|
4546
4567
|
),
|
|
4547
|
-
pcb_component_id:
|
|
4548
|
-
pcb_group_id:
|
|
4549
|
-
subcircuit_id:
|
|
4568
|
+
pcb_component_id: z200.string(),
|
|
4569
|
+
pcb_group_id: z200.string().optional(),
|
|
4570
|
+
subcircuit_id: z200.string().optional(),
|
|
4550
4571
|
center: point,
|
|
4551
4572
|
radius: length,
|
|
4552
4573
|
layer: visible_layer,
|
|
4553
|
-
color:
|
|
4574
|
+
color: z200.string().optional()
|
|
4554
4575
|
}).describe("Defines a courtyard circle on the PCB");
|
|
4555
4576
|
expectTypesMatch(true);
|
|
4556
4577
|
|
|
4557
4578
|
// src/pcb/pcb_courtyard_pill.ts
|
|
4558
|
-
import { z as
|
|
4559
|
-
var pcb_courtyard_pill =
|
|
4560
|
-
type:
|
|
4579
|
+
import { z as z201 } from "zod";
|
|
4580
|
+
var pcb_courtyard_pill = z201.object({
|
|
4581
|
+
type: z201.literal("pcb_courtyard_pill"),
|
|
4561
4582
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
4562
|
-
pcb_component_id:
|
|
4563
|
-
pcb_group_id:
|
|
4564
|
-
subcircuit_id:
|
|
4583
|
+
pcb_component_id: z201.string(),
|
|
4584
|
+
pcb_group_id: z201.string().optional(),
|
|
4585
|
+
subcircuit_id: z201.string().optional(),
|
|
4565
4586
|
center: point,
|
|
4566
4587
|
width: length,
|
|
4567
4588
|
height: length,
|
|
4568
4589
|
radius: length,
|
|
4569
4590
|
layer: visible_layer,
|
|
4570
|
-
color:
|
|
4591
|
+
color: z201.string().optional()
|
|
4571
4592
|
}).describe("Defines a courtyard pill on the PCB");
|
|
4572
4593
|
expectTypesMatch(true);
|
|
4573
4594
|
|
|
4574
4595
|
// src/cad/cad_component.ts
|
|
4575
|
-
import { z as
|
|
4596
|
+
import { z as z202 } from "zod";
|
|
4576
4597
|
|
|
4577
4598
|
// src/cad/cad_model_conventions.ts
|
|
4578
4599
|
var cad_model_formats = [
|
|
@@ -4603,90 +4624,90 @@ var cadModelDefaultDirectionMap = {
|
|
|
4603
4624
|
};
|
|
4604
4625
|
|
|
4605
4626
|
// src/cad/cad_component.ts
|
|
4606
|
-
var cad_component =
|
|
4607
|
-
type:
|
|
4608
|
-
cad_component_id:
|
|
4609
|
-
pcb_component_id:
|
|
4627
|
+
var cad_component = z202.object({
|
|
4628
|
+
type: z202.literal("cad_component"),
|
|
4629
|
+
cad_component_id: z202.string(),
|
|
4630
|
+
pcb_component_id: z202.string().optional().describe(
|
|
4610
4631
|
"Optional PCB component reference; omit for CAD geometry without a PCB component"
|
|
4611
4632
|
),
|
|
4612
|
-
source_component_id:
|
|
4633
|
+
source_component_id: z202.string(),
|
|
4613
4634
|
position: point3,
|
|
4614
4635
|
rotation: point3.optional(),
|
|
4615
|
-
is_on_folded_board:
|
|
4636
|
+
is_on_folded_board: z202.boolean().optional().describe(
|
|
4616
4637
|
"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."
|
|
4617
4638
|
),
|
|
4618
4639
|
size: point3.optional(),
|
|
4619
4640
|
layer: layer_ref.optional(),
|
|
4620
|
-
subcircuit_id:
|
|
4641
|
+
subcircuit_id: z202.string().optional(),
|
|
4621
4642
|
// These are all ways to generate/load the 3d model
|
|
4622
|
-
footprinter_string:
|
|
4623
|
-
model_obj_url:
|
|
4624
|
-
model_stl_url:
|
|
4625
|
-
model_3mf_url:
|
|
4626
|
-
model_gltf_url:
|
|
4627
|
-
model_glb_url:
|
|
4628
|
-
model_step_url:
|
|
4629
|
-
model_wrl_url:
|
|
4643
|
+
footprinter_string: z202.string().optional(),
|
|
4644
|
+
model_obj_url: z202.string().optional(),
|
|
4645
|
+
model_stl_url: z202.string().optional(),
|
|
4646
|
+
model_3mf_url: z202.string().optional(),
|
|
4647
|
+
model_gltf_url: z202.string().optional(),
|
|
4648
|
+
model_glb_url: z202.string().optional(),
|
|
4649
|
+
model_step_url: z202.string().optional(),
|
|
4650
|
+
model_wrl_url: z202.string().optional(),
|
|
4630
4651
|
model_asset: asset.optional(),
|
|
4631
|
-
model_unit_to_mm_scale_factor:
|
|
4632
|
-
model_board_normal_direction:
|
|
4652
|
+
model_unit_to_mm_scale_factor: z202.number().optional(),
|
|
4653
|
+
model_board_normal_direction: z202.enum(cad_model_axis_directions).optional().describe(
|
|
4633
4654
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
4634
4655
|
),
|
|
4635
4656
|
model_origin_position: point3.optional(),
|
|
4636
|
-
model_origin_alignment:
|
|
4657
|
+
model_origin_alignment: z202.enum([
|
|
4637
4658
|
"unknown",
|
|
4638
4659
|
"center",
|
|
4639
4660
|
"center_of_component_on_board_surface",
|
|
4640
4661
|
"bottom_center_of_component"
|
|
4641
4662
|
]).optional(),
|
|
4642
|
-
model_object_fit:
|
|
4643
|
-
model_jscad:
|
|
4644
|
-
color:
|
|
4663
|
+
model_object_fit: z202.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
4664
|
+
model_jscad: z202.any().optional(),
|
|
4665
|
+
color: z202.string().trim().min(1).optional().describe(
|
|
4645
4666
|
"Explicit color override for CAD geometry, including authored JSCAD material colors. Omit to preserve model materials."
|
|
4646
4667
|
),
|
|
4647
|
-
show_as_translucent_model:
|
|
4648
|
-
show_as_bounding_box:
|
|
4649
|
-
show_hidden_edges:
|
|
4650
|
-
anchor_alignment:
|
|
4668
|
+
show_as_translucent_model: z202.boolean().optional(),
|
|
4669
|
+
show_as_bounding_box: z202.boolean().optional(),
|
|
4670
|
+
show_hidden_edges: z202.boolean().optional(),
|
|
4671
|
+
anchor_alignment: z202.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
4651
4672
|
}).describe("Defines CAD geometry, optionally associated with a PCB component");
|
|
4652
4673
|
expectTypesMatch(true);
|
|
4653
4674
|
|
|
4654
4675
|
// src/cad/cad_collision_error.ts
|
|
4655
|
-
import { z as
|
|
4676
|
+
import { z as z203 } from "zod";
|
|
4656
4677
|
var cad_collision_error = base_circuit_json_error.extend({
|
|
4657
|
-
type:
|
|
4678
|
+
type: z203.literal("cad_collision_error"),
|
|
4658
4679
|
cad_collision_error_id: getZodPrefixedIdWithDefault("cad_collision_error"),
|
|
4659
|
-
error_type:
|
|
4660
|
-
cad_component_ids:
|
|
4661
|
-
pcb_component_ids:
|
|
4662
|
-
source_component_ids:
|
|
4663
|
-
intersection_area_mm2:
|
|
4664
|
-
threshold_area_mm2:
|
|
4680
|
+
error_type: z203.literal("cad_collision_error").default("cad_collision_error"),
|
|
4681
|
+
cad_component_ids: z203.array(z203.string()).min(1),
|
|
4682
|
+
pcb_component_ids: z203.array(z203.string()).optional(),
|
|
4683
|
+
source_component_ids: z203.array(z203.string()).min(1),
|
|
4684
|
+
intersection_area_mm2: z203.number().finite().nonnegative(),
|
|
4685
|
+
threshold_area_mm2: z203.number().finite().nonnegative()
|
|
4665
4686
|
}).describe(
|
|
4666
4687
|
"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."
|
|
4667
4688
|
);
|
|
4668
4689
|
expectTypesMatch(true);
|
|
4669
4690
|
|
|
4670
4691
|
// src/cad/cad_cable.ts
|
|
4671
|
-
import { z as
|
|
4692
|
+
import { z as z204 } from "zod";
|
|
4672
4693
|
var connectorPin1Position = point3.refine(
|
|
4673
4694
|
(point2) => [point2.x, point2.y, point2.z].every(Number.isFinite),
|
|
4674
4695
|
"Connector pin 1 positions must be finite"
|
|
4675
4696
|
).describe(
|
|
4676
4697
|
"Resolved pin 1 position at the connector mating face, in right-handed circuit world, millimeters: +X right, +Y top, +Z above. An absolute point, not a direction. Computed by the circuit producer from endpoint geometry. Together with the endpoint path tangent, fixes connector roll and identifies its pin 1 side; renderers must not infer it from footprints."
|
|
4677
4698
|
);
|
|
4678
|
-
var cad_cable =
|
|
4679
|
-
type:
|
|
4680
|
-
cad_cable_id:
|
|
4681
|
-
name:
|
|
4682
|
-
from_source_component_id:
|
|
4683
|
-
to_source_component_id:
|
|
4699
|
+
var cad_cable = z204.object({
|
|
4700
|
+
type: z204.literal("cad_cable"),
|
|
4701
|
+
cad_cable_id: z204.string(),
|
|
4702
|
+
name: z204.string().min(1),
|
|
4703
|
+
from_source_component_id: z204.string(),
|
|
4704
|
+
to_source_component_id: z204.string(),
|
|
4684
4705
|
from_connector_pin1_position: connectorPin1Position.optional(),
|
|
4685
4706
|
to_connector_pin1_position: connectorPin1Position.optional(),
|
|
4686
|
-
cableprinter_string:
|
|
4707
|
+
cableprinter_string: z204.string().min(1).describe(
|
|
4687
4708
|
'Physical cable definition, e.g. "usb_c" or "jst_ph_pins6". Independent of the route.'
|
|
4688
4709
|
),
|
|
4689
|
-
path:
|
|
4710
|
+
path: z204.array(point3).min(2).refine(
|
|
4690
4711
|
(path) => path.every(
|
|
4691
4712
|
(point2, i) => [point2.x, point2.y, point2.z].every(Number.isFinite) && (i === 0 || Math.hypot(
|
|
4692
4713
|
point2.x - path[i - 1].x,
|
|
@@ -4704,27 +4725,27 @@ var cad_cable = z203.object({
|
|
|
4704
4725
|
expectTypesMatch(true);
|
|
4705
4726
|
|
|
4706
4727
|
// src/cad/cad_reference_surface.ts
|
|
4707
|
-
import { z as
|
|
4728
|
+
import { z as z205 } from "zod";
|
|
4708
4729
|
var FRAME_TOLERANCE = 1e-6;
|
|
4709
|
-
var unitDirection =
|
|
4710
|
-
x:
|
|
4711
|
-
y:
|
|
4712
|
-
z:
|
|
4730
|
+
var unitDirection = z205.object({
|
|
4731
|
+
x: z205.number().finite(),
|
|
4732
|
+
y: z205.number().finite(),
|
|
4733
|
+
z: z205.number().finite()
|
|
4713
4734
|
}).refine(
|
|
4714
4735
|
(v) => Math.abs(Math.hypot(v.x, v.y, v.z) - 1) <= FRAME_TOLERANCE,
|
|
4715
4736
|
"Reference surface directions must be unit vectors"
|
|
4716
4737
|
);
|
|
4717
|
-
var extent = distance.pipe(
|
|
4718
|
-
var cad_reference_surface =
|
|
4719
|
-
type:
|
|
4720
|
-
cad_reference_surface_id:
|
|
4721
|
-
source_component_id:
|
|
4738
|
+
var extent = distance.pipe(z205.number().finite().positive());
|
|
4739
|
+
var cad_reference_surface = z205.object({
|
|
4740
|
+
type: z205.literal("cad_reference_surface"),
|
|
4741
|
+
cad_reference_surface_id: z205.string().min(1),
|
|
4742
|
+
source_component_id: z205.string().min(1).describe(
|
|
4722
4743
|
"Owning assembly part's source component ID. The part may have no CAD geometry."
|
|
4723
4744
|
),
|
|
4724
|
-
name:
|
|
4745
|
+
name: z205.string().trim().min(1).describe(
|
|
4725
4746
|
"Reference name, unique within the owning part, e.g. shade in STEM.shade."
|
|
4726
4747
|
),
|
|
4727
|
-
shape:
|
|
4748
|
+
shape: z205.literal("rect"),
|
|
4728
4749
|
center: point3.refine(
|
|
4729
4750
|
(p) => [p.x, p.y, p.z].every(Number.isFinite),
|
|
4730
4751
|
"Reference surface centers must be finite"
|
|
@@ -4743,18 +4764,18 @@ var cad_reference_surface = z204.object({
|
|
|
4743
4764
|
height: extent.optional().describe(
|
|
4744
4765
|
"Rectangular extent along normal cross x_axis in millimeters. Supply together with width."
|
|
4745
4766
|
),
|
|
4746
|
-
subcircuit_id:
|
|
4767
|
+
subcircuit_id: z205.string().optional()
|
|
4747
4768
|
}).superRefine((surface, ctx) => {
|
|
4748
4769
|
if (surface.width === void 0 !== (surface.height === void 0))
|
|
4749
4770
|
ctx.addIssue({
|
|
4750
|
-
code:
|
|
4771
|
+
code: z205.ZodIssueCode.custom,
|
|
4751
4772
|
path: ["width"],
|
|
4752
4773
|
message: "Provide width and height together"
|
|
4753
4774
|
});
|
|
4754
4775
|
const { normal: n, x_axis: x } = surface;
|
|
4755
4776
|
if (Math.abs(n.x * x.x + n.y * x.y + n.z * x.z) > FRAME_TOLERANCE)
|
|
4756
4777
|
ctx.addIssue({
|
|
4757
|
-
code:
|
|
4778
|
+
code: z205.ZodIssueCode.custom,
|
|
4758
4779
|
path: ["x_axis"],
|
|
4759
4780
|
message: "x_axis must be perpendicular to normal"
|
|
4760
4781
|
});
|
|
@@ -4766,9 +4787,9 @@ expectTypesMatch(
|
|
|
4766
4787
|
);
|
|
4767
4788
|
|
|
4768
4789
|
// src/simulation/simulation_voltage_source.ts
|
|
4769
|
-
import { z as
|
|
4770
|
-
var wave_shape =
|
|
4771
|
-
var percentage =
|
|
4790
|
+
import { z as z206 } from "zod";
|
|
4791
|
+
var wave_shape = z206.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
4792
|
+
var percentage = z206.union([z206.string(), z206.number()]).transform((val) => {
|
|
4772
4793
|
if (typeof val === "string") {
|
|
4773
4794
|
if (val.endsWith("%")) {
|
|
4774
4795
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -4777,32 +4798,32 @@ var percentage = z205.union([z205.string(), z205.number()]).transform((val) => {
|
|
|
4777
4798
|
}
|
|
4778
4799
|
return val;
|
|
4779
4800
|
}).pipe(
|
|
4780
|
-
|
|
4801
|
+
z206.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
4781
4802
|
);
|
|
4782
|
-
var simulation_dc_voltage_source =
|
|
4783
|
-
type:
|
|
4803
|
+
var simulation_dc_voltage_source = z206.object({
|
|
4804
|
+
type: z206.literal("simulation_voltage_source"),
|
|
4784
4805
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
4785
4806
|
"simulation_voltage_source"
|
|
4786
4807
|
),
|
|
4787
|
-
is_dc_source:
|
|
4788
|
-
positive_source_port_id:
|
|
4789
|
-
negative_source_port_id:
|
|
4790
|
-
positive_source_net_id:
|
|
4791
|
-
negative_source_net_id:
|
|
4808
|
+
is_dc_source: z206.literal(true).optional().default(true),
|
|
4809
|
+
positive_source_port_id: z206.string().optional(),
|
|
4810
|
+
negative_source_port_id: z206.string().optional(),
|
|
4811
|
+
positive_source_net_id: z206.string().optional(),
|
|
4812
|
+
negative_source_net_id: z206.string().optional(),
|
|
4792
4813
|
voltage,
|
|
4793
4814
|
ac_magnitude: voltage.optional(),
|
|
4794
4815
|
ac_phase: rotation.optional()
|
|
4795
4816
|
}).describe("Defines a DC voltage source for simulation");
|
|
4796
|
-
var simulation_ac_voltage_source =
|
|
4797
|
-
type:
|
|
4817
|
+
var simulation_ac_voltage_source = z206.object({
|
|
4818
|
+
type: z206.literal("simulation_voltage_source"),
|
|
4798
4819
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
4799
4820
|
"simulation_voltage_source"
|
|
4800
4821
|
),
|
|
4801
|
-
is_dc_source:
|
|
4802
|
-
terminal1_source_port_id:
|
|
4803
|
-
terminal2_source_port_id:
|
|
4804
|
-
terminal1_source_net_id:
|
|
4805
|
-
terminal2_source_net_id:
|
|
4822
|
+
is_dc_source: z206.literal(false),
|
|
4823
|
+
terminal1_source_port_id: z206.string().optional(),
|
|
4824
|
+
terminal2_source_port_id: z206.string().optional(),
|
|
4825
|
+
terminal1_source_net_id: z206.string().optional(),
|
|
4826
|
+
terminal2_source_net_id: z206.string().optional(),
|
|
4806
4827
|
voltage: voltage.optional(),
|
|
4807
4828
|
frequency: frequency.optional(),
|
|
4808
4829
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -4817,14 +4838,14 @@ var simulation_ac_voltage_source = z205.object({
|
|
|
4817
4838
|
ac_magnitude: voltage.optional(),
|
|
4818
4839
|
ac_phase: rotation.optional()
|
|
4819
4840
|
}).describe("Defines an AC voltage source for simulation");
|
|
4820
|
-
var simulation_voltage_source =
|
|
4841
|
+
var simulation_voltage_source = z206.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
4821
4842
|
expectTypesMatch(true);
|
|
4822
4843
|
expectTypesMatch(true);
|
|
4823
4844
|
expectTypesMatch(true);
|
|
4824
4845
|
|
|
4825
4846
|
// src/simulation/simulation_current_source.ts
|
|
4826
|
-
import { z as
|
|
4827
|
-
var percentage2 =
|
|
4847
|
+
import { z as z207 } from "zod";
|
|
4848
|
+
var percentage2 = z207.union([z207.string(), z207.number()]).transform((val) => {
|
|
4828
4849
|
if (typeof val === "string") {
|
|
4829
4850
|
if (val.endsWith("%")) {
|
|
4830
4851
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -4833,32 +4854,32 @@ var percentage2 = z206.union([z206.string(), z206.number()]).transform((val) =>
|
|
|
4833
4854
|
}
|
|
4834
4855
|
return val;
|
|
4835
4856
|
}).pipe(
|
|
4836
|
-
|
|
4857
|
+
z207.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
4837
4858
|
);
|
|
4838
|
-
var simulation_dc_current_source =
|
|
4839
|
-
type:
|
|
4859
|
+
var simulation_dc_current_source = z207.object({
|
|
4860
|
+
type: z207.literal("simulation_current_source"),
|
|
4840
4861
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
4841
4862
|
"simulation_current_source"
|
|
4842
4863
|
),
|
|
4843
|
-
is_dc_source:
|
|
4844
|
-
positive_source_port_id:
|
|
4845
|
-
negative_source_port_id:
|
|
4846
|
-
positive_source_net_id:
|
|
4847
|
-
negative_source_net_id:
|
|
4864
|
+
is_dc_source: z207.literal(true).optional().default(true),
|
|
4865
|
+
positive_source_port_id: z207.string().optional(),
|
|
4866
|
+
negative_source_port_id: z207.string().optional(),
|
|
4867
|
+
positive_source_net_id: z207.string().optional(),
|
|
4868
|
+
negative_source_net_id: z207.string().optional(),
|
|
4848
4869
|
current,
|
|
4849
4870
|
ac_magnitude: current.optional(),
|
|
4850
4871
|
ac_phase: rotation.optional()
|
|
4851
4872
|
}).describe("Defines a DC current source for simulation");
|
|
4852
|
-
var simulation_ac_current_source =
|
|
4853
|
-
type:
|
|
4873
|
+
var simulation_ac_current_source = z207.object({
|
|
4874
|
+
type: z207.literal("simulation_current_source"),
|
|
4854
4875
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
4855
4876
|
"simulation_current_source"
|
|
4856
4877
|
),
|
|
4857
|
-
is_dc_source:
|
|
4858
|
-
terminal1_source_port_id:
|
|
4859
|
-
terminal2_source_port_id:
|
|
4860
|
-
terminal1_source_net_id:
|
|
4861
|
-
terminal2_source_net_id:
|
|
4878
|
+
is_dc_source: z207.literal(false),
|
|
4879
|
+
terminal1_source_port_id: z207.string().optional(),
|
|
4880
|
+
terminal2_source_port_id: z207.string().optional(),
|
|
4881
|
+
terminal1_source_net_id: z207.string().optional(),
|
|
4882
|
+
terminal2_source_net_id: z207.string().optional(),
|
|
4862
4883
|
current: current.optional(),
|
|
4863
4884
|
frequency: frequency.optional(),
|
|
4864
4885
|
peak_to_peak_current: current.optional(),
|
|
@@ -4868,64 +4889,64 @@ var simulation_ac_current_source = z206.object({
|
|
|
4868
4889
|
ac_magnitude: current.optional(),
|
|
4869
4890
|
ac_phase: rotation.optional()
|
|
4870
4891
|
}).describe("Defines an AC current source for simulation");
|
|
4871
|
-
var simulation_current_source =
|
|
4892
|
+
var simulation_current_source = z207.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
4872
4893
|
expectTypesMatch(true);
|
|
4873
4894
|
expectTypesMatch(true);
|
|
4874
4895
|
expectTypesMatch(true);
|
|
4875
4896
|
|
|
4876
4897
|
// src/simulation/simulation_experiment.ts
|
|
4877
|
-
import { z as
|
|
4898
|
+
import { z as z209 } from "zod";
|
|
4878
4899
|
|
|
4879
4900
|
// src/simulation/simulation_units.ts
|
|
4880
|
-
import { z as
|
|
4881
|
-
var simulation_dc_sweep_unit =
|
|
4901
|
+
import { z as z208 } from "zod";
|
|
4902
|
+
var simulation_dc_sweep_unit = z208.custom(
|
|
4882
4903
|
(dcSweepUnit) => dcSweepUnit === "V" || dcSweepUnit === "A"
|
|
4883
4904
|
);
|
|
4884
|
-
var simulation_parameter_unit =
|
|
4905
|
+
var simulation_parameter_unit = z208.custom(
|
|
4885
4906
|
(parameterUnit) => parameterUnit === "\u03A9" || parameterUnit === "F" || parameterUnit === "H" || parameterUnit === "V" || parameterUnit === "A"
|
|
4886
4907
|
);
|
|
4887
4908
|
|
|
4888
4909
|
// src/simulation/simulation_experiment.ts
|
|
4889
|
-
var experiment_type =
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4910
|
+
var experiment_type = z209.union([
|
|
4911
|
+
z209.literal("spice_dc_sweep"),
|
|
4912
|
+
z209.literal("spice_dc_operating_point"),
|
|
4913
|
+
z209.literal("spice_transient_analysis"),
|
|
4914
|
+
z209.literal("spice_ac_analysis"),
|
|
4915
|
+
z209.literal("pcb_return_current")
|
|
4895
4916
|
]);
|
|
4896
|
-
var spice_simulation_options =
|
|
4897
|
-
method:
|
|
4898
|
-
reltol:
|
|
4899
|
-
abstol:
|
|
4900
|
-
vntol:
|
|
4917
|
+
var spice_simulation_options = z209.object({
|
|
4918
|
+
method: z209.enum(["trap", "gear"]).optional(),
|
|
4919
|
+
reltol: z209.union([z209.number(), z209.string()]).optional(),
|
|
4920
|
+
abstol: z209.union([z209.number(), z209.string()]).optional(),
|
|
4921
|
+
vntol: z209.union([z209.number(), z209.string()]).optional()
|
|
4901
4922
|
}).describe("SPICE solver options for a simulation experiment");
|
|
4902
|
-
var pcb_spice_channel =
|
|
4903
|
-
reduction:
|
|
4904
|
-
|
|
4905
|
-
|
|
4923
|
+
var pcb_spice_channel = z209.object({
|
|
4924
|
+
reduction: z209.union([
|
|
4925
|
+
z209.literal("routed-copper"),
|
|
4926
|
+
z209.literal("straightened-stages")
|
|
4906
4927
|
]),
|
|
4907
|
-
sections:
|
|
4908
|
-
lanes:
|
|
4909
|
-
|
|
4910
|
-
name:
|
|
4911
|
-
driver_source_port_id:
|
|
4912
|
-
receiver_source_port_id:
|
|
4928
|
+
sections: z209.number().int().min(1).max(128),
|
|
4929
|
+
lanes: z209.array(
|
|
4930
|
+
z209.object({
|
|
4931
|
+
name: z209.string().min(1),
|
|
4932
|
+
driver_source_port_id: z209.string().min(1),
|
|
4933
|
+
receiver_source_port_id: z209.string().min(1)
|
|
4913
4934
|
})
|
|
4914
4935
|
).min(1).max(3),
|
|
4915
|
-
reference_source_port_id:
|
|
4916
|
-
passive_source_component_ids:
|
|
4917
|
-
extraction:
|
|
4918
|
-
minimum_frequency_hz:
|
|
4919
|
-
maximum_frequency_hz:
|
|
4920
|
-
model_frequency_hz:
|
|
4921
|
-
filaments:
|
|
4922
|
-
refinement_filaments:
|
|
4923
|
-
convergence_tolerance:
|
|
4924
|
-
capacitance_tolerance:
|
|
4925
|
-
reciprocity_tolerance:
|
|
4926
|
-
dc_resistance_tolerance:
|
|
4927
|
-
max_panel_length_mm:
|
|
4928
|
-
ground_mesh_size_mm:
|
|
4936
|
+
reference_source_port_id: z209.string().min(1),
|
|
4937
|
+
passive_source_component_ids: z209.array(z209.string().min(1)).optional(),
|
|
4938
|
+
extraction: z209.object({
|
|
4939
|
+
minimum_frequency_hz: z209.number().finite().positive(),
|
|
4940
|
+
maximum_frequency_hz: z209.number().finite().positive(),
|
|
4941
|
+
model_frequency_hz: z209.number().finite().positive(),
|
|
4942
|
+
filaments: z209.number().int().positive(),
|
|
4943
|
+
refinement_filaments: z209.number().int().positive(),
|
|
4944
|
+
convergence_tolerance: z209.number().finite().positive(),
|
|
4945
|
+
capacitance_tolerance: z209.number().finite().positive(),
|
|
4946
|
+
reciprocity_tolerance: z209.number().finite().positive(),
|
|
4947
|
+
dc_resistance_tolerance: z209.number().finite().positive(),
|
|
4948
|
+
max_panel_length_mm: z209.number().finite().positive(),
|
|
4949
|
+
ground_mesh_size_mm: z209.number().finite().positive().optional()
|
|
4929
4950
|
}).refine(
|
|
4930
4951
|
(extraction) => extraction.refinement_filaments > extraction.filaments,
|
|
4931
4952
|
{
|
|
@@ -4933,50 +4954,50 @@ var pcb_spice_channel = z208.object({
|
|
|
4933
4954
|
message: "refinement_filaments must be greater than filaments"
|
|
4934
4955
|
}
|
|
4935
4956
|
),
|
|
4936
|
-
relative_permittivity:
|
|
4937
|
-
via_plating_thickness_mm:
|
|
4938
|
-
via_equivalent_width_mm:
|
|
4939
|
-
omit_through_via_stubs:
|
|
4940
|
-
straightened_stage_profiles:
|
|
4941
|
-
|
|
4942
|
-
spacing_mm:
|
|
4943
|
-
relative_permittivity:
|
|
4944
|
-
return:
|
|
4945
|
-
width_mm:
|
|
4946
|
-
thickness_mm:
|
|
4947
|
-
length_factor:
|
|
4948
|
-
center_y_mm:
|
|
4949
|
-
center_z_mm:
|
|
4957
|
+
relative_permittivity: z209.number().finite().positive().optional(),
|
|
4958
|
+
via_plating_thickness_mm: z209.number().finite().positive().optional(),
|
|
4959
|
+
via_equivalent_width_mm: z209.number().finite().positive().optional(),
|
|
4960
|
+
omit_through_via_stubs: z209.boolean().optional(),
|
|
4961
|
+
straightened_stage_profiles: z209.record(
|
|
4962
|
+
z209.object({
|
|
4963
|
+
spacing_mm: z209.number().finite().positive(),
|
|
4964
|
+
relative_permittivity: z209.number().finite().positive(),
|
|
4965
|
+
return: z209.object({
|
|
4966
|
+
width_mm: z209.number().finite().positive(),
|
|
4967
|
+
thickness_mm: z209.number().finite().positive(),
|
|
4968
|
+
length_factor: z209.number().finite().positive(),
|
|
4969
|
+
center_y_mm: z209.number().finite(),
|
|
4970
|
+
center_z_mm: z209.number().finite()
|
|
4950
4971
|
})
|
|
4951
4972
|
})
|
|
4952
4973
|
).optional()
|
|
4953
4974
|
});
|
|
4954
4975
|
expectTypesMatch(true);
|
|
4955
|
-
var simulation_experiment =
|
|
4956
|
-
type:
|
|
4976
|
+
var simulation_experiment = z209.object({
|
|
4977
|
+
type: z209.literal("simulation_experiment"),
|
|
4957
4978
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
4958
4979
|
"simulation_experiment"
|
|
4959
4980
|
),
|
|
4960
|
-
name:
|
|
4981
|
+
name: z209.string(),
|
|
4961
4982
|
experiment_type,
|
|
4962
|
-
subcircuit_id:
|
|
4963
|
-
spice_engine:
|
|
4983
|
+
subcircuit_id: z209.string().optional(),
|
|
4984
|
+
spice_engine: z209.string().optional(),
|
|
4964
4985
|
time_per_step: duration_ms.optional(),
|
|
4965
4986
|
start_time_ms: ms.optional(),
|
|
4966
4987
|
end_time_ms: ms.optional(),
|
|
4967
4988
|
spice_options: spice_simulation_options.optional(),
|
|
4968
4989
|
pcb_spice_channel: pcb_spice_channel.optional(),
|
|
4969
|
-
dc_sweep_voltage_source_id:
|
|
4970
|
-
dc_sweep_current_source_id:
|
|
4971
|
-
dc_sweep_start:
|
|
4972
|
-
dc_sweep_stop:
|
|
4973
|
-
dc_sweep_step:
|
|
4990
|
+
dc_sweep_voltage_source_id: z209.string().optional(),
|
|
4991
|
+
dc_sweep_current_source_id: z209.string().optional(),
|
|
4992
|
+
dc_sweep_start: z209.number().optional(),
|
|
4993
|
+
dc_sweep_stop: z209.number().optional(),
|
|
4994
|
+
dc_sweep_step: z209.number().refine((dcSweepStep) => dcSweepStep !== 0).optional(),
|
|
4974
4995
|
dc_sweep_unit: simulation_dc_sweep_unit.optional(),
|
|
4975
|
-
ac_sweep_type:
|
|
4976
|
-
ac_samples_per_interval:
|
|
4977
|
-
ac_sample_count:
|
|
4978
|
-
ac_start_frequency_hz:
|
|
4979
|
-
ac_stop_frequency_hz:
|
|
4996
|
+
ac_sweep_type: z209.enum(["linear", "decade", "octave"]).optional(),
|
|
4997
|
+
ac_samples_per_interval: z209.number().int().positive().optional(),
|
|
4998
|
+
ac_sample_count: z209.number().int().positive().optional(),
|
|
4999
|
+
ac_start_frequency_hz: z209.number().positive().optional(),
|
|
5000
|
+
ac_stop_frequency_hz: z209.number().positive().optional()
|
|
4980
5001
|
}).superRefine((experiment, context) => {
|
|
4981
5002
|
if (experiment.experiment_type === "spice_dc_sweep") {
|
|
4982
5003
|
const requiredFields = [
|
|
@@ -4988,7 +5009,7 @@ var simulation_experiment = z208.object({
|
|
|
4988
5009
|
for (const field of requiredFields) {
|
|
4989
5010
|
if (experiment[field] === void 0) {
|
|
4990
5011
|
context.addIssue({
|
|
4991
|
-
code:
|
|
5012
|
+
code: z209.ZodIssueCode.custom,
|
|
4992
5013
|
path: [field],
|
|
4993
5014
|
message: `${field} is required for a DC sweep`
|
|
4994
5015
|
});
|
|
@@ -4998,7 +5019,7 @@ var simulation_experiment = z208.object({
|
|
|
4998
5019
|
const hasCurrentSource = experiment.dc_sweep_current_source_id !== void 0;
|
|
4999
5020
|
if (hasVoltageSource === hasCurrentSource) {
|
|
5000
5021
|
context.addIssue({
|
|
5001
|
-
code:
|
|
5022
|
+
code: z209.ZodIssueCode.custom,
|
|
5002
5023
|
path: ["dc_sweep_voltage_source_id"],
|
|
5003
5024
|
message: "Exactly one DC sweep voltage or current source ID is required"
|
|
5004
5025
|
});
|
|
@@ -5007,35 +5028,35 @@ var simulation_experiment = z208.object({
|
|
|
5007
5028
|
if (experiment.experiment_type === "spice_ac_analysis") {
|
|
5008
5029
|
if (experiment.ac_sweep_type === void 0) {
|
|
5009
5030
|
context.addIssue({
|
|
5010
|
-
code:
|
|
5031
|
+
code: z209.ZodIssueCode.custom,
|
|
5011
5032
|
path: ["ac_sweep_type"],
|
|
5012
5033
|
message: "ac_sweep_type is required for an AC analysis"
|
|
5013
5034
|
});
|
|
5014
5035
|
}
|
|
5015
5036
|
if (experiment.ac_start_frequency_hz === void 0) {
|
|
5016
5037
|
context.addIssue({
|
|
5017
|
-
code:
|
|
5038
|
+
code: z209.ZodIssueCode.custom,
|
|
5018
5039
|
path: ["ac_start_frequency_hz"],
|
|
5019
5040
|
message: "ac_start_frequency_hz is required for an AC analysis"
|
|
5020
5041
|
});
|
|
5021
5042
|
}
|
|
5022
5043
|
if (experiment.ac_stop_frequency_hz === void 0) {
|
|
5023
5044
|
context.addIssue({
|
|
5024
|
-
code:
|
|
5045
|
+
code: z209.ZodIssueCode.custom,
|
|
5025
5046
|
path: ["ac_stop_frequency_hz"],
|
|
5026
5047
|
message: "ac_stop_frequency_hz is required for an AC analysis"
|
|
5027
5048
|
});
|
|
5028
5049
|
}
|
|
5029
5050
|
if (experiment.ac_sweep_type === "linear" && experiment.ac_sample_count === void 0) {
|
|
5030
5051
|
context.addIssue({
|
|
5031
|
-
code:
|
|
5052
|
+
code: z209.ZodIssueCode.custom,
|
|
5032
5053
|
path: ["ac_sample_count"],
|
|
5033
5054
|
message: "ac_sample_count is required for a linear AC analysis"
|
|
5034
5055
|
});
|
|
5035
5056
|
}
|
|
5036
5057
|
if ((experiment.ac_sweep_type === "decade" || experiment.ac_sweep_type === "octave") && experiment.ac_samples_per_interval === void 0) {
|
|
5037
5058
|
context.addIssue({
|
|
5038
|
-
code:
|
|
5059
|
+
code: z209.ZodIssueCode.custom,
|
|
5039
5060
|
path: ["ac_samples_per_interval"],
|
|
5040
5061
|
message: "ac_samples_per_interval is required for decade and octave AC analyses"
|
|
5041
5062
|
});
|
|
@@ -5045,88 +5066,88 @@ var simulation_experiment = z208.object({
|
|
|
5045
5066
|
expectTypesMatch(true);
|
|
5046
5067
|
|
|
5047
5068
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
5048
|
-
import { z as
|
|
5069
|
+
import { z as z211 } from "zod";
|
|
5049
5070
|
|
|
5050
5071
|
// src/simulation/simulation_parameter_sweep_coordinate.ts
|
|
5051
|
-
import { z as
|
|
5052
|
-
var simulation_parameter_sweep_coordinate =
|
|
5053
|
-
simulation_parameter_sweep_id:
|
|
5054
|
-
sweep_index:
|
|
5055
|
-
parameter_value:
|
|
5072
|
+
import { z as z210 } from "zod";
|
|
5073
|
+
var simulation_parameter_sweep_coordinate = z210.object({
|
|
5074
|
+
simulation_parameter_sweep_id: z210.string(),
|
|
5075
|
+
sweep_index: z210.number().int().nonnegative(),
|
|
5076
|
+
parameter_value: z210.number(),
|
|
5056
5077
|
parameter_unit: simulation_parameter_unit
|
|
5057
5078
|
});
|
|
5058
5079
|
expectTypesMatch(true);
|
|
5059
5080
|
|
|
5060
5081
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
5061
|
-
var simulation_transient_voltage_graph =
|
|
5062
|
-
type:
|
|
5082
|
+
var simulation_transient_voltage_graph = z211.object({
|
|
5083
|
+
type: z211.literal("simulation_transient_voltage_graph"),
|
|
5063
5084
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
5064
5085
|
"simulation_transient_voltage_graph"
|
|
5065
5086
|
),
|
|
5066
|
-
simulation_experiment_id:
|
|
5067
|
-
simulation_voltage_probe_id:
|
|
5087
|
+
simulation_experiment_id: z211.string(),
|
|
5088
|
+
simulation_voltage_probe_id: z211.string().optional(),
|
|
5068
5089
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
5069
|
-
timestamps_ms:
|
|
5070
|
-
voltage_levels:
|
|
5071
|
-
source_component_id:
|
|
5072
|
-
subcircuit_connectivity_map_key:
|
|
5090
|
+
timestamps_ms: z211.array(z211.number()).optional(),
|
|
5091
|
+
voltage_levels: z211.array(z211.number()),
|
|
5092
|
+
source_component_id: z211.string().optional(),
|
|
5093
|
+
subcircuit_connectivity_map_key: z211.string().optional(),
|
|
5073
5094
|
time_per_step: duration_ms,
|
|
5074
5095
|
start_time_ms: ms,
|
|
5075
5096
|
end_time_ms: ms,
|
|
5076
|
-
name:
|
|
5077
|
-
color:
|
|
5097
|
+
name: z211.string().optional(),
|
|
5098
|
+
color: z211.string().optional()
|
|
5078
5099
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
5079
5100
|
expectTypesMatch(true);
|
|
5080
5101
|
|
|
5081
5102
|
// src/simulation/simulation_transient_current_graph.ts
|
|
5082
|
-
import { z as
|
|
5083
|
-
var simulation_transient_current_graph =
|
|
5084
|
-
type:
|
|
5103
|
+
import { z as z212 } from "zod";
|
|
5104
|
+
var simulation_transient_current_graph = z212.object({
|
|
5105
|
+
type: z212.literal("simulation_transient_current_graph"),
|
|
5085
5106
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
5086
5107
|
"simulation_transient_current_graph"
|
|
5087
5108
|
),
|
|
5088
|
-
simulation_experiment_id:
|
|
5109
|
+
simulation_experiment_id: z212.string(),
|
|
5089
5110
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
5090
|
-
timestamps_ms:
|
|
5091
|
-
current_levels:
|
|
5092
|
-
source_component_id:
|
|
5093
|
-
subcircuit_connectivity_map_key:
|
|
5111
|
+
timestamps_ms: z212.array(z212.number()).optional(),
|
|
5112
|
+
current_levels: z212.array(z212.number()),
|
|
5113
|
+
source_component_id: z212.string().optional(),
|
|
5114
|
+
subcircuit_connectivity_map_key: z212.string().optional(),
|
|
5094
5115
|
time_per_step: duration_ms,
|
|
5095
5116
|
start_time_ms: ms,
|
|
5096
5117
|
end_time_ms: ms,
|
|
5097
|
-
name:
|
|
5098
|
-
color:
|
|
5118
|
+
name: z212.string().optional(),
|
|
5119
|
+
color: z212.string().optional()
|
|
5099
5120
|
}).describe("Stores current measurements over time for a simulation");
|
|
5100
5121
|
expectTypesMatch(true);
|
|
5101
5122
|
|
|
5102
5123
|
// src/simulation/simulation_switch.ts
|
|
5103
|
-
import { z as
|
|
5104
|
-
var simulation_switch =
|
|
5105
|
-
type:
|
|
5124
|
+
import { z as z213 } from "zod";
|
|
5125
|
+
var simulation_switch = z213.object({
|
|
5126
|
+
type: z213.literal("simulation_switch"),
|
|
5106
5127
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
5107
|
-
source_component_id:
|
|
5128
|
+
source_component_id: z213.string().optional(),
|
|
5108
5129
|
closes_at: ms.optional(),
|
|
5109
5130
|
opens_at: ms.optional(),
|
|
5110
|
-
starts_closed:
|
|
5131
|
+
starts_closed: z213.boolean().optional(),
|
|
5111
5132
|
switching_frequency: frequency.optional()
|
|
5112
5133
|
}).describe("Defines a switch for simulation timing control");
|
|
5113
5134
|
expectTypesMatch(true);
|
|
5114
5135
|
|
|
5115
5136
|
// src/simulation/simulation_voltage_probe.ts
|
|
5116
|
-
import { z as
|
|
5117
|
-
var simulation_voltage_probe =
|
|
5118
|
-
type:
|
|
5137
|
+
import { z as z214 } from "zod";
|
|
5138
|
+
var simulation_voltage_probe = z214.object({
|
|
5139
|
+
type: z214.literal("simulation_voltage_probe"),
|
|
5119
5140
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
5120
5141
|
"simulation_voltage_probe"
|
|
5121
5142
|
),
|
|
5122
|
-
source_component_id:
|
|
5123
|
-
name:
|
|
5124
|
-
signal_input_source_port_id:
|
|
5125
|
-
signal_input_source_net_id:
|
|
5126
|
-
reference_input_source_port_id:
|
|
5127
|
-
reference_input_source_net_id:
|
|
5128
|
-
subcircuit_id:
|
|
5129
|
-
color:
|
|
5143
|
+
source_component_id: z214.string().optional(),
|
|
5144
|
+
name: z214.string().optional(),
|
|
5145
|
+
signal_input_source_port_id: z214.string().optional(),
|
|
5146
|
+
signal_input_source_net_id: z214.string().optional(),
|
|
5147
|
+
reference_input_source_port_id: z214.string().optional(),
|
|
5148
|
+
reference_input_source_net_id: z214.string().optional(),
|
|
5149
|
+
subcircuit_id: z214.string().optional(),
|
|
5150
|
+
color: z214.string().optional()
|
|
5130
5151
|
}).describe(
|
|
5131
5152
|
"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."
|
|
5132
5153
|
).superRefine((data, ctx) => {
|
|
@@ -5136,20 +5157,20 @@ var simulation_voltage_probe = z213.object({
|
|
|
5136
5157
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
5137
5158
|
if (has_ports && has_nets) {
|
|
5138
5159
|
ctx.addIssue({
|
|
5139
|
-
code:
|
|
5160
|
+
code: z214.ZodIssueCode.custom,
|
|
5140
5161
|
message: "Cannot mix port and net connections in a differential probe."
|
|
5141
5162
|
});
|
|
5142
5163
|
} else if (has_ports) {
|
|
5143
5164
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
5144
5165
|
ctx.addIssue({
|
|
5145
|
-
code:
|
|
5166
|
+
code: z214.ZodIssueCode.custom,
|
|
5146
5167
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
5147
5168
|
});
|
|
5148
5169
|
}
|
|
5149
5170
|
} else if (has_nets) {
|
|
5150
5171
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
5151
5172
|
ctx.addIssue({
|
|
5152
|
-
code:
|
|
5173
|
+
code: z214.ZodIssueCode.custom,
|
|
5153
5174
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
5154
5175
|
});
|
|
5155
5176
|
}
|
|
@@ -5157,7 +5178,7 @@ var simulation_voltage_probe = z213.object({
|
|
|
5157
5178
|
} else {
|
|
5158
5179
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
5159
5180
|
ctx.addIssue({
|
|
5160
|
-
code:
|
|
5181
|
+
code: z214.ZodIssueCode.custom,
|
|
5161
5182
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
5162
5183
|
});
|
|
5163
5184
|
}
|
|
@@ -5166,20 +5187,20 @@ var simulation_voltage_probe = z213.object({
|
|
|
5166
5187
|
expectTypesMatch(true);
|
|
5167
5188
|
|
|
5168
5189
|
// src/simulation/simulation_current_probe.ts
|
|
5169
|
-
import { z as
|
|
5170
|
-
var simulation_current_probe =
|
|
5171
|
-
type:
|
|
5190
|
+
import { z as z215 } from "zod";
|
|
5191
|
+
var simulation_current_probe = z215.object({
|
|
5192
|
+
type: z215.literal("simulation_current_probe"),
|
|
5172
5193
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
5173
5194
|
"simulation_current_probe"
|
|
5174
5195
|
),
|
|
5175
|
-
source_component_id:
|
|
5176
|
-
name:
|
|
5177
|
-
positive_source_port_id:
|
|
5178
|
-
negative_source_port_id:
|
|
5179
|
-
positive_source_net_id:
|
|
5180
|
-
negative_source_net_id:
|
|
5181
|
-
subcircuit_id:
|
|
5182
|
-
color:
|
|
5196
|
+
source_component_id: z215.string().optional(),
|
|
5197
|
+
name: z215.string().optional(),
|
|
5198
|
+
positive_source_port_id: z215.string().optional(),
|
|
5199
|
+
negative_source_port_id: z215.string().optional(),
|
|
5200
|
+
positive_source_net_id: z215.string().optional(),
|
|
5201
|
+
negative_source_net_id: z215.string().optional(),
|
|
5202
|
+
subcircuit_id: z215.string().optional(),
|
|
5203
|
+
color: z215.string().optional()
|
|
5183
5204
|
}).describe(
|
|
5184
5205
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
5185
5206
|
).superRefine((data, ctx) => {
|
|
@@ -5191,7 +5212,7 @@ var simulation_current_probe = z214.object({
|
|
|
5191
5212
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
5192
5213
|
if (hasPorts && hasNets) {
|
|
5193
5214
|
ctx.addIssue({
|
|
5194
|
-
code:
|
|
5215
|
+
code: z215.ZodIssueCode.custom,
|
|
5195
5216
|
message: "Cannot mix port and net connections in a current probe."
|
|
5196
5217
|
});
|
|
5197
5218
|
return;
|
|
@@ -5199,7 +5220,7 @@ var simulation_current_probe = z214.object({
|
|
|
5199
5220
|
if (hasPorts) {
|
|
5200
5221
|
if (!hasPositivePort || !hasNegativePort) {
|
|
5201
5222
|
ctx.addIssue({
|
|
5202
|
-
code:
|
|
5223
|
+
code: z215.ZodIssueCode.custom,
|
|
5203
5224
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
5204
5225
|
});
|
|
5205
5226
|
}
|
|
@@ -5208,71 +5229,71 @@ var simulation_current_probe = z214.object({
|
|
|
5208
5229
|
if (hasNets) {
|
|
5209
5230
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
5210
5231
|
ctx.addIssue({
|
|
5211
|
-
code:
|
|
5232
|
+
code: z215.ZodIssueCode.custom,
|
|
5212
5233
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
5213
5234
|
});
|
|
5214
5235
|
}
|
|
5215
5236
|
return;
|
|
5216
5237
|
}
|
|
5217
5238
|
ctx.addIssue({
|
|
5218
|
-
code:
|
|
5239
|
+
code: z215.ZodIssueCode.custom,
|
|
5219
5240
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
5220
5241
|
});
|
|
5221
5242
|
});
|
|
5222
5243
|
expectTypesMatch(true);
|
|
5223
5244
|
|
|
5224
5245
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
5225
|
-
import { z as
|
|
5246
|
+
import { z as z216 } from "zod";
|
|
5226
5247
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
5227
|
-
type:
|
|
5248
|
+
type: z216.literal("simulation_unknown_experiment_error"),
|
|
5228
5249
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
5229
5250
|
"simulation_unknown_experiment_error"
|
|
5230
5251
|
),
|
|
5231
|
-
error_type:
|
|
5232
|
-
simulation_experiment_id:
|
|
5233
|
-
subcircuit_id:
|
|
5252
|
+
error_type: z216.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
5253
|
+
simulation_experiment_id: z216.string().optional(),
|
|
5254
|
+
subcircuit_id: z216.string().optional()
|
|
5234
5255
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
5235
5256
|
expectTypesMatch(true);
|
|
5236
5257
|
|
|
5237
5258
|
// src/simulation/simulation_parameter_sweep.ts
|
|
5238
|
-
import { z as
|
|
5239
|
-
var simulation_parameter_type =
|
|
5259
|
+
import { z as z217 } from "zod";
|
|
5260
|
+
var simulation_parameter_type = z217.enum([
|
|
5240
5261
|
"resistance",
|
|
5241
5262
|
"capacitance",
|
|
5242
5263
|
"inductance",
|
|
5243
5264
|
"voltage",
|
|
5244
5265
|
"current"
|
|
5245
5266
|
]);
|
|
5246
|
-
var simulation_parameter_sweep_base =
|
|
5247
|
-
type:
|
|
5267
|
+
var simulation_parameter_sweep_base = z217.object({
|
|
5268
|
+
type: z217.literal("simulation_parameter_sweep"),
|
|
5248
5269
|
simulation_parameter_sweep_id: getZodPrefixedIdWithDefault(
|
|
5249
5270
|
"simulation_parameter_sweep"
|
|
5250
5271
|
),
|
|
5251
|
-
simulation_experiment_id:
|
|
5252
|
-
name:
|
|
5253
|
-
parameter_values:
|
|
5272
|
+
simulation_experiment_id: z217.string(),
|
|
5273
|
+
name: z217.string().optional(),
|
|
5274
|
+
parameter_values: z217.array(z217.number()).min(1),
|
|
5254
5275
|
parameter_unit: simulation_parameter_unit
|
|
5255
5276
|
});
|
|
5256
|
-
var simulation_parameter_sweep =
|
|
5277
|
+
var simulation_parameter_sweep = z217.discriminatedUnion("parameter_type", [
|
|
5257
5278
|
simulation_parameter_sweep_base.extend({
|
|
5258
|
-
parameter_type:
|
|
5259
|
-
resistor_source_component_id:
|
|
5279
|
+
parameter_type: z217.literal("resistance"),
|
|
5280
|
+
resistor_source_component_id: z217.string()
|
|
5260
5281
|
}),
|
|
5261
5282
|
simulation_parameter_sweep_base.extend({
|
|
5262
|
-
parameter_type:
|
|
5263
|
-
capacitor_source_component_id:
|
|
5283
|
+
parameter_type: z217.literal("capacitance"),
|
|
5284
|
+
capacitor_source_component_id: z217.string()
|
|
5264
5285
|
}),
|
|
5265
5286
|
simulation_parameter_sweep_base.extend({
|
|
5266
|
-
parameter_type:
|
|
5267
|
-
inductor_source_component_id:
|
|
5287
|
+
parameter_type: z217.literal("inductance"),
|
|
5288
|
+
inductor_source_component_id: z217.string()
|
|
5268
5289
|
}),
|
|
5269
5290
|
simulation_parameter_sweep_base.extend({
|
|
5270
|
-
parameter_type:
|
|
5271
|
-
source_net_id:
|
|
5291
|
+
parameter_type: z217.literal("voltage"),
|
|
5292
|
+
source_net_id: z217.string()
|
|
5272
5293
|
}),
|
|
5273
5294
|
simulation_parameter_sweep_base.extend({
|
|
5274
|
-
parameter_type:
|
|
5275
|
-
current_source_component_id:
|
|
5295
|
+
parameter_type: z217.literal("current"),
|
|
5296
|
+
current_source_component_id: z217.string()
|
|
5276
5297
|
})
|
|
5277
5298
|
]).describe("Repeats a simulation experiment over component parameter values");
|
|
5278
5299
|
expectTypesMatch(
|
|
@@ -5280,52 +5301,52 @@ expectTypesMatch(
|
|
|
5280
5301
|
);
|
|
5281
5302
|
|
|
5282
5303
|
// src/simulation/simulation_dc_operating_point_voltage.ts
|
|
5283
|
-
import { z as
|
|
5284
|
-
var simulation_dc_operating_point_voltage =
|
|
5285
|
-
type:
|
|
5304
|
+
import { z as z218 } from "zod";
|
|
5305
|
+
var simulation_dc_operating_point_voltage = z218.object({
|
|
5306
|
+
type: z218.literal("simulation_dc_operating_point_voltage"),
|
|
5286
5307
|
simulation_dc_operating_point_voltage_id: getZodPrefixedIdWithDefault(
|
|
5287
5308
|
"simulation_dc_operating_point_voltage"
|
|
5288
5309
|
),
|
|
5289
|
-
simulation_experiment_id:
|
|
5310
|
+
simulation_experiment_id: z218.string(),
|
|
5290
5311
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
5291
|
-
simulation_voltage_probe_id:
|
|
5292
|
-
voltage:
|
|
5293
|
-
name:
|
|
5294
|
-
color:
|
|
5312
|
+
simulation_voltage_probe_id: z218.string(),
|
|
5313
|
+
voltage: z218.number(),
|
|
5314
|
+
name: z218.string().optional(),
|
|
5315
|
+
color: z218.string().optional()
|
|
5295
5316
|
});
|
|
5296
5317
|
expectTypesMatch(true);
|
|
5297
5318
|
|
|
5298
5319
|
// src/simulation/simulation_dc_operating_point_current.ts
|
|
5299
|
-
import { z as
|
|
5300
|
-
var simulation_dc_operating_point_current =
|
|
5301
|
-
type:
|
|
5320
|
+
import { z as z219 } from "zod";
|
|
5321
|
+
var simulation_dc_operating_point_current = z219.object({
|
|
5322
|
+
type: z219.literal("simulation_dc_operating_point_current"),
|
|
5302
5323
|
simulation_dc_operating_point_current_id: getZodPrefixedIdWithDefault(
|
|
5303
5324
|
"simulation_dc_operating_point_current"
|
|
5304
5325
|
),
|
|
5305
|
-
simulation_experiment_id:
|
|
5326
|
+
simulation_experiment_id: z219.string(),
|
|
5306
5327
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
5307
|
-
simulation_current_probe_id:
|
|
5308
|
-
current:
|
|
5309
|
-
name:
|
|
5310
|
-
color:
|
|
5328
|
+
simulation_current_probe_id: z219.string(),
|
|
5329
|
+
current: z219.number(),
|
|
5330
|
+
name: z219.string().optional(),
|
|
5331
|
+
color: z219.string().optional()
|
|
5311
5332
|
});
|
|
5312
5333
|
expectTypesMatch(true);
|
|
5313
5334
|
|
|
5314
5335
|
// src/simulation/simulation_dc_sweep_voltage_graph.ts
|
|
5315
|
-
import { z as
|
|
5316
|
-
var simulation_dc_sweep_voltage_graph =
|
|
5317
|
-
type:
|
|
5336
|
+
import { z as z220 } from "zod";
|
|
5337
|
+
var simulation_dc_sweep_voltage_graph = z220.object({
|
|
5338
|
+
type: z220.literal("simulation_dc_sweep_voltage_graph"),
|
|
5318
5339
|
simulation_dc_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
5319
5340
|
"simulation_dc_sweep_voltage_graph"
|
|
5320
5341
|
),
|
|
5321
|
-
simulation_experiment_id:
|
|
5342
|
+
simulation_experiment_id: z220.string(),
|
|
5322
5343
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
5323
|
-
simulation_voltage_probe_id:
|
|
5324
|
-
sweep_values:
|
|
5344
|
+
simulation_voltage_probe_id: z220.string(),
|
|
5345
|
+
sweep_values: z220.array(z220.number()),
|
|
5325
5346
|
sweep_unit: simulation_dc_sweep_unit,
|
|
5326
|
-
voltage_levels:
|
|
5327
|
-
name:
|
|
5328
|
-
color:
|
|
5347
|
+
voltage_levels: z220.array(z220.number()),
|
|
5348
|
+
name: z220.string().optional(),
|
|
5349
|
+
color: z220.string().optional()
|
|
5329
5350
|
}).refine(
|
|
5330
5351
|
(graph) => graph.sweep_values.length === graph.voltage_levels.length,
|
|
5331
5352
|
{
|
|
@@ -5335,20 +5356,20 @@ var simulation_dc_sweep_voltage_graph = z219.object({
|
|
|
5335
5356
|
expectTypesMatch(true);
|
|
5336
5357
|
|
|
5337
5358
|
// src/simulation/simulation_dc_sweep_current_graph.ts
|
|
5338
|
-
import { z as
|
|
5339
|
-
var simulation_dc_sweep_current_graph =
|
|
5340
|
-
type:
|
|
5359
|
+
import { z as z221 } from "zod";
|
|
5360
|
+
var simulation_dc_sweep_current_graph = z221.object({
|
|
5361
|
+
type: z221.literal("simulation_dc_sweep_current_graph"),
|
|
5341
5362
|
simulation_dc_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
5342
5363
|
"simulation_dc_sweep_current_graph"
|
|
5343
5364
|
),
|
|
5344
|
-
simulation_experiment_id:
|
|
5365
|
+
simulation_experiment_id: z221.string(),
|
|
5345
5366
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
5346
|
-
simulation_current_probe_id:
|
|
5347
|
-
sweep_values:
|
|
5367
|
+
simulation_current_probe_id: z221.string(),
|
|
5368
|
+
sweep_values: z221.array(z221.number()),
|
|
5348
5369
|
sweep_unit: simulation_dc_sweep_unit,
|
|
5349
|
-
current_levels:
|
|
5350
|
-
name:
|
|
5351
|
-
color:
|
|
5370
|
+
current_levels: z221.array(z221.number()),
|
|
5371
|
+
name: z221.string().optional(),
|
|
5372
|
+
color: z221.string().optional()
|
|
5352
5373
|
}).refine(
|
|
5353
5374
|
(graph) => graph.sweep_values.length === graph.current_levels.length,
|
|
5354
5375
|
{
|
|
@@ -5358,29 +5379,29 @@ var simulation_dc_sweep_current_graph = z220.object({
|
|
|
5358
5379
|
expectTypesMatch(true);
|
|
5359
5380
|
|
|
5360
5381
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
5361
|
-
import { z as
|
|
5382
|
+
import { z as z223 } from "zod";
|
|
5362
5383
|
|
|
5363
5384
|
// src/simulation/simulation_complex_sample.ts
|
|
5364
|
-
import { z as
|
|
5365
|
-
var simulation_complex_sample =
|
|
5366
|
-
re:
|
|
5367
|
-
im:
|
|
5385
|
+
import { z as z222 } from "zod";
|
|
5386
|
+
var simulation_complex_sample = z222.object({
|
|
5387
|
+
re: z222.number(),
|
|
5388
|
+
im: z222.number()
|
|
5368
5389
|
});
|
|
5369
5390
|
expectTypesMatch(true);
|
|
5370
5391
|
|
|
5371
5392
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
5372
|
-
var simulation_ac_sweep_voltage_graph =
|
|
5373
|
-
type:
|
|
5393
|
+
var simulation_ac_sweep_voltage_graph = z223.object({
|
|
5394
|
+
type: z223.literal("simulation_ac_sweep_voltage_graph"),
|
|
5374
5395
|
simulation_ac_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
5375
5396
|
"simulation_ac_sweep_voltage_graph"
|
|
5376
5397
|
),
|
|
5377
|
-
simulation_experiment_id:
|
|
5398
|
+
simulation_experiment_id: z223.string(),
|
|
5378
5399
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
5379
|
-
simulation_voltage_probe_id:
|
|
5380
|
-
frequencies_hz:
|
|
5381
|
-
complex_voltages:
|
|
5382
|
-
name:
|
|
5383
|
-
color:
|
|
5400
|
+
simulation_voltage_probe_id: z223.string(),
|
|
5401
|
+
frequencies_hz: z223.array(z223.number()),
|
|
5402
|
+
complex_voltages: z223.array(simulation_complex_sample),
|
|
5403
|
+
name: z223.string().optional(),
|
|
5404
|
+
color: z223.string().optional()
|
|
5384
5405
|
}).refine(
|
|
5385
5406
|
(graph) => graph.frequencies_hz.length === graph.complex_voltages.length,
|
|
5386
5407
|
{
|
|
@@ -5390,19 +5411,19 @@ var simulation_ac_sweep_voltage_graph = z222.object({
|
|
|
5390
5411
|
expectTypesMatch(true);
|
|
5391
5412
|
|
|
5392
5413
|
// src/simulation/simulation_ac_sweep_current_graph.ts
|
|
5393
|
-
import { z as
|
|
5394
|
-
var simulation_ac_sweep_current_graph =
|
|
5395
|
-
type:
|
|
5414
|
+
import { z as z224 } from "zod";
|
|
5415
|
+
var simulation_ac_sweep_current_graph = z224.object({
|
|
5416
|
+
type: z224.literal("simulation_ac_sweep_current_graph"),
|
|
5396
5417
|
simulation_ac_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
5397
5418
|
"simulation_ac_sweep_current_graph"
|
|
5398
5419
|
),
|
|
5399
|
-
simulation_experiment_id:
|
|
5420
|
+
simulation_experiment_id: z224.string(),
|
|
5400
5421
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
5401
|
-
simulation_current_probe_id:
|
|
5402
|
-
frequencies_hz:
|
|
5403
|
-
complex_currents:
|
|
5404
|
-
name:
|
|
5405
|
-
color:
|
|
5422
|
+
simulation_current_probe_id: z224.string(),
|
|
5423
|
+
frequencies_hz: z224.array(z224.number()),
|
|
5424
|
+
complex_currents: z224.array(simulation_complex_sample),
|
|
5425
|
+
name: z224.string().optional(),
|
|
5426
|
+
color: z224.string().optional()
|
|
5406
5427
|
}).refine(
|
|
5407
5428
|
(graph) => graph.frequencies_hz.length === graph.complex_currents.length,
|
|
5408
5429
|
{
|
|
@@ -5412,52 +5433,52 @@ var simulation_ac_sweep_current_graph = z223.object({
|
|
|
5412
5433
|
expectTypesMatch(true);
|
|
5413
5434
|
|
|
5414
5435
|
// src/simulation/simulation_op_amp.ts
|
|
5415
|
-
import { z as
|
|
5416
|
-
var simulation_op_amp =
|
|
5417
|
-
type:
|
|
5436
|
+
import { z as z225 } from "zod";
|
|
5437
|
+
var simulation_op_amp = z225.object({
|
|
5438
|
+
type: z225.literal("simulation_op_amp"),
|
|
5418
5439
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
5419
|
-
source_component_id:
|
|
5420
|
-
inverting_input_source_port_id:
|
|
5421
|
-
non_inverting_input_source_port_id:
|
|
5422
|
-
output_source_port_id:
|
|
5423
|
-
positive_supply_source_port_id:
|
|
5424
|
-
negative_supply_source_port_id:
|
|
5440
|
+
source_component_id: z225.string().optional(),
|
|
5441
|
+
inverting_input_source_port_id: z225.string(),
|
|
5442
|
+
non_inverting_input_source_port_id: z225.string(),
|
|
5443
|
+
output_source_port_id: z225.string(),
|
|
5444
|
+
positive_supply_source_port_id: z225.string(),
|
|
5445
|
+
negative_supply_source_port_id: z225.string()
|
|
5425
5446
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
5426
5447
|
expectTypesMatch(true);
|
|
5427
5448
|
|
|
5428
5449
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
5429
|
-
import { z as
|
|
5430
|
-
var simulation_spice_subcircuit =
|
|
5431
|
-
type:
|
|
5450
|
+
import { z as z226 } from "zod";
|
|
5451
|
+
var simulation_spice_subcircuit = z226.object({
|
|
5452
|
+
type: z226.literal("simulation_spice_subcircuit"),
|
|
5432
5453
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
5433
5454
|
"simulation_spice_subcircuit"
|
|
5434
5455
|
),
|
|
5435
|
-
source_component_id:
|
|
5436
|
-
spice_pin_to_source_port_map:
|
|
5437
|
-
subcircuit_source:
|
|
5456
|
+
source_component_id: z226.string(),
|
|
5457
|
+
spice_pin_to_source_port_map: z226.record(z226.string(), z226.string()),
|
|
5458
|
+
subcircuit_source: z226.string()
|
|
5438
5459
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
5439
5460
|
expectTypesMatch(
|
|
5440
5461
|
true
|
|
5441
5462
|
);
|
|
5442
5463
|
|
|
5443
5464
|
// src/simulation/simulation_oscilloscope_trace.ts
|
|
5444
|
-
import { z as
|
|
5465
|
+
import { z as z227 } from "zod";
|
|
5445
5466
|
var hasValue = (value) => value !== void 0;
|
|
5446
|
-
var simulation_oscilloscope_trace =
|
|
5447
|
-
type:
|
|
5467
|
+
var simulation_oscilloscope_trace = z227.object({
|
|
5468
|
+
type: z227.literal("simulation_oscilloscope_trace"),
|
|
5448
5469
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
5449
5470
|
"simulation_oscilloscope_trace"
|
|
5450
5471
|
),
|
|
5451
|
-
simulation_transient_voltage_graph_id:
|
|
5452
|
-
simulation_transient_current_graph_id:
|
|
5453
|
-
simulation_voltage_probe_id:
|
|
5454
|
-
simulation_current_probe_id:
|
|
5455
|
-
display_name:
|
|
5456
|
-
color:
|
|
5457
|
-
display_center_value:
|
|
5458
|
-
display_center_offset_divs:
|
|
5459
|
-
volts_per_div:
|
|
5460
|
-
amps_per_div:
|
|
5472
|
+
simulation_transient_voltage_graph_id: z227.string().optional(),
|
|
5473
|
+
simulation_transient_current_graph_id: z227.string().optional(),
|
|
5474
|
+
simulation_voltage_probe_id: z227.string().optional(),
|
|
5475
|
+
simulation_current_probe_id: z227.string().optional(),
|
|
5476
|
+
display_name: z227.string().optional(),
|
|
5477
|
+
color: z227.string().optional(),
|
|
5478
|
+
display_center_value: z227.number().optional(),
|
|
5479
|
+
display_center_offset_divs: z227.number().optional(),
|
|
5480
|
+
volts_per_div: z227.number().positive().optional(),
|
|
5481
|
+
amps_per_div: z227.number().positive().optional()
|
|
5461
5482
|
}).describe(
|
|
5462
5483
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
5463
5484
|
).superRefine((data, ctx) => {
|
|
@@ -5471,19 +5492,19 @@ var simulation_oscilloscope_trace = z226.object({
|
|
|
5471
5492
|
].filter(hasValue).length;
|
|
5472
5493
|
if (voltageReferences + currentReferences !== 1) {
|
|
5473
5494
|
ctx.addIssue({
|
|
5474
|
-
code:
|
|
5495
|
+
code: z227.ZodIssueCode.custom,
|
|
5475
5496
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
5476
5497
|
});
|
|
5477
5498
|
}
|
|
5478
5499
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
5479
5500
|
ctx.addIssue({
|
|
5480
|
-
code:
|
|
5501
|
+
code: z227.ZodIssueCode.custom,
|
|
5481
5502
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
5482
5503
|
});
|
|
5483
5504
|
}
|
|
5484
5505
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
5485
5506
|
ctx.addIssue({
|
|
5486
|
-
code:
|
|
5507
|
+
code: z227.ZodIssueCode.custom,
|
|
5487
5508
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
5488
5509
|
});
|
|
5489
5510
|
}
|
|
@@ -5491,47 +5512,47 @@ var simulation_oscilloscope_trace = z226.object({
|
|
|
5491
5512
|
expectTypesMatch(true);
|
|
5492
5513
|
|
|
5493
5514
|
// src/simulation/simulation_ibis_model.ts
|
|
5494
|
-
import { z as
|
|
5495
|
-
var ibisAssetPath =
|
|
5496
|
-
var simulation_ibis_model =
|
|
5497
|
-
type:
|
|
5515
|
+
import { z as z228 } from "zod";
|
|
5516
|
+
var ibisAssetPath = z228.string().min(1).regex(/^(?!\s|[a-z][a-z\d+.-]*:|[/\\])[^\\\u0000-\u001f\u007f]+$/i);
|
|
5517
|
+
var simulation_ibis_model = z228.object({
|
|
5518
|
+
type: z228.literal("simulation_ibis_model"),
|
|
5498
5519
|
simulation_ibis_model_id: getZodPrefixedIdWithDefault(
|
|
5499
5520
|
"simulation_ibis_model"
|
|
5500
5521
|
),
|
|
5501
|
-
source_component_id:
|
|
5522
|
+
source_component_id: z228.string().min(1),
|
|
5502
5523
|
// Consumers must still apply their own fetch policy to prevent SSRF.
|
|
5503
5524
|
ibis_model_asset: asset.extend({
|
|
5504
5525
|
project_relative_path: ibisAssetPath,
|
|
5505
|
-
url:
|
|
5526
|
+
url: z228.string().url().regex(/^https?:\/\//i).or(ibisAssetPath)
|
|
5506
5527
|
}).describe(
|
|
5507
5528
|
"Reference to the .ibs file containing the vendor's IBIS models"
|
|
5508
5529
|
),
|
|
5509
|
-
ibis_component_name:
|
|
5510
|
-
ibis_pin_name_to_source_port_id:
|
|
5530
|
+
ibis_component_name: z228.string().min(1).describe("Name of the [Component] section in the IBIS file"),
|
|
5531
|
+
ibis_pin_name_to_source_port_id: z228.record(z228.string().min(1), z228.string().min(1)).refine(
|
|
5511
5532
|
(pins) => Object.keys(pins).length > 0,
|
|
5512
5533
|
"At least one physical IBIS pin is required"
|
|
5513
5534
|
).describe(
|
|
5514
5535
|
"Maps pin names from the IBIS [Pin] table, such as A1 or 12, to physical source_port_id values"
|
|
5515
5536
|
),
|
|
5516
|
-
ibis_pin_name_to_model_name:
|
|
5537
|
+
ibis_pin_name_to_model_name: z228.record(z228.string().min(1), z228.string().min(1)).optional().describe(
|
|
5517
5538
|
"Maps an IBIS pin name to the selected [Model] name when its [Model Selector] has multiple buffers"
|
|
5518
5539
|
),
|
|
5519
|
-
ibis_pin_name_to_reference_source_port_ids:
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
pullup_reference_source_port_id:
|
|
5523
|
-
pulldown_reference_source_port_id:
|
|
5524
|
-
power_clamp_reference_source_port_id:
|
|
5525
|
-
ground_clamp_reference_source_port_id:
|
|
5526
|
-
external_reference_source_port_id:
|
|
5540
|
+
ibis_pin_name_to_reference_source_port_ids: z228.record(
|
|
5541
|
+
z228.string().min(1),
|
|
5542
|
+
z228.object({
|
|
5543
|
+
pullup_reference_source_port_id: z228.string().min(1).optional(),
|
|
5544
|
+
pulldown_reference_source_port_id: z228.string().min(1).optional(),
|
|
5545
|
+
power_clamp_reference_source_port_id: z228.string().min(1).optional(),
|
|
5546
|
+
ground_clamp_reference_source_port_id: z228.string().min(1).optional(),
|
|
5547
|
+
external_reference_source_port_id: z228.string().min(1).optional()
|
|
5527
5548
|
}).strict()
|
|
5528
5549
|
).optional().describe(
|
|
5529
5550
|
"Maps each IBIS signal pin name to the physical source ports used as its buffer supply/clamp references"
|
|
5530
5551
|
),
|
|
5531
|
-
model_value_corner:
|
|
5552
|
+
model_value_corner: z228.union([z228.literal("typical"), z228.literal("minimum"), z228.literal("maximum")]).describe(
|
|
5532
5553
|
"Selects the typ, min, or max column of numerical data in the IBIS model"
|
|
5533
5554
|
),
|
|
5534
|
-
include_package_parasitics:
|
|
5555
|
+
include_package_parasitics: z228.boolean().describe(
|
|
5535
5556
|
"Whether the runner includes the IBIS vendor's package resistance, inductance, and capacitance"
|
|
5536
5557
|
)
|
|
5537
5558
|
}).superRefine((model, context) => {
|
|
@@ -5545,7 +5566,7 @@ var simulation_ibis_model = z227.object({
|
|
|
5545
5566
|
for (const pin of Object.keys(model[field] ?? {})) {
|
|
5546
5567
|
if (!boundPins.has(pin)) {
|
|
5547
5568
|
context.addIssue({
|
|
5548
|
-
code:
|
|
5569
|
+
code: z228.ZodIssueCode.custom,
|
|
5549
5570
|
path: [field, pin],
|
|
5550
5571
|
message: `IBIS pin "${pin}" must be bound in ibis_pin_name_to_source_port_id`
|
|
5551
5572
|
});
|
|
@@ -5557,22 +5578,22 @@ var simulation_ibis_model = z227.object({
|
|
|
5557
5578
|
);
|
|
5558
5579
|
|
|
5559
5580
|
// src/simulation/simulation_ibis_pin_state.ts
|
|
5560
|
-
import { z as
|
|
5561
|
-
var simulation_ibis_pin_state =
|
|
5562
|
-
type:
|
|
5581
|
+
import { z as z229 } from "zod";
|
|
5582
|
+
var simulation_ibis_pin_state = z229.object({
|
|
5583
|
+
type: z229.literal("simulation_ibis_pin_state"),
|
|
5563
5584
|
simulation_ibis_pin_state_id: getZodPrefixedIdWithDefault(
|
|
5564
5585
|
"simulation_ibis_pin_state"
|
|
5565
5586
|
),
|
|
5566
|
-
simulation_experiment_id:
|
|
5567
|
-
source_port_id:
|
|
5568
|
-
is_output:
|
|
5587
|
+
simulation_experiment_id: z229.string().min(1),
|
|
5588
|
+
source_port_id: z229.string().min(1),
|
|
5589
|
+
is_output: z229.boolean().describe(
|
|
5569
5590
|
"True selects output mode; false selects input mode for this experiment"
|
|
5570
5591
|
),
|
|
5571
|
-
is_output_enabled:
|
|
5592
|
+
is_output_enabled: z229.boolean().optional()
|
|
5572
5593
|
}).superRefine((pin, context) => {
|
|
5573
5594
|
if (pin.is_output && pin.is_output_enabled === void 0 || !pin.is_output && pin.is_output_enabled !== void 0) {
|
|
5574
5595
|
context.addIssue({
|
|
5575
|
-
code:
|
|
5596
|
+
code: z229.ZodIssueCode.custom,
|
|
5576
5597
|
path: ["is_output_enabled"],
|
|
5577
5598
|
message: "Only output pins require an explicit is_output_enabled boolean"
|
|
5578
5599
|
});
|
|
@@ -5582,41 +5603,41 @@ var simulation_ibis_pin_state = z228.object({
|
|
|
5582
5603
|
);
|
|
5583
5604
|
|
|
5584
5605
|
// src/simulation/simulation_digital_stimulus.ts
|
|
5585
|
-
import { z as
|
|
5606
|
+
import { z as z230 } from "zod";
|
|
5586
5607
|
var MAX_PATTERN_BITS = 65536;
|
|
5587
|
-
var simulation_digital_stimulus =
|
|
5588
|
-
type:
|
|
5608
|
+
var simulation_digital_stimulus = z230.object({
|
|
5609
|
+
type: z230.literal("simulation_digital_stimulus"),
|
|
5589
5610
|
simulation_digital_stimulus_id: getZodPrefixedIdWithDefault(
|
|
5590
5611
|
"simulation_digital_stimulus"
|
|
5591
5612
|
),
|
|
5592
|
-
name:
|
|
5593
|
-
simulation_experiment_id:
|
|
5594
|
-
source_port_id:
|
|
5613
|
+
name: z230.string().min(1),
|
|
5614
|
+
simulation_experiment_id: z230.string().min(1),
|
|
5615
|
+
source_port_id: z230.string().min(1),
|
|
5595
5616
|
bit_duration_ms: ms.refine((milliseconds) => milliseconds > 0),
|
|
5596
5617
|
start_time_ms: ms.refine((milliseconds) => milliseconds >= 0),
|
|
5597
|
-
initial_state:
|
|
5598
|
-
inverted:
|
|
5599
|
-
transmission_pattern:
|
|
5600
|
-
transmission_type:
|
|
5601
|
-
bits:
|
|
5602
|
-
|
|
5618
|
+
initial_state: z230.union([z230.literal(0), z230.literal(1)]),
|
|
5619
|
+
inverted: z230.boolean(),
|
|
5620
|
+
transmission_pattern: z230.object({
|
|
5621
|
+
transmission_type: z230.literal("bits"),
|
|
5622
|
+
bits: z230.string().max(MAX_PATTERN_BITS).regex(/^[01]+$/).or(
|
|
5623
|
+
z230.array(z230.union([z230.literal(0), z230.literal(1)])).min(1).max(MAX_PATTERN_BITS)
|
|
5603
5624
|
),
|
|
5604
|
-
repeat:
|
|
5625
|
+
repeat: z230.boolean()
|
|
5605
5626
|
}).strict()
|
|
5606
5627
|
}).describe(
|
|
5607
5628
|
"Declares a digital transmission pattern and bit duration in milliseconds for a physical source port"
|
|
5608
5629
|
);
|
|
5609
5630
|
|
|
5610
5631
|
// src/simulation/simulation_eye_diagram.ts
|
|
5611
|
-
import { z as
|
|
5612
|
-
var simulation_eye_diagram =
|
|
5613
|
-
type:
|
|
5632
|
+
import { z as z231 } from "zod";
|
|
5633
|
+
var simulation_eye_diagram = z231.object({
|
|
5634
|
+
type: z231.literal("simulation_eye_diagram"),
|
|
5614
5635
|
simulation_eye_diagram_id: getZodPrefixedIdWithDefault(
|
|
5615
5636
|
"simulation_eye_diagram"
|
|
5616
5637
|
),
|
|
5617
|
-
name:
|
|
5618
|
-
simulation_experiment_id:
|
|
5619
|
-
simulation_voltage_probe_id:
|
|
5638
|
+
name: z231.string().min(1),
|
|
5639
|
+
simulation_experiment_id: z231.string().min(1),
|
|
5640
|
+
simulation_voltage_probe_id: z231.string().min(1),
|
|
5620
5641
|
unit_interval_ms: ms.refine((milliseconds) => milliseconds > 0),
|
|
5621
5642
|
time_origin_ms: ms,
|
|
5622
5643
|
start_time_ms: ms.refine((milliseconds) => milliseconds >= 0).optional(),
|
|
@@ -5624,7 +5645,7 @@ var simulation_eye_diagram = z230.object({
|
|
|
5624
5645
|
}).superRefine((eye, context) => {
|
|
5625
5646
|
if (eye.start_time_ms !== void 0 && eye.end_time_ms !== void 0 && eye.start_time_ms >= eye.end_time_ms) {
|
|
5626
5647
|
context.addIssue({
|
|
5627
|
-
code:
|
|
5648
|
+
code: z231.ZodIssueCode.custom,
|
|
5628
5649
|
path: ["end_time_ms"],
|
|
5629
5650
|
message: "Eye gate end must follow its start"
|
|
5630
5651
|
});
|
|
@@ -5634,51 +5655,51 @@ var simulation_eye_diagram = z230.object({
|
|
|
5634
5655
|
);
|
|
5635
5656
|
|
|
5636
5657
|
// src/simulation/simulation_return_current_contact.ts
|
|
5637
|
-
import { z as
|
|
5638
|
-
var contact_position =
|
|
5639
|
-
x:
|
|
5640
|
-
y:
|
|
5658
|
+
import { z as z232 } from "zod";
|
|
5659
|
+
var contact_position = z232.object({
|
|
5660
|
+
x: z232.number().finite(),
|
|
5661
|
+
y: z232.number().finite(),
|
|
5641
5662
|
layer: layer_ref
|
|
5642
5663
|
});
|
|
5643
|
-
var simulation_return_current_contact =
|
|
5664
|
+
var simulation_return_current_contact = z232.discriminatedUnion("contact_type", [
|
|
5644
5665
|
contact_position.extend({
|
|
5645
|
-
contact_type:
|
|
5646
|
-
pcb_port_id:
|
|
5666
|
+
contact_type: z232.literal("pcb_port"),
|
|
5667
|
+
pcb_port_id: z232.string().min(1)
|
|
5647
5668
|
}),
|
|
5648
5669
|
contact_position.extend({
|
|
5649
|
-
contact_type:
|
|
5650
|
-
pcb_via_id:
|
|
5670
|
+
contact_type: z232.literal("pcb_via"),
|
|
5671
|
+
pcb_via_id: z232.string().min(1)
|
|
5651
5672
|
}),
|
|
5652
5673
|
contact_position.extend({
|
|
5653
|
-
contact_type:
|
|
5654
|
-
pcb_copper_pour_id:
|
|
5674
|
+
contact_type: z232.literal("pcb_copper_pour"),
|
|
5675
|
+
pcb_copper_pour_id: z232.string().min(1)
|
|
5655
5676
|
})
|
|
5656
5677
|
]).describe("Identifies the reference conductor at a return-current contact");
|
|
5657
5678
|
expectTypesMatch(true);
|
|
5658
5679
|
|
|
5659
5680
|
// src/simulation/simulation_terminal_port.ts
|
|
5660
|
-
import { z as
|
|
5661
|
-
var simulation_terminal_port =
|
|
5662
|
-
signal_pcb_port_id:
|
|
5663
|
-
reference_pcb_port_id:
|
|
5681
|
+
import { z as z233 } from "zod";
|
|
5682
|
+
var simulation_terminal_port = z233.object({
|
|
5683
|
+
signal_pcb_port_id: z233.string().min(1),
|
|
5684
|
+
reference_pcb_port_id: z233.string().min(1).optional(),
|
|
5664
5685
|
reference_layer: layer_ref,
|
|
5665
|
-
resistance:
|
|
5686
|
+
resistance: z233.number().finite().positive()
|
|
5666
5687
|
}).describe(
|
|
5667
5688
|
"A two-terminal return-current excitation port with resistance in ohms"
|
|
5668
5689
|
);
|
|
5669
5690
|
expectTypesMatch(true);
|
|
5670
5691
|
|
|
5671
5692
|
// src/simulation/simulation_return_current_excitation.ts
|
|
5672
|
-
import { z as
|
|
5673
|
-
var simulation_return_current_excitation =
|
|
5674
|
-
type:
|
|
5693
|
+
import { z as z234 } from "zod";
|
|
5694
|
+
var simulation_return_current_excitation = z234.object({
|
|
5695
|
+
type: z234.literal("simulation_return_current_excitation"),
|
|
5675
5696
|
simulation_return_current_excitation_id: getZodPrefixedIdWithDefault(
|
|
5676
5697
|
"simulation_return_current_excitation"
|
|
5677
5698
|
),
|
|
5678
|
-
simulation_experiment_id:
|
|
5679
|
-
pcb_trace_id:
|
|
5680
|
-
ground_source_net_id:
|
|
5681
|
-
current:
|
|
5699
|
+
simulation_experiment_id: z234.string().min(1),
|
|
5700
|
+
pcb_trace_id: z234.string().min(1),
|
|
5701
|
+
ground_source_net_id: z234.string().min(1),
|
|
5702
|
+
current: z234.number().finite(),
|
|
5682
5703
|
return_source: simulation_return_current_contact,
|
|
5683
5704
|
return_sink: simulation_return_current_contact,
|
|
5684
5705
|
source_port: simulation_terminal_port.optional(),
|
|
@@ -5689,34 +5710,34 @@ var simulation_return_current_excitation = z233.object({
|
|
|
5689
5710
|
expectTypesMatch(true);
|
|
5690
5711
|
|
|
5691
5712
|
// src/simulation/simulation_pcb_return_current_result.ts
|
|
5692
|
-
import { z as
|
|
5693
|
-
var simulation_pcb_return_current_result =
|
|
5694
|
-
type:
|
|
5713
|
+
import { z as z235 } from "zod";
|
|
5714
|
+
var simulation_pcb_return_current_result = z235.object({
|
|
5715
|
+
type: z235.literal("simulation_pcb_return_current_result"),
|
|
5695
5716
|
simulation_pcb_return_current_result_id: getZodPrefixedIdWithDefault(
|
|
5696
5717
|
"simulation_pcb_return_current_result"
|
|
5697
5718
|
),
|
|
5698
|
-
simulation_experiment_id:
|
|
5699
|
-
pcb_board_id:
|
|
5700
|
-
simulation_return_current_excitation_ids:
|
|
5719
|
+
simulation_experiment_id: z235.string().min(1),
|
|
5720
|
+
pcb_board_id: z235.string().min(1),
|
|
5721
|
+
simulation_return_current_excitation_ids: z235.array(z235.string().min(1)).min(1).refine(
|
|
5701
5722
|
(ids) => new Set(ids).size === ids.length,
|
|
5702
5723
|
"Excitation IDs must be unique"
|
|
5703
5724
|
),
|
|
5704
|
-
frequency_hz:
|
|
5725
|
+
frequency_hz: z235.number().finite().positive().optional()
|
|
5705
5726
|
}).describe(
|
|
5706
5727
|
"A PCB return-current result at one frequency, or a frequency-independent result when frequency_hz is absent"
|
|
5707
5728
|
);
|
|
5708
5729
|
expectTypesMatch(true);
|
|
5709
5730
|
|
|
5710
5731
|
// src/simulation/simulation_return_current_asset.ts
|
|
5711
|
-
import { z as
|
|
5732
|
+
import { z as z236 } from "zod";
|
|
5712
5733
|
function createSimulationReturnCurrentAssetSchema(mimetypes) {
|
|
5713
5734
|
return asset.extend({
|
|
5714
|
-
project_relative_path:
|
|
5715
|
-
url:
|
|
5735
|
+
project_relative_path: z236.string().min(1),
|
|
5736
|
+
url: z236.string().url()
|
|
5716
5737
|
}).superRefine((value, context) => {
|
|
5717
5738
|
if (!mimetypes.includes(value.mimetype)) {
|
|
5718
5739
|
context.addIssue({
|
|
5719
|
-
code:
|
|
5740
|
+
code: z236.ZodIssueCode.custom,
|
|
5720
5741
|
path: ["mimetype"],
|
|
5721
5742
|
message: `Expected one of: ${mimetypes.join(", ")}`
|
|
5722
5743
|
});
|
|
@@ -5725,7 +5746,7 @@ function createSimulationReturnCurrentAssetSchema(mimetypes) {
|
|
|
5725
5746
|
const mediaType = /^data:([^;,]*)(?:;[^,]*)?,/i.exec(value.url)?.[1];
|
|
5726
5747
|
if (mediaType?.toLowerCase() !== value.mimetype) {
|
|
5727
5748
|
context.addIssue({
|
|
5728
|
-
code:
|
|
5749
|
+
code: z236.ZodIssueCode.custom,
|
|
5729
5750
|
path: ["url"],
|
|
5730
5751
|
message: "Data URL media type must match asset.mimetype"
|
|
5731
5752
|
});
|
|
@@ -5740,29 +5761,29 @@ var simulation_return_current_field_asset = createSimulationReturnCurrentAssetSc
|
|
|
5740
5761
|
var simulation_return_current_image_asset = createSimulationReturnCurrentAssetSchema(["image/png", "image/webp"]);
|
|
5741
5762
|
|
|
5742
5763
|
// src/simulation/simulation_pcb_return_current_field.ts
|
|
5743
|
-
import { z as
|
|
5744
|
-
var simulation_pcb_return_current_field =
|
|
5745
|
-
type:
|
|
5764
|
+
import { z as z237 } from "zod";
|
|
5765
|
+
var simulation_pcb_return_current_field = z237.object({
|
|
5766
|
+
type: z237.literal("simulation_pcb_return_current_field"),
|
|
5746
5767
|
simulation_pcb_return_current_field_id: getZodPrefixedIdWithDefault(
|
|
5747
5768
|
"simulation_pcb_return_current_field"
|
|
5748
5769
|
),
|
|
5749
|
-
simulation_pcb_return_current_result_id:
|
|
5770
|
+
simulation_pcb_return_current_result_id: z237.string().min(1),
|
|
5750
5771
|
layer: layer_ref,
|
|
5751
|
-
source_net_id:
|
|
5752
|
-
field_type:
|
|
5753
|
-
min_x:
|
|
5754
|
-
min_y:
|
|
5755
|
-
columns:
|
|
5756
|
-
rows:
|
|
5757
|
-
cell_width:
|
|
5758
|
-
cell_height:
|
|
5759
|
-
copper_thickness:
|
|
5760
|
-
data_format:
|
|
5772
|
+
source_net_id: z237.string().min(1),
|
|
5773
|
+
field_type: z237.enum(["real", "complex_phasor"]),
|
|
5774
|
+
min_x: z237.number().finite(),
|
|
5775
|
+
min_y: z237.number().finite(),
|
|
5776
|
+
columns: z237.number().int().positive().safe(),
|
|
5777
|
+
rows: z237.number().int().positive().safe(),
|
|
5778
|
+
cell_width: z237.number().finite().positive(),
|
|
5779
|
+
cell_height: z237.number().finite().positive(),
|
|
5780
|
+
copper_thickness: z237.number().finite().positive(),
|
|
5781
|
+
data_format: z237.literal("simulation_return_current_grid_json_v1"),
|
|
5761
5782
|
field_asset: simulation_return_current_field_asset
|
|
5762
5783
|
}).superRefine((field, context) => {
|
|
5763
5784
|
if (!Number.isSafeInteger(field.columns * field.rows)) {
|
|
5764
5785
|
context.addIssue({
|
|
5765
|
-
code:
|
|
5786
|
+
code: z237.ZodIssueCode.custom,
|
|
5766
5787
|
path: ["columns"],
|
|
5767
5788
|
message: "The grid cell count must be a safe integer"
|
|
5768
5789
|
});
|
|
@@ -5773,16 +5794,16 @@ var simulation_pcb_return_current_field = z236.object({
|
|
|
5773
5794
|
expectTypesMatch(true);
|
|
5774
5795
|
|
|
5775
5796
|
// src/simulation/simulation_return_current_grid_json.ts
|
|
5776
|
-
import { z as
|
|
5777
|
-
var channel =
|
|
5778
|
-
var simulation_return_current_grid_json =
|
|
5779
|
-
|
|
5780
|
-
field_type:
|
|
5797
|
+
import { z as z238 } from "zod";
|
|
5798
|
+
var channel = z238.array(z238.number().finite().nullable()).min(1);
|
|
5799
|
+
var simulation_return_current_grid_json = z238.discriminatedUnion("field_type", [
|
|
5800
|
+
z238.object({
|
|
5801
|
+
field_type: z238.literal("real"),
|
|
5781
5802
|
sheet_current_x: channel,
|
|
5782
5803
|
sheet_current_y: channel
|
|
5783
5804
|
}),
|
|
5784
|
-
|
|
5785
|
-
field_type:
|
|
5805
|
+
z238.object({
|
|
5806
|
+
field_type: z238.literal("complex_phasor"),
|
|
5786
5807
|
sheet_current_x_real: channel,
|
|
5787
5808
|
sheet_current_x_imag: channel,
|
|
5788
5809
|
sheet_current_y_real: channel,
|
|
@@ -5798,7 +5819,7 @@ var simulation_return_current_grid_json = z237.discriminatedUnion("field_type",
|
|
|
5798
5819
|
const first = channels[0];
|
|
5799
5820
|
if (channels.some((values) => values.length !== first.length)) {
|
|
5800
5821
|
context.addIssue({
|
|
5801
|
-
code:
|
|
5822
|
+
code: z238.ZodIssueCode.custom,
|
|
5802
5823
|
message: "Current channels must have equal lengths"
|
|
5803
5824
|
});
|
|
5804
5825
|
return;
|
|
@@ -5807,7 +5828,7 @@ var simulation_return_current_grid_json = z237.discriminatedUnion("field_type",
|
|
|
5807
5828
|
const masked = first[index] === null;
|
|
5808
5829
|
if (channels.some((values) => values[index] === null !== masked)) {
|
|
5809
5830
|
context.addIssue({
|
|
5810
|
-
code:
|
|
5831
|
+
code: z238.ZodIssueCode.custom,
|
|
5811
5832
|
message: `Cell ${index} must be null in every channel or finite in every channel`
|
|
5812
5833
|
});
|
|
5813
5834
|
return;
|
|
@@ -5824,7 +5845,7 @@ function getSimulationReturnCurrentGridJsonSchema(field) {
|
|
|
5824
5845
|
return simulation_return_current_grid_json.superRefine((grid, context) => {
|
|
5825
5846
|
if (grid.field_type !== field.field_type) {
|
|
5826
5847
|
context.addIssue({
|
|
5827
|
-
code:
|
|
5848
|
+
code: z238.ZodIssueCode.custom,
|
|
5828
5849
|
path: ["field_type"],
|
|
5829
5850
|
message: "Decoded field_type must match the parent field"
|
|
5830
5851
|
});
|
|
@@ -5832,7 +5853,7 @@ function getSimulationReturnCurrentGridJsonSchema(field) {
|
|
|
5832
5853
|
const first = grid.field_type === "real" ? grid.sheet_current_x : grid.sheet_current_x_real;
|
|
5833
5854
|
if (first.length !== count) {
|
|
5834
5855
|
context.addIssue({
|
|
5835
|
-
code:
|
|
5856
|
+
code: z238.ZodIssueCode.custom,
|
|
5836
5857
|
message: `Each current channel must have ${count} entries (columns * rows)`
|
|
5837
5858
|
});
|
|
5838
5859
|
}
|
|
@@ -5840,25 +5861,25 @@ function getSimulationReturnCurrentGridJsonSchema(field) {
|
|
|
5840
5861
|
}
|
|
5841
5862
|
|
|
5842
5863
|
// src/simulation/simulation_pcb_return_current_heatmap.ts
|
|
5843
|
-
import { z as
|
|
5844
|
-
var simulation_pcb_return_current_heatmap =
|
|
5845
|
-
type:
|
|
5864
|
+
import { z as z239 } from "zod";
|
|
5865
|
+
var simulation_pcb_return_current_heatmap = z239.object({
|
|
5866
|
+
type: z239.literal("simulation_pcb_return_current_heatmap"),
|
|
5846
5867
|
simulation_pcb_return_current_heatmap_id: getZodPrefixedIdWithDefault(
|
|
5847
5868
|
"simulation_pcb_return_current_heatmap"
|
|
5848
5869
|
),
|
|
5849
|
-
simulation_pcb_return_current_result_id:
|
|
5870
|
+
simulation_pcb_return_current_result_id: z239.string().min(1),
|
|
5850
5871
|
layer: layer_ref,
|
|
5851
|
-
source_net_id:
|
|
5852
|
-
min_x:
|
|
5853
|
-
min_y:
|
|
5854
|
-
max_x:
|
|
5855
|
-
max_y:
|
|
5872
|
+
source_net_id: z239.string().min(1),
|
|
5873
|
+
min_x: z239.number().finite(),
|
|
5874
|
+
min_y: z239.number().finite(),
|
|
5875
|
+
max_x: z239.number().finite(),
|
|
5876
|
+
max_y: z239.number().finite(),
|
|
5856
5877
|
image_asset: simulation_return_current_image_asset
|
|
5857
5878
|
}).superRefine((heatmap, context) => {
|
|
5858
5879
|
for (const axis of ["x", "y"]) {
|
|
5859
5880
|
if (heatmap[`max_${axis}`] <= heatmap[`min_${axis}`]) {
|
|
5860
5881
|
context.addIssue({
|
|
5861
|
-
code:
|
|
5882
|
+
code: z239.ZodIssueCode.custom,
|
|
5862
5883
|
path: [`max_${axis}`],
|
|
5863
5884
|
message: "Heatmap bounds must have positive width and height"
|
|
5864
5885
|
});
|
|
@@ -5870,14 +5891,14 @@ var simulation_pcb_return_current_heatmap = z238.object({
|
|
|
5870
5891
|
expectTypesMatch(true);
|
|
5871
5892
|
|
|
5872
5893
|
// src/simulation/simulation_pcb_return_current_marker.ts
|
|
5873
|
-
import { z as
|
|
5874
|
-
var marker_base =
|
|
5875
|
-
type:
|
|
5894
|
+
import { z as z240 } from "zod";
|
|
5895
|
+
var marker_base = z240.object({
|
|
5896
|
+
type: z240.literal("simulation_pcb_return_current_marker"),
|
|
5876
5897
|
simulation_pcb_return_current_marker_id: getZodPrefixedIdWithDefault(
|
|
5877
5898
|
"simulation_pcb_return_current_marker"
|
|
5878
5899
|
),
|
|
5879
|
-
simulation_pcb_return_current_result_id:
|
|
5880
|
-
role:
|
|
5900
|
+
simulation_pcb_return_current_result_id: z240.string().min(1),
|
|
5901
|
+
role: z240.enum([
|
|
5881
5902
|
"signal_source",
|
|
5882
5903
|
"signal_load",
|
|
5883
5904
|
"return_source",
|
|
@@ -5885,33 +5906,33 @@ var marker_base = z239.object({
|
|
|
5885
5906
|
"signal_transition",
|
|
5886
5907
|
"return_transition"
|
|
5887
5908
|
]),
|
|
5888
|
-
label:
|
|
5889
|
-
label_x:
|
|
5890
|
-
label_y:
|
|
5909
|
+
label: z240.string().optional(),
|
|
5910
|
+
label_x: z240.number().finite().optional(),
|
|
5911
|
+
label_y: z240.number().finite().optional()
|
|
5891
5912
|
});
|
|
5892
|
-
var simulation_pcb_return_current_marker =
|
|
5913
|
+
var simulation_pcb_return_current_marker = z240.discriminatedUnion("target_type", [
|
|
5893
5914
|
marker_base.extend({
|
|
5894
|
-
target_type:
|
|
5895
|
-
pcb_port_id:
|
|
5915
|
+
target_type: z240.literal("pcb_port"),
|
|
5916
|
+
pcb_port_id: z240.string().min(1),
|
|
5896
5917
|
layer: layer_ref
|
|
5897
5918
|
}),
|
|
5898
5919
|
marker_base.extend({
|
|
5899
|
-
target_type:
|
|
5900
|
-
pcb_via_id:
|
|
5920
|
+
target_type: z240.literal("pcb_via"),
|
|
5921
|
+
pcb_via_id: z240.string().min(1),
|
|
5901
5922
|
from_layer: layer_ref,
|
|
5902
5923
|
to_layer: layer_ref
|
|
5903
5924
|
})
|
|
5904
5925
|
]).superRefine((marker, context) => {
|
|
5905
5926
|
if (marker.label_x === void 0 !== (marker.label_y === void 0)) {
|
|
5906
5927
|
context.addIssue({
|
|
5907
|
-
code:
|
|
5928
|
+
code: z240.ZodIssueCode.custom,
|
|
5908
5929
|
path: ["label_x"],
|
|
5909
5930
|
message: "label_x and label_y must be provided together"
|
|
5910
5931
|
});
|
|
5911
5932
|
}
|
|
5912
5933
|
if (marker.target_type === "pcb_via" && marker.from_layer === marker.to_layer) {
|
|
5913
5934
|
context.addIssue({
|
|
5914
|
-
code:
|
|
5935
|
+
code: z240.ZodIssueCode.custom,
|
|
5915
5936
|
path: ["to_layer"],
|
|
5916
5937
|
message: "A via transition must connect distinct layers"
|
|
5917
5938
|
});
|
|
@@ -5922,13 +5943,13 @@ var simulation_pcb_return_current_marker = z239.discriminatedUnion("target_type"
|
|
|
5922
5943
|
expectTypesMatch(true);
|
|
5923
5944
|
|
|
5924
5945
|
// src/any_circuit_element.ts
|
|
5925
|
-
import { z as
|
|
5946
|
+
import { z as z246 } from "zod";
|
|
5926
5947
|
|
|
5927
5948
|
// src/drawing/drawing_page.ts
|
|
5928
|
-
import { z as
|
|
5949
|
+
import { z as z242 } from "zod";
|
|
5929
5950
|
|
|
5930
5951
|
// src/drawing/drawing_page_size.ts
|
|
5931
|
-
import { z as
|
|
5952
|
+
import { z as z241 } from "zod";
|
|
5932
5953
|
var drawingPageSizes = {
|
|
5933
5954
|
iso_a0: [1189, 841],
|
|
5934
5955
|
iso_a1: [841, 594],
|
|
@@ -5941,7 +5962,7 @@ var drawingPageSizes = {
|
|
|
5941
5962
|
ansi_d: [863.6, 558.8],
|
|
5942
5963
|
ansi_e: [1117.6, 863.6]
|
|
5943
5964
|
};
|
|
5944
|
-
var drawing_page_size =
|
|
5965
|
+
var drawing_page_size = z241.enum([
|
|
5945
5966
|
"iso_a0",
|
|
5946
5967
|
"iso_a1",
|
|
5947
5968
|
"iso_a2",
|
|
@@ -5959,15 +5980,15 @@ function getDrawingPageDimensions(size2, orientation = "landscape") {
|
|
|
5959
5980
|
}
|
|
5960
5981
|
|
|
5961
5982
|
// src/drawing/drawing_page.ts
|
|
5962
|
-
var drawing_page =
|
|
5963
|
-
type:
|
|
5964
|
-
drawing_page_id:
|
|
5965
|
-
name:
|
|
5966
|
-
display_name:
|
|
5983
|
+
var drawing_page = z242.object({
|
|
5984
|
+
type: z242.literal("drawing_page"),
|
|
5985
|
+
drawing_page_id: z242.string().min(1),
|
|
5986
|
+
name: z242.string().optional(),
|
|
5987
|
+
display_name: z242.string().optional(),
|
|
5967
5988
|
page_size: drawing_page_size.optional(),
|
|
5968
|
-
orientation:
|
|
5969
|
-
width:
|
|
5970
|
-
height:
|
|
5989
|
+
orientation: z242.enum(["landscape", "portrait"]).optional(),
|
|
5990
|
+
width: z242.number().finite().positive(),
|
|
5991
|
+
height: z242.number().finite().positive()
|
|
5971
5992
|
}).superRefine((page, ctx) => {
|
|
5972
5993
|
if (!page.page_size) {
|
|
5973
5994
|
if (page.orientation)
|
|
@@ -5991,8 +6012,8 @@ var drawing_page = z241.object({
|
|
|
5991
6012
|
expectTypesMatch(true);
|
|
5992
6013
|
|
|
5993
6014
|
// src/drawing/drawing_part_view.ts
|
|
5994
|
-
import { z as
|
|
5995
|
-
var drawing_part_view_direction =
|
|
6015
|
+
import { z as z243 } from "zod";
|
|
6016
|
+
var drawing_part_view_direction = z243.enum([
|
|
5996
6017
|
"x_positive",
|
|
5997
6018
|
"x_negative",
|
|
5998
6019
|
"y_positive",
|
|
@@ -6001,26 +6022,26 @@ var drawing_part_view_direction = z242.enum([
|
|
|
6001
6022
|
"z_negative",
|
|
6002
6023
|
"isometric"
|
|
6003
6024
|
]);
|
|
6004
|
-
var drawing_section_plane =
|
|
6005
|
-
axis:
|
|
6006
|
-
offset:
|
|
6007
|
-
keep_side:
|
|
6008
|
-
hatch_spacing:
|
|
6009
|
-
});
|
|
6010
|
-
var drawing_part_view =
|
|
6011
|
-
type:
|
|
6012
|
-
drawing_part_view_id:
|
|
6013
|
-
drawing_page_id:
|
|
6014
|
-
source_group_id:
|
|
6015
|
-
source_component_ids:
|
|
6016
|
-
name:
|
|
6017
|
-
display_name:
|
|
6025
|
+
var drawing_section_plane = z243.object({
|
|
6026
|
+
axis: z243.enum(["x", "y", "z"]),
|
|
6027
|
+
offset: z243.number().finite(),
|
|
6028
|
+
keep_side: z243.enum(["less", "greater"]),
|
|
6029
|
+
hatch_spacing: z243.number().finite().positive().optional()
|
|
6030
|
+
});
|
|
6031
|
+
var drawing_part_view = z243.object({
|
|
6032
|
+
type: z243.literal("drawing_part_view"),
|
|
6033
|
+
drawing_part_view_id: z243.string().min(1),
|
|
6034
|
+
drawing_page_id: z243.string().min(1),
|
|
6035
|
+
source_group_id: z243.string().min(1).optional(),
|
|
6036
|
+
source_component_ids: z243.array(z243.string().min(1)).optional(),
|
|
6037
|
+
name: z243.string().optional(),
|
|
6038
|
+
display_name: z243.string().optional(),
|
|
6018
6039
|
direction: drawing_part_view_direction,
|
|
6019
|
-
center:
|
|
6020
|
-
width:
|
|
6021
|
-
height:
|
|
6022
|
-
scale:
|
|
6023
|
-
show_hidden_edges:
|
|
6040
|
+
center: z243.object({ x: z243.number().finite(), y: z243.number().finite() }),
|
|
6041
|
+
width: z243.number().finite().positive(),
|
|
6042
|
+
height: z243.number().finite().positive(),
|
|
6043
|
+
scale: z243.number().finite().positive().optional(),
|
|
6044
|
+
show_hidden_edges: z243.boolean().optional(),
|
|
6024
6045
|
section: drawing_section_plane.optional()
|
|
6025
6046
|
}).describe(
|
|
6026
6047
|
"A configured orthographic view of selected assembly geometry. Paper coordinates are mm, origin at sheet center, +X right/+Y up. Directions and section planes use CAD world coordinates in mm with +Z up."
|
|
@@ -6031,20 +6052,20 @@ expectTypesMatch(
|
|
|
6031
6052
|
expectTypesMatch(true);
|
|
6032
6053
|
|
|
6033
6054
|
// src/drawing/drawing_page_title_block.ts
|
|
6034
|
-
import { z as
|
|
6035
|
-
var drawing_page_title_block =
|
|
6036
|
-
type:
|
|
6037
|
-
drawing_page_title_block_id:
|
|
6038
|
-
drawing_page_id:
|
|
6039
|
-
title:
|
|
6040
|
-
legal_owner:
|
|
6041
|
-
identification_number:
|
|
6042
|
-
revision_index:
|
|
6043
|
-
date_of_issue:
|
|
6044
|
-
creator:
|
|
6045
|
-
approval_person:
|
|
6046
|
-
sheet_number:
|
|
6047
|
-
number_of_sheets:
|
|
6055
|
+
import { z as z244 } from "zod";
|
|
6056
|
+
var drawing_page_title_block = z244.object({
|
|
6057
|
+
type: z244.literal("drawing_page_title_block"),
|
|
6058
|
+
drawing_page_title_block_id: z244.string().min(1),
|
|
6059
|
+
drawing_page_id: z244.string().min(1),
|
|
6060
|
+
title: z244.string().min(1),
|
|
6061
|
+
legal_owner: z244.string().optional(),
|
|
6062
|
+
identification_number: z244.string().optional(),
|
|
6063
|
+
revision_index: z244.string().optional(),
|
|
6064
|
+
date_of_issue: z244.string().optional(),
|
|
6065
|
+
creator: z244.string().optional(),
|
|
6066
|
+
approval_person: z244.string().optional(),
|
|
6067
|
+
sheet_number: z244.number().int().positive().optional(),
|
|
6068
|
+
number_of_sheets: z244.number().int().positive().optional()
|
|
6048
6069
|
}).refine(
|
|
6049
6070
|
(block) => block.sheet_number == null || block.number_of_sheets == null || block.sheet_number <= block.number_of_sheets,
|
|
6050
6071
|
{
|
|
@@ -6055,28 +6076,28 @@ var drawing_page_title_block = z243.object({
|
|
|
6055
6076
|
expectTypesMatch(true);
|
|
6056
6077
|
|
|
6057
6078
|
// src/drawing/drawing_dimension_line.ts
|
|
6058
|
-
import { z as
|
|
6059
|
-
var paper_point =
|
|
6060
|
-
x:
|
|
6061
|
-
y:
|
|
6062
|
-
});
|
|
6063
|
-
var drawing_dimension_line =
|
|
6064
|
-
type:
|
|
6065
|
-
drawing_dimension_line_id:
|
|
6066
|
-
drawing_part_view_id:
|
|
6079
|
+
import { z as z245 } from "zod";
|
|
6080
|
+
var paper_point = z245.object({
|
|
6081
|
+
x: z245.number().finite(),
|
|
6082
|
+
y: z245.number().finite()
|
|
6083
|
+
});
|
|
6084
|
+
var drawing_dimension_line = z245.object({
|
|
6085
|
+
type: z245.literal("drawing_dimension_line"),
|
|
6086
|
+
drawing_dimension_line_id: z245.string().trim().min(1),
|
|
6087
|
+
drawing_part_view_id: z245.string().trim().min(1),
|
|
6067
6088
|
start: paper_point,
|
|
6068
6089
|
end: paper_point,
|
|
6069
|
-
text:
|
|
6090
|
+
text: z245.string().refine(
|
|
6070
6091
|
(text) => text.trim().length > 0,
|
|
6071
6092
|
"Dimension text must not be blank"
|
|
6072
6093
|
),
|
|
6073
6094
|
edge_ref_start: paper_point.optional(),
|
|
6074
6095
|
edge_ref_end: paper_point.optional(),
|
|
6075
|
-
edge_ref_name:
|
|
6096
|
+
edge_ref_name: z245.string().refine(
|
|
6076
6097
|
(name) => name.trim().length > 0,
|
|
6077
6098
|
"Edge reference name must not be blank"
|
|
6078
6099
|
).optional(),
|
|
6079
|
-
name:
|
|
6100
|
+
name: z245.string().trim().min(1).optional()
|
|
6080
6101
|
}).refine(
|
|
6081
6102
|
(line) => line.start.x !== line.end.x || line.start.y !== line.end.y,
|
|
6082
6103
|
{ message: "Dimension line endpoints must be distinct", path: ["end"] }
|
|
@@ -6088,7 +6109,7 @@ expectTypesMatch(
|
|
|
6088
6109
|
);
|
|
6089
6110
|
|
|
6090
6111
|
// src/any_circuit_element.ts
|
|
6091
|
-
var any_circuit_element =
|
|
6112
|
+
var any_circuit_element = z246.union([
|
|
6092
6113
|
pcb_quote_estimate,
|
|
6093
6114
|
drawing_page,
|
|
6094
6115
|
drawing_page_title_block,
|
|
@@ -6162,6 +6183,7 @@ var any_circuit_element = z245.union([
|
|
|
6162
6183
|
pcb_trace,
|
|
6163
6184
|
pcb_trace_warning,
|
|
6164
6185
|
pcb_trace_style_warning,
|
|
6186
|
+
pcb_copper_pour_isolated_warning,
|
|
6165
6187
|
pcb_trace_too_long_warning,
|
|
6166
6188
|
pcb_trace_too_long_error,
|
|
6167
6189
|
pcb_bus_length_skew_error,
|
|
@@ -6368,6 +6390,7 @@ export {
|
|
|
6368
6390
|
pcb_connector_not_in_accessible_orientation_warning,
|
|
6369
6391
|
pcb_copper_pour,
|
|
6370
6392
|
pcb_copper_pour_brep,
|
|
6393
|
+
pcb_copper_pour_isolated_warning,
|
|
6371
6394
|
pcb_copper_pour_polygon,
|
|
6372
6395
|
pcb_copper_pour_rect,
|
|
6373
6396
|
pcb_copper_text,
|