@tscircuit/footprinter 0.0.44 → 0.0.46
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/dist/index.cjs +395 -271
- package/dist/index.cjs.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -2562,6 +2562,7 @@ var require_dist = __commonJS({
|
|
|
2562
2562
|
all_layers: () => all_layers,
|
|
2563
2563
|
any_soup_element: () => any_soup_element,
|
|
2564
2564
|
any_source_component: () => any_source_component,
|
|
2565
|
+
cad_component: () => cad_component,
|
|
2565
2566
|
capacitance: () => capacitance,
|
|
2566
2567
|
current: () => current,
|
|
2567
2568
|
distance: () => distance2,
|
|
@@ -2571,6 +2572,8 @@ var require_dist = __commonJS({
|
|
|
2571
2572
|
length: () => length6,
|
|
2572
2573
|
pcb_board: () => pcb_board,
|
|
2573
2574
|
pcb_component: () => pcb_component,
|
|
2575
|
+
pcb_fabrication_note_path: () => pcb_fabrication_note_path,
|
|
2576
|
+
pcb_fabrication_note_text: () => pcb_fabrication_note_text,
|
|
2574
2577
|
pcb_hole: () => pcb_hole,
|
|
2575
2578
|
pcb_placement_error: () => pcb_placement_error,
|
|
2576
2579
|
pcb_plated_hole: () => pcb_plated_hole,
|
|
@@ -2578,8 +2581,11 @@ var require_dist = __commonJS({
|
|
|
2578
2581
|
pcb_port_not_matched_error: () => pcb_port_not_matched_error,
|
|
2579
2582
|
pcb_route_hint: () => pcb_route_hint,
|
|
2580
2583
|
pcb_route_hints: () => pcb_route_hints,
|
|
2584
|
+
pcb_silkscreen_circle: () => pcb_silkscreen_circle,
|
|
2581
2585
|
pcb_silkscreen_line: () => pcb_silkscreen_line,
|
|
2586
|
+
pcb_silkscreen_oval: () => pcb_silkscreen_oval,
|
|
2582
2587
|
pcb_silkscreen_path: () => pcb_silkscreen_path,
|
|
2588
|
+
pcb_silkscreen_rect: () => pcb_silkscreen_rect,
|
|
2583
2589
|
pcb_silkscreen_text: () => pcb_silkscreen_text,
|
|
2584
2590
|
pcb_smtpad: () => pcb_smtpad,
|
|
2585
2591
|
pcb_text: () => pcb_text,
|
|
@@ -2588,7 +2594,9 @@ var require_dist = __commonJS({
|
|
|
2588
2594
|
pcb_trace_hint: () => pcb_trace_hint,
|
|
2589
2595
|
pcb_via: () => pcb_via,
|
|
2590
2596
|
point: () => point,
|
|
2597
|
+
point3: () => point3,
|
|
2591
2598
|
position: () => position,
|
|
2599
|
+
position3: () => position3,
|
|
2592
2600
|
resistance: () => resistance,
|
|
2593
2601
|
rotation: () => rotation,
|
|
2594
2602
|
route_hint_point: () => route_hint_point,
|
|
@@ -2722,13 +2730,20 @@ var require_dist = __commonJS({
|
|
|
2722
2730
|
});
|
|
2723
2731
|
var position = point;
|
|
2724
2732
|
var import_zod32 = require("zod");
|
|
2725
|
-
var
|
|
2726
|
-
|
|
2727
|
-
|
|
2733
|
+
var point3 = import_zod32.z.object({
|
|
2734
|
+
x: distance2,
|
|
2735
|
+
y: distance2,
|
|
2736
|
+
z: distance2
|
|
2728
2737
|
});
|
|
2729
|
-
var
|
|
2738
|
+
var position3 = point3;
|
|
2730
2739
|
var import_zod42 = require("zod");
|
|
2731
|
-
var
|
|
2740
|
+
var size = import_zod42.z.object({
|
|
2741
|
+
width: import_zod42.z.number(),
|
|
2742
|
+
height: import_zod42.z.number()
|
|
2743
|
+
});
|
|
2744
|
+
var import_zod72 = require("zod");
|
|
2745
|
+
var import_zod52 = require("zod");
|
|
2746
|
+
var supplier_name = import_zod52.z.enum([
|
|
2732
2747
|
"jlcpcb",
|
|
2733
2748
|
"macrofab",
|
|
2734
2749
|
"pcbway",
|
|
@@ -2736,52 +2751,52 @@ var require_dist = __commonJS({
|
|
|
2736
2751
|
"mouser",
|
|
2737
2752
|
"lcsc"
|
|
2738
2753
|
]);
|
|
2739
|
-
var
|
|
2740
|
-
var source_component_base =
|
|
2741
|
-
type:
|
|
2742
|
-
ftype:
|
|
2743
|
-
source_component_id:
|
|
2744
|
-
name:
|
|
2754
|
+
var import_zod62 = require("zod");
|
|
2755
|
+
var source_component_base = import_zod62.z.object({
|
|
2756
|
+
type: import_zod62.z.literal("source_component"),
|
|
2757
|
+
ftype: import_zod62.z.string().optional(),
|
|
2758
|
+
source_component_id: import_zod62.z.string(),
|
|
2759
|
+
name: import_zod62.z.string(),
|
|
2745
2760
|
// part_numbers: z.array(z.string()).optional(),
|
|
2746
|
-
supplier_part_numbers:
|
|
2761
|
+
supplier_part_numbers: import_zod62.z.record(supplier_name, import_zod62.z.array(import_zod62.z.string())).optional()
|
|
2747
2762
|
});
|
|
2748
2763
|
var source_simple_capacitor = source_component_base.extend({
|
|
2749
|
-
ftype:
|
|
2764
|
+
ftype: import_zod72.z.literal("simple_capacitor"),
|
|
2750
2765
|
capacitance
|
|
2751
2766
|
});
|
|
2752
|
-
var
|
|
2767
|
+
var import_zod82 = require("zod");
|
|
2753
2768
|
var source_simple_resistor = source_component_base.extend({
|
|
2754
|
-
ftype:
|
|
2769
|
+
ftype: import_zod82.z.literal("simple_resistor"),
|
|
2755
2770
|
resistance
|
|
2756
2771
|
});
|
|
2757
|
-
var
|
|
2772
|
+
var import_zod92 = require("zod");
|
|
2758
2773
|
var source_simple_diode = source_component_base.extend({
|
|
2759
|
-
ftype:
|
|
2774
|
+
ftype: import_zod92.z.literal("simple_diode")
|
|
2760
2775
|
});
|
|
2761
|
-
var
|
|
2776
|
+
var import_zod102 = require("zod");
|
|
2762
2777
|
var source_simple_ground = source_component_base.extend({
|
|
2763
|
-
ftype:
|
|
2778
|
+
ftype: import_zod102.z.literal("simple_ground")
|
|
2764
2779
|
});
|
|
2765
|
-
var
|
|
2780
|
+
var import_zod11 = require("zod");
|
|
2766
2781
|
var source_simple_bug = source_component_base.extend({
|
|
2767
|
-
ftype:
|
|
2782
|
+
ftype: import_zod11.z.literal("simple_bug")
|
|
2768
2783
|
});
|
|
2769
|
-
var
|
|
2784
|
+
var import_zod12 = require("zod");
|
|
2770
2785
|
var source_simple_inductor = source_component_base.extend({
|
|
2771
|
-
ftype:
|
|
2786
|
+
ftype: import_zod12.z.literal("simple_inductor"),
|
|
2772
2787
|
inductance
|
|
2773
2788
|
});
|
|
2774
|
-
var
|
|
2789
|
+
var import_zod13 = require("zod");
|
|
2775
2790
|
var source_led = source_simple_diode.extend({
|
|
2776
|
-
ftype:
|
|
2791
|
+
ftype: import_zod13.z.literal("led")
|
|
2777
2792
|
});
|
|
2778
|
-
var
|
|
2793
|
+
var import_zod14 = require("zod");
|
|
2779
2794
|
var source_simple_power_source = source_component_base.extend({
|
|
2780
|
-
ftype:
|
|
2795
|
+
ftype: import_zod14.z.literal("simple_power_source"),
|
|
2781
2796
|
voltage
|
|
2782
2797
|
});
|
|
2783
|
-
var
|
|
2784
|
-
var any_source_component =
|
|
2798
|
+
var import_zod15 = require("zod");
|
|
2799
|
+
var any_source_component = import_zod15.z.union([
|
|
2785
2800
|
source_simple_resistor,
|
|
2786
2801
|
source_simple_capacitor,
|
|
2787
2802
|
source_simple_diode,
|
|
@@ -2790,160 +2805,162 @@ var require_dist = __commonJS({
|
|
|
2790
2805
|
source_led,
|
|
2791
2806
|
source_simple_power_source
|
|
2792
2807
|
]);
|
|
2793
|
-
var import_zod15 = require("zod");
|
|
2794
|
-
var source_port = import_zod15.z.object({
|
|
2795
|
-
type: import_zod15.z.literal("source_port"),
|
|
2796
|
-
pin_number: import_zod15.z.number().optional(),
|
|
2797
|
-
port_hints: import_zod15.z.array(import_zod15.z.string()).optional(),
|
|
2798
|
-
name: import_zod15.z.string(),
|
|
2799
|
-
source_port_id: import_zod15.z.string(),
|
|
2800
|
-
source_component_id: import_zod15.z.string()
|
|
2801
|
-
});
|
|
2802
2808
|
var import_zod16 = require("zod");
|
|
2803
|
-
var
|
|
2804
|
-
type: import_zod16.z.literal("
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2809
|
+
var source_port = import_zod16.z.object({
|
|
2810
|
+
type: import_zod16.z.literal("source_port"),
|
|
2811
|
+
pin_number: import_zod16.z.number().optional(),
|
|
2812
|
+
port_hints: import_zod16.z.array(import_zod16.z.string()).optional(),
|
|
2813
|
+
name: import_zod16.z.string(),
|
|
2814
|
+
source_port_id: import_zod16.z.string(),
|
|
2815
|
+
source_component_id: import_zod16.z.string()
|
|
2808
2816
|
});
|
|
2809
2817
|
var import_zod17 = require("zod");
|
|
2810
|
-
var
|
|
2811
|
-
type: import_zod17.z.literal("
|
|
2812
|
-
|
|
2813
|
-
|
|
2818
|
+
var source_trace = import_zod17.z.object({
|
|
2819
|
+
type: import_zod17.z.literal("source_trace"),
|
|
2820
|
+
source_trace_id: import_zod17.z.string(),
|
|
2821
|
+
connected_source_port_ids: import_zod17.z.array(import_zod17.z.string()),
|
|
2822
|
+
connected_source_net_ids: import_zod17.z.array(import_zod17.z.string())
|
|
2814
2823
|
});
|
|
2815
2824
|
var import_zod18 = require("zod");
|
|
2816
|
-
var
|
|
2817
|
-
type: import_zod18.z.literal("
|
|
2818
|
-
|
|
2819
|
-
name: import_zod18.z.string()
|
|
2820
|
-
member_source_group_ids: import_zod18.z.array(import_zod18.z.string()),
|
|
2821
|
-
is_power: import_zod18.z.boolean().optional(),
|
|
2822
|
-
is_ground: import_zod18.z.boolean().optional(),
|
|
2823
|
-
is_digital_signal: import_zod18.z.boolean().optional(),
|
|
2824
|
-
is_analog_signal: import_zod18.z.boolean().optional()
|
|
2825
|
+
var source_group = import_zod18.z.object({
|
|
2826
|
+
type: import_zod18.z.literal("source_group"),
|
|
2827
|
+
source_group_id: import_zod18.z.string(),
|
|
2828
|
+
name: import_zod18.z.string().optional()
|
|
2825
2829
|
});
|
|
2826
2830
|
var import_zod19 = require("zod");
|
|
2827
|
-
var
|
|
2828
|
-
type: import_zod19.z.literal("
|
|
2829
|
-
|
|
2831
|
+
var source_net = import_zod19.z.object({
|
|
2832
|
+
type: import_zod19.z.literal("source_net"),
|
|
2833
|
+
source_net_id: import_zod19.z.string(),
|
|
2834
|
+
name: import_zod19.z.string(),
|
|
2835
|
+
member_source_group_ids: import_zod19.z.array(import_zod19.z.string()),
|
|
2836
|
+
is_power: import_zod19.z.boolean().optional(),
|
|
2837
|
+
is_ground: import_zod19.z.boolean().optional(),
|
|
2838
|
+
is_digital_signal: import_zod19.z.boolean().optional(),
|
|
2839
|
+
is_analog_signal: import_zod19.z.boolean().optional()
|
|
2840
|
+
});
|
|
2841
|
+
var import_zod20 = require("zod");
|
|
2842
|
+
var schematic_box = import_zod20.z.object({
|
|
2843
|
+
type: import_zod20.z.literal("schematic_box"),
|
|
2844
|
+
schematic_component_id: import_zod20.z.string(),
|
|
2830
2845
|
width: distance2,
|
|
2831
2846
|
height: distance2,
|
|
2832
2847
|
x: distance2,
|
|
2833
2848
|
y: distance2
|
|
2834
2849
|
}).describe("Draws a box on the schematic");
|
|
2835
|
-
var import_zod20 = require("zod");
|
|
2836
|
-
var schematic_path = import_zod20.z.object({
|
|
2837
|
-
type: import_zod20.z.literal("schematic_path"),
|
|
2838
|
-
schematic_component_id: import_zod20.z.string(),
|
|
2839
|
-
fill_color: import_zod20.z.enum(["red", "blue"]).optional(),
|
|
2840
|
-
is_filled: import_zod20.z.boolean().optional(),
|
|
2841
|
-
points: import_zod20.z.array(point)
|
|
2842
|
-
});
|
|
2843
2850
|
var import_zod21 = require("zod");
|
|
2844
|
-
var
|
|
2845
|
-
type: import_zod21.z.literal("
|
|
2851
|
+
var schematic_path = import_zod21.z.object({
|
|
2852
|
+
type: import_zod21.z.literal("schematic_path"),
|
|
2853
|
+
schematic_component_id: import_zod21.z.string(),
|
|
2854
|
+
fill_color: import_zod21.z.enum(["red", "blue"]).optional(),
|
|
2855
|
+
is_filled: import_zod21.z.boolean().optional(),
|
|
2856
|
+
points: import_zod21.z.array(point)
|
|
2857
|
+
});
|
|
2858
|
+
var import_zod222 = require("zod");
|
|
2859
|
+
var schematic_component = import_zod222.z.object({
|
|
2860
|
+
type: import_zod222.z.literal("schematic_component"),
|
|
2846
2861
|
rotation: rotation.default(0),
|
|
2847
2862
|
size,
|
|
2848
2863
|
center: point,
|
|
2849
|
-
source_component_id:
|
|
2850
|
-
schematic_component_id:
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2864
|
+
source_component_id: import_zod222.z.string(),
|
|
2865
|
+
schematic_component_id: import_zod222.z.string(),
|
|
2866
|
+
pin_spacing: length6.optional(),
|
|
2867
|
+
box_width: length6.optional(),
|
|
2868
|
+
port_arrangement: import_zod222.z.union([
|
|
2869
|
+
import_zod222.z.object({
|
|
2870
|
+
left_size: import_zod222.z.number(),
|
|
2871
|
+
right_size: import_zod222.z.number(),
|
|
2872
|
+
top_size: import_zod222.z.number().optional(),
|
|
2873
|
+
bottom_size: import_zod222.z.number().optional()
|
|
2857
2874
|
}),
|
|
2858
|
-
|
|
2859
|
-
left_side:
|
|
2860
|
-
pins:
|
|
2861
|
-
direction:
|
|
2875
|
+
import_zod222.z.object({
|
|
2876
|
+
left_side: import_zod222.z.object({
|
|
2877
|
+
pins: import_zod222.z.array(import_zod222.z.number()),
|
|
2878
|
+
direction: import_zod222.z.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
2862
2879
|
}).optional(),
|
|
2863
|
-
right_side:
|
|
2864
|
-
pins:
|
|
2865
|
-
direction:
|
|
2880
|
+
right_side: import_zod222.z.object({
|
|
2881
|
+
pins: import_zod222.z.array(import_zod222.z.number()),
|
|
2882
|
+
direction: import_zod222.z.enum(["top-to-bottom", "bottom-to-top"]).optional()
|
|
2866
2883
|
}).optional(),
|
|
2867
|
-
top_side:
|
|
2868
|
-
pins:
|
|
2869
|
-
direction:
|
|
2884
|
+
top_side: import_zod222.z.object({
|
|
2885
|
+
pins: import_zod222.z.array(import_zod222.z.number()),
|
|
2886
|
+
direction: import_zod222.z.enum(["left-to-right", "right-to-left"]).optional()
|
|
2870
2887
|
}).optional(),
|
|
2871
|
-
bottom_side:
|
|
2872
|
-
pins:
|
|
2873
|
-
direction:
|
|
2888
|
+
bottom_side: import_zod222.z.object({
|
|
2889
|
+
pins: import_zod222.z.array(import_zod222.z.number()),
|
|
2890
|
+
direction: import_zod222.z.enum(["left-to-right", "right-to-left"]).optional()
|
|
2874
2891
|
}).optional()
|
|
2875
2892
|
})
|
|
2876
2893
|
]).optional(),
|
|
2877
|
-
port_labels:
|
|
2894
|
+
port_labels: import_zod222.z.record(import_zod222.z.string()).optional()
|
|
2878
2895
|
});
|
|
2879
|
-
var
|
|
2880
|
-
var schematic_line =
|
|
2881
|
-
type:
|
|
2882
|
-
schematic_component_id:
|
|
2896
|
+
var import_zod23 = require("zod");
|
|
2897
|
+
var schematic_line = import_zod23.z.object({
|
|
2898
|
+
type: import_zod23.z.literal("schematic_line"),
|
|
2899
|
+
schematic_component_id: import_zod23.z.string(),
|
|
2883
2900
|
x1: distance2,
|
|
2884
2901
|
x2: distance2,
|
|
2885
2902
|
y1: distance2,
|
|
2886
2903
|
y2: distance2
|
|
2887
2904
|
});
|
|
2888
|
-
var
|
|
2889
|
-
var schematic_trace =
|
|
2890
|
-
type:
|
|
2891
|
-
schematic_trace_id:
|
|
2892
|
-
source_trace_id:
|
|
2893
|
-
edges:
|
|
2894
|
-
|
|
2895
|
-
from:
|
|
2896
|
-
x:
|
|
2897
|
-
y:
|
|
2905
|
+
var import_zod24 = require("zod");
|
|
2906
|
+
var schematic_trace = import_zod24.z.object({
|
|
2907
|
+
type: import_zod24.z.literal("schematic_trace"),
|
|
2908
|
+
schematic_trace_id: import_zod24.z.string(),
|
|
2909
|
+
source_trace_id: import_zod24.z.string(),
|
|
2910
|
+
edges: import_zod24.z.array(
|
|
2911
|
+
import_zod24.z.object({
|
|
2912
|
+
from: import_zod24.z.object({
|
|
2913
|
+
x: import_zod24.z.number(),
|
|
2914
|
+
y: import_zod24.z.number()
|
|
2898
2915
|
}),
|
|
2899
|
-
to:
|
|
2900
|
-
x:
|
|
2901
|
-
y:
|
|
2916
|
+
to: import_zod24.z.object({
|
|
2917
|
+
x: import_zod24.z.number(),
|
|
2918
|
+
y: import_zod24.z.number()
|
|
2902
2919
|
}),
|
|
2903
|
-
from_schematic_port_id:
|
|
2904
|
-
to_schematic_port_id:
|
|
2920
|
+
from_schematic_port_id: import_zod24.z.string().optional(),
|
|
2921
|
+
to_schematic_port_id: import_zod24.z.string().optional()
|
|
2905
2922
|
})
|
|
2906
2923
|
)
|
|
2907
2924
|
});
|
|
2908
|
-
var
|
|
2909
|
-
var schematic_text =
|
|
2910
|
-
type:
|
|
2911
|
-
schematic_component_id:
|
|
2912
|
-
schematic_text_id:
|
|
2913
|
-
text:
|
|
2914
|
-
position:
|
|
2925
|
+
var import_zod25 = require("zod");
|
|
2926
|
+
var schematic_text = import_zod25.z.object({
|
|
2927
|
+
type: import_zod25.z.literal("schematic_text"),
|
|
2928
|
+
schematic_component_id: import_zod25.z.string(),
|
|
2929
|
+
schematic_text_id: import_zod25.z.string(),
|
|
2930
|
+
text: import_zod25.z.string(),
|
|
2931
|
+
position: import_zod25.z.object({
|
|
2915
2932
|
x: distance2,
|
|
2916
2933
|
y: distance2
|
|
2917
2934
|
}),
|
|
2918
|
-
rotation:
|
|
2919
|
-
anchor:
|
|
2935
|
+
rotation: import_zod25.z.number().default(0),
|
|
2936
|
+
anchor: import_zod25.z.enum(["center", "left", "right", "top", "bottom"]).default("center")
|
|
2920
2937
|
});
|
|
2921
|
-
var
|
|
2922
|
-
var schematic_port =
|
|
2923
|
-
type:
|
|
2924
|
-
schematic_port_id:
|
|
2925
|
-
source_port_id:
|
|
2926
|
-
schematic_component_id:
|
|
2938
|
+
var import_zod26 = require("zod");
|
|
2939
|
+
var schematic_port = import_zod26.z.object({
|
|
2940
|
+
type: import_zod26.z.literal("schematic_port"),
|
|
2941
|
+
schematic_port_id: import_zod26.z.string(),
|
|
2942
|
+
source_port_id: import_zod26.z.string(),
|
|
2943
|
+
schematic_component_id: import_zod26.z.string().optional(),
|
|
2927
2944
|
center: point,
|
|
2928
|
-
facing_direction:
|
|
2945
|
+
facing_direction: import_zod26.z.enum(["up", "down", "left", "right"]).optional()
|
|
2929
2946
|
}).describe("Defines a port on a schematic component");
|
|
2930
|
-
var
|
|
2931
|
-
var schematic_net_label =
|
|
2932
|
-
type:
|
|
2933
|
-
source_net_id:
|
|
2947
|
+
var import_zod27 = require("zod");
|
|
2948
|
+
var schematic_net_label = import_zod27.z.object({
|
|
2949
|
+
type: import_zod27.z.literal("schematic_net_label"),
|
|
2950
|
+
source_net_id: import_zod27.z.string(),
|
|
2934
2951
|
center: point,
|
|
2935
|
-
anchor_side:
|
|
2936
|
-
text:
|
|
2952
|
+
anchor_side: import_zod27.z.enum(["top", "bottom", "left", "right"]),
|
|
2953
|
+
text: import_zod27.z.string()
|
|
2937
2954
|
});
|
|
2938
|
-
var
|
|
2939
|
-
var schematic_error =
|
|
2940
|
-
schematic_error_id:
|
|
2941
|
-
type:
|
|
2955
|
+
var import_zod28 = require("zod");
|
|
2956
|
+
var schematic_error = import_zod28.z.object({
|
|
2957
|
+
schematic_error_id: import_zod28.z.string(),
|
|
2958
|
+
type: import_zod28.z.literal("schematic_error"),
|
|
2942
2959
|
// eventually each error type should be broken out into a dir of files
|
|
2943
|
-
error_type:
|
|
2944
|
-
message:
|
|
2960
|
+
error_type: import_zod28.z.literal("schematic_port_not_found"),
|
|
2961
|
+
message: import_zod28.z.string()
|
|
2945
2962
|
}).describe("Defines a schematic error on the schematic");
|
|
2946
|
-
var
|
|
2963
|
+
var import_zod29 = require("zod");
|
|
2947
2964
|
var all_layers = [
|
|
2948
2965
|
"top",
|
|
2949
2966
|
"bottom",
|
|
@@ -2954,9 +2971,9 @@ var require_dist = __commonJS({
|
|
|
2954
2971
|
"inner5",
|
|
2955
2972
|
"inner6"
|
|
2956
2973
|
];
|
|
2957
|
-
var layer_string =
|
|
2974
|
+
var layer_string = import_zod29.z.enum(all_layers);
|
|
2958
2975
|
var layer_ref = layer_string.or(
|
|
2959
|
-
|
|
2976
|
+
import_zod29.z.object({
|
|
2960
2977
|
name: layer_string
|
|
2961
2978
|
})
|
|
2962
2979
|
).transform((layer) => {
|
|
@@ -2965,149 +2982,176 @@ var require_dist = __commonJS({
|
|
|
2965
2982
|
}
|
|
2966
2983
|
return layer.name;
|
|
2967
2984
|
});
|
|
2968
|
-
var visible_layer =
|
|
2969
|
-
var
|
|
2970
|
-
var pcb_route_hint =
|
|
2985
|
+
var visible_layer = import_zod29.z.enum(["top", "bottom"]);
|
|
2986
|
+
var import_zod30 = require("zod");
|
|
2987
|
+
var pcb_route_hint = import_zod30.z.object({
|
|
2971
2988
|
x: distance2,
|
|
2972
2989
|
y: distance2,
|
|
2973
|
-
via:
|
|
2990
|
+
via: import_zod30.z.boolean().optional(),
|
|
2974
2991
|
via_to_layer: layer_ref.optional()
|
|
2975
2992
|
});
|
|
2976
|
-
var pcb_route_hints =
|
|
2977
|
-
var
|
|
2978
|
-
var route_hint_point =
|
|
2993
|
+
var pcb_route_hints = import_zod30.z.array(pcb_route_hint);
|
|
2994
|
+
var import_zod31 = require("zod");
|
|
2995
|
+
var route_hint_point = import_zod31.z.object({
|
|
2979
2996
|
x: distance2,
|
|
2980
2997
|
y: distance2,
|
|
2981
|
-
via:
|
|
2998
|
+
via: import_zod31.z.boolean().optional(),
|
|
2982
2999
|
to_layer: layer_ref.optional()
|
|
2983
3000
|
});
|
|
2984
|
-
var
|
|
2985
|
-
var pcb_component =
|
|
2986
|
-
type:
|
|
2987
|
-
pcb_component_id:
|
|
2988
|
-
source_component_id:
|
|
3001
|
+
var import_zod322 = require("zod");
|
|
3002
|
+
var pcb_component = import_zod322.z.object({
|
|
3003
|
+
type: import_zod322.z.literal("pcb_component"),
|
|
3004
|
+
pcb_component_id: import_zod322.z.string(),
|
|
3005
|
+
source_component_id: import_zod322.z.string(),
|
|
2989
3006
|
center: point,
|
|
2990
3007
|
layer: layer_ref,
|
|
2991
3008
|
rotation,
|
|
2992
3009
|
width: length6,
|
|
2993
3010
|
height: length6
|
|
2994
3011
|
}).describe("Defines a component on the PCB");
|
|
2995
|
-
var import_zod322 = require("zod");
|
|
2996
|
-
var pcb_hole = import_zod322.z.object({
|
|
2997
|
-
type: import_zod322.z.literal("pcb_hole"),
|
|
2998
|
-
hole_diameter: import_zod322.z.number(),
|
|
2999
|
-
x: distance2,
|
|
3000
|
-
y: distance2
|
|
3001
|
-
}).describe("Defines a hole on the PCB");
|
|
3002
3012
|
var import_zod33 = require("zod");
|
|
3003
|
-
var
|
|
3004
|
-
type: import_zod33.z.literal("
|
|
3005
|
-
|
|
3013
|
+
var pcb_hole = import_zod33.z.object({
|
|
3014
|
+
type: import_zod33.z.literal("pcb_hole"),
|
|
3015
|
+
hole_shape: import_zod33.z.enum(["round", "square"]).default("round"),
|
|
3006
3016
|
hole_diameter: import_zod33.z.number(),
|
|
3007
3017
|
x: distance2,
|
|
3008
|
-
y: distance2
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3018
|
+
y: distance2
|
|
3019
|
+
}).or(
|
|
3020
|
+
import_zod33.z.object({
|
|
3021
|
+
type: import_zod33.z.literal("pcb_hole"),
|
|
3022
|
+
hole_shape: import_zod33.z.literal("oval"),
|
|
3023
|
+
hole_width: import_zod33.z.number(),
|
|
3024
|
+
hole_height: import_zod33.z.number(),
|
|
3025
|
+
x: distance2,
|
|
3026
|
+
y: distance2
|
|
3027
|
+
})
|
|
3028
|
+
).describe("Defines a hole on the PCB");
|
|
3014
3029
|
var import_zod34 = require("zod");
|
|
3015
|
-
var
|
|
3016
|
-
type: import_zod34.z.literal("
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3030
|
+
var pcb_plated_hole = import_zod34.z.object({
|
|
3031
|
+
type: import_zod34.z.literal("pcb_plated_hole"),
|
|
3032
|
+
shape: import_zod34.z.literal("circle"),
|
|
3033
|
+
outer_diameter: import_zod34.z.number(),
|
|
3034
|
+
hole_diameter: import_zod34.z.number(),
|
|
3020
3035
|
x: distance2,
|
|
3021
3036
|
y: distance2,
|
|
3022
|
-
layers: import_zod34.z.array(layer_ref)
|
|
3023
|
-
|
|
3037
|
+
layers: import_zod34.z.array(layer_ref),
|
|
3038
|
+
port_hints: import_zod34.z.array(import_zod34.z.string()).optional(),
|
|
3039
|
+
pcb_component_id: import_zod34.z.string().optional(),
|
|
3040
|
+
pcb_port_id: import_zod34.z.string().optional()
|
|
3041
|
+
}).or(
|
|
3042
|
+
import_zod34.z.object({
|
|
3043
|
+
type: import_zod34.z.literal("pcb_plated_hole"),
|
|
3044
|
+
shape: import_zod34.z.enum(["oval", "pill"]),
|
|
3045
|
+
outer_width: import_zod34.z.number(),
|
|
3046
|
+
outer_height: import_zod34.z.number(),
|
|
3047
|
+
hole_width: import_zod34.z.number(),
|
|
3048
|
+
hole_height: import_zod34.z.number(),
|
|
3049
|
+
x: distance2,
|
|
3050
|
+
y: distance2,
|
|
3051
|
+
layers: import_zod34.z.array(layer_ref),
|
|
3052
|
+
port_hints: import_zod34.z.array(import_zod34.z.string()).optional(),
|
|
3053
|
+
pcb_component_id: import_zod34.z.string().optional(),
|
|
3054
|
+
pcb_port_id: import_zod34.z.string().optional()
|
|
3055
|
+
})
|
|
3056
|
+
).describe("Defines a plated hole on the PCB");
|
|
3024
3057
|
var import_zod35 = require("zod");
|
|
3025
|
-
var
|
|
3026
|
-
import_zod35.z.
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3058
|
+
var pcb_port = import_zod35.z.object({
|
|
3059
|
+
type: import_zod35.z.literal("pcb_port"),
|
|
3060
|
+
pcb_port_id: import_zod35.z.string(),
|
|
3061
|
+
source_port_id: import_zod35.z.string(),
|
|
3062
|
+
pcb_component_id: import_zod35.z.string(),
|
|
3063
|
+
x: distance2,
|
|
3064
|
+
y: distance2,
|
|
3065
|
+
layers: import_zod35.z.array(layer_ref)
|
|
3066
|
+
}).describe("Defines a port on the PCB");
|
|
3067
|
+
var import_zod36 = require("zod");
|
|
3068
|
+
var pcb_smtpad = import_zod36.z.union([
|
|
3069
|
+
import_zod36.z.object({
|
|
3070
|
+
pcb_smtpad_id: import_zod36.z.string(),
|
|
3071
|
+
type: import_zod36.z.literal("pcb_smtpad"),
|
|
3072
|
+
shape: import_zod36.z.literal("circle"),
|
|
3030
3073
|
x: distance2,
|
|
3031
3074
|
y: distance2,
|
|
3032
|
-
radius:
|
|
3075
|
+
radius: import_zod36.z.number(),
|
|
3033
3076
|
layer: layer_ref,
|
|
3034
|
-
port_hints:
|
|
3035
|
-
pcb_component_id:
|
|
3036
|
-
pcb_port_id:
|
|
3077
|
+
port_hints: import_zod36.z.array(import_zod36.z.string()).optional(),
|
|
3078
|
+
pcb_component_id: import_zod36.z.string().optional(),
|
|
3079
|
+
pcb_port_id: import_zod36.z.string().optional()
|
|
3037
3080
|
}),
|
|
3038
|
-
|
|
3039
|
-
pcb_smtpad_id:
|
|
3040
|
-
type:
|
|
3041
|
-
shape:
|
|
3081
|
+
import_zod36.z.object({
|
|
3082
|
+
pcb_smtpad_id: import_zod36.z.string(),
|
|
3083
|
+
type: import_zod36.z.literal("pcb_smtpad"),
|
|
3084
|
+
shape: import_zod36.z.literal("rect"),
|
|
3042
3085
|
x: distance2,
|
|
3043
3086
|
y: distance2,
|
|
3044
|
-
width:
|
|
3045
|
-
height:
|
|
3087
|
+
width: import_zod36.z.number(),
|
|
3088
|
+
height: import_zod36.z.number(),
|
|
3046
3089
|
layer: layer_ref,
|
|
3047
|
-
port_hints:
|
|
3048
|
-
pcb_component_id:
|
|
3049
|
-
pcb_port_id:
|
|
3090
|
+
port_hints: import_zod36.z.array(import_zod36.z.string()).optional(),
|
|
3091
|
+
pcb_component_id: import_zod36.z.string().optional(),
|
|
3092
|
+
pcb_port_id: import_zod36.z.string().optional()
|
|
3050
3093
|
})
|
|
3051
3094
|
]).describe("Defines an SMT pad on the PCB");
|
|
3052
|
-
var
|
|
3053
|
-
var pcb_text =
|
|
3054
|
-
type:
|
|
3055
|
-
text:
|
|
3095
|
+
var import_zod37 = require("zod");
|
|
3096
|
+
var pcb_text = import_zod37.z.object({
|
|
3097
|
+
type: import_zod37.z.literal("pcb_text"),
|
|
3098
|
+
text: import_zod37.z.string(),
|
|
3056
3099
|
x: distance2,
|
|
3057
3100
|
y: distance2,
|
|
3058
|
-
align:
|
|
3101
|
+
align: import_zod37.z.enum(["bottom-left"]),
|
|
3059
3102
|
width: distance2,
|
|
3060
3103
|
height: distance2,
|
|
3061
|
-
lines:
|
|
3104
|
+
lines: import_zod37.z.number()
|
|
3062
3105
|
}).describe("Defines text on the PCB");
|
|
3063
|
-
var
|
|
3064
|
-
var pcb_trace =
|
|
3065
|
-
type:
|
|
3066
|
-
source_trace_id:
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3106
|
+
var import_zod38 = require("zod");
|
|
3107
|
+
var pcb_trace = import_zod38.z.object({
|
|
3108
|
+
type: import_zod38.z.literal("pcb_trace"),
|
|
3109
|
+
source_trace_id: import_zod38.z.string().optional(),
|
|
3110
|
+
pcb_component_id: import_zod38.z.string().optional(),
|
|
3111
|
+
pcb_trace_id: import_zod38.z.string(),
|
|
3112
|
+
route: import_zod38.z.array(
|
|
3113
|
+
import_zod38.z.union([
|
|
3114
|
+
import_zod38.z.object({
|
|
3115
|
+
route_type: import_zod38.z.literal("wire"),
|
|
3072
3116
|
x: distance2,
|
|
3073
3117
|
y: distance2,
|
|
3074
3118
|
width: distance2,
|
|
3075
|
-
start_pcb_port_id:
|
|
3076
|
-
end_pcb_port_id:
|
|
3077
|
-
layer:
|
|
3119
|
+
start_pcb_port_id: import_zod38.z.string().optional(),
|
|
3120
|
+
end_pcb_port_id: import_zod38.z.string().optional(),
|
|
3121
|
+
layer: import_zod38.z.string()
|
|
3078
3122
|
}),
|
|
3079
|
-
|
|
3080
|
-
route_type:
|
|
3123
|
+
import_zod38.z.object({
|
|
3124
|
+
route_type: import_zod38.z.literal("via"),
|
|
3081
3125
|
x: distance2,
|
|
3082
3126
|
y: distance2,
|
|
3083
|
-
from_layer:
|
|
3084
|
-
to_layer:
|
|
3127
|
+
from_layer: import_zod38.z.string(),
|
|
3128
|
+
to_layer: import_zod38.z.string()
|
|
3085
3129
|
})
|
|
3086
3130
|
])
|
|
3087
3131
|
)
|
|
3088
3132
|
});
|
|
3089
|
-
var import_zod38 = require("zod");
|
|
3090
|
-
var pcb_trace_error = import_zod38.z.object({
|
|
3091
|
-
pcb_error_id: import_zod38.z.string(),
|
|
3092
|
-
type: import_zod38.z.literal("pcb_error"),
|
|
3093
|
-
error_type: import_zod38.z.literal("pcb_trace_error"),
|
|
3094
|
-
message: import_zod38.z.string(),
|
|
3095
|
-
pcb_trace_id: import_zod38.z.string(),
|
|
3096
|
-
source_trace_id: import_zod38.z.string(),
|
|
3097
|
-
pcb_component_ids: import_zod38.z.array(import_zod38.z.string()),
|
|
3098
|
-
pcb_port_ids: import_zod38.z.array(import_zod38.z.string())
|
|
3099
|
-
}).describe("Defines a trace error on the PCB");
|
|
3100
3133
|
var import_zod39 = require("zod");
|
|
3101
|
-
var
|
|
3134
|
+
var pcb_trace_error = import_zod39.z.object({
|
|
3102
3135
|
pcb_error_id: import_zod39.z.string(),
|
|
3103
3136
|
type: import_zod39.z.literal("pcb_error"),
|
|
3104
|
-
error_type: import_zod39.z.literal("
|
|
3137
|
+
error_type: import_zod39.z.literal("pcb_trace_error"),
|
|
3105
3138
|
message: import_zod39.z.string(),
|
|
3106
|
-
|
|
3139
|
+
pcb_trace_id: import_zod39.z.string(),
|
|
3140
|
+
source_trace_id: import_zod39.z.string(),
|
|
3141
|
+
pcb_component_ids: import_zod39.z.array(import_zod39.z.string()),
|
|
3142
|
+
pcb_port_ids: import_zod39.z.array(import_zod39.z.string())
|
|
3107
3143
|
}).describe("Defines a trace error on the PCB");
|
|
3108
3144
|
var import_zod40 = require("zod");
|
|
3109
|
-
var
|
|
3110
|
-
|
|
3145
|
+
var pcb_port_not_matched_error = import_zod40.z.object({
|
|
3146
|
+
pcb_error_id: import_zod40.z.string(),
|
|
3147
|
+
type: import_zod40.z.literal("pcb_error"),
|
|
3148
|
+
error_type: import_zod40.z.literal("pcb_port_not_matched_error"),
|
|
3149
|
+
message: import_zod40.z.string(),
|
|
3150
|
+
pcb_component_ids: import_zod40.z.array(import_zod40.z.string())
|
|
3151
|
+
}).describe("Defines a trace error on the PCB");
|
|
3152
|
+
var import_zod41 = require("zod");
|
|
3153
|
+
var pcb_via = import_zod41.z.object({
|
|
3154
|
+
type: import_zod41.z.literal("pcb_via"),
|
|
3111
3155
|
x: distance2,
|
|
3112
3156
|
y: distance2,
|
|
3113
3157
|
outer_diameter: distance2.default("0.6mm"),
|
|
@@ -3116,61 +3160,134 @@ var require_dist = __commonJS({
|
|
|
3116
3160
|
from_layer: layer_ref.optional(),
|
|
3117
3161
|
/** @deprecated */
|
|
3118
3162
|
to_layer: layer_ref.optional(),
|
|
3119
|
-
layers:
|
|
3163
|
+
layers: import_zod41.z.array(layer_ref)
|
|
3120
3164
|
}).describe("Defines a via on the PCB");
|
|
3121
|
-
var
|
|
3122
|
-
var pcb_board =
|
|
3123
|
-
type:
|
|
3165
|
+
var import_zod422 = require("zod");
|
|
3166
|
+
var pcb_board = import_zod422.z.object({
|
|
3167
|
+
type: import_zod422.z.literal("pcb_board"),
|
|
3124
3168
|
width: length6,
|
|
3125
3169
|
height: length6,
|
|
3126
3170
|
center: point
|
|
3127
3171
|
}).describe("Defines the board outline of the PCB");
|
|
3128
|
-
var import_zod422 = require("zod");
|
|
3129
|
-
var pcb_placement_error = import_zod422.z.object({
|
|
3130
|
-
pcb_error_id: import_zod422.z.string(),
|
|
3131
|
-
type: import_zod422.z.literal("pcb_error"),
|
|
3132
|
-
error_type: import_zod422.z.literal("pcb_placement_error"),
|
|
3133
|
-
message: import_zod422.z.string()
|
|
3134
|
-
}).describe("Defines a placement error on the PCB");
|
|
3135
3172
|
var import_zod43 = require("zod");
|
|
3136
|
-
var
|
|
3137
|
-
|
|
3138
|
-
type: import_zod43.z.literal("
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
}).describe("A hint that can be used to generate a PCB trace");
|
|
3173
|
+
var pcb_placement_error = import_zod43.z.object({
|
|
3174
|
+
pcb_error_id: import_zod43.z.string(),
|
|
3175
|
+
type: import_zod43.z.literal("pcb_error"),
|
|
3176
|
+
error_type: import_zod43.z.literal("pcb_placement_error"),
|
|
3177
|
+
message: import_zod43.z.string()
|
|
3178
|
+
}).describe("Defines a placement error on the PCB");
|
|
3143
3179
|
var import_zod44 = require("zod");
|
|
3144
|
-
var
|
|
3145
|
-
|
|
3146
|
-
|
|
3180
|
+
var pcb_trace_hint = import_zod44.z.object({
|
|
3181
|
+
pcb_trace_hint_id: import_zod44.z.string(),
|
|
3182
|
+
type: import_zod44.z.literal("pcb_trace_hint"),
|
|
3183
|
+
pcb_port_id: import_zod44.z.string(),
|
|
3147
3184
|
pcb_component_id: import_zod44.z.string(),
|
|
3185
|
+
route: import_zod44.z.array(route_hint_point)
|
|
3186
|
+
}).describe("A hint that can be used to generate a PCB trace");
|
|
3187
|
+
var import_zod45 = require("zod");
|
|
3188
|
+
var pcb_silkscreen_line = import_zod45.z.object({
|
|
3189
|
+
type: import_zod45.z.literal("pcb_silkscreen_line"),
|
|
3190
|
+
pcb_silkscreen_line_id: import_zod45.z.string(),
|
|
3191
|
+
pcb_component_id: import_zod45.z.string(),
|
|
3192
|
+
stroke_width: distance2.default("0.1mm"),
|
|
3148
3193
|
x1: distance2,
|
|
3149
3194
|
y1: distance2,
|
|
3150
3195
|
x2: distance2,
|
|
3151
3196
|
y2: distance2,
|
|
3152
3197
|
layer: visible_layer
|
|
3153
3198
|
}).describe("Defines a silkscreen line on the PCB");
|
|
3154
|
-
var import_zod45 = require("zod");
|
|
3155
|
-
var pcb_silkscreen_path = import_zod45.z.object({
|
|
3156
|
-
type: import_zod45.z.literal("pcb_silkscreen_path"),
|
|
3157
|
-
pcb_silkscreen_path_id: import_zod45.z.string(),
|
|
3158
|
-
pcb_component_id: import_zod45.z.string(),
|
|
3159
|
-
layer: visible_layer,
|
|
3160
|
-
route: import_zod45.z.array(point)
|
|
3161
|
-
}).describe("Defines a silkscreen path on the PCB");
|
|
3162
3199
|
var import_zod46 = require("zod");
|
|
3163
|
-
var
|
|
3164
|
-
type: import_zod46.z.literal("
|
|
3165
|
-
|
|
3200
|
+
var pcb_silkscreen_path = import_zod46.z.object({
|
|
3201
|
+
type: import_zod46.z.literal("pcb_silkscreen_path"),
|
|
3202
|
+
pcb_silkscreen_path_id: import_zod46.z.string(),
|
|
3166
3203
|
pcb_component_id: import_zod46.z.string(),
|
|
3167
|
-
text: import_zod46.z.string(),
|
|
3168
3204
|
layer: visible_layer,
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
}).describe("Defines silkscreen
|
|
3205
|
+
route: import_zod46.z.array(point),
|
|
3206
|
+
stroke_width: length6
|
|
3207
|
+
}).describe("Defines a silkscreen path on the PCB");
|
|
3172
3208
|
var import_zod47 = require("zod");
|
|
3173
|
-
var
|
|
3209
|
+
var pcb_silkscreen_text = import_zod47.z.object({
|
|
3210
|
+
type: import_zod47.z.literal("pcb_silkscreen_text"),
|
|
3211
|
+
font: import_zod47.z.literal("tscircuit2024").default("tscircuit2024"),
|
|
3212
|
+
font_size: distance2.default("0.2mm"),
|
|
3213
|
+
pcb_component_id: import_zod47.z.string(),
|
|
3214
|
+
text: import_zod47.z.string(),
|
|
3215
|
+
layer: visible_layer,
|
|
3216
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3217
|
+
anchor_alignment: import_zod47.z.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center")
|
|
3218
|
+
}).describe("Defines silkscreen text on the PCB");
|
|
3219
|
+
var import_zod48 = require("zod");
|
|
3220
|
+
var pcb_silkscreen_rect = import_zod48.z.object({
|
|
3221
|
+
type: import_zod48.z.literal("pcb_silkscreen_rect"),
|
|
3222
|
+
pcb_silkscreen_rect_id: import_zod48.z.string(),
|
|
3223
|
+
pcb_component_id: import_zod48.z.string(),
|
|
3224
|
+
center: point,
|
|
3225
|
+
width: distance2,
|
|
3226
|
+
height: distance2,
|
|
3227
|
+
layer: visible_layer
|
|
3228
|
+
}).describe("Defines a silkscreen rect on the PCB");
|
|
3229
|
+
var import_zod49 = require("zod");
|
|
3230
|
+
var pcb_silkscreen_circle = import_zod49.z.object({
|
|
3231
|
+
type: import_zod49.z.literal("pcb_silkscreen_circle"),
|
|
3232
|
+
pcb_silkscreen_circle_id: import_zod49.z.string(),
|
|
3233
|
+
pcb_component_id: import_zod49.z.string(),
|
|
3234
|
+
center: point,
|
|
3235
|
+
radius: distance2,
|
|
3236
|
+
layer: visible_layer
|
|
3237
|
+
}).describe("Defines a silkscreen circle on the PCB");
|
|
3238
|
+
var import_zod50 = require("zod");
|
|
3239
|
+
var pcb_silkscreen_oval = import_zod50.z.object({
|
|
3240
|
+
type: import_zod50.z.literal("pcb_silkscreen_oval"),
|
|
3241
|
+
pcb_silkscreen_oval_id: import_zod50.z.string(),
|
|
3242
|
+
pcb_component_id: import_zod50.z.string(),
|
|
3243
|
+
center: point,
|
|
3244
|
+
radius_x: distance2,
|
|
3245
|
+
radius_y: distance2,
|
|
3246
|
+
layer: visible_layer
|
|
3247
|
+
}).describe("Defines a silkscreen oval on the PCB");
|
|
3248
|
+
var import_zod51 = require("zod");
|
|
3249
|
+
var pcb_fabrication_note_text = import_zod51.z.object({
|
|
3250
|
+
type: import_zod51.z.literal("pcb_fabrication_note_text"),
|
|
3251
|
+
font: import_zod51.z.literal("tscircuit2024").default("tscircuit2024"),
|
|
3252
|
+
font_size: distance2.default("1mm"),
|
|
3253
|
+
pcb_component_id: import_zod51.z.string(),
|
|
3254
|
+
text: import_zod51.z.string(),
|
|
3255
|
+
layer: visible_layer,
|
|
3256
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3257
|
+
anchor_alignment: import_zod51.z.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center")
|
|
3258
|
+
}).describe(
|
|
3259
|
+
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
3260
|
+
);
|
|
3261
|
+
var import_zod522 = require("zod");
|
|
3262
|
+
var pcb_fabrication_note_path = import_zod522.z.object({
|
|
3263
|
+
type: import_zod522.z.literal("pcb_fabrication_note_path"),
|
|
3264
|
+
fabrication_note_path_id: import_zod522.z.string(),
|
|
3265
|
+
pcb_component_id: import_zod522.z.string(),
|
|
3266
|
+
layer: visible_layer,
|
|
3267
|
+
route: import_zod522.z.array(point),
|
|
3268
|
+
stroke_width: length6
|
|
3269
|
+
}).describe(
|
|
3270
|
+
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
3271
|
+
);
|
|
3272
|
+
var import_zod53 = require("zod");
|
|
3273
|
+
var cad_component = import_zod53.z.object({
|
|
3274
|
+
type: import_zod53.z.literal("cad_component"),
|
|
3275
|
+
cad_component_id: import_zod53.z.string(),
|
|
3276
|
+
pcb_component_id: import_zod53.z.string(),
|
|
3277
|
+
source_component_id: import_zod53.z.string(),
|
|
3278
|
+
position: point3,
|
|
3279
|
+
rotation: point3.optional(),
|
|
3280
|
+
size: point3.optional(),
|
|
3281
|
+
layer: layer_ref.optional(),
|
|
3282
|
+
// These are all ways to generate/load the 3d model
|
|
3283
|
+
footprinter_string: import_zod53.z.string().optional(),
|
|
3284
|
+
model_obj_url: import_zod53.z.string().optional(),
|
|
3285
|
+
model_stl_url: import_zod53.z.string().optional(),
|
|
3286
|
+
model_3mf_url: import_zod53.z.string().optional(),
|
|
3287
|
+
model_jscad: import_zod53.z.array(import_zod53.z.any()).optional()
|
|
3288
|
+
}).describe("Defines a component on the PCB");
|
|
3289
|
+
var import_zod54 = require("zod");
|
|
3290
|
+
var any_soup_element = import_zod54.z.union([
|
|
3174
3291
|
source_trace,
|
|
3175
3292
|
source_port,
|
|
3176
3293
|
any_source_component,
|
|
@@ -3195,9 +3312,14 @@ var require_dist = __commonJS({
|
|
|
3195
3312
|
pcb_silkscreen_line,
|
|
3196
3313
|
pcb_silkscreen_path,
|
|
3197
3314
|
pcb_silkscreen_text,
|
|
3315
|
+
pcb_silkscreen_rect,
|
|
3316
|
+
pcb_silkscreen_circle,
|
|
3317
|
+
pcb_silkscreen_oval,
|
|
3198
3318
|
pcb_trace_error,
|
|
3199
3319
|
pcb_placement_error,
|
|
3200
3320
|
pcb_port_not_matched_error,
|
|
3321
|
+
pcb_fabrication_note_path,
|
|
3322
|
+
pcb_fabrication_note_text,
|
|
3201
3323
|
schematic_box,
|
|
3202
3324
|
schematic_text,
|
|
3203
3325
|
schematic_line,
|
|
@@ -3206,7 +3328,8 @@ var require_dist = __commonJS({
|
|
|
3206
3328
|
schematic_trace,
|
|
3207
3329
|
schematic_path,
|
|
3208
3330
|
schematic_error,
|
|
3209
|
-
schematic_net_label
|
|
3331
|
+
schematic_net_label,
|
|
3332
|
+
cad_component
|
|
3210
3333
|
]);
|
|
3211
3334
|
}
|
|
3212
3335
|
});
|
|
@@ -3255,6 +3378,7 @@ var import_mm = require("@tscircuit/mm");
|
|
|
3255
3378
|
var platedhole = (pn, x, y, id, od) => {
|
|
3256
3379
|
return {
|
|
3257
3380
|
type: "pcb_plated_hole",
|
|
3381
|
+
shape: "circle",
|
|
3258
3382
|
x,
|
|
3259
3383
|
y,
|
|
3260
3384
|
hole_diameter: (0, import_mm.mm)(id),
|