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