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