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