circuit-json 0.0.467 → 0.0.469
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 +157 -15
- package/dist/index.mjs +824 -789
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -517,9 +517,20 @@ expectTypesMatch(true);
|
|
|
517
517
|
|
|
518
518
|
// src/source/source_simple_connector.ts
|
|
519
519
|
import { z as z32 } from "zod";
|
|
520
|
+
var source_simple_connector_standards = [
|
|
521
|
+
"usb_c",
|
|
522
|
+
"m2",
|
|
523
|
+
"jst_sh",
|
|
524
|
+
"jst_gh",
|
|
525
|
+
"jst_zh",
|
|
526
|
+
"jst_ph",
|
|
527
|
+
"jst_xh",
|
|
528
|
+
"jst_vh"
|
|
529
|
+
];
|
|
520
530
|
var source_simple_connector = source_component_base.extend({
|
|
521
531
|
ftype: z32.literal("simple_connector"),
|
|
522
|
-
standard: z32.enum(
|
|
532
|
+
standard: z32.enum(source_simple_connector_standards).optional(),
|
|
533
|
+
pin_count: z32.number().int().positive().optional()
|
|
523
534
|
});
|
|
524
535
|
expectTypesMatch(true);
|
|
525
536
|
|
|
@@ -879,6 +890,7 @@ var source_trace = z57.object({
|
|
|
879
890
|
subcircuit_id: z57.string().optional(),
|
|
880
891
|
subcircuit_connectivity_map_key: z57.string().optional(),
|
|
881
892
|
max_length: z57.number().optional(),
|
|
893
|
+
max_via_count: z57.number().int().nonnegative().optional(),
|
|
882
894
|
name: z57.string().optional(),
|
|
883
895
|
min_trace_thickness: z57.number().optional(),
|
|
884
896
|
display_name: z57.string().optional()
|
|
@@ -2480,84 +2492,104 @@ var pcb_trace_too_long_warning = z112.object({
|
|
|
2480
2492
|
);
|
|
2481
2493
|
expectTypesMatch(true);
|
|
2482
2494
|
|
|
2483
|
-
// src/pcb/
|
|
2495
|
+
// src/pcb/pcb_trace_too_many_vias_warning.ts
|
|
2484
2496
|
import { z as z113 } from "zod";
|
|
2497
|
+
var pcb_trace_too_many_vias_warning = z113.object({
|
|
2498
|
+
type: z113.literal("pcb_trace_too_many_vias_warning"),
|
|
2499
|
+
pcb_trace_too_many_vias_warning_id: getZodPrefixedIdWithDefault(
|
|
2500
|
+
"pcb_trace_too_many_vias_warning"
|
|
2501
|
+
),
|
|
2502
|
+
warning_type: z113.literal("pcb_trace_too_many_vias_warning").default("pcb_trace_too_many_vias_warning"),
|
|
2503
|
+
message: z113.string(),
|
|
2504
|
+
pcb_trace_id: z113.string(),
|
|
2505
|
+
source_net_id: z113.string().optional(),
|
|
2506
|
+
source_trace_id: z113.string().optional(),
|
|
2507
|
+
actual_via_count: z113.number().int().nonnegative(),
|
|
2508
|
+
maximum_via_count: z113.number().int().nonnegative(),
|
|
2509
|
+
subcircuit_id: z113.string().optional()
|
|
2510
|
+
}).describe(
|
|
2511
|
+
"Warning emitted when a PCB trace has more vias than its maximum allowed count"
|
|
2512
|
+
);
|
|
2513
|
+
expectTypesMatch(true);
|
|
2514
|
+
|
|
2515
|
+
// src/pcb/pcb_trace_error.ts
|
|
2516
|
+
import { z as z114 } from "zod";
|
|
2485
2517
|
var pcb_trace_error = base_circuit_json_error.extend({
|
|
2486
|
-
type:
|
|
2518
|
+
type: z114.literal("pcb_trace_error"),
|
|
2487
2519
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
2488
|
-
error_type:
|
|
2520
|
+
error_type: z114.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
2489
2521
|
center: point.optional(),
|
|
2490
|
-
pcb_trace_id:
|
|
2491
|
-
source_trace_id:
|
|
2492
|
-
pcb_component_ids:
|
|
2493
|
-
pcb_port_ids:
|
|
2494
|
-
subcircuit_id:
|
|
2522
|
+
pcb_trace_id: z114.string(),
|
|
2523
|
+
source_trace_id: z114.string(),
|
|
2524
|
+
pcb_component_ids: z114.array(z114.string()),
|
|
2525
|
+
pcb_port_ids: z114.array(z114.string()),
|
|
2526
|
+
subcircuit_id: z114.string().optional()
|
|
2495
2527
|
}).describe("Defines a trace error on the PCB");
|
|
2496
2528
|
expectTypesMatch(true);
|
|
2497
2529
|
|
|
2498
2530
|
// src/pcb/pcb_trace_missing_error.ts
|
|
2499
|
-
import { z as
|
|
2531
|
+
import { z as z115 } from "zod";
|
|
2500
2532
|
var pcb_trace_missing_error = base_circuit_json_error.extend({
|
|
2501
|
-
type:
|
|
2533
|
+
type: z115.literal("pcb_trace_missing_error"),
|
|
2502
2534
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
2503
2535
|
"pcb_trace_missing_error"
|
|
2504
2536
|
),
|
|
2505
|
-
error_type:
|
|
2537
|
+
error_type: z115.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
2506
2538
|
center: point.optional(),
|
|
2507
|
-
source_trace_id:
|
|
2508
|
-
pcb_component_ids:
|
|
2509
|
-
pcb_port_ids:
|
|
2510
|
-
subcircuit_id:
|
|
2539
|
+
source_trace_id: z115.string(),
|
|
2540
|
+
pcb_component_ids: z115.array(z115.string()),
|
|
2541
|
+
pcb_port_ids: z115.array(z115.string()),
|
|
2542
|
+
subcircuit_id: z115.string().optional()
|
|
2511
2543
|
}).describe(
|
|
2512
2544
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
2513
2545
|
);
|
|
2514
2546
|
expectTypesMatch(true);
|
|
2515
2547
|
|
|
2516
2548
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
2517
|
-
import { z as
|
|
2549
|
+
import { z as z116 } from "zod";
|
|
2518
2550
|
var pcb_port_not_matched_error = base_circuit_json_error.extend({
|
|
2519
|
-
type:
|
|
2551
|
+
type: z116.literal("pcb_port_not_matched_error"),
|
|
2520
2552
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2521
|
-
error_type:
|
|
2522
|
-
pcb_component_ids:
|
|
2523
|
-
subcircuit_id:
|
|
2553
|
+
error_type: z116.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
2554
|
+
pcb_component_ids: z116.array(z116.string()),
|
|
2555
|
+
subcircuit_id: z116.string().optional()
|
|
2524
2556
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
2525
2557
|
expectTypesMatch(true);
|
|
2526
2558
|
|
|
2527
2559
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
2528
|
-
import { z as
|
|
2560
|
+
import { z as z117 } from "zod";
|
|
2529
2561
|
var pcb_port_not_connected_error = base_circuit_json_error.extend({
|
|
2530
|
-
type:
|
|
2562
|
+
type: z117.literal("pcb_port_not_connected_error"),
|
|
2531
2563
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
2532
2564
|
"pcb_port_not_connected_error"
|
|
2533
2565
|
),
|
|
2534
|
-
error_type:
|
|
2535
|
-
pcb_port_ids:
|
|
2536
|
-
pcb_component_ids:
|
|
2537
|
-
subcircuit_id:
|
|
2566
|
+
error_type: z117.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
2567
|
+
pcb_port_ids: z117.array(z117.string()),
|
|
2568
|
+
pcb_component_ids: z117.array(z117.string()),
|
|
2569
|
+
subcircuit_id: z117.string().optional()
|
|
2538
2570
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
2539
2571
|
expectTypesMatch(
|
|
2540
2572
|
true
|
|
2541
2573
|
);
|
|
2542
2574
|
|
|
2543
2575
|
// src/pcb/pcb_net.ts
|
|
2544
|
-
import { z as
|
|
2545
|
-
var pcb_net =
|
|
2546
|
-
type:
|
|
2576
|
+
import { z as z118 } from "zod";
|
|
2577
|
+
var pcb_net = z118.object({
|
|
2578
|
+
type: z118.literal("pcb_net"),
|
|
2547
2579
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
2548
|
-
source_net_id:
|
|
2549
|
-
highlight_color:
|
|
2580
|
+
source_net_id: z118.string().optional(),
|
|
2581
|
+
highlight_color: z118.string().optional()
|
|
2550
2582
|
}).describe("Defines a net on the PCB");
|
|
2551
2583
|
expectTypesMatch(true);
|
|
2552
2584
|
|
|
2553
2585
|
// src/pcb/pcb_via.ts
|
|
2554
|
-
import { z as
|
|
2555
|
-
var pcb_via =
|
|
2556
|
-
type:
|
|
2586
|
+
import { z as z119 } from "zod";
|
|
2587
|
+
var pcb_via = z119.object({
|
|
2588
|
+
type: z119.literal("pcb_via"),
|
|
2557
2589
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
2558
|
-
pcb_group_id:
|
|
2559
|
-
subcircuit_id:
|
|
2560
|
-
subcircuit_connectivity_map_key:
|
|
2590
|
+
pcb_group_id: z119.string().optional(),
|
|
2591
|
+
subcircuit_id: z119.string().optional(),
|
|
2592
|
+
subcircuit_connectivity_map_key: z119.string().optional(),
|
|
2561
2593
|
x: distance,
|
|
2562
2594
|
y: distance,
|
|
2563
2595
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -2566,117 +2598,117 @@ var pcb_via = z118.object({
|
|
|
2566
2598
|
from_layer: layer_ref.optional(),
|
|
2567
2599
|
/** @deprecated */
|
|
2568
2600
|
to_layer: layer_ref.optional(),
|
|
2569
|
-
layers:
|
|
2570
|
-
pcb_trace_id:
|
|
2571
|
-
source_trace_id:
|
|
2572
|
-
source_net_id:
|
|
2573
|
-
net_is_assignable:
|
|
2574
|
-
net_assigned:
|
|
2575
|
-
is_tented:
|
|
2601
|
+
layers: z119.array(layer_ref),
|
|
2602
|
+
pcb_trace_id: z119.string().optional(),
|
|
2603
|
+
source_trace_id: z119.string().optional(),
|
|
2604
|
+
source_net_id: z119.string().min(1).optional(),
|
|
2605
|
+
net_is_assignable: z119.boolean().optional(),
|
|
2606
|
+
net_assigned: z119.boolean().optional(),
|
|
2607
|
+
is_tented: z119.boolean().optional()
|
|
2576
2608
|
}).describe("Defines a via on the PCB");
|
|
2577
2609
|
expectTypesMatch(true);
|
|
2578
2610
|
|
|
2579
2611
|
// src/pcb/pcb_board.ts
|
|
2580
|
-
import { z as
|
|
2581
|
-
var pcb_board =
|
|
2582
|
-
type:
|
|
2612
|
+
import { z as z120 } from "zod";
|
|
2613
|
+
var pcb_board = z120.object({
|
|
2614
|
+
type: z120.literal("pcb_board"),
|
|
2583
2615
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
2584
|
-
pcb_panel_id:
|
|
2585
|
-
carrier_pcb_board_id:
|
|
2586
|
-
is_subcircuit:
|
|
2587
|
-
subcircuit_id:
|
|
2588
|
-
is_mounted_to_carrier_board:
|
|
2589
|
-
is_via_in_pad_allowed:
|
|
2616
|
+
pcb_panel_id: z120.string().optional(),
|
|
2617
|
+
carrier_pcb_board_id: z120.string().optional(),
|
|
2618
|
+
is_subcircuit: z120.boolean().optional(),
|
|
2619
|
+
subcircuit_id: z120.string().optional(),
|
|
2620
|
+
is_mounted_to_carrier_board: z120.boolean().optional(),
|
|
2621
|
+
is_via_in_pad_allowed: z120.boolean().optional(),
|
|
2590
2622
|
width: length.optional(),
|
|
2591
2623
|
height: length.optional(),
|
|
2592
2624
|
center: point,
|
|
2593
|
-
display_offset_x:
|
|
2625
|
+
display_offset_x: z120.string().optional().describe(
|
|
2594
2626
|
"How to display the x offset for this board, usually corresponding with how the user specified it"
|
|
2595
2627
|
),
|
|
2596
|
-
display_offset_y:
|
|
2628
|
+
display_offset_y: z120.string().optional().describe(
|
|
2597
2629
|
"How to display the y offset for this board, usually corresponding with how the user specified it"
|
|
2598
2630
|
),
|
|
2599
2631
|
thickness: length.optional().default(1.4),
|
|
2600
|
-
num_layers:
|
|
2601
|
-
outline:
|
|
2602
|
-
shape:
|
|
2603
|
-
material:
|
|
2604
|
-
solder_mask_color:
|
|
2605
|
-
silkscreen_color:
|
|
2632
|
+
num_layers: z120.number().optional().default(4),
|
|
2633
|
+
outline: z120.array(point).optional(),
|
|
2634
|
+
shape: z120.enum(["rect", "polygon"]).optional(),
|
|
2635
|
+
material: z120.enum(["fr4", "fr1"]).default("fr4"),
|
|
2636
|
+
solder_mask_color: z120.string().optional(),
|
|
2637
|
+
silkscreen_color: z120.string().optional(),
|
|
2606
2638
|
anchor_position: point.optional(),
|
|
2607
2639
|
anchor_alignment: ninePointAnchor.optional(),
|
|
2608
|
-
position_mode:
|
|
2640
|
+
position_mode: z120.enum(["relative_to_panel_anchor", "none"]).optional()
|
|
2609
2641
|
}).merge(manufacturing_drc_properties).describe("Defines the board outline of the PCB");
|
|
2610
2642
|
expectTypesMatch(true);
|
|
2611
2643
|
|
|
2612
2644
|
// src/pcb/pcb_panel.ts
|
|
2613
|
-
import { z as
|
|
2614
|
-
var pcb_panel =
|
|
2615
|
-
type:
|
|
2645
|
+
import { z as z121 } from "zod";
|
|
2646
|
+
var pcb_panel = z121.object({
|
|
2647
|
+
type: z121.literal("pcb_panel"),
|
|
2616
2648
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
2617
2649
|
width: length,
|
|
2618
2650
|
height: length,
|
|
2619
2651
|
center: point,
|
|
2620
2652
|
thickness: length.optional().default(1.4),
|
|
2621
|
-
covered_with_solder_mask:
|
|
2653
|
+
covered_with_solder_mask: z121.boolean().optional().default(true)
|
|
2622
2654
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
2623
2655
|
expectTypesMatch(true);
|
|
2624
2656
|
|
|
2625
2657
|
// src/pcb/pcb_placement_error.ts
|
|
2626
|
-
import { z as
|
|
2658
|
+
import { z as z122 } from "zod";
|
|
2627
2659
|
var pcb_placement_error = base_circuit_json_error.extend({
|
|
2628
|
-
type:
|
|
2660
|
+
type: z122.literal("pcb_placement_error"),
|
|
2629
2661
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
2630
|
-
error_type:
|
|
2631
|
-
subcircuit_id:
|
|
2662
|
+
error_type: z122.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
2663
|
+
subcircuit_id: z122.string().optional()
|
|
2632
2664
|
}).describe("Defines a placement error on the PCB");
|
|
2633
2665
|
expectTypesMatch(true);
|
|
2634
2666
|
|
|
2635
2667
|
// src/pcb/pcb_packing_error.ts
|
|
2636
|
-
import { z as
|
|
2668
|
+
import { z as z123 } from "zod";
|
|
2637
2669
|
var pcb_packing_error = base_circuit_json_error.extend({
|
|
2638
|
-
type:
|
|
2670
|
+
type: z123.literal("pcb_packing_error"),
|
|
2639
2671
|
pcb_packing_error_id: getZodPrefixedIdWithDefault("pcb_packing_error"),
|
|
2640
|
-
error_type:
|
|
2641
|
-
pcb_group_id:
|
|
2642
|
-
subcircuit_id:
|
|
2672
|
+
error_type: z123.literal("pcb_packing_error").default("pcb_packing_error"),
|
|
2673
|
+
pcb_group_id: z123.string().optional(),
|
|
2674
|
+
subcircuit_id: z123.string().optional()
|
|
2643
2675
|
}).describe("Defines a failure to pack PCB components within layout bounds");
|
|
2644
2676
|
expectTypesMatch(true);
|
|
2645
2677
|
|
|
2646
2678
|
// src/pcb/pcb_panelization_placement_error.ts
|
|
2647
|
-
import { z as
|
|
2679
|
+
import { z as z124 } from "zod";
|
|
2648
2680
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
2649
|
-
type:
|
|
2681
|
+
type: z124.literal("pcb_panelization_placement_error"),
|
|
2650
2682
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
2651
2683
|
"pcb_panelization_placement_error"
|
|
2652
2684
|
),
|
|
2653
|
-
error_type:
|
|
2654
|
-
pcb_panel_id:
|
|
2655
|
-
pcb_board_id:
|
|
2656
|
-
subcircuit_id:
|
|
2685
|
+
error_type: z124.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
|
|
2686
|
+
pcb_panel_id: z124.string().optional(),
|
|
2687
|
+
pcb_board_id: z124.string().optional(),
|
|
2688
|
+
subcircuit_id: z124.string().optional()
|
|
2657
2689
|
}).describe("Defines a panelization placement error on the PCB");
|
|
2658
2690
|
expectTypesMatch(true);
|
|
2659
2691
|
|
|
2660
2692
|
// src/pcb/pcb_trace_hint.ts
|
|
2661
|
-
import { z as
|
|
2662
|
-
var pcb_trace_hint =
|
|
2663
|
-
type:
|
|
2693
|
+
import { z as z125 } from "zod";
|
|
2694
|
+
var pcb_trace_hint = z125.object({
|
|
2695
|
+
type: z125.literal("pcb_trace_hint"),
|
|
2664
2696
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
2665
|
-
pcb_port_id:
|
|
2666
|
-
pcb_component_id:
|
|
2667
|
-
route:
|
|
2668
|
-
subcircuit_id:
|
|
2697
|
+
pcb_port_id: z125.string(),
|
|
2698
|
+
pcb_component_id: z125.string(),
|
|
2699
|
+
route: z125.array(route_hint_point),
|
|
2700
|
+
subcircuit_id: z125.string().optional()
|
|
2669
2701
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
2670
2702
|
expectTypesMatch(true);
|
|
2671
2703
|
|
|
2672
2704
|
// src/pcb/pcb_silkscreen_line.ts
|
|
2673
|
-
import { z as
|
|
2674
|
-
var pcb_silkscreen_line =
|
|
2675
|
-
type:
|
|
2705
|
+
import { z as z126 } from "zod";
|
|
2706
|
+
var pcb_silkscreen_line = z126.object({
|
|
2707
|
+
type: z126.literal("pcb_silkscreen_line"),
|
|
2676
2708
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
2677
|
-
pcb_component_id:
|
|
2678
|
-
pcb_group_id:
|
|
2679
|
-
subcircuit_id:
|
|
2709
|
+
pcb_component_id: z126.string(),
|
|
2710
|
+
pcb_group_id: z126.string().optional(),
|
|
2711
|
+
subcircuit_id: z126.string().optional(),
|
|
2680
2712
|
stroke_width: distance.default("0.1mm"),
|
|
2681
2713
|
x1: distance,
|
|
2682
2714
|
y1: distance,
|
|
@@ -2687,32 +2719,32 @@ var pcb_silkscreen_line = z125.object({
|
|
|
2687
2719
|
expectTypesMatch(true);
|
|
2688
2720
|
|
|
2689
2721
|
// src/pcb/pcb_silkscreen_path.ts
|
|
2690
|
-
import { z as
|
|
2691
|
-
var pcb_silkscreen_path =
|
|
2692
|
-
type:
|
|
2722
|
+
import { z as z127 } from "zod";
|
|
2723
|
+
var pcb_silkscreen_path = z127.object({
|
|
2724
|
+
type: z127.literal("pcb_silkscreen_path"),
|
|
2693
2725
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
2694
|
-
pcb_component_id:
|
|
2695
|
-
pcb_group_id:
|
|
2696
|
-
subcircuit_id:
|
|
2726
|
+
pcb_component_id: z127.string(),
|
|
2727
|
+
pcb_group_id: z127.string().optional(),
|
|
2728
|
+
subcircuit_id: z127.string().optional(),
|
|
2697
2729
|
layer: visible_layer,
|
|
2698
|
-
route:
|
|
2730
|
+
route: z127.array(point),
|
|
2699
2731
|
stroke_width: length
|
|
2700
2732
|
}).describe("Defines a silkscreen path on the PCB");
|
|
2701
2733
|
expectTypesMatch(true);
|
|
2702
2734
|
|
|
2703
2735
|
// src/pcb/pcb_silkscreen_text.ts
|
|
2704
|
-
import { z as
|
|
2705
|
-
var pcb_silkscreen_text =
|
|
2706
|
-
type:
|
|
2736
|
+
import { z as z128 } from "zod";
|
|
2737
|
+
var pcb_silkscreen_text = z128.object({
|
|
2738
|
+
type: z128.literal("pcb_silkscreen_text"),
|
|
2707
2739
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
2708
|
-
pcb_group_id:
|
|
2709
|
-
subcircuit_id:
|
|
2710
|
-
font:
|
|
2740
|
+
pcb_group_id: z128.string().optional(),
|
|
2741
|
+
subcircuit_id: z128.string().optional(),
|
|
2742
|
+
font: z128.literal("tscircuit2024").default("tscircuit2024"),
|
|
2711
2743
|
font_size: distance.default("0.2mm"),
|
|
2712
|
-
pcb_component_id:
|
|
2713
|
-
text:
|
|
2714
|
-
is_knockout:
|
|
2715
|
-
knockout_padding:
|
|
2744
|
+
pcb_component_id: z128.string(),
|
|
2745
|
+
text: z128.string(),
|
|
2746
|
+
is_knockout: z128.boolean().default(false).optional(),
|
|
2747
|
+
knockout_padding: z128.object({
|
|
2716
2748
|
left: length,
|
|
2717
2749
|
top: length,
|
|
2718
2750
|
bottom: length,
|
|
@@ -2723,27 +2755,27 @@ var pcb_silkscreen_text = z127.object({
|
|
|
2723
2755
|
bottom: "0.2mm",
|
|
2724
2756
|
right: "0.2mm"
|
|
2725
2757
|
}).optional(),
|
|
2726
|
-
ccw_rotation:
|
|
2758
|
+
ccw_rotation: z128.number().optional(),
|
|
2727
2759
|
layer: layer_ref,
|
|
2728
|
-
is_mirrored:
|
|
2760
|
+
is_mirrored: z128.boolean().default(false).optional(),
|
|
2729
2761
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2730
2762
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2731
2763
|
}).describe("Defines silkscreen text on the PCB");
|
|
2732
2764
|
expectTypesMatch(true);
|
|
2733
2765
|
|
|
2734
2766
|
// src/pcb/pcb_copper_text.ts
|
|
2735
|
-
import { z as
|
|
2736
|
-
var pcb_copper_text =
|
|
2737
|
-
type:
|
|
2767
|
+
import { z as z129 } from "zod";
|
|
2768
|
+
var pcb_copper_text = z129.object({
|
|
2769
|
+
type: z129.literal("pcb_copper_text"),
|
|
2738
2770
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2739
|
-
pcb_group_id:
|
|
2740
|
-
subcircuit_id:
|
|
2741
|
-
font:
|
|
2771
|
+
pcb_group_id: z129.string().optional(),
|
|
2772
|
+
subcircuit_id: z129.string().optional(),
|
|
2773
|
+
font: z129.literal("tscircuit2024").default("tscircuit2024"),
|
|
2742
2774
|
font_size: distance.default("0.2mm"),
|
|
2743
|
-
pcb_component_id:
|
|
2744
|
-
text:
|
|
2745
|
-
is_knockout:
|
|
2746
|
-
knockout_padding:
|
|
2775
|
+
pcb_component_id: z129.string(),
|
|
2776
|
+
text: z129.string(),
|
|
2777
|
+
is_knockout: z129.boolean().default(false).optional(),
|
|
2778
|
+
knockout_padding: z129.object({
|
|
2747
2779
|
left: length,
|
|
2748
2780
|
top: length,
|
|
2749
2781
|
bottom: length,
|
|
@@ -2754,61 +2786,61 @@ var pcb_copper_text = z128.object({
|
|
|
2754
2786
|
bottom: "0.2mm",
|
|
2755
2787
|
right: "0.2mm"
|
|
2756
2788
|
}).optional(),
|
|
2757
|
-
ccw_rotation:
|
|
2789
|
+
ccw_rotation: z129.number().optional(),
|
|
2758
2790
|
layer: layer_ref,
|
|
2759
|
-
is_mirrored:
|
|
2791
|
+
is_mirrored: z129.boolean().default(false).optional(),
|
|
2760
2792
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2761
2793
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2762
2794
|
}).describe("Defines copper text on the PCB");
|
|
2763
2795
|
expectTypesMatch(true);
|
|
2764
2796
|
|
|
2765
2797
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
2766
|
-
import { z as
|
|
2767
|
-
var pcb_silkscreen_rect =
|
|
2768
|
-
type:
|
|
2798
|
+
import { z as z130 } from "zod";
|
|
2799
|
+
var pcb_silkscreen_rect = z130.object({
|
|
2800
|
+
type: z130.literal("pcb_silkscreen_rect"),
|
|
2769
2801
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2770
|
-
pcb_component_id:
|
|
2771
|
-
pcb_group_id:
|
|
2772
|
-
subcircuit_id:
|
|
2802
|
+
pcb_component_id: z130.string(),
|
|
2803
|
+
pcb_group_id: z130.string().optional(),
|
|
2804
|
+
subcircuit_id: z130.string().optional(),
|
|
2773
2805
|
center: point,
|
|
2774
2806
|
width: length,
|
|
2775
2807
|
height: length,
|
|
2776
2808
|
layer: layer_ref,
|
|
2777
2809
|
stroke_width: length.default("1mm"),
|
|
2778
2810
|
corner_radius: length.optional(),
|
|
2779
|
-
is_filled:
|
|
2780
|
-
has_stroke:
|
|
2781
|
-
is_stroke_dashed:
|
|
2782
|
-
ccw_rotation:
|
|
2811
|
+
is_filled: z130.boolean().default(true).optional(),
|
|
2812
|
+
has_stroke: z130.boolean().optional(),
|
|
2813
|
+
is_stroke_dashed: z130.boolean().optional(),
|
|
2814
|
+
ccw_rotation: z130.number().optional()
|
|
2783
2815
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2784
2816
|
expectTypesMatch(true);
|
|
2785
2817
|
|
|
2786
2818
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
2787
|
-
import { z as
|
|
2788
|
-
var pcb_silkscreen_circle =
|
|
2789
|
-
type:
|
|
2819
|
+
import { z as z131 } from "zod";
|
|
2820
|
+
var pcb_silkscreen_circle = z131.object({
|
|
2821
|
+
type: z131.literal("pcb_silkscreen_circle"),
|
|
2790
2822
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2791
2823
|
"pcb_silkscreen_circle"
|
|
2792
2824
|
),
|
|
2793
|
-
pcb_component_id:
|
|
2794
|
-
pcb_group_id:
|
|
2795
|
-
subcircuit_id:
|
|
2825
|
+
pcb_component_id: z131.string(),
|
|
2826
|
+
pcb_group_id: z131.string().optional(),
|
|
2827
|
+
subcircuit_id: z131.string().optional(),
|
|
2796
2828
|
center: point,
|
|
2797
2829
|
radius: length,
|
|
2798
2830
|
layer: visible_layer,
|
|
2799
2831
|
stroke_width: length.default("1mm"),
|
|
2800
|
-
is_filled:
|
|
2832
|
+
is_filled: z131.boolean().optional()
|
|
2801
2833
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
2802
2834
|
expectTypesMatch(true);
|
|
2803
2835
|
|
|
2804
2836
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
2805
|
-
import { z as
|
|
2806
|
-
var pcb_silkscreen_oval =
|
|
2807
|
-
type:
|
|
2837
|
+
import { z as z132 } from "zod";
|
|
2838
|
+
var pcb_silkscreen_oval = z132.object({
|
|
2839
|
+
type: z132.literal("pcb_silkscreen_oval"),
|
|
2808
2840
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
2809
|
-
pcb_component_id:
|
|
2810
|
-
pcb_group_id:
|
|
2811
|
-
subcircuit_id:
|
|
2841
|
+
pcb_component_id: z132.string(),
|
|
2842
|
+
pcb_group_id: z132.string().optional(),
|
|
2843
|
+
subcircuit_id: z132.string().optional(),
|
|
2812
2844
|
center: point,
|
|
2813
2845
|
radius_x: distance,
|
|
2814
2846
|
radius_y: distance,
|
|
@@ -2818,265 +2850,265 @@ var pcb_silkscreen_oval = z131.object({
|
|
|
2818
2850
|
expectTypesMatch(true);
|
|
2819
2851
|
|
|
2820
2852
|
// src/pcb/pcb_silkscreen_graphic.ts
|
|
2821
|
-
import { z as
|
|
2822
|
-
var pcb_silkscreen_graphic_base =
|
|
2823
|
-
type:
|
|
2853
|
+
import { z as z133 } from "zod";
|
|
2854
|
+
var pcb_silkscreen_graphic_base = z133.object({
|
|
2855
|
+
type: z133.literal("pcb_silkscreen_graphic"),
|
|
2824
2856
|
pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
|
|
2825
2857
|
"pcb_silkscreen_graphic"
|
|
2826
2858
|
),
|
|
2827
|
-
pcb_component_id:
|
|
2828
|
-
pcb_group_id:
|
|
2829
|
-
subcircuit_id:
|
|
2859
|
+
pcb_component_id: z133.string(),
|
|
2860
|
+
pcb_group_id: z133.string().optional(),
|
|
2861
|
+
subcircuit_id: z133.string().optional(),
|
|
2830
2862
|
layer: visible_layer,
|
|
2831
2863
|
image_asset: asset.optional()
|
|
2832
2864
|
});
|
|
2833
2865
|
var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
|
|
2834
|
-
shape:
|
|
2866
|
+
shape: z133.literal("brep"),
|
|
2835
2867
|
brep_shape
|
|
2836
2868
|
}).describe("Defines a BRep silkscreen graphic on the PCB");
|
|
2837
2869
|
expectTypesMatch(
|
|
2838
2870
|
true
|
|
2839
2871
|
);
|
|
2840
|
-
var pcb_silkscreen_graphic =
|
|
2872
|
+
var pcb_silkscreen_graphic = z133.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
|
|
2841
2873
|
expectTypesMatch(true);
|
|
2842
2874
|
|
|
2843
2875
|
// src/pcb/pcb_silkscreen_pill.ts
|
|
2844
|
-
import { z as
|
|
2845
|
-
var pcb_silkscreen_pill =
|
|
2846
|
-
type:
|
|
2876
|
+
import { z as z134 } from "zod";
|
|
2877
|
+
var pcb_silkscreen_pill = z134.object({
|
|
2878
|
+
type: z134.literal("pcb_silkscreen_pill"),
|
|
2847
2879
|
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
2848
|
-
pcb_component_id:
|
|
2849
|
-
pcb_group_id:
|
|
2850
|
-
subcircuit_id:
|
|
2880
|
+
pcb_component_id: z134.string(),
|
|
2881
|
+
pcb_group_id: z134.string().optional(),
|
|
2882
|
+
subcircuit_id: z134.string().optional(),
|
|
2851
2883
|
center: point,
|
|
2852
2884
|
width: length,
|
|
2853
2885
|
height: length,
|
|
2854
2886
|
layer: layer_ref,
|
|
2855
|
-
ccw_rotation:
|
|
2887
|
+
ccw_rotation: z134.number().optional()
|
|
2856
2888
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
2857
2889
|
expectTypesMatch(true);
|
|
2858
2890
|
|
|
2859
2891
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
2860
|
-
import { z as
|
|
2861
|
-
var pcb_fabrication_note_text =
|
|
2862
|
-
type:
|
|
2892
|
+
import { z as z135 } from "zod";
|
|
2893
|
+
var pcb_fabrication_note_text = z135.object({
|
|
2894
|
+
type: z135.literal("pcb_fabrication_note_text"),
|
|
2863
2895
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2864
2896
|
"pcb_fabrication_note_text"
|
|
2865
2897
|
),
|
|
2866
|
-
subcircuit_id:
|
|
2867
|
-
pcb_group_id:
|
|
2868
|
-
font:
|
|
2898
|
+
subcircuit_id: z135.string().optional(),
|
|
2899
|
+
pcb_group_id: z135.string().optional(),
|
|
2900
|
+
font: z135.literal("tscircuit2024").default("tscircuit2024"),
|
|
2869
2901
|
font_size: distance.default("1mm"),
|
|
2870
|
-
pcb_component_id:
|
|
2871
|
-
text:
|
|
2872
|
-
ccw_rotation:
|
|
2902
|
+
pcb_component_id: z135.string(),
|
|
2903
|
+
text: z135.string(),
|
|
2904
|
+
ccw_rotation: z135.number().optional(),
|
|
2873
2905
|
layer: visible_layer,
|
|
2874
2906
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2875
|
-
anchor_alignment:
|
|
2876
|
-
color:
|
|
2907
|
+
anchor_alignment: z135.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2908
|
+
color: z135.string().optional()
|
|
2877
2909
|
}).describe(
|
|
2878
2910
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2879
2911
|
);
|
|
2880
2912
|
expectTypesMatch(true);
|
|
2881
2913
|
|
|
2882
2914
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
2883
|
-
import { z as
|
|
2884
|
-
var pcb_fabrication_note_path =
|
|
2885
|
-
type:
|
|
2915
|
+
import { z as z136 } from "zod";
|
|
2916
|
+
var pcb_fabrication_note_path = z136.object({
|
|
2917
|
+
type: z136.literal("pcb_fabrication_note_path"),
|
|
2886
2918
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
2887
2919
|
"pcb_fabrication_note_path"
|
|
2888
2920
|
),
|
|
2889
|
-
pcb_component_id:
|
|
2890
|
-
subcircuit_id:
|
|
2921
|
+
pcb_component_id: z136.string(),
|
|
2922
|
+
subcircuit_id: z136.string().optional(),
|
|
2891
2923
|
layer: layer_ref,
|
|
2892
|
-
route:
|
|
2924
|
+
route: z136.array(point),
|
|
2893
2925
|
stroke_width: length,
|
|
2894
|
-
color:
|
|
2926
|
+
color: z136.string().optional()
|
|
2895
2927
|
}).describe(
|
|
2896
2928
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
2897
2929
|
);
|
|
2898
2930
|
expectTypesMatch(true);
|
|
2899
2931
|
|
|
2900
2932
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
2901
|
-
import { z as
|
|
2902
|
-
var pcb_fabrication_note_rect =
|
|
2903
|
-
type:
|
|
2933
|
+
import { z as z137 } from "zod";
|
|
2934
|
+
var pcb_fabrication_note_rect = z137.object({
|
|
2935
|
+
type: z137.literal("pcb_fabrication_note_rect"),
|
|
2904
2936
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
2905
2937
|
"pcb_fabrication_note_rect"
|
|
2906
2938
|
),
|
|
2907
|
-
pcb_component_id:
|
|
2908
|
-
pcb_group_id:
|
|
2909
|
-
subcircuit_id:
|
|
2939
|
+
pcb_component_id: z137.string(),
|
|
2940
|
+
pcb_group_id: z137.string().optional(),
|
|
2941
|
+
subcircuit_id: z137.string().optional(),
|
|
2910
2942
|
center: point,
|
|
2911
2943
|
width: length,
|
|
2912
2944
|
height: length,
|
|
2913
2945
|
layer: visible_layer,
|
|
2914
2946
|
stroke_width: length.default("0.1mm"),
|
|
2915
2947
|
corner_radius: length.optional(),
|
|
2916
|
-
is_filled:
|
|
2917
|
-
has_stroke:
|
|
2918
|
-
is_stroke_dashed:
|
|
2919
|
-
color:
|
|
2948
|
+
is_filled: z137.boolean().optional(),
|
|
2949
|
+
has_stroke: z137.boolean().optional(),
|
|
2950
|
+
is_stroke_dashed: z137.boolean().optional(),
|
|
2951
|
+
color: z137.string().optional()
|
|
2920
2952
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
2921
2953
|
expectTypesMatch(true);
|
|
2922
2954
|
|
|
2923
2955
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
2924
|
-
import { z as
|
|
2925
|
-
var pcb_fabrication_note_dimension =
|
|
2926
|
-
type:
|
|
2956
|
+
import { z as z138 } from "zod";
|
|
2957
|
+
var pcb_fabrication_note_dimension = z138.object({
|
|
2958
|
+
type: z138.literal("pcb_fabrication_note_dimension"),
|
|
2927
2959
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
2928
2960
|
"pcb_fabrication_note_dimension"
|
|
2929
2961
|
),
|
|
2930
|
-
pcb_component_id:
|
|
2931
|
-
pcb_group_id:
|
|
2932
|
-
subcircuit_id:
|
|
2962
|
+
pcb_component_id: z138.string(),
|
|
2963
|
+
pcb_group_id: z138.string().optional(),
|
|
2964
|
+
subcircuit_id: z138.string().optional(),
|
|
2933
2965
|
layer: visible_layer,
|
|
2934
2966
|
from: point,
|
|
2935
2967
|
to: point,
|
|
2936
|
-
text:
|
|
2937
|
-
text_ccw_rotation:
|
|
2968
|
+
text: z138.string().optional(),
|
|
2969
|
+
text_ccw_rotation: z138.number().optional(),
|
|
2938
2970
|
offset: length.optional(),
|
|
2939
2971
|
offset_distance: length.optional(),
|
|
2940
|
-
offset_direction:
|
|
2941
|
-
x:
|
|
2942
|
-
y:
|
|
2972
|
+
offset_direction: z138.object({
|
|
2973
|
+
x: z138.number(),
|
|
2974
|
+
y: z138.number()
|
|
2943
2975
|
}).optional(),
|
|
2944
|
-
font:
|
|
2976
|
+
font: z138.literal("tscircuit2024").default("tscircuit2024"),
|
|
2945
2977
|
font_size: length.default("1mm"),
|
|
2946
|
-
color:
|
|
2978
|
+
color: z138.string().optional(),
|
|
2947
2979
|
arrow_size: length.default("1mm")
|
|
2948
2980
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
2949
2981
|
expectTypesMatch(true);
|
|
2950
2982
|
|
|
2951
2983
|
// src/pcb/pcb_note_text.ts
|
|
2952
|
-
import { z as z138 } from "zod";
|
|
2953
|
-
var pcb_note_text = z138.object({
|
|
2954
|
-
type: z138.literal("pcb_note_text"),
|
|
2955
|
-
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2956
|
-
pcb_component_id: z138.string().optional(),
|
|
2957
|
-
pcb_group_id: z138.string().optional(),
|
|
2958
|
-
subcircuit_id: z138.string().optional(),
|
|
2959
|
-
name: z138.string().optional(),
|
|
2960
|
-
font: z138.literal("tscircuit2024").default("tscircuit2024"),
|
|
2961
|
-
font_size: distance.default("1mm"),
|
|
2962
|
-
text: z138.string().optional(),
|
|
2963
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2964
|
-
anchor_alignment: z138.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2965
|
-
layer: visible_layer.default("top"),
|
|
2966
|
-
is_mirrored_from_top_view: z138.boolean().optional(),
|
|
2967
|
-
color: z138.string().optional()
|
|
2968
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
2969
|
-
expectTypesMatch(true);
|
|
2970
|
-
|
|
2971
|
-
// src/pcb/pcb_note_rect.ts
|
|
2972
2984
|
import { z as z139 } from "zod";
|
|
2973
|
-
var
|
|
2974
|
-
type: z139.literal("
|
|
2975
|
-
|
|
2985
|
+
var pcb_note_text = z139.object({
|
|
2986
|
+
type: z139.literal("pcb_note_text"),
|
|
2987
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
2976
2988
|
pcb_component_id: z139.string().optional(),
|
|
2977
2989
|
pcb_group_id: z139.string().optional(),
|
|
2978
2990
|
subcircuit_id: z139.string().optional(),
|
|
2979
2991
|
name: z139.string().optional(),
|
|
2992
|
+
font: z139.literal("tscircuit2024").default("tscircuit2024"),
|
|
2993
|
+
font_size: distance.default("1mm"),
|
|
2980
2994
|
text: z139.string().optional(),
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
height: length,
|
|
2995
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2996
|
+
anchor_alignment: z139.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
2984
2997
|
layer: visible_layer.default("top"),
|
|
2985
|
-
|
|
2986
|
-
corner_radius: length.optional(),
|
|
2987
|
-
is_filled: z139.boolean().optional(),
|
|
2988
|
-
has_stroke: z139.boolean().optional(),
|
|
2989
|
-
is_stroke_dashed: z139.boolean().optional(),
|
|
2998
|
+
is_mirrored_from_top_view: z139.boolean().optional(),
|
|
2990
2999
|
color: z139.string().optional()
|
|
2991
|
-
}).describe("Defines a
|
|
3000
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
2992
3001
|
expectTypesMatch(true);
|
|
2993
3002
|
|
|
2994
|
-
// src/pcb/
|
|
3003
|
+
// src/pcb/pcb_note_rect.ts
|
|
2995
3004
|
import { z as z140 } from "zod";
|
|
2996
|
-
var
|
|
2997
|
-
type: z140.literal("
|
|
2998
|
-
|
|
3005
|
+
var pcb_note_rect = z140.object({
|
|
3006
|
+
type: z140.literal("pcb_note_rect"),
|
|
3007
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
2999
3008
|
pcb_component_id: z140.string().optional(),
|
|
3000
3009
|
pcb_group_id: z140.string().optional(),
|
|
3001
3010
|
subcircuit_id: z140.string().optional(),
|
|
3002
3011
|
name: z140.string().optional(),
|
|
3003
3012
|
text: z140.string().optional(),
|
|
3004
|
-
|
|
3013
|
+
center: point,
|
|
3014
|
+
width: length,
|
|
3015
|
+
height: length,
|
|
3005
3016
|
layer: visible_layer.default("top"),
|
|
3006
3017
|
stroke_width: length.default("0.1mm"),
|
|
3018
|
+
corner_radius: length.optional(),
|
|
3019
|
+
is_filled: z140.boolean().optional(),
|
|
3020
|
+
has_stroke: z140.boolean().optional(),
|
|
3021
|
+
is_stroke_dashed: z140.boolean().optional(),
|
|
3007
3022
|
color: z140.string().optional()
|
|
3008
|
-
}).describe("Defines a
|
|
3023
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
3009
3024
|
expectTypesMatch(true);
|
|
3010
3025
|
|
|
3011
|
-
// src/pcb/
|
|
3026
|
+
// src/pcb/pcb_note_path.ts
|
|
3012
3027
|
import { z as z141 } from "zod";
|
|
3013
|
-
var
|
|
3014
|
-
type: z141.literal("
|
|
3015
|
-
|
|
3028
|
+
var pcb_note_path = z141.object({
|
|
3029
|
+
type: z141.literal("pcb_note_path"),
|
|
3030
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
3016
3031
|
pcb_component_id: z141.string().optional(),
|
|
3017
3032
|
pcb_group_id: z141.string().optional(),
|
|
3018
3033
|
subcircuit_id: z141.string().optional(),
|
|
3019
3034
|
name: z141.string().optional(),
|
|
3020
3035
|
text: z141.string().optional(),
|
|
3036
|
+
route: z141.array(point),
|
|
3037
|
+
layer: visible_layer.default("top"),
|
|
3038
|
+
stroke_width: length.default("0.1mm"),
|
|
3039
|
+
color: z141.string().optional()
|
|
3040
|
+
}).describe("Defines a polyline documentation note on the PCB");
|
|
3041
|
+
expectTypesMatch(true);
|
|
3042
|
+
|
|
3043
|
+
// src/pcb/pcb_note_line.ts
|
|
3044
|
+
import { z as z142 } from "zod";
|
|
3045
|
+
var pcb_note_line = z142.object({
|
|
3046
|
+
type: z142.literal("pcb_note_line"),
|
|
3047
|
+
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
3048
|
+
pcb_component_id: z142.string().optional(),
|
|
3049
|
+
pcb_group_id: z142.string().optional(),
|
|
3050
|
+
subcircuit_id: z142.string().optional(),
|
|
3051
|
+
name: z142.string().optional(),
|
|
3052
|
+
text: z142.string().optional(),
|
|
3021
3053
|
x1: distance,
|
|
3022
3054
|
y1: distance,
|
|
3023
3055
|
x2: distance,
|
|
3024
3056
|
y2: distance,
|
|
3025
3057
|
layer: visible_layer.default("top"),
|
|
3026
3058
|
stroke_width: distance.default("0.1mm"),
|
|
3027
|
-
color:
|
|
3028
|
-
is_dashed:
|
|
3059
|
+
color: z142.string().optional(),
|
|
3060
|
+
is_dashed: z142.boolean().optional()
|
|
3029
3061
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
3030
3062
|
expectTypesMatch(true);
|
|
3031
3063
|
|
|
3032
3064
|
// src/pcb/pcb_note_dimension.ts
|
|
3033
|
-
import { z as
|
|
3034
|
-
var pcb_note_dimension =
|
|
3035
|
-
type:
|
|
3065
|
+
import { z as z143 } from "zod";
|
|
3066
|
+
var pcb_note_dimension = z143.object({
|
|
3067
|
+
type: z143.literal("pcb_note_dimension"),
|
|
3036
3068
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
3037
|
-
pcb_component_id:
|
|
3038
|
-
pcb_group_id:
|
|
3039
|
-
subcircuit_id:
|
|
3040
|
-
name:
|
|
3069
|
+
pcb_component_id: z143.string().optional(),
|
|
3070
|
+
pcb_group_id: z143.string().optional(),
|
|
3071
|
+
subcircuit_id: z143.string().optional(),
|
|
3072
|
+
name: z143.string().optional(),
|
|
3041
3073
|
from: point,
|
|
3042
3074
|
to: point,
|
|
3043
|
-
text:
|
|
3044
|
-
text_ccw_rotation:
|
|
3075
|
+
text: z143.string().optional(),
|
|
3076
|
+
text_ccw_rotation: z143.number().optional(),
|
|
3045
3077
|
offset_distance: length.optional(),
|
|
3046
|
-
offset_direction:
|
|
3047
|
-
x:
|
|
3048
|
-
y:
|
|
3078
|
+
offset_direction: z143.object({
|
|
3079
|
+
x: z143.number(),
|
|
3080
|
+
y: z143.number()
|
|
3049
3081
|
}).optional(),
|
|
3050
|
-
font:
|
|
3082
|
+
font: z143.literal("tscircuit2024").default("tscircuit2024"),
|
|
3051
3083
|
font_size: length.default("1mm"),
|
|
3052
3084
|
layer: visible_layer.default("top"),
|
|
3053
|
-
color:
|
|
3085
|
+
color: z143.string().optional(),
|
|
3054
3086
|
arrow_size: length.default("1mm")
|
|
3055
3087
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
3056
3088
|
expectTypesMatch(true);
|
|
3057
3089
|
|
|
3058
3090
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
3059
|
-
import { z as
|
|
3091
|
+
import { z as z144 } from "zod";
|
|
3060
3092
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
3061
|
-
type:
|
|
3093
|
+
type: z144.literal("pcb_footprint_overlap_error"),
|
|
3062
3094
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3063
|
-
error_type:
|
|
3064
|
-
pcb_smtpad_ids:
|
|
3065
|
-
pcb_plated_hole_ids:
|
|
3066
|
-
pcb_hole_ids:
|
|
3067
|
-
pcb_keepout_ids:
|
|
3095
|
+
error_type: z144.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
3096
|
+
pcb_smtpad_ids: z144.array(z144.string()).optional(),
|
|
3097
|
+
pcb_plated_hole_ids: z144.array(z144.string()).optional(),
|
|
3098
|
+
pcb_hole_ids: z144.array(z144.string()).optional(),
|
|
3099
|
+
pcb_keepout_ids: z144.array(z144.string()).optional()
|
|
3068
3100
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
3069
3101
|
expectTypesMatch(
|
|
3070
3102
|
true
|
|
3071
3103
|
);
|
|
3072
3104
|
|
|
3073
3105
|
// src/pcb/pcb_courtyard_overlap_error.ts
|
|
3074
|
-
import { z as
|
|
3106
|
+
import { z as z145 } from "zod";
|
|
3075
3107
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
3076
|
-
type:
|
|
3108
|
+
type: z145.literal("pcb_courtyard_overlap_error"),
|
|
3077
3109
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3078
|
-
error_type:
|
|
3079
|
-
pcb_component_ids:
|
|
3110
|
+
error_type: z145.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
|
|
3111
|
+
pcb_component_ids: z145.tuple([z145.string(), z145.string()])
|
|
3080
3112
|
}).describe(
|
|
3081
3113
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
3082
3114
|
);
|
|
@@ -3085,51 +3117,51 @@ expectTypesMatch(
|
|
|
3085
3117
|
);
|
|
3086
3118
|
|
|
3087
3119
|
// src/pcb/pcb_keepout.ts
|
|
3088
|
-
import { z as
|
|
3089
|
-
var pcb_keepout =
|
|
3090
|
-
type:
|
|
3091
|
-
shape:
|
|
3092
|
-
pcb_group_id:
|
|
3093
|
-
subcircuit_id:
|
|
3120
|
+
import { z as z146 } from "zod";
|
|
3121
|
+
var pcb_keepout = z146.object({
|
|
3122
|
+
type: z146.literal("pcb_keepout"),
|
|
3123
|
+
shape: z146.literal("rect"),
|
|
3124
|
+
pcb_group_id: z146.string().optional(),
|
|
3125
|
+
subcircuit_id: z146.string().optional(),
|
|
3094
3126
|
center: point,
|
|
3095
3127
|
width: distance,
|
|
3096
3128
|
height: distance,
|
|
3097
|
-
pcb_keepout_id:
|
|
3098
|
-
layers:
|
|
3129
|
+
pcb_keepout_id: z146.string(),
|
|
3130
|
+
layers: z146.array(z146.string()),
|
|
3099
3131
|
// Specify layers where the keepout applies
|
|
3100
|
-
description:
|
|
3132
|
+
description: z146.string().optional(),
|
|
3101
3133
|
// Optional description of the keepout
|
|
3102
|
-
excluded_pcb_component_ids:
|
|
3134
|
+
excluded_pcb_component_ids: z146.array(z146.string()).optional()
|
|
3103
3135
|
}).or(
|
|
3104
|
-
|
|
3105
|
-
type:
|
|
3106
|
-
shape:
|
|
3107
|
-
pcb_group_id:
|
|
3108
|
-
subcircuit_id:
|
|
3136
|
+
z146.object({
|
|
3137
|
+
type: z146.literal("pcb_keepout"),
|
|
3138
|
+
shape: z146.literal("circle"),
|
|
3139
|
+
pcb_group_id: z146.string().optional(),
|
|
3140
|
+
subcircuit_id: z146.string().optional(),
|
|
3109
3141
|
center: point,
|
|
3110
3142
|
radius: distance,
|
|
3111
|
-
pcb_keepout_id:
|
|
3112
|
-
layers:
|
|
3143
|
+
pcb_keepout_id: z146.string(),
|
|
3144
|
+
layers: z146.array(z146.string()),
|
|
3113
3145
|
// Specify layers where the keepout applies
|
|
3114
|
-
description:
|
|
3146
|
+
description: z146.string().optional(),
|
|
3115
3147
|
// Optional description of the keepout
|
|
3116
|
-
excluded_pcb_component_ids:
|
|
3148
|
+
excluded_pcb_component_ids: z146.array(z146.string()).optional()
|
|
3117
3149
|
})
|
|
3118
3150
|
);
|
|
3119
3151
|
expectTypesMatch(true);
|
|
3120
3152
|
|
|
3121
3153
|
// src/pcb/pcb_cutout.ts
|
|
3122
|
-
import { z as
|
|
3123
|
-
var pcb_cutout_base =
|
|
3124
|
-
type:
|
|
3154
|
+
import { z as z147 } from "zod";
|
|
3155
|
+
var pcb_cutout_base = z147.object({
|
|
3156
|
+
type: z147.literal("pcb_cutout"),
|
|
3125
3157
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
3126
|
-
pcb_group_id:
|
|
3127
|
-
subcircuit_id:
|
|
3128
|
-
pcb_board_id:
|
|
3129
|
-
pcb_panel_id:
|
|
3158
|
+
pcb_group_id: z147.string().optional(),
|
|
3159
|
+
subcircuit_id: z147.string().optional(),
|
|
3160
|
+
pcb_board_id: z147.string().optional(),
|
|
3161
|
+
pcb_panel_id: z147.string().optional()
|
|
3130
3162
|
});
|
|
3131
3163
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
3132
|
-
shape:
|
|
3164
|
+
shape: z147.literal("rect"),
|
|
3133
3165
|
center: point,
|
|
3134
3166
|
width: length,
|
|
3135
3167
|
height: length,
|
|
@@ -3138,26 +3170,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
3138
3170
|
});
|
|
3139
3171
|
expectTypesMatch(true);
|
|
3140
3172
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
3141
|
-
shape:
|
|
3173
|
+
shape: z147.literal("circle"),
|
|
3142
3174
|
center: point,
|
|
3143
3175
|
radius: length
|
|
3144
3176
|
});
|
|
3145
3177
|
expectTypesMatch(true);
|
|
3146
3178
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
3147
|
-
shape:
|
|
3148
|
-
points:
|
|
3179
|
+
shape: z147.literal("polygon"),
|
|
3180
|
+
points: z147.array(point)
|
|
3149
3181
|
});
|
|
3150
3182
|
expectTypesMatch(true);
|
|
3151
3183
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
3152
|
-
shape:
|
|
3153
|
-
route:
|
|
3184
|
+
shape: z147.literal("path"),
|
|
3185
|
+
route: z147.array(point),
|
|
3154
3186
|
slot_width: length,
|
|
3155
3187
|
slot_length: length.optional(),
|
|
3156
3188
|
space_between_slots: length.optional(),
|
|
3157
3189
|
slot_corner_radius: length.optional()
|
|
3158
3190
|
});
|
|
3159
3191
|
expectTypesMatch(true);
|
|
3160
|
-
var pcb_cutout =
|
|
3192
|
+
var pcb_cutout = z147.discriminatedUnion("shape", [
|
|
3161
3193
|
pcb_cutout_rect,
|
|
3162
3194
|
pcb_cutout_circle,
|
|
3163
3195
|
pcb_cutout_polygon,
|
|
@@ -3166,169 +3198,169 @@ var pcb_cutout = z146.discriminatedUnion("shape", [
|
|
|
3166
3198
|
expectTypesMatch(true);
|
|
3167
3199
|
|
|
3168
3200
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
3169
|
-
import { z as
|
|
3201
|
+
import { z as z148 } from "zod";
|
|
3170
3202
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
3171
|
-
type:
|
|
3203
|
+
type: z148.literal("pcb_missing_footprint_error"),
|
|
3172
3204
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
3173
3205
|
"pcb_missing_footprint_error"
|
|
3174
3206
|
),
|
|
3175
|
-
pcb_group_id:
|
|
3176
|
-
subcircuit_id:
|
|
3177
|
-
error_type:
|
|
3178
|
-
source_component_id:
|
|
3179
|
-
}).describe("Defines a missing footprint error on the PCB");
|
|
3207
|
+
pcb_group_id: z148.string().optional(),
|
|
3208
|
+
subcircuit_id: z148.string().optional(),
|
|
3209
|
+
error_type: z148.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
3210
|
+
source_component_id: z148.string()
|
|
3211
|
+
}).describe("Defines a missing footprint error on the PCB");
|
|
3180
3212
|
expectTypesMatch(
|
|
3181
3213
|
true
|
|
3182
3214
|
);
|
|
3183
3215
|
|
|
3184
3216
|
// src/pcb/external_footprint_load_error.ts
|
|
3185
|
-
import { z as
|
|
3217
|
+
import { z as z149 } from "zod";
|
|
3186
3218
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
3187
|
-
type:
|
|
3219
|
+
type: z149.literal("external_footprint_load_error"),
|
|
3188
3220
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3189
3221
|
"external_footprint_load_error"
|
|
3190
3222
|
),
|
|
3191
|
-
pcb_component_id:
|
|
3192
|
-
source_component_id:
|
|
3193
|
-
pcb_group_id:
|
|
3194
|
-
subcircuit_id:
|
|
3195
|
-
footprinter_string:
|
|
3196
|
-
error_type:
|
|
3223
|
+
pcb_component_id: z149.string(),
|
|
3224
|
+
source_component_id: z149.string(),
|
|
3225
|
+
pcb_group_id: z149.string().optional(),
|
|
3226
|
+
subcircuit_id: z149.string().optional(),
|
|
3227
|
+
footprinter_string: z149.string().optional(),
|
|
3228
|
+
error_type: z149.literal("external_footprint_load_error").default("external_footprint_load_error")
|
|
3197
3229
|
}).describe("Defines an error when an external footprint fails to load");
|
|
3198
3230
|
expectTypesMatch(true);
|
|
3199
3231
|
|
|
3200
3232
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
3201
|
-
import { z as
|
|
3233
|
+
import { z as z150 } from "zod";
|
|
3202
3234
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
3203
|
-
type:
|
|
3235
|
+
type: z150.literal("circuit_json_footprint_load_error"),
|
|
3204
3236
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3205
3237
|
"circuit_json_footprint_load_error"
|
|
3206
3238
|
),
|
|
3207
|
-
pcb_component_id:
|
|
3208
|
-
source_component_id:
|
|
3209
|
-
pcb_group_id:
|
|
3210
|
-
subcircuit_id:
|
|
3211
|
-
error_type:
|
|
3212
|
-
circuit_json:
|
|
3239
|
+
pcb_component_id: z150.string(),
|
|
3240
|
+
source_component_id: z150.string(),
|
|
3241
|
+
pcb_group_id: z150.string().optional(),
|
|
3242
|
+
subcircuit_id: z150.string().optional(),
|
|
3243
|
+
error_type: z150.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
3244
|
+
circuit_json: z150.array(z150.any()).optional()
|
|
3213
3245
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
3214
3246
|
expectTypesMatch(true);
|
|
3215
3247
|
|
|
3216
3248
|
// src/pcb/pcb_group.ts
|
|
3217
|
-
import { z as
|
|
3218
|
-
var pcb_group =
|
|
3219
|
-
type:
|
|
3249
|
+
import { z as z151 } from "zod";
|
|
3250
|
+
var pcb_group = z151.object({
|
|
3251
|
+
type: z151.literal("pcb_group"),
|
|
3220
3252
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
3221
|
-
source_group_id:
|
|
3222
|
-
is_subcircuit:
|
|
3223
|
-
subcircuit_id:
|
|
3253
|
+
source_group_id: z151.string(),
|
|
3254
|
+
is_subcircuit: z151.boolean().optional(),
|
|
3255
|
+
subcircuit_id: z151.string().optional(),
|
|
3224
3256
|
width: length.optional(),
|
|
3225
3257
|
height: length.optional(),
|
|
3226
3258
|
center: point,
|
|
3227
|
-
display_offset_x:
|
|
3259
|
+
display_offset_x: z151.string().optional().describe(
|
|
3228
3260
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
3229
3261
|
),
|
|
3230
|
-
display_offset_y:
|
|
3262
|
+
display_offset_y: z151.string().optional().describe(
|
|
3231
3263
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
3232
3264
|
),
|
|
3233
|
-
outline:
|
|
3265
|
+
outline: z151.array(point).optional(),
|
|
3234
3266
|
anchor_position: point.optional(),
|
|
3235
3267
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
3236
|
-
position_mode:
|
|
3237
|
-
positioned_relative_to_pcb_group_id:
|
|
3238
|
-
positioned_relative_to_pcb_board_id:
|
|
3239
|
-
pcb_component_ids:
|
|
3240
|
-
child_layout_mode:
|
|
3241
|
-
name:
|
|
3242
|
-
description:
|
|
3243
|
-
layout_mode:
|
|
3244
|
-
autorouter_configuration:
|
|
3268
|
+
position_mode: z151.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
3269
|
+
positioned_relative_to_pcb_group_id: z151.string().optional(),
|
|
3270
|
+
positioned_relative_to_pcb_board_id: z151.string().optional(),
|
|
3271
|
+
pcb_component_ids: z151.array(z151.string()),
|
|
3272
|
+
child_layout_mode: z151.enum(["packed", "none"]).optional(),
|
|
3273
|
+
name: z151.string().optional(),
|
|
3274
|
+
description: z151.string().optional(),
|
|
3275
|
+
layout_mode: z151.string().optional(),
|
|
3276
|
+
autorouter_configuration: z151.object({
|
|
3245
3277
|
trace_clearance: length
|
|
3246
3278
|
}).optional(),
|
|
3247
|
-
autorouter_used_string:
|
|
3279
|
+
autorouter_used_string: z151.string().optional()
|
|
3248
3280
|
}).describe("Defines a group of components on the PCB");
|
|
3249
3281
|
expectTypesMatch(true);
|
|
3250
3282
|
|
|
3251
3283
|
// src/pcb/pcb_autorouting_error.ts
|
|
3252
|
-
import { z as
|
|
3284
|
+
import { z as z152 } from "zod";
|
|
3253
3285
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
3254
|
-
type:
|
|
3286
|
+
type: z152.literal("pcb_autorouting_error"),
|
|
3255
3287
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
3256
|
-
error_type:
|
|
3257
|
-
subcircuit_id:
|
|
3288
|
+
error_type: z152.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
3289
|
+
subcircuit_id: z152.string().optional()
|
|
3258
3290
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
3259
3291
|
expectTypesMatch(true);
|
|
3260
3292
|
|
|
3261
3293
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
3262
|
-
import { z as
|
|
3263
|
-
var pcb_manual_edit_conflict_warning =
|
|
3264
|
-
type:
|
|
3294
|
+
import { z as z153 } from "zod";
|
|
3295
|
+
var pcb_manual_edit_conflict_warning = z153.object({
|
|
3296
|
+
type: z153.literal("pcb_manual_edit_conflict_warning"),
|
|
3265
3297
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
3266
3298
|
"pcb_manual_edit_conflict_warning"
|
|
3267
3299
|
),
|
|
3268
|
-
warning_type:
|
|
3269
|
-
message:
|
|
3270
|
-
pcb_component_id:
|
|
3271
|
-
pcb_group_id:
|
|
3272
|
-
subcircuit_id:
|
|
3273
|
-
source_component_id:
|
|
3300
|
+
warning_type: z153.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
3301
|
+
message: z153.string(),
|
|
3302
|
+
pcb_component_id: z153.string(),
|
|
3303
|
+
pcb_group_id: z153.string().optional(),
|
|
3304
|
+
subcircuit_id: z153.string().optional(),
|
|
3305
|
+
source_component_id: z153.string()
|
|
3274
3306
|
}).describe(
|
|
3275
3307
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3276
3308
|
);
|
|
3277
3309
|
expectTypesMatch(true);
|
|
3278
3310
|
|
|
3279
3311
|
// src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts
|
|
3280
|
-
import { z as
|
|
3281
|
-
var connectorOrientationDirection =
|
|
3282
|
-
var pcb_connector_not_in_accessible_orientation_warning =
|
|
3283
|
-
type:
|
|
3312
|
+
import { z as z154 } from "zod";
|
|
3313
|
+
var connectorOrientationDirection = z154.enum(["x-", "x+", "y+", "y-"]);
|
|
3314
|
+
var pcb_connector_not_in_accessible_orientation_warning = z154.object({
|
|
3315
|
+
type: z154.literal("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3284
3316
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3285
3317
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3286
3318
|
),
|
|
3287
|
-
warning_type:
|
|
3288
|
-
message:
|
|
3289
|
-
pcb_component_id:
|
|
3290
|
-
source_component_id:
|
|
3291
|
-
pcb_board_id:
|
|
3319
|
+
warning_type: z154.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3320
|
+
message: z154.string(),
|
|
3321
|
+
pcb_component_id: z154.string(),
|
|
3322
|
+
source_component_id: z154.string().optional(),
|
|
3323
|
+
pcb_board_id: z154.string().optional(),
|
|
3292
3324
|
facing_direction: connectorOrientationDirection,
|
|
3293
3325
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3294
|
-
subcircuit_id:
|
|
3326
|
+
subcircuit_id: z154.string().optional()
|
|
3295
3327
|
}).describe(
|
|
3296
3328
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
3297
3329
|
);
|
|
3298
3330
|
expectTypesMatch(true);
|
|
3299
3331
|
|
|
3300
3332
|
// src/pcb/supplier_footprint_mismatch_warning.ts
|
|
3301
|
-
import { z as
|
|
3302
|
-
var supplier_footprint_mismatch_warning =
|
|
3303
|
-
type:
|
|
3333
|
+
import { z as z155 } from "zod";
|
|
3334
|
+
var supplier_footprint_mismatch_warning = z155.object({
|
|
3335
|
+
type: z155.literal("supplier_footprint_mismatch_warning"),
|
|
3304
3336
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
3305
3337
|
"supplier_footprint_mismatch_warning"
|
|
3306
3338
|
),
|
|
3307
|
-
warning_type:
|
|
3308
|
-
message:
|
|
3309
|
-
source_component_id:
|
|
3310
|
-
pcb_component_id:
|
|
3311
|
-
pcb_group_id:
|
|
3312
|
-
subcircuit_id:
|
|
3339
|
+
warning_type: z155.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
|
|
3340
|
+
message: z155.string(),
|
|
3341
|
+
source_component_id: z155.string(),
|
|
3342
|
+
pcb_component_id: z155.string().optional(),
|
|
3343
|
+
pcb_group_id: z155.string().optional(),
|
|
3344
|
+
subcircuit_id: z155.string().optional(),
|
|
3313
3345
|
supplier_name: supplier_name.optional(),
|
|
3314
|
-
supplier_part_number:
|
|
3315
|
-
supplier_footprint_url:
|
|
3316
|
-
footprint_copper_intersection_over_union:
|
|
3346
|
+
supplier_part_number: z155.string().optional(),
|
|
3347
|
+
supplier_footprint_url: z155.string().optional(),
|
|
3348
|
+
footprint_copper_intersection_over_union: z155.number()
|
|
3317
3349
|
}).describe(
|
|
3318
3350
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
3319
3351
|
);
|
|
3320
3352
|
expectTypesMatch(true);
|
|
3321
3353
|
|
|
3322
3354
|
// src/pcb/pcb_breakout_point.ts
|
|
3323
|
-
import { z as
|
|
3324
|
-
var pcb_breakout_point =
|
|
3325
|
-
type:
|
|
3355
|
+
import { z as z156 } from "zod";
|
|
3356
|
+
var pcb_breakout_point = z156.object({
|
|
3357
|
+
type: z156.literal("pcb_breakout_point"),
|
|
3326
3358
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
3327
|
-
pcb_group_id:
|
|
3328
|
-
subcircuit_id:
|
|
3329
|
-
source_trace_id:
|
|
3330
|
-
source_port_id:
|
|
3331
|
-
source_net_id:
|
|
3359
|
+
pcb_group_id: z156.string(),
|
|
3360
|
+
subcircuit_id: z156.string().optional(),
|
|
3361
|
+
source_trace_id: z156.string().optional(),
|
|
3362
|
+
source_port_id: z156.string().optional(),
|
|
3363
|
+
source_net_id: z156.string().optional(),
|
|
3332
3364
|
x: distance,
|
|
3333
3365
|
y: distance
|
|
3334
3366
|
}).describe(
|
|
@@ -3337,61 +3369,61 @@ var pcb_breakout_point = z155.object({
|
|
|
3337
3369
|
expectTypesMatch(true);
|
|
3338
3370
|
|
|
3339
3371
|
// src/pcb/pcb_ground_plane.ts
|
|
3340
|
-
import { z as
|
|
3341
|
-
var pcb_ground_plane =
|
|
3342
|
-
type:
|
|
3372
|
+
import { z as z157 } from "zod";
|
|
3373
|
+
var pcb_ground_plane = z157.object({
|
|
3374
|
+
type: z157.literal("pcb_ground_plane"),
|
|
3343
3375
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
3344
|
-
source_pcb_ground_plane_id:
|
|
3345
|
-
source_net_id:
|
|
3346
|
-
pcb_group_id:
|
|
3347
|
-
subcircuit_id:
|
|
3376
|
+
source_pcb_ground_plane_id: z157.string(),
|
|
3377
|
+
source_net_id: z157.string(),
|
|
3378
|
+
pcb_group_id: z157.string().optional(),
|
|
3379
|
+
subcircuit_id: z157.string().optional()
|
|
3348
3380
|
}).describe("Defines a ground plane on the PCB");
|
|
3349
3381
|
expectTypesMatch(true);
|
|
3350
3382
|
|
|
3351
3383
|
// src/pcb/pcb_ground_plane_region.ts
|
|
3352
|
-
import { z as
|
|
3353
|
-
var pcb_ground_plane_region =
|
|
3354
|
-
type:
|
|
3384
|
+
import { z as z158 } from "zod";
|
|
3385
|
+
var pcb_ground_plane_region = z158.object({
|
|
3386
|
+
type: z158.literal("pcb_ground_plane_region"),
|
|
3355
3387
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3356
3388
|
"pcb_ground_plane_region"
|
|
3357
3389
|
),
|
|
3358
|
-
pcb_ground_plane_id:
|
|
3359
|
-
pcb_group_id:
|
|
3360
|
-
subcircuit_id:
|
|
3390
|
+
pcb_ground_plane_id: z158.string(),
|
|
3391
|
+
pcb_group_id: z158.string().optional(),
|
|
3392
|
+
subcircuit_id: z158.string().optional(),
|
|
3361
3393
|
layer: layer_ref,
|
|
3362
|
-
points:
|
|
3394
|
+
points: z158.array(point)
|
|
3363
3395
|
}).describe("Defines a polygon region of a ground plane");
|
|
3364
3396
|
expectTypesMatch(true);
|
|
3365
3397
|
|
|
3366
3398
|
// src/pcb/pcb_thermal_spoke.ts
|
|
3367
|
-
import { z as
|
|
3368
|
-
var pcb_thermal_spoke =
|
|
3369
|
-
type:
|
|
3399
|
+
import { z as z159 } from "zod";
|
|
3400
|
+
var pcb_thermal_spoke = z159.object({
|
|
3401
|
+
type: z159.literal("pcb_thermal_spoke"),
|
|
3370
3402
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3371
|
-
pcb_ground_plane_id:
|
|
3372
|
-
shape:
|
|
3373
|
-
spoke_count:
|
|
3403
|
+
pcb_ground_plane_id: z159.string(),
|
|
3404
|
+
shape: z159.string(),
|
|
3405
|
+
spoke_count: z159.number(),
|
|
3374
3406
|
spoke_thickness: distance,
|
|
3375
3407
|
spoke_inner_diameter: distance,
|
|
3376
3408
|
spoke_outer_diameter: distance,
|
|
3377
|
-
pcb_plated_hole_id:
|
|
3378
|
-
subcircuit_id:
|
|
3409
|
+
pcb_plated_hole_id: z159.string().optional(),
|
|
3410
|
+
subcircuit_id: z159.string().optional()
|
|
3379
3411
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3380
3412
|
expectTypesMatch(true);
|
|
3381
3413
|
|
|
3382
3414
|
// src/pcb/pcb_copper_pour.ts
|
|
3383
|
-
import { z as
|
|
3384
|
-
var pcb_copper_pour_base =
|
|
3385
|
-
type:
|
|
3415
|
+
import { z as z160 } from "zod";
|
|
3416
|
+
var pcb_copper_pour_base = z160.object({
|
|
3417
|
+
type: z160.literal("pcb_copper_pour"),
|
|
3386
3418
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3387
|
-
pcb_group_id:
|
|
3388
|
-
subcircuit_id:
|
|
3419
|
+
pcb_group_id: z160.string().optional(),
|
|
3420
|
+
subcircuit_id: z160.string().optional(),
|
|
3389
3421
|
layer: layer_ref,
|
|
3390
|
-
source_net_id:
|
|
3391
|
-
covered_with_solder_mask:
|
|
3422
|
+
source_net_id: z160.string().optional(),
|
|
3423
|
+
covered_with_solder_mask: z160.boolean().optional().default(true)
|
|
3392
3424
|
});
|
|
3393
3425
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3394
|
-
shape:
|
|
3426
|
+
shape: z160.literal("rect"),
|
|
3395
3427
|
center: point,
|
|
3396
3428
|
width: length,
|
|
3397
3429
|
height: length,
|
|
@@ -3399,16 +3431,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3399
3431
|
});
|
|
3400
3432
|
expectTypesMatch(true);
|
|
3401
3433
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3402
|
-
shape:
|
|
3434
|
+
shape: z160.literal("brep"),
|
|
3403
3435
|
brep_shape
|
|
3404
3436
|
});
|
|
3405
3437
|
expectTypesMatch(true);
|
|
3406
3438
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3407
|
-
shape:
|
|
3408
|
-
points:
|
|
3439
|
+
shape: z160.literal("polygon"),
|
|
3440
|
+
points: z160.array(point)
|
|
3409
3441
|
});
|
|
3410
3442
|
expectTypesMatch(true);
|
|
3411
|
-
var pcb_copper_pour =
|
|
3443
|
+
var pcb_copper_pour = z160.discriminatedUnion("shape", [
|
|
3412
3444
|
pcb_copper_pour_rect,
|
|
3413
3445
|
pcb_copper_pour_brep,
|
|
3414
3446
|
pcb_copper_pour_polygon
|
|
@@ -3416,99 +3448,99 @@ var pcb_copper_pour = z159.discriminatedUnion("shape", [
|
|
|
3416
3448
|
expectTypesMatch(true);
|
|
3417
3449
|
|
|
3418
3450
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
3419
|
-
import { z as
|
|
3451
|
+
import { z as z161 } from "zod";
|
|
3420
3452
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3421
|
-
type:
|
|
3453
|
+
type: z161.literal("pcb_component_outside_board_error"),
|
|
3422
3454
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3423
3455
|
"pcb_component_outside_board_error"
|
|
3424
3456
|
),
|
|
3425
|
-
error_type:
|
|
3426
|
-
pcb_component_id:
|
|
3427
|
-
pcb_board_id:
|
|
3457
|
+
error_type: z161.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
3458
|
+
pcb_component_id: z161.string(),
|
|
3459
|
+
pcb_board_id: z161.string(),
|
|
3428
3460
|
component_center: point,
|
|
3429
|
-
component_bounds:
|
|
3430
|
-
min_x:
|
|
3431
|
-
max_x:
|
|
3432
|
-
min_y:
|
|
3433
|
-
max_y:
|
|
3461
|
+
component_bounds: z161.object({
|
|
3462
|
+
min_x: z161.number(),
|
|
3463
|
+
max_x: z161.number(),
|
|
3464
|
+
min_y: z161.number(),
|
|
3465
|
+
max_y: z161.number()
|
|
3434
3466
|
}),
|
|
3435
|
-
subcircuit_id:
|
|
3436
|
-
source_component_id:
|
|
3467
|
+
subcircuit_id: z161.string().optional(),
|
|
3468
|
+
source_component_id: z161.string().optional()
|
|
3437
3469
|
}).describe(
|
|
3438
3470
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3439
3471
|
);
|
|
3440
3472
|
expectTypesMatch(true);
|
|
3441
3473
|
|
|
3442
3474
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
3443
|
-
import { z as
|
|
3475
|
+
import { z as z162 } from "zod";
|
|
3444
3476
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3445
|
-
type:
|
|
3477
|
+
type: z162.literal("pcb_component_not_on_board_edge_error"),
|
|
3446
3478
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3447
3479
|
"pcb_component_not_on_board_edge_error"
|
|
3448
3480
|
),
|
|
3449
|
-
error_type:
|
|
3450
|
-
pcb_component_id:
|
|
3451
|
-
pcb_board_id:
|
|
3481
|
+
error_type: z162.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
3482
|
+
pcb_component_id: z162.string(),
|
|
3483
|
+
pcb_board_id: z162.string(),
|
|
3452
3484
|
component_center: point,
|
|
3453
|
-
pad_to_nearest_board_edge_distance:
|
|
3454
|
-
source_component_id:
|
|
3455
|
-
subcircuit_id:
|
|
3485
|
+
pad_to_nearest_board_edge_distance: z162.number(),
|
|
3486
|
+
source_component_id: z162.string().optional(),
|
|
3487
|
+
subcircuit_id: z162.string().optional()
|
|
3456
3488
|
}).describe(
|
|
3457
3489
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3458
3490
|
);
|
|
3459
3491
|
expectTypesMatch(true);
|
|
3460
3492
|
|
|
3461
3493
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
3462
|
-
import { z as
|
|
3494
|
+
import { z as z163 } from "zod";
|
|
3463
3495
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3464
|
-
type:
|
|
3496
|
+
type: z163.literal("pcb_component_invalid_layer_error"),
|
|
3465
3497
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3466
3498
|
"pcb_component_invalid_layer_error"
|
|
3467
3499
|
),
|
|
3468
|
-
error_type:
|
|
3469
|
-
pcb_component_id:
|
|
3470
|
-
source_component_id:
|
|
3500
|
+
error_type: z163.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
3501
|
+
pcb_component_id: z163.string().optional(),
|
|
3502
|
+
source_component_id: z163.string(),
|
|
3471
3503
|
layer: layer_ref,
|
|
3472
|
-
subcircuit_id:
|
|
3504
|
+
subcircuit_id: z163.string().optional()
|
|
3473
3505
|
}).describe(
|
|
3474
3506
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
3475
3507
|
);
|
|
3476
3508
|
expectTypesMatch(true);
|
|
3477
3509
|
|
|
3478
3510
|
// src/pcb/pcb_via_clearance_error.ts
|
|
3479
|
-
import { z as
|
|
3511
|
+
import { z as z164 } from "zod";
|
|
3480
3512
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
3481
|
-
type:
|
|
3513
|
+
type: z164.literal("pcb_via_clearance_error"),
|
|
3482
3514
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3483
|
-
error_type:
|
|
3484
|
-
pcb_via_ids:
|
|
3515
|
+
error_type: z164.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
3516
|
+
pcb_via_ids: z164.array(z164.string()).min(2),
|
|
3485
3517
|
minimum_clearance: distance.optional(),
|
|
3486
3518
|
actual_clearance: distance.optional(),
|
|
3487
|
-
pcb_center:
|
|
3488
|
-
x:
|
|
3489
|
-
y:
|
|
3519
|
+
pcb_center: z164.object({
|
|
3520
|
+
x: z164.number().optional(),
|
|
3521
|
+
y: z164.number().optional()
|
|
3490
3522
|
}).optional(),
|
|
3491
|
-
subcircuit_id:
|
|
3523
|
+
subcircuit_id: z164.string().optional()
|
|
3492
3524
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
3493
3525
|
expectTypesMatch(true);
|
|
3494
3526
|
|
|
3495
3527
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
3496
|
-
import { z as
|
|
3528
|
+
import { z as z165 } from "zod";
|
|
3497
3529
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
3498
|
-
type:
|
|
3530
|
+
type: z165.literal("pcb_via_trace_clearance_error"),
|
|
3499
3531
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3500
3532
|
"pcb_via_trace_clearance_error"
|
|
3501
3533
|
),
|
|
3502
|
-
error_type:
|
|
3503
|
-
pcb_via_id:
|
|
3504
|
-
pcb_trace_id:
|
|
3534
|
+
error_type: z165.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
3535
|
+
pcb_via_id: z165.string(),
|
|
3536
|
+
pcb_trace_id: z165.string(),
|
|
3505
3537
|
minimum_clearance: distance.optional(),
|
|
3506
3538
|
actual_clearance: distance.optional(),
|
|
3507
|
-
center:
|
|
3508
|
-
x:
|
|
3509
|
-
y:
|
|
3539
|
+
center: z165.object({
|
|
3540
|
+
x: z165.number().optional(),
|
|
3541
|
+
y: z165.number().optional()
|
|
3510
3542
|
}).optional(),
|
|
3511
|
-
subcircuit_id:
|
|
3543
|
+
subcircuit_id: z165.string().optional()
|
|
3512
3544
|
}).describe(
|
|
3513
3545
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
3514
3546
|
);
|
|
@@ -3517,41 +3549,41 @@ expectTypesMatch(
|
|
|
3517
3549
|
);
|
|
3518
3550
|
|
|
3519
3551
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
3520
|
-
import { z as
|
|
3552
|
+
import { z as z166 } from "zod";
|
|
3521
3553
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
3522
|
-
type:
|
|
3554
|
+
type: z166.literal("pcb_pad_pad_clearance_error"),
|
|
3523
3555
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3524
3556
|
"pcb_pad_pad_clearance_error"
|
|
3525
3557
|
),
|
|
3526
|
-
error_type:
|
|
3527
|
-
pcb_pad_ids:
|
|
3558
|
+
error_type: z166.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
3559
|
+
pcb_pad_ids: z166.array(z166.string()).min(2),
|
|
3528
3560
|
minimum_clearance: distance.optional(),
|
|
3529
3561
|
actual_clearance: distance.optional(),
|
|
3530
|
-
center:
|
|
3531
|
-
x:
|
|
3532
|
-
y:
|
|
3562
|
+
center: z166.object({
|
|
3563
|
+
x: z166.number().optional(),
|
|
3564
|
+
y: z166.number().optional()
|
|
3533
3565
|
}).optional(),
|
|
3534
|
-
subcircuit_id:
|
|
3566
|
+
subcircuit_id: z166.string().optional()
|
|
3535
3567
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
3536
3568
|
expectTypesMatch(true);
|
|
3537
3569
|
|
|
3538
3570
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
3539
|
-
import { z as
|
|
3571
|
+
import { z as z167 } from "zod";
|
|
3540
3572
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
3541
|
-
type:
|
|
3573
|
+
type: z167.literal("pcb_pad_trace_clearance_error"),
|
|
3542
3574
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3543
3575
|
"pcb_pad_trace_clearance_error"
|
|
3544
3576
|
),
|
|
3545
|
-
error_type:
|
|
3546
|
-
pcb_pad_id:
|
|
3547
|
-
pcb_trace_id:
|
|
3577
|
+
error_type: z167.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
3578
|
+
pcb_pad_id: z167.string(),
|
|
3579
|
+
pcb_trace_id: z167.string(),
|
|
3548
3580
|
minimum_clearance: distance.optional(),
|
|
3549
3581
|
actual_clearance: distance.optional(),
|
|
3550
|
-
center:
|
|
3551
|
-
x:
|
|
3552
|
-
y:
|
|
3582
|
+
center: z167.object({
|
|
3583
|
+
x: z167.number().optional(),
|
|
3584
|
+
y: z167.number().optional()
|
|
3553
3585
|
}).optional(),
|
|
3554
|
-
subcircuit_id:
|
|
3586
|
+
subcircuit_id: z167.string().optional()
|
|
3555
3587
|
}).describe(
|
|
3556
3588
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
3557
3589
|
);
|
|
@@ -3560,89 +3592,89 @@ expectTypesMatch(
|
|
|
3560
3592
|
);
|
|
3561
3593
|
|
|
3562
3594
|
// src/pcb/pcb_courtyard_rect.ts
|
|
3563
|
-
import { z as
|
|
3564
|
-
var pcb_courtyard_rect =
|
|
3565
|
-
type:
|
|
3595
|
+
import { z as z168 } from "zod";
|
|
3596
|
+
var pcb_courtyard_rect = z168.object({
|
|
3597
|
+
type: z168.literal("pcb_courtyard_rect"),
|
|
3566
3598
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
3567
|
-
pcb_component_id:
|
|
3568
|
-
pcb_group_id:
|
|
3569
|
-
subcircuit_id:
|
|
3599
|
+
pcb_component_id: z168.string(),
|
|
3600
|
+
pcb_group_id: z168.string().optional(),
|
|
3601
|
+
subcircuit_id: z168.string().optional(),
|
|
3570
3602
|
center: point,
|
|
3571
3603
|
width: length,
|
|
3572
3604
|
height: length,
|
|
3573
3605
|
layer: visible_layer,
|
|
3574
3606
|
ccw_rotation: rotation.optional(),
|
|
3575
|
-
color:
|
|
3607
|
+
color: z168.string().optional()
|
|
3576
3608
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
3577
3609
|
expectTypesMatch(true);
|
|
3578
3610
|
|
|
3579
3611
|
// src/pcb/pcb_courtyard_outline.ts
|
|
3580
|
-
import { z as
|
|
3581
|
-
var pcb_courtyard_outline =
|
|
3582
|
-
type:
|
|
3612
|
+
import { z as z169 } from "zod";
|
|
3613
|
+
var pcb_courtyard_outline = z169.object({
|
|
3614
|
+
type: z169.literal("pcb_courtyard_outline"),
|
|
3583
3615
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
3584
3616
|
"pcb_courtyard_outline"
|
|
3585
3617
|
),
|
|
3586
|
-
pcb_component_id:
|
|
3587
|
-
pcb_group_id:
|
|
3588
|
-
subcircuit_id:
|
|
3618
|
+
pcb_component_id: z169.string(),
|
|
3619
|
+
pcb_group_id: z169.string().optional(),
|
|
3620
|
+
subcircuit_id: z169.string().optional(),
|
|
3589
3621
|
layer: visible_layer,
|
|
3590
|
-
outline:
|
|
3622
|
+
outline: z169.array(point).min(2)
|
|
3591
3623
|
}).describe("Defines a courtyard outline on the PCB");
|
|
3592
3624
|
expectTypesMatch(true);
|
|
3593
3625
|
|
|
3594
3626
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
3595
|
-
import { z as
|
|
3596
|
-
var pcb_courtyard_polygon =
|
|
3597
|
-
type:
|
|
3627
|
+
import { z as z170 } from "zod";
|
|
3628
|
+
var pcb_courtyard_polygon = z170.object({
|
|
3629
|
+
type: z170.literal("pcb_courtyard_polygon"),
|
|
3598
3630
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
3599
3631
|
"pcb_courtyard_polygon"
|
|
3600
3632
|
),
|
|
3601
|
-
pcb_component_id:
|
|
3602
|
-
pcb_group_id:
|
|
3603
|
-
subcircuit_id:
|
|
3633
|
+
pcb_component_id: z170.string(),
|
|
3634
|
+
pcb_group_id: z170.string().optional(),
|
|
3635
|
+
subcircuit_id: z170.string().optional(),
|
|
3604
3636
|
layer: visible_layer,
|
|
3605
|
-
points:
|
|
3606
|
-
color:
|
|
3637
|
+
points: z170.array(point).min(3),
|
|
3638
|
+
color: z170.string().optional()
|
|
3607
3639
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
3608
3640
|
expectTypesMatch(true);
|
|
3609
3641
|
|
|
3610
3642
|
// src/pcb/pcb_courtyard_circle.ts
|
|
3611
|
-
import { z as
|
|
3612
|
-
var pcb_courtyard_circle =
|
|
3613
|
-
type:
|
|
3643
|
+
import { z as z171 } from "zod";
|
|
3644
|
+
var pcb_courtyard_circle = z171.object({
|
|
3645
|
+
type: z171.literal("pcb_courtyard_circle"),
|
|
3614
3646
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
3615
3647
|
"pcb_courtyard_circle"
|
|
3616
3648
|
),
|
|
3617
|
-
pcb_component_id:
|
|
3618
|
-
pcb_group_id:
|
|
3619
|
-
subcircuit_id:
|
|
3649
|
+
pcb_component_id: z171.string(),
|
|
3650
|
+
pcb_group_id: z171.string().optional(),
|
|
3651
|
+
subcircuit_id: z171.string().optional(),
|
|
3620
3652
|
center: point,
|
|
3621
3653
|
radius: length,
|
|
3622
3654
|
layer: visible_layer,
|
|
3623
|
-
color:
|
|
3655
|
+
color: z171.string().optional()
|
|
3624
3656
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3625
3657
|
expectTypesMatch(true);
|
|
3626
3658
|
|
|
3627
3659
|
// src/pcb/pcb_courtyard_pill.ts
|
|
3628
|
-
import { z as
|
|
3629
|
-
var pcb_courtyard_pill =
|
|
3630
|
-
type:
|
|
3660
|
+
import { z as z172 } from "zod";
|
|
3661
|
+
var pcb_courtyard_pill = z172.object({
|
|
3662
|
+
type: z172.literal("pcb_courtyard_pill"),
|
|
3631
3663
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
3632
|
-
pcb_component_id:
|
|
3633
|
-
pcb_group_id:
|
|
3634
|
-
subcircuit_id:
|
|
3664
|
+
pcb_component_id: z172.string(),
|
|
3665
|
+
pcb_group_id: z172.string().optional(),
|
|
3666
|
+
subcircuit_id: z172.string().optional(),
|
|
3635
3667
|
center: point,
|
|
3636
3668
|
width: length,
|
|
3637
3669
|
height: length,
|
|
3638
3670
|
radius: length,
|
|
3639
3671
|
layer: visible_layer,
|
|
3640
|
-
color:
|
|
3672
|
+
color: z172.string().optional()
|
|
3641
3673
|
}).describe("Defines a courtyard pill on the PCB");
|
|
3642
3674
|
expectTypesMatch(true);
|
|
3643
3675
|
|
|
3644
3676
|
// src/cad/cad_component.ts
|
|
3645
|
-
import { z as
|
|
3677
|
+
import { z as z173 } from "zod";
|
|
3646
3678
|
|
|
3647
3679
|
// src/cad/cad_model_conventions.ts
|
|
3648
3680
|
var cad_model_formats = [
|
|
@@ -3673,50 +3705,50 @@ var cadModelDefaultDirectionMap = {
|
|
|
3673
3705
|
};
|
|
3674
3706
|
|
|
3675
3707
|
// src/cad/cad_component.ts
|
|
3676
|
-
var cad_component =
|
|
3677
|
-
type:
|
|
3678
|
-
cad_component_id:
|
|
3679
|
-
pcb_component_id:
|
|
3680
|
-
source_component_id:
|
|
3708
|
+
var cad_component = z173.object({
|
|
3709
|
+
type: z173.literal("cad_component"),
|
|
3710
|
+
cad_component_id: z173.string(),
|
|
3711
|
+
pcb_component_id: z173.string(),
|
|
3712
|
+
source_component_id: z173.string(),
|
|
3681
3713
|
position: point3,
|
|
3682
3714
|
rotation: point3.optional(),
|
|
3683
3715
|
size: point3.optional(),
|
|
3684
3716
|
layer: layer_ref.optional(),
|
|
3685
|
-
subcircuit_id:
|
|
3717
|
+
subcircuit_id: z173.string().optional(),
|
|
3686
3718
|
// These are all ways to generate/load the 3d model
|
|
3687
|
-
footprinter_string:
|
|
3688
|
-
model_obj_url:
|
|
3689
|
-
model_stl_url:
|
|
3690
|
-
model_3mf_url:
|
|
3691
|
-
model_gltf_url:
|
|
3692
|
-
model_glb_url:
|
|
3693
|
-
model_step_url:
|
|
3694
|
-
model_wrl_url:
|
|
3719
|
+
footprinter_string: z173.string().optional(),
|
|
3720
|
+
model_obj_url: z173.string().optional(),
|
|
3721
|
+
model_stl_url: z173.string().optional(),
|
|
3722
|
+
model_3mf_url: z173.string().optional(),
|
|
3723
|
+
model_gltf_url: z173.string().optional(),
|
|
3724
|
+
model_glb_url: z173.string().optional(),
|
|
3725
|
+
model_step_url: z173.string().optional(),
|
|
3726
|
+
model_wrl_url: z173.string().optional(),
|
|
3695
3727
|
model_asset: asset.optional(),
|
|
3696
|
-
model_unit_to_mm_scale_factor:
|
|
3697
|
-
model_board_normal_direction:
|
|
3728
|
+
model_unit_to_mm_scale_factor: z173.number().optional(),
|
|
3729
|
+
model_board_normal_direction: z173.enum(cad_model_axis_directions).optional().describe(
|
|
3698
3730
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
3699
3731
|
),
|
|
3700
3732
|
model_origin_position: point3.optional(),
|
|
3701
|
-
model_origin_alignment:
|
|
3733
|
+
model_origin_alignment: z173.enum([
|
|
3702
3734
|
"unknown",
|
|
3703
3735
|
"center",
|
|
3704
3736
|
"center_of_component_on_board_surface",
|
|
3705
3737
|
"bottom_center_of_component"
|
|
3706
3738
|
]).optional(),
|
|
3707
|
-
model_object_fit:
|
|
3708
|
-
model_jscad:
|
|
3709
|
-
show_as_translucent_model:
|
|
3710
|
-
show_as_bounding_box:
|
|
3711
|
-
show_hidden_edges:
|
|
3712
|
-
anchor_alignment:
|
|
3739
|
+
model_object_fit: z173.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
3740
|
+
model_jscad: z173.any().optional(),
|
|
3741
|
+
show_as_translucent_model: z173.boolean().optional(),
|
|
3742
|
+
show_as_bounding_box: z173.boolean().optional(),
|
|
3743
|
+
show_hidden_edges: z173.boolean().optional(),
|
|
3744
|
+
anchor_alignment: z173.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
3713
3745
|
}).describe("Defines a component on the PCB");
|
|
3714
3746
|
expectTypesMatch(true);
|
|
3715
3747
|
|
|
3716
3748
|
// src/simulation/simulation_voltage_source.ts
|
|
3717
|
-
import { z as
|
|
3718
|
-
var wave_shape =
|
|
3719
|
-
var percentage =
|
|
3749
|
+
import { z as z174 } from "zod";
|
|
3750
|
+
var wave_shape = z174.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
3751
|
+
var percentage = z174.union([z174.string(), z174.number()]).transform((val) => {
|
|
3720
3752
|
if (typeof val === "string") {
|
|
3721
3753
|
if (val.endsWith("%")) {
|
|
3722
3754
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3725,32 +3757,32 @@ var percentage = z173.union([z173.string(), z173.number()]).transform((val) => {
|
|
|
3725
3757
|
}
|
|
3726
3758
|
return val;
|
|
3727
3759
|
}).pipe(
|
|
3728
|
-
|
|
3760
|
+
z174.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3729
3761
|
);
|
|
3730
|
-
var simulation_dc_voltage_source =
|
|
3731
|
-
type:
|
|
3762
|
+
var simulation_dc_voltage_source = z174.object({
|
|
3763
|
+
type: z174.literal("simulation_voltage_source"),
|
|
3732
3764
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3733
3765
|
"simulation_voltage_source"
|
|
3734
3766
|
),
|
|
3735
|
-
is_dc_source:
|
|
3736
|
-
positive_source_port_id:
|
|
3737
|
-
negative_source_port_id:
|
|
3738
|
-
positive_source_net_id:
|
|
3739
|
-
negative_source_net_id:
|
|
3767
|
+
is_dc_source: z174.literal(true).optional().default(true),
|
|
3768
|
+
positive_source_port_id: z174.string().optional(),
|
|
3769
|
+
negative_source_port_id: z174.string().optional(),
|
|
3770
|
+
positive_source_net_id: z174.string().optional(),
|
|
3771
|
+
negative_source_net_id: z174.string().optional(),
|
|
3740
3772
|
voltage,
|
|
3741
3773
|
ac_magnitude: voltage.optional(),
|
|
3742
3774
|
ac_phase: rotation.optional()
|
|
3743
3775
|
}).describe("Defines a DC voltage source for simulation");
|
|
3744
|
-
var simulation_ac_voltage_source =
|
|
3745
|
-
type:
|
|
3776
|
+
var simulation_ac_voltage_source = z174.object({
|
|
3777
|
+
type: z174.literal("simulation_voltage_source"),
|
|
3746
3778
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3747
3779
|
"simulation_voltage_source"
|
|
3748
3780
|
),
|
|
3749
|
-
is_dc_source:
|
|
3750
|
-
terminal1_source_port_id:
|
|
3751
|
-
terminal2_source_port_id:
|
|
3752
|
-
terminal1_source_net_id:
|
|
3753
|
-
terminal2_source_net_id:
|
|
3781
|
+
is_dc_source: z174.literal(false),
|
|
3782
|
+
terminal1_source_port_id: z174.string().optional(),
|
|
3783
|
+
terminal2_source_port_id: z174.string().optional(),
|
|
3784
|
+
terminal1_source_net_id: z174.string().optional(),
|
|
3785
|
+
terminal2_source_net_id: z174.string().optional(),
|
|
3754
3786
|
voltage: voltage.optional(),
|
|
3755
3787
|
frequency: frequency.optional(),
|
|
3756
3788
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -3765,14 +3797,14 @@ var simulation_ac_voltage_source = z173.object({
|
|
|
3765
3797
|
ac_magnitude: voltage.optional(),
|
|
3766
3798
|
ac_phase: rotation.optional()
|
|
3767
3799
|
}).describe("Defines an AC voltage source for simulation");
|
|
3768
|
-
var simulation_voltage_source =
|
|
3800
|
+
var simulation_voltage_source = z174.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
3769
3801
|
expectTypesMatch(true);
|
|
3770
3802
|
expectTypesMatch(true);
|
|
3771
3803
|
expectTypesMatch(true);
|
|
3772
3804
|
|
|
3773
3805
|
// src/simulation/simulation_current_source.ts
|
|
3774
|
-
import { z as
|
|
3775
|
-
var percentage2 =
|
|
3806
|
+
import { z as z175 } from "zod";
|
|
3807
|
+
var percentage2 = z175.union([z175.string(), z175.number()]).transform((val) => {
|
|
3776
3808
|
if (typeof val === "string") {
|
|
3777
3809
|
if (val.endsWith("%")) {
|
|
3778
3810
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3781,32 +3813,32 @@ var percentage2 = z174.union([z174.string(), z174.number()]).transform((val) =>
|
|
|
3781
3813
|
}
|
|
3782
3814
|
return val;
|
|
3783
3815
|
}).pipe(
|
|
3784
|
-
|
|
3816
|
+
z175.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3785
3817
|
);
|
|
3786
|
-
var simulation_dc_current_source =
|
|
3787
|
-
type:
|
|
3818
|
+
var simulation_dc_current_source = z175.object({
|
|
3819
|
+
type: z175.literal("simulation_current_source"),
|
|
3788
3820
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3789
3821
|
"simulation_current_source"
|
|
3790
3822
|
),
|
|
3791
|
-
is_dc_source:
|
|
3792
|
-
positive_source_port_id:
|
|
3793
|
-
negative_source_port_id:
|
|
3794
|
-
positive_source_net_id:
|
|
3795
|
-
negative_source_net_id:
|
|
3823
|
+
is_dc_source: z175.literal(true).optional().default(true),
|
|
3824
|
+
positive_source_port_id: z175.string().optional(),
|
|
3825
|
+
negative_source_port_id: z175.string().optional(),
|
|
3826
|
+
positive_source_net_id: z175.string().optional(),
|
|
3827
|
+
negative_source_net_id: z175.string().optional(),
|
|
3796
3828
|
current,
|
|
3797
3829
|
ac_magnitude: current.optional(),
|
|
3798
3830
|
ac_phase: rotation.optional()
|
|
3799
3831
|
}).describe("Defines a DC current source for simulation");
|
|
3800
|
-
var simulation_ac_current_source =
|
|
3801
|
-
type:
|
|
3832
|
+
var simulation_ac_current_source = z175.object({
|
|
3833
|
+
type: z175.literal("simulation_current_source"),
|
|
3802
3834
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3803
3835
|
"simulation_current_source"
|
|
3804
3836
|
),
|
|
3805
|
-
is_dc_source:
|
|
3806
|
-
terminal1_source_port_id:
|
|
3807
|
-
terminal2_source_port_id:
|
|
3808
|
-
terminal1_source_net_id:
|
|
3809
|
-
terminal2_source_net_id:
|
|
3837
|
+
is_dc_source: z175.literal(false),
|
|
3838
|
+
terminal1_source_port_id: z175.string().optional(),
|
|
3839
|
+
terminal2_source_port_id: z175.string().optional(),
|
|
3840
|
+
terminal1_source_net_id: z175.string().optional(),
|
|
3841
|
+
terminal2_source_net_id: z175.string().optional(),
|
|
3810
3842
|
current: current.optional(),
|
|
3811
3843
|
frequency: frequency.optional(),
|
|
3812
3844
|
peak_to_peak_current: current.optional(),
|
|
@@ -3816,58 +3848,58 @@ var simulation_ac_current_source = z174.object({
|
|
|
3816
3848
|
ac_magnitude: current.optional(),
|
|
3817
3849
|
ac_phase: rotation.optional()
|
|
3818
3850
|
}).describe("Defines an AC current source for simulation");
|
|
3819
|
-
var simulation_current_source =
|
|
3851
|
+
var simulation_current_source = z175.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
3820
3852
|
expectTypesMatch(true);
|
|
3821
3853
|
expectTypesMatch(true);
|
|
3822
3854
|
expectTypesMatch(true);
|
|
3823
3855
|
|
|
3824
3856
|
// src/simulation/simulation_experiment.ts
|
|
3825
|
-
import { z as
|
|
3857
|
+
import { z as z177 } from "zod";
|
|
3826
3858
|
|
|
3827
3859
|
// src/simulation/simulation_units.ts
|
|
3828
|
-
import { z as
|
|
3829
|
-
var simulation_dc_sweep_unit =
|
|
3860
|
+
import { z as z176 } from "zod";
|
|
3861
|
+
var simulation_dc_sweep_unit = z176.custom(
|
|
3830
3862
|
(dcSweepUnit) => dcSweepUnit === "V" || dcSweepUnit === "A"
|
|
3831
3863
|
);
|
|
3832
|
-
var simulation_parameter_unit =
|
|
3864
|
+
var simulation_parameter_unit = z176.custom(
|
|
3833
3865
|
(parameterUnit) => parameterUnit === "\u03A9" || parameterUnit === "F" || parameterUnit === "H" || parameterUnit === "V" || parameterUnit === "A"
|
|
3834
3866
|
);
|
|
3835
3867
|
|
|
3836
3868
|
// src/simulation/simulation_experiment.ts
|
|
3837
|
-
var experiment_type =
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3869
|
+
var experiment_type = z177.union([
|
|
3870
|
+
z177.literal("spice_dc_sweep"),
|
|
3871
|
+
z177.literal("spice_dc_operating_point"),
|
|
3872
|
+
z177.literal("spice_transient_analysis"),
|
|
3873
|
+
z177.literal("spice_ac_analysis")
|
|
3842
3874
|
]);
|
|
3843
|
-
var spice_simulation_options =
|
|
3844
|
-
method:
|
|
3845
|
-
reltol:
|
|
3846
|
-
abstol:
|
|
3847
|
-
vntol:
|
|
3875
|
+
var spice_simulation_options = z177.object({
|
|
3876
|
+
method: z177.enum(["trap", "gear"]).optional(),
|
|
3877
|
+
reltol: z177.union([z177.number(), z177.string()]).optional(),
|
|
3878
|
+
abstol: z177.union([z177.number(), z177.string()]).optional(),
|
|
3879
|
+
vntol: z177.union([z177.number(), z177.string()]).optional()
|
|
3848
3880
|
}).describe("SPICE solver options for a simulation experiment");
|
|
3849
|
-
var simulation_experiment =
|
|
3850
|
-
type:
|
|
3881
|
+
var simulation_experiment = z177.object({
|
|
3882
|
+
type: z177.literal("simulation_experiment"),
|
|
3851
3883
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
3852
3884
|
"simulation_experiment"
|
|
3853
3885
|
),
|
|
3854
|
-
name:
|
|
3886
|
+
name: z177.string(),
|
|
3855
3887
|
experiment_type,
|
|
3856
3888
|
time_per_step: duration_ms.optional(),
|
|
3857
3889
|
start_time_ms: ms.optional(),
|
|
3858
3890
|
end_time_ms: ms.optional(),
|
|
3859
3891
|
spice_options: spice_simulation_options.optional(),
|
|
3860
|
-
dc_sweep_voltage_source_id:
|
|
3861
|
-
dc_sweep_current_source_id:
|
|
3862
|
-
dc_sweep_start:
|
|
3863
|
-
dc_sweep_stop:
|
|
3864
|
-
dc_sweep_step:
|
|
3892
|
+
dc_sweep_voltage_source_id: z177.string().optional(),
|
|
3893
|
+
dc_sweep_current_source_id: z177.string().optional(),
|
|
3894
|
+
dc_sweep_start: z177.number().optional(),
|
|
3895
|
+
dc_sweep_stop: z177.number().optional(),
|
|
3896
|
+
dc_sweep_step: z177.number().refine((dcSweepStep) => dcSweepStep !== 0).optional(),
|
|
3865
3897
|
dc_sweep_unit: simulation_dc_sweep_unit.optional(),
|
|
3866
|
-
ac_sweep_type:
|
|
3867
|
-
ac_samples_per_interval:
|
|
3868
|
-
ac_sample_count:
|
|
3869
|
-
ac_start_frequency_hz:
|
|
3870
|
-
ac_stop_frequency_hz:
|
|
3898
|
+
ac_sweep_type: z177.enum(["linear", "decade", "octave"]).optional(),
|
|
3899
|
+
ac_samples_per_interval: z177.number().int().positive().optional(),
|
|
3900
|
+
ac_sample_count: z177.number().int().positive().optional(),
|
|
3901
|
+
ac_start_frequency_hz: z177.number().positive().optional(),
|
|
3902
|
+
ac_stop_frequency_hz: z177.number().positive().optional()
|
|
3871
3903
|
}).superRefine((experiment, context) => {
|
|
3872
3904
|
if (experiment.experiment_type === "spice_dc_sweep") {
|
|
3873
3905
|
const requiredFields = [
|
|
@@ -3879,7 +3911,7 @@ var simulation_experiment = z176.object({
|
|
|
3879
3911
|
for (const field of requiredFields) {
|
|
3880
3912
|
if (experiment[field] === void 0) {
|
|
3881
3913
|
context.addIssue({
|
|
3882
|
-
code:
|
|
3914
|
+
code: z177.ZodIssueCode.custom,
|
|
3883
3915
|
path: [field],
|
|
3884
3916
|
message: `${field} is required for a DC sweep`
|
|
3885
3917
|
});
|
|
@@ -3889,7 +3921,7 @@ var simulation_experiment = z176.object({
|
|
|
3889
3921
|
const hasCurrentSource = experiment.dc_sweep_current_source_id !== void 0;
|
|
3890
3922
|
if (hasVoltageSource === hasCurrentSource) {
|
|
3891
3923
|
context.addIssue({
|
|
3892
|
-
code:
|
|
3924
|
+
code: z177.ZodIssueCode.custom,
|
|
3893
3925
|
path: ["dc_sweep_voltage_source_id"],
|
|
3894
3926
|
message: "Exactly one DC sweep voltage or current source ID is required"
|
|
3895
3927
|
});
|
|
@@ -3898,35 +3930,35 @@ var simulation_experiment = z176.object({
|
|
|
3898
3930
|
if (experiment.experiment_type === "spice_ac_analysis") {
|
|
3899
3931
|
if (experiment.ac_sweep_type === void 0) {
|
|
3900
3932
|
context.addIssue({
|
|
3901
|
-
code:
|
|
3933
|
+
code: z177.ZodIssueCode.custom,
|
|
3902
3934
|
path: ["ac_sweep_type"],
|
|
3903
3935
|
message: "ac_sweep_type is required for an AC analysis"
|
|
3904
3936
|
});
|
|
3905
3937
|
}
|
|
3906
3938
|
if (experiment.ac_start_frequency_hz === void 0) {
|
|
3907
3939
|
context.addIssue({
|
|
3908
|
-
code:
|
|
3940
|
+
code: z177.ZodIssueCode.custom,
|
|
3909
3941
|
path: ["ac_start_frequency_hz"],
|
|
3910
3942
|
message: "ac_start_frequency_hz is required for an AC analysis"
|
|
3911
3943
|
});
|
|
3912
3944
|
}
|
|
3913
3945
|
if (experiment.ac_stop_frequency_hz === void 0) {
|
|
3914
3946
|
context.addIssue({
|
|
3915
|
-
code:
|
|
3947
|
+
code: z177.ZodIssueCode.custom,
|
|
3916
3948
|
path: ["ac_stop_frequency_hz"],
|
|
3917
3949
|
message: "ac_stop_frequency_hz is required for an AC analysis"
|
|
3918
3950
|
});
|
|
3919
3951
|
}
|
|
3920
3952
|
if (experiment.ac_sweep_type === "linear" && experiment.ac_sample_count === void 0) {
|
|
3921
3953
|
context.addIssue({
|
|
3922
|
-
code:
|
|
3954
|
+
code: z177.ZodIssueCode.custom,
|
|
3923
3955
|
path: ["ac_sample_count"],
|
|
3924
3956
|
message: "ac_sample_count is required for a linear AC analysis"
|
|
3925
3957
|
});
|
|
3926
3958
|
}
|
|
3927
3959
|
if ((experiment.ac_sweep_type === "decade" || experiment.ac_sweep_type === "octave") && experiment.ac_samples_per_interval === void 0) {
|
|
3928
3960
|
context.addIssue({
|
|
3929
|
-
code:
|
|
3961
|
+
code: z177.ZodIssueCode.custom,
|
|
3930
3962
|
path: ["ac_samples_per_interval"],
|
|
3931
3963
|
message: "ac_samples_per_interval is required for decade and octave AC analyses"
|
|
3932
3964
|
});
|
|
@@ -3936,87 +3968,87 @@ var simulation_experiment = z176.object({
|
|
|
3936
3968
|
expectTypesMatch(true);
|
|
3937
3969
|
|
|
3938
3970
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
3939
|
-
import { z as
|
|
3971
|
+
import { z as z179 } from "zod";
|
|
3940
3972
|
|
|
3941
3973
|
// src/simulation/simulation_parameter_sweep_coordinate.ts
|
|
3942
|
-
import { z as
|
|
3943
|
-
var simulation_parameter_sweep_coordinate =
|
|
3944
|
-
simulation_parameter_sweep_id:
|
|
3945
|
-
sweep_index:
|
|
3946
|
-
parameter_value:
|
|
3974
|
+
import { z as z178 } from "zod";
|
|
3975
|
+
var simulation_parameter_sweep_coordinate = z178.object({
|
|
3976
|
+
simulation_parameter_sweep_id: z178.string(),
|
|
3977
|
+
sweep_index: z178.number().int().nonnegative(),
|
|
3978
|
+
parameter_value: z178.number(),
|
|
3947
3979
|
parameter_unit: simulation_parameter_unit
|
|
3948
3980
|
});
|
|
3949
3981
|
expectTypesMatch(true);
|
|
3950
3982
|
|
|
3951
3983
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
3952
|
-
var simulation_transient_voltage_graph =
|
|
3953
|
-
type:
|
|
3984
|
+
var simulation_transient_voltage_graph = z179.object({
|
|
3985
|
+
type: z179.literal("simulation_transient_voltage_graph"),
|
|
3954
3986
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
3955
3987
|
"simulation_transient_voltage_graph"
|
|
3956
3988
|
),
|
|
3957
|
-
simulation_experiment_id:
|
|
3989
|
+
simulation_experiment_id: z179.string(),
|
|
3958
3990
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
3959
|
-
timestamps_ms:
|
|
3960
|
-
voltage_levels:
|
|
3961
|
-
source_component_id:
|
|
3962
|
-
subcircuit_connectivity_map_key:
|
|
3991
|
+
timestamps_ms: z179.array(z179.number()).optional(),
|
|
3992
|
+
voltage_levels: z179.array(z179.number()),
|
|
3993
|
+
source_component_id: z179.string().optional(),
|
|
3994
|
+
subcircuit_connectivity_map_key: z179.string().optional(),
|
|
3963
3995
|
time_per_step: duration_ms,
|
|
3964
3996
|
start_time_ms: ms,
|
|
3965
3997
|
end_time_ms: ms,
|
|
3966
|
-
name:
|
|
3967
|
-
color:
|
|
3998
|
+
name: z179.string().optional(),
|
|
3999
|
+
color: z179.string().optional()
|
|
3968
4000
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
3969
4001
|
expectTypesMatch(true);
|
|
3970
4002
|
|
|
3971
4003
|
// src/simulation/simulation_transient_current_graph.ts
|
|
3972
|
-
import { z as
|
|
3973
|
-
var simulation_transient_current_graph =
|
|
3974
|
-
type:
|
|
4004
|
+
import { z as z180 } from "zod";
|
|
4005
|
+
var simulation_transient_current_graph = z180.object({
|
|
4006
|
+
type: z180.literal("simulation_transient_current_graph"),
|
|
3975
4007
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
3976
4008
|
"simulation_transient_current_graph"
|
|
3977
4009
|
),
|
|
3978
|
-
simulation_experiment_id:
|
|
4010
|
+
simulation_experiment_id: z180.string(),
|
|
3979
4011
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
3980
|
-
timestamps_ms:
|
|
3981
|
-
current_levels:
|
|
3982
|
-
source_component_id:
|
|
3983
|
-
subcircuit_connectivity_map_key:
|
|
4012
|
+
timestamps_ms: z180.array(z180.number()).optional(),
|
|
4013
|
+
current_levels: z180.array(z180.number()),
|
|
4014
|
+
source_component_id: z180.string().optional(),
|
|
4015
|
+
subcircuit_connectivity_map_key: z180.string().optional(),
|
|
3984
4016
|
time_per_step: duration_ms,
|
|
3985
4017
|
start_time_ms: ms,
|
|
3986
4018
|
end_time_ms: ms,
|
|
3987
|
-
name:
|
|
3988
|
-
color:
|
|
4019
|
+
name: z180.string().optional(),
|
|
4020
|
+
color: z180.string().optional()
|
|
3989
4021
|
}).describe("Stores current measurements over time for a simulation");
|
|
3990
4022
|
expectTypesMatch(true);
|
|
3991
4023
|
|
|
3992
4024
|
// src/simulation/simulation_switch.ts
|
|
3993
|
-
import { z as
|
|
3994
|
-
var simulation_switch =
|
|
3995
|
-
type:
|
|
4025
|
+
import { z as z181 } from "zod";
|
|
4026
|
+
var simulation_switch = z181.object({
|
|
4027
|
+
type: z181.literal("simulation_switch"),
|
|
3996
4028
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
3997
|
-
source_component_id:
|
|
4029
|
+
source_component_id: z181.string().optional(),
|
|
3998
4030
|
closes_at: ms.optional(),
|
|
3999
4031
|
opens_at: ms.optional(),
|
|
4000
|
-
starts_closed:
|
|
4032
|
+
starts_closed: z181.boolean().optional(),
|
|
4001
4033
|
switching_frequency: frequency.optional()
|
|
4002
4034
|
}).describe("Defines a switch for simulation timing control");
|
|
4003
4035
|
expectTypesMatch(true);
|
|
4004
4036
|
|
|
4005
4037
|
// src/simulation/simulation_voltage_probe.ts
|
|
4006
|
-
import { z as
|
|
4007
|
-
var simulation_voltage_probe =
|
|
4008
|
-
type:
|
|
4038
|
+
import { z as z182 } from "zod";
|
|
4039
|
+
var simulation_voltage_probe = z182.object({
|
|
4040
|
+
type: z182.literal("simulation_voltage_probe"),
|
|
4009
4041
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
4010
4042
|
"simulation_voltage_probe"
|
|
4011
4043
|
),
|
|
4012
|
-
source_component_id:
|
|
4013
|
-
name:
|
|
4014
|
-
signal_input_source_port_id:
|
|
4015
|
-
signal_input_source_net_id:
|
|
4016
|
-
reference_input_source_port_id:
|
|
4017
|
-
reference_input_source_net_id:
|
|
4018
|
-
subcircuit_id:
|
|
4019
|
-
color:
|
|
4044
|
+
source_component_id: z182.string().optional(),
|
|
4045
|
+
name: z182.string().optional(),
|
|
4046
|
+
signal_input_source_port_id: z182.string().optional(),
|
|
4047
|
+
signal_input_source_net_id: z182.string().optional(),
|
|
4048
|
+
reference_input_source_port_id: z182.string().optional(),
|
|
4049
|
+
reference_input_source_net_id: z182.string().optional(),
|
|
4050
|
+
subcircuit_id: z182.string().optional(),
|
|
4051
|
+
color: z182.string().optional()
|
|
4020
4052
|
}).describe(
|
|
4021
4053
|
"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."
|
|
4022
4054
|
).superRefine((data, ctx) => {
|
|
@@ -4026,20 +4058,20 @@ var simulation_voltage_probe = z181.object({
|
|
|
4026
4058
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
4027
4059
|
if (has_ports && has_nets) {
|
|
4028
4060
|
ctx.addIssue({
|
|
4029
|
-
code:
|
|
4061
|
+
code: z182.ZodIssueCode.custom,
|
|
4030
4062
|
message: "Cannot mix port and net connections in a differential probe."
|
|
4031
4063
|
});
|
|
4032
4064
|
} else if (has_ports) {
|
|
4033
4065
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
4034
4066
|
ctx.addIssue({
|
|
4035
|
-
code:
|
|
4067
|
+
code: z182.ZodIssueCode.custom,
|
|
4036
4068
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
4037
4069
|
});
|
|
4038
4070
|
}
|
|
4039
4071
|
} else if (has_nets) {
|
|
4040
4072
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
4041
4073
|
ctx.addIssue({
|
|
4042
|
-
code:
|
|
4074
|
+
code: z182.ZodIssueCode.custom,
|
|
4043
4075
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
4044
4076
|
});
|
|
4045
4077
|
}
|
|
@@ -4047,7 +4079,7 @@ var simulation_voltage_probe = z181.object({
|
|
|
4047
4079
|
} else {
|
|
4048
4080
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
4049
4081
|
ctx.addIssue({
|
|
4050
|
-
code:
|
|
4082
|
+
code: z182.ZodIssueCode.custom,
|
|
4051
4083
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
4052
4084
|
});
|
|
4053
4085
|
}
|
|
@@ -4056,20 +4088,20 @@ var simulation_voltage_probe = z181.object({
|
|
|
4056
4088
|
expectTypesMatch(true);
|
|
4057
4089
|
|
|
4058
4090
|
// src/simulation/simulation_current_probe.ts
|
|
4059
|
-
import { z as
|
|
4060
|
-
var simulation_current_probe =
|
|
4061
|
-
type:
|
|
4091
|
+
import { z as z183 } from "zod";
|
|
4092
|
+
var simulation_current_probe = z183.object({
|
|
4093
|
+
type: z183.literal("simulation_current_probe"),
|
|
4062
4094
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
4063
4095
|
"simulation_current_probe"
|
|
4064
4096
|
),
|
|
4065
|
-
source_component_id:
|
|
4066
|
-
name:
|
|
4067
|
-
positive_source_port_id:
|
|
4068
|
-
negative_source_port_id:
|
|
4069
|
-
positive_source_net_id:
|
|
4070
|
-
negative_source_net_id:
|
|
4071
|
-
subcircuit_id:
|
|
4072
|
-
color:
|
|
4097
|
+
source_component_id: z183.string().optional(),
|
|
4098
|
+
name: z183.string().optional(),
|
|
4099
|
+
positive_source_port_id: z183.string().optional(),
|
|
4100
|
+
negative_source_port_id: z183.string().optional(),
|
|
4101
|
+
positive_source_net_id: z183.string().optional(),
|
|
4102
|
+
negative_source_net_id: z183.string().optional(),
|
|
4103
|
+
subcircuit_id: z183.string().optional(),
|
|
4104
|
+
color: z183.string().optional()
|
|
4073
4105
|
}).describe(
|
|
4074
4106
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
4075
4107
|
).superRefine((data, ctx) => {
|
|
@@ -4081,7 +4113,7 @@ var simulation_current_probe = z182.object({
|
|
|
4081
4113
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
4082
4114
|
if (hasPorts && hasNets) {
|
|
4083
4115
|
ctx.addIssue({
|
|
4084
|
-
code:
|
|
4116
|
+
code: z183.ZodIssueCode.custom,
|
|
4085
4117
|
message: "Cannot mix port and net connections in a current probe."
|
|
4086
4118
|
});
|
|
4087
4119
|
return;
|
|
@@ -4089,7 +4121,7 @@ var simulation_current_probe = z182.object({
|
|
|
4089
4121
|
if (hasPorts) {
|
|
4090
4122
|
if (!hasPositivePort || !hasNegativePort) {
|
|
4091
4123
|
ctx.addIssue({
|
|
4092
|
-
code:
|
|
4124
|
+
code: z183.ZodIssueCode.custom,
|
|
4093
4125
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
4094
4126
|
});
|
|
4095
4127
|
}
|
|
@@ -4098,71 +4130,71 @@ var simulation_current_probe = z182.object({
|
|
|
4098
4130
|
if (hasNets) {
|
|
4099
4131
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
4100
4132
|
ctx.addIssue({
|
|
4101
|
-
code:
|
|
4133
|
+
code: z183.ZodIssueCode.custom,
|
|
4102
4134
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
4103
4135
|
});
|
|
4104
4136
|
}
|
|
4105
4137
|
return;
|
|
4106
4138
|
}
|
|
4107
4139
|
ctx.addIssue({
|
|
4108
|
-
code:
|
|
4140
|
+
code: z183.ZodIssueCode.custom,
|
|
4109
4141
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
4110
4142
|
});
|
|
4111
4143
|
});
|
|
4112
4144
|
expectTypesMatch(true);
|
|
4113
4145
|
|
|
4114
4146
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
4115
|
-
import { z as
|
|
4147
|
+
import { z as z184 } from "zod";
|
|
4116
4148
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
4117
|
-
type:
|
|
4149
|
+
type: z184.literal("simulation_unknown_experiment_error"),
|
|
4118
4150
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
4119
4151
|
"simulation_unknown_experiment_error"
|
|
4120
4152
|
),
|
|
4121
|
-
error_type:
|
|
4122
|
-
simulation_experiment_id:
|
|
4123
|
-
subcircuit_id:
|
|
4153
|
+
error_type: z184.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
4154
|
+
simulation_experiment_id: z184.string().optional(),
|
|
4155
|
+
subcircuit_id: z184.string().optional()
|
|
4124
4156
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
4125
4157
|
expectTypesMatch(true);
|
|
4126
4158
|
|
|
4127
4159
|
// src/simulation/simulation_parameter_sweep.ts
|
|
4128
|
-
import { z as
|
|
4129
|
-
var simulation_parameter_type =
|
|
4160
|
+
import { z as z185 } from "zod";
|
|
4161
|
+
var simulation_parameter_type = z185.enum([
|
|
4130
4162
|
"resistance",
|
|
4131
4163
|
"capacitance",
|
|
4132
4164
|
"inductance",
|
|
4133
4165
|
"voltage",
|
|
4134
4166
|
"current"
|
|
4135
4167
|
]);
|
|
4136
|
-
var simulation_parameter_sweep_base =
|
|
4137
|
-
type:
|
|
4168
|
+
var simulation_parameter_sweep_base = z185.object({
|
|
4169
|
+
type: z185.literal("simulation_parameter_sweep"),
|
|
4138
4170
|
simulation_parameter_sweep_id: getZodPrefixedIdWithDefault(
|
|
4139
4171
|
"simulation_parameter_sweep"
|
|
4140
4172
|
),
|
|
4141
|
-
simulation_experiment_id:
|
|
4142
|
-
name:
|
|
4143
|
-
parameter_values:
|
|
4173
|
+
simulation_experiment_id: z185.string(),
|
|
4174
|
+
name: z185.string().optional(),
|
|
4175
|
+
parameter_values: z185.array(z185.number()).min(1),
|
|
4144
4176
|
parameter_unit: simulation_parameter_unit
|
|
4145
4177
|
});
|
|
4146
|
-
var simulation_parameter_sweep =
|
|
4178
|
+
var simulation_parameter_sweep = z185.discriminatedUnion("parameter_type", [
|
|
4147
4179
|
simulation_parameter_sweep_base.extend({
|
|
4148
|
-
parameter_type:
|
|
4149
|
-
resistor_source_component_id:
|
|
4180
|
+
parameter_type: z185.literal("resistance"),
|
|
4181
|
+
resistor_source_component_id: z185.string()
|
|
4150
4182
|
}),
|
|
4151
4183
|
simulation_parameter_sweep_base.extend({
|
|
4152
|
-
parameter_type:
|
|
4153
|
-
capacitor_source_component_id:
|
|
4184
|
+
parameter_type: z185.literal("capacitance"),
|
|
4185
|
+
capacitor_source_component_id: z185.string()
|
|
4154
4186
|
}),
|
|
4155
4187
|
simulation_parameter_sweep_base.extend({
|
|
4156
|
-
parameter_type:
|
|
4157
|
-
inductor_source_component_id:
|
|
4188
|
+
parameter_type: z185.literal("inductance"),
|
|
4189
|
+
inductor_source_component_id: z185.string()
|
|
4158
4190
|
}),
|
|
4159
4191
|
simulation_parameter_sweep_base.extend({
|
|
4160
|
-
parameter_type:
|
|
4161
|
-
source_net_id:
|
|
4192
|
+
parameter_type: z185.literal("voltage"),
|
|
4193
|
+
source_net_id: z185.string()
|
|
4162
4194
|
}),
|
|
4163
4195
|
simulation_parameter_sweep_base.extend({
|
|
4164
|
-
parameter_type:
|
|
4165
|
-
current_source_component_id:
|
|
4196
|
+
parameter_type: z185.literal("current"),
|
|
4197
|
+
current_source_component_id: z185.string()
|
|
4166
4198
|
})
|
|
4167
4199
|
]).describe("Repeats a simulation experiment over component parameter values");
|
|
4168
4200
|
expectTypesMatch(
|
|
@@ -4170,52 +4202,52 @@ expectTypesMatch(
|
|
|
4170
4202
|
);
|
|
4171
4203
|
|
|
4172
4204
|
// src/simulation/simulation_dc_operating_point_voltage.ts
|
|
4173
|
-
import { z as
|
|
4174
|
-
var simulation_dc_operating_point_voltage =
|
|
4175
|
-
type:
|
|
4205
|
+
import { z as z186 } from "zod";
|
|
4206
|
+
var simulation_dc_operating_point_voltage = z186.object({
|
|
4207
|
+
type: z186.literal("simulation_dc_operating_point_voltage"),
|
|
4176
4208
|
simulation_dc_operating_point_voltage_id: getZodPrefixedIdWithDefault(
|
|
4177
4209
|
"simulation_dc_operating_point_voltage"
|
|
4178
4210
|
),
|
|
4179
|
-
simulation_experiment_id:
|
|
4211
|
+
simulation_experiment_id: z186.string(),
|
|
4180
4212
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4181
|
-
simulation_voltage_probe_id:
|
|
4182
|
-
voltage:
|
|
4183
|
-
name:
|
|
4184
|
-
color:
|
|
4213
|
+
simulation_voltage_probe_id: z186.string(),
|
|
4214
|
+
voltage: z186.number(),
|
|
4215
|
+
name: z186.string().optional(),
|
|
4216
|
+
color: z186.string().optional()
|
|
4185
4217
|
});
|
|
4186
4218
|
expectTypesMatch(true);
|
|
4187
4219
|
|
|
4188
4220
|
// src/simulation/simulation_dc_operating_point_current.ts
|
|
4189
|
-
import { z as
|
|
4190
|
-
var simulation_dc_operating_point_current =
|
|
4191
|
-
type:
|
|
4221
|
+
import { z as z187 } from "zod";
|
|
4222
|
+
var simulation_dc_operating_point_current = z187.object({
|
|
4223
|
+
type: z187.literal("simulation_dc_operating_point_current"),
|
|
4192
4224
|
simulation_dc_operating_point_current_id: getZodPrefixedIdWithDefault(
|
|
4193
4225
|
"simulation_dc_operating_point_current"
|
|
4194
4226
|
),
|
|
4195
|
-
simulation_experiment_id:
|
|
4227
|
+
simulation_experiment_id: z187.string(),
|
|
4196
4228
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4197
|
-
simulation_current_probe_id:
|
|
4198
|
-
current:
|
|
4199
|
-
name:
|
|
4200
|
-
color:
|
|
4229
|
+
simulation_current_probe_id: z187.string(),
|
|
4230
|
+
current: z187.number(),
|
|
4231
|
+
name: z187.string().optional(),
|
|
4232
|
+
color: z187.string().optional()
|
|
4201
4233
|
});
|
|
4202
4234
|
expectTypesMatch(true);
|
|
4203
4235
|
|
|
4204
4236
|
// src/simulation/simulation_dc_sweep_voltage_graph.ts
|
|
4205
|
-
import { z as
|
|
4206
|
-
var simulation_dc_sweep_voltage_graph =
|
|
4207
|
-
type:
|
|
4237
|
+
import { z as z188 } from "zod";
|
|
4238
|
+
var simulation_dc_sweep_voltage_graph = z188.object({
|
|
4239
|
+
type: z188.literal("simulation_dc_sweep_voltage_graph"),
|
|
4208
4240
|
simulation_dc_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4209
4241
|
"simulation_dc_sweep_voltage_graph"
|
|
4210
4242
|
),
|
|
4211
|
-
simulation_experiment_id:
|
|
4243
|
+
simulation_experiment_id: z188.string(),
|
|
4212
4244
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4213
|
-
simulation_voltage_probe_id:
|
|
4214
|
-
sweep_values:
|
|
4245
|
+
simulation_voltage_probe_id: z188.string(),
|
|
4246
|
+
sweep_values: z188.array(z188.number()),
|
|
4215
4247
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4216
|
-
voltage_levels:
|
|
4217
|
-
name:
|
|
4218
|
-
color:
|
|
4248
|
+
voltage_levels: z188.array(z188.number()),
|
|
4249
|
+
name: z188.string().optional(),
|
|
4250
|
+
color: z188.string().optional()
|
|
4219
4251
|
}).refine(
|
|
4220
4252
|
(graph) => graph.sweep_values.length === graph.voltage_levels.length,
|
|
4221
4253
|
{
|
|
@@ -4225,20 +4257,20 @@ var simulation_dc_sweep_voltage_graph = z187.object({
|
|
|
4225
4257
|
expectTypesMatch(true);
|
|
4226
4258
|
|
|
4227
4259
|
// src/simulation/simulation_dc_sweep_current_graph.ts
|
|
4228
|
-
import { z as
|
|
4229
|
-
var simulation_dc_sweep_current_graph =
|
|
4230
|
-
type:
|
|
4260
|
+
import { z as z189 } from "zod";
|
|
4261
|
+
var simulation_dc_sweep_current_graph = z189.object({
|
|
4262
|
+
type: z189.literal("simulation_dc_sweep_current_graph"),
|
|
4231
4263
|
simulation_dc_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4232
4264
|
"simulation_dc_sweep_current_graph"
|
|
4233
4265
|
),
|
|
4234
|
-
simulation_experiment_id:
|
|
4266
|
+
simulation_experiment_id: z189.string(),
|
|
4235
4267
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4236
|
-
simulation_current_probe_id:
|
|
4237
|
-
sweep_values:
|
|
4268
|
+
simulation_current_probe_id: z189.string(),
|
|
4269
|
+
sweep_values: z189.array(z189.number()),
|
|
4238
4270
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4239
|
-
current_levels:
|
|
4240
|
-
name:
|
|
4241
|
-
color:
|
|
4271
|
+
current_levels: z189.array(z189.number()),
|
|
4272
|
+
name: z189.string().optional(),
|
|
4273
|
+
color: z189.string().optional()
|
|
4242
4274
|
}).refine(
|
|
4243
4275
|
(graph) => graph.sweep_values.length === graph.current_levels.length,
|
|
4244
4276
|
{
|
|
@@ -4248,29 +4280,29 @@ var simulation_dc_sweep_current_graph = z188.object({
|
|
|
4248
4280
|
expectTypesMatch(true);
|
|
4249
4281
|
|
|
4250
4282
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4251
|
-
import { z as
|
|
4283
|
+
import { z as z191 } from "zod";
|
|
4252
4284
|
|
|
4253
4285
|
// src/simulation/simulation_complex_sample.ts
|
|
4254
|
-
import { z as
|
|
4255
|
-
var simulation_complex_sample =
|
|
4256
|
-
re:
|
|
4257
|
-
im:
|
|
4286
|
+
import { z as z190 } from "zod";
|
|
4287
|
+
var simulation_complex_sample = z190.object({
|
|
4288
|
+
re: z190.number(),
|
|
4289
|
+
im: z190.number()
|
|
4258
4290
|
});
|
|
4259
4291
|
expectTypesMatch(true);
|
|
4260
4292
|
|
|
4261
4293
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4262
|
-
var simulation_ac_sweep_voltage_graph =
|
|
4263
|
-
type:
|
|
4294
|
+
var simulation_ac_sweep_voltage_graph = z191.object({
|
|
4295
|
+
type: z191.literal("simulation_ac_sweep_voltage_graph"),
|
|
4264
4296
|
simulation_ac_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4265
4297
|
"simulation_ac_sweep_voltage_graph"
|
|
4266
4298
|
),
|
|
4267
|
-
simulation_experiment_id:
|
|
4299
|
+
simulation_experiment_id: z191.string(),
|
|
4268
4300
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4269
|
-
simulation_voltage_probe_id:
|
|
4270
|
-
frequencies_hz:
|
|
4271
|
-
complex_voltages:
|
|
4272
|
-
name:
|
|
4273
|
-
color:
|
|
4301
|
+
simulation_voltage_probe_id: z191.string(),
|
|
4302
|
+
frequencies_hz: z191.array(z191.number()),
|
|
4303
|
+
complex_voltages: z191.array(simulation_complex_sample),
|
|
4304
|
+
name: z191.string().optional(),
|
|
4305
|
+
color: z191.string().optional()
|
|
4274
4306
|
}).refine(
|
|
4275
4307
|
(graph) => graph.frequencies_hz.length === graph.complex_voltages.length,
|
|
4276
4308
|
{
|
|
@@ -4280,19 +4312,19 @@ var simulation_ac_sweep_voltage_graph = z190.object({
|
|
|
4280
4312
|
expectTypesMatch(true);
|
|
4281
4313
|
|
|
4282
4314
|
// src/simulation/simulation_ac_sweep_current_graph.ts
|
|
4283
|
-
import { z as
|
|
4284
|
-
var simulation_ac_sweep_current_graph =
|
|
4285
|
-
type:
|
|
4315
|
+
import { z as z192 } from "zod";
|
|
4316
|
+
var simulation_ac_sweep_current_graph = z192.object({
|
|
4317
|
+
type: z192.literal("simulation_ac_sweep_current_graph"),
|
|
4286
4318
|
simulation_ac_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4287
4319
|
"simulation_ac_sweep_current_graph"
|
|
4288
4320
|
),
|
|
4289
|
-
simulation_experiment_id:
|
|
4321
|
+
simulation_experiment_id: z192.string(),
|
|
4290
4322
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4291
|
-
simulation_current_probe_id:
|
|
4292
|
-
frequencies_hz:
|
|
4293
|
-
complex_currents:
|
|
4294
|
-
name:
|
|
4295
|
-
color:
|
|
4323
|
+
simulation_current_probe_id: z192.string(),
|
|
4324
|
+
frequencies_hz: z192.array(z192.number()),
|
|
4325
|
+
complex_currents: z192.array(simulation_complex_sample),
|
|
4326
|
+
name: z192.string().optional(),
|
|
4327
|
+
color: z192.string().optional()
|
|
4296
4328
|
}).refine(
|
|
4297
4329
|
(graph) => graph.frequencies_hz.length === graph.complex_currents.length,
|
|
4298
4330
|
{
|
|
@@ -4302,52 +4334,52 @@ var simulation_ac_sweep_current_graph = z191.object({
|
|
|
4302
4334
|
expectTypesMatch(true);
|
|
4303
4335
|
|
|
4304
4336
|
// src/simulation/simulation_op_amp.ts
|
|
4305
|
-
import { z as
|
|
4306
|
-
var simulation_op_amp =
|
|
4307
|
-
type:
|
|
4337
|
+
import { z as z193 } from "zod";
|
|
4338
|
+
var simulation_op_amp = z193.object({
|
|
4339
|
+
type: z193.literal("simulation_op_amp"),
|
|
4308
4340
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
4309
|
-
source_component_id:
|
|
4310
|
-
inverting_input_source_port_id:
|
|
4311
|
-
non_inverting_input_source_port_id:
|
|
4312
|
-
output_source_port_id:
|
|
4313
|
-
positive_supply_source_port_id:
|
|
4314
|
-
negative_supply_source_port_id:
|
|
4341
|
+
source_component_id: z193.string().optional(),
|
|
4342
|
+
inverting_input_source_port_id: z193.string(),
|
|
4343
|
+
non_inverting_input_source_port_id: z193.string(),
|
|
4344
|
+
output_source_port_id: z193.string(),
|
|
4345
|
+
positive_supply_source_port_id: z193.string(),
|
|
4346
|
+
negative_supply_source_port_id: z193.string()
|
|
4315
4347
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
4316
4348
|
expectTypesMatch(true);
|
|
4317
4349
|
|
|
4318
4350
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
4319
|
-
import { z as
|
|
4320
|
-
var simulation_spice_subcircuit =
|
|
4321
|
-
type:
|
|
4351
|
+
import { z as z194 } from "zod";
|
|
4352
|
+
var simulation_spice_subcircuit = z194.object({
|
|
4353
|
+
type: z194.literal("simulation_spice_subcircuit"),
|
|
4322
4354
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
4323
4355
|
"simulation_spice_subcircuit"
|
|
4324
4356
|
),
|
|
4325
|
-
source_component_id:
|
|
4326
|
-
spice_pin_to_source_port_map:
|
|
4327
|
-
subcircuit_source:
|
|
4357
|
+
source_component_id: z194.string(),
|
|
4358
|
+
spice_pin_to_source_port_map: z194.record(z194.string(), z194.string()),
|
|
4359
|
+
subcircuit_source: z194.string()
|
|
4328
4360
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
4329
4361
|
expectTypesMatch(
|
|
4330
4362
|
true
|
|
4331
4363
|
);
|
|
4332
4364
|
|
|
4333
4365
|
// src/simulation/simulation_oscilloscope_trace.ts
|
|
4334
|
-
import { z as
|
|
4366
|
+
import { z as z195 } from "zod";
|
|
4335
4367
|
var hasValue = (value) => value !== void 0;
|
|
4336
|
-
var simulation_oscilloscope_trace =
|
|
4337
|
-
type:
|
|
4368
|
+
var simulation_oscilloscope_trace = z195.object({
|
|
4369
|
+
type: z195.literal("simulation_oscilloscope_trace"),
|
|
4338
4370
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
4339
4371
|
"simulation_oscilloscope_trace"
|
|
4340
4372
|
),
|
|
4341
|
-
simulation_transient_voltage_graph_id:
|
|
4342
|
-
simulation_transient_current_graph_id:
|
|
4343
|
-
simulation_voltage_probe_id:
|
|
4344
|
-
simulation_current_probe_id:
|
|
4345
|
-
display_name:
|
|
4346
|
-
color:
|
|
4347
|
-
display_center_value:
|
|
4348
|
-
display_center_offset_divs:
|
|
4349
|
-
volts_per_div:
|
|
4350
|
-
amps_per_div:
|
|
4373
|
+
simulation_transient_voltage_graph_id: z195.string().optional(),
|
|
4374
|
+
simulation_transient_current_graph_id: z195.string().optional(),
|
|
4375
|
+
simulation_voltage_probe_id: z195.string().optional(),
|
|
4376
|
+
simulation_current_probe_id: z195.string().optional(),
|
|
4377
|
+
display_name: z195.string().optional(),
|
|
4378
|
+
color: z195.string().optional(),
|
|
4379
|
+
display_center_value: z195.number().optional(),
|
|
4380
|
+
display_center_offset_divs: z195.number().optional(),
|
|
4381
|
+
volts_per_div: z195.number().positive().optional(),
|
|
4382
|
+
amps_per_div: z195.number().positive().optional()
|
|
4351
4383
|
}).describe(
|
|
4352
4384
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
4353
4385
|
).superRefine((data, ctx) => {
|
|
@@ -4361,19 +4393,19 @@ var simulation_oscilloscope_trace = z194.object({
|
|
|
4361
4393
|
].filter(hasValue).length;
|
|
4362
4394
|
if (voltageReferences + currentReferences !== 1) {
|
|
4363
4395
|
ctx.addIssue({
|
|
4364
|
-
code:
|
|
4396
|
+
code: z195.ZodIssueCode.custom,
|
|
4365
4397
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
4366
4398
|
});
|
|
4367
4399
|
}
|
|
4368
4400
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
4369
4401
|
ctx.addIssue({
|
|
4370
|
-
code:
|
|
4402
|
+
code: z195.ZodIssueCode.custom,
|
|
4371
4403
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
4372
4404
|
});
|
|
4373
4405
|
}
|
|
4374
4406
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
4375
4407
|
ctx.addIssue({
|
|
4376
|
-
code:
|
|
4408
|
+
code: z195.ZodIssueCode.custom,
|
|
4377
4409
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
4378
4410
|
});
|
|
4379
4411
|
}
|
|
@@ -4381,8 +4413,8 @@ var simulation_oscilloscope_trace = z194.object({
|
|
|
4381
4413
|
expectTypesMatch(true);
|
|
4382
4414
|
|
|
4383
4415
|
// src/any_circuit_element.ts
|
|
4384
|
-
import { z as
|
|
4385
|
-
var any_circuit_element =
|
|
4416
|
+
import { z as z196 } from "zod";
|
|
4417
|
+
var any_circuit_element = z196.union([
|
|
4386
4418
|
source_trace,
|
|
4387
4419
|
source_port,
|
|
4388
4420
|
source_component_internal_connection,
|
|
@@ -4442,6 +4474,7 @@ var any_circuit_element = z195.union([
|
|
|
4442
4474
|
pcb_trace,
|
|
4443
4475
|
pcb_trace_warning,
|
|
4444
4476
|
pcb_trace_too_long_warning,
|
|
4477
|
+
pcb_trace_too_many_vias_warning,
|
|
4445
4478
|
pcb_via,
|
|
4446
4479
|
pcb_smtpad,
|
|
4447
4480
|
pcb_solder_paste,
|
|
@@ -4677,6 +4710,7 @@ export {
|
|
|
4677
4710
|
pcb_trace_route_point_via,
|
|
4678
4711
|
pcb_trace_route_point_wire,
|
|
4679
4712
|
pcb_trace_too_long_warning,
|
|
4713
|
+
pcb_trace_too_many_vias_warning,
|
|
4680
4714
|
pcb_trace_warning,
|
|
4681
4715
|
pcb_via,
|
|
4682
4716
|
pcb_via_clearance_error,
|
|
@@ -4782,6 +4816,7 @@ export {
|
|
|
4782
4816
|
source_simple_capacitor,
|
|
4783
4817
|
source_simple_chip,
|
|
4784
4818
|
source_simple_connector,
|
|
4819
|
+
source_simple_connector_standards,
|
|
4785
4820
|
source_simple_crystal,
|
|
4786
4821
|
source_simple_current_source,
|
|
4787
4822
|
source_simple_diode,
|