circuit-json 0.0.446 → 0.0.447
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 +23 -0
- package/dist/index.d.mts +120 -5
- package/dist/index.mjs +699 -677
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2279,84 +2279,104 @@ var pcb_trace_warning = z106.object({
|
|
|
2279
2279
|
}).describe("Defines a trace warning on the PCB");
|
|
2280
2280
|
expectTypesMatch(true);
|
|
2281
2281
|
|
|
2282
|
-
// src/pcb/
|
|
2282
|
+
// src/pcb/pcb_trace_too_long_warning.ts
|
|
2283
2283
|
import { z as z107 } from "zod";
|
|
2284
|
+
var pcb_trace_too_long_warning = z107.object({
|
|
2285
|
+
type: z107.literal("pcb_trace_too_long_warning"),
|
|
2286
|
+
pcb_trace_too_long_warning_id: getZodPrefixedIdWithDefault(
|
|
2287
|
+
"pcb_trace_too_long_warning"
|
|
2288
|
+
),
|
|
2289
|
+
warning_type: z107.literal("pcb_trace_too_long_warning").default("pcb_trace_too_long_warning"),
|
|
2290
|
+
message: z107.string(),
|
|
2291
|
+
pcb_trace_id: z107.string(),
|
|
2292
|
+
source_net_id: z107.string().optional(),
|
|
2293
|
+
source_trace_id: z107.string().optional(),
|
|
2294
|
+
actual_trace_length: distance,
|
|
2295
|
+
maximum_trace_length: distance,
|
|
2296
|
+
subcircuit_id: z107.string().optional()
|
|
2297
|
+
}).describe(
|
|
2298
|
+
"Warning emitted when a PCB trace is longer than its maximum allowed length"
|
|
2299
|
+
);
|
|
2300
|
+
expectTypesMatch(true);
|
|
2301
|
+
|
|
2302
|
+
// src/pcb/pcb_trace_error.ts
|
|
2303
|
+
import { z as z108 } from "zod";
|
|
2284
2304
|
var pcb_trace_error = base_circuit_json_error.extend({
|
|
2285
|
-
type:
|
|
2305
|
+
type: z108.literal("pcb_trace_error"),
|
|
2286
2306
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
2287
|
-
error_type:
|
|
2307
|
+
error_type: z108.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
2288
2308
|
center: point.optional(),
|
|
2289
|
-
pcb_trace_id:
|
|
2290
|
-
source_trace_id:
|
|
2291
|
-
pcb_component_ids:
|
|
2292
|
-
pcb_port_ids:
|
|
2293
|
-
subcircuit_id:
|
|
2309
|
+
pcb_trace_id: z108.string(),
|
|
2310
|
+
source_trace_id: z108.string(),
|
|
2311
|
+
pcb_component_ids: z108.array(z108.string()),
|
|
2312
|
+
pcb_port_ids: z108.array(z108.string()),
|
|
2313
|
+
subcircuit_id: z108.string().optional()
|
|
2294
2314
|
}).describe("Defines a trace error on the PCB");
|
|
2295
2315
|
expectTypesMatch(true);
|
|
2296
2316
|
|
|
2297
2317
|
// src/pcb/pcb_trace_missing_error.ts
|
|
2298
|
-
import { z as
|
|
2318
|
+
import { z as z109 } from "zod";
|
|
2299
2319
|
var pcb_trace_missing_error = base_circuit_json_error.extend({
|
|
2300
|
-
type:
|
|
2320
|
+
type: z109.literal("pcb_trace_missing_error"),
|
|
2301
2321
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
2302
2322
|
"pcb_trace_missing_error"
|
|
2303
2323
|
),
|
|
2304
|
-
error_type:
|
|
2324
|
+
error_type: z109.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
2305
2325
|
center: point.optional(),
|
|
2306
|
-
source_trace_id:
|
|
2307
|
-
pcb_component_ids:
|
|
2308
|
-
pcb_port_ids:
|
|
2309
|
-
subcircuit_id:
|
|
2326
|
+
source_trace_id: z109.string(),
|
|
2327
|
+
pcb_component_ids: z109.array(z109.string()),
|
|
2328
|
+
pcb_port_ids: z109.array(z109.string()),
|
|
2329
|
+
subcircuit_id: z109.string().optional()
|
|
2310
2330
|
}).describe(
|
|
2311
2331
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
2312
2332
|
);
|
|
2313
2333
|
expectTypesMatch(true);
|
|
2314
2334
|
|
|
2315
2335
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
2316
|
-
import { z as
|
|
2336
|
+
import { z as z110 } from "zod";
|
|
2317
2337
|
var pcb_port_not_matched_error = base_circuit_json_error.extend({
|
|
2318
|
-
type:
|
|
2338
|
+
type: z110.literal("pcb_port_not_matched_error"),
|
|
2319
2339
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2320
|
-
error_type:
|
|
2321
|
-
pcb_component_ids:
|
|
2322
|
-
subcircuit_id:
|
|
2340
|
+
error_type: z110.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
2341
|
+
pcb_component_ids: z110.array(z110.string()),
|
|
2342
|
+
subcircuit_id: z110.string().optional()
|
|
2323
2343
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
2324
2344
|
expectTypesMatch(true);
|
|
2325
2345
|
|
|
2326
2346
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
2327
|
-
import { z as
|
|
2347
|
+
import { z as z111 } from "zod";
|
|
2328
2348
|
var pcb_port_not_connected_error = base_circuit_json_error.extend({
|
|
2329
|
-
type:
|
|
2349
|
+
type: z111.literal("pcb_port_not_connected_error"),
|
|
2330
2350
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
2331
2351
|
"pcb_port_not_connected_error"
|
|
2332
2352
|
),
|
|
2333
|
-
error_type:
|
|
2334
|
-
pcb_port_ids:
|
|
2335
|
-
pcb_component_ids:
|
|
2336
|
-
subcircuit_id:
|
|
2353
|
+
error_type: z111.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
2354
|
+
pcb_port_ids: z111.array(z111.string()),
|
|
2355
|
+
pcb_component_ids: z111.array(z111.string()),
|
|
2356
|
+
subcircuit_id: z111.string().optional()
|
|
2337
2357
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
2338
2358
|
expectTypesMatch(
|
|
2339
2359
|
true
|
|
2340
2360
|
);
|
|
2341
2361
|
|
|
2342
2362
|
// src/pcb/pcb_net.ts
|
|
2343
|
-
import { z as
|
|
2344
|
-
var pcb_net =
|
|
2345
|
-
type:
|
|
2363
|
+
import { z as z112 } from "zod";
|
|
2364
|
+
var pcb_net = z112.object({
|
|
2365
|
+
type: z112.literal("pcb_net"),
|
|
2346
2366
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
2347
|
-
source_net_id:
|
|
2348
|
-
highlight_color:
|
|
2367
|
+
source_net_id: z112.string().optional(),
|
|
2368
|
+
highlight_color: z112.string().optional()
|
|
2349
2369
|
}).describe("Defines a net on the PCB");
|
|
2350
2370
|
expectTypesMatch(true);
|
|
2351
2371
|
|
|
2352
2372
|
// src/pcb/pcb_via.ts
|
|
2353
|
-
import { z as
|
|
2354
|
-
var pcb_via =
|
|
2355
|
-
type:
|
|
2373
|
+
import { z as z113 } from "zod";
|
|
2374
|
+
var pcb_via = z113.object({
|
|
2375
|
+
type: z113.literal("pcb_via"),
|
|
2356
2376
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
2357
|
-
pcb_group_id:
|
|
2358
|
-
subcircuit_id:
|
|
2359
|
-
subcircuit_connectivity_map_key:
|
|
2377
|
+
pcb_group_id: z113.string().optional(),
|
|
2378
|
+
subcircuit_id: z113.string().optional(),
|
|
2379
|
+
subcircuit_connectivity_map_key: z113.string().optional(),
|
|
2360
2380
|
x: distance,
|
|
2361
2381
|
y: distance,
|
|
2362
2382
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -2365,103 +2385,103 @@ var pcb_via = z112.object({
|
|
|
2365
2385
|
from_layer: layer_ref.optional(),
|
|
2366
2386
|
/** @deprecated */
|
|
2367
2387
|
to_layer: layer_ref.optional(),
|
|
2368
|
-
layers:
|
|
2369
|
-
pcb_trace_id:
|
|
2370
|
-
net_is_assignable:
|
|
2371
|
-
net_assigned:
|
|
2372
|
-
is_tented:
|
|
2388
|
+
layers: z113.array(layer_ref),
|
|
2389
|
+
pcb_trace_id: z113.string().optional(),
|
|
2390
|
+
net_is_assignable: z113.boolean().optional(),
|
|
2391
|
+
net_assigned: z113.boolean().optional(),
|
|
2392
|
+
is_tented: z113.boolean().optional()
|
|
2373
2393
|
}).describe("Defines a via on the PCB");
|
|
2374
2394
|
expectTypesMatch(true);
|
|
2375
2395
|
|
|
2376
2396
|
// src/pcb/pcb_board.ts
|
|
2377
|
-
import { z as
|
|
2378
|
-
var pcb_board =
|
|
2379
|
-
type:
|
|
2397
|
+
import { z as z114 } from "zod";
|
|
2398
|
+
var pcb_board = z114.object({
|
|
2399
|
+
type: z114.literal("pcb_board"),
|
|
2380
2400
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
2381
|
-
pcb_panel_id:
|
|
2382
|
-
carrier_pcb_board_id:
|
|
2383
|
-
is_subcircuit:
|
|
2384
|
-
subcircuit_id:
|
|
2385
|
-
is_mounted_to_carrier_board:
|
|
2401
|
+
pcb_panel_id: z114.string().optional(),
|
|
2402
|
+
carrier_pcb_board_id: z114.string().optional(),
|
|
2403
|
+
is_subcircuit: z114.boolean().optional(),
|
|
2404
|
+
subcircuit_id: z114.string().optional(),
|
|
2405
|
+
is_mounted_to_carrier_board: z114.boolean().optional(),
|
|
2386
2406
|
width: length.optional(),
|
|
2387
2407
|
height: length.optional(),
|
|
2388
2408
|
center: point,
|
|
2389
|
-
display_offset_x:
|
|
2409
|
+
display_offset_x: z114.string().optional().describe(
|
|
2390
2410
|
"How to display the x offset for this board, usually corresponding with how the user specified it"
|
|
2391
2411
|
),
|
|
2392
|
-
display_offset_y:
|
|
2412
|
+
display_offset_y: z114.string().optional().describe(
|
|
2393
2413
|
"How to display the y offset for this board, usually corresponding with how the user specified it"
|
|
2394
2414
|
),
|
|
2395
2415
|
thickness: length.optional().default(1.4),
|
|
2396
|
-
num_layers:
|
|
2397
|
-
outline:
|
|
2398
|
-
shape:
|
|
2399
|
-
material:
|
|
2400
|
-
solder_mask_color:
|
|
2401
|
-
silkscreen_color:
|
|
2416
|
+
num_layers: z114.number().optional().default(4),
|
|
2417
|
+
outline: z114.array(point).optional(),
|
|
2418
|
+
shape: z114.enum(["rect", "polygon"]).optional(),
|
|
2419
|
+
material: z114.enum(["fr4", "fr1"]).default("fr4"),
|
|
2420
|
+
solder_mask_color: z114.string().optional(),
|
|
2421
|
+
silkscreen_color: z114.string().optional(),
|
|
2402
2422
|
anchor_position: point.optional(),
|
|
2403
2423
|
anchor_alignment: ninePointAnchor.optional(),
|
|
2404
|
-
position_mode:
|
|
2424
|
+
position_mode: z114.enum(["relative_to_panel_anchor", "none"]).optional()
|
|
2405
2425
|
}).merge(manufacturing_drc_properties).describe("Defines the board outline of the PCB");
|
|
2406
2426
|
expectTypesMatch(true);
|
|
2407
2427
|
|
|
2408
2428
|
// src/pcb/pcb_panel.ts
|
|
2409
|
-
import { z as
|
|
2410
|
-
var pcb_panel =
|
|
2411
|
-
type:
|
|
2429
|
+
import { z as z115 } from "zod";
|
|
2430
|
+
var pcb_panel = z115.object({
|
|
2431
|
+
type: z115.literal("pcb_panel"),
|
|
2412
2432
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
2413
2433
|
width: length,
|
|
2414
2434
|
height: length,
|
|
2415
2435
|
center: point,
|
|
2416
2436
|
thickness: length.optional().default(1.4),
|
|
2417
|
-
covered_with_solder_mask:
|
|
2437
|
+
covered_with_solder_mask: z115.boolean().optional().default(true)
|
|
2418
2438
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
2419
2439
|
expectTypesMatch(true);
|
|
2420
2440
|
|
|
2421
2441
|
// src/pcb/pcb_placement_error.ts
|
|
2422
|
-
import { z as
|
|
2442
|
+
import { z as z116 } from "zod";
|
|
2423
2443
|
var pcb_placement_error = base_circuit_json_error.extend({
|
|
2424
|
-
type:
|
|
2444
|
+
type: z116.literal("pcb_placement_error"),
|
|
2425
2445
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
2426
|
-
error_type:
|
|
2427
|
-
subcircuit_id:
|
|
2446
|
+
error_type: z116.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
2447
|
+
subcircuit_id: z116.string().optional()
|
|
2428
2448
|
}).describe("Defines a placement error on the PCB");
|
|
2429
2449
|
expectTypesMatch(true);
|
|
2430
2450
|
|
|
2431
2451
|
// src/pcb/pcb_panelization_placement_error.ts
|
|
2432
|
-
import { z as
|
|
2452
|
+
import { z as z117 } from "zod";
|
|
2433
2453
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
2434
|
-
type:
|
|
2454
|
+
type: z117.literal("pcb_panelization_placement_error"),
|
|
2435
2455
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
2436
2456
|
"pcb_panelization_placement_error"
|
|
2437
2457
|
),
|
|
2438
|
-
error_type:
|
|
2439
|
-
pcb_panel_id:
|
|
2440
|
-
pcb_board_id:
|
|
2441
|
-
subcircuit_id:
|
|
2458
|
+
error_type: z117.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
|
|
2459
|
+
pcb_panel_id: z117.string().optional(),
|
|
2460
|
+
pcb_board_id: z117.string().optional(),
|
|
2461
|
+
subcircuit_id: z117.string().optional()
|
|
2442
2462
|
}).describe("Defines a panelization placement error on the PCB");
|
|
2443
2463
|
expectTypesMatch(true);
|
|
2444
2464
|
|
|
2445
2465
|
// src/pcb/pcb_trace_hint.ts
|
|
2446
|
-
import { z as
|
|
2447
|
-
var pcb_trace_hint =
|
|
2448
|
-
type:
|
|
2466
|
+
import { z as z118 } from "zod";
|
|
2467
|
+
var pcb_trace_hint = z118.object({
|
|
2468
|
+
type: z118.literal("pcb_trace_hint"),
|
|
2449
2469
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
2450
|
-
pcb_port_id:
|
|
2451
|
-
pcb_component_id:
|
|
2452
|
-
route:
|
|
2453
|
-
subcircuit_id:
|
|
2470
|
+
pcb_port_id: z118.string(),
|
|
2471
|
+
pcb_component_id: z118.string(),
|
|
2472
|
+
route: z118.array(route_hint_point),
|
|
2473
|
+
subcircuit_id: z118.string().optional()
|
|
2454
2474
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
2455
2475
|
expectTypesMatch(true);
|
|
2456
2476
|
|
|
2457
2477
|
// src/pcb/pcb_silkscreen_line.ts
|
|
2458
|
-
import { z as
|
|
2459
|
-
var pcb_silkscreen_line =
|
|
2460
|
-
type:
|
|
2478
|
+
import { z as z119 } from "zod";
|
|
2479
|
+
var pcb_silkscreen_line = z119.object({
|
|
2480
|
+
type: z119.literal("pcb_silkscreen_line"),
|
|
2461
2481
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
2462
|
-
pcb_component_id:
|
|
2463
|
-
pcb_group_id:
|
|
2464
|
-
subcircuit_id:
|
|
2482
|
+
pcb_component_id: z119.string(),
|
|
2483
|
+
pcb_group_id: z119.string().optional(),
|
|
2484
|
+
subcircuit_id: z119.string().optional(),
|
|
2465
2485
|
stroke_width: distance.default("0.1mm"),
|
|
2466
2486
|
x1: distance,
|
|
2467
2487
|
y1: distance,
|
|
@@ -2472,32 +2492,32 @@ var pcb_silkscreen_line = z118.object({
|
|
|
2472
2492
|
expectTypesMatch(true);
|
|
2473
2493
|
|
|
2474
2494
|
// src/pcb/pcb_silkscreen_path.ts
|
|
2475
|
-
import { z as
|
|
2476
|
-
var pcb_silkscreen_path =
|
|
2477
|
-
type:
|
|
2495
|
+
import { z as z120 } from "zod";
|
|
2496
|
+
var pcb_silkscreen_path = z120.object({
|
|
2497
|
+
type: z120.literal("pcb_silkscreen_path"),
|
|
2478
2498
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
2479
|
-
pcb_component_id:
|
|
2480
|
-
pcb_group_id:
|
|
2481
|
-
subcircuit_id:
|
|
2499
|
+
pcb_component_id: z120.string(),
|
|
2500
|
+
pcb_group_id: z120.string().optional(),
|
|
2501
|
+
subcircuit_id: z120.string().optional(),
|
|
2482
2502
|
layer: visible_layer,
|
|
2483
|
-
route:
|
|
2503
|
+
route: z120.array(point),
|
|
2484
2504
|
stroke_width: length
|
|
2485
2505
|
}).describe("Defines a silkscreen path on the PCB");
|
|
2486
2506
|
expectTypesMatch(true);
|
|
2487
2507
|
|
|
2488
2508
|
// src/pcb/pcb_silkscreen_text.ts
|
|
2489
|
-
import { z as
|
|
2490
|
-
var pcb_silkscreen_text =
|
|
2491
|
-
type:
|
|
2509
|
+
import { z as z121 } from "zod";
|
|
2510
|
+
var pcb_silkscreen_text = z121.object({
|
|
2511
|
+
type: z121.literal("pcb_silkscreen_text"),
|
|
2492
2512
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
2493
|
-
pcb_group_id:
|
|
2494
|
-
subcircuit_id:
|
|
2495
|
-
font:
|
|
2513
|
+
pcb_group_id: z121.string().optional(),
|
|
2514
|
+
subcircuit_id: z121.string().optional(),
|
|
2515
|
+
font: z121.literal("tscircuit2024").default("tscircuit2024"),
|
|
2496
2516
|
font_size: distance.default("0.2mm"),
|
|
2497
|
-
pcb_component_id:
|
|
2498
|
-
text:
|
|
2499
|
-
is_knockout:
|
|
2500
|
-
knockout_padding:
|
|
2517
|
+
pcb_component_id: z121.string(),
|
|
2518
|
+
text: z121.string(),
|
|
2519
|
+
is_knockout: z121.boolean().default(false).optional(),
|
|
2520
|
+
knockout_padding: z121.object({
|
|
2501
2521
|
left: length,
|
|
2502
2522
|
top: length,
|
|
2503
2523
|
bottom: length,
|
|
@@ -2508,27 +2528,27 @@ var pcb_silkscreen_text = z120.object({
|
|
|
2508
2528
|
bottom: "0.2mm",
|
|
2509
2529
|
right: "0.2mm"
|
|
2510
2530
|
}).optional(),
|
|
2511
|
-
ccw_rotation:
|
|
2531
|
+
ccw_rotation: z121.number().optional(),
|
|
2512
2532
|
layer: layer_ref,
|
|
2513
|
-
is_mirrored:
|
|
2533
|
+
is_mirrored: z121.boolean().default(false).optional(),
|
|
2514
2534
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2515
2535
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2516
2536
|
}).describe("Defines silkscreen text on the PCB");
|
|
2517
2537
|
expectTypesMatch(true);
|
|
2518
2538
|
|
|
2519
2539
|
// src/pcb/pcb_copper_text.ts
|
|
2520
|
-
import { z as
|
|
2521
|
-
var pcb_copper_text =
|
|
2522
|
-
type:
|
|
2540
|
+
import { z as z122 } from "zod";
|
|
2541
|
+
var pcb_copper_text = z122.object({
|
|
2542
|
+
type: z122.literal("pcb_copper_text"),
|
|
2523
2543
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2524
|
-
pcb_group_id:
|
|
2525
|
-
subcircuit_id:
|
|
2526
|
-
font:
|
|
2544
|
+
pcb_group_id: z122.string().optional(),
|
|
2545
|
+
subcircuit_id: z122.string().optional(),
|
|
2546
|
+
font: z122.literal("tscircuit2024").default("tscircuit2024"),
|
|
2527
2547
|
font_size: distance.default("0.2mm"),
|
|
2528
|
-
pcb_component_id:
|
|
2529
|
-
text:
|
|
2530
|
-
is_knockout:
|
|
2531
|
-
knockout_padding:
|
|
2548
|
+
pcb_component_id: z122.string(),
|
|
2549
|
+
text: z122.string(),
|
|
2550
|
+
is_knockout: z122.boolean().default(false).optional(),
|
|
2551
|
+
knockout_padding: z122.object({
|
|
2532
2552
|
left: length,
|
|
2533
2553
|
top: length,
|
|
2534
2554
|
bottom: length,
|
|
@@ -2539,61 +2559,61 @@ var pcb_copper_text = z121.object({
|
|
|
2539
2559
|
bottom: "0.2mm",
|
|
2540
2560
|
right: "0.2mm"
|
|
2541
2561
|
}).optional(),
|
|
2542
|
-
ccw_rotation:
|
|
2562
|
+
ccw_rotation: z122.number().optional(),
|
|
2543
2563
|
layer: layer_ref,
|
|
2544
|
-
is_mirrored:
|
|
2564
|
+
is_mirrored: z122.boolean().default(false).optional(),
|
|
2545
2565
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2546
2566
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2547
2567
|
}).describe("Defines copper text on the PCB");
|
|
2548
2568
|
expectTypesMatch(true);
|
|
2549
2569
|
|
|
2550
2570
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
2551
|
-
import { z as
|
|
2552
|
-
var pcb_silkscreen_rect =
|
|
2553
|
-
type:
|
|
2571
|
+
import { z as z123 } from "zod";
|
|
2572
|
+
var pcb_silkscreen_rect = z123.object({
|
|
2573
|
+
type: z123.literal("pcb_silkscreen_rect"),
|
|
2554
2574
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2555
|
-
pcb_component_id:
|
|
2556
|
-
pcb_group_id:
|
|
2557
|
-
subcircuit_id:
|
|
2575
|
+
pcb_component_id: z123.string(),
|
|
2576
|
+
pcb_group_id: z123.string().optional(),
|
|
2577
|
+
subcircuit_id: z123.string().optional(),
|
|
2558
2578
|
center: point,
|
|
2559
2579
|
width: length,
|
|
2560
2580
|
height: length,
|
|
2561
2581
|
layer: layer_ref,
|
|
2562
2582
|
stroke_width: length.default("1mm"),
|
|
2563
2583
|
corner_radius: length.optional(),
|
|
2564
|
-
is_filled:
|
|
2565
|
-
has_stroke:
|
|
2566
|
-
is_stroke_dashed:
|
|
2567
|
-
ccw_rotation:
|
|
2584
|
+
is_filled: z123.boolean().default(true).optional(),
|
|
2585
|
+
has_stroke: z123.boolean().optional(),
|
|
2586
|
+
is_stroke_dashed: z123.boolean().optional(),
|
|
2587
|
+
ccw_rotation: z123.number().optional()
|
|
2568
2588
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2569
2589
|
expectTypesMatch(true);
|
|
2570
2590
|
|
|
2571
2591
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
2572
|
-
import { z as
|
|
2573
|
-
var pcb_silkscreen_circle =
|
|
2574
|
-
type:
|
|
2592
|
+
import { z as z124 } from "zod";
|
|
2593
|
+
var pcb_silkscreen_circle = z124.object({
|
|
2594
|
+
type: z124.literal("pcb_silkscreen_circle"),
|
|
2575
2595
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2576
2596
|
"pcb_silkscreen_circle"
|
|
2577
2597
|
),
|
|
2578
|
-
pcb_component_id:
|
|
2579
|
-
pcb_group_id:
|
|
2580
|
-
subcircuit_id:
|
|
2598
|
+
pcb_component_id: z124.string(),
|
|
2599
|
+
pcb_group_id: z124.string().optional(),
|
|
2600
|
+
subcircuit_id: z124.string().optional(),
|
|
2581
2601
|
center: point,
|
|
2582
2602
|
radius: length,
|
|
2583
2603
|
layer: visible_layer,
|
|
2584
2604
|
stroke_width: length.default("1mm"),
|
|
2585
|
-
is_filled:
|
|
2605
|
+
is_filled: z124.boolean().optional()
|
|
2586
2606
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
2587
2607
|
expectTypesMatch(true);
|
|
2588
2608
|
|
|
2589
2609
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
2590
|
-
import { z as
|
|
2591
|
-
var pcb_silkscreen_oval =
|
|
2592
|
-
type:
|
|
2610
|
+
import { z as z125 } from "zod";
|
|
2611
|
+
var pcb_silkscreen_oval = z125.object({
|
|
2612
|
+
type: z125.literal("pcb_silkscreen_oval"),
|
|
2593
2613
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
2594
|
-
pcb_component_id:
|
|
2595
|
-
pcb_group_id:
|
|
2596
|
-
subcircuit_id:
|
|
2614
|
+
pcb_component_id: z125.string(),
|
|
2615
|
+
pcb_group_id: z125.string().optional(),
|
|
2616
|
+
subcircuit_id: z125.string().optional(),
|
|
2597
2617
|
center: point,
|
|
2598
2618
|
radius_x: distance,
|
|
2599
2619
|
radius_y: distance,
|
|
@@ -2603,265 +2623,265 @@ var pcb_silkscreen_oval = z124.object({
|
|
|
2603
2623
|
expectTypesMatch(true);
|
|
2604
2624
|
|
|
2605
2625
|
// src/pcb/pcb_silkscreen_graphic.ts
|
|
2606
|
-
import { z as
|
|
2607
|
-
var pcb_silkscreen_graphic_base =
|
|
2608
|
-
type:
|
|
2626
|
+
import { z as z126 } from "zod";
|
|
2627
|
+
var pcb_silkscreen_graphic_base = z126.object({
|
|
2628
|
+
type: z126.literal("pcb_silkscreen_graphic"),
|
|
2609
2629
|
pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
|
|
2610
2630
|
"pcb_silkscreen_graphic"
|
|
2611
2631
|
),
|
|
2612
|
-
pcb_component_id:
|
|
2613
|
-
pcb_group_id:
|
|
2614
|
-
subcircuit_id:
|
|
2632
|
+
pcb_component_id: z126.string(),
|
|
2633
|
+
pcb_group_id: z126.string().optional(),
|
|
2634
|
+
subcircuit_id: z126.string().optional(),
|
|
2615
2635
|
layer: visible_layer,
|
|
2616
2636
|
image_asset: asset.optional()
|
|
2617
2637
|
});
|
|
2618
2638
|
var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
|
|
2619
|
-
shape:
|
|
2639
|
+
shape: z126.literal("brep"),
|
|
2620
2640
|
brep_shape
|
|
2621
2641
|
}).describe("Defines a BRep silkscreen graphic on the PCB");
|
|
2622
2642
|
expectTypesMatch(
|
|
2623
2643
|
true
|
|
2624
2644
|
);
|
|
2625
|
-
var pcb_silkscreen_graphic =
|
|
2645
|
+
var pcb_silkscreen_graphic = z126.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
|
|
2626
2646
|
expectTypesMatch(true);
|
|
2627
2647
|
|
|
2628
2648
|
// src/pcb/pcb_silkscreen_pill.ts
|
|
2629
|
-
import { z as
|
|
2630
|
-
var pcb_silkscreen_pill =
|
|
2631
|
-
type:
|
|
2649
|
+
import { z as z127 } from "zod";
|
|
2650
|
+
var pcb_silkscreen_pill = z127.object({
|
|
2651
|
+
type: z127.literal("pcb_silkscreen_pill"),
|
|
2632
2652
|
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
2633
|
-
pcb_component_id:
|
|
2634
|
-
pcb_group_id:
|
|
2635
|
-
subcircuit_id:
|
|
2653
|
+
pcb_component_id: z127.string(),
|
|
2654
|
+
pcb_group_id: z127.string().optional(),
|
|
2655
|
+
subcircuit_id: z127.string().optional(),
|
|
2636
2656
|
center: point,
|
|
2637
2657
|
width: length,
|
|
2638
2658
|
height: length,
|
|
2639
2659
|
layer: layer_ref,
|
|
2640
|
-
ccw_rotation:
|
|
2660
|
+
ccw_rotation: z127.number().optional()
|
|
2641
2661
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
2642
2662
|
expectTypesMatch(true);
|
|
2643
2663
|
|
|
2644
2664
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
2645
|
-
import { z as
|
|
2646
|
-
var pcb_fabrication_note_text =
|
|
2647
|
-
type:
|
|
2665
|
+
import { z as z128 } from "zod";
|
|
2666
|
+
var pcb_fabrication_note_text = z128.object({
|
|
2667
|
+
type: z128.literal("pcb_fabrication_note_text"),
|
|
2648
2668
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2649
2669
|
"pcb_fabrication_note_text"
|
|
2650
2670
|
),
|
|
2651
|
-
subcircuit_id:
|
|
2652
|
-
pcb_group_id:
|
|
2653
|
-
font:
|
|
2671
|
+
subcircuit_id: z128.string().optional(),
|
|
2672
|
+
pcb_group_id: z128.string().optional(),
|
|
2673
|
+
font: z128.literal("tscircuit2024").default("tscircuit2024"),
|
|
2654
2674
|
font_size: distance.default("1mm"),
|
|
2655
|
-
pcb_component_id:
|
|
2656
|
-
text:
|
|
2657
|
-
ccw_rotation:
|
|
2675
|
+
pcb_component_id: z128.string(),
|
|
2676
|
+
text: z128.string(),
|
|
2677
|
+
ccw_rotation: z128.number().optional(),
|
|
2658
2678
|
layer: visible_layer,
|
|
2659
2679
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2660
|
-
anchor_alignment:
|
|
2661
|
-
color:
|
|
2680
|
+
anchor_alignment: z128.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2681
|
+
color: z128.string().optional()
|
|
2662
2682
|
}).describe(
|
|
2663
2683
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2664
2684
|
);
|
|
2665
2685
|
expectTypesMatch(true);
|
|
2666
2686
|
|
|
2667
2687
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2668
|
-
import { z as
|
|
2669
|
-
var pcb_fabrication_note_path =
|
|
2670
|
-
type:
|
|
2688
|
+
import { z as z129 } from "zod";
|
|
2689
|
+
var pcb_fabrication_note_path = z129.object({
|
|
2690
|
+
type: z129.literal("pcb_fabrication_note_path"),
|
|
2671
2691
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2672
2692
|
"pcb_fabrication_note_path"
|
|
2673
2693
|
),
|
|
2674
|
-
pcb_component_id:
|
|
2675
|
-
subcircuit_id:
|
|
2694
|
+
pcb_component_id: z129.string(),
|
|
2695
|
+
subcircuit_id: z129.string().optional(),
|
|
2676
2696
|
layer: layer_ref,
|
|
2677
|
-
route:
|
|
2697
|
+
route: z129.array(point),
|
|
2678
2698
|
stroke_width: length,
|
|
2679
|
-
color:
|
|
2699
|
+
color: z129.string().optional()
|
|
2680
2700
|
}).describe(
|
|
2681
2701
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2682
2702
|
);
|
|
2683
2703
|
expectTypesMatch(true);
|
|
2684
2704
|
|
|
2685
2705
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2686
|
-
import { z as
|
|
2687
|
-
var pcb_fabrication_note_rect =
|
|
2688
|
-
type:
|
|
2706
|
+
import { z as z130 } from "zod";
|
|
2707
|
+
var pcb_fabrication_note_rect = z130.object({
|
|
2708
|
+
type: z130.literal("pcb_fabrication_note_rect"),
|
|
2689
2709
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2690
2710
|
"pcb_fabrication_note_rect"
|
|
2691
2711
|
),
|
|
2692
|
-
pcb_component_id:
|
|
2693
|
-
pcb_group_id:
|
|
2694
|
-
subcircuit_id:
|
|
2712
|
+
pcb_component_id: z130.string(),
|
|
2713
|
+
pcb_group_id: z130.string().optional(),
|
|
2714
|
+
subcircuit_id: z130.string().optional(),
|
|
2695
2715
|
center: point,
|
|
2696
2716
|
width: length,
|
|
2697
2717
|
height: length,
|
|
2698
2718
|
layer: visible_layer,
|
|
2699
2719
|
stroke_width: length.default("0.1mm"),
|
|
2700
2720
|
corner_radius: length.optional(),
|
|
2701
|
-
is_filled:
|
|
2702
|
-
has_stroke:
|
|
2703
|
-
is_stroke_dashed:
|
|
2704
|
-
color:
|
|
2721
|
+
is_filled: z130.boolean().optional(),
|
|
2722
|
+
has_stroke: z130.boolean().optional(),
|
|
2723
|
+
is_stroke_dashed: z130.boolean().optional(),
|
|
2724
|
+
color: z130.string().optional()
|
|
2705
2725
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2706
2726
|
expectTypesMatch(true);
|
|
2707
2727
|
|
|
2708
2728
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2709
|
-
import { z as
|
|
2710
|
-
var pcb_fabrication_note_dimension =
|
|
2711
|
-
type:
|
|
2729
|
+
import { z as z131 } from "zod";
|
|
2730
|
+
var pcb_fabrication_note_dimension = z131.object({
|
|
2731
|
+
type: z131.literal("pcb_fabrication_note_dimension"),
|
|
2712
2732
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2713
2733
|
"pcb_fabrication_note_dimension"
|
|
2714
2734
|
),
|
|
2715
|
-
pcb_component_id:
|
|
2716
|
-
pcb_group_id:
|
|
2717
|
-
subcircuit_id:
|
|
2735
|
+
pcb_component_id: z131.string(),
|
|
2736
|
+
pcb_group_id: z131.string().optional(),
|
|
2737
|
+
subcircuit_id: z131.string().optional(),
|
|
2718
2738
|
layer: visible_layer,
|
|
2719
2739
|
from: point,
|
|
2720
2740
|
to: point,
|
|
2721
|
-
text:
|
|
2722
|
-
text_ccw_rotation:
|
|
2741
|
+
text: z131.string().optional(),
|
|
2742
|
+
text_ccw_rotation: z131.number().optional(),
|
|
2723
2743
|
offset: length.optional(),
|
|
2724
2744
|
offset_distance: length.optional(),
|
|
2725
|
-
offset_direction:
|
|
2726
|
-
x:
|
|
2727
|
-
y:
|
|
2745
|
+
offset_direction: z131.object({
|
|
2746
|
+
x: z131.number(),
|
|
2747
|
+
y: z131.number()
|
|
2728
2748
|
}).optional(),
|
|
2729
|
-
font:
|
|
2749
|
+
font: z131.literal("tscircuit2024").default("tscircuit2024"),
|
|
2730
2750
|
font_size: length.default("1mm"),
|
|
2731
|
-
color:
|
|
2751
|
+
color: z131.string().optional(),
|
|
2732
2752
|
arrow_size: length.default("1mm")
|
|
2733
2753
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2734
2754
|
expectTypesMatch(true);
|
|
2735
2755
|
|
|
2736
2756
|
// src/pcb/pcb_note_text.ts
|
|
2737
|
-
import { z as z131 } from "zod";
|
|
2738
|
-
var pcb_note_text = z131.object({
|
|
2739
|
-
type: z131.literal("pcb_note_text"),
|
|
2740
|
-
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2741
|
-
pcb_component_id: z131.string().optional(),
|
|
2742
|
-
pcb_group_id: z131.string().optional(),
|
|
2743
|
-
subcircuit_id: z131.string().optional(),
|
|
2744
|
-
name: z131.string().optional(),
|
|
2745
|
-
font: z131.literal("tscircuit2024").default("tscircuit2024"),
|
|
2746
|
-
font_size: distance.default("1mm"),
|
|
2747
|
-
text: z131.string().optional(),
|
|
2748
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2749
|
-
anchor_alignment: z131.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2750
|
-
layer: visible_layer.default("top"),
|
|
2751
|
-
is_mirrored_from_top_view: z131.boolean().optional(),
|
|
2752
|
-
color: z131.string().optional()
|
|
2753
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
2754
|
-
expectTypesMatch(true);
|
|
2755
|
-
|
|
2756
|
-
// src/pcb/pcb_note_rect.ts
|
|
2757
2757
|
import { z as z132 } from "zod";
|
|
2758
|
-
var
|
|
2759
|
-
type: z132.literal("
|
|
2760
|
-
|
|
2758
|
+
var pcb_note_text = z132.object({
|
|
2759
|
+
type: z132.literal("pcb_note_text"),
|
|
2760
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2761
2761
|
pcb_component_id: z132.string().optional(),
|
|
2762
2762
|
pcb_group_id: z132.string().optional(),
|
|
2763
2763
|
subcircuit_id: z132.string().optional(),
|
|
2764
2764
|
name: z132.string().optional(),
|
|
2765
|
+
font: z132.literal("tscircuit2024").default("tscircuit2024"),
|
|
2766
|
+
font_size: distance.default("1mm"),
|
|
2765
2767
|
text: z132.string().optional(),
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
height: length,
|
|
2768
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2769
|
+
anchor_alignment: z132.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2769
2770
|
layer: visible_layer.default("top"),
|
|
2770
|
-
|
|
2771
|
-
corner_radius: length.optional(),
|
|
2772
|
-
is_filled: z132.boolean().optional(),
|
|
2773
|
-
has_stroke: z132.boolean().optional(),
|
|
2774
|
-
is_stroke_dashed: z132.boolean().optional(),
|
|
2771
|
+
is_mirrored_from_top_view: z132.boolean().optional(),
|
|
2775
2772
|
color: z132.string().optional()
|
|
2776
|
-
}).describe("Defines a
|
|
2773
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
2777
2774
|
expectTypesMatch(true);
|
|
2778
2775
|
|
|
2779
|
-
// src/pcb/
|
|
2776
|
+
// src/pcb/pcb_note_rect.ts
|
|
2780
2777
|
import { z as z133 } from "zod";
|
|
2781
|
-
var
|
|
2782
|
-
type: z133.literal("
|
|
2783
|
-
|
|
2778
|
+
var pcb_note_rect = z133.object({
|
|
2779
|
+
type: z133.literal("pcb_note_rect"),
|
|
2780
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2784
2781
|
pcb_component_id: z133.string().optional(),
|
|
2785
2782
|
pcb_group_id: z133.string().optional(),
|
|
2786
2783
|
subcircuit_id: z133.string().optional(),
|
|
2787
2784
|
name: z133.string().optional(),
|
|
2788
2785
|
text: z133.string().optional(),
|
|
2789
|
-
|
|
2786
|
+
center: point,
|
|
2787
|
+
width: length,
|
|
2788
|
+
height: length,
|
|
2790
2789
|
layer: visible_layer.default("top"),
|
|
2791
2790
|
stroke_width: length.default("0.1mm"),
|
|
2791
|
+
corner_radius: length.optional(),
|
|
2792
|
+
is_filled: z133.boolean().optional(),
|
|
2793
|
+
has_stroke: z133.boolean().optional(),
|
|
2794
|
+
is_stroke_dashed: z133.boolean().optional(),
|
|
2792
2795
|
color: z133.string().optional()
|
|
2793
|
-
}).describe("Defines a
|
|
2796
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
2794
2797
|
expectTypesMatch(true);
|
|
2795
2798
|
|
|
2796
|
-
// src/pcb/
|
|
2799
|
+
// src/pcb/pcb_note_path.ts
|
|
2797
2800
|
import { z as z134 } from "zod";
|
|
2798
|
-
var
|
|
2799
|
-
type: z134.literal("
|
|
2800
|
-
|
|
2801
|
+
var pcb_note_path = z134.object({
|
|
2802
|
+
type: z134.literal("pcb_note_path"),
|
|
2803
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
2801
2804
|
pcb_component_id: z134.string().optional(),
|
|
2802
2805
|
pcb_group_id: z134.string().optional(),
|
|
2803
2806
|
subcircuit_id: z134.string().optional(),
|
|
2804
2807
|
name: z134.string().optional(),
|
|
2805
2808
|
text: z134.string().optional(),
|
|
2809
|
+
route: z134.array(point),
|
|
2810
|
+
layer: visible_layer.default("top"),
|
|
2811
|
+
stroke_width: length.default("0.1mm"),
|
|
2812
|
+
color: z134.string().optional()
|
|
2813
|
+
}).describe("Defines a polyline documentation note on the PCB");
|
|
2814
|
+
expectTypesMatch(true);
|
|
2815
|
+
|
|
2816
|
+
// src/pcb/pcb_note_line.ts
|
|
2817
|
+
import { z as z135 } from "zod";
|
|
2818
|
+
var pcb_note_line = z135.object({
|
|
2819
|
+
type: z135.literal("pcb_note_line"),
|
|
2820
|
+
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
2821
|
+
pcb_component_id: z135.string().optional(),
|
|
2822
|
+
pcb_group_id: z135.string().optional(),
|
|
2823
|
+
subcircuit_id: z135.string().optional(),
|
|
2824
|
+
name: z135.string().optional(),
|
|
2825
|
+
text: z135.string().optional(),
|
|
2806
2826
|
x1: distance,
|
|
2807
2827
|
y1: distance,
|
|
2808
2828
|
x2: distance,
|
|
2809
2829
|
y2: distance,
|
|
2810
2830
|
layer: visible_layer.default("top"),
|
|
2811
2831
|
stroke_width: distance.default("0.1mm"),
|
|
2812
|
-
color:
|
|
2813
|
-
is_dashed:
|
|
2832
|
+
color: z135.string().optional(),
|
|
2833
|
+
is_dashed: z135.boolean().optional()
|
|
2814
2834
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
2815
2835
|
expectTypesMatch(true);
|
|
2816
2836
|
|
|
2817
2837
|
// src/pcb/pcb_note_dimension.ts
|
|
2818
|
-
import { z as
|
|
2819
|
-
var pcb_note_dimension =
|
|
2820
|
-
type:
|
|
2838
|
+
import { z as z136 } from "zod";
|
|
2839
|
+
var pcb_note_dimension = z136.object({
|
|
2840
|
+
type: z136.literal("pcb_note_dimension"),
|
|
2821
2841
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
2822
|
-
pcb_component_id:
|
|
2823
|
-
pcb_group_id:
|
|
2824
|
-
subcircuit_id:
|
|
2825
|
-
name:
|
|
2842
|
+
pcb_component_id: z136.string().optional(),
|
|
2843
|
+
pcb_group_id: z136.string().optional(),
|
|
2844
|
+
subcircuit_id: z136.string().optional(),
|
|
2845
|
+
name: z136.string().optional(),
|
|
2826
2846
|
from: point,
|
|
2827
2847
|
to: point,
|
|
2828
|
-
text:
|
|
2829
|
-
text_ccw_rotation:
|
|
2848
|
+
text: z136.string().optional(),
|
|
2849
|
+
text_ccw_rotation: z136.number().optional(),
|
|
2830
2850
|
offset_distance: length.optional(),
|
|
2831
|
-
offset_direction:
|
|
2832
|
-
x:
|
|
2833
|
-
y:
|
|
2851
|
+
offset_direction: z136.object({
|
|
2852
|
+
x: z136.number(),
|
|
2853
|
+
y: z136.number()
|
|
2834
2854
|
}).optional(),
|
|
2835
|
-
font:
|
|
2855
|
+
font: z136.literal("tscircuit2024").default("tscircuit2024"),
|
|
2836
2856
|
font_size: length.default("1mm"),
|
|
2837
2857
|
layer: visible_layer.default("top"),
|
|
2838
|
-
color:
|
|
2858
|
+
color: z136.string().optional(),
|
|
2839
2859
|
arrow_size: length.default("1mm")
|
|
2840
2860
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
2841
2861
|
expectTypesMatch(true);
|
|
2842
2862
|
|
|
2843
2863
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
2844
|
-
import { z as
|
|
2864
|
+
import { z as z137 } from "zod";
|
|
2845
2865
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
2846
|
-
type:
|
|
2866
|
+
type: z137.literal("pcb_footprint_overlap_error"),
|
|
2847
2867
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2848
|
-
error_type:
|
|
2849
|
-
pcb_smtpad_ids:
|
|
2850
|
-
pcb_plated_hole_ids:
|
|
2851
|
-
pcb_hole_ids:
|
|
2852
|
-
pcb_keepout_ids:
|
|
2868
|
+
error_type: z137.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
2869
|
+
pcb_smtpad_ids: z137.array(z137.string()).optional(),
|
|
2870
|
+
pcb_plated_hole_ids: z137.array(z137.string()).optional(),
|
|
2871
|
+
pcb_hole_ids: z137.array(z137.string()).optional(),
|
|
2872
|
+
pcb_keepout_ids: z137.array(z137.string()).optional()
|
|
2853
2873
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
2854
2874
|
expectTypesMatch(
|
|
2855
2875
|
true
|
|
2856
2876
|
);
|
|
2857
2877
|
|
|
2858
2878
|
// src/pcb/pcb_courtyard_overlap_error.ts
|
|
2859
|
-
import { z as
|
|
2879
|
+
import { z as z138 } from "zod";
|
|
2860
2880
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
2861
|
-
type:
|
|
2881
|
+
type: z138.literal("pcb_courtyard_overlap_error"),
|
|
2862
2882
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2863
|
-
error_type:
|
|
2864
|
-
pcb_component_ids:
|
|
2883
|
+
error_type: z138.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
|
|
2884
|
+
pcb_component_ids: z138.tuple([z138.string(), z138.string()])
|
|
2865
2885
|
}).describe(
|
|
2866
2886
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
2867
2887
|
);
|
|
@@ -2870,49 +2890,49 @@ expectTypesMatch(
|
|
|
2870
2890
|
);
|
|
2871
2891
|
|
|
2872
2892
|
// src/pcb/pcb_keepout.ts
|
|
2873
|
-
import { z as
|
|
2874
|
-
var pcb_keepout =
|
|
2875
|
-
type:
|
|
2876
|
-
shape:
|
|
2877
|
-
pcb_group_id:
|
|
2878
|
-
subcircuit_id:
|
|
2893
|
+
import { z as z139 } from "zod";
|
|
2894
|
+
var pcb_keepout = z139.object({
|
|
2895
|
+
type: z139.literal("pcb_keepout"),
|
|
2896
|
+
shape: z139.literal("rect"),
|
|
2897
|
+
pcb_group_id: z139.string().optional(),
|
|
2898
|
+
subcircuit_id: z139.string().optional(),
|
|
2879
2899
|
center: point,
|
|
2880
2900
|
width: distance,
|
|
2881
2901
|
height: distance,
|
|
2882
|
-
pcb_keepout_id:
|
|
2883
|
-
layers:
|
|
2902
|
+
pcb_keepout_id: z139.string(),
|
|
2903
|
+
layers: z139.array(z139.string()),
|
|
2884
2904
|
// Specify layers where the keepout applies
|
|
2885
|
-
description:
|
|
2905
|
+
description: z139.string().optional()
|
|
2886
2906
|
// Optional description of the keepout
|
|
2887
2907
|
}).or(
|
|
2888
|
-
|
|
2889
|
-
type:
|
|
2890
|
-
shape:
|
|
2891
|
-
pcb_group_id:
|
|
2892
|
-
subcircuit_id:
|
|
2908
|
+
z139.object({
|
|
2909
|
+
type: z139.literal("pcb_keepout"),
|
|
2910
|
+
shape: z139.literal("circle"),
|
|
2911
|
+
pcb_group_id: z139.string().optional(),
|
|
2912
|
+
subcircuit_id: z139.string().optional(),
|
|
2893
2913
|
center: point,
|
|
2894
2914
|
radius: distance,
|
|
2895
|
-
pcb_keepout_id:
|
|
2896
|
-
layers:
|
|
2915
|
+
pcb_keepout_id: z139.string(),
|
|
2916
|
+
layers: z139.array(z139.string()),
|
|
2897
2917
|
// Specify layers where the keepout applies
|
|
2898
|
-
description:
|
|
2918
|
+
description: z139.string().optional()
|
|
2899
2919
|
// Optional description of the keepout
|
|
2900
2920
|
})
|
|
2901
2921
|
);
|
|
2902
2922
|
expectTypesMatch(true);
|
|
2903
2923
|
|
|
2904
2924
|
// src/pcb/pcb_cutout.ts
|
|
2905
|
-
import { z as
|
|
2906
|
-
var pcb_cutout_base =
|
|
2907
|
-
type:
|
|
2925
|
+
import { z as z140 } from "zod";
|
|
2926
|
+
var pcb_cutout_base = z140.object({
|
|
2927
|
+
type: z140.literal("pcb_cutout"),
|
|
2908
2928
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
2909
|
-
pcb_group_id:
|
|
2910
|
-
subcircuit_id:
|
|
2911
|
-
pcb_board_id:
|
|
2912
|
-
pcb_panel_id:
|
|
2929
|
+
pcb_group_id: z140.string().optional(),
|
|
2930
|
+
subcircuit_id: z140.string().optional(),
|
|
2931
|
+
pcb_board_id: z140.string().optional(),
|
|
2932
|
+
pcb_panel_id: z140.string().optional()
|
|
2913
2933
|
});
|
|
2914
2934
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
2915
|
-
shape:
|
|
2935
|
+
shape: z140.literal("rect"),
|
|
2916
2936
|
center: point,
|
|
2917
2937
|
width: length,
|
|
2918
2938
|
height: length,
|
|
@@ -2921,26 +2941,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
2921
2941
|
});
|
|
2922
2942
|
expectTypesMatch(true);
|
|
2923
2943
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
2924
|
-
shape:
|
|
2944
|
+
shape: z140.literal("circle"),
|
|
2925
2945
|
center: point,
|
|
2926
2946
|
radius: length
|
|
2927
2947
|
});
|
|
2928
2948
|
expectTypesMatch(true);
|
|
2929
2949
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
2930
|
-
shape:
|
|
2931
|
-
points:
|
|
2950
|
+
shape: z140.literal("polygon"),
|
|
2951
|
+
points: z140.array(point)
|
|
2932
2952
|
});
|
|
2933
2953
|
expectTypesMatch(true);
|
|
2934
2954
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
2935
|
-
shape:
|
|
2936
|
-
route:
|
|
2955
|
+
shape: z140.literal("path"),
|
|
2956
|
+
route: z140.array(point),
|
|
2937
2957
|
slot_width: length,
|
|
2938
2958
|
slot_length: length.optional(),
|
|
2939
2959
|
space_between_slots: length.optional(),
|
|
2940
2960
|
slot_corner_radius: length.optional()
|
|
2941
2961
|
});
|
|
2942
2962
|
expectTypesMatch(true);
|
|
2943
|
-
var pcb_cutout =
|
|
2963
|
+
var pcb_cutout = z140.discriminatedUnion("shape", [
|
|
2944
2964
|
pcb_cutout_rect,
|
|
2945
2965
|
pcb_cutout_circle,
|
|
2946
2966
|
pcb_cutout_polygon,
|
|
@@ -2949,169 +2969,169 @@ var pcb_cutout = z139.discriminatedUnion("shape", [
|
|
|
2949
2969
|
expectTypesMatch(true);
|
|
2950
2970
|
|
|
2951
2971
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
2952
|
-
import { z as
|
|
2972
|
+
import { z as z141 } from "zod";
|
|
2953
2973
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
2954
|
-
type:
|
|
2974
|
+
type: z141.literal("pcb_missing_footprint_error"),
|
|
2955
2975
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
2956
2976
|
"pcb_missing_footprint_error"
|
|
2957
2977
|
),
|
|
2958
|
-
pcb_group_id:
|
|
2959
|
-
subcircuit_id:
|
|
2960
|
-
error_type:
|
|
2961
|
-
source_component_id:
|
|
2978
|
+
pcb_group_id: z141.string().optional(),
|
|
2979
|
+
subcircuit_id: z141.string().optional(),
|
|
2980
|
+
error_type: z141.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
2981
|
+
source_component_id: z141.string()
|
|
2962
2982
|
}).describe("Defines a missing footprint error on the PCB");
|
|
2963
2983
|
expectTypesMatch(
|
|
2964
2984
|
true
|
|
2965
2985
|
);
|
|
2966
2986
|
|
|
2967
2987
|
// src/pcb/external_footprint_load_error.ts
|
|
2968
|
-
import { z as
|
|
2988
|
+
import { z as z142 } from "zod";
|
|
2969
2989
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
2970
|
-
type:
|
|
2990
|
+
type: z142.literal("external_footprint_load_error"),
|
|
2971
2991
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2972
2992
|
"external_footprint_load_error"
|
|
2973
2993
|
),
|
|
2974
|
-
pcb_component_id:
|
|
2975
|
-
source_component_id:
|
|
2976
|
-
pcb_group_id:
|
|
2977
|
-
subcircuit_id:
|
|
2978
|
-
footprinter_string:
|
|
2979
|
-
error_type:
|
|
2994
|
+
pcb_component_id: z142.string(),
|
|
2995
|
+
source_component_id: z142.string(),
|
|
2996
|
+
pcb_group_id: z142.string().optional(),
|
|
2997
|
+
subcircuit_id: z142.string().optional(),
|
|
2998
|
+
footprinter_string: z142.string().optional(),
|
|
2999
|
+
error_type: z142.literal("external_footprint_load_error").default("external_footprint_load_error")
|
|
2980
3000
|
}).describe("Defines an error when an external footprint fails to load");
|
|
2981
3001
|
expectTypesMatch(true);
|
|
2982
3002
|
|
|
2983
3003
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
2984
|
-
import { z as
|
|
3004
|
+
import { z as z143 } from "zod";
|
|
2985
3005
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
2986
|
-
type:
|
|
3006
|
+
type: z143.literal("circuit_json_footprint_load_error"),
|
|
2987
3007
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
2988
3008
|
"circuit_json_footprint_load_error"
|
|
2989
3009
|
),
|
|
2990
|
-
pcb_component_id:
|
|
2991
|
-
source_component_id:
|
|
2992
|
-
pcb_group_id:
|
|
2993
|
-
subcircuit_id:
|
|
2994
|
-
error_type:
|
|
2995
|
-
circuit_json:
|
|
3010
|
+
pcb_component_id: z143.string(),
|
|
3011
|
+
source_component_id: z143.string(),
|
|
3012
|
+
pcb_group_id: z143.string().optional(),
|
|
3013
|
+
subcircuit_id: z143.string().optional(),
|
|
3014
|
+
error_type: z143.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
3015
|
+
circuit_json: z143.array(z143.any()).optional()
|
|
2996
3016
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
2997
3017
|
expectTypesMatch(true);
|
|
2998
3018
|
|
|
2999
3019
|
// src/pcb/pcb_group.ts
|
|
3000
|
-
import { z as
|
|
3001
|
-
var pcb_group =
|
|
3002
|
-
type:
|
|
3020
|
+
import { z as z144 } from "zod";
|
|
3021
|
+
var pcb_group = z144.object({
|
|
3022
|
+
type: z144.literal("pcb_group"),
|
|
3003
3023
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
3004
|
-
source_group_id:
|
|
3005
|
-
is_subcircuit:
|
|
3006
|
-
subcircuit_id:
|
|
3024
|
+
source_group_id: z144.string(),
|
|
3025
|
+
is_subcircuit: z144.boolean().optional(),
|
|
3026
|
+
subcircuit_id: z144.string().optional(),
|
|
3007
3027
|
width: length.optional(),
|
|
3008
3028
|
height: length.optional(),
|
|
3009
3029
|
center: point,
|
|
3010
|
-
display_offset_x:
|
|
3030
|
+
display_offset_x: z144.string().optional().describe(
|
|
3011
3031
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
3012
3032
|
),
|
|
3013
|
-
display_offset_y:
|
|
3033
|
+
display_offset_y: z144.string().optional().describe(
|
|
3014
3034
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
3015
3035
|
),
|
|
3016
|
-
outline:
|
|
3036
|
+
outline: z144.array(point).optional(),
|
|
3017
3037
|
anchor_position: point.optional(),
|
|
3018
3038
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
3019
|
-
position_mode:
|
|
3020
|
-
positioned_relative_to_pcb_group_id:
|
|
3021
|
-
positioned_relative_to_pcb_board_id:
|
|
3022
|
-
pcb_component_ids:
|
|
3023
|
-
child_layout_mode:
|
|
3024
|
-
name:
|
|
3025
|
-
description:
|
|
3026
|
-
layout_mode:
|
|
3027
|
-
autorouter_configuration:
|
|
3039
|
+
position_mode: z144.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
3040
|
+
positioned_relative_to_pcb_group_id: z144.string().optional(),
|
|
3041
|
+
positioned_relative_to_pcb_board_id: z144.string().optional(),
|
|
3042
|
+
pcb_component_ids: z144.array(z144.string()),
|
|
3043
|
+
child_layout_mode: z144.enum(["packed", "none"]).optional(),
|
|
3044
|
+
name: z144.string().optional(),
|
|
3045
|
+
description: z144.string().optional(),
|
|
3046
|
+
layout_mode: z144.string().optional(),
|
|
3047
|
+
autorouter_configuration: z144.object({
|
|
3028
3048
|
trace_clearance: length
|
|
3029
3049
|
}).optional(),
|
|
3030
|
-
autorouter_used_string:
|
|
3050
|
+
autorouter_used_string: z144.string().optional()
|
|
3031
3051
|
}).describe("Defines a group of components on the PCB");
|
|
3032
3052
|
expectTypesMatch(true);
|
|
3033
3053
|
|
|
3034
3054
|
// src/pcb/pcb_autorouting_error.ts
|
|
3035
|
-
import { z as
|
|
3055
|
+
import { z as z145 } from "zod";
|
|
3036
3056
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
3037
|
-
type:
|
|
3057
|
+
type: z145.literal("pcb_autorouting_error"),
|
|
3038
3058
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
3039
|
-
error_type:
|
|
3040
|
-
subcircuit_id:
|
|
3059
|
+
error_type: z145.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
3060
|
+
subcircuit_id: z145.string().optional()
|
|
3041
3061
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
3042
3062
|
expectTypesMatch(true);
|
|
3043
3063
|
|
|
3044
3064
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
3045
|
-
import { z as
|
|
3046
|
-
var pcb_manual_edit_conflict_warning =
|
|
3047
|
-
type:
|
|
3065
|
+
import { z as z146 } from "zod";
|
|
3066
|
+
var pcb_manual_edit_conflict_warning = z146.object({
|
|
3067
|
+
type: z146.literal("pcb_manual_edit_conflict_warning"),
|
|
3048
3068
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
3049
3069
|
"pcb_manual_edit_conflict_warning"
|
|
3050
3070
|
),
|
|
3051
|
-
warning_type:
|
|
3052
|
-
message:
|
|
3053
|
-
pcb_component_id:
|
|
3054
|
-
pcb_group_id:
|
|
3055
|
-
subcircuit_id:
|
|
3056
|
-
source_component_id:
|
|
3071
|
+
warning_type: z146.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
3072
|
+
message: z146.string(),
|
|
3073
|
+
pcb_component_id: z146.string(),
|
|
3074
|
+
pcb_group_id: z146.string().optional(),
|
|
3075
|
+
subcircuit_id: z146.string().optional(),
|
|
3076
|
+
source_component_id: z146.string()
|
|
3057
3077
|
}).describe(
|
|
3058
3078
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3059
3079
|
);
|
|
3060
3080
|
expectTypesMatch(true);
|
|
3061
3081
|
|
|
3062
3082
|
// src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts
|
|
3063
|
-
import { z as
|
|
3064
|
-
var connectorOrientationDirection =
|
|
3065
|
-
var pcb_connector_not_in_accessible_orientation_warning =
|
|
3066
|
-
type:
|
|
3083
|
+
import { z as z147 } from "zod";
|
|
3084
|
+
var connectorOrientationDirection = z147.enum(["x-", "x+", "y+", "y-"]);
|
|
3085
|
+
var pcb_connector_not_in_accessible_orientation_warning = z147.object({
|
|
3086
|
+
type: z147.literal("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3067
3087
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3068
3088
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3069
3089
|
),
|
|
3070
|
-
warning_type:
|
|
3071
|
-
message:
|
|
3072
|
-
pcb_component_id:
|
|
3073
|
-
source_component_id:
|
|
3074
|
-
pcb_board_id:
|
|
3090
|
+
warning_type: z147.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3091
|
+
message: z147.string(),
|
|
3092
|
+
pcb_component_id: z147.string(),
|
|
3093
|
+
source_component_id: z147.string().optional(),
|
|
3094
|
+
pcb_board_id: z147.string().optional(),
|
|
3075
3095
|
facing_direction: connectorOrientationDirection,
|
|
3076
3096
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3077
|
-
subcircuit_id:
|
|
3097
|
+
subcircuit_id: z147.string().optional()
|
|
3078
3098
|
}).describe(
|
|
3079
3099
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
3080
3100
|
);
|
|
3081
3101
|
expectTypesMatch(true);
|
|
3082
3102
|
|
|
3083
3103
|
// src/pcb/supplier_footprint_mismatch_warning.ts
|
|
3084
|
-
import { z as
|
|
3085
|
-
var supplier_footprint_mismatch_warning =
|
|
3086
|
-
type:
|
|
3104
|
+
import { z as z148 } from "zod";
|
|
3105
|
+
var supplier_footprint_mismatch_warning = z148.object({
|
|
3106
|
+
type: z148.literal("supplier_footprint_mismatch_warning"),
|
|
3087
3107
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
3088
3108
|
"supplier_footprint_mismatch_warning"
|
|
3089
3109
|
),
|
|
3090
|
-
warning_type:
|
|
3091
|
-
message:
|
|
3092
|
-
source_component_id:
|
|
3093
|
-
pcb_component_id:
|
|
3094
|
-
pcb_group_id:
|
|
3095
|
-
subcircuit_id:
|
|
3110
|
+
warning_type: z148.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
|
|
3111
|
+
message: z148.string(),
|
|
3112
|
+
source_component_id: z148.string(),
|
|
3113
|
+
pcb_component_id: z148.string().optional(),
|
|
3114
|
+
pcb_group_id: z148.string().optional(),
|
|
3115
|
+
subcircuit_id: z148.string().optional(),
|
|
3096
3116
|
supplier_name: supplier_name.optional(),
|
|
3097
|
-
supplier_part_number:
|
|
3098
|
-
supplier_footprint_url:
|
|
3099
|
-
footprint_copper_intersection_over_union:
|
|
3117
|
+
supplier_part_number: z148.string().optional(),
|
|
3118
|
+
supplier_footprint_url: z148.string().optional(),
|
|
3119
|
+
footprint_copper_intersection_over_union: z148.number()
|
|
3100
3120
|
}).describe(
|
|
3101
3121
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
3102
3122
|
);
|
|
3103
3123
|
expectTypesMatch(true);
|
|
3104
3124
|
|
|
3105
3125
|
// src/pcb/pcb_breakout_point.ts
|
|
3106
|
-
import { z as
|
|
3107
|
-
var pcb_breakout_point =
|
|
3108
|
-
type:
|
|
3126
|
+
import { z as z149 } from "zod";
|
|
3127
|
+
var pcb_breakout_point = z149.object({
|
|
3128
|
+
type: z149.literal("pcb_breakout_point"),
|
|
3109
3129
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
3110
|
-
pcb_group_id:
|
|
3111
|
-
subcircuit_id:
|
|
3112
|
-
source_trace_id:
|
|
3113
|
-
source_port_id:
|
|
3114
|
-
source_net_id:
|
|
3130
|
+
pcb_group_id: z149.string(),
|
|
3131
|
+
subcircuit_id: z149.string().optional(),
|
|
3132
|
+
source_trace_id: z149.string().optional(),
|
|
3133
|
+
source_port_id: z149.string().optional(),
|
|
3134
|
+
source_net_id: z149.string().optional(),
|
|
3115
3135
|
x: distance,
|
|
3116
3136
|
y: distance
|
|
3117
3137
|
}).describe(
|
|
@@ -3120,61 +3140,61 @@ var pcb_breakout_point = z148.object({
|
|
|
3120
3140
|
expectTypesMatch(true);
|
|
3121
3141
|
|
|
3122
3142
|
// src/pcb/pcb_ground_plane.ts
|
|
3123
|
-
import { z as
|
|
3124
|
-
var pcb_ground_plane =
|
|
3125
|
-
type:
|
|
3143
|
+
import { z as z150 } from "zod";
|
|
3144
|
+
var pcb_ground_plane = z150.object({
|
|
3145
|
+
type: z150.literal("pcb_ground_plane"),
|
|
3126
3146
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
3127
|
-
source_pcb_ground_plane_id:
|
|
3128
|
-
source_net_id:
|
|
3129
|
-
pcb_group_id:
|
|
3130
|
-
subcircuit_id:
|
|
3147
|
+
source_pcb_ground_plane_id: z150.string(),
|
|
3148
|
+
source_net_id: z150.string(),
|
|
3149
|
+
pcb_group_id: z150.string().optional(),
|
|
3150
|
+
subcircuit_id: z150.string().optional()
|
|
3131
3151
|
}).describe("Defines a ground plane on the PCB");
|
|
3132
3152
|
expectTypesMatch(true);
|
|
3133
3153
|
|
|
3134
3154
|
// src/pcb/pcb_ground_plane_region.ts
|
|
3135
|
-
import { z as
|
|
3136
|
-
var pcb_ground_plane_region =
|
|
3137
|
-
type:
|
|
3155
|
+
import { z as z151 } from "zod";
|
|
3156
|
+
var pcb_ground_plane_region = z151.object({
|
|
3157
|
+
type: z151.literal("pcb_ground_plane_region"),
|
|
3138
3158
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3139
3159
|
"pcb_ground_plane_region"
|
|
3140
3160
|
),
|
|
3141
|
-
pcb_ground_plane_id:
|
|
3142
|
-
pcb_group_id:
|
|
3143
|
-
subcircuit_id:
|
|
3161
|
+
pcb_ground_plane_id: z151.string(),
|
|
3162
|
+
pcb_group_id: z151.string().optional(),
|
|
3163
|
+
subcircuit_id: z151.string().optional(),
|
|
3144
3164
|
layer: layer_ref,
|
|
3145
|
-
points:
|
|
3165
|
+
points: z151.array(point)
|
|
3146
3166
|
}).describe("Defines a polygon region of a ground plane");
|
|
3147
3167
|
expectTypesMatch(true);
|
|
3148
3168
|
|
|
3149
3169
|
// src/pcb/pcb_thermal_spoke.ts
|
|
3150
|
-
import { z as
|
|
3151
|
-
var pcb_thermal_spoke =
|
|
3152
|
-
type:
|
|
3170
|
+
import { z as z152 } from "zod";
|
|
3171
|
+
var pcb_thermal_spoke = z152.object({
|
|
3172
|
+
type: z152.literal("pcb_thermal_spoke"),
|
|
3153
3173
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3154
|
-
pcb_ground_plane_id:
|
|
3155
|
-
shape:
|
|
3156
|
-
spoke_count:
|
|
3174
|
+
pcb_ground_plane_id: z152.string(),
|
|
3175
|
+
shape: z152.string(),
|
|
3176
|
+
spoke_count: z152.number(),
|
|
3157
3177
|
spoke_thickness: distance,
|
|
3158
3178
|
spoke_inner_diameter: distance,
|
|
3159
3179
|
spoke_outer_diameter: distance,
|
|
3160
|
-
pcb_plated_hole_id:
|
|
3161
|
-
subcircuit_id:
|
|
3180
|
+
pcb_plated_hole_id: z152.string().optional(),
|
|
3181
|
+
subcircuit_id: z152.string().optional()
|
|
3162
3182
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3163
3183
|
expectTypesMatch(true);
|
|
3164
3184
|
|
|
3165
3185
|
// src/pcb/pcb_copper_pour.ts
|
|
3166
|
-
import { z as
|
|
3167
|
-
var pcb_copper_pour_base =
|
|
3168
|
-
type:
|
|
3186
|
+
import { z as z153 } from "zod";
|
|
3187
|
+
var pcb_copper_pour_base = z153.object({
|
|
3188
|
+
type: z153.literal("pcb_copper_pour"),
|
|
3169
3189
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3170
|
-
pcb_group_id:
|
|
3171
|
-
subcircuit_id:
|
|
3190
|
+
pcb_group_id: z153.string().optional(),
|
|
3191
|
+
subcircuit_id: z153.string().optional(),
|
|
3172
3192
|
layer: layer_ref,
|
|
3173
|
-
source_net_id:
|
|
3174
|
-
covered_with_solder_mask:
|
|
3193
|
+
source_net_id: z153.string().optional(),
|
|
3194
|
+
covered_with_solder_mask: z153.boolean().optional().default(true)
|
|
3175
3195
|
});
|
|
3176
3196
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3177
|
-
shape:
|
|
3197
|
+
shape: z153.literal("rect"),
|
|
3178
3198
|
center: point,
|
|
3179
3199
|
width: length,
|
|
3180
3200
|
height: length,
|
|
@@ -3182,16 +3202,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3182
3202
|
});
|
|
3183
3203
|
expectTypesMatch(true);
|
|
3184
3204
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3185
|
-
shape:
|
|
3205
|
+
shape: z153.literal("brep"),
|
|
3186
3206
|
brep_shape
|
|
3187
3207
|
});
|
|
3188
3208
|
expectTypesMatch(true);
|
|
3189
3209
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3190
|
-
shape:
|
|
3191
|
-
points:
|
|
3210
|
+
shape: z153.literal("polygon"),
|
|
3211
|
+
points: z153.array(point)
|
|
3192
3212
|
});
|
|
3193
3213
|
expectTypesMatch(true);
|
|
3194
|
-
var pcb_copper_pour =
|
|
3214
|
+
var pcb_copper_pour = z153.discriminatedUnion("shape", [
|
|
3195
3215
|
pcb_copper_pour_rect,
|
|
3196
3216
|
pcb_copper_pour_brep,
|
|
3197
3217
|
pcb_copper_pour_polygon
|
|
@@ -3199,99 +3219,99 @@ var pcb_copper_pour = z152.discriminatedUnion("shape", [
|
|
|
3199
3219
|
expectTypesMatch(true);
|
|
3200
3220
|
|
|
3201
3221
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
3202
|
-
import { z as
|
|
3222
|
+
import { z as z154 } from "zod";
|
|
3203
3223
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3204
|
-
type:
|
|
3224
|
+
type: z154.literal("pcb_component_outside_board_error"),
|
|
3205
3225
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3206
3226
|
"pcb_component_outside_board_error"
|
|
3207
3227
|
),
|
|
3208
|
-
error_type:
|
|
3209
|
-
pcb_component_id:
|
|
3210
|
-
pcb_board_id:
|
|
3228
|
+
error_type: z154.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
3229
|
+
pcb_component_id: z154.string(),
|
|
3230
|
+
pcb_board_id: z154.string(),
|
|
3211
3231
|
component_center: point,
|
|
3212
|
-
component_bounds:
|
|
3213
|
-
min_x:
|
|
3214
|
-
max_x:
|
|
3215
|
-
min_y:
|
|
3216
|
-
max_y:
|
|
3232
|
+
component_bounds: z154.object({
|
|
3233
|
+
min_x: z154.number(),
|
|
3234
|
+
max_x: z154.number(),
|
|
3235
|
+
min_y: z154.number(),
|
|
3236
|
+
max_y: z154.number()
|
|
3217
3237
|
}),
|
|
3218
|
-
subcircuit_id:
|
|
3219
|
-
source_component_id:
|
|
3238
|
+
subcircuit_id: z154.string().optional(),
|
|
3239
|
+
source_component_id: z154.string().optional()
|
|
3220
3240
|
}).describe(
|
|
3221
3241
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3222
3242
|
);
|
|
3223
3243
|
expectTypesMatch(true);
|
|
3224
3244
|
|
|
3225
3245
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
3226
|
-
import { z as
|
|
3246
|
+
import { z as z155 } from "zod";
|
|
3227
3247
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3228
|
-
type:
|
|
3248
|
+
type: z155.literal("pcb_component_not_on_board_edge_error"),
|
|
3229
3249
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3230
3250
|
"pcb_component_not_on_board_edge_error"
|
|
3231
3251
|
),
|
|
3232
|
-
error_type:
|
|
3233
|
-
pcb_component_id:
|
|
3234
|
-
pcb_board_id:
|
|
3252
|
+
error_type: z155.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
3253
|
+
pcb_component_id: z155.string(),
|
|
3254
|
+
pcb_board_id: z155.string(),
|
|
3235
3255
|
component_center: point,
|
|
3236
|
-
pad_to_nearest_board_edge_distance:
|
|
3237
|
-
source_component_id:
|
|
3238
|
-
subcircuit_id:
|
|
3256
|
+
pad_to_nearest_board_edge_distance: z155.number(),
|
|
3257
|
+
source_component_id: z155.string().optional(),
|
|
3258
|
+
subcircuit_id: z155.string().optional()
|
|
3239
3259
|
}).describe(
|
|
3240
3260
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3241
3261
|
);
|
|
3242
3262
|
expectTypesMatch(true);
|
|
3243
3263
|
|
|
3244
3264
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
3245
|
-
import { z as
|
|
3265
|
+
import { z as z156 } from "zod";
|
|
3246
3266
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3247
|
-
type:
|
|
3267
|
+
type: z156.literal("pcb_component_invalid_layer_error"),
|
|
3248
3268
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3249
3269
|
"pcb_component_invalid_layer_error"
|
|
3250
3270
|
),
|
|
3251
|
-
error_type:
|
|
3252
|
-
pcb_component_id:
|
|
3253
|
-
source_component_id:
|
|
3271
|
+
error_type: z156.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
3272
|
+
pcb_component_id: z156.string().optional(),
|
|
3273
|
+
source_component_id: z156.string(),
|
|
3254
3274
|
layer: layer_ref,
|
|
3255
|
-
subcircuit_id:
|
|
3275
|
+
subcircuit_id: z156.string().optional()
|
|
3256
3276
|
}).describe(
|
|
3257
3277
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
3258
3278
|
);
|
|
3259
3279
|
expectTypesMatch(true);
|
|
3260
3280
|
|
|
3261
3281
|
// src/pcb/pcb_via_clearance_error.ts
|
|
3262
|
-
import { z as
|
|
3282
|
+
import { z as z157 } from "zod";
|
|
3263
3283
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
3264
|
-
type:
|
|
3284
|
+
type: z157.literal("pcb_via_clearance_error"),
|
|
3265
3285
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3266
|
-
error_type:
|
|
3267
|
-
pcb_via_ids:
|
|
3286
|
+
error_type: z157.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
3287
|
+
pcb_via_ids: z157.array(z157.string()).min(2),
|
|
3268
3288
|
minimum_clearance: distance.optional(),
|
|
3269
3289
|
actual_clearance: distance.optional(),
|
|
3270
|
-
pcb_center:
|
|
3271
|
-
x:
|
|
3272
|
-
y:
|
|
3290
|
+
pcb_center: z157.object({
|
|
3291
|
+
x: z157.number().optional(),
|
|
3292
|
+
y: z157.number().optional()
|
|
3273
3293
|
}).optional(),
|
|
3274
|
-
subcircuit_id:
|
|
3294
|
+
subcircuit_id: z157.string().optional()
|
|
3275
3295
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
3276
3296
|
expectTypesMatch(true);
|
|
3277
3297
|
|
|
3278
3298
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
3279
|
-
import { z as
|
|
3299
|
+
import { z as z158 } from "zod";
|
|
3280
3300
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
3281
|
-
type:
|
|
3301
|
+
type: z158.literal("pcb_via_trace_clearance_error"),
|
|
3282
3302
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3283
3303
|
"pcb_via_trace_clearance_error"
|
|
3284
3304
|
),
|
|
3285
|
-
error_type:
|
|
3286
|
-
pcb_via_id:
|
|
3287
|
-
pcb_trace_id:
|
|
3305
|
+
error_type: z158.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
3306
|
+
pcb_via_id: z158.string(),
|
|
3307
|
+
pcb_trace_id: z158.string(),
|
|
3288
3308
|
minimum_clearance: distance.optional(),
|
|
3289
3309
|
actual_clearance: distance.optional(),
|
|
3290
|
-
center:
|
|
3291
|
-
x:
|
|
3292
|
-
y:
|
|
3310
|
+
center: z158.object({
|
|
3311
|
+
x: z158.number().optional(),
|
|
3312
|
+
y: z158.number().optional()
|
|
3293
3313
|
}).optional(),
|
|
3294
|
-
subcircuit_id:
|
|
3314
|
+
subcircuit_id: z158.string().optional()
|
|
3295
3315
|
}).describe(
|
|
3296
3316
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
3297
3317
|
);
|
|
@@ -3300,41 +3320,41 @@ expectTypesMatch(
|
|
|
3300
3320
|
);
|
|
3301
3321
|
|
|
3302
3322
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
3303
|
-
import { z as
|
|
3323
|
+
import { z as z159 } from "zod";
|
|
3304
3324
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
3305
|
-
type:
|
|
3325
|
+
type: z159.literal("pcb_pad_pad_clearance_error"),
|
|
3306
3326
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3307
3327
|
"pcb_pad_pad_clearance_error"
|
|
3308
3328
|
),
|
|
3309
|
-
error_type:
|
|
3310
|
-
pcb_pad_ids:
|
|
3329
|
+
error_type: z159.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
3330
|
+
pcb_pad_ids: z159.array(z159.string()).min(2),
|
|
3311
3331
|
minimum_clearance: distance.optional(),
|
|
3312
3332
|
actual_clearance: distance.optional(),
|
|
3313
|
-
center:
|
|
3314
|
-
x:
|
|
3315
|
-
y:
|
|
3333
|
+
center: z159.object({
|
|
3334
|
+
x: z159.number().optional(),
|
|
3335
|
+
y: z159.number().optional()
|
|
3316
3336
|
}).optional(),
|
|
3317
|
-
subcircuit_id:
|
|
3337
|
+
subcircuit_id: z159.string().optional()
|
|
3318
3338
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
3319
3339
|
expectTypesMatch(true);
|
|
3320
3340
|
|
|
3321
3341
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
3322
|
-
import { z as
|
|
3342
|
+
import { z as z160 } from "zod";
|
|
3323
3343
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
3324
|
-
type:
|
|
3344
|
+
type: z160.literal("pcb_pad_trace_clearance_error"),
|
|
3325
3345
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3326
3346
|
"pcb_pad_trace_clearance_error"
|
|
3327
3347
|
),
|
|
3328
|
-
error_type:
|
|
3329
|
-
pcb_pad_id:
|
|
3330
|
-
pcb_trace_id:
|
|
3348
|
+
error_type: z160.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
3349
|
+
pcb_pad_id: z160.string(),
|
|
3350
|
+
pcb_trace_id: z160.string(),
|
|
3331
3351
|
minimum_clearance: distance.optional(),
|
|
3332
3352
|
actual_clearance: distance.optional(),
|
|
3333
|
-
center:
|
|
3334
|
-
x:
|
|
3335
|
-
y:
|
|
3353
|
+
center: z160.object({
|
|
3354
|
+
x: z160.number().optional(),
|
|
3355
|
+
y: z160.number().optional()
|
|
3336
3356
|
}).optional(),
|
|
3337
|
-
subcircuit_id:
|
|
3357
|
+
subcircuit_id: z160.string().optional()
|
|
3338
3358
|
}).describe(
|
|
3339
3359
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
3340
3360
|
);
|
|
@@ -3343,89 +3363,89 @@ expectTypesMatch(
|
|
|
3343
3363
|
);
|
|
3344
3364
|
|
|
3345
3365
|
// src/pcb/pcb_courtyard_rect.ts
|
|
3346
|
-
import { z as
|
|
3347
|
-
var pcb_courtyard_rect =
|
|
3348
|
-
type:
|
|
3366
|
+
import { z as z161 } from "zod";
|
|
3367
|
+
var pcb_courtyard_rect = z161.object({
|
|
3368
|
+
type: z161.literal("pcb_courtyard_rect"),
|
|
3349
3369
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
3350
|
-
pcb_component_id:
|
|
3351
|
-
pcb_group_id:
|
|
3352
|
-
subcircuit_id:
|
|
3370
|
+
pcb_component_id: z161.string(),
|
|
3371
|
+
pcb_group_id: z161.string().optional(),
|
|
3372
|
+
subcircuit_id: z161.string().optional(),
|
|
3353
3373
|
center: point,
|
|
3354
3374
|
width: length,
|
|
3355
3375
|
height: length,
|
|
3356
3376
|
layer: visible_layer,
|
|
3357
3377
|
ccw_rotation: rotation.optional(),
|
|
3358
|
-
color:
|
|
3378
|
+
color: z161.string().optional()
|
|
3359
3379
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
3360
3380
|
expectTypesMatch(true);
|
|
3361
3381
|
|
|
3362
3382
|
// src/pcb/pcb_courtyard_outline.ts
|
|
3363
|
-
import { z as
|
|
3364
|
-
var pcb_courtyard_outline =
|
|
3365
|
-
type:
|
|
3383
|
+
import { z as z162 } from "zod";
|
|
3384
|
+
var pcb_courtyard_outline = z162.object({
|
|
3385
|
+
type: z162.literal("pcb_courtyard_outline"),
|
|
3366
3386
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
3367
3387
|
"pcb_courtyard_outline"
|
|
3368
3388
|
),
|
|
3369
|
-
pcb_component_id:
|
|
3370
|
-
pcb_group_id:
|
|
3371
|
-
subcircuit_id:
|
|
3389
|
+
pcb_component_id: z162.string(),
|
|
3390
|
+
pcb_group_id: z162.string().optional(),
|
|
3391
|
+
subcircuit_id: z162.string().optional(),
|
|
3372
3392
|
layer: visible_layer,
|
|
3373
|
-
outline:
|
|
3393
|
+
outline: z162.array(point).min(2)
|
|
3374
3394
|
}).describe("Defines a courtyard outline on the PCB");
|
|
3375
3395
|
expectTypesMatch(true);
|
|
3376
3396
|
|
|
3377
3397
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
3378
|
-
import { z as
|
|
3379
|
-
var pcb_courtyard_polygon =
|
|
3380
|
-
type:
|
|
3398
|
+
import { z as z163 } from "zod";
|
|
3399
|
+
var pcb_courtyard_polygon = z163.object({
|
|
3400
|
+
type: z163.literal("pcb_courtyard_polygon"),
|
|
3381
3401
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
3382
3402
|
"pcb_courtyard_polygon"
|
|
3383
3403
|
),
|
|
3384
|
-
pcb_component_id:
|
|
3385
|
-
pcb_group_id:
|
|
3386
|
-
subcircuit_id:
|
|
3404
|
+
pcb_component_id: z163.string(),
|
|
3405
|
+
pcb_group_id: z163.string().optional(),
|
|
3406
|
+
subcircuit_id: z163.string().optional(),
|
|
3387
3407
|
layer: visible_layer,
|
|
3388
|
-
points:
|
|
3389
|
-
color:
|
|
3408
|
+
points: z163.array(point).min(3),
|
|
3409
|
+
color: z163.string().optional()
|
|
3390
3410
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
3391
3411
|
expectTypesMatch(true);
|
|
3392
3412
|
|
|
3393
3413
|
// src/pcb/pcb_courtyard_circle.ts
|
|
3394
|
-
import { z as
|
|
3395
|
-
var pcb_courtyard_circle =
|
|
3396
|
-
type:
|
|
3414
|
+
import { z as z164 } from "zod";
|
|
3415
|
+
var pcb_courtyard_circle = z164.object({
|
|
3416
|
+
type: z164.literal("pcb_courtyard_circle"),
|
|
3397
3417
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
3398
3418
|
"pcb_courtyard_circle"
|
|
3399
3419
|
),
|
|
3400
|
-
pcb_component_id:
|
|
3401
|
-
pcb_group_id:
|
|
3402
|
-
subcircuit_id:
|
|
3420
|
+
pcb_component_id: z164.string(),
|
|
3421
|
+
pcb_group_id: z164.string().optional(),
|
|
3422
|
+
subcircuit_id: z164.string().optional(),
|
|
3403
3423
|
center: point,
|
|
3404
3424
|
radius: length,
|
|
3405
3425
|
layer: visible_layer,
|
|
3406
|
-
color:
|
|
3426
|
+
color: z164.string().optional()
|
|
3407
3427
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3408
3428
|
expectTypesMatch(true);
|
|
3409
3429
|
|
|
3410
3430
|
// src/pcb/pcb_courtyard_pill.ts
|
|
3411
|
-
import { z as
|
|
3412
|
-
var pcb_courtyard_pill =
|
|
3413
|
-
type:
|
|
3431
|
+
import { z as z165 } from "zod";
|
|
3432
|
+
var pcb_courtyard_pill = z165.object({
|
|
3433
|
+
type: z165.literal("pcb_courtyard_pill"),
|
|
3414
3434
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
3415
|
-
pcb_component_id:
|
|
3416
|
-
pcb_group_id:
|
|
3417
|
-
subcircuit_id:
|
|
3435
|
+
pcb_component_id: z165.string(),
|
|
3436
|
+
pcb_group_id: z165.string().optional(),
|
|
3437
|
+
subcircuit_id: z165.string().optional(),
|
|
3418
3438
|
center: point,
|
|
3419
3439
|
width: length,
|
|
3420
3440
|
height: length,
|
|
3421
3441
|
radius: length,
|
|
3422
3442
|
layer: visible_layer,
|
|
3423
|
-
color:
|
|
3443
|
+
color: z165.string().optional()
|
|
3424
3444
|
}).describe("Defines a courtyard pill on the PCB");
|
|
3425
3445
|
expectTypesMatch(true);
|
|
3426
3446
|
|
|
3427
3447
|
// src/cad/cad_component.ts
|
|
3428
|
-
import { z as
|
|
3448
|
+
import { z as z166 } from "zod";
|
|
3429
3449
|
|
|
3430
3450
|
// src/cad/cad_model_conventions.ts
|
|
3431
3451
|
var cad_model_formats = [
|
|
@@ -3456,49 +3476,49 @@ var cadModelDefaultDirectionMap = {
|
|
|
3456
3476
|
};
|
|
3457
3477
|
|
|
3458
3478
|
// src/cad/cad_component.ts
|
|
3459
|
-
var cad_component =
|
|
3460
|
-
type:
|
|
3461
|
-
cad_component_id:
|
|
3462
|
-
pcb_component_id:
|
|
3463
|
-
source_component_id:
|
|
3479
|
+
var cad_component = z166.object({
|
|
3480
|
+
type: z166.literal("cad_component"),
|
|
3481
|
+
cad_component_id: z166.string(),
|
|
3482
|
+
pcb_component_id: z166.string(),
|
|
3483
|
+
source_component_id: z166.string(),
|
|
3464
3484
|
position: point3,
|
|
3465
3485
|
rotation: point3.optional(),
|
|
3466
3486
|
size: point3.optional(),
|
|
3467
3487
|
layer: layer_ref.optional(),
|
|
3468
|
-
subcircuit_id:
|
|
3488
|
+
subcircuit_id: z166.string().optional(),
|
|
3469
3489
|
// These are all ways to generate/load the 3d model
|
|
3470
|
-
footprinter_string:
|
|
3471
|
-
model_obj_url:
|
|
3472
|
-
model_stl_url:
|
|
3473
|
-
model_3mf_url:
|
|
3474
|
-
model_gltf_url:
|
|
3475
|
-
model_glb_url:
|
|
3476
|
-
model_step_url:
|
|
3477
|
-
model_wrl_url:
|
|
3490
|
+
footprinter_string: z166.string().optional(),
|
|
3491
|
+
model_obj_url: z166.string().optional(),
|
|
3492
|
+
model_stl_url: z166.string().optional(),
|
|
3493
|
+
model_3mf_url: z166.string().optional(),
|
|
3494
|
+
model_gltf_url: z166.string().optional(),
|
|
3495
|
+
model_glb_url: z166.string().optional(),
|
|
3496
|
+
model_step_url: z166.string().optional(),
|
|
3497
|
+
model_wrl_url: z166.string().optional(),
|
|
3478
3498
|
model_asset: asset.optional(),
|
|
3479
|
-
model_unit_to_mm_scale_factor:
|
|
3480
|
-
model_board_normal_direction:
|
|
3499
|
+
model_unit_to_mm_scale_factor: z166.number().optional(),
|
|
3500
|
+
model_board_normal_direction: z166.enum(cad_model_axis_directions).optional().describe(
|
|
3481
3501
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
3482
3502
|
),
|
|
3483
3503
|
model_origin_position: point3.optional(),
|
|
3484
|
-
model_origin_alignment:
|
|
3504
|
+
model_origin_alignment: z166.enum([
|
|
3485
3505
|
"unknown",
|
|
3486
3506
|
"center",
|
|
3487
3507
|
"center_of_component_on_board_surface",
|
|
3488
3508
|
"bottom_center_of_component"
|
|
3489
3509
|
]).optional(),
|
|
3490
|
-
model_object_fit:
|
|
3491
|
-
model_jscad:
|
|
3492
|
-
show_as_translucent_model:
|
|
3493
|
-
show_as_bounding_box:
|
|
3494
|
-
anchor_alignment:
|
|
3510
|
+
model_object_fit: z166.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
3511
|
+
model_jscad: z166.any().optional(),
|
|
3512
|
+
show_as_translucent_model: z166.boolean().optional(),
|
|
3513
|
+
show_as_bounding_box: z166.boolean().optional(),
|
|
3514
|
+
anchor_alignment: z166.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
3495
3515
|
}).describe("Defines a component on the PCB");
|
|
3496
3516
|
expectTypesMatch(true);
|
|
3497
3517
|
|
|
3498
3518
|
// src/simulation/simulation_voltage_source.ts
|
|
3499
|
-
import { z as
|
|
3500
|
-
var wave_shape =
|
|
3501
|
-
var percentage =
|
|
3519
|
+
import { z as z167 } from "zod";
|
|
3520
|
+
var wave_shape = z167.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
3521
|
+
var percentage = z167.union([z167.string(), z167.number()]).transform((val) => {
|
|
3502
3522
|
if (typeof val === "string") {
|
|
3503
3523
|
if (val.endsWith("%")) {
|
|
3504
3524
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3507,30 +3527,30 @@ var percentage = z166.union([z166.string(), z166.number()]).transform((val) => {
|
|
|
3507
3527
|
}
|
|
3508
3528
|
return val;
|
|
3509
3529
|
}).pipe(
|
|
3510
|
-
|
|
3530
|
+
z167.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3511
3531
|
);
|
|
3512
|
-
var simulation_dc_voltage_source =
|
|
3513
|
-
type:
|
|
3532
|
+
var simulation_dc_voltage_source = z167.object({
|
|
3533
|
+
type: z167.literal("simulation_voltage_source"),
|
|
3514
3534
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3515
3535
|
"simulation_voltage_source"
|
|
3516
3536
|
),
|
|
3517
|
-
is_dc_source:
|
|
3518
|
-
positive_source_port_id:
|
|
3519
|
-
negative_source_port_id:
|
|
3520
|
-
positive_source_net_id:
|
|
3521
|
-
negative_source_net_id:
|
|
3537
|
+
is_dc_source: z167.literal(true).optional().default(true),
|
|
3538
|
+
positive_source_port_id: z167.string().optional(),
|
|
3539
|
+
negative_source_port_id: z167.string().optional(),
|
|
3540
|
+
positive_source_net_id: z167.string().optional(),
|
|
3541
|
+
negative_source_net_id: z167.string().optional(),
|
|
3522
3542
|
voltage
|
|
3523
3543
|
}).describe("Defines a DC voltage source for simulation");
|
|
3524
|
-
var simulation_ac_voltage_source =
|
|
3525
|
-
type:
|
|
3544
|
+
var simulation_ac_voltage_source = z167.object({
|
|
3545
|
+
type: z167.literal("simulation_voltage_source"),
|
|
3526
3546
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3527
3547
|
"simulation_voltage_source"
|
|
3528
3548
|
),
|
|
3529
|
-
is_dc_source:
|
|
3530
|
-
terminal1_source_port_id:
|
|
3531
|
-
terminal2_source_port_id:
|
|
3532
|
-
terminal1_source_net_id:
|
|
3533
|
-
terminal2_source_net_id:
|
|
3549
|
+
is_dc_source: z167.literal(false),
|
|
3550
|
+
terminal1_source_port_id: z167.string().optional(),
|
|
3551
|
+
terminal2_source_port_id: z167.string().optional(),
|
|
3552
|
+
terminal1_source_net_id: z167.string().optional(),
|
|
3553
|
+
terminal2_source_net_id: z167.string().optional(),
|
|
3534
3554
|
voltage: voltage.optional(),
|
|
3535
3555
|
frequency: frequency.optional(),
|
|
3536
3556
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -3543,14 +3563,14 @@ var simulation_ac_voltage_source = z166.object({
|
|
|
3543
3563
|
pulse_width: ms.optional(),
|
|
3544
3564
|
period: ms.optional()
|
|
3545
3565
|
}).describe("Defines an AC voltage source for simulation");
|
|
3546
|
-
var simulation_voltage_source =
|
|
3566
|
+
var simulation_voltage_source = z167.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
3547
3567
|
expectTypesMatch(true);
|
|
3548
3568
|
expectTypesMatch(true);
|
|
3549
3569
|
expectTypesMatch(true);
|
|
3550
3570
|
|
|
3551
3571
|
// src/simulation/simulation_current_source.ts
|
|
3552
|
-
import { z as
|
|
3553
|
-
var percentage2 =
|
|
3572
|
+
import { z as z168 } from "zod";
|
|
3573
|
+
var percentage2 = z168.union([z168.string(), z168.number()]).transform((val) => {
|
|
3554
3574
|
if (typeof val === "string") {
|
|
3555
3575
|
if (val.endsWith("%")) {
|
|
3556
3576
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3559,30 +3579,30 @@ var percentage2 = z167.union([z167.string(), z167.number()]).transform((val) =>
|
|
|
3559
3579
|
}
|
|
3560
3580
|
return val;
|
|
3561
3581
|
}).pipe(
|
|
3562
|
-
|
|
3582
|
+
z168.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3563
3583
|
);
|
|
3564
|
-
var simulation_dc_current_source =
|
|
3565
|
-
type:
|
|
3584
|
+
var simulation_dc_current_source = z168.object({
|
|
3585
|
+
type: z168.literal("simulation_current_source"),
|
|
3566
3586
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3567
3587
|
"simulation_current_source"
|
|
3568
3588
|
),
|
|
3569
|
-
is_dc_source:
|
|
3570
|
-
positive_source_port_id:
|
|
3571
|
-
negative_source_port_id:
|
|
3572
|
-
positive_source_net_id:
|
|
3573
|
-
negative_source_net_id:
|
|
3589
|
+
is_dc_source: z168.literal(true).optional().default(true),
|
|
3590
|
+
positive_source_port_id: z168.string().optional(),
|
|
3591
|
+
negative_source_port_id: z168.string().optional(),
|
|
3592
|
+
positive_source_net_id: z168.string().optional(),
|
|
3593
|
+
negative_source_net_id: z168.string().optional(),
|
|
3574
3594
|
current
|
|
3575
3595
|
}).describe("Defines a DC current source for simulation");
|
|
3576
|
-
var simulation_ac_current_source =
|
|
3577
|
-
type:
|
|
3596
|
+
var simulation_ac_current_source = z168.object({
|
|
3597
|
+
type: z168.literal("simulation_current_source"),
|
|
3578
3598
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3579
3599
|
"simulation_current_source"
|
|
3580
3600
|
),
|
|
3581
|
-
is_dc_source:
|
|
3582
|
-
terminal1_source_port_id:
|
|
3583
|
-
terminal2_source_port_id:
|
|
3584
|
-
terminal1_source_net_id:
|
|
3585
|
-
terminal2_source_net_id:
|
|
3601
|
+
is_dc_source: z168.literal(false),
|
|
3602
|
+
terminal1_source_port_id: z168.string().optional(),
|
|
3603
|
+
terminal2_source_port_id: z168.string().optional(),
|
|
3604
|
+
terminal1_source_net_id: z168.string().optional(),
|
|
3605
|
+
terminal2_source_net_id: z168.string().optional(),
|
|
3586
3606
|
current: current.optional(),
|
|
3587
3607
|
frequency: frequency.optional(),
|
|
3588
3608
|
peak_to_peak_current: current.optional(),
|
|
@@ -3590,31 +3610,31 @@ var simulation_ac_current_source = z167.object({
|
|
|
3590
3610
|
phase: rotation.optional(),
|
|
3591
3611
|
duty_cycle: percentage2.optional()
|
|
3592
3612
|
}).describe("Defines an AC current source for simulation");
|
|
3593
|
-
var simulation_current_source =
|
|
3613
|
+
var simulation_current_source = z168.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
3594
3614
|
expectTypesMatch(true);
|
|
3595
3615
|
expectTypesMatch(true);
|
|
3596
3616
|
expectTypesMatch(true);
|
|
3597
3617
|
|
|
3598
3618
|
// src/simulation/simulation_experiment.ts
|
|
3599
|
-
import { z as
|
|
3600
|
-
var experiment_type =
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3619
|
+
import { z as z169 } from "zod";
|
|
3620
|
+
var experiment_type = z169.union([
|
|
3621
|
+
z169.literal("spice_dc_sweep"),
|
|
3622
|
+
z169.literal("spice_dc_operating_point"),
|
|
3623
|
+
z169.literal("spice_transient_analysis"),
|
|
3624
|
+
z169.literal("spice_ac_analysis")
|
|
3605
3625
|
]);
|
|
3606
|
-
var spice_simulation_options =
|
|
3607
|
-
method:
|
|
3608
|
-
reltol:
|
|
3609
|
-
abstol:
|
|
3610
|
-
vntol:
|
|
3626
|
+
var spice_simulation_options = z169.object({
|
|
3627
|
+
method: z169.enum(["trap", "gear"]).optional(),
|
|
3628
|
+
reltol: z169.union([z169.number(), z169.string()]).optional(),
|
|
3629
|
+
abstol: z169.union([z169.number(), z169.string()]).optional(),
|
|
3630
|
+
vntol: z169.union([z169.number(), z169.string()]).optional()
|
|
3611
3631
|
}).describe("SPICE solver options for a simulation experiment");
|
|
3612
|
-
var simulation_experiment =
|
|
3613
|
-
type:
|
|
3632
|
+
var simulation_experiment = z169.object({
|
|
3633
|
+
type: z169.literal("simulation_experiment"),
|
|
3614
3634
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
3615
3635
|
"simulation_experiment"
|
|
3616
3636
|
),
|
|
3617
|
-
name:
|
|
3637
|
+
name: z169.string(),
|
|
3618
3638
|
experiment_type,
|
|
3619
3639
|
time_per_step: duration_ms.optional(),
|
|
3620
3640
|
start_time_ms: ms.optional(),
|
|
@@ -3624,73 +3644,73 @@ var simulation_experiment = z168.object({
|
|
|
3624
3644
|
expectTypesMatch(true);
|
|
3625
3645
|
|
|
3626
3646
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
3627
|
-
import { z as
|
|
3628
|
-
var simulation_transient_voltage_graph =
|
|
3629
|
-
type:
|
|
3647
|
+
import { z as z170 } from "zod";
|
|
3648
|
+
var simulation_transient_voltage_graph = z170.object({
|
|
3649
|
+
type: z170.literal("simulation_transient_voltage_graph"),
|
|
3630
3650
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
3631
3651
|
"simulation_transient_voltage_graph"
|
|
3632
3652
|
),
|
|
3633
|
-
simulation_experiment_id:
|
|
3634
|
-
timestamps_ms:
|
|
3635
|
-
voltage_levels:
|
|
3636
|
-
source_component_id:
|
|
3637
|
-
subcircuit_connectivity_map_key:
|
|
3653
|
+
simulation_experiment_id: z170.string(),
|
|
3654
|
+
timestamps_ms: z170.array(z170.number()).optional(),
|
|
3655
|
+
voltage_levels: z170.array(z170.number()),
|
|
3656
|
+
source_component_id: z170.string().optional(),
|
|
3657
|
+
subcircuit_connectivity_map_key: z170.string().optional(),
|
|
3638
3658
|
time_per_step: duration_ms,
|
|
3639
3659
|
start_time_ms: ms,
|
|
3640
3660
|
end_time_ms: ms,
|
|
3641
|
-
name:
|
|
3642
|
-
color:
|
|
3661
|
+
name: z170.string().optional(),
|
|
3662
|
+
color: z170.string().optional()
|
|
3643
3663
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
3644
3664
|
expectTypesMatch(true);
|
|
3645
3665
|
|
|
3646
3666
|
// src/simulation/simulation_transient_current_graph.ts
|
|
3647
|
-
import { z as
|
|
3648
|
-
var simulation_transient_current_graph =
|
|
3649
|
-
type:
|
|
3667
|
+
import { z as z171 } from "zod";
|
|
3668
|
+
var simulation_transient_current_graph = z171.object({
|
|
3669
|
+
type: z171.literal("simulation_transient_current_graph"),
|
|
3650
3670
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
3651
3671
|
"simulation_transient_current_graph"
|
|
3652
3672
|
),
|
|
3653
|
-
simulation_experiment_id:
|
|
3654
|
-
timestamps_ms:
|
|
3655
|
-
current_levels:
|
|
3656
|
-
source_component_id:
|
|
3657
|
-
subcircuit_connectivity_map_key:
|
|
3673
|
+
simulation_experiment_id: z171.string(),
|
|
3674
|
+
timestamps_ms: z171.array(z171.number()).optional(),
|
|
3675
|
+
current_levels: z171.array(z171.number()),
|
|
3676
|
+
source_component_id: z171.string().optional(),
|
|
3677
|
+
subcircuit_connectivity_map_key: z171.string().optional(),
|
|
3658
3678
|
time_per_step: duration_ms,
|
|
3659
3679
|
start_time_ms: ms,
|
|
3660
3680
|
end_time_ms: ms,
|
|
3661
|
-
name:
|
|
3662
|
-
color:
|
|
3681
|
+
name: z171.string().optional(),
|
|
3682
|
+
color: z171.string().optional()
|
|
3663
3683
|
}).describe("Stores current measurements over time for a simulation");
|
|
3664
3684
|
expectTypesMatch(true);
|
|
3665
3685
|
|
|
3666
3686
|
// src/simulation/simulation_switch.ts
|
|
3667
|
-
import { z as
|
|
3668
|
-
var simulation_switch =
|
|
3669
|
-
type:
|
|
3687
|
+
import { z as z172 } from "zod";
|
|
3688
|
+
var simulation_switch = z172.object({
|
|
3689
|
+
type: z172.literal("simulation_switch"),
|
|
3670
3690
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
3671
|
-
source_component_id:
|
|
3691
|
+
source_component_id: z172.string().optional(),
|
|
3672
3692
|
closes_at: ms.optional(),
|
|
3673
3693
|
opens_at: ms.optional(),
|
|
3674
|
-
starts_closed:
|
|
3694
|
+
starts_closed: z172.boolean().optional(),
|
|
3675
3695
|
switching_frequency: frequency.optional()
|
|
3676
3696
|
}).describe("Defines a switch for simulation timing control");
|
|
3677
3697
|
expectTypesMatch(true);
|
|
3678
3698
|
|
|
3679
3699
|
// src/simulation/simulation_voltage_probe.ts
|
|
3680
|
-
import { z as
|
|
3681
|
-
var simulation_voltage_probe =
|
|
3682
|
-
type:
|
|
3700
|
+
import { z as z173 } from "zod";
|
|
3701
|
+
var simulation_voltage_probe = z173.object({
|
|
3702
|
+
type: z173.literal("simulation_voltage_probe"),
|
|
3683
3703
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
3684
3704
|
"simulation_voltage_probe"
|
|
3685
3705
|
),
|
|
3686
|
-
source_component_id:
|
|
3687
|
-
name:
|
|
3688
|
-
signal_input_source_port_id:
|
|
3689
|
-
signal_input_source_net_id:
|
|
3690
|
-
reference_input_source_port_id:
|
|
3691
|
-
reference_input_source_net_id:
|
|
3692
|
-
subcircuit_id:
|
|
3693
|
-
color:
|
|
3706
|
+
source_component_id: z173.string().optional(),
|
|
3707
|
+
name: z173.string().optional(),
|
|
3708
|
+
signal_input_source_port_id: z173.string().optional(),
|
|
3709
|
+
signal_input_source_net_id: z173.string().optional(),
|
|
3710
|
+
reference_input_source_port_id: z173.string().optional(),
|
|
3711
|
+
reference_input_source_net_id: z173.string().optional(),
|
|
3712
|
+
subcircuit_id: z173.string().optional(),
|
|
3713
|
+
color: z173.string().optional()
|
|
3694
3714
|
}).describe(
|
|
3695
3715
|
"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."
|
|
3696
3716
|
).superRefine((data, ctx) => {
|
|
@@ -3700,20 +3720,20 @@ var simulation_voltage_probe = z172.object({
|
|
|
3700
3720
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
3701
3721
|
if (has_ports && has_nets) {
|
|
3702
3722
|
ctx.addIssue({
|
|
3703
|
-
code:
|
|
3723
|
+
code: z173.ZodIssueCode.custom,
|
|
3704
3724
|
message: "Cannot mix port and net connections in a differential probe."
|
|
3705
3725
|
});
|
|
3706
3726
|
} else if (has_ports) {
|
|
3707
3727
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
3708
3728
|
ctx.addIssue({
|
|
3709
|
-
code:
|
|
3729
|
+
code: z173.ZodIssueCode.custom,
|
|
3710
3730
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
3711
3731
|
});
|
|
3712
3732
|
}
|
|
3713
3733
|
} else if (has_nets) {
|
|
3714
3734
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
3715
3735
|
ctx.addIssue({
|
|
3716
|
-
code:
|
|
3736
|
+
code: z173.ZodIssueCode.custom,
|
|
3717
3737
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
3718
3738
|
});
|
|
3719
3739
|
}
|
|
@@ -3721,7 +3741,7 @@ var simulation_voltage_probe = z172.object({
|
|
|
3721
3741
|
} else {
|
|
3722
3742
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
3723
3743
|
ctx.addIssue({
|
|
3724
|
-
code:
|
|
3744
|
+
code: z173.ZodIssueCode.custom,
|
|
3725
3745
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
3726
3746
|
});
|
|
3727
3747
|
}
|
|
@@ -3730,20 +3750,20 @@ var simulation_voltage_probe = z172.object({
|
|
|
3730
3750
|
expectTypesMatch(true);
|
|
3731
3751
|
|
|
3732
3752
|
// src/simulation/simulation_current_probe.ts
|
|
3733
|
-
import { z as
|
|
3734
|
-
var simulation_current_probe =
|
|
3735
|
-
type:
|
|
3753
|
+
import { z as z174 } from "zod";
|
|
3754
|
+
var simulation_current_probe = z174.object({
|
|
3755
|
+
type: z174.literal("simulation_current_probe"),
|
|
3736
3756
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
3737
3757
|
"simulation_current_probe"
|
|
3738
3758
|
),
|
|
3739
|
-
source_component_id:
|
|
3740
|
-
name:
|
|
3741
|
-
positive_source_port_id:
|
|
3742
|
-
negative_source_port_id:
|
|
3743
|
-
positive_source_net_id:
|
|
3744
|
-
negative_source_net_id:
|
|
3745
|
-
subcircuit_id:
|
|
3746
|
-
color:
|
|
3759
|
+
source_component_id: z174.string().optional(),
|
|
3760
|
+
name: z174.string().optional(),
|
|
3761
|
+
positive_source_port_id: z174.string().optional(),
|
|
3762
|
+
negative_source_port_id: z174.string().optional(),
|
|
3763
|
+
positive_source_net_id: z174.string().optional(),
|
|
3764
|
+
negative_source_net_id: z174.string().optional(),
|
|
3765
|
+
subcircuit_id: z174.string().optional(),
|
|
3766
|
+
color: z174.string().optional()
|
|
3747
3767
|
}).describe(
|
|
3748
3768
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
3749
3769
|
).superRefine((data, ctx) => {
|
|
@@ -3755,7 +3775,7 @@ var simulation_current_probe = z173.object({
|
|
|
3755
3775
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
3756
3776
|
if (hasPorts && hasNets) {
|
|
3757
3777
|
ctx.addIssue({
|
|
3758
|
-
code:
|
|
3778
|
+
code: z174.ZodIssueCode.custom,
|
|
3759
3779
|
message: "Cannot mix port and net connections in a current probe."
|
|
3760
3780
|
});
|
|
3761
3781
|
return;
|
|
@@ -3763,7 +3783,7 @@ var simulation_current_probe = z173.object({
|
|
|
3763
3783
|
if (hasPorts) {
|
|
3764
3784
|
if (!hasPositivePort || !hasNegativePort) {
|
|
3765
3785
|
ctx.addIssue({
|
|
3766
|
-
code:
|
|
3786
|
+
code: z174.ZodIssueCode.custom,
|
|
3767
3787
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
3768
3788
|
});
|
|
3769
3789
|
}
|
|
@@ -3772,79 +3792,79 @@ var simulation_current_probe = z173.object({
|
|
|
3772
3792
|
if (hasNets) {
|
|
3773
3793
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
3774
3794
|
ctx.addIssue({
|
|
3775
|
-
code:
|
|
3795
|
+
code: z174.ZodIssueCode.custom,
|
|
3776
3796
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
3777
3797
|
});
|
|
3778
3798
|
}
|
|
3779
3799
|
return;
|
|
3780
3800
|
}
|
|
3781
3801
|
ctx.addIssue({
|
|
3782
|
-
code:
|
|
3802
|
+
code: z174.ZodIssueCode.custom,
|
|
3783
3803
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
3784
3804
|
});
|
|
3785
3805
|
});
|
|
3786
3806
|
expectTypesMatch(true);
|
|
3787
3807
|
|
|
3788
3808
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
3789
|
-
import { z as
|
|
3809
|
+
import { z as z175 } from "zod";
|
|
3790
3810
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
3791
|
-
type:
|
|
3811
|
+
type: z175.literal("simulation_unknown_experiment_error"),
|
|
3792
3812
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
3793
3813
|
"simulation_unknown_experiment_error"
|
|
3794
3814
|
),
|
|
3795
|
-
error_type:
|
|
3796
|
-
simulation_experiment_id:
|
|
3797
|
-
subcircuit_id:
|
|
3815
|
+
error_type: z175.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
3816
|
+
simulation_experiment_id: z175.string().optional(),
|
|
3817
|
+
subcircuit_id: z175.string().optional()
|
|
3798
3818
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
3799
3819
|
expectTypesMatch(true);
|
|
3800
3820
|
|
|
3801
3821
|
// src/simulation/simulation_op_amp.ts
|
|
3802
|
-
import { z as
|
|
3803
|
-
var simulation_op_amp =
|
|
3804
|
-
type:
|
|
3822
|
+
import { z as z176 } from "zod";
|
|
3823
|
+
var simulation_op_amp = z176.object({
|
|
3824
|
+
type: z176.literal("simulation_op_amp"),
|
|
3805
3825
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
3806
|
-
source_component_id:
|
|
3807
|
-
inverting_input_source_port_id:
|
|
3808
|
-
non_inverting_input_source_port_id:
|
|
3809
|
-
output_source_port_id:
|
|
3810
|
-
positive_supply_source_port_id:
|
|
3811
|
-
negative_supply_source_port_id:
|
|
3826
|
+
source_component_id: z176.string().optional(),
|
|
3827
|
+
inverting_input_source_port_id: z176.string(),
|
|
3828
|
+
non_inverting_input_source_port_id: z176.string(),
|
|
3829
|
+
output_source_port_id: z176.string(),
|
|
3830
|
+
positive_supply_source_port_id: z176.string(),
|
|
3831
|
+
negative_supply_source_port_id: z176.string()
|
|
3812
3832
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
3813
3833
|
expectTypesMatch(true);
|
|
3814
3834
|
|
|
3815
3835
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
3816
|
-
import { z as
|
|
3817
|
-
var simulation_spice_subcircuit =
|
|
3818
|
-
type:
|
|
3836
|
+
import { z as z177 } from "zod";
|
|
3837
|
+
var simulation_spice_subcircuit = z177.object({
|
|
3838
|
+
type: z177.literal("simulation_spice_subcircuit"),
|
|
3819
3839
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
3820
3840
|
"simulation_spice_subcircuit"
|
|
3821
3841
|
),
|
|
3822
|
-
source_component_id:
|
|
3823
|
-
spice_pin_to_source_port_map:
|
|
3824
|
-
subcircuit_source:
|
|
3842
|
+
source_component_id: z177.string(),
|
|
3843
|
+
spice_pin_to_source_port_map: z177.record(z177.string(), z177.string()),
|
|
3844
|
+
subcircuit_source: z177.string()
|
|
3825
3845
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
3826
3846
|
expectTypesMatch(
|
|
3827
3847
|
true
|
|
3828
3848
|
);
|
|
3829
3849
|
|
|
3830
3850
|
// src/simulation/simulation_oscilloscope_trace.ts
|
|
3831
|
-
import { z as
|
|
3851
|
+
import { z as z178 } from "zod";
|
|
3832
3852
|
var hasValue = (value) => value !== void 0;
|
|
3833
|
-
var simulation_oscilloscope_trace =
|
|
3834
|
-
type:
|
|
3853
|
+
var simulation_oscilloscope_trace = z178.object({
|
|
3854
|
+
type: z178.literal("simulation_oscilloscope_trace"),
|
|
3835
3855
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
3836
3856
|
"simulation_oscilloscope_trace"
|
|
3837
3857
|
),
|
|
3838
|
-
simulation_transient_voltage_graph_id:
|
|
3839
|
-
simulation_transient_current_graph_id:
|
|
3840
|
-
simulation_voltage_probe_id:
|
|
3841
|
-
simulation_current_probe_id:
|
|
3842
|
-
display_name:
|
|
3843
|
-
color:
|
|
3844
|
-
display_center_value:
|
|
3845
|
-
display_center_offset_divs:
|
|
3846
|
-
volts_per_div:
|
|
3847
|
-
amps_per_div:
|
|
3858
|
+
simulation_transient_voltage_graph_id: z178.string().optional(),
|
|
3859
|
+
simulation_transient_current_graph_id: z178.string().optional(),
|
|
3860
|
+
simulation_voltage_probe_id: z178.string().optional(),
|
|
3861
|
+
simulation_current_probe_id: z178.string().optional(),
|
|
3862
|
+
display_name: z178.string().optional(),
|
|
3863
|
+
color: z178.string().optional(),
|
|
3864
|
+
display_center_value: z178.number().optional(),
|
|
3865
|
+
display_center_offset_divs: z178.number().optional(),
|
|
3866
|
+
volts_per_div: z178.number().positive().optional(),
|
|
3867
|
+
amps_per_div: z178.number().positive().optional()
|
|
3848
3868
|
}).describe(
|
|
3849
3869
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
3850
3870
|
).superRefine((data, ctx) => {
|
|
@@ -3858,19 +3878,19 @@ var simulation_oscilloscope_trace = z177.object({
|
|
|
3858
3878
|
].filter(hasValue).length;
|
|
3859
3879
|
if (voltageReferences + currentReferences !== 1) {
|
|
3860
3880
|
ctx.addIssue({
|
|
3861
|
-
code:
|
|
3881
|
+
code: z178.ZodIssueCode.custom,
|
|
3862
3882
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
3863
3883
|
});
|
|
3864
3884
|
}
|
|
3865
3885
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
3866
3886
|
ctx.addIssue({
|
|
3867
|
-
code:
|
|
3887
|
+
code: z178.ZodIssueCode.custom,
|
|
3868
3888
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
3869
3889
|
});
|
|
3870
3890
|
}
|
|
3871
3891
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
3872
3892
|
ctx.addIssue({
|
|
3873
|
-
code:
|
|
3893
|
+
code: z178.ZodIssueCode.custom,
|
|
3874
3894
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
3875
3895
|
});
|
|
3876
3896
|
}
|
|
@@ -3878,8 +3898,8 @@ var simulation_oscilloscope_trace = z177.object({
|
|
|
3878
3898
|
expectTypesMatch(true);
|
|
3879
3899
|
|
|
3880
3900
|
// src/any_circuit_element.ts
|
|
3881
|
-
import { z as
|
|
3882
|
-
var any_circuit_element =
|
|
3901
|
+
import { z as z179 } from "zod";
|
|
3902
|
+
var any_circuit_element = z179.union([
|
|
3883
3903
|
source_trace,
|
|
3884
3904
|
source_port,
|
|
3885
3905
|
source_component_internal_connection,
|
|
@@ -3938,6 +3958,7 @@ var any_circuit_element = z178.union([
|
|
|
3938
3958
|
pcb_text,
|
|
3939
3959
|
pcb_trace,
|
|
3940
3960
|
pcb_trace_warning,
|
|
3961
|
+
pcb_trace_too_long_warning,
|
|
3941
3962
|
pcb_via,
|
|
3942
3963
|
pcb_smtpad,
|
|
3943
3964
|
pcb_solder_paste,
|
|
@@ -4155,6 +4176,7 @@ export {
|
|
|
4155
4176
|
pcb_trace_route_point_through_pad,
|
|
4156
4177
|
pcb_trace_route_point_via,
|
|
4157
4178
|
pcb_trace_route_point_wire,
|
|
4179
|
+
pcb_trace_too_long_warning,
|
|
4158
4180
|
pcb_trace_warning,
|
|
4159
4181
|
pcb_via,
|
|
4160
4182
|
pcb_via_clearance_error,
|