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