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