easyeda 0.0.337 → 0.0.339
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/browser/index.js +279 -23
- package/dist/browser/index.js.map +1 -1
- package/dist/index.js +1677 -1415
- package/dist/index.js.map +1 -1
- package/dist/main.cjs +1676 -1414
- package/dist/main.cjs.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -27,8 +27,12 @@ __export(dist_exports, {
|
|
|
27
27
|
experiment_type: () => experiment_type,
|
|
28
28
|
external_footprint_load_error: () => external_footprint_load_error,
|
|
29
29
|
frequency: () => frequency,
|
|
30
|
+
getRotationBetweenPcbPin1Locations: () => getRotationBetweenPcbPin1Locations,
|
|
30
31
|
getZodPrefixedIdWithDefault: () => getZodPrefixedIdWithDefault,
|
|
31
32
|
inductance: () => inductance,
|
|
33
|
+
insertionDirectionToCanonical: () => insertionDirectionToCanonical,
|
|
34
|
+
insertionDirectionToVector: () => insertionDirectionToVector,
|
|
35
|
+
insertion_direction: () => insertion_direction,
|
|
32
36
|
kicadAt: () => kicadAt,
|
|
33
37
|
kicadEffects: () => kicadEffects,
|
|
34
38
|
kicadFont: () => kicadFont,
|
|
@@ -57,6 +61,7 @@ __export(dist_exports, {
|
|
|
57
61
|
pcb_breakout_point: () => pcb_breakout_point,
|
|
58
62
|
pcb_component: () => pcb_component,
|
|
59
63
|
pcb_component_invalid_layer_error: () => pcb_component_invalid_layer_error,
|
|
64
|
+
pcb_component_missing_courtyard_warning: () => pcb_component_missing_courtyard_warning,
|
|
60
65
|
pcb_component_not_on_board_edge_error: () => pcb_component_not_on_board_edge_error,
|
|
61
66
|
pcb_component_outside_board_error: () => pcb_component_outside_board_error,
|
|
62
67
|
pcb_connector_not_in_accessible_orientation_warning: () => pcb_connector_not_in_accessible_orientation_warning,
|
|
@@ -76,6 +81,11 @@ __export(dist_exports, {
|
|
|
76
81
|
pcb_cutout_path: () => pcb_cutout_path,
|
|
77
82
|
pcb_cutout_polygon: () => pcb_cutout_polygon,
|
|
78
83
|
pcb_cutout_rect: () => pcb_cutout_rect,
|
|
84
|
+
pcb_debug_line: () => pcb_debug_line,
|
|
85
|
+
pcb_debug_object: () => pcb_debug_object,
|
|
86
|
+
pcb_debug_object_base: () => pcb_debug_object_base,
|
|
87
|
+
pcb_debug_point: () => pcb_debug_point,
|
|
88
|
+
pcb_debug_rect: () => pcb_debug_rect,
|
|
79
89
|
pcb_fabrication_note_dimension: () => pcb_fabrication_note_dimension,
|
|
80
90
|
pcb_fabrication_note_path: () => pcb_fabrication_note_path,
|
|
81
91
|
pcb_fabrication_note_rect: () => pcb_fabrication_note_rect,
|
|
@@ -105,6 +115,7 @@ __export(dist_exports, {
|
|
|
105
115
|
pcb_pad_trace_clearance_error: () => pcb_pad_trace_clearance_error,
|
|
106
116
|
pcb_panel: () => pcb_panel,
|
|
107
117
|
pcb_panelization_placement_error: () => pcb_panelization_placement_error,
|
|
118
|
+
pcb_pin1_location: () => pcb_pin1_location,
|
|
108
119
|
pcb_placement_error: () => pcb_placement_error,
|
|
109
120
|
pcb_plated_hole: () => pcb_plated_hole,
|
|
110
121
|
pcb_port: () => pcb_port,
|
|
@@ -135,6 +146,7 @@ __export(dist_exports, {
|
|
|
135
146
|
pcb_trace_route_point_via: () => pcb_trace_route_point_via,
|
|
136
147
|
pcb_trace_route_point_wire: () => pcb_trace_route_point_wire,
|
|
137
148
|
pcb_trace_too_long_warning: () => pcb_trace_too_long_warning,
|
|
149
|
+
pcb_trace_too_many_vias_warning: () => pcb_trace_too_many_vias_warning,
|
|
138
150
|
pcb_trace_warning: () => pcb_trace_warning,
|
|
139
151
|
pcb_via: () => pcb_via,
|
|
140
152
|
pcb_via_clearance_error: () => pcb_via_clearance_error,
|
|
@@ -156,6 +168,7 @@ __export(dist_exports, {
|
|
|
156
168
|
schematic_component_overlap_warning: () => schematic_component_overlap_warning,
|
|
157
169
|
schematic_component_port_arrangement_by_sides: () => schematic_component_port_arrangement_by_sides,
|
|
158
170
|
schematic_component_port_arrangement_by_size: () => schematic_component_port_arrangement_by_size,
|
|
171
|
+
schematic_component_styling_warning: () => schematic_component_styling_warning,
|
|
159
172
|
schematic_debug_line: () => schematic_debug_line,
|
|
160
173
|
schematic_debug_object: () => schematic_debug_object,
|
|
161
174
|
schematic_debug_object_base: () => schematic_debug_object_base,
|
|
@@ -239,6 +252,7 @@ __export(dist_exports, {
|
|
|
239
252
|
source_simple_capacitor: () => source_simple_capacitor,
|
|
240
253
|
source_simple_chip: () => source_simple_chip,
|
|
241
254
|
source_simple_connector: () => source_simple_connector,
|
|
255
|
+
source_simple_connector_standards: () => source_simple_connector_standards,
|
|
242
256
|
source_simple_crystal: () => source_simple_crystal,
|
|
243
257
|
source_simple_current_source: () => source_simple_current_source,
|
|
244
258
|
source_simple_diode: () => source_simple_diode,
|
|
@@ -285,6 +299,7 @@ var SI_PREFIX_VALUES = /* @__PURE__ */ new Map([
|
|
|
285
299
|
["", 1],
|
|
286
300
|
["m", 1e-3],
|
|
287
301
|
["\xB5", 1e-6],
|
|
302
|
+
["\u03BC", 1e-6],
|
|
288
303
|
["u", 1e-6],
|
|
289
304
|
["n", 1e-9],
|
|
290
305
|
["p", 1e-12],
|
|
@@ -355,6 +370,7 @@ var unitMappings = {
|
|
|
355
370
|
baseUnit: "A",
|
|
356
371
|
variants: {
|
|
357
372
|
\u00B5A: 1e-6,
|
|
373
|
+
\u03BCA: 1e-6,
|
|
358
374
|
mA: 1e-3,
|
|
359
375
|
ma: 1e-3,
|
|
360
376
|
A: 1,
|
|
@@ -368,6 +384,7 @@ var unitMappings = {
|
|
|
368
384
|
pF: 1e-12,
|
|
369
385
|
nF: 1e-9,
|
|
370
386
|
\u00B5F: 1e-6,
|
|
387
|
+
\u03BCF: 1e-6,
|
|
371
388
|
uF: 1e-6,
|
|
372
389
|
mF: 1e-3,
|
|
373
390
|
F: 1,
|
|
@@ -382,6 +399,7 @@ var unitMappings = {
|
|
|
382
399
|
pH: 1e-12,
|
|
383
400
|
nH: 1e-9,
|
|
384
401
|
\u00B5H: 1e-6,
|
|
402
|
+
\u03BCH: 1e-6,
|
|
385
403
|
uH: 1e-6,
|
|
386
404
|
mH: 1e-3,
|
|
387
405
|
H: 1,
|
|
@@ -413,6 +431,7 @@ var unitMappings = {
|
|
|
413
431
|
ns: 1e-6,
|
|
414
432
|
us: 1e-3,
|
|
415
433
|
\u00B5s: 1e-3,
|
|
434
|
+
\u03BCs: 1e-3,
|
|
416
435
|
ms: 1,
|
|
417
436
|
s: 1e3
|
|
418
437
|
}
|
|
@@ -422,6 +441,7 @@ var unitMappings = {
|
|
|
422
441
|
variants: {
|
|
423
442
|
nm: 1e-6,
|
|
424
443
|
\u00B5m: 1e-3,
|
|
444
|
+
\u03BCm: 1e-3,
|
|
425
445
|
um: 1e-3,
|
|
426
446
|
mm: 1,
|
|
427
447
|
cm: 10,
|
|
@@ -714,27 +734,33 @@ import { z as z168 } from "zod";
|
|
|
714
734
|
import { z as z169 } from "zod";
|
|
715
735
|
import { z as z170 } from "zod";
|
|
716
736
|
import { z as z171 } from "zod";
|
|
717
|
-
import { z as z173 } from "zod";
|
|
718
737
|
import { z as z172 } from "zod";
|
|
719
|
-
import { z as
|
|
738
|
+
import { z as z173 } from "zod";
|
|
720
739
|
import { z as z174 } from "zod";
|
|
740
|
+
import { z as z175 } from "zod";
|
|
721
741
|
import { z as z176 } from "zod";
|
|
722
742
|
import { z as z177 } from "zod";
|
|
723
|
-
import { z as z178 } from "zod";
|
|
724
743
|
import { z as z179 } from "zod";
|
|
725
|
-
import { z as
|
|
744
|
+
import { z as z178 } from "zod";
|
|
726
745
|
import { z as z181 } from "zod";
|
|
746
|
+
import { z as z180 } from "zod";
|
|
727
747
|
import { z as z182 } from "zod";
|
|
728
748
|
import { z as z183 } from "zod";
|
|
729
749
|
import { z as z184 } from "zod";
|
|
730
750
|
import { z as z185 } from "zod";
|
|
731
|
-
import { z as z187 } from "zod";
|
|
732
751
|
import { z as z186 } from "zod";
|
|
752
|
+
import { z as z187 } from "zod";
|
|
733
753
|
import { z as z188 } from "zod";
|
|
734
754
|
import { z as z189 } from "zod";
|
|
735
755
|
import { z as z190 } from "zod";
|
|
736
756
|
import { z as z191 } from "zod";
|
|
757
|
+
import { z as z193 } from "zod";
|
|
737
758
|
import { z as z192 } from "zod";
|
|
759
|
+
import { z as z194 } from "zod";
|
|
760
|
+
import { z as z195 } from "zod";
|
|
761
|
+
import { z as z196 } from "zod";
|
|
762
|
+
import { z as z197 } from "zod";
|
|
763
|
+
import { z as z198 } from "zod";
|
|
738
764
|
var resistance = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v, "\u03A9").value);
|
|
739
765
|
var capacitance = z.string().or(z.number()).transform((v) => parseAndConvertSiUnit(v, "F").value).transform((value) => {
|
|
740
766
|
return Number.parseFloat(value.toPrecision(12));
|
|
@@ -1146,9 +1172,20 @@ var source_simple_pin_header = source_component_base.extend({
|
|
|
1146
1172
|
gender: z31.enum(["male", "female"]).optional().default("male")
|
|
1147
1173
|
});
|
|
1148
1174
|
expectTypesMatch(true);
|
|
1175
|
+
var source_simple_connector_standards = [
|
|
1176
|
+
"usb_c",
|
|
1177
|
+
"m2",
|
|
1178
|
+
"jst_sh",
|
|
1179
|
+
"jst_gh",
|
|
1180
|
+
"jst_zh",
|
|
1181
|
+
"jst_ph",
|
|
1182
|
+
"jst_xh",
|
|
1183
|
+
"jst_vh"
|
|
1184
|
+
];
|
|
1149
1185
|
var source_simple_connector = source_component_base.extend({
|
|
1150
1186
|
ftype: z32.literal("simple_connector"),
|
|
1151
|
-
standard: z32.enum(
|
|
1187
|
+
standard: z32.enum(source_simple_connector_standards).optional(),
|
|
1188
|
+
pin_count: z32.number().int().positive().optional()
|
|
1152
1189
|
});
|
|
1153
1190
|
expectTypesMatch(true);
|
|
1154
1191
|
var source_simple_pinout = source_component_base.extend({
|
|
@@ -1434,6 +1471,7 @@ var source_trace = z57.object({
|
|
|
1434
1471
|
subcircuit_id: z57.string().optional(),
|
|
1435
1472
|
subcircuit_connectivity_map_key: z57.string().optional(),
|
|
1436
1473
|
max_length: z57.number().optional(),
|
|
1474
|
+
max_via_count: z57.number().int().nonnegative().optional(),
|
|
1437
1475
|
name: z57.string().optional(),
|
|
1438
1476
|
min_trace_thickness: z57.number().optional(),
|
|
1439
1477
|
display_name: z57.string().optional()
|
|
@@ -1522,7 +1560,7 @@ var source_manually_placed_via = z64.object({
|
|
|
1522
1560
|
type: z64.literal("source_manually_placed_via"),
|
|
1523
1561
|
source_manually_placed_via_id: z64.string(),
|
|
1524
1562
|
source_group_id: z64.string(),
|
|
1525
|
-
source_net_id: z64.string(),
|
|
1563
|
+
source_net_id: z64.string().min(1).optional(),
|
|
1526
1564
|
subcircuit_id: z64.string().optional(),
|
|
1527
1565
|
source_trace_id: z64.string().optional()
|
|
1528
1566
|
}).describe("Defines a via that is manually placed in the source domain");
|
|
@@ -1844,6 +1882,7 @@ var schematic_text = z82.object({
|
|
|
1844
1882
|
schematic_component_id: z82.string().optional(),
|
|
1845
1883
|
schematic_symbol_id: z82.string().optional(),
|
|
1846
1884
|
schematic_text_id: z82.string(),
|
|
1885
|
+
source_trace_id: z82.string().optional(),
|
|
1847
1886
|
text: z82.string(),
|
|
1848
1887
|
font_size: z82.number().default(0.18),
|
|
1849
1888
|
position: z82.object({
|
|
@@ -1869,6 +1908,7 @@ var schematic_port = z83.object({
|
|
|
1869
1908
|
true_ccw_index: z83.number().optional(),
|
|
1870
1909
|
pin_number: z83.number().optional(),
|
|
1871
1910
|
display_pin_label: z83.string().optional(),
|
|
1911
|
+
display_pin_label_font_size: z83.number().positive().finite().optional(),
|
|
1872
1912
|
subcircuit_id: z83.string().optional(),
|
|
1873
1913
|
is_connected: z83.boolean().optional(),
|
|
1874
1914
|
is_internal_circuit_port: z83.boolean().optional(),
|
|
@@ -1980,119 +2020,220 @@ var schematic_component_overlap_warning = z90.object({
|
|
|
1980
2020
|
"Warning emitted when the rendered bounds of two schematic components overlap"
|
|
1981
2021
|
);
|
|
1982
2022
|
expectTypesMatch(true);
|
|
1983
|
-
var
|
|
1984
|
-
type: z91.literal("
|
|
2023
|
+
var schematic_component_styling_warning = z91.object({
|
|
2024
|
+
type: z91.literal("schematic_component_styling_warning"),
|
|
2025
|
+
schematic_component_styling_warning_id: getZodPrefixedIdWithDefault(
|
|
2026
|
+
"schematic_component_styling_warning"
|
|
2027
|
+
),
|
|
2028
|
+
warning_type: z91.literal("schematic_component_styling_warning").default("schematic_component_styling_warning"),
|
|
2029
|
+
message: z91.string(),
|
|
2030
|
+
schematic_component_id: z91.string(),
|
|
2031
|
+
styling_issue_type: z91.string(),
|
|
2032
|
+
schematic_port_ids: z91.array(z91.string()).optional(),
|
|
2033
|
+
source_component_id: z91.string().optional(),
|
|
2034
|
+
schematic_sheet_id: z91.string().optional(),
|
|
2035
|
+
subcircuit_id: z91.string().optional()
|
|
2036
|
+
}).describe(
|
|
2037
|
+
"Warning emitted when a schematic component has a visual styling issue"
|
|
2038
|
+
);
|
|
2039
|
+
expectTypesMatch(true);
|
|
2040
|
+
var schematic_element_outside_sheet_warning = z92.object({
|
|
2041
|
+
type: z92.literal("schematic_element_outside_sheet_warning"),
|
|
1985
2042
|
schematic_element_outside_sheet_warning_id: getZodPrefixedIdWithDefault(
|
|
1986
2043
|
"schematic_element_outside_sheet_warning"
|
|
1987
2044
|
),
|
|
1988
|
-
warning_type:
|
|
1989
|
-
message:
|
|
1990
|
-
schematic_sheet_id:
|
|
1991
|
-
schematic_element_type:
|
|
2045
|
+
warning_type: z92.literal("schematic_element_outside_sheet_warning").default("schematic_element_outside_sheet_warning"),
|
|
2046
|
+
message: z92.string(),
|
|
2047
|
+
schematic_sheet_id: z92.string(),
|
|
2048
|
+
schematic_element_type: z92.enum([
|
|
1992
2049
|
"schematic_component",
|
|
1993
2050
|
"schematic_net_label",
|
|
1994
2051
|
"schematic_trace"
|
|
1995
2052
|
]),
|
|
1996
|
-
schematic_element_id:
|
|
2053
|
+
schematic_element_id: z92.string()
|
|
1997
2054
|
}).describe(
|
|
1998
2055
|
"Warning emitted when a schematic component, net label, or trace extends outside its schematic sheet"
|
|
1999
2056
|
);
|
|
2000
2057
|
expectTypesMatch(true);
|
|
2001
|
-
var schematic_group =
|
|
2002
|
-
type:
|
|
2058
|
+
var schematic_group = z93.object({
|
|
2059
|
+
type: z93.literal("schematic_group"),
|
|
2003
2060
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
2004
|
-
schematic_sheet_id:
|
|
2005
|
-
source_group_id:
|
|
2006
|
-
is_subcircuit:
|
|
2007
|
-
subcircuit_id:
|
|
2061
|
+
schematic_sheet_id: z93.string().optional(),
|
|
2062
|
+
source_group_id: z93.string(),
|
|
2063
|
+
is_subcircuit: z93.boolean().optional(),
|
|
2064
|
+
subcircuit_id: z93.string().optional(),
|
|
2008
2065
|
width: length,
|
|
2009
2066
|
height: length,
|
|
2010
2067
|
center: point,
|
|
2011
|
-
schematic_component_ids:
|
|
2012
|
-
show_as_schematic_box:
|
|
2013
|
-
name:
|
|
2014
|
-
description:
|
|
2068
|
+
schematic_component_ids: z93.array(z93.string()),
|
|
2069
|
+
show_as_schematic_box: z93.boolean().optional(),
|
|
2070
|
+
name: z93.string().optional(),
|
|
2071
|
+
description: z93.string().optional()
|
|
2015
2072
|
}).describe("Defines a group of components on the schematic");
|
|
2016
2073
|
expectTypesMatch(true);
|
|
2017
|
-
var schematic_table =
|
|
2018
|
-
type:
|
|
2074
|
+
var schematic_table = z94.object({
|
|
2075
|
+
type: z94.literal("schematic_table"),
|
|
2019
2076
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
2020
|
-
schematic_sheet_id:
|
|
2077
|
+
schematic_sheet_id: z94.string().optional(),
|
|
2021
2078
|
anchor_position: point,
|
|
2022
|
-
column_widths:
|
|
2023
|
-
row_heights:
|
|
2079
|
+
column_widths: z94.array(distance),
|
|
2080
|
+
row_heights: z94.array(distance),
|
|
2024
2081
|
cell_padding: distance.optional(),
|
|
2025
2082
|
border_width: distance.optional(),
|
|
2026
|
-
subcircuit_id:
|
|
2027
|
-
schematic_component_id:
|
|
2083
|
+
subcircuit_id: z94.string().optional(),
|
|
2084
|
+
schematic_component_id: z94.string().optional(),
|
|
2028
2085
|
anchor: ninePointAnchor.optional()
|
|
2029
2086
|
}).describe("Defines a table on the schematic");
|
|
2030
2087
|
expectTypesMatch(true);
|
|
2031
|
-
var schematic_table_cell =
|
|
2032
|
-
type:
|
|
2088
|
+
var schematic_table_cell = z95.object({
|
|
2089
|
+
type: z95.literal("schematic_table_cell"),
|
|
2033
2090
|
schematic_table_cell_id: getZodPrefixedIdWithDefault(
|
|
2034
2091
|
"schematic_table_cell"
|
|
2035
2092
|
),
|
|
2036
|
-
schematic_sheet_id:
|
|
2037
|
-
schematic_table_id:
|
|
2038
|
-
start_row_index:
|
|
2039
|
-
end_row_index:
|
|
2040
|
-
start_column_index:
|
|
2041
|
-
end_column_index:
|
|
2042
|
-
text:
|
|
2093
|
+
schematic_sheet_id: z95.string().optional(),
|
|
2094
|
+
schematic_table_id: z95.string(),
|
|
2095
|
+
start_row_index: z95.number(),
|
|
2096
|
+
end_row_index: z95.number(),
|
|
2097
|
+
start_column_index: z95.number(),
|
|
2098
|
+
end_column_index: z95.number(),
|
|
2099
|
+
text: z95.string().optional(),
|
|
2043
2100
|
center: point,
|
|
2044
2101
|
width: distance,
|
|
2045
2102
|
height: distance,
|
|
2046
|
-
horizontal_align:
|
|
2047
|
-
vertical_align:
|
|
2103
|
+
horizontal_align: z95.enum(["left", "center", "right"]).optional(),
|
|
2104
|
+
vertical_align: z95.enum(["top", "middle", "bottom"]).optional(),
|
|
2048
2105
|
font_size: distance.optional(),
|
|
2049
|
-
subcircuit_id:
|
|
2106
|
+
subcircuit_id: z95.string().optional()
|
|
2050
2107
|
}).describe("Defines a cell within a schematic_table");
|
|
2051
2108
|
expectTypesMatch(true);
|
|
2052
|
-
var schematic_sheet =
|
|
2053
|
-
type:
|
|
2109
|
+
var schematic_sheet = z96.object({
|
|
2110
|
+
type: z96.literal("schematic_sheet"),
|
|
2054
2111
|
schematic_sheet_id: getZodPrefixedIdWithDefault("schematic_sheet"),
|
|
2055
|
-
name:
|
|
2056
|
-
sheet_index:
|
|
2057
|
-
subcircuit_id:
|
|
2058
|
-
outline_color:
|
|
2112
|
+
name: z96.string().optional(),
|
|
2113
|
+
sheet_index: z96.number().optional(),
|
|
2114
|
+
subcircuit_id: z96.string().optional(),
|
|
2115
|
+
outline_color: z96.string().optional()
|
|
2059
2116
|
}).describe(
|
|
2060
2117
|
"Defines a schematic sheet or page that components can be placed on"
|
|
2061
2118
|
);
|
|
2062
2119
|
expectTypesMatch(true);
|
|
2063
|
-
var point_with_bulge =
|
|
2120
|
+
var point_with_bulge = z97.object({
|
|
2064
2121
|
x: distance,
|
|
2065
2122
|
y: distance,
|
|
2066
|
-
bulge:
|
|
2123
|
+
bulge: z97.number().optional()
|
|
2067
2124
|
});
|
|
2068
2125
|
expectTypesMatch(true);
|
|
2069
|
-
var ring =
|
|
2070
|
-
vertices:
|
|
2126
|
+
var ring = z97.object({
|
|
2127
|
+
vertices: z97.array(point_with_bulge)
|
|
2071
2128
|
});
|
|
2072
2129
|
expectTypesMatch(true);
|
|
2073
|
-
var brep_shape =
|
|
2130
|
+
var brep_shape = z97.object({
|
|
2074
2131
|
outer_ring: ring,
|
|
2075
|
-
inner_rings:
|
|
2076
|
-
});
|
|
2132
|
+
inner_rings: z97.array(ring).default([])
|
|
2133
|
+
});
|
|
2134
|
+
expectTypesMatch(true);
|
|
2135
|
+
var insertionDirectionToCanonical = {
|
|
2136
|
+
from_left: "from_left",
|
|
2137
|
+
from_right: "from_right",
|
|
2138
|
+
from_top: "from_top",
|
|
2139
|
+
from_bottom: "from_bottom",
|
|
2140
|
+
from_above: "from_above",
|
|
2141
|
+
from_below: "from_below",
|
|
2142
|
+
from_x_neg: "from_left",
|
|
2143
|
+
from_x_pos: "from_right",
|
|
2144
|
+
from_y_pos: "from_top",
|
|
2145
|
+
from_y_neg: "from_bottom",
|
|
2146
|
+
from_z_pos: "from_above",
|
|
2147
|
+
from_z_neg: "from_below",
|
|
2148
|
+
/** @deprecated use `from_top` */
|
|
2149
|
+
from_front: "from_top",
|
|
2150
|
+
/** @deprecated use `from_bottom` */
|
|
2151
|
+
from_back: "from_bottom"
|
|
2152
|
+
};
|
|
2153
|
+
var insertionDirectionToVector = {
|
|
2154
|
+
from_left: { x: -1, y: 0, z: 0 },
|
|
2155
|
+
from_right: { x: 1, y: 0, z: 0 },
|
|
2156
|
+
from_top: { x: 0, y: 1, z: 0 },
|
|
2157
|
+
from_bottom: { x: 0, y: -1, z: 0 },
|
|
2158
|
+
from_above: { x: 0, y: 0, z: 1 },
|
|
2159
|
+
from_below: { x: 0, y: 0, z: -1 }
|
|
2160
|
+
};
|
|
2161
|
+
var insertion_direction = z98.enum([
|
|
2162
|
+
"from_left",
|
|
2163
|
+
"from_right",
|
|
2164
|
+
"from_top",
|
|
2165
|
+
"from_bottom",
|
|
2166
|
+
"from_above",
|
|
2167
|
+
"from_below",
|
|
2168
|
+
"from_x_neg",
|
|
2169
|
+
"from_x_pos",
|
|
2170
|
+
"from_y_pos",
|
|
2171
|
+
"from_y_neg",
|
|
2172
|
+
"from_z_pos",
|
|
2173
|
+
"from_z_neg",
|
|
2174
|
+
// Deprecated, accepted so existing Circuit JSON keeps parsing.
|
|
2175
|
+
"from_front",
|
|
2176
|
+
"from_back"
|
|
2177
|
+
]).transform((value) => insertionDirectionToCanonical[value]).describe(
|
|
2178
|
+
'The side exposing the receptacle where the cable or mating part is attached, following the 2D PCB diagram convention, not a 3D viewport frame. In project coordinate space, "from_top" is +Y, "from_bottom" -Y, "from_left" -X, "from_right" +X, "from_above" +Z and "from_below" -Z. A receptacle on the +Y edge is "from_top" even though the plug moves in -Y as it seats. Cartesian spellings such as "from_y_pos" are accepted and normalized to the named values, as are the deprecated "from_front" (now "from_top") and "from_back" (now "from_bottom").'
|
|
2179
|
+
);
|
|
2077
2180
|
expectTypesMatch(true);
|
|
2078
|
-
|
|
2181
|
+
expectTypesMatch(
|
|
2182
|
+
true
|
|
2183
|
+
);
|
|
2184
|
+
var pcb_pin1_location = z99.enum([
|
|
2185
|
+
"leftside_top",
|
|
2186
|
+
"leftside_bottom",
|
|
2187
|
+
"rightside_top",
|
|
2188
|
+
"rightside_bottom",
|
|
2189
|
+
"topside_left",
|
|
2190
|
+
"topside_right",
|
|
2191
|
+
"bottomside_left",
|
|
2192
|
+
"bottomside_right"
|
|
2193
|
+
]);
|
|
2194
|
+
expectTypesMatch(true);
|
|
2195
|
+
var pin1LocationRotationCycles = [
|
|
2196
|
+
[
|
|
2197
|
+
"leftside_top",
|
|
2198
|
+
"bottomside_left",
|
|
2199
|
+
"rightside_bottom",
|
|
2200
|
+
"topside_right"
|
|
2201
|
+
],
|
|
2202
|
+
[
|
|
2203
|
+
"leftside_bottom",
|
|
2204
|
+
"bottomside_right",
|
|
2205
|
+
"rightside_top",
|
|
2206
|
+
"topside_left"
|
|
2207
|
+
]
|
|
2208
|
+
];
|
|
2209
|
+
var getRotationBetweenPcbPin1Locations = (from, to) => {
|
|
2210
|
+
for (const cycle of pin1LocationRotationCycles) {
|
|
2211
|
+
const fromIndex = cycle.indexOf(from);
|
|
2212
|
+
const toIndex = cycle.indexOf(to);
|
|
2213
|
+
if (fromIndex !== -1 && toIndex !== -1) {
|
|
2214
|
+
return (toIndex - fromIndex + cycle.length) % cycle.length * 90;
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
return null;
|
|
2218
|
+
};
|
|
2219
|
+
var pcb_route_hint = z100.object({
|
|
2079
2220
|
x: distance,
|
|
2080
2221
|
y: distance,
|
|
2081
|
-
via:
|
|
2222
|
+
via: z100.boolean().optional(),
|
|
2082
2223
|
via_to_layer: layer_ref.optional()
|
|
2083
2224
|
});
|
|
2084
|
-
var pcb_route_hints =
|
|
2225
|
+
var pcb_route_hints = z100.array(pcb_route_hint);
|
|
2085
2226
|
expectTypesMatch(true);
|
|
2086
2227
|
expectTypesMatch(true);
|
|
2087
|
-
var route_hint_point =
|
|
2228
|
+
var route_hint_point = z101.object({
|
|
2088
2229
|
x: distance,
|
|
2089
2230
|
y: distance,
|
|
2090
|
-
via:
|
|
2231
|
+
via: z101.boolean().optional(),
|
|
2091
2232
|
to_layer: layer_ref.optional(),
|
|
2092
2233
|
trace_width: distance.optional()
|
|
2093
2234
|
});
|
|
2094
2235
|
expectTypesMatch(true);
|
|
2095
|
-
var manufacturing_drc_properties =
|
|
2236
|
+
var manufacturing_drc_properties = z102.object({
|
|
2096
2237
|
min_trace_width: length.optional(),
|
|
2097
2238
|
min_board_edge_clearance: length.optional(),
|
|
2098
2239
|
min_via_hole_edge_to_via_hole_edge_clearance: length.optional(),
|
|
@@ -2105,26 +2246,26 @@ var manufacturing_drc_properties = z99.object({
|
|
|
2105
2246
|
min_via_hole_diameter: length.optional(),
|
|
2106
2247
|
min_via_pad_diameter: length.optional()
|
|
2107
2248
|
});
|
|
2108
|
-
var pcb_component =
|
|
2109
|
-
type:
|
|
2249
|
+
var pcb_component = z103.object({
|
|
2250
|
+
type: z103.literal("pcb_component"),
|
|
2110
2251
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
2111
|
-
source_component_id:
|
|
2252
|
+
source_component_id: z103.string(),
|
|
2112
2253
|
center: point,
|
|
2113
2254
|
layer: layer_ref,
|
|
2114
2255
|
rotation,
|
|
2115
|
-
display_offset_x:
|
|
2256
|
+
display_offset_x: z103.string().optional().describe(
|
|
2116
2257
|
"How to display the x offset for this part, usually corresponding with how the user specified it"
|
|
2117
2258
|
),
|
|
2118
|
-
display_offset_y:
|
|
2259
|
+
display_offset_y: z103.string().optional().describe(
|
|
2119
2260
|
"How to display the y offset for this part, usually corresponding with how the user specified it"
|
|
2120
2261
|
),
|
|
2121
2262
|
width: length,
|
|
2122
2263
|
height: length,
|
|
2123
|
-
do_not_place:
|
|
2124
|
-
is_allowed_to_be_off_board:
|
|
2125
|
-
subcircuit_id:
|
|
2126
|
-
pcb_group_id:
|
|
2127
|
-
position_mode:
|
|
2264
|
+
do_not_place: z103.boolean().optional(),
|
|
2265
|
+
is_allowed_to_be_off_board: z103.boolean().optional(),
|
|
2266
|
+
subcircuit_id: z103.string().optional(),
|
|
2267
|
+
pcb_group_id: z103.string().optional(),
|
|
2268
|
+
position_mode: z103.enum([
|
|
2128
2269
|
"packed",
|
|
2129
2270
|
"relative_to_group_anchor",
|
|
2130
2271
|
"relative_to_another_component",
|
|
@@ -2132,272 +2273,298 @@ var pcb_component = z100.object({
|
|
|
2132
2273
|
]).optional(),
|
|
2133
2274
|
anchor_position: point.optional(),
|
|
2134
2275
|
anchor_alignment: ninePointAnchor.optional(),
|
|
2135
|
-
positioned_relative_to_pcb_group_id:
|
|
2136
|
-
positioned_relative_to_pcb_board_id:
|
|
2276
|
+
positioned_relative_to_pcb_group_id: z103.string().optional(),
|
|
2277
|
+
positioned_relative_to_pcb_board_id: z103.string().optional(),
|
|
2137
2278
|
cable_insertion_center: point.optional(),
|
|
2138
|
-
insertion_direction:
|
|
2139
|
-
|
|
2140
|
-
"
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
"
|
|
2144
|
-
|
|
2145
|
-
metadata:
|
|
2279
|
+
insertion_direction: insertion_direction.optional(),
|
|
2280
|
+
pin1_location: pcb_pin1_location.optional().describe(
|
|
2281
|
+
"Location of pin 1 on the unrotated, top-view component footprint"
|
|
2282
|
+
),
|
|
2283
|
+
supplier_pin1_location_map: z103.record(supplier_name, pcb_pin1_location).optional().describe(
|
|
2284
|
+
"Pin 1 location for each supplier's unrotated, top-view footprint"
|
|
2285
|
+
),
|
|
2286
|
+
metadata: z103.object({
|
|
2146
2287
|
kicad_footprint: kicadFootprintMetadata.optional()
|
|
2147
2288
|
}).optional(),
|
|
2148
|
-
obstructs_within_bounds:
|
|
2289
|
+
obstructs_within_bounds: z103.boolean().default(true).describe(
|
|
2149
2290
|
"Does this component take up all the space within its bounds on a layer. This is generally true except for when separated pin headers are being represented by a single component (in which case, chips can be placed between the pin headers) or for tall modules where chips fit underneath"
|
|
2150
2291
|
)
|
|
2151
2292
|
}).describe("Defines a component on the PCB");
|
|
2152
2293
|
expectTypesMatch(true);
|
|
2153
|
-
var
|
|
2154
|
-
type:
|
|
2294
|
+
var pcb_debug_object_base = z104.object({
|
|
2295
|
+
type: z104.literal("pcb_debug_object"),
|
|
2296
|
+
pcb_debug_object_id: getZodPrefixedIdWithDefault("pcb_debug_object"),
|
|
2297
|
+
label: z104.string().optional(),
|
|
2298
|
+
subcircuit_id: z104.string().optional()
|
|
2299
|
+
});
|
|
2300
|
+
var pcb_debug_rect = pcb_debug_object_base.extend({
|
|
2301
|
+
shape: z104.literal("rect"),
|
|
2302
|
+
center: point,
|
|
2303
|
+
size
|
|
2304
|
+
});
|
|
2305
|
+
var pcb_debug_line = pcb_debug_object_base.extend({
|
|
2306
|
+
shape: z104.literal("line"),
|
|
2307
|
+
start: point,
|
|
2308
|
+
end: point
|
|
2309
|
+
});
|
|
2310
|
+
var pcb_debug_point = pcb_debug_object_base.extend({
|
|
2311
|
+
shape: z104.literal("point"),
|
|
2312
|
+
center: point
|
|
2313
|
+
});
|
|
2314
|
+
var pcb_debug_object = z104.discriminatedUnion("shape", [
|
|
2315
|
+
pcb_debug_rect,
|
|
2316
|
+
pcb_debug_line,
|
|
2317
|
+
pcb_debug_point
|
|
2318
|
+
]);
|
|
2319
|
+
expectTypesMatch(true);
|
|
2320
|
+
var pcb_hole_circle = z105.object({
|
|
2321
|
+
type: z105.literal("pcb_hole"),
|
|
2155
2322
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
2156
|
-
pcb_group_id:
|
|
2157
|
-
subcircuit_id:
|
|
2158
|
-
pcb_component_id:
|
|
2159
|
-
hole_shape:
|
|
2160
|
-
hole_diameter:
|
|
2323
|
+
pcb_group_id: z105.string().optional(),
|
|
2324
|
+
subcircuit_id: z105.string().optional(),
|
|
2325
|
+
pcb_component_id: z105.string().optional(),
|
|
2326
|
+
hole_shape: z105.literal("circle"),
|
|
2327
|
+
hole_diameter: z105.number(),
|
|
2161
2328
|
x: distance,
|
|
2162
2329
|
y: distance,
|
|
2163
|
-
is_covered_with_solder_mask:
|
|
2164
|
-
soldermask_margin:
|
|
2330
|
+
is_covered_with_solder_mask: z105.boolean().optional(),
|
|
2331
|
+
soldermask_margin: z105.number().optional()
|
|
2165
2332
|
});
|
|
2166
2333
|
var pcb_hole_circle_shape = pcb_hole_circle.describe(
|
|
2167
2334
|
"Defines a circular hole on the PCB"
|
|
2168
2335
|
);
|
|
2169
2336
|
expectTypesMatch(true);
|
|
2170
|
-
var pcb_hole_rect =
|
|
2171
|
-
type:
|
|
2337
|
+
var pcb_hole_rect = z105.object({
|
|
2338
|
+
type: z105.literal("pcb_hole"),
|
|
2172
2339
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
2173
|
-
pcb_group_id:
|
|
2174
|
-
subcircuit_id:
|
|
2175
|
-
pcb_component_id:
|
|
2176
|
-
hole_shape:
|
|
2177
|
-
hole_width:
|
|
2178
|
-
hole_height:
|
|
2340
|
+
pcb_group_id: z105.string().optional(),
|
|
2341
|
+
subcircuit_id: z105.string().optional(),
|
|
2342
|
+
pcb_component_id: z105.string().optional(),
|
|
2343
|
+
hole_shape: z105.literal("rect"),
|
|
2344
|
+
hole_width: z105.number(),
|
|
2345
|
+
hole_height: z105.number(),
|
|
2179
2346
|
x: distance,
|
|
2180
2347
|
y: distance,
|
|
2181
|
-
is_covered_with_solder_mask:
|
|
2182
|
-
soldermask_margin:
|
|
2348
|
+
is_covered_with_solder_mask: z105.boolean().optional(),
|
|
2349
|
+
soldermask_margin: z105.number().optional()
|
|
2183
2350
|
});
|
|
2184
2351
|
var pcb_hole_rect_shape = pcb_hole_rect.describe(
|
|
2185
2352
|
"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."
|
|
2186
2353
|
);
|
|
2187
2354
|
expectTypesMatch(true);
|
|
2188
|
-
var pcb_hole_circle_or_square =
|
|
2189
|
-
type:
|
|
2355
|
+
var pcb_hole_circle_or_square = z105.object({
|
|
2356
|
+
type: z105.literal("pcb_hole"),
|
|
2190
2357
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
2191
|
-
pcb_group_id:
|
|
2192
|
-
subcircuit_id:
|
|
2193
|
-
pcb_component_id:
|
|
2194
|
-
hole_shape:
|
|
2195
|
-
hole_diameter:
|
|
2358
|
+
pcb_group_id: z105.string().optional(),
|
|
2359
|
+
subcircuit_id: z105.string().optional(),
|
|
2360
|
+
pcb_component_id: z105.string().optional(),
|
|
2361
|
+
hole_shape: z105.enum(["circle", "square"]),
|
|
2362
|
+
hole_diameter: z105.number(),
|
|
2196
2363
|
x: distance,
|
|
2197
2364
|
y: distance,
|
|
2198
|
-
is_covered_with_solder_mask:
|
|
2199
|
-
soldermask_margin:
|
|
2365
|
+
is_covered_with_solder_mask: z105.boolean().optional(),
|
|
2366
|
+
soldermask_margin: z105.number().optional()
|
|
2200
2367
|
});
|
|
2201
2368
|
var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
2202
2369
|
"Defines a circular or square hole on the PCB"
|
|
2203
2370
|
);
|
|
2204
2371
|
expectTypesMatch(true);
|
|
2205
|
-
var pcb_hole_oval =
|
|
2206
|
-
type:
|
|
2372
|
+
var pcb_hole_oval = z105.object({
|
|
2373
|
+
type: z105.literal("pcb_hole"),
|
|
2207
2374
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
2208
|
-
pcb_group_id:
|
|
2209
|
-
subcircuit_id:
|
|
2210
|
-
pcb_component_id:
|
|
2211
|
-
hole_shape:
|
|
2212
|
-
hole_width:
|
|
2213
|
-
hole_height:
|
|
2375
|
+
pcb_group_id: z105.string().optional(),
|
|
2376
|
+
subcircuit_id: z105.string().optional(),
|
|
2377
|
+
pcb_component_id: z105.string().optional(),
|
|
2378
|
+
hole_shape: z105.literal("oval"),
|
|
2379
|
+
hole_width: z105.number(),
|
|
2380
|
+
hole_height: z105.number(),
|
|
2214
2381
|
x: distance,
|
|
2215
2382
|
y: distance,
|
|
2216
|
-
is_covered_with_solder_mask:
|
|
2217
|
-
soldermask_margin:
|
|
2383
|
+
is_covered_with_solder_mask: z105.boolean().optional(),
|
|
2384
|
+
soldermask_margin: z105.number().optional()
|
|
2218
2385
|
});
|
|
2219
2386
|
var pcb_hole_oval_shape = pcb_hole_oval.describe(
|
|
2220
2387
|
"Defines an oval hole on the PCB"
|
|
2221
2388
|
);
|
|
2222
2389
|
expectTypesMatch(true);
|
|
2223
|
-
var pcb_hole_pill =
|
|
2224
|
-
type:
|
|
2390
|
+
var pcb_hole_pill = z105.object({
|
|
2391
|
+
type: z105.literal("pcb_hole"),
|
|
2225
2392
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
2226
|
-
pcb_group_id:
|
|
2227
|
-
subcircuit_id:
|
|
2228
|
-
pcb_component_id:
|
|
2229
|
-
hole_shape:
|
|
2230
|
-
hole_width:
|
|
2231
|
-
hole_height:
|
|
2393
|
+
pcb_group_id: z105.string().optional(),
|
|
2394
|
+
subcircuit_id: z105.string().optional(),
|
|
2395
|
+
pcb_component_id: z105.string().optional(),
|
|
2396
|
+
hole_shape: z105.literal("pill"),
|
|
2397
|
+
hole_width: z105.number(),
|
|
2398
|
+
hole_height: z105.number(),
|
|
2232
2399
|
x: distance,
|
|
2233
2400
|
y: distance,
|
|
2234
|
-
is_covered_with_solder_mask:
|
|
2235
|
-
soldermask_margin:
|
|
2401
|
+
is_covered_with_solder_mask: z105.boolean().optional(),
|
|
2402
|
+
soldermask_margin: z105.number().optional()
|
|
2236
2403
|
});
|
|
2237
2404
|
var pcb_hole_pill_shape = pcb_hole_pill.describe(
|
|
2238
2405
|
"Defines a pill-shaped hole on the PCB"
|
|
2239
2406
|
);
|
|
2240
2407
|
expectTypesMatch(true);
|
|
2241
|
-
var pcb_hole_rotated_pill =
|
|
2242
|
-
type:
|
|
2408
|
+
var pcb_hole_rotated_pill = z105.object({
|
|
2409
|
+
type: z105.literal("pcb_hole"),
|
|
2243
2410
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
2244
|
-
pcb_group_id:
|
|
2245
|
-
subcircuit_id:
|
|
2246
|
-
pcb_component_id:
|
|
2247
|
-
hole_shape:
|
|
2248
|
-
hole_width:
|
|
2249
|
-
hole_height:
|
|
2411
|
+
pcb_group_id: z105.string().optional(),
|
|
2412
|
+
subcircuit_id: z105.string().optional(),
|
|
2413
|
+
pcb_component_id: z105.string().optional(),
|
|
2414
|
+
hole_shape: z105.literal("rotated_pill"),
|
|
2415
|
+
hole_width: z105.number(),
|
|
2416
|
+
hole_height: z105.number(),
|
|
2250
2417
|
x: distance,
|
|
2251
2418
|
y: distance,
|
|
2252
2419
|
ccw_rotation: rotation,
|
|
2253
|
-
is_covered_with_solder_mask:
|
|
2254
|
-
soldermask_margin:
|
|
2420
|
+
is_covered_with_solder_mask: z105.boolean().optional(),
|
|
2421
|
+
soldermask_margin: z105.number().optional()
|
|
2255
2422
|
});
|
|
2256
2423
|
var pcb_hole_rotated_pill_shape = pcb_hole_rotated_pill.describe(
|
|
2257
2424
|
"Defines a rotated pill-shaped hole on the PCB"
|
|
2258
2425
|
);
|
|
2259
2426
|
expectTypesMatch(true);
|
|
2260
2427
|
var pcb_hole = pcb_hole_circle_or_square.or(pcb_hole_oval).or(pcb_hole_pill).or(pcb_hole_rotated_pill).or(pcb_hole_circle).or(pcb_hole_rect);
|
|
2261
|
-
var pcb_plated_hole_circle =
|
|
2262
|
-
type:
|
|
2263
|
-
shape:
|
|
2264
|
-
pcb_group_id:
|
|
2265
|
-
subcircuit_id:
|
|
2266
|
-
outer_diameter:
|
|
2267
|
-
hole_diameter:
|
|
2268
|
-
is_covered_with_solder_mask:
|
|
2428
|
+
var pcb_plated_hole_circle = z106.object({
|
|
2429
|
+
type: z106.literal("pcb_plated_hole"),
|
|
2430
|
+
shape: z106.literal("circle"),
|
|
2431
|
+
pcb_group_id: z106.string().optional(),
|
|
2432
|
+
subcircuit_id: z106.string().optional(),
|
|
2433
|
+
outer_diameter: z106.number(),
|
|
2434
|
+
hole_diameter: z106.number(),
|
|
2435
|
+
is_covered_with_solder_mask: z106.boolean().optional(),
|
|
2269
2436
|
x: distance,
|
|
2270
2437
|
y: distance,
|
|
2271
|
-
layers:
|
|
2272
|
-
port_hints:
|
|
2273
|
-
pcb_component_id:
|
|
2274
|
-
pcb_port_id:
|
|
2438
|
+
layers: z106.array(layer_ref),
|
|
2439
|
+
port_hints: z106.array(z106.string()).optional(),
|
|
2440
|
+
pcb_component_id: z106.string().optional(),
|
|
2441
|
+
pcb_port_id: z106.string().optional(),
|
|
2275
2442
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2276
|
-
soldermask_margin:
|
|
2277
|
-
});
|
|
2278
|
-
var pcb_plated_hole_oval =
|
|
2279
|
-
type:
|
|
2280
|
-
shape:
|
|
2281
|
-
pcb_group_id:
|
|
2282
|
-
subcircuit_id:
|
|
2283
|
-
outer_width:
|
|
2284
|
-
outer_height:
|
|
2285
|
-
hole_width:
|
|
2286
|
-
hole_height:
|
|
2287
|
-
is_covered_with_solder_mask:
|
|
2443
|
+
soldermask_margin: z106.number().optional()
|
|
2444
|
+
});
|
|
2445
|
+
var pcb_plated_hole_oval = z106.object({
|
|
2446
|
+
type: z106.literal("pcb_plated_hole"),
|
|
2447
|
+
shape: z106.enum(["oval", "pill"]),
|
|
2448
|
+
pcb_group_id: z106.string().optional(),
|
|
2449
|
+
subcircuit_id: z106.string().optional(),
|
|
2450
|
+
outer_width: z106.number(),
|
|
2451
|
+
outer_height: z106.number(),
|
|
2452
|
+
hole_width: z106.number(),
|
|
2453
|
+
hole_height: z106.number(),
|
|
2454
|
+
is_covered_with_solder_mask: z106.boolean().optional(),
|
|
2288
2455
|
x: distance,
|
|
2289
2456
|
y: distance,
|
|
2290
2457
|
ccw_rotation: rotation,
|
|
2291
|
-
layers:
|
|
2292
|
-
port_hints:
|
|
2293
|
-
pcb_component_id:
|
|
2294
|
-
pcb_port_id:
|
|
2458
|
+
layers: z106.array(layer_ref),
|
|
2459
|
+
port_hints: z106.array(z106.string()).optional(),
|
|
2460
|
+
pcb_component_id: z106.string().optional(),
|
|
2461
|
+
pcb_port_id: z106.string().optional(),
|
|
2295
2462
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2296
|
-
soldermask_margin:
|
|
2297
|
-
});
|
|
2298
|
-
var pcb_circular_hole_with_rect_pad =
|
|
2299
|
-
type:
|
|
2300
|
-
shape:
|
|
2301
|
-
pcb_group_id:
|
|
2302
|
-
subcircuit_id:
|
|
2303
|
-
hole_shape:
|
|
2304
|
-
pad_shape:
|
|
2305
|
-
hole_diameter:
|
|
2306
|
-
rect_pad_width:
|
|
2307
|
-
rect_pad_height:
|
|
2308
|
-
rect_border_radius:
|
|
2463
|
+
soldermask_margin: z106.number().optional()
|
|
2464
|
+
});
|
|
2465
|
+
var pcb_circular_hole_with_rect_pad = z106.object({
|
|
2466
|
+
type: z106.literal("pcb_plated_hole"),
|
|
2467
|
+
shape: z106.literal("circular_hole_with_rect_pad"),
|
|
2468
|
+
pcb_group_id: z106.string().optional(),
|
|
2469
|
+
subcircuit_id: z106.string().optional(),
|
|
2470
|
+
hole_shape: z106.literal("circle"),
|
|
2471
|
+
pad_shape: z106.literal("rect"),
|
|
2472
|
+
hole_diameter: z106.number(),
|
|
2473
|
+
rect_pad_width: z106.number(),
|
|
2474
|
+
rect_pad_height: z106.number(),
|
|
2475
|
+
rect_border_radius: z106.number().optional(),
|
|
2309
2476
|
hole_offset_x: distance.default(0),
|
|
2310
2477
|
hole_offset_y: distance.default(0),
|
|
2311
|
-
is_covered_with_solder_mask:
|
|
2478
|
+
is_covered_with_solder_mask: z106.boolean().optional(),
|
|
2312
2479
|
x: distance,
|
|
2313
2480
|
y: distance,
|
|
2314
|
-
layers:
|
|
2315
|
-
port_hints:
|
|
2316
|
-
pcb_component_id:
|
|
2317
|
-
pcb_port_id:
|
|
2481
|
+
layers: z106.array(layer_ref),
|
|
2482
|
+
port_hints: z106.array(z106.string()).optional(),
|
|
2483
|
+
pcb_component_id: z106.string().optional(),
|
|
2484
|
+
pcb_port_id: z106.string().optional(),
|
|
2318
2485
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2319
|
-
soldermask_margin:
|
|
2486
|
+
soldermask_margin: z106.number().optional(),
|
|
2320
2487
|
rect_ccw_rotation: rotation.optional()
|
|
2321
2488
|
});
|
|
2322
|
-
var pcb_pill_hole_with_rect_pad =
|
|
2323
|
-
type:
|
|
2324
|
-
shape:
|
|
2325
|
-
pcb_group_id:
|
|
2326
|
-
subcircuit_id:
|
|
2327
|
-
hole_shape:
|
|
2328
|
-
pad_shape:
|
|
2329
|
-
hole_width:
|
|
2330
|
-
hole_height:
|
|
2331
|
-
rect_pad_width:
|
|
2332
|
-
rect_pad_height:
|
|
2333
|
-
rect_border_radius:
|
|
2489
|
+
var pcb_pill_hole_with_rect_pad = z106.object({
|
|
2490
|
+
type: z106.literal("pcb_plated_hole"),
|
|
2491
|
+
shape: z106.literal("pill_hole_with_rect_pad"),
|
|
2492
|
+
pcb_group_id: z106.string().optional(),
|
|
2493
|
+
subcircuit_id: z106.string().optional(),
|
|
2494
|
+
hole_shape: z106.literal("pill"),
|
|
2495
|
+
pad_shape: z106.literal("rect"),
|
|
2496
|
+
hole_width: z106.number(),
|
|
2497
|
+
hole_height: z106.number(),
|
|
2498
|
+
rect_pad_width: z106.number(),
|
|
2499
|
+
rect_pad_height: z106.number(),
|
|
2500
|
+
rect_border_radius: z106.number().optional(),
|
|
2334
2501
|
hole_offset_x: distance.default(0),
|
|
2335
2502
|
hole_offset_y: distance.default(0),
|
|
2336
|
-
is_covered_with_solder_mask:
|
|
2503
|
+
is_covered_with_solder_mask: z106.boolean().optional(),
|
|
2337
2504
|
x: distance,
|
|
2338
2505
|
y: distance,
|
|
2339
|
-
layers:
|
|
2340
|
-
port_hints:
|
|
2341
|
-
pcb_component_id:
|
|
2342
|
-
pcb_port_id:
|
|
2506
|
+
layers: z106.array(layer_ref),
|
|
2507
|
+
port_hints: z106.array(z106.string()).optional(),
|
|
2508
|
+
pcb_component_id: z106.string().optional(),
|
|
2509
|
+
pcb_port_id: z106.string().optional(),
|
|
2343
2510
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2344
|
-
soldermask_margin:
|
|
2345
|
-
});
|
|
2346
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
2347
|
-
type:
|
|
2348
|
-
shape:
|
|
2349
|
-
pcb_group_id:
|
|
2350
|
-
subcircuit_id:
|
|
2351
|
-
hole_shape:
|
|
2352
|
-
pad_shape:
|
|
2353
|
-
hole_width:
|
|
2354
|
-
hole_height:
|
|
2511
|
+
soldermask_margin: z106.number().optional()
|
|
2512
|
+
});
|
|
2513
|
+
var pcb_rotated_pill_hole_with_rect_pad = z106.object({
|
|
2514
|
+
type: z106.literal("pcb_plated_hole"),
|
|
2515
|
+
shape: z106.literal("rotated_pill_hole_with_rect_pad"),
|
|
2516
|
+
pcb_group_id: z106.string().optional(),
|
|
2517
|
+
subcircuit_id: z106.string().optional(),
|
|
2518
|
+
hole_shape: z106.literal("rotated_pill"),
|
|
2519
|
+
pad_shape: z106.literal("rect"),
|
|
2520
|
+
hole_width: z106.number(),
|
|
2521
|
+
hole_height: z106.number(),
|
|
2355
2522
|
hole_ccw_rotation: rotation,
|
|
2356
|
-
rect_pad_width:
|
|
2357
|
-
rect_pad_height:
|
|
2358
|
-
rect_border_radius:
|
|
2523
|
+
rect_pad_width: z106.number(),
|
|
2524
|
+
rect_pad_height: z106.number(),
|
|
2525
|
+
rect_border_radius: z106.number().optional(),
|
|
2359
2526
|
rect_ccw_rotation: rotation,
|
|
2360
2527
|
hole_offset_x: distance.default(0),
|
|
2361
2528
|
hole_offset_y: distance.default(0),
|
|
2362
|
-
is_covered_with_solder_mask:
|
|
2529
|
+
is_covered_with_solder_mask: z106.boolean().optional(),
|
|
2363
2530
|
x: distance,
|
|
2364
2531
|
y: distance,
|
|
2365
|
-
layers:
|
|
2366
|
-
port_hints:
|
|
2367
|
-
pcb_component_id:
|
|
2368
|
-
pcb_port_id:
|
|
2532
|
+
layers: z106.array(layer_ref),
|
|
2533
|
+
port_hints: z106.array(z106.string()).optional(),
|
|
2534
|
+
pcb_component_id: z106.string().optional(),
|
|
2535
|
+
pcb_port_id: z106.string().optional(),
|
|
2369
2536
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2370
|
-
soldermask_margin:
|
|
2371
|
-
});
|
|
2372
|
-
var pcb_hole_with_polygon_pad =
|
|
2373
|
-
type:
|
|
2374
|
-
shape:
|
|
2375
|
-
pcb_group_id:
|
|
2376
|
-
subcircuit_id:
|
|
2377
|
-
hole_shape:
|
|
2378
|
-
hole_diameter:
|
|
2379
|
-
hole_width:
|
|
2380
|
-
hole_height:
|
|
2381
|
-
pad_outline:
|
|
2382
|
-
|
|
2537
|
+
soldermask_margin: z106.number().optional()
|
|
2538
|
+
});
|
|
2539
|
+
var pcb_hole_with_polygon_pad = z106.object({
|
|
2540
|
+
type: z106.literal("pcb_plated_hole"),
|
|
2541
|
+
shape: z106.literal("hole_with_polygon_pad"),
|
|
2542
|
+
pcb_group_id: z106.string().optional(),
|
|
2543
|
+
subcircuit_id: z106.string().optional(),
|
|
2544
|
+
hole_shape: z106.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
2545
|
+
hole_diameter: z106.number().optional(),
|
|
2546
|
+
hole_width: z106.number().optional(),
|
|
2547
|
+
hole_height: z106.number().optional(),
|
|
2548
|
+
pad_outline: z106.array(
|
|
2549
|
+
z106.object({
|
|
2383
2550
|
x: distance,
|
|
2384
2551
|
y: distance
|
|
2385
2552
|
})
|
|
2386
2553
|
).min(3),
|
|
2387
2554
|
hole_offset_x: distance.default(0),
|
|
2388
2555
|
hole_offset_y: distance.default(0),
|
|
2389
|
-
is_covered_with_solder_mask:
|
|
2556
|
+
is_covered_with_solder_mask: z106.boolean().optional(),
|
|
2390
2557
|
x: distance,
|
|
2391
2558
|
y: distance,
|
|
2392
|
-
layers:
|
|
2393
|
-
port_hints:
|
|
2394
|
-
pcb_component_id:
|
|
2395
|
-
pcb_port_id:
|
|
2559
|
+
layers: z106.array(layer_ref),
|
|
2560
|
+
port_hints: z106.array(z106.string()).optional(),
|
|
2561
|
+
pcb_component_id: z106.string().optional(),
|
|
2562
|
+
pcb_port_id: z106.string().optional(),
|
|
2396
2563
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2397
|
-
soldermask_margin:
|
|
2564
|
+
soldermask_margin: z106.number().optional(),
|
|
2398
2565
|
ccw_rotation: rotation.optional()
|
|
2399
2566
|
});
|
|
2400
|
-
var pcb_plated_hole =
|
|
2567
|
+
var pcb_plated_hole = z106.union([
|
|
2401
2568
|
pcb_plated_hole_circle,
|
|
2402
2569
|
pcb_plated_hole_oval,
|
|
2403
2570
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -2413,134 +2580,140 @@ expectTypesMatch(true);
|
|
|
2413
2580
|
expectTypesMatch(true);
|
|
2414
2581
|
expectTypesMatch(true);
|
|
2415
2582
|
expectTypesMatch(true);
|
|
2416
|
-
var pcb_port =
|
|
2417
|
-
type:
|
|
2583
|
+
var pcb_port = z107.object({
|
|
2584
|
+
type: z107.literal("pcb_port"),
|
|
2418
2585
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
2419
|
-
pcb_group_id:
|
|
2420
|
-
subcircuit_id:
|
|
2421
|
-
source_port_id:
|
|
2422
|
-
pcb_component_id:
|
|
2586
|
+
pcb_group_id: z107.string().optional(),
|
|
2587
|
+
subcircuit_id: z107.string().optional(),
|
|
2588
|
+
source_port_id: z107.string(),
|
|
2589
|
+
pcb_component_id: z107.string().optional(),
|
|
2423
2590
|
x: distance,
|
|
2424
2591
|
y: distance,
|
|
2425
|
-
layers:
|
|
2426
|
-
is_board_pinout:
|
|
2592
|
+
layers: z107.array(layer_ref),
|
|
2593
|
+
is_board_pinout: z107.boolean().optional()
|
|
2427
2594
|
}).describe("Defines a port on the PCB");
|
|
2428
2595
|
expectTypesMatch(true);
|
|
2429
|
-
var pcb_smtpad_circle =
|
|
2430
|
-
type:
|
|
2431
|
-
shape:
|
|
2596
|
+
var pcb_smtpad_circle = z108.object({
|
|
2597
|
+
type: z108.literal("pcb_smtpad"),
|
|
2598
|
+
shape: z108.literal("circle"),
|
|
2432
2599
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2433
|
-
pcb_group_id:
|
|
2434
|
-
subcircuit_id:
|
|
2600
|
+
pcb_group_id: z108.string().optional(),
|
|
2601
|
+
subcircuit_id: z108.string().optional(),
|
|
2435
2602
|
x: distance,
|
|
2436
2603
|
y: distance,
|
|
2437
|
-
radius:
|
|
2604
|
+
radius: z108.number(),
|
|
2438
2605
|
layer: layer_ref,
|
|
2439
|
-
port_hints:
|
|
2440
|
-
pcb_component_id:
|
|
2441
|
-
pcb_port_id:
|
|
2442
|
-
is_covered_with_solder_mask:
|
|
2443
|
-
soldermask_margin:
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2606
|
+
port_hints: z108.array(z108.string()).optional(),
|
|
2607
|
+
pcb_component_id: z108.string().optional(),
|
|
2608
|
+
pcb_port_id: z108.string().optional(),
|
|
2609
|
+
is_covered_with_solder_mask: z108.boolean().optional(),
|
|
2610
|
+
soldermask_margin: z108.number().optional(),
|
|
2611
|
+
solderpaste_margin: z108.number().optional()
|
|
2612
|
+
});
|
|
2613
|
+
var pcb_smtpad_rect = z108.object({
|
|
2614
|
+
type: z108.literal("pcb_smtpad"),
|
|
2615
|
+
shape: z108.literal("rect"),
|
|
2448
2616
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2449
|
-
pcb_group_id:
|
|
2450
|
-
subcircuit_id:
|
|
2617
|
+
pcb_group_id: z108.string().optional(),
|
|
2618
|
+
subcircuit_id: z108.string().optional(),
|
|
2451
2619
|
x: distance,
|
|
2452
2620
|
y: distance,
|
|
2453
|
-
width:
|
|
2454
|
-
height:
|
|
2455
|
-
rect_border_radius:
|
|
2456
|
-
corner_radius:
|
|
2621
|
+
width: z108.number(),
|
|
2622
|
+
height: z108.number(),
|
|
2623
|
+
rect_border_radius: z108.number().optional(),
|
|
2624
|
+
corner_radius: z108.number().optional(),
|
|
2457
2625
|
layer: layer_ref,
|
|
2458
|
-
port_hints:
|
|
2459
|
-
pcb_component_id:
|
|
2460
|
-
pcb_port_id:
|
|
2461
|
-
is_covered_with_solder_mask:
|
|
2462
|
-
soldermask_margin:
|
|
2463
|
-
soldermask_margin_left:
|
|
2464
|
-
soldermask_margin_top:
|
|
2465
|
-
soldermask_margin_right:
|
|
2466
|
-
soldermask_margin_bottom:
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2626
|
+
port_hints: z108.array(z108.string()).optional(),
|
|
2627
|
+
pcb_component_id: z108.string().optional(),
|
|
2628
|
+
pcb_port_id: z108.string().optional(),
|
|
2629
|
+
is_covered_with_solder_mask: z108.boolean().optional(),
|
|
2630
|
+
soldermask_margin: z108.number().optional(),
|
|
2631
|
+
soldermask_margin_left: z108.number().optional(),
|
|
2632
|
+
soldermask_margin_top: z108.number().optional(),
|
|
2633
|
+
soldermask_margin_right: z108.number().optional(),
|
|
2634
|
+
soldermask_margin_bottom: z108.number().optional(),
|
|
2635
|
+
solderpaste_margin: z108.number().optional()
|
|
2636
|
+
});
|
|
2637
|
+
var pcb_smtpad_rotated_rect = z108.object({
|
|
2638
|
+
type: z108.literal("pcb_smtpad"),
|
|
2639
|
+
shape: z108.literal("rotated_rect"),
|
|
2471
2640
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2472
|
-
pcb_group_id:
|
|
2473
|
-
subcircuit_id:
|
|
2641
|
+
pcb_group_id: z108.string().optional(),
|
|
2642
|
+
subcircuit_id: z108.string().optional(),
|
|
2474
2643
|
x: distance,
|
|
2475
2644
|
y: distance,
|
|
2476
|
-
width:
|
|
2477
|
-
height:
|
|
2478
|
-
rect_border_radius:
|
|
2479
|
-
corner_radius:
|
|
2645
|
+
width: z108.number(),
|
|
2646
|
+
height: z108.number(),
|
|
2647
|
+
rect_border_radius: z108.number().optional(),
|
|
2648
|
+
corner_radius: z108.number().optional(),
|
|
2480
2649
|
ccw_rotation: rotation,
|
|
2481
2650
|
layer: layer_ref,
|
|
2482
|
-
port_hints:
|
|
2483
|
-
pcb_component_id:
|
|
2484
|
-
pcb_port_id:
|
|
2485
|
-
is_covered_with_solder_mask:
|
|
2486
|
-
soldermask_margin:
|
|
2487
|
-
soldermask_margin_left:
|
|
2488
|
-
soldermask_margin_top:
|
|
2489
|
-
soldermask_margin_right:
|
|
2490
|
-
soldermask_margin_bottom:
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2651
|
+
port_hints: z108.array(z108.string()).optional(),
|
|
2652
|
+
pcb_component_id: z108.string().optional(),
|
|
2653
|
+
pcb_port_id: z108.string().optional(),
|
|
2654
|
+
is_covered_with_solder_mask: z108.boolean().optional(),
|
|
2655
|
+
soldermask_margin: z108.number().optional(),
|
|
2656
|
+
soldermask_margin_left: z108.number().optional(),
|
|
2657
|
+
soldermask_margin_top: z108.number().optional(),
|
|
2658
|
+
soldermask_margin_right: z108.number().optional(),
|
|
2659
|
+
soldermask_margin_bottom: z108.number().optional(),
|
|
2660
|
+
solderpaste_margin: z108.number().optional()
|
|
2661
|
+
});
|
|
2662
|
+
var pcb_smtpad_pill = z108.object({
|
|
2663
|
+
type: z108.literal("pcb_smtpad"),
|
|
2664
|
+
shape: z108.literal("pill"),
|
|
2495
2665
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2496
|
-
pcb_group_id:
|
|
2497
|
-
subcircuit_id:
|
|
2666
|
+
pcb_group_id: z108.string().optional(),
|
|
2667
|
+
subcircuit_id: z108.string().optional(),
|
|
2498
2668
|
x: distance,
|
|
2499
2669
|
y: distance,
|
|
2500
|
-
width:
|
|
2501
|
-
height:
|
|
2502
|
-
radius:
|
|
2670
|
+
width: z108.number(),
|
|
2671
|
+
height: z108.number(),
|
|
2672
|
+
radius: z108.number(),
|
|
2503
2673
|
layer: layer_ref,
|
|
2504
|
-
port_hints:
|
|
2505
|
-
pcb_component_id:
|
|
2506
|
-
pcb_port_id:
|
|
2507
|
-
is_covered_with_solder_mask:
|
|
2508
|
-
soldermask_margin:
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2674
|
+
port_hints: z108.array(z108.string()).optional(),
|
|
2675
|
+
pcb_component_id: z108.string().optional(),
|
|
2676
|
+
pcb_port_id: z108.string().optional(),
|
|
2677
|
+
is_covered_with_solder_mask: z108.boolean().optional(),
|
|
2678
|
+
soldermask_margin: z108.number().optional(),
|
|
2679
|
+
solderpaste_margin: z108.number().optional()
|
|
2680
|
+
});
|
|
2681
|
+
var pcb_smtpad_rotated_pill = z108.object({
|
|
2682
|
+
type: z108.literal("pcb_smtpad"),
|
|
2683
|
+
shape: z108.literal("rotated_pill"),
|
|
2513
2684
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2514
|
-
pcb_group_id:
|
|
2515
|
-
subcircuit_id:
|
|
2685
|
+
pcb_group_id: z108.string().optional(),
|
|
2686
|
+
subcircuit_id: z108.string().optional(),
|
|
2516
2687
|
x: distance,
|
|
2517
2688
|
y: distance,
|
|
2518
|
-
width:
|
|
2519
|
-
height:
|
|
2520
|
-
radius:
|
|
2689
|
+
width: z108.number(),
|
|
2690
|
+
height: z108.number(),
|
|
2691
|
+
radius: z108.number(),
|
|
2521
2692
|
ccw_rotation: rotation,
|
|
2522
2693
|
layer: layer_ref,
|
|
2523
|
-
port_hints:
|
|
2524
|
-
pcb_component_id:
|
|
2525
|
-
pcb_port_id:
|
|
2526
|
-
is_covered_with_solder_mask:
|
|
2527
|
-
soldermask_margin:
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2694
|
+
port_hints: z108.array(z108.string()).optional(),
|
|
2695
|
+
pcb_component_id: z108.string().optional(),
|
|
2696
|
+
pcb_port_id: z108.string().optional(),
|
|
2697
|
+
is_covered_with_solder_mask: z108.boolean().optional(),
|
|
2698
|
+
soldermask_margin: z108.number().optional(),
|
|
2699
|
+
solderpaste_margin: z108.number().optional()
|
|
2700
|
+
});
|
|
2701
|
+
var pcb_smtpad_polygon = z108.object({
|
|
2702
|
+
type: z108.literal("pcb_smtpad"),
|
|
2703
|
+
shape: z108.literal("polygon"),
|
|
2532
2704
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2533
|
-
pcb_group_id:
|
|
2534
|
-
subcircuit_id:
|
|
2535
|
-
points:
|
|
2705
|
+
pcb_group_id: z108.string().optional(),
|
|
2706
|
+
subcircuit_id: z108.string().optional(),
|
|
2707
|
+
points: z108.array(point),
|
|
2536
2708
|
layer: layer_ref,
|
|
2537
|
-
port_hints:
|
|
2538
|
-
pcb_component_id:
|
|
2539
|
-
pcb_port_id:
|
|
2540
|
-
is_covered_with_solder_mask:
|
|
2541
|
-
soldermask_margin:
|
|
2542
|
-
|
|
2543
|
-
|
|
2709
|
+
port_hints: z108.array(z108.string()).optional(),
|
|
2710
|
+
pcb_component_id: z108.string().optional(),
|
|
2711
|
+
pcb_port_id: z108.string().optional(),
|
|
2712
|
+
is_covered_with_solder_mask: z108.boolean().optional(),
|
|
2713
|
+
soldermask_margin: z108.number().optional(),
|
|
2714
|
+
solderpaste_margin: z108.number().optional()
|
|
2715
|
+
});
|
|
2716
|
+
var pcb_smtpad = z108.discriminatedUnion("shape", [
|
|
2544
2717
|
pcb_smtpad_circle,
|
|
2545
2718
|
pcb_smtpad_rect,
|
|
2546
2719
|
pcb_smtpad_rotated_rect,
|
|
@@ -2554,82 +2727,99 @@ expectTypesMatch(true);
|
|
|
2554
2727
|
expectTypesMatch(true);
|
|
2555
2728
|
expectTypesMatch(true);
|
|
2556
2729
|
expectTypesMatch(true);
|
|
2557
|
-
var pcb_solder_paste_circle =
|
|
2558
|
-
type:
|
|
2559
|
-
shape:
|
|
2730
|
+
var pcb_solder_paste_circle = z109.object({
|
|
2731
|
+
type: z109.literal("pcb_solder_paste"),
|
|
2732
|
+
shape: z109.literal("circle"),
|
|
2560
2733
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2561
|
-
pcb_group_id:
|
|
2562
|
-
subcircuit_id:
|
|
2734
|
+
pcb_group_id: z109.string().optional(),
|
|
2735
|
+
subcircuit_id: z109.string().optional(),
|
|
2563
2736
|
x: distance,
|
|
2564
2737
|
y: distance,
|
|
2565
|
-
radius:
|
|
2738
|
+
radius: z109.number(),
|
|
2566
2739
|
layer: layer_ref,
|
|
2567
|
-
pcb_component_id:
|
|
2568
|
-
pcb_smtpad_id:
|
|
2740
|
+
pcb_component_id: z109.string().optional(),
|
|
2741
|
+
pcb_smtpad_id: z109.string().optional()
|
|
2569
2742
|
});
|
|
2570
|
-
var pcb_solder_paste_rect =
|
|
2571
|
-
type:
|
|
2572
|
-
shape:
|
|
2743
|
+
var pcb_solder_paste_rect = z109.object({
|
|
2744
|
+
type: z109.literal("pcb_solder_paste"),
|
|
2745
|
+
shape: z109.literal("rect"),
|
|
2573
2746
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2574
|
-
pcb_group_id:
|
|
2575
|
-
subcircuit_id:
|
|
2747
|
+
pcb_group_id: z109.string().optional(),
|
|
2748
|
+
subcircuit_id: z109.string().optional(),
|
|
2576
2749
|
x: distance,
|
|
2577
2750
|
y: distance,
|
|
2578
|
-
width:
|
|
2579
|
-
height:
|
|
2751
|
+
width: z109.number(),
|
|
2752
|
+
height: z109.number(),
|
|
2580
2753
|
layer: layer_ref,
|
|
2581
|
-
pcb_component_id:
|
|
2582
|
-
pcb_smtpad_id:
|
|
2754
|
+
pcb_component_id: z109.string().optional(),
|
|
2755
|
+
pcb_smtpad_id: z109.string().optional()
|
|
2583
2756
|
});
|
|
2584
|
-
var pcb_solder_paste_pill =
|
|
2585
|
-
type:
|
|
2586
|
-
shape:
|
|
2757
|
+
var pcb_solder_paste_pill = z109.object({
|
|
2758
|
+
type: z109.literal("pcb_solder_paste"),
|
|
2759
|
+
shape: z109.literal("pill"),
|
|
2587
2760
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2588
|
-
pcb_group_id:
|
|
2589
|
-
subcircuit_id:
|
|
2761
|
+
pcb_group_id: z109.string().optional(),
|
|
2762
|
+
subcircuit_id: z109.string().optional(),
|
|
2590
2763
|
x: distance,
|
|
2591
2764
|
y: distance,
|
|
2592
|
-
width:
|
|
2593
|
-
height:
|
|
2594
|
-
radius:
|
|
2765
|
+
width: z109.number(),
|
|
2766
|
+
height: z109.number(),
|
|
2767
|
+
radius: z109.number(),
|
|
2595
2768
|
layer: layer_ref,
|
|
2596
|
-
pcb_component_id:
|
|
2597
|
-
pcb_smtpad_id:
|
|
2769
|
+
pcb_component_id: z109.string().optional(),
|
|
2770
|
+
pcb_smtpad_id: z109.string().optional()
|
|
2598
2771
|
});
|
|
2599
|
-
var pcb_solder_paste_rotated_rect =
|
|
2600
|
-
type:
|
|
2601
|
-
shape:
|
|
2772
|
+
var pcb_solder_paste_rotated_rect = z109.object({
|
|
2773
|
+
type: z109.literal("pcb_solder_paste"),
|
|
2774
|
+
shape: z109.literal("rotated_rect"),
|
|
2602
2775
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2603
|
-
pcb_group_id:
|
|
2604
|
-
subcircuit_id:
|
|
2776
|
+
pcb_group_id: z109.string().optional(),
|
|
2777
|
+
subcircuit_id: z109.string().optional(),
|
|
2605
2778
|
x: distance,
|
|
2606
2779
|
y: distance,
|
|
2607
|
-
width:
|
|
2608
|
-
height:
|
|
2780
|
+
width: z109.number(),
|
|
2781
|
+
height: z109.number(),
|
|
2609
2782
|
ccw_rotation: distance,
|
|
2610
2783
|
layer: layer_ref,
|
|
2611
|
-
pcb_component_id:
|
|
2612
|
-
pcb_smtpad_id:
|
|
2784
|
+
pcb_component_id: z109.string().optional(),
|
|
2785
|
+
pcb_smtpad_id: z109.string().optional()
|
|
2613
2786
|
});
|
|
2614
|
-
var
|
|
2615
|
-
type:
|
|
2616
|
-
shape:
|
|
2787
|
+
var pcb_solder_paste_rotated_pill = z109.object({
|
|
2788
|
+
type: z109.literal("pcb_solder_paste"),
|
|
2789
|
+
shape: z109.literal("rotated_pill"),
|
|
2617
2790
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2618
|
-
pcb_group_id:
|
|
2619
|
-
subcircuit_id:
|
|
2791
|
+
pcb_group_id: z109.string().optional(),
|
|
2792
|
+
subcircuit_id: z109.string().optional(),
|
|
2620
2793
|
x: distance,
|
|
2621
2794
|
y: distance,
|
|
2622
|
-
width:
|
|
2623
|
-
height:
|
|
2795
|
+
width: z109.number(),
|
|
2796
|
+
height: z109.number(),
|
|
2797
|
+
radius: z109.number(),
|
|
2798
|
+
ccw_rotation: rotation,
|
|
2624
2799
|
layer: layer_ref,
|
|
2625
|
-
pcb_component_id:
|
|
2626
|
-
pcb_smtpad_id:
|
|
2800
|
+
pcb_component_id: z109.string().optional(),
|
|
2801
|
+
pcb_smtpad_id: z109.string().optional()
|
|
2627
2802
|
});
|
|
2628
|
-
var
|
|
2803
|
+
var pcb_solder_paste_oval = z109.object({
|
|
2804
|
+
type: z109.literal("pcb_solder_paste"),
|
|
2805
|
+
shape: z109.literal("oval"),
|
|
2806
|
+
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2807
|
+
pcb_group_id: z109.string().optional(),
|
|
2808
|
+
subcircuit_id: z109.string().optional(),
|
|
2809
|
+
x: distance,
|
|
2810
|
+
y: distance,
|
|
2811
|
+
width: z109.number(),
|
|
2812
|
+
height: z109.number(),
|
|
2813
|
+
layer: layer_ref,
|
|
2814
|
+
pcb_component_id: z109.string().optional(),
|
|
2815
|
+
pcb_smtpad_id: z109.string().optional()
|
|
2816
|
+
});
|
|
2817
|
+
var pcb_solder_paste = z109.union([
|
|
2629
2818
|
pcb_solder_paste_circle,
|
|
2630
2819
|
pcb_solder_paste_rect,
|
|
2631
2820
|
pcb_solder_paste_pill,
|
|
2632
2821
|
pcb_solder_paste_rotated_rect,
|
|
2822
|
+
pcb_solder_paste_rotated_pill,
|
|
2633
2823
|
pcb_solder_paste_oval
|
|
2634
2824
|
]).describe("Defines solderpaste on the PCB");
|
|
2635
2825
|
expectTypesMatch(true);
|
|
@@ -2638,166 +2828,186 @@ expectTypesMatch(true);
|
|
|
2638
2828
|
expectTypesMatch(
|
|
2639
2829
|
true
|
|
2640
2830
|
);
|
|
2831
|
+
expectTypesMatch(
|
|
2832
|
+
true
|
|
2833
|
+
);
|
|
2641
2834
|
expectTypesMatch(true);
|
|
2642
|
-
var pcb_text =
|
|
2643
|
-
type:
|
|
2835
|
+
var pcb_text = z110.object({
|
|
2836
|
+
type: z110.literal("pcb_text"),
|
|
2644
2837
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
2645
|
-
pcb_group_id:
|
|
2646
|
-
subcircuit_id:
|
|
2647
|
-
text:
|
|
2838
|
+
pcb_group_id: z110.string().optional(),
|
|
2839
|
+
subcircuit_id: z110.string().optional(),
|
|
2840
|
+
text: z110.string(),
|
|
2648
2841
|
center: point,
|
|
2649
2842
|
layer: layer_ref,
|
|
2650
2843
|
width: length,
|
|
2651
2844
|
height: length,
|
|
2652
|
-
lines:
|
|
2845
|
+
lines: z110.number(),
|
|
2653
2846
|
// @ts-ignore
|
|
2654
|
-
align:
|
|
2847
|
+
align: z110.enum(["bottom-left"])
|
|
2655
2848
|
}).describe("Defines text on the PCB");
|
|
2656
2849
|
expectTypesMatch(true);
|
|
2657
|
-
var pcb_trace_route_point_wire =
|
|
2658
|
-
route_type:
|
|
2850
|
+
var pcb_trace_route_point_wire = z111.object({
|
|
2851
|
+
route_type: z111.literal("wire"),
|
|
2659
2852
|
x: distance,
|
|
2660
2853
|
y: distance,
|
|
2661
2854
|
width: distance,
|
|
2662
|
-
copper_pour_id:
|
|
2663
|
-
is_inside_copper_pour:
|
|
2664
|
-
start_pcb_port_id:
|
|
2665
|
-
end_pcb_port_id:
|
|
2855
|
+
copper_pour_id: z111.string().optional(),
|
|
2856
|
+
is_inside_copper_pour: z111.boolean().optional(),
|
|
2857
|
+
start_pcb_port_id: z111.string().optional(),
|
|
2858
|
+
end_pcb_port_id: z111.string().optional(),
|
|
2666
2859
|
layer: layer_ref
|
|
2667
2860
|
});
|
|
2668
|
-
var pcb_trace_route_point_via =
|
|
2669
|
-
route_type:
|
|
2861
|
+
var pcb_trace_route_point_via = z111.object({
|
|
2862
|
+
route_type: z111.literal("via"),
|
|
2670
2863
|
x: distance,
|
|
2671
2864
|
y: distance,
|
|
2672
|
-
copper_pour_id:
|
|
2673
|
-
is_inside_copper_pour:
|
|
2865
|
+
copper_pour_id: z111.string().optional(),
|
|
2866
|
+
is_inside_copper_pour: z111.boolean().optional(),
|
|
2674
2867
|
hole_diameter: distance.optional(),
|
|
2675
2868
|
outer_diameter: distance.optional(),
|
|
2676
2869
|
from_layer: layer_ref,
|
|
2677
2870
|
to_layer: layer_ref
|
|
2678
2871
|
});
|
|
2679
|
-
var pcb_trace_route_point_through_pad =
|
|
2680
|
-
route_type:
|
|
2872
|
+
var pcb_trace_route_point_through_pad = z111.object({
|
|
2873
|
+
route_type: z111.literal("through_pad"),
|
|
2681
2874
|
start: point,
|
|
2682
2875
|
end: point,
|
|
2683
2876
|
width: distance,
|
|
2684
2877
|
start_layer: layer_ref,
|
|
2685
2878
|
end_layer: layer_ref,
|
|
2686
|
-
pcb_smtpad_id:
|
|
2687
|
-
pcb_plated_hole_id:
|
|
2879
|
+
pcb_smtpad_id: z111.string().optional(),
|
|
2880
|
+
pcb_plated_hole_id: z111.string().optional()
|
|
2688
2881
|
});
|
|
2689
|
-
var pcb_trace_route_point =
|
|
2882
|
+
var pcb_trace_route_point = z111.union([
|
|
2690
2883
|
pcb_trace_route_point_wire,
|
|
2691
2884
|
pcb_trace_route_point_via,
|
|
2692
2885
|
pcb_trace_route_point_through_pad
|
|
2693
2886
|
]);
|
|
2694
|
-
var pcb_trace =
|
|
2695
|
-
type:
|
|
2696
|
-
source_trace_id:
|
|
2697
|
-
pcb_component_id:
|
|
2887
|
+
var pcb_trace = z111.object({
|
|
2888
|
+
type: z111.literal("pcb_trace"),
|
|
2889
|
+
source_trace_id: z111.string().optional(),
|
|
2890
|
+
pcb_component_id: z111.string().optional(),
|
|
2698
2891
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
2699
|
-
pcb_group_id:
|
|
2700
|
-
subcircuit_id:
|
|
2701
|
-
route_thickness_mode:
|
|
2702
|
-
route_order_index:
|
|
2703
|
-
should_round_corners:
|
|
2704
|
-
trace_length:
|
|
2705
|
-
highlight_color:
|
|
2706
|
-
route:
|
|
2892
|
+
pcb_group_id: z111.string().optional(),
|
|
2893
|
+
subcircuit_id: z111.string().optional(),
|
|
2894
|
+
route_thickness_mode: z111.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
2895
|
+
route_order_index: z111.number().optional(),
|
|
2896
|
+
should_round_corners: z111.boolean().optional(),
|
|
2897
|
+
trace_length: z111.number().optional(),
|
|
2898
|
+
highlight_color: z111.string().optional(),
|
|
2899
|
+
route: z111.array(pcb_trace_route_point)
|
|
2707
2900
|
}).describe("Defines a trace on the PCB");
|
|
2708
2901
|
expectTypesMatch(true);
|
|
2709
2902
|
expectTypesMatch(true);
|
|
2710
|
-
var pcb_trace_warning =
|
|
2711
|
-
type:
|
|
2903
|
+
var pcb_trace_warning = z112.object({
|
|
2904
|
+
type: z112.literal("pcb_trace_warning"),
|
|
2712
2905
|
pcb_trace_warning_id: getZodPrefixedIdWithDefault("pcb_trace_warning"),
|
|
2713
|
-
warning_type:
|
|
2714
|
-
message:
|
|
2906
|
+
warning_type: z112.literal("pcb_trace_warning").default("pcb_trace_warning"),
|
|
2907
|
+
message: z112.string(),
|
|
2715
2908
|
center: point.optional(),
|
|
2716
|
-
pcb_trace_id:
|
|
2717
|
-
source_trace_id:
|
|
2718
|
-
pcb_component_ids:
|
|
2719
|
-
pcb_port_ids:
|
|
2720
|
-
subcircuit_id:
|
|
2909
|
+
pcb_trace_id: z112.string(),
|
|
2910
|
+
source_trace_id: z112.string(),
|
|
2911
|
+
pcb_component_ids: z112.array(z112.string()),
|
|
2912
|
+
pcb_port_ids: z112.array(z112.string()),
|
|
2913
|
+
subcircuit_id: z112.string().optional()
|
|
2721
2914
|
}).describe("Defines a trace warning on the PCB");
|
|
2722
2915
|
expectTypesMatch(true);
|
|
2723
|
-
var pcb_trace_too_long_warning =
|
|
2724
|
-
type:
|
|
2916
|
+
var pcb_trace_too_long_warning = z113.object({
|
|
2917
|
+
type: z113.literal("pcb_trace_too_long_warning"),
|
|
2725
2918
|
pcb_trace_too_long_warning_id: getZodPrefixedIdWithDefault(
|
|
2726
2919
|
"pcb_trace_too_long_warning"
|
|
2727
2920
|
),
|
|
2728
|
-
warning_type:
|
|
2729
|
-
message:
|
|
2730
|
-
pcb_trace_id:
|
|
2731
|
-
source_net_id:
|
|
2732
|
-
source_trace_id:
|
|
2921
|
+
warning_type: z113.literal("pcb_trace_too_long_warning").default("pcb_trace_too_long_warning"),
|
|
2922
|
+
message: z113.string(),
|
|
2923
|
+
pcb_trace_id: z113.string(),
|
|
2924
|
+
source_net_id: z113.string().optional(),
|
|
2925
|
+
source_trace_id: z113.string().optional(),
|
|
2733
2926
|
actual_trace_length: distance,
|
|
2734
2927
|
maximum_trace_length: distance,
|
|
2735
|
-
subcircuit_id:
|
|
2928
|
+
subcircuit_id: z113.string().optional()
|
|
2736
2929
|
}).describe(
|
|
2737
2930
|
"Warning emitted when a PCB trace is longer than its maximum allowed length"
|
|
2738
2931
|
);
|
|
2739
2932
|
expectTypesMatch(true);
|
|
2933
|
+
var pcb_trace_too_many_vias_warning = z114.object({
|
|
2934
|
+
type: z114.literal("pcb_trace_too_many_vias_warning"),
|
|
2935
|
+
pcb_trace_too_many_vias_warning_id: getZodPrefixedIdWithDefault(
|
|
2936
|
+
"pcb_trace_too_many_vias_warning"
|
|
2937
|
+
),
|
|
2938
|
+
warning_type: z114.literal("pcb_trace_too_many_vias_warning").default("pcb_trace_too_many_vias_warning"),
|
|
2939
|
+
message: z114.string(),
|
|
2940
|
+
pcb_trace_id: z114.string(),
|
|
2941
|
+
source_net_id: z114.string().optional(),
|
|
2942
|
+
source_trace_id: z114.string().optional(),
|
|
2943
|
+
actual_via_count: z114.number().int().nonnegative(),
|
|
2944
|
+
maximum_via_count: z114.number().int().nonnegative(),
|
|
2945
|
+
subcircuit_id: z114.string().optional()
|
|
2946
|
+
}).describe(
|
|
2947
|
+
"Warning emitted when a PCB trace has more vias than its maximum allowed count"
|
|
2948
|
+
);
|
|
2949
|
+
expectTypesMatch(true);
|
|
2740
2950
|
var pcb_trace_error = base_circuit_json_error.extend({
|
|
2741
|
-
type:
|
|
2951
|
+
type: z115.literal("pcb_trace_error"),
|
|
2742
2952
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
2743
|
-
error_type:
|
|
2953
|
+
error_type: z115.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
2744
2954
|
center: point.optional(),
|
|
2745
|
-
pcb_trace_id:
|
|
2746
|
-
source_trace_id:
|
|
2747
|
-
pcb_component_ids:
|
|
2748
|
-
pcb_port_ids:
|
|
2749
|
-
subcircuit_id:
|
|
2955
|
+
pcb_trace_id: z115.string(),
|
|
2956
|
+
source_trace_id: z115.string(),
|
|
2957
|
+
pcb_component_ids: z115.array(z115.string()),
|
|
2958
|
+
pcb_port_ids: z115.array(z115.string()),
|
|
2959
|
+
subcircuit_id: z115.string().optional()
|
|
2750
2960
|
}).describe("Defines a trace error on the PCB");
|
|
2751
2961
|
expectTypesMatch(true);
|
|
2752
2962
|
var pcb_trace_missing_error = base_circuit_json_error.extend({
|
|
2753
|
-
type:
|
|
2963
|
+
type: z116.literal("pcb_trace_missing_error"),
|
|
2754
2964
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
2755
2965
|
"pcb_trace_missing_error"
|
|
2756
2966
|
),
|
|
2757
|
-
error_type:
|
|
2967
|
+
error_type: z116.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
2758
2968
|
center: point.optional(),
|
|
2759
|
-
source_trace_id:
|
|
2760
|
-
pcb_component_ids:
|
|
2761
|
-
pcb_port_ids:
|
|
2762
|
-
subcircuit_id:
|
|
2969
|
+
source_trace_id: z116.string(),
|
|
2970
|
+
pcb_component_ids: z116.array(z116.string()),
|
|
2971
|
+
pcb_port_ids: z116.array(z116.string()),
|
|
2972
|
+
subcircuit_id: z116.string().optional()
|
|
2763
2973
|
}).describe(
|
|
2764
2974
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
2765
2975
|
);
|
|
2766
2976
|
expectTypesMatch(true);
|
|
2767
2977
|
var pcb_port_not_matched_error = base_circuit_json_error.extend({
|
|
2768
|
-
type:
|
|
2978
|
+
type: z117.literal("pcb_port_not_matched_error"),
|
|
2769
2979
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2770
|
-
error_type:
|
|
2771
|
-
pcb_component_ids:
|
|
2772
|
-
subcircuit_id:
|
|
2980
|
+
error_type: z117.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
2981
|
+
pcb_component_ids: z117.array(z117.string()),
|
|
2982
|
+
subcircuit_id: z117.string().optional()
|
|
2773
2983
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
2774
2984
|
expectTypesMatch(true);
|
|
2775
2985
|
var pcb_port_not_connected_error = base_circuit_json_error.extend({
|
|
2776
|
-
type:
|
|
2986
|
+
type: z118.literal("pcb_port_not_connected_error"),
|
|
2777
2987
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
2778
2988
|
"pcb_port_not_connected_error"
|
|
2779
2989
|
),
|
|
2780
|
-
error_type:
|
|
2781
|
-
pcb_port_ids:
|
|
2782
|
-
pcb_component_ids:
|
|
2783
|
-
subcircuit_id:
|
|
2990
|
+
error_type: z118.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
2991
|
+
pcb_port_ids: z118.array(z118.string()),
|
|
2992
|
+
pcb_component_ids: z118.array(z118.string()),
|
|
2993
|
+
subcircuit_id: z118.string().optional()
|
|
2784
2994
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
2785
2995
|
expectTypesMatch(
|
|
2786
2996
|
true
|
|
2787
2997
|
);
|
|
2788
|
-
var pcb_net =
|
|
2789
|
-
type:
|
|
2998
|
+
var pcb_net = z119.object({
|
|
2999
|
+
type: z119.literal("pcb_net"),
|
|
2790
3000
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
2791
|
-
source_net_id:
|
|
2792
|
-
highlight_color:
|
|
3001
|
+
source_net_id: z119.string().optional(),
|
|
3002
|
+
highlight_color: z119.string().optional()
|
|
2793
3003
|
}).describe("Defines a net on the PCB");
|
|
2794
3004
|
expectTypesMatch(true);
|
|
2795
|
-
var pcb_via =
|
|
2796
|
-
type:
|
|
3005
|
+
var pcb_via = z120.object({
|
|
3006
|
+
type: z120.literal("pcb_via"),
|
|
2797
3007
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
2798
|
-
pcb_group_id:
|
|
2799
|
-
subcircuit_id:
|
|
2800
|
-
subcircuit_connectivity_map_key:
|
|
3008
|
+
pcb_group_id: z120.string().optional(),
|
|
3009
|
+
subcircuit_id: z120.string().optional(),
|
|
3010
|
+
subcircuit_connectivity_map_key: z120.string().optional(),
|
|
2801
3011
|
x: distance,
|
|
2802
3012
|
y: distance,
|
|
2803
3013
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -2806,93 +3016,99 @@ var pcb_via = z115.object({
|
|
|
2806
3016
|
from_layer: layer_ref.optional(),
|
|
2807
3017
|
/** @deprecated */
|
|
2808
3018
|
to_layer: layer_ref.optional(),
|
|
2809
|
-
layers:
|
|
2810
|
-
pcb_trace_id:
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
3019
|
+
layers: z120.array(layer_ref),
|
|
3020
|
+
pcb_trace_id: z120.string().optional(),
|
|
3021
|
+
source_trace_id: z120.string().optional(),
|
|
3022
|
+
source_net_id: z120.string().min(1).optional(),
|
|
3023
|
+
net_is_assignable: z120.boolean().optional(),
|
|
3024
|
+
net_assigned: z120.boolean().optional(),
|
|
3025
|
+
is_tented: z120.boolean().optional()
|
|
2814
3026
|
}).describe("Defines a via on the PCB");
|
|
2815
3027
|
expectTypesMatch(true);
|
|
2816
|
-
var pcb_board =
|
|
2817
|
-
type:
|
|
3028
|
+
var pcb_board = z121.object({
|
|
3029
|
+
type: z121.literal("pcb_board"),
|
|
2818
3030
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
2819
|
-
pcb_panel_id:
|
|
2820
|
-
carrier_pcb_board_id:
|
|
2821
|
-
is_subcircuit:
|
|
2822
|
-
subcircuit_id:
|
|
2823
|
-
is_mounted_to_carrier_board:
|
|
3031
|
+
pcb_panel_id: z121.string().optional(),
|
|
3032
|
+
carrier_pcb_board_id: z121.string().optional(),
|
|
3033
|
+
is_subcircuit: z121.boolean().optional(),
|
|
3034
|
+
subcircuit_id: z121.string().optional(),
|
|
3035
|
+
is_mounted_to_carrier_board: z121.boolean().optional(),
|
|
3036
|
+
is_via_in_pad_allowed: z121.boolean().optional(),
|
|
2824
3037
|
width: length.optional(),
|
|
2825
3038
|
height: length.optional(),
|
|
2826
3039
|
center: point,
|
|
2827
|
-
display_offset_x:
|
|
3040
|
+
display_offset_x: z121.string().optional().describe(
|
|
2828
3041
|
"How to display the x offset for this board, usually corresponding with how the user specified it"
|
|
2829
3042
|
),
|
|
2830
|
-
display_offset_y:
|
|
3043
|
+
display_offset_y: z121.string().optional().describe(
|
|
2831
3044
|
"How to display the y offset for this board, usually corresponding with how the user specified it"
|
|
2832
3045
|
),
|
|
2833
3046
|
thickness: length.optional().default(1.4),
|
|
2834
|
-
num_layers:
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
3047
|
+
num_layers: z121.number().optional().default(4),
|
|
3048
|
+
allow_blind_and_buried_vias: z121.boolean().optional().describe(
|
|
3049
|
+
"Whether autorouters may generate blind and buried vias. False restricts newly generated vias to the full board stack."
|
|
3050
|
+
),
|
|
3051
|
+
outline: z121.array(point).optional(),
|
|
3052
|
+
shape: z121.enum(["rect", "polygon"]).optional(),
|
|
3053
|
+
material: z121.enum(["fr4", "fr1"]).default("fr4"),
|
|
3054
|
+
solder_mask_color: z121.string().optional(),
|
|
3055
|
+
silkscreen_color: z121.string().optional(),
|
|
2840
3056
|
anchor_position: point.optional(),
|
|
2841
3057
|
anchor_alignment: ninePointAnchor.optional(),
|
|
2842
|
-
position_mode:
|
|
3058
|
+
position_mode: z121.enum(["relative_to_panel_anchor", "none"]).optional()
|
|
2843
3059
|
}).merge(manufacturing_drc_properties).describe("Defines the board outline of the PCB");
|
|
2844
3060
|
expectTypesMatch(true);
|
|
2845
|
-
var pcb_panel =
|
|
2846
|
-
type:
|
|
3061
|
+
var pcb_panel = z122.object({
|
|
3062
|
+
type: z122.literal("pcb_panel"),
|
|
2847
3063
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
2848
3064
|
width: length,
|
|
2849
3065
|
height: length,
|
|
2850
3066
|
center: point,
|
|
2851
3067
|
thickness: length.optional().default(1.4),
|
|
2852
|
-
covered_with_solder_mask:
|
|
3068
|
+
covered_with_solder_mask: z122.boolean().optional().default(true)
|
|
2853
3069
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
2854
3070
|
expectTypesMatch(true);
|
|
2855
3071
|
var pcb_placement_error = base_circuit_json_error.extend({
|
|
2856
|
-
type:
|
|
3072
|
+
type: z123.literal("pcb_placement_error"),
|
|
2857
3073
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
2858
|
-
error_type:
|
|
2859
|
-
subcircuit_id:
|
|
3074
|
+
error_type: z123.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
3075
|
+
subcircuit_id: z123.string().optional()
|
|
2860
3076
|
}).describe("Defines a placement error on the PCB");
|
|
2861
3077
|
expectTypesMatch(true);
|
|
2862
3078
|
var pcb_packing_error = base_circuit_json_error.extend({
|
|
2863
|
-
type:
|
|
3079
|
+
type: z124.literal("pcb_packing_error"),
|
|
2864
3080
|
pcb_packing_error_id: getZodPrefixedIdWithDefault("pcb_packing_error"),
|
|
2865
|
-
error_type:
|
|
2866
|
-
pcb_group_id:
|
|
2867
|
-
subcircuit_id:
|
|
3081
|
+
error_type: z124.literal("pcb_packing_error").default("pcb_packing_error"),
|
|
3082
|
+
pcb_group_id: z124.string().optional(),
|
|
3083
|
+
subcircuit_id: z124.string().optional()
|
|
2868
3084
|
}).describe("Defines a failure to pack PCB components within layout bounds");
|
|
2869
3085
|
expectTypesMatch(true);
|
|
2870
3086
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
2871
|
-
type:
|
|
3087
|
+
type: z125.literal("pcb_panelization_placement_error"),
|
|
2872
3088
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
2873
3089
|
"pcb_panelization_placement_error"
|
|
2874
3090
|
),
|
|
2875
|
-
error_type:
|
|
2876
|
-
pcb_panel_id:
|
|
2877
|
-
pcb_board_id:
|
|
2878
|
-
subcircuit_id:
|
|
3091
|
+
error_type: z125.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
|
|
3092
|
+
pcb_panel_id: z125.string().optional(),
|
|
3093
|
+
pcb_board_id: z125.string().optional(),
|
|
3094
|
+
subcircuit_id: z125.string().optional()
|
|
2879
3095
|
}).describe("Defines a panelization placement error on the PCB");
|
|
2880
3096
|
expectTypesMatch(true);
|
|
2881
|
-
var pcb_trace_hint =
|
|
2882
|
-
type:
|
|
3097
|
+
var pcb_trace_hint = z126.object({
|
|
3098
|
+
type: z126.literal("pcb_trace_hint"),
|
|
2883
3099
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
2884
|
-
pcb_port_id:
|
|
2885
|
-
pcb_component_id:
|
|
2886
|
-
route:
|
|
2887
|
-
subcircuit_id:
|
|
3100
|
+
pcb_port_id: z126.string(),
|
|
3101
|
+
pcb_component_id: z126.string(),
|
|
3102
|
+
route: z126.array(route_hint_point),
|
|
3103
|
+
subcircuit_id: z126.string().optional()
|
|
2888
3104
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
2889
3105
|
expectTypesMatch(true);
|
|
2890
|
-
var pcb_silkscreen_line =
|
|
2891
|
-
type:
|
|
3106
|
+
var pcb_silkscreen_line = z127.object({
|
|
3107
|
+
type: z127.literal("pcb_silkscreen_line"),
|
|
2892
3108
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
2893
|
-
pcb_component_id:
|
|
2894
|
-
pcb_group_id:
|
|
2895
|
-
subcircuit_id:
|
|
3109
|
+
pcb_component_id: z127.string(),
|
|
3110
|
+
pcb_group_id: z127.string().optional(),
|
|
3111
|
+
subcircuit_id: z127.string().optional(),
|
|
2896
3112
|
stroke_width: distance.default("0.1mm"),
|
|
2897
3113
|
x1: distance,
|
|
2898
3114
|
y1: distance,
|
|
@@ -2901,28 +3117,28 @@ var pcb_silkscreen_line = z122.object({
|
|
|
2901
3117
|
layer: visible_layer
|
|
2902
3118
|
}).describe("Defines a silkscreen line on the PCB");
|
|
2903
3119
|
expectTypesMatch(true);
|
|
2904
|
-
var pcb_silkscreen_path =
|
|
2905
|
-
type:
|
|
3120
|
+
var pcb_silkscreen_path = z128.object({
|
|
3121
|
+
type: z128.literal("pcb_silkscreen_path"),
|
|
2906
3122
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
2907
|
-
pcb_component_id:
|
|
2908
|
-
pcb_group_id:
|
|
2909
|
-
subcircuit_id:
|
|
3123
|
+
pcb_component_id: z128.string(),
|
|
3124
|
+
pcb_group_id: z128.string().optional(),
|
|
3125
|
+
subcircuit_id: z128.string().optional(),
|
|
2910
3126
|
layer: visible_layer,
|
|
2911
|
-
route:
|
|
3127
|
+
route: z128.array(point),
|
|
2912
3128
|
stroke_width: length
|
|
2913
3129
|
}).describe("Defines a silkscreen path on the PCB");
|
|
2914
3130
|
expectTypesMatch(true);
|
|
2915
|
-
var pcb_silkscreen_text =
|
|
2916
|
-
type:
|
|
3131
|
+
var pcb_silkscreen_text = z129.object({
|
|
3132
|
+
type: z129.literal("pcb_silkscreen_text"),
|
|
2917
3133
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
2918
|
-
pcb_group_id:
|
|
2919
|
-
subcircuit_id:
|
|
2920
|
-
font:
|
|
3134
|
+
pcb_group_id: z129.string().optional(),
|
|
3135
|
+
subcircuit_id: z129.string().optional(),
|
|
3136
|
+
font: z129.literal("tscircuit2024").default("tscircuit2024"),
|
|
2921
3137
|
font_size: distance.default("0.2mm"),
|
|
2922
|
-
pcb_component_id:
|
|
2923
|
-
text:
|
|
2924
|
-
is_knockout:
|
|
2925
|
-
knockout_padding:
|
|
3138
|
+
pcb_component_id: z129.string(),
|
|
3139
|
+
text: z129.string(),
|
|
3140
|
+
is_knockout: z129.boolean().default(false).optional(),
|
|
3141
|
+
knockout_padding: z129.object({
|
|
2926
3142
|
left: length,
|
|
2927
3143
|
top: length,
|
|
2928
3144
|
bottom: length,
|
|
@@ -2933,24 +3149,24 @@ var pcb_silkscreen_text = z124.object({
|
|
|
2933
3149
|
bottom: "0.2mm",
|
|
2934
3150
|
right: "0.2mm"
|
|
2935
3151
|
}).optional(),
|
|
2936
|
-
ccw_rotation:
|
|
3152
|
+
ccw_rotation: z129.number().optional(),
|
|
2937
3153
|
layer: layer_ref,
|
|
2938
|
-
is_mirrored:
|
|
3154
|
+
is_mirrored: z129.boolean().default(false).optional(),
|
|
2939
3155
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2940
3156
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2941
3157
|
}).describe("Defines silkscreen text on the PCB");
|
|
2942
3158
|
expectTypesMatch(true);
|
|
2943
|
-
var pcb_copper_text =
|
|
2944
|
-
type:
|
|
3159
|
+
var pcb_copper_text = z130.object({
|
|
3160
|
+
type: z130.literal("pcb_copper_text"),
|
|
2945
3161
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2946
|
-
pcb_group_id:
|
|
2947
|
-
subcircuit_id:
|
|
2948
|
-
font:
|
|
3162
|
+
pcb_group_id: z130.string().optional(),
|
|
3163
|
+
subcircuit_id: z130.string().optional(),
|
|
3164
|
+
font: z130.literal("tscircuit2024").default("tscircuit2024"),
|
|
2949
3165
|
font_size: distance.default("0.2mm"),
|
|
2950
|
-
pcb_component_id:
|
|
2951
|
-
text:
|
|
2952
|
-
is_knockout:
|
|
2953
|
-
knockout_padding:
|
|
3166
|
+
pcb_component_id: z130.string(),
|
|
3167
|
+
text: z130.string(),
|
|
3168
|
+
is_knockout: z130.boolean().default(false).optional(),
|
|
3169
|
+
knockout_padding: z130.object({
|
|
2954
3170
|
left: length,
|
|
2955
3171
|
top: length,
|
|
2956
3172
|
bottom: length,
|
|
@@ -2961,52 +3177,52 @@ var pcb_copper_text = z125.object({
|
|
|
2961
3177
|
bottom: "0.2mm",
|
|
2962
3178
|
right: "0.2mm"
|
|
2963
3179
|
}).optional(),
|
|
2964
|
-
ccw_rotation:
|
|
3180
|
+
ccw_rotation: z130.number().optional(),
|
|
2965
3181
|
layer: layer_ref,
|
|
2966
|
-
is_mirrored:
|
|
3182
|
+
is_mirrored: z130.boolean().default(false).optional(),
|
|
2967
3183
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2968
3184
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2969
3185
|
}).describe("Defines copper text on the PCB");
|
|
2970
3186
|
expectTypesMatch(true);
|
|
2971
|
-
var pcb_silkscreen_rect =
|
|
2972
|
-
type:
|
|
3187
|
+
var pcb_silkscreen_rect = z131.object({
|
|
3188
|
+
type: z131.literal("pcb_silkscreen_rect"),
|
|
2973
3189
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2974
|
-
pcb_component_id:
|
|
2975
|
-
pcb_group_id:
|
|
2976
|
-
subcircuit_id:
|
|
3190
|
+
pcb_component_id: z131.string(),
|
|
3191
|
+
pcb_group_id: z131.string().optional(),
|
|
3192
|
+
subcircuit_id: z131.string().optional(),
|
|
2977
3193
|
center: point,
|
|
2978
3194
|
width: length,
|
|
2979
3195
|
height: length,
|
|
2980
3196
|
layer: layer_ref,
|
|
2981
3197
|
stroke_width: length.default("1mm"),
|
|
2982
3198
|
corner_radius: length.optional(),
|
|
2983
|
-
is_filled:
|
|
2984
|
-
has_stroke:
|
|
2985
|
-
is_stroke_dashed:
|
|
2986
|
-
ccw_rotation:
|
|
3199
|
+
is_filled: z131.boolean().default(true).optional(),
|
|
3200
|
+
has_stroke: z131.boolean().optional(),
|
|
3201
|
+
is_stroke_dashed: z131.boolean().optional(),
|
|
3202
|
+
ccw_rotation: z131.number().optional()
|
|
2987
3203
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2988
3204
|
expectTypesMatch(true);
|
|
2989
|
-
var pcb_silkscreen_circle =
|
|
2990
|
-
type:
|
|
3205
|
+
var pcb_silkscreen_circle = z132.object({
|
|
3206
|
+
type: z132.literal("pcb_silkscreen_circle"),
|
|
2991
3207
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2992
3208
|
"pcb_silkscreen_circle"
|
|
2993
3209
|
),
|
|
2994
|
-
pcb_component_id:
|
|
2995
|
-
pcb_group_id:
|
|
2996
|
-
subcircuit_id:
|
|
3210
|
+
pcb_component_id: z132.string(),
|
|
3211
|
+
pcb_group_id: z132.string().optional(),
|
|
3212
|
+
subcircuit_id: z132.string().optional(),
|
|
2997
3213
|
center: point,
|
|
2998
3214
|
radius: length,
|
|
2999
3215
|
layer: visible_layer,
|
|
3000
3216
|
stroke_width: length.default("1mm"),
|
|
3001
|
-
is_filled:
|
|
3217
|
+
is_filled: z132.boolean().optional()
|
|
3002
3218
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
3003
3219
|
expectTypesMatch(true);
|
|
3004
|
-
var pcb_silkscreen_oval =
|
|
3005
|
-
type:
|
|
3220
|
+
var pcb_silkscreen_oval = z133.object({
|
|
3221
|
+
type: z133.literal("pcb_silkscreen_oval"),
|
|
3006
3222
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
3007
|
-
pcb_component_id:
|
|
3008
|
-
pcb_group_id:
|
|
3009
|
-
subcircuit_id:
|
|
3223
|
+
pcb_component_id: z133.string(),
|
|
3224
|
+
pcb_group_id: z133.string().optional(),
|
|
3225
|
+
subcircuit_id: z133.string().optional(),
|
|
3010
3226
|
center: point,
|
|
3011
3227
|
radius_x: distance,
|
|
3012
3228
|
radius_y: distance,
|
|
@@ -3014,273 +3230,275 @@ var pcb_silkscreen_oval = z128.object({
|
|
|
3014
3230
|
ccw_rotation: rotation.optional()
|
|
3015
3231
|
}).describe("Defines a silkscreen oval on the PCB");
|
|
3016
3232
|
expectTypesMatch(true);
|
|
3017
|
-
var pcb_silkscreen_graphic_base =
|
|
3018
|
-
type:
|
|
3233
|
+
var pcb_silkscreen_graphic_base = z134.object({
|
|
3234
|
+
type: z134.literal("pcb_silkscreen_graphic"),
|
|
3019
3235
|
pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
|
|
3020
3236
|
"pcb_silkscreen_graphic"
|
|
3021
3237
|
),
|
|
3022
|
-
pcb_component_id:
|
|
3023
|
-
pcb_group_id:
|
|
3024
|
-
subcircuit_id:
|
|
3238
|
+
pcb_component_id: z134.string(),
|
|
3239
|
+
pcb_group_id: z134.string().optional(),
|
|
3240
|
+
subcircuit_id: z134.string().optional(),
|
|
3025
3241
|
layer: visible_layer,
|
|
3026
3242
|
image_asset: asset.optional()
|
|
3027
3243
|
});
|
|
3028
3244
|
var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
|
|
3029
|
-
shape:
|
|
3245
|
+
shape: z134.literal("brep"),
|
|
3030
3246
|
brep_shape
|
|
3031
3247
|
}).describe("Defines a BRep silkscreen graphic on the PCB");
|
|
3032
3248
|
expectTypesMatch(
|
|
3033
3249
|
true
|
|
3034
3250
|
);
|
|
3035
|
-
var pcb_silkscreen_graphic =
|
|
3251
|
+
var pcb_silkscreen_graphic = z134.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
|
|
3036
3252
|
expectTypesMatch(true);
|
|
3037
|
-
var pcb_silkscreen_pill =
|
|
3038
|
-
type:
|
|
3253
|
+
var pcb_silkscreen_pill = z135.object({
|
|
3254
|
+
type: z135.literal("pcb_silkscreen_pill"),
|
|
3039
3255
|
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
3040
|
-
pcb_component_id:
|
|
3041
|
-
pcb_group_id:
|
|
3042
|
-
subcircuit_id:
|
|
3256
|
+
pcb_component_id: z135.string(),
|
|
3257
|
+
pcb_group_id: z135.string().optional(),
|
|
3258
|
+
subcircuit_id: z135.string().optional(),
|
|
3043
3259
|
center: point,
|
|
3044
3260
|
width: length,
|
|
3045
3261
|
height: length,
|
|
3046
3262
|
layer: layer_ref,
|
|
3047
|
-
ccw_rotation:
|
|
3263
|
+
ccw_rotation: z135.number().optional()
|
|
3048
3264
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
3049
3265
|
expectTypesMatch(true);
|
|
3050
|
-
var pcb_fabrication_note_text =
|
|
3051
|
-
type:
|
|
3266
|
+
var pcb_fabrication_note_text = z136.object({
|
|
3267
|
+
type: z136.literal("pcb_fabrication_note_text"),
|
|
3052
3268
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
3053
3269
|
"pcb_fabrication_note_text"
|
|
3054
3270
|
),
|
|
3055
|
-
subcircuit_id:
|
|
3056
|
-
pcb_group_id:
|
|
3057
|
-
font:
|
|
3271
|
+
subcircuit_id: z136.string().optional(),
|
|
3272
|
+
pcb_group_id: z136.string().optional(),
|
|
3273
|
+
font: z136.literal("tscircuit2024").default("tscircuit2024"),
|
|
3058
3274
|
font_size: distance.default("1mm"),
|
|
3059
|
-
pcb_component_id:
|
|
3060
|
-
text:
|
|
3061
|
-
ccw_rotation:
|
|
3275
|
+
pcb_component_id: z136.string(),
|
|
3276
|
+
text: z136.string(),
|
|
3277
|
+
ccw_rotation: z136.number().optional(),
|
|
3062
3278
|
layer: visible_layer,
|
|
3063
3279
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3064
|
-
anchor_alignment:
|
|
3065
|
-
color:
|
|
3280
|
+
anchor_alignment: z136.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3281
|
+
color: z136.string().optional()
|
|
3066
3282
|
}).describe(
|
|
3067
3283
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
3068
3284
|
);
|
|
3069
3285
|
expectTypesMatch(true);
|
|
3070
|
-
var pcb_fabrication_note_path =
|
|
3071
|
-
type:
|
|
3286
|
+
var pcb_fabrication_note_path = z137.object({
|
|
3287
|
+
type: z137.literal("pcb_fabrication_note_path"),
|
|
3072
3288
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
3073
3289
|
"pcb_fabrication_note_path"
|
|
3074
3290
|
),
|
|
3075
|
-
pcb_component_id:
|
|
3076
|
-
subcircuit_id:
|
|
3291
|
+
pcb_component_id: z137.string(),
|
|
3292
|
+
subcircuit_id: z137.string().optional(),
|
|
3077
3293
|
layer: layer_ref,
|
|
3078
|
-
route:
|
|
3294
|
+
route: z137.array(point),
|
|
3079
3295
|
stroke_width: length,
|
|
3080
|
-
color:
|
|
3296
|
+
color: z137.string().optional()
|
|
3081
3297
|
}).describe(
|
|
3082
3298
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
3083
3299
|
);
|
|
3084
3300
|
expectTypesMatch(true);
|
|
3085
|
-
var pcb_fabrication_note_rect =
|
|
3086
|
-
type:
|
|
3301
|
+
var pcb_fabrication_note_rect = z138.object({
|
|
3302
|
+
type: z138.literal("pcb_fabrication_note_rect"),
|
|
3087
3303
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
3088
3304
|
"pcb_fabrication_note_rect"
|
|
3089
3305
|
),
|
|
3090
|
-
pcb_component_id:
|
|
3091
|
-
pcb_group_id:
|
|
3092
|
-
subcircuit_id:
|
|
3306
|
+
pcb_component_id: z138.string(),
|
|
3307
|
+
pcb_group_id: z138.string().optional(),
|
|
3308
|
+
subcircuit_id: z138.string().optional(),
|
|
3093
3309
|
center: point,
|
|
3094
3310
|
width: length,
|
|
3095
3311
|
height: length,
|
|
3096
3312
|
layer: visible_layer,
|
|
3097
3313
|
stroke_width: length.default("0.1mm"),
|
|
3098
3314
|
corner_radius: length.optional(),
|
|
3099
|
-
is_filled:
|
|
3100
|
-
has_stroke:
|
|
3101
|
-
is_stroke_dashed:
|
|
3102
|
-
color:
|
|
3315
|
+
is_filled: z138.boolean().optional(),
|
|
3316
|
+
has_stroke: z138.boolean().optional(),
|
|
3317
|
+
is_stroke_dashed: z138.boolean().optional(),
|
|
3318
|
+
color: z138.string().optional()
|
|
3103
3319
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
3104
3320
|
expectTypesMatch(true);
|
|
3105
|
-
var pcb_fabrication_note_dimension =
|
|
3106
|
-
type:
|
|
3321
|
+
var pcb_fabrication_note_dimension = z139.object({
|
|
3322
|
+
type: z139.literal("pcb_fabrication_note_dimension"),
|
|
3107
3323
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
3108
3324
|
"pcb_fabrication_note_dimension"
|
|
3109
3325
|
),
|
|
3110
|
-
pcb_component_id:
|
|
3111
|
-
pcb_group_id:
|
|
3112
|
-
subcircuit_id:
|
|
3326
|
+
pcb_component_id: z139.string(),
|
|
3327
|
+
pcb_group_id: z139.string().optional(),
|
|
3328
|
+
subcircuit_id: z139.string().optional(),
|
|
3113
3329
|
layer: visible_layer,
|
|
3114
3330
|
from: point,
|
|
3115
3331
|
to: point,
|
|
3116
|
-
text:
|
|
3117
|
-
text_ccw_rotation:
|
|
3332
|
+
text: z139.string().optional(),
|
|
3333
|
+
text_ccw_rotation: z139.number().optional(),
|
|
3118
3334
|
offset: length.optional(),
|
|
3119
3335
|
offset_distance: length.optional(),
|
|
3120
|
-
offset_direction:
|
|
3121
|
-
x:
|
|
3122
|
-
y:
|
|
3336
|
+
offset_direction: z139.object({
|
|
3337
|
+
x: z139.number(),
|
|
3338
|
+
y: z139.number()
|
|
3123
3339
|
}).optional(),
|
|
3124
|
-
font:
|
|
3340
|
+
font: z139.literal("tscircuit2024").default("tscircuit2024"),
|
|
3125
3341
|
font_size: length.default("1mm"),
|
|
3126
|
-
color:
|
|
3342
|
+
color: z139.string().optional(),
|
|
3127
3343
|
arrow_size: length.default("1mm")
|
|
3128
3344
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
3129
3345
|
expectTypesMatch(true);
|
|
3130
|
-
var pcb_note_text =
|
|
3131
|
-
type:
|
|
3346
|
+
var pcb_note_text = z140.object({
|
|
3347
|
+
type: z140.literal("pcb_note_text"),
|
|
3132
3348
|
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
3133
|
-
pcb_component_id:
|
|
3134
|
-
pcb_group_id:
|
|
3135
|
-
subcircuit_id:
|
|
3136
|
-
name:
|
|
3137
|
-
font:
|
|
3349
|
+
pcb_component_id: z140.string().optional(),
|
|
3350
|
+
pcb_group_id: z140.string().optional(),
|
|
3351
|
+
subcircuit_id: z140.string().optional(),
|
|
3352
|
+
name: z140.string().optional(),
|
|
3353
|
+
font: z140.literal("tscircuit2024").default("tscircuit2024"),
|
|
3138
3354
|
font_size: distance.default("1mm"),
|
|
3139
|
-
text:
|
|
3355
|
+
text: z140.string().optional(),
|
|
3140
3356
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3141
|
-
anchor_alignment:
|
|
3357
|
+
anchor_alignment: z140.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3142
3358
|
layer: visible_layer.default("top"),
|
|
3143
|
-
is_mirrored_from_top_view:
|
|
3144
|
-
color:
|
|
3359
|
+
is_mirrored_from_top_view: z140.boolean().optional(),
|
|
3360
|
+
color: z140.string().optional()
|
|
3145
3361
|
}).describe("Defines a documentation note in text on the PCB");
|
|
3146
3362
|
expectTypesMatch(true);
|
|
3147
|
-
var pcb_note_rect =
|
|
3148
|
-
type:
|
|
3363
|
+
var pcb_note_rect = z141.object({
|
|
3364
|
+
type: z141.literal("pcb_note_rect"),
|
|
3149
3365
|
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
3150
|
-
pcb_component_id:
|
|
3151
|
-
pcb_group_id:
|
|
3152
|
-
subcircuit_id:
|
|
3153
|
-
name:
|
|
3154
|
-
text:
|
|
3366
|
+
pcb_component_id: z141.string().optional(),
|
|
3367
|
+
pcb_group_id: z141.string().optional(),
|
|
3368
|
+
subcircuit_id: z141.string().optional(),
|
|
3369
|
+
name: z141.string().optional(),
|
|
3370
|
+
text: z141.string().optional(),
|
|
3155
3371
|
center: point,
|
|
3156
3372
|
width: length,
|
|
3157
3373
|
height: length,
|
|
3158
3374
|
layer: visible_layer.default("top"),
|
|
3159
3375
|
stroke_width: length.default("0.1mm"),
|
|
3160
3376
|
corner_radius: length.optional(),
|
|
3161
|
-
is_filled:
|
|
3162
|
-
has_stroke:
|
|
3163
|
-
is_stroke_dashed:
|
|
3164
|
-
color:
|
|
3377
|
+
is_filled: z141.boolean().optional(),
|
|
3378
|
+
has_stroke: z141.boolean().optional(),
|
|
3379
|
+
is_stroke_dashed: z141.boolean().optional(),
|
|
3380
|
+
color: z141.string().optional()
|
|
3165
3381
|
}).describe("Defines a rectangular documentation note on the PCB");
|
|
3166
3382
|
expectTypesMatch(true);
|
|
3167
|
-
var pcb_note_path =
|
|
3168
|
-
type:
|
|
3383
|
+
var pcb_note_path = z142.object({
|
|
3384
|
+
type: z142.literal("pcb_note_path"),
|
|
3169
3385
|
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
3170
|
-
pcb_component_id:
|
|
3171
|
-
pcb_group_id:
|
|
3172
|
-
subcircuit_id:
|
|
3173
|
-
name:
|
|
3174
|
-
text:
|
|
3175
|
-
route:
|
|
3386
|
+
pcb_component_id: z142.string().optional(),
|
|
3387
|
+
pcb_group_id: z142.string().optional(),
|
|
3388
|
+
subcircuit_id: z142.string().optional(),
|
|
3389
|
+
name: z142.string().optional(),
|
|
3390
|
+
text: z142.string().optional(),
|
|
3391
|
+
route: z142.array(point),
|
|
3176
3392
|
layer: visible_layer.default("top"),
|
|
3177
3393
|
stroke_width: length.default("0.1mm"),
|
|
3178
|
-
color:
|
|
3394
|
+
color: z142.string().optional()
|
|
3179
3395
|
}).describe("Defines a polyline documentation note on the PCB");
|
|
3180
3396
|
expectTypesMatch(true);
|
|
3181
|
-
var pcb_note_line =
|
|
3182
|
-
type:
|
|
3397
|
+
var pcb_note_line = z143.object({
|
|
3398
|
+
type: z143.literal("pcb_note_line"),
|
|
3183
3399
|
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
3184
|
-
pcb_component_id:
|
|
3185
|
-
pcb_group_id:
|
|
3186
|
-
subcircuit_id:
|
|
3187
|
-
name:
|
|
3188
|
-
text:
|
|
3400
|
+
pcb_component_id: z143.string().optional(),
|
|
3401
|
+
pcb_group_id: z143.string().optional(),
|
|
3402
|
+
subcircuit_id: z143.string().optional(),
|
|
3403
|
+
name: z143.string().optional(),
|
|
3404
|
+
text: z143.string().optional(),
|
|
3189
3405
|
x1: distance,
|
|
3190
3406
|
y1: distance,
|
|
3191
3407
|
x2: distance,
|
|
3192
3408
|
y2: distance,
|
|
3193
3409
|
layer: visible_layer.default("top"),
|
|
3194
3410
|
stroke_width: distance.default("0.1mm"),
|
|
3195
|
-
color:
|
|
3196
|
-
is_dashed:
|
|
3411
|
+
color: z143.string().optional(),
|
|
3412
|
+
is_dashed: z143.boolean().optional()
|
|
3197
3413
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
3198
3414
|
expectTypesMatch(true);
|
|
3199
|
-
var pcb_note_dimension =
|
|
3200
|
-
type:
|
|
3415
|
+
var pcb_note_dimension = z144.object({
|
|
3416
|
+
type: z144.literal("pcb_note_dimension"),
|
|
3201
3417
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
3202
|
-
pcb_component_id:
|
|
3203
|
-
pcb_group_id:
|
|
3204
|
-
subcircuit_id:
|
|
3205
|
-
name:
|
|
3418
|
+
pcb_component_id: z144.string().optional(),
|
|
3419
|
+
pcb_group_id: z144.string().optional(),
|
|
3420
|
+
subcircuit_id: z144.string().optional(),
|
|
3421
|
+
name: z144.string().optional(),
|
|
3206
3422
|
from: point,
|
|
3207
3423
|
to: point,
|
|
3208
|
-
text:
|
|
3209
|
-
text_ccw_rotation:
|
|
3424
|
+
text: z144.string().optional(),
|
|
3425
|
+
text_ccw_rotation: z144.number().optional(),
|
|
3210
3426
|
offset_distance: length.optional(),
|
|
3211
|
-
offset_direction:
|
|
3212
|
-
x:
|
|
3213
|
-
y:
|
|
3427
|
+
offset_direction: z144.object({
|
|
3428
|
+
x: z144.number(),
|
|
3429
|
+
y: z144.number()
|
|
3214
3430
|
}).optional(),
|
|
3215
|
-
font:
|
|
3431
|
+
font: z144.literal("tscircuit2024").default("tscircuit2024"),
|
|
3216
3432
|
font_size: length.default("1mm"),
|
|
3217
3433
|
layer: visible_layer.default("top"),
|
|
3218
|
-
color:
|
|
3434
|
+
color: z144.string().optional(),
|
|
3219
3435
|
arrow_size: length.default("1mm")
|
|
3220
3436
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
3221
3437
|
expectTypesMatch(true);
|
|
3222
3438
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
3223
|
-
type:
|
|
3439
|
+
type: z145.literal("pcb_footprint_overlap_error"),
|
|
3224
3440
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3225
|
-
error_type:
|
|
3226
|
-
pcb_smtpad_ids:
|
|
3227
|
-
pcb_plated_hole_ids:
|
|
3228
|
-
pcb_hole_ids:
|
|
3229
|
-
pcb_keepout_ids:
|
|
3441
|
+
error_type: z145.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
3442
|
+
pcb_smtpad_ids: z145.array(z145.string()).optional(),
|
|
3443
|
+
pcb_plated_hole_ids: z145.array(z145.string()).optional(),
|
|
3444
|
+
pcb_hole_ids: z145.array(z145.string()).optional(),
|
|
3445
|
+
pcb_keepout_ids: z145.array(z145.string()).optional()
|
|
3230
3446
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
3231
3447
|
expectTypesMatch(
|
|
3232
3448
|
true
|
|
3233
3449
|
);
|
|
3234
3450
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
3235
|
-
type:
|
|
3451
|
+
type: z146.literal("pcb_courtyard_overlap_error"),
|
|
3236
3452
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3237
|
-
error_type:
|
|
3238
|
-
pcb_component_ids:
|
|
3453
|
+
error_type: z146.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
|
|
3454
|
+
pcb_component_ids: z146.tuple([z146.string(), z146.string()])
|
|
3239
3455
|
}).describe(
|
|
3240
3456
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
3241
3457
|
);
|
|
3242
3458
|
expectTypesMatch(
|
|
3243
3459
|
true
|
|
3244
3460
|
);
|
|
3245
|
-
var pcb_keepout =
|
|
3246
|
-
type:
|
|
3247
|
-
shape:
|
|
3248
|
-
pcb_group_id:
|
|
3249
|
-
subcircuit_id:
|
|
3461
|
+
var pcb_keepout = z147.object({
|
|
3462
|
+
type: z147.literal("pcb_keepout"),
|
|
3463
|
+
shape: z147.literal("rect"),
|
|
3464
|
+
pcb_group_id: z147.string().optional(),
|
|
3465
|
+
subcircuit_id: z147.string().optional(),
|
|
3250
3466
|
center: point,
|
|
3251
3467
|
width: distance,
|
|
3252
3468
|
height: distance,
|
|
3253
|
-
pcb_keepout_id:
|
|
3254
|
-
layers:
|
|
3469
|
+
pcb_keepout_id: z147.string(),
|
|
3470
|
+
layers: z147.array(z147.string()),
|
|
3255
3471
|
// Specify layers where the keepout applies
|
|
3256
|
-
description:
|
|
3472
|
+
description: z147.string().optional(),
|
|
3257
3473
|
// Optional description of the keepout
|
|
3474
|
+
excluded_pcb_component_ids: z147.array(z147.string()).optional()
|
|
3258
3475
|
}).or(
|
|
3259
|
-
|
|
3260
|
-
type:
|
|
3261
|
-
shape:
|
|
3262
|
-
pcb_group_id:
|
|
3263
|
-
subcircuit_id:
|
|
3476
|
+
z147.object({
|
|
3477
|
+
type: z147.literal("pcb_keepout"),
|
|
3478
|
+
shape: z147.literal("circle"),
|
|
3479
|
+
pcb_group_id: z147.string().optional(),
|
|
3480
|
+
subcircuit_id: z147.string().optional(),
|
|
3264
3481
|
center: point,
|
|
3265
3482
|
radius: distance,
|
|
3266
|
-
pcb_keepout_id:
|
|
3267
|
-
layers:
|
|
3483
|
+
pcb_keepout_id: z147.string(),
|
|
3484
|
+
layers: z147.array(z147.string()),
|
|
3268
3485
|
// Specify layers where the keepout applies
|
|
3269
|
-
description:
|
|
3486
|
+
description: z147.string().optional(),
|
|
3270
3487
|
// Optional description of the keepout
|
|
3488
|
+
excluded_pcb_component_ids: z147.array(z147.string()).optional()
|
|
3271
3489
|
})
|
|
3272
3490
|
);
|
|
3273
3491
|
expectTypesMatch(true);
|
|
3274
|
-
var pcb_cutout_base =
|
|
3275
|
-
type:
|
|
3492
|
+
var pcb_cutout_base = z148.object({
|
|
3493
|
+
type: z148.literal("pcb_cutout"),
|
|
3276
3494
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
3277
|
-
pcb_group_id:
|
|
3278
|
-
subcircuit_id:
|
|
3279
|
-
pcb_board_id:
|
|
3280
|
-
pcb_panel_id:
|
|
3495
|
+
pcb_group_id: z148.string().optional(),
|
|
3496
|
+
subcircuit_id: z148.string().optional(),
|
|
3497
|
+
pcb_board_id: z148.string().optional(),
|
|
3498
|
+
pcb_panel_id: z148.string().optional()
|
|
3281
3499
|
});
|
|
3282
3500
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
3283
|
-
shape:
|
|
3501
|
+
shape: z148.literal("rect"),
|
|
3284
3502
|
center: point,
|
|
3285
3503
|
width: length,
|
|
3286
3504
|
height: length,
|
|
@@ -3289,26 +3507,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
3289
3507
|
});
|
|
3290
3508
|
expectTypesMatch(true);
|
|
3291
3509
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
3292
|
-
shape:
|
|
3510
|
+
shape: z148.literal("circle"),
|
|
3293
3511
|
center: point,
|
|
3294
3512
|
radius: length
|
|
3295
3513
|
});
|
|
3296
3514
|
expectTypesMatch(true);
|
|
3297
3515
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
3298
|
-
shape:
|
|
3299
|
-
points:
|
|
3516
|
+
shape: z148.literal("polygon"),
|
|
3517
|
+
points: z148.array(point)
|
|
3300
3518
|
});
|
|
3301
3519
|
expectTypesMatch(true);
|
|
3302
3520
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
3303
|
-
shape:
|
|
3304
|
-
route:
|
|
3521
|
+
shape: z148.literal("path"),
|
|
3522
|
+
route: z148.array(point),
|
|
3305
3523
|
slot_width: length,
|
|
3306
3524
|
slot_length: length.optional(),
|
|
3307
3525
|
space_between_slots: length.optional(),
|
|
3308
3526
|
slot_corner_radius: length.optional()
|
|
3309
3527
|
});
|
|
3310
3528
|
expectTypesMatch(true);
|
|
3311
|
-
var pcb_cutout =
|
|
3529
|
+
var pcb_cutout = z148.discriminatedUnion("shape", [
|
|
3312
3530
|
pcb_cutout_rect,
|
|
3313
3531
|
pcb_cutout_circle,
|
|
3314
3532
|
pcb_cutout_polygon,
|
|
@@ -3316,194 +3534,207 @@ var pcb_cutout = z143.discriminatedUnion("shape", [
|
|
|
3316
3534
|
]).describe("Defines a cutout on the PCB, removing board material.");
|
|
3317
3535
|
expectTypesMatch(true);
|
|
3318
3536
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
3319
|
-
type:
|
|
3537
|
+
type: z149.literal("pcb_missing_footprint_error"),
|
|
3320
3538
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
3321
3539
|
"pcb_missing_footprint_error"
|
|
3322
3540
|
),
|
|
3323
|
-
pcb_group_id:
|
|
3324
|
-
subcircuit_id:
|
|
3325
|
-
error_type:
|
|
3326
|
-
source_component_id:
|
|
3541
|
+
pcb_group_id: z149.string().optional(),
|
|
3542
|
+
subcircuit_id: z149.string().optional(),
|
|
3543
|
+
error_type: z149.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
3544
|
+
source_component_id: z149.string()
|
|
3327
3545
|
}).describe("Defines a missing footprint error on the PCB");
|
|
3328
3546
|
expectTypesMatch(
|
|
3329
3547
|
true
|
|
3330
3548
|
);
|
|
3331
3549
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
3332
|
-
type:
|
|
3550
|
+
type: z150.literal("external_footprint_load_error"),
|
|
3333
3551
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3334
3552
|
"external_footprint_load_error"
|
|
3335
3553
|
),
|
|
3336
|
-
pcb_component_id:
|
|
3337
|
-
source_component_id:
|
|
3338
|
-
pcb_group_id:
|
|
3339
|
-
subcircuit_id:
|
|
3340
|
-
footprinter_string:
|
|
3341
|
-
error_type:
|
|
3554
|
+
pcb_component_id: z150.string(),
|
|
3555
|
+
source_component_id: z150.string(),
|
|
3556
|
+
pcb_group_id: z150.string().optional(),
|
|
3557
|
+
subcircuit_id: z150.string().optional(),
|
|
3558
|
+
footprinter_string: z150.string().optional(),
|
|
3559
|
+
error_type: z150.literal("external_footprint_load_error").default("external_footprint_load_error")
|
|
3342
3560
|
}).describe("Defines an error when an external footprint fails to load");
|
|
3343
3561
|
expectTypesMatch(true);
|
|
3344
3562
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
3345
|
-
type:
|
|
3563
|
+
type: z151.literal("circuit_json_footprint_load_error"),
|
|
3346
3564
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3347
3565
|
"circuit_json_footprint_load_error"
|
|
3348
3566
|
),
|
|
3349
|
-
pcb_component_id:
|
|
3350
|
-
source_component_id:
|
|
3351
|
-
pcb_group_id:
|
|
3352
|
-
subcircuit_id:
|
|
3353
|
-
error_type:
|
|
3354
|
-
circuit_json:
|
|
3567
|
+
pcb_component_id: z151.string(),
|
|
3568
|
+
source_component_id: z151.string(),
|
|
3569
|
+
pcb_group_id: z151.string().optional(),
|
|
3570
|
+
subcircuit_id: z151.string().optional(),
|
|
3571
|
+
error_type: z151.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
3572
|
+
circuit_json: z151.array(z151.any()).optional()
|
|
3355
3573
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
3356
3574
|
expectTypesMatch(true);
|
|
3357
|
-
var pcb_group =
|
|
3358
|
-
type:
|
|
3575
|
+
var pcb_group = z152.object({
|
|
3576
|
+
type: z152.literal("pcb_group"),
|
|
3359
3577
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
3360
|
-
source_group_id:
|
|
3361
|
-
is_subcircuit:
|
|
3362
|
-
subcircuit_id:
|
|
3578
|
+
source_group_id: z152.string(),
|
|
3579
|
+
is_subcircuit: z152.boolean().optional(),
|
|
3580
|
+
subcircuit_id: z152.string().optional(),
|
|
3363
3581
|
width: length.optional(),
|
|
3364
3582
|
height: length.optional(),
|
|
3365
3583
|
center: point,
|
|
3366
|
-
display_offset_x:
|
|
3584
|
+
display_offset_x: z152.string().optional().describe(
|
|
3367
3585
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
3368
3586
|
),
|
|
3369
|
-
display_offset_y:
|
|
3587
|
+
display_offset_y: z152.string().optional().describe(
|
|
3370
3588
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
3371
3589
|
),
|
|
3372
|
-
outline:
|
|
3590
|
+
outline: z152.array(point).optional(),
|
|
3373
3591
|
anchor_position: point.optional(),
|
|
3374
3592
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
3375
|
-
position_mode:
|
|
3376
|
-
positioned_relative_to_pcb_group_id:
|
|
3377
|
-
positioned_relative_to_pcb_board_id:
|
|
3378
|
-
pcb_component_ids:
|
|
3379
|
-
child_layout_mode:
|
|
3380
|
-
name:
|
|
3381
|
-
description:
|
|
3382
|
-
layout_mode:
|
|
3383
|
-
autorouter_configuration:
|
|
3593
|
+
position_mode: z152.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
3594
|
+
positioned_relative_to_pcb_group_id: z152.string().optional(),
|
|
3595
|
+
positioned_relative_to_pcb_board_id: z152.string().optional(),
|
|
3596
|
+
pcb_component_ids: z152.array(z152.string()),
|
|
3597
|
+
child_layout_mode: z152.enum(["packed", "none"]).optional(),
|
|
3598
|
+
name: z152.string().optional(),
|
|
3599
|
+
description: z152.string().optional(),
|
|
3600
|
+
layout_mode: z152.string().optional(),
|
|
3601
|
+
autorouter_configuration: z152.object({
|
|
3384
3602
|
trace_clearance: length
|
|
3385
3603
|
}).optional(),
|
|
3386
|
-
autorouter_used_string:
|
|
3604
|
+
autorouter_used_string: z152.string().optional()
|
|
3387
3605
|
}).describe("Defines a group of components on the PCB");
|
|
3388
3606
|
expectTypesMatch(true);
|
|
3389
3607
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
3390
|
-
type:
|
|
3608
|
+
type: z153.literal("pcb_autorouting_error"),
|
|
3391
3609
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
3392
|
-
error_type:
|
|
3393
|
-
subcircuit_id:
|
|
3610
|
+
error_type: z153.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
3611
|
+
subcircuit_id: z153.string().optional()
|
|
3394
3612
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
3395
3613
|
expectTypesMatch(true);
|
|
3396
|
-
var pcb_manual_edit_conflict_warning =
|
|
3397
|
-
type:
|
|
3614
|
+
var pcb_manual_edit_conflict_warning = z154.object({
|
|
3615
|
+
type: z154.literal("pcb_manual_edit_conflict_warning"),
|
|
3398
3616
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
3399
3617
|
"pcb_manual_edit_conflict_warning"
|
|
3400
3618
|
),
|
|
3401
|
-
warning_type:
|
|
3402
|
-
message:
|
|
3403
|
-
pcb_component_id:
|
|
3404
|
-
pcb_group_id:
|
|
3405
|
-
subcircuit_id:
|
|
3406
|
-
source_component_id:
|
|
3619
|
+
warning_type: z154.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
3620
|
+
message: z154.string(),
|
|
3621
|
+
pcb_component_id: z154.string(),
|
|
3622
|
+
pcb_group_id: z154.string().optional(),
|
|
3623
|
+
subcircuit_id: z154.string().optional(),
|
|
3624
|
+
source_component_id: z154.string()
|
|
3407
3625
|
}).describe(
|
|
3408
3626
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3409
3627
|
);
|
|
3410
3628
|
expectTypesMatch(true);
|
|
3411
|
-
var connectorOrientationDirection =
|
|
3412
|
-
var pcb_connector_not_in_accessible_orientation_warning =
|
|
3413
|
-
type:
|
|
3629
|
+
var connectorOrientationDirection = z155.enum(["x-", "x+", "y+", "y-"]);
|
|
3630
|
+
var pcb_connector_not_in_accessible_orientation_warning = z155.object({
|
|
3631
|
+
type: z155.literal("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3414
3632
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3415
3633
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3416
3634
|
),
|
|
3417
|
-
warning_type:
|
|
3418
|
-
message:
|
|
3419
|
-
pcb_component_id:
|
|
3420
|
-
source_component_id:
|
|
3421
|
-
pcb_board_id:
|
|
3635
|
+
warning_type: z155.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3636
|
+
message: z155.string(),
|
|
3637
|
+
pcb_component_id: z155.string(),
|
|
3638
|
+
source_component_id: z155.string().optional(),
|
|
3639
|
+
pcb_board_id: z155.string().optional(),
|
|
3422
3640
|
facing_direction: connectorOrientationDirection,
|
|
3423
3641
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3424
|
-
subcircuit_id:
|
|
3642
|
+
subcircuit_id: z155.string().optional()
|
|
3425
3643
|
}).describe(
|
|
3426
3644
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
3427
3645
|
);
|
|
3428
3646
|
expectTypesMatch(true);
|
|
3429
|
-
var
|
|
3430
|
-
type:
|
|
3647
|
+
var pcb_component_missing_courtyard_warning = z156.object({
|
|
3648
|
+
type: z156.literal("pcb_component_missing_courtyard_warning"),
|
|
3649
|
+
pcb_component_missing_courtyard_warning_id: getZodPrefixedIdWithDefault(
|
|
3650
|
+
"pcb_component_missing_courtyard_warning"
|
|
3651
|
+
),
|
|
3652
|
+
warning_type: z156.literal("pcb_component_missing_courtyard_warning").default("pcb_component_missing_courtyard_warning"),
|
|
3653
|
+
message: z156.string(),
|
|
3654
|
+
pcb_component_id: z156.string(),
|
|
3655
|
+
source_component_id: z156.string().optional(),
|
|
3656
|
+
subcircuit_id: z156.string().optional()
|
|
3657
|
+
}).describe("Warning emitted when a PCB component has no courtyard geometry");
|
|
3658
|
+
expectTypesMatch(true);
|
|
3659
|
+
var supplier_footprint_mismatch_warning = z157.object({
|
|
3660
|
+
type: z157.literal("supplier_footprint_mismatch_warning"),
|
|
3431
3661
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
3432
3662
|
"supplier_footprint_mismatch_warning"
|
|
3433
3663
|
),
|
|
3434
|
-
warning_type:
|
|
3435
|
-
message:
|
|
3436
|
-
source_component_id:
|
|
3437
|
-
pcb_component_id:
|
|
3438
|
-
pcb_group_id:
|
|
3439
|
-
subcircuit_id:
|
|
3664
|
+
warning_type: z157.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
|
|
3665
|
+
message: z157.string(),
|
|
3666
|
+
source_component_id: z157.string(),
|
|
3667
|
+
pcb_component_id: z157.string().optional(),
|
|
3668
|
+
pcb_group_id: z157.string().optional(),
|
|
3669
|
+
subcircuit_id: z157.string().optional(),
|
|
3440
3670
|
supplier_name: supplier_name.optional(),
|
|
3441
|
-
supplier_part_number:
|
|
3442
|
-
supplier_footprint_url:
|
|
3443
|
-
footprint_copper_intersection_over_union:
|
|
3671
|
+
supplier_part_number: z157.string().optional(),
|
|
3672
|
+
supplier_footprint_url: z157.string().optional(),
|
|
3673
|
+
footprint_copper_intersection_over_union: z157.number()
|
|
3444
3674
|
}).describe(
|
|
3445
3675
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
3446
3676
|
);
|
|
3447
3677
|
expectTypesMatch(true);
|
|
3448
|
-
var pcb_breakout_point =
|
|
3449
|
-
type:
|
|
3678
|
+
var pcb_breakout_point = z158.object({
|
|
3679
|
+
type: z158.literal("pcb_breakout_point"),
|
|
3450
3680
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
3451
|
-
pcb_group_id:
|
|
3452
|
-
subcircuit_id:
|
|
3453
|
-
source_trace_id:
|
|
3454
|
-
source_port_id:
|
|
3455
|
-
source_net_id:
|
|
3681
|
+
pcb_group_id: z158.string(),
|
|
3682
|
+
subcircuit_id: z158.string().optional(),
|
|
3683
|
+
source_trace_id: z158.string().optional(),
|
|
3684
|
+
source_port_id: z158.string().optional(),
|
|
3685
|
+
source_net_id: z158.string().optional(),
|
|
3686
|
+
layer: layer_ref.optional(),
|
|
3456
3687
|
x: distance,
|
|
3457
3688
|
y: distance
|
|
3458
3689
|
}).describe(
|
|
3459
3690
|
"Defines a routing target within a pcb_group for a source_trace or source_net"
|
|
3460
3691
|
);
|
|
3461
3692
|
expectTypesMatch(true);
|
|
3462
|
-
var pcb_ground_plane =
|
|
3463
|
-
type:
|
|
3693
|
+
var pcb_ground_plane = z159.object({
|
|
3694
|
+
type: z159.literal("pcb_ground_plane"),
|
|
3464
3695
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
3465
|
-
source_pcb_ground_plane_id:
|
|
3466
|
-
source_net_id:
|
|
3467
|
-
pcb_group_id:
|
|
3468
|
-
subcircuit_id:
|
|
3696
|
+
source_pcb_ground_plane_id: z159.string(),
|
|
3697
|
+
source_net_id: z159.string(),
|
|
3698
|
+
pcb_group_id: z159.string().optional(),
|
|
3699
|
+
subcircuit_id: z159.string().optional()
|
|
3469
3700
|
}).describe("Defines a ground plane on the PCB");
|
|
3470
3701
|
expectTypesMatch(true);
|
|
3471
|
-
var pcb_ground_plane_region =
|
|
3472
|
-
type:
|
|
3702
|
+
var pcb_ground_plane_region = z160.object({
|
|
3703
|
+
type: z160.literal("pcb_ground_plane_region"),
|
|
3473
3704
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3474
3705
|
"pcb_ground_plane_region"
|
|
3475
3706
|
),
|
|
3476
|
-
pcb_ground_plane_id:
|
|
3477
|
-
pcb_group_id:
|
|
3478
|
-
subcircuit_id:
|
|
3707
|
+
pcb_ground_plane_id: z160.string(),
|
|
3708
|
+
pcb_group_id: z160.string().optional(),
|
|
3709
|
+
subcircuit_id: z160.string().optional(),
|
|
3479
3710
|
layer: layer_ref,
|
|
3480
|
-
points:
|
|
3711
|
+
points: z160.array(point)
|
|
3481
3712
|
}).describe("Defines a polygon region of a ground plane");
|
|
3482
3713
|
expectTypesMatch(true);
|
|
3483
|
-
var pcb_thermal_spoke =
|
|
3484
|
-
type:
|
|
3714
|
+
var pcb_thermal_spoke = z161.object({
|
|
3715
|
+
type: z161.literal("pcb_thermal_spoke"),
|
|
3485
3716
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3486
|
-
pcb_ground_plane_id:
|
|
3487
|
-
shape:
|
|
3488
|
-
spoke_count:
|
|
3717
|
+
pcb_ground_plane_id: z161.string(),
|
|
3718
|
+
shape: z161.string(),
|
|
3719
|
+
spoke_count: z161.number(),
|
|
3489
3720
|
spoke_thickness: distance,
|
|
3490
3721
|
spoke_inner_diameter: distance,
|
|
3491
3722
|
spoke_outer_diameter: distance,
|
|
3492
|
-
pcb_plated_hole_id:
|
|
3493
|
-
subcircuit_id:
|
|
3723
|
+
pcb_plated_hole_id: z161.string().optional(),
|
|
3724
|
+
subcircuit_id: z161.string().optional()
|
|
3494
3725
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3495
3726
|
expectTypesMatch(true);
|
|
3496
|
-
var pcb_copper_pour_base =
|
|
3497
|
-
type:
|
|
3727
|
+
var pcb_copper_pour_base = z162.object({
|
|
3728
|
+
type: z162.literal("pcb_copper_pour"),
|
|
3498
3729
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3499
|
-
pcb_group_id:
|
|
3500
|
-
subcircuit_id:
|
|
3730
|
+
pcb_group_id: z162.string().optional(),
|
|
3731
|
+
subcircuit_id: z162.string().optional(),
|
|
3501
3732
|
layer: layer_ref,
|
|
3502
|
-
source_net_id:
|
|
3503
|
-
covered_with_solder_mask:
|
|
3733
|
+
source_net_id: z162.string().optional(),
|
|
3734
|
+
covered_with_solder_mask: z162.boolean().optional().default(true)
|
|
3504
3735
|
});
|
|
3505
3736
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3506
|
-
shape:
|
|
3737
|
+
shape: z162.literal("rect"),
|
|
3507
3738
|
center: point,
|
|
3508
3739
|
width: length,
|
|
3509
3740
|
height: length,
|
|
@@ -3511,101 +3742,101 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3511
3742
|
});
|
|
3512
3743
|
expectTypesMatch(true);
|
|
3513
3744
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3514
|
-
shape:
|
|
3745
|
+
shape: z162.literal("brep"),
|
|
3515
3746
|
brep_shape
|
|
3516
3747
|
});
|
|
3517
3748
|
expectTypesMatch(true);
|
|
3518
3749
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3519
|
-
shape:
|
|
3520
|
-
points:
|
|
3750
|
+
shape: z162.literal("polygon"),
|
|
3751
|
+
points: z162.array(point)
|
|
3521
3752
|
});
|
|
3522
3753
|
expectTypesMatch(true);
|
|
3523
|
-
var pcb_copper_pour =
|
|
3754
|
+
var pcb_copper_pour = z162.discriminatedUnion("shape", [
|
|
3524
3755
|
pcb_copper_pour_rect,
|
|
3525
3756
|
pcb_copper_pour_brep,
|
|
3526
3757
|
pcb_copper_pour_polygon
|
|
3527
3758
|
]).describe("Defines a copper pour on the PCB.");
|
|
3528
3759
|
expectTypesMatch(true);
|
|
3529
3760
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3530
|
-
type:
|
|
3761
|
+
type: z163.literal("pcb_component_outside_board_error"),
|
|
3531
3762
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3532
3763
|
"pcb_component_outside_board_error"
|
|
3533
3764
|
),
|
|
3534
|
-
error_type:
|
|
3535
|
-
pcb_component_id:
|
|
3536
|
-
pcb_board_id:
|
|
3765
|
+
error_type: z163.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
3766
|
+
pcb_component_id: z163.string(),
|
|
3767
|
+
pcb_board_id: z163.string(),
|
|
3537
3768
|
component_center: point,
|
|
3538
|
-
component_bounds:
|
|
3539
|
-
min_x:
|
|
3540
|
-
max_x:
|
|
3541
|
-
min_y:
|
|
3542
|
-
max_y:
|
|
3769
|
+
component_bounds: z163.object({
|
|
3770
|
+
min_x: z163.number(),
|
|
3771
|
+
max_x: z163.number(),
|
|
3772
|
+
min_y: z163.number(),
|
|
3773
|
+
max_y: z163.number()
|
|
3543
3774
|
}),
|
|
3544
|
-
subcircuit_id:
|
|
3545
|
-
source_component_id:
|
|
3775
|
+
subcircuit_id: z163.string().optional(),
|
|
3776
|
+
source_component_id: z163.string().optional()
|
|
3546
3777
|
}).describe(
|
|
3547
3778
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3548
3779
|
);
|
|
3549
3780
|
expectTypesMatch(true);
|
|
3550
3781
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3551
|
-
type:
|
|
3782
|
+
type: z164.literal("pcb_component_not_on_board_edge_error"),
|
|
3552
3783
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3553
3784
|
"pcb_component_not_on_board_edge_error"
|
|
3554
3785
|
),
|
|
3555
|
-
error_type:
|
|
3556
|
-
pcb_component_id:
|
|
3557
|
-
pcb_board_id:
|
|
3786
|
+
error_type: z164.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
3787
|
+
pcb_component_id: z164.string(),
|
|
3788
|
+
pcb_board_id: z164.string(),
|
|
3558
3789
|
component_center: point,
|
|
3559
|
-
pad_to_nearest_board_edge_distance:
|
|
3560
|
-
source_component_id:
|
|
3561
|
-
subcircuit_id:
|
|
3790
|
+
pad_to_nearest_board_edge_distance: z164.number(),
|
|
3791
|
+
source_component_id: z164.string().optional(),
|
|
3792
|
+
subcircuit_id: z164.string().optional()
|
|
3562
3793
|
}).describe(
|
|
3563
3794
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3564
3795
|
);
|
|
3565
3796
|
expectTypesMatch(true);
|
|
3566
3797
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3567
|
-
type:
|
|
3798
|
+
type: z165.literal("pcb_component_invalid_layer_error"),
|
|
3568
3799
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3569
3800
|
"pcb_component_invalid_layer_error"
|
|
3570
3801
|
),
|
|
3571
|
-
error_type:
|
|
3572
|
-
pcb_component_id:
|
|
3573
|
-
source_component_id:
|
|
3802
|
+
error_type: z165.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
3803
|
+
pcb_component_id: z165.string().optional(),
|
|
3804
|
+
source_component_id: z165.string(),
|
|
3574
3805
|
layer: layer_ref,
|
|
3575
|
-
subcircuit_id:
|
|
3806
|
+
subcircuit_id: z165.string().optional()
|
|
3576
3807
|
}).describe(
|
|
3577
3808
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
3578
3809
|
);
|
|
3579
3810
|
expectTypesMatch(true);
|
|
3580
3811
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
3581
|
-
type:
|
|
3812
|
+
type: z166.literal("pcb_via_clearance_error"),
|
|
3582
3813
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3583
|
-
error_type:
|
|
3584
|
-
pcb_via_ids:
|
|
3814
|
+
error_type: z166.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
3815
|
+
pcb_via_ids: z166.array(z166.string()).min(2),
|
|
3585
3816
|
minimum_clearance: distance.optional(),
|
|
3586
3817
|
actual_clearance: distance.optional(),
|
|
3587
|
-
pcb_center:
|
|
3588
|
-
x:
|
|
3589
|
-
y:
|
|
3818
|
+
pcb_center: z166.object({
|
|
3819
|
+
x: z166.number().optional(),
|
|
3820
|
+
y: z166.number().optional()
|
|
3590
3821
|
}).optional(),
|
|
3591
|
-
subcircuit_id:
|
|
3822
|
+
subcircuit_id: z166.string().optional()
|
|
3592
3823
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
3593
3824
|
expectTypesMatch(true);
|
|
3594
3825
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
3595
|
-
type:
|
|
3826
|
+
type: z167.literal("pcb_via_trace_clearance_error"),
|
|
3596
3827
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3597
3828
|
"pcb_via_trace_clearance_error"
|
|
3598
3829
|
),
|
|
3599
|
-
error_type:
|
|
3600
|
-
pcb_via_id:
|
|
3601
|
-
pcb_trace_id:
|
|
3830
|
+
error_type: z167.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
3831
|
+
pcb_via_id: z167.string(),
|
|
3832
|
+
pcb_trace_id: z167.string(),
|
|
3602
3833
|
minimum_clearance: distance.optional(),
|
|
3603
3834
|
actual_clearance: distance.optional(),
|
|
3604
|
-
center:
|
|
3605
|
-
x:
|
|
3606
|
-
y:
|
|
3835
|
+
center: z167.object({
|
|
3836
|
+
x: z167.number().optional(),
|
|
3837
|
+
y: z167.number().optional()
|
|
3607
3838
|
}).optional(),
|
|
3608
|
-
subcircuit_id:
|
|
3839
|
+
subcircuit_id: z167.string().optional()
|
|
3609
3840
|
}).describe(
|
|
3610
3841
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
3611
3842
|
);
|
|
@@ -3613,107 +3844,107 @@ expectTypesMatch(
|
|
|
3613
3844
|
true
|
|
3614
3845
|
);
|
|
3615
3846
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
3616
|
-
type:
|
|
3847
|
+
type: z168.literal("pcb_pad_pad_clearance_error"),
|
|
3617
3848
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3618
3849
|
"pcb_pad_pad_clearance_error"
|
|
3619
3850
|
),
|
|
3620
|
-
error_type:
|
|
3621
|
-
pcb_pad_ids:
|
|
3851
|
+
error_type: z168.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
3852
|
+
pcb_pad_ids: z168.array(z168.string()).min(2),
|
|
3622
3853
|
minimum_clearance: distance.optional(),
|
|
3623
3854
|
actual_clearance: distance.optional(),
|
|
3624
|
-
center:
|
|
3625
|
-
x:
|
|
3626
|
-
y:
|
|
3855
|
+
center: z168.object({
|
|
3856
|
+
x: z168.number().optional(),
|
|
3857
|
+
y: z168.number().optional()
|
|
3627
3858
|
}).optional(),
|
|
3628
|
-
subcircuit_id:
|
|
3859
|
+
subcircuit_id: z168.string().optional()
|
|
3629
3860
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
3630
3861
|
expectTypesMatch(true);
|
|
3631
3862
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
3632
|
-
type:
|
|
3863
|
+
type: z169.literal("pcb_pad_trace_clearance_error"),
|
|
3633
3864
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3634
3865
|
"pcb_pad_trace_clearance_error"
|
|
3635
3866
|
),
|
|
3636
|
-
error_type:
|
|
3637
|
-
pcb_pad_id:
|
|
3638
|
-
pcb_trace_id:
|
|
3867
|
+
error_type: z169.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
3868
|
+
pcb_pad_id: z169.string(),
|
|
3869
|
+
pcb_trace_id: z169.string(),
|
|
3639
3870
|
minimum_clearance: distance.optional(),
|
|
3640
3871
|
actual_clearance: distance.optional(),
|
|
3641
|
-
center:
|
|
3642
|
-
x:
|
|
3643
|
-
y:
|
|
3872
|
+
center: z169.object({
|
|
3873
|
+
x: z169.number().optional(),
|
|
3874
|
+
y: z169.number().optional()
|
|
3644
3875
|
}).optional(),
|
|
3645
|
-
subcircuit_id:
|
|
3876
|
+
subcircuit_id: z169.string().optional()
|
|
3646
3877
|
}).describe(
|
|
3647
3878
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
3648
3879
|
);
|
|
3649
3880
|
expectTypesMatch(
|
|
3650
3881
|
true
|
|
3651
3882
|
);
|
|
3652
|
-
var pcb_courtyard_rect =
|
|
3653
|
-
type:
|
|
3883
|
+
var pcb_courtyard_rect = z170.object({
|
|
3884
|
+
type: z170.literal("pcb_courtyard_rect"),
|
|
3654
3885
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
3655
|
-
pcb_component_id:
|
|
3656
|
-
pcb_group_id:
|
|
3657
|
-
subcircuit_id:
|
|
3886
|
+
pcb_component_id: z170.string(),
|
|
3887
|
+
pcb_group_id: z170.string().optional(),
|
|
3888
|
+
subcircuit_id: z170.string().optional(),
|
|
3658
3889
|
center: point,
|
|
3659
3890
|
width: length,
|
|
3660
3891
|
height: length,
|
|
3661
3892
|
layer: visible_layer,
|
|
3662
3893
|
ccw_rotation: rotation.optional(),
|
|
3663
|
-
color:
|
|
3894
|
+
color: z170.string().optional()
|
|
3664
3895
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
3665
3896
|
expectTypesMatch(true);
|
|
3666
|
-
var pcb_courtyard_outline =
|
|
3667
|
-
type:
|
|
3897
|
+
var pcb_courtyard_outline = z171.object({
|
|
3898
|
+
type: z171.literal("pcb_courtyard_outline"),
|
|
3668
3899
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
3669
3900
|
"pcb_courtyard_outline"
|
|
3670
3901
|
),
|
|
3671
|
-
pcb_component_id:
|
|
3672
|
-
pcb_group_id:
|
|
3673
|
-
subcircuit_id:
|
|
3902
|
+
pcb_component_id: z171.string(),
|
|
3903
|
+
pcb_group_id: z171.string().optional(),
|
|
3904
|
+
subcircuit_id: z171.string().optional(),
|
|
3674
3905
|
layer: visible_layer,
|
|
3675
|
-
outline:
|
|
3906
|
+
outline: z171.array(point).min(2)
|
|
3676
3907
|
}).describe("Defines a courtyard outline on the PCB");
|
|
3677
3908
|
expectTypesMatch(true);
|
|
3678
|
-
var pcb_courtyard_polygon =
|
|
3679
|
-
type:
|
|
3909
|
+
var pcb_courtyard_polygon = z172.object({
|
|
3910
|
+
type: z172.literal("pcb_courtyard_polygon"),
|
|
3680
3911
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
3681
3912
|
"pcb_courtyard_polygon"
|
|
3682
3913
|
),
|
|
3683
|
-
pcb_component_id:
|
|
3684
|
-
pcb_group_id:
|
|
3685
|
-
subcircuit_id:
|
|
3914
|
+
pcb_component_id: z172.string(),
|
|
3915
|
+
pcb_group_id: z172.string().optional(),
|
|
3916
|
+
subcircuit_id: z172.string().optional(),
|
|
3686
3917
|
layer: visible_layer,
|
|
3687
|
-
points:
|
|
3688
|
-
color:
|
|
3918
|
+
points: z172.array(point).min(3),
|
|
3919
|
+
color: z172.string().optional()
|
|
3689
3920
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
3690
3921
|
expectTypesMatch(true);
|
|
3691
|
-
var pcb_courtyard_circle =
|
|
3692
|
-
type:
|
|
3922
|
+
var pcb_courtyard_circle = z173.object({
|
|
3923
|
+
type: z173.literal("pcb_courtyard_circle"),
|
|
3693
3924
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
3694
3925
|
"pcb_courtyard_circle"
|
|
3695
3926
|
),
|
|
3696
|
-
pcb_component_id:
|
|
3697
|
-
pcb_group_id:
|
|
3698
|
-
subcircuit_id:
|
|
3927
|
+
pcb_component_id: z173.string(),
|
|
3928
|
+
pcb_group_id: z173.string().optional(),
|
|
3929
|
+
subcircuit_id: z173.string().optional(),
|
|
3699
3930
|
center: point,
|
|
3700
3931
|
radius: length,
|
|
3701
3932
|
layer: visible_layer,
|
|
3702
|
-
color:
|
|
3933
|
+
color: z173.string().optional()
|
|
3703
3934
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3704
3935
|
expectTypesMatch(true);
|
|
3705
|
-
var pcb_courtyard_pill =
|
|
3706
|
-
type:
|
|
3936
|
+
var pcb_courtyard_pill = z174.object({
|
|
3937
|
+
type: z174.literal("pcb_courtyard_pill"),
|
|
3707
3938
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
3708
|
-
pcb_component_id:
|
|
3709
|
-
pcb_group_id:
|
|
3710
|
-
subcircuit_id:
|
|
3939
|
+
pcb_component_id: z174.string(),
|
|
3940
|
+
pcb_group_id: z174.string().optional(),
|
|
3941
|
+
subcircuit_id: z174.string().optional(),
|
|
3711
3942
|
center: point,
|
|
3712
3943
|
width: length,
|
|
3713
3944
|
height: length,
|
|
3714
3945
|
radius: length,
|
|
3715
3946
|
layer: visible_layer,
|
|
3716
|
-
color:
|
|
3947
|
+
color: z174.string().optional()
|
|
3717
3948
|
}).describe("Defines a courtyard pill on the PCB");
|
|
3718
3949
|
expectTypesMatch(true);
|
|
3719
3950
|
var cad_model_formats = [
|
|
@@ -3742,46 +3973,47 @@ var cadModelDefaultDirectionMap = {
|
|
|
3742
3973
|
step: "z+",
|
|
3743
3974
|
wrl: "y+"
|
|
3744
3975
|
};
|
|
3745
|
-
var cad_component =
|
|
3746
|
-
type:
|
|
3747
|
-
cad_component_id:
|
|
3748
|
-
pcb_component_id:
|
|
3749
|
-
source_component_id:
|
|
3976
|
+
var cad_component = z175.object({
|
|
3977
|
+
type: z175.literal("cad_component"),
|
|
3978
|
+
cad_component_id: z175.string(),
|
|
3979
|
+
pcb_component_id: z175.string(),
|
|
3980
|
+
source_component_id: z175.string(),
|
|
3750
3981
|
position: point3,
|
|
3751
3982
|
rotation: point3.optional(),
|
|
3752
3983
|
size: point3.optional(),
|
|
3753
3984
|
layer: layer_ref.optional(),
|
|
3754
|
-
subcircuit_id:
|
|
3985
|
+
subcircuit_id: z175.string().optional(),
|
|
3755
3986
|
// These are all ways to generate/load the 3d model
|
|
3756
|
-
footprinter_string:
|
|
3757
|
-
model_obj_url:
|
|
3758
|
-
model_stl_url:
|
|
3759
|
-
model_3mf_url:
|
|
3760
|
-
model_gltf_url:
|
|
3761
|
-
model_glb_url:
|
|
3762
|
-
model_step_url:
|
|
3763
|
-
model_wrl_url:
|
|
3987
|
+
footprinter_string: z175.string().optional(),
|
|
3988
|
+
model_obj_url: z175.string().optional(),
|
|
3989
|
+
model_stl_url: z175.string().optional(),
|
|
3990
|
+
model_3mf_url: z175.string().optional(),
|
|
3991
|
+
model_gltf_url: z175.string().optional(),
|
|
3992
|
+
model_glb_url: z175.string().optional(),
|
|
3993
|
+
model_step_url: z175.string().optional(),
|
|
3994
|
+
model_wrl_url: z175.string().optional(),
|
|
3764
3995
|
model_asset: asset.optional(),
|
|
3765
|
-
model_unit_to_mm_scale_factor:
|
|
3766
|
-
model_board_normal_direction:
|
|
3996
|
+
model_unit_to_mm_scale_factor: z175.number().optional(),
|
|
3997
|
+
model_board_normal_direction: z175.enum(cad_model_axis_directions).optional().describe(
|
|
3767
3998
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
3768
3999
|
),
|
|
3769
4000
|
model_origin_position: point3.optional(),
|
|
3770
|
-
model_origin_alignment:
|
|
4001
|
+
model_origin_alignment: z175.enum([
|
|
3771
4002
|
"unknown",
|
|
3772
4003
|
"center",
|
|
3773
4004
|
"center_of_component_on_board_surface",
|
|
3774
4005
|
"bottom_center_of_component"
|
|
3775
4006
|
]).optional(),
|
|
3776
|
-
model_object_fit:
|
|
3777
|
-
model_jscad:
|
|
3778
|
-
show_as_translucent_model:
|
|
3779
|
-
show_as_bounding_box:
|
|
3780
|
-
|
|
4007
|
+
model_object_fit: z175.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
4008
|
+
model_jscad: z175.any().optional(),
|
|
4009
|
+
show_as_translucent_model: z175.boolean().optional(),
|
|
4010
|
+
show_as_bounding_box: z175.boolean().optional(),
|
|
4011
|
+
show_hidden_edges: z175.boolean().optional(),
|
|
4012
|
+
anchor_alignment: z175.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
3781
4013
|
}).describe("Defines a component on the PCB");
|
|
3782
4014
|
expectTypesMatch(true);
|
|
3783
|
-
var wave_shape =
|
|
3784
|
-
var percentage =
|
|
4015
|
+
var wave_shape = z176.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
4016
|
+
var percentage = z176.union([z176.string(), z176.number()]).transform((val) => {
|
|
3785
4017
|
if (typeof val === "string") {
|
|
3786
4018
|
if (val.endsWith("%")) {
|
|
3787
4019
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3790,32 +4022,32 @@ var percentage = z170.union([z170.string(), z170.number()]).transform((val) => {
|
|
|
3790
4022
|
}
|
|
3791
4023
|
return val;
|
|
3792
4024
|
}).pipe(
|
|
3793
|
-
|
|
4025
|
+
z176.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3794
4026
|
);
|
|
3795
|
-
var simulation_dc_voltage_source =
|
|
3796
|
-
type:
|
|
4027
|
+
var simulation_dc_voltage_source = z176.object({
|
|
4028
|
+
type: z176.literal("simulation_voltage_source"),
|
|
3797
4029
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3798
4030
|
"simulation_voltage_source"
|
|
3799
4031
|
),
|
|
3800
|
-
is_dc_source:
|
|
3801
|
-
positive_source_port_id:
|
|
3802
|
-
negative_source_port_id:
|
|
3803
|
-
positive_source_net_id:
|
|
3804
|
-
negative_source_net_id:
|
|
4032
|
+
is_dc_source: z176.literal(true).optional().default(true),
|
|
4033
|
+
positive_source_port_id: z176.string().optional(),
|
|
4034
|
+
negative_source_port_id: z176.string().optional(),
|
|
4035
|
+
positive_source_net_id: z176.string().optional(),
|
|
4036
|
+
negative_source_net_id: z176.string().optional(),
|
|
3805
4037
|
voltage,
|
|
3806
4038
|
ac_magnitude: voltage.optional(),
|
|
3807
4039
|
ac_phase: rotation.optional()
|
|
3808
4040
|
}).describe("Defines a DC voltage source for simulation");
|
|
3809
|
-
var simulation_ac_voltage_source =
|
|
3810
|
-
type:
|
|
4041
|
+
var simulation_ac_voltage_source = z176.object({
|
|
4042
|
+
type: z176.literal("simulation_voltage_source"),
|
|
3811
4043
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3812
4044
|
"simulation_voltage_source"
|
|
3813
4045
|
),
|
|
3814
|
-
is_dc_source:
|
|
3815
|
-
terminal1_source_port_id:
|
|
3816
|
-
terminal2_source_port_id:
|
|
3817
|
-
terminal1_source_net_id:
|
|
3818
|
-
terminal2_source_net_id:
|
|
4046
|
+
is_dc_source: z176.literal(false),
|
|
4047
|
+
terminal1_source_port_id: z176.string().optional(),
|
|
4048
|
+
terminal2_source_port_id: z176.string().optional(),
|
|
4049
|
+
terminal1_source_net_id: z176.string().optional(),
|
|
4050
|
+
terminal2_source_net_id: z176.string().optional(),
|
|
3819
4051
|
voltage: voltage.optional(),
|
|
3820
4052
|
frequency: frequency.optional(),
|
|
3821
4053
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -3830,11 +4062,11 @@ var simulation_ac_voltage_source = z170.object({
|
|
|
3830
4062
|
ac_magnitude: voltage.optional(),
|
|
3831
4063
|
ac_phase: rotation.optional()
|
|
3832
4064
|
}).describe("Defines an AC voltage source for simulation");
|
|
3833
|
-
var simulation_voltage_source =
|
|
4065
|
+
var simulation_voltage_source = z176.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
3834
4066
|
expectTypesMatch(true);
|
|
3835
4067
|
expectTypesMatch(true);
|
|
3836
4068
|
expectTypesMatch(true);
|
|
3837
|
-
var percentage2 =
|
|
4069
|
+
var percentage2 = z177.union([z177.string(), z177.number()]).transform((val) => {
|
|
3838
4070
|
if (typeof val === "string") {
|
|
3839
4071
|
if (val.endsWith("%")) {
|
|
3840
4072
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3843,32 +4075,32 @@ var percentage2 = z171.union([z171.string(), z171.number()]).transform((val) =>
|
|
|
3843
4075
|
}
|
|
3844
4076
|
return val;
|
|
3845
4077
|
}).pipe(
|
|
3846
|
-
|
|
4078
|
+
z177.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3847
4079
|
);
|
|
3848
|
-
var simulation_dc_current_source =
|
|
3849
|
-
type:
|
|
4080
|
+
var simulation_dc_current_source = z177.object({
|
|
4081
|
+
type: z177.literal("simulation_current_source"),
|
|
3850
4082
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3851
4083
|
"simulation_current_source"
|
|
3852
4084
|
),
|
|
3853
|
-
is_dc_source:
|
|
3854
|
-
positive_source_port_id:
|
|
3855
|
-
negative_source_port_id:
|
|
3856
|
-
positive_source_net_id:
|
|
3857
|
-
negative_source_net_id:
|
|
4085
|
+
is_dc_source: z177.literal(true).optional().default(true),
|
|
4086
|
+
positive_source_port_id: z177.string().optional(),
|
|
4087
|
+
negative_source_port_id: z177.string().optional(),
|
|
4088
|
+
positive_source_net_id: z177.string().optional(),
|
|
4089
|
+
negative_source_net_id: z177.string().optional(),
|
|
3858
4090
|
current,
|
|
3859
4091
|
ac_magnitude: current.optional(),
|
|
3860
4092
|
ac_phase: rotation.optional()
|
|
3861
4093
|
}).describe("Defines a DC current source for simulation");
|
|
3862
|
-
var simulation_ac_current_source =
|
|
3863
|
-
type:
|
|
4094
|
+
var simulation_ac_current_source = z177.object({
|
|
4095
|
+
type: z177.literal("simulation_current_source"),
|
|
3864
4096
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3865
4097
|
"simulation_current_source"
|
|
3866
4098
|
),
|
|
3867
|
-
is_dc_source:
|
|
3868
|
-
terminal1_source_port_id:
|
|
3869
|
-
terminal2_source_port_id:
|
|
3870
|
-
terminal1_source_net_id:
|
|
3871
|
-
terminal2_source_net_id:
|
|
4099
|
+
is_dc_source: z177.literal(false),
|
|
4100
|
+
terminal1_source_port_id: z177.string().optional(),
|
|
4101
|
+
terminal2_source_port_id: z177.string().optional(),
|
|
4102
|
+
terminal1_source_net_id: z177.string().optional(),
|
|
4103
|
+
terminal2_source_net_id: z177.string().optional(),
|
|
3872
4104
|
current: current.optional(),
|
|
3873
4105
|
frequency: frequency.optional(),
|
|
3874
4106
|
peak_to_peak_current: current.optional(),
|
|
@@ -3878,50 +4110,50 @@ var simulation_ac_current_source = z171.object({
|
|
|
3878
4110
|
ac_magnitude: current.optional(),
|
|
3879
4111
|
ac_phase: rotation.optional()
|
|
3880
4112
|
}).describe("Defines an AC current source for simulation");
|
|
3881
|
-
var simulation_current_source =
|
|
4113
|
+
var simulation_current_source = z177.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
3882
4114
|
expectTypesMatch(true);
|
|
3883
4115
|
expectTypesMatch(true);
|
|
3884
4116
|
expectTypesMatch(true);
|
|
3885
|
-
var simulation_dc_sweep_unit =
|
|
4117
|
+
var simulation_dc_sweep_unit = z178.custom(
|
|
3886
4118
|
(dcSweepUnit) => dcSweepUnit === "V" || dcSweepUnit === "A"
|
|
3887
4119
|
);
|
|
3888
|
-
var simulation_parameter_unit =
|
|
4120
|
+
var simulation_parameter_unit = z178.custom(
|
|
3889
4121
|
(parameterUnit) => parameterUnit === "\u03A9" || parameterUnit === "F" || parameterUnit === "H" || parameterUnit === "V" || parameterUnit === "A"
|
|
3890
4122
|
);
|
|
3891
|
-
var experiment_type =
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
4123
|
+
var experiment_type = z179.union([
|
|
4124
|
+
z179.literal("spice_dc_sweep"),
|
|
4125
|
+
z179.literal("spice_dc_operating_point"),
|
|
4126
|
+
z179.literal("spice_transient_analysis"),
|
|
4127
|
+
z179.literal("spice_ac_analysis")
|
|
3896
4128
|
]);
|
|
3897
|
-
var spice_simulation_options =
|
|
3898
|
-
method:
|
|
3899
|
-
reltol:
|
|
3900
|
-
abstol:
|
|
3901
|
-
vntol:
|
|
4129
|
+
var spice_simulation_options = z179.object({
|
|
4130
|
+
method: z179.enum(["trap", "gear"]).optional(),
|
|
4131
|
+
reltol: z179.union([z179.number(), z179.string()]).optional(),
|
|
4132
|
+
abstol: z179.union([z179.number(), z179.string()]).optional(),
|
|
4133
|
+
vntol: z179.union([z179.number(), z179.string()]).optional()
|
|
3902
4134
|
}).describe("SPICE solver options for a simulation experiment");
|
|
3903
|
-
var simulation_experiment =
|
|
3904
|
-
type:
|
|
4135
|
+
var simulation_experiment = z179.object({
|
|
4136
|
+
type: z179.literal("simulation_experiment"),
|
|
3905
4137
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
3906
4138
|
"simulation_experiment"
|
|
3907
4139
|
),
|
|
3908
|
-
name:
|
|
4140
|
+
name: z179.string(),
|
|
3909
4141
|
experiment_type,
|
|
3910
4142
|
time_per_step: duration_ms.optional(),
|
|
3911
4143
|
start_time_ms: ms.optional(),
|
|
3912
4144
|
end_time_ms: ms.optional(),
|
|
3913
4145
|
spice_options: spice_simulation_options.optional(),
|
|
3914
|
-
dc_sweep_voltage_source_id:
|
|
3915
|
-
dc_sweep_current_source_id:
|
|
3916
|
-
dc_sweep_start:
|
|
3917
|
-
dc_sweep_stop:
|
|
3918
|
-
dc_sweep_step:
|
|
4146
|
+
dc_sweep_voltage_source_id: z179.string().optional(),
|
|
4147
|
+
dc_sweep_current_source_id: z179.string().optional(),
|
|
4148
|
+
dc_sweep_start: z179.number().optional(),
|
|
4149
|
+
dc_sweep_stop: z179.number().optional(),
|
|
4150
|
+
dc_sweep_step: z179.number().refine((dcSweepStep) => dcSweepStep !== 0).optional(),
|
|
3919
4151
|
dc_sweep_unit: simulation_dc_sweep_unit.optional(),
|
|
3920
|
-
ac_sweep_type:
|
|
3921
|
-
ac_samples_per_interval:
|
|
3922
|
-
ac_sample_count:
|
|
3923
|
-
ac_start_frequency_hz:
|
|
3924
|
-
ac_stop_frequency_hz:
|
|
4152
|
+
ac_sweep_type: z179.enum(["linear", "decade", "octave"]).optional(),
|
|
4153
|
+
ac_samples_per_interval: z179.number().int().positive().optional(),
|
|
4154
|
+
ac_sample_count: z179.number().int().positive().optional(),
|
|
4155
|
+
ac_start_frequency_hz: z179.number().positive().optional(),
|
|
4156
|
+
ac_stop_frequency_hz: z179.number().positive().optional()
|
|
3925
4157
|
}).superRefine((experiment, context) => {
|
|
3926
4158
|
if (experiment.experiment_type === "spice_dc_sweep") {
|
|
3927
4159
|
const requiredFields = [
|
|
@@ -3933,7 +4165,7 @@ var simulation_experiment = z173.object({
|
|
|
3933
4165
|
for (const field of requiredFields) {
|
|
3934
4166
|
if (experiment[field] === void 0) {
|
|
3935
4167
|
context.addIssue({
|
|
3936
|
-
code:
|
|
4168
|
+
code: z179.ZodIssueCode.custom,
|
|
3937
4169
|
path: [field],
|
|
3938
4170
|
message: `${field} is required for a DC sweep`
|
|
3939
4171
|
});
|
|
@@ -3943,7 +4175,7 @@ var simulation_experiment = z173.object({
|
|
|
3943
4175
|
const hasCurrentSource = experiment.dc_sweep_current_source_id !== void 0;
|
|
3944
4176
|
if (hasVoltageSource === hasCurrentSource) {
|
|
3945
4177
|
context.addIssue({
|
|
3946
|
-
code:
|
|
4178
|
+
code: z179.ZodIssueCode.custom,
|
|
3947
4179
|
path: ["dc_sweep_voltage_source_id"],
|
|
3948
4180
|
message: "Exactly one DC sweep voltage or current source ID is required"
|
|
3949
4181
|
});
|
|
@@ -3952,35 +4184,35 @@ var simulation_experiment = z173.object({
|
|
|
3952
4184
|
if (experiment.experiment_type === "spice_ac_analysis") {
|
|
3953
4185
|
if (experiment.ac_sweep_type === void 0) {
|
|
3954
4186
|
context.addIssue({
|
|
3955
|
-
code:
|
|
4187
|
+
code: z179.ZodIssueCode.custom,
|
|
3956
4188
|
path: ["ac_sweep_type"],
|
|
3957
4189
|
message: "ac_sweep_type is required for an AC analysis"
|
|
3958
4190
|
});
|
|
3959
4191
|
}
|
|
3960
4192
|
if (experiment.ac_start_frequency_hz === void 0) {
|
|
3961
4193
|
context.addIssue({
|
|
3962
|
-
code:
|
|
4194
|
+
code: z179.ZodIssueCode.custom,
|
|
3963
4195
|
path: ["ac_start_frequency_hz"],
|
|
3964
4196
|
message: "ac_start_frequency_hz is required for an AC analysis"
|
|
3965
4197
|
});
|
|
3966
4198
|
}
|
|
3967
4199
|
if (experiment.ac_stop_frequency_hz === void 0) {
|
|
3968
4200
|
context.addIssue({
|
|
3969
|
-
code:
|
|
4201
|
+
code: z179.ZodIssueCode.custom,
|
|
3970
4202
|
path: ["ac_stop_frequency_hz"],
|
|
3971
4203
|
message: "ac_stop_frequency_hz is required for an AC analysis"
|
|
3972
4204
|
});
|
|
3973
4205
|
}
|
|
3974
4206
|
if (experiment.ac_sweep_type === "linear" && experiment.ac_sample_count === void 0) {
|
|
3975
4207
|
context.addIssue({
|
|
3976
|
-
code:
|
|
4208
|
+
code: z179.ZodIssueCode.custom,
|
|
3977
4209
|
path: ["ac_sample_count"],
|
|
3978
4210
|
message: "ac_sample_count is required for a linear AC analysis"
|
|
3979
4211
|
});
|
|
3980
4212
|
}
|
|
3981
4213
|
if ((experiment.ac_sweep_type === "decade" || experiment.ac_sweep_type === "octave") && experiment.ac_samples_per_interval === void 0) {
|
|
3982
4214
|
context.addIssue({
|
|
3983
|
-
code:
|
|
4215
|
+
code: z179.ZodIssueCode.custom,
|
|
3984
4216
|
path: ["ac_samples_per_interval"],
|
|
3985
4217
|
message: "ac_samples_per_interval is required for decade and octave AC analyses"
|
|
3986
4218
|
});
|
|
@@ -3988,72 +4220,72 @@ var simulation_experiment = z173.object({
|
|
|
3988
4220
|
}
|
|
3989
4221
|
}).describe("Defines a simulation experiment configuration");
|
|
3990
4222
|
expectTypesMatch(true);
|
|
3991
|
-
var simulation_parameter_sweep_coordinate =
|
|
3992
|
-
simulation_parameter_sweep_id:
|
|
3993
|
-
sweep_index:
|
|
3994
|
-
parameter_value:
|
|
4223
|
+
var simulation_parameter_sweep_coordinate = z180.object({
|
|
4224
|
+
simulation_parameter_sweep_id: z180.string(),
|
|
4225
|
+
sweep_index: z180.number().int().nonnegative(),
|
|
4226
|
+
parameter_value: z180.number(),
|
|
3995
4227
|
parameter_unit: simulation_parameter_unit
|
|
3996
4228
|
});
|
|
3997
4229
|
expectTypesMatch(true);
|
|
3998
|
-
var simulation_transient_voltage_graph =
|
|
3999
|
-
type:
|
|
4230
|
+
var simulation_transient_voltage_graph = z181.object({
|
|
4231
|
+
type: z181.literal("simulation_transient_voltage_graph"),
|
|
4000
4232
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4001
4233
|
"simulation_transient_voltage_graph"
|
|
4002
4234
|
),
|
|
4003
|
-
simulation_experiment_id:
|
|
4235
|
+
simulation_experiment_id: z181.string(),
|
|
4004
4236
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4005
|
-
timestamps_ms:
|
|
4006
|
-
voltage_levels:
|
|
4007
|
-
source_component_id:
|
|
4008
|
-
subcircuit_connectivity_map_key:
|
|
4237
|
+
timestamps_ms: z181.array(z181.number()).optional(),
|
|
4238
|
+
voltage_levels: z181.array(z181.number()),
|
|
4239
|
+
source_component_id: z181.string().optional(),
|
|
4240
|
+
subcircuit_connectivity_map_key: z181.string().optional(),
|
|
4009
4241
|
time_per_step: duration_ms,
|
|
4010
4242
|
start_time_ms: ms,
|
|
4011
4243
|
end_time_ms: ms,
|
|
4012
|
-
name:
|
|
4013
|
-
color:
|
|
4244
|
+
name: z181.string().optional(),
|
|
4245
|
+
color: z181.string().optional()
|
|
4014
4246
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
4015
4247
|
expectTypesMatch(true);
|
|
4016
|
-
var simulation_transient_current_graph =
|
|
4017
|
-
type:
|
|
4248
|
+
var simulation_transient_current_graph = z182.object({
|
|
4249
|
+
type: z182.literal("simulation_transient_current_graph"),
|
|
4018
4250
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4019
4251
|
"simulation_transient_current_graph"
|
|
4020
4252
|
),
|
|
4021
|
-
simulation_experiment_id:
|
|
4253
|
+
simulation_experiment_id: z182.string(),
|
|
4022
4254
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4023
|
-
timestamps_ms:
|
|
4024
|
-
current_levels:
|
|
4025
|
-
source_component_id:
|
|
4026
|
-
subcircuit_connectivity_map_key:
|
|
4255
|
+
timestamps_ms: z182.array(z182.number()).optional(),
|
|
4256
|
+
current_levels: z182.array(z182.number()),
|
|
4257
|
+
source_component_id: z182.string().optional(),
|
|
4258
|
+
subcircuit_connectivity_map_key: z182.string().optional(),
|
|
4027
4259
|
time_per_step: duration_ms,
|
|
4028
4260
|
start_time_ms: ms,
|
|
4029
4261
|
end_time_ms: ms,
|
|
4030
|
-
name:
|
|
4031
|
-
color:
|
|
4262
|
+
name: z182.string().optional(),
|
|
4263
|
+
color: z182.string().optional()
|
|
4032
4264
|
}).describe("Stores current measurements over time for a simulation");
|
|
4033
4265
|
expectTypesMatch(true);
|
|
4034
|
-
var simulation_switch =
|
|
4035
|
-
type:
|
|
4266
|
+
var simulation_switch = z183.object({
|
|
4267
|
+
type: z183.literal("simulation_switch"),
|
|
4036
4268
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
4037
|
-
source_component_id:
|
|
4269
|
+
source_component_id: z183.string().optional(),
|
|
4038
4270
|
closes_at: ms.optional(),
|
|
4039
4271
|
opens_at: ms.optional(),
|
|
4040
|
-
starts_closed:
|
|
4272
|
+
starts_closed: z183.boolean().optional(),
|
|
4041
4273
|
switching_frequency: frequency.optional()
|
|
4042
4274
|
}).describe("Defines a switch for simulation timing control");
|
|
4043
4275
|
expectTypesMatch(true);
|
|
4044
|
-
var simulation_voltage_probe =
|
|
4045
|
-
type:
|
|
4276
|
+
var simulation_voltage_probe = z184.object({
|
|
4277
|
+
type: z184.literal("simulation_voltage_probe"),
|
|
4046
4278
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
4047
4279
|
"simulation_voltage_probe"
|
|
4048
4280
|
),
|
|
4049
|
-
source_component_id:
|
|
4050
|
-
name:
|
|
4051
|
-
signal_input_source_port_id:
|
|
4052
|
-
signal_input_source_net_id:
|
|
4053
|
-
reference_input_source_port_id:
|
|
4054
|
-
reference_input_source_net_id:
|
|
4055
|
-
subcircuit_id:
|
|
4056
|
-
color:
|
|
4281
|
+
source_component_id: z184.string().optional(),
|
|
4282
|
+
name: z184.string().optional(),
|
|
4283
|
+
signal_input_source_port_id: z184.string().optional(),
|
|
4284
|
+
signal_input_source_net_id: z184.string().optional(),
|
|
4285
|
+
reference_input_source_port_id: z184.string().optional(),
|
|
4286
|
+
reference_input_source_net_id: z184.string().optional(),
|
|
4287
|
+
subcircuit_id: z184.string().optional(),
|
|
4288
|
+
color: z184.string().optional()
|
|
4057
4289
|
}).describe(
|
|
4058
4290
|
"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."
|
|
4059
4291
|
).superRefine((data, ctx) => {
|
|
@@ -4063,20 +4295,20 @@ var simulation_voltage_probe = z178.object({
|
|
|
4063
4295
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
4064
4296
|
if (has_ports && has_nets) {
|
|
4065
4297
|
ctx.addIssue({
|
|
4066
|
-
code:
|
|
4298
|
+
code: z184.ZodIssueCode.custom,
|
|
4067
4299
|
message: "Cannot mix port and net connections in a differential probe."
|
|
4068
4300
|
});
|
|
4069
4301
|
} else if (has_ports) {
|
|
4070
4302
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
4071
4303
|
ctx.addIssue({
|
|
4072
|
-
code:
|
|
4304
|
+
code: z184.ZodIssueCode.custom,
|
|
4073
4305
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
4074
4306
|
});
|
|
4075
4307
|
}
|
|
4076
4308
|
} else if (has_nets) {
|
|
4077
4309
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
4078
4310
|
ctx.addIssue({
|
|
4079
|
-
code:
|
|
4311
|
+
code: z184.ZodIssueCode.custom,
|
|
4080
4312
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
4081
4313
|
});
|
|
4082
4314
|
}
|
|
@@ -4084,26 +4316,26 @@ var simulation_voltage_probe = z178.object({
|
|
|
4084
4316
|
} else {
|
|
4085
4317
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
4086
4318
|
ctx.addIssue({
|
|
4087
|
-
code:
|
|
4319
|
+
code: z184.ZodIssueCode.custom,
|
|
4088
4320
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
4089
4321
|
});
|
|
4090
4322
|
}
|
|
4091
4323
|
}
|
|
4092
4324
|
});
|
|
4093
4325
|
expectTypesMatch(true);
|
|
4094
|
-
var simulation_current_probe =
|
|
4095
|
-
type:
|
|
4326
|
+
var simulation_current_probe = z185.object({
|
|
4327
|
+
type: z185.literal("simulation_current_probe"),
|
|
4096
4328
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
4097
4329
|
"simulation_current_probe"
|
|
4098
4330
|
),
|
|
4099
|
-
source_component_id:
|
|
4100
|
-
name:
|
|
4101
|
-
positive_source_port_id:
|
|
4102
|
-
negative_source_port_id:
|
|
4103
|
-
positive_source_net_id:
|
|
4104
|
-
negative_source_net_id:
|
|
4105
|
-
subcircuit_id:
|
|
4106
|
-
color:
|
|
4331
|
+
source_component_id: z185.string().optional(),
|
|
4332
|
+
name: z185.string().optional(),
|
|
4333
|
+
positive_source_port_id: z185.string().optional(),
|
|
4334
|
+
negative_source_port_id: z185.string().optional(),
|
|
4335
|
+
positive_source_net_id: z185.string().optional(),
|
|
4336
|
+
negative_source_net_id: z185.string().optional(),
|
|
4337
|
+
subcircuit_id: z185.string().optional(),
|
|
4338
|
+
color: z185.string().optional()
|
|
4107
4339
|
}).describe(
|
|
4108
4340
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
4109
4341
|
).superRefine((data, ctx) => {
|
|
@@ -4115,7 +4347,7 @@ var simulation_current_probe = z179.object({
|
|
|
4115
4347
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
4116
4348
|
if (hasPorts && hasNets) {
|
|
4117
4349
|
ctx.addIssue({
|
|
4118
|
-
code:
|
|
4350
|
+
code: z185.ZodIssueCode.custom,
|
|
4119
4351
|
message: "Cannot mix port and net connections in a current probe."
|
|
4120
4352
|
});
|
|
4121
4353
|
return;
|
|
@@ -4123,7 +4355,7 @@ var simulation_current_probe = z179.object({
|
|
|
4123
4355
|
if (hasPorts) {
|
|
4124
4356
|
if (!hasPositivePort || !hasNegativePort) {
|
|
4125
4357
|
ctx.addIssue({
|
|
4126
|
-
code:
|
|
4358
|
+
code: z185.ZodIssueCode.custom,
|
|
4127
4359
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
4128
4360
|
});
|
|
4129
4361
|
}
|
|
@@ -4132,109 +4364,109 @@ var simulation_current_probe = z179.object({
|
|
|
4132
4364
|
if (hasNets) {
|
|
4133
4365
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
4134
4366
|
ctx.addIssue({
|
|
4135
|
-
code:
|
|
4367
|
+
code: z185.ZodIssueCode.custom,
|
|
4136
4368
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
4137
4369
|
});
|
|
4138
4370
|
}
|
|
4139
4371
|
return;
|
|
4140
4372
|
}
|
|
4141
4373
|
ctx.addIssue({
|
|
4142
|
-
code:
|
|
4374
|
+
code: z185.ZodIssueCode.custom,
|
|
4143
4375
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
4144
4376
|
});
|
|
4145
4377
|
});
|
|
4146
4378
|
expectTypesMatch(true);
|
|
4147
4379
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
4148
|
-
type:
|
|
4380
|
+
type: z186.literal("simulation_unknown_experiment_error"),
|
|
4149
4381
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
4150
4382
|
"simulation_unknown_experiment_error"
|
|
4151
4383
|
),
|
|
4152
|
-
error_type:
|
|
4153
|
-
simulation_experiment_id:
|
|
4154
|
-
subcircuit_id:
|
|
4384
|
+
error_type: z186.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
4385
|
+
simulation_experiment_id: z186.string().optional(),
|
|
4386
|
+
subcircuit_id: z186.string().optional()
|
|
4155
4387
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
4156
4388
|
expectTypesMatch(true);
|
|
4157
|
-
var simulation_parameter_type =
|
|
4389
|
+
var simulation_parameter_type = z187.enum([
|
|
4158
4390
|
"resistance",
|
|
4159
4391
|
"capacitance",
|
|
4160
4392
|
"inductance",
|
|
4161
4393
|
"voltage",
|
|
4162
4394
|
"current"
|
|
4163
4395
|
]);
|
|
4164
|
-
var simulation_parameter_sweep_base =
|
|
4165
|
-
type:
|
|
4396
|
+
var simulation_parameter_sweep_base = z187.object({
|
|
4397
|
+
type: z187.literal("simulation_parameter_sweep"),
|
|
4166
4398
|
simulation_parameter_sweep_id: getZodPrefixedIdWithDefault(
|
|
4167
4399
|
"simulation_parameter_sweep"
|
|
4168
4400
|
),
|
|
4169
|
-
simulation_experiment_id:
|
|
4170
|
-
name:
|
|
4171
|
-
parameter_values:
|
|
4401
|
+
simulation_experiment_id: z187.string(),
|
|
4402
|
+
name: z187.string().optional(),
|
|
4403
|
+
parameter_values: z187.array(z187.number()).min(1),
|
|
4172
4404
|
parameter_unit: simulation_parameter_unit
|
|
4173
4405
|
});
|
|
4174
|
-
var simulation_parameter_sweep =
|
|
4406
|
+
var simulation_parameter_sweep = z187.discriminatedUnion("parameter_type", [
|
|
4175
4407
|
simulation_parameter_sweep_base.extend({
|
|
4176
|
-
parameter_type:
|
|
4177
|
-
resistor_source_component_id:
|
|
4408
|
+
parameter_type: z187.literal("resistance"),
|
|
4409
|
+
resistor_source_component_id: z187.string()
|
|
4178
4410
|
}),
|
|
4179
4411
|
simulation_parameter_sweep_base.extend({
|
|
4180
|
-
parameter_type:
|
|
4181
|
-
capacitor_source_component_id:
|
|
4412
|
+
parameter_type: z187.literal("capacitance"),
|
|
4413
|
+
capacitor_source_component_id: z187.string()
|
|
4182
4414
|
}),
|
|
4183
4415
|
simulation_parameter_sweep_base.extend({
|
|
4184
|
-
parameter_type:
|
|
4185
|
-
inductor_source_component_id:
|
|
4416
|
+
parameter_type: z187.literal("inductance"),
|
|
4417
|
+
inductor_source_component_id: z187.string()
|
|
4186
4418
|
}),
|
|
4187
4419
|
simulation_parameter_sweep_base.extend({
|
|
4188
|
-
parameter_type:
|
|
4189
|
-
source_net_id:
|
|
4420
|
+
parameter_type: z187.literal("voltage"),
|
|
4421
|
+
source_net_id: z187.string()
|
|
4190
4422
|
}),
|
|
4191
4423
|
simulation_parameter_sweep_base.extend({
|
|
4192
|
-
parameter_type:
|
|
4193
|
-
current_source_component_id:
|
|
4424
|
+
parameter_type: z187.literal("current"),
|
|
4425
|
+
current_source_component_id: z187.string()
|
|
4194
4426
|
})
|
|
4195
4427
|
]).describe("Repeats a simulation experiment over component parameter values");
|
|
4196
4428
|
expectTypesMatch(
|
|
4197
4429
|
true
|
|
4198
4430
|
);
|
|
4199
|
-
var simulation_dc_operating_point_voltage =
|
|
4200
|
-
type:
|
|
4431
|
+
var simulation_dc_operating_point_voltage = z188.object({
|
|
4432
|
+
type: z188.literal("simulation_dc_operating_point_voltage"),
|
|
4201
4433
|
simulation_dc_operating_point_voltage_id: getZodPrefixedIdWithDefault(
|
|
4202
4434
|
"simulation_dc_operating_point_voltage"
|
|
4203
4435
|
),
|
|
4204
|
-
simulation_experiment_id:
|
|
4436
|
+
simulation_experiment_id: z188.string(),
|
|
4205
4437
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4206
|
-
simulation_voltage_probe_id:
|
|
4207
|
-
voltage:
|
|
4208
|
-
name:
|
|
4209
|
-
color:
|
|
4438
|
+
simulation_voltage_probe_id: z188.string(),
|
|
4439
|
+
voltage: z188.number(),
|
|
4440
|
+
name: z188.string().optional(),
|
|
4441
|
+
color: z188.string().optional()
|
|
4210
4442
|
});
|
|
4211
4443
|
expectTypesMatch(true);
|
|
4212
|
-
var simulation_dc_operating_point_current =
|
|
4213
|
-
type:
|
|
4444
|
+
var simulation_dc_operating_point_current = z189.object({
|
|
4445
|
+
type: z189.literal("simulation_dc_operating_point_current"),
|
|
4214
4446
|
simulation_dc_operating_point_current_id: getZodPrefixedIdWithDefault(
|
|
4215
4447
|
"simulation_dc_operating_point_current"
|
|
4216
4448
|
),
|
|
4217
|
-
simulation_experiment_id:
|
|
4449
|
+
simulation_experiment_id: z189.string(),
|
|
4218
4450
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4219
|
-
simulation_current_probe_id:
|
|
4220
|
-
current:
|
|
4221
|
-
name:
|
|
4222
|
-
color:
|
|
4451
|
+
simulation_current_probe_id: z189.string(),
|
|
4452
|
+
current: z189.number(),
|
|
4453
|
+
name: z189.string().optional(),
|
|
4454
|
+
color: z189.string().optional()
|
|
4223
4455
|
});
|
|
4224
4456
|
expectTypesMatch(true);
|
|
4225
|
-
var simulation_dc_sweep_voltage_graph =
|
|
4226
|
-
type:
|
|
4457
|
+
var simulation_dc_sweep_voltage_graph = z190.object({
|
|
4458
|
+
type: z190.literal("simulation_dc_sweep_voltage_graph"),
|
|
4227
4459
|
simulation_dc_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4228
4460
|
"simulation_dc_sweep_voltage_graph"
|
|
4229
4461
|
),
|
|
4230
|
-
simulation_experiment_id:
|
|
4462
|
+
simulation_experiment_id: z190.string(),
|
|
4231
4463
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4232
|
-
simulation_voltage_probe_id:
|
|
4233
|
-
sweep_values:
|
|
4464
|
+
simulation_voltage_probe_id: z190.string(),
|
|
4465
|
+
sweep_values: z190.array(z190.number()),
|
|
4234
4466
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4235
|
-
voltage_levels:
|
|
4236
|
-
name:
|
|
4237
|
-
color:
|
|
4467
|
+
voltage_levels: z190.array(z190.number()),
|
|
4468
|
+
name: z190.string().optional(),
|
|
4469
|
+
color: z190.string().optional()
|
|
4238
4470
|
}).refine(
|
|
4239
4471
|
(graph) => graph.sweep_values.length === graph.voltage_levels.length,
|
|
4240
4472
|
{
|
|
@@ -4242,19 +4474,19 @@ var simulation_dc_sweep_voltage_graph = z184.object({
|
|
|
4242
4474
|
}
|
|
4243
4475
|
);
|
|
4244
4476
|
expectTypesMatch(true);
|
|
4245
|
-
var simulation_dc_sweep_current_graph =
|
|
4246
|
-
type:
|
|
4477
|
+
var simulation_dc_sweep_current_graph = z191.object({
|
|
4478
|
+
type: z191.literal("simulation_dc_sweep_current_graph"),
|
|
4247
4479
|
simulation_dc_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4248
4480
|
"simulation_dc_sweep_current_graph"
|
|
4249
4481
|
),
|
|
4250
|
-
simulation_experiment_id:
|
|
4482
|
+
simulation_experiment_id: z191.string(),
|
|
4251
4483
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4252
|
-
simulation_current_probe_id:
|
|
4253
|
-
sweep_values:
|
|
4484
|
+
simulation_current_probe_id: z191.string(),
|
|
4485
|
+
sweep_values: z191.array(z191.number()),
|
|
4254
4486
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4255
|
-
current_levels:
|
|
4256
|
-
name:
|
|
4257
|
-
color:
|
|
4487
|
+
current_levels: z191.array(z191.number()),
|
|
4488
|
+
name: z191.string().optional(),
|
|
4489
|
+
color: z191.string().optional()
|
|
4258
4490
|
}).refine(
|
|
4259
4491
|
(graph) => graph.sweep_values.length === graph.current_levels.length,
|
|
4260
4492
|
{
|
|
@@ -4262,23 +4494,23 @@ var simulation_dc_sweep_current_graph = z185.object({
|
|
|
4262
4494
|
}
|
|
4263
4495
|
);
|
|
4264
4496
|
expectTypesMatch(true);
|
|
4265
|
-
var simulation_complex_sample =
|
|
4266
|
-
re:
|
|
4267
|
-
im:
|
|
4497
|
+
var simulation_complex_sample = z192.object({
|
|
4498
|
+
re: z192.number(),
|
|
4499
|
+
im: z192.number()
|
|
4268
4500
|
});
|
|
4269
4501
|
expectTypesMatch(true);
|
|
4270
|
-
var simulation_ac_sweep_voltage_graph =
|
|
4271
|
-
type:
|
|
4502
|
+
var simulation_ac_sweep_voltage_graph = z193.object({
|
|
4503
|
+
type: z193.literal("simulation_ac_sweep_voltage_graph"),
|
|
4272
4504
|
simulation_ac_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4273
4505
|
"simulation_ac_sweep_voltage_graph"
|
|
4274
4506
|
),
|
|
4275
|
-
simulation_experiment_id:
|
|
4507
|
+
simulation_experiment_id: z193.string(),
|
|
4276
4508
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4277
|
-
simulation_voltage_probe_id:
|
|
4278
|
-
frequencies_hz:
|
|
4279
|
-
complex_voltages:
|
|
4280
|
-
name:
|
|
4281
|
-
color:
|
|
4509
|
+
simulation_voltage_probe_id: z193.string(),
|
|
4510
|
+
frequencies_hz: z193.array(z193.number()),
|
|
4511
|
+
complex_voltages: z193.array(simulation_complex_sample),
|
|
4512
|
+
name: z193.string().optional(),
|
|
4513
|
+
color: z193.string().optional()
|
|
4282
4514
|
}).refine(
|
|
4283
4515
|
(graph) => graph.frequencies_hz.length === graph.complex_voltages.length,
|
|
4284
4516
|
{
|
|
@@ -4286,18 +4518,18 @@ var simulation_ac_sweep_voltage_graph = z187.object({
|
|
|
4286
4518
|
}
|
|
4287
4519
|
);
|
|
4288
4520
|
expectTypesMatch(true);
|
|
4289
|
-
var simulation_ac_sweep_current_graph =
|
|
4290
|
-
type:
|
|
4521
|
+
var simulation_ac_sweep_current_graph = z194.object({
|
|
4522
|
+
type: z194.literal("simulation_ac_sweep_current_graph"),
|
|
4291
4523
|
simulation_ac_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4292
4524
|
"simulation_ac_sweep_current_graph"
|
|
4293
4525
|
),
|
|
4294
|
-
simulation_experiment_id:
|
|
4526
|
+
simulation_experiment_id: z194.string(),
|
|
4295
4527
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4296
|
-
simulation_current_probe_id:
|
|
4297
|
-
frequencies_hz:
|
|
4298
|
-
complex_currents:
|
|
4299
|
-
name:
|
|
4300
|
-
color:
|
|
4528
|
+
simulation_current_probe_id: z194.string(),
|
|
4529
|
+
frequencies_hz: z194.array(z194.number()),
|
|
4530
|
+
complex_currents: z194.array(simulation_complex_sample),
|
|
4531
|
+
name: z194.string().optional(),
|
|
4532
|
+
color: z194.string().optional()
|
|
4301
4533
|
}).refine(
|
|
4302
4534
|
(graph) => graph.frequencies_hz.length === graph.complex_currents.length,
|
|
4303
4535
|
{
|
|
@@ -4305,45 +4537,45 @@ var simulation_ac_sweep_current_graph = z188.object({
|
|
|
4305
4537
|
}
|
|
4306
4538
|
);
|
|
4307
4539
|
expectTypesMatch(true);
|
|
4308
|
-
var simulation_op_amp =
|
|
4309
|
-
type:
|
|
4540
|
+
var simulation_op_amp = z195.object({
|
|
4541
|
+
type: z195.literal("simulation_op_amp"),
|
|
4310
4542
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
4311
|
-
source_component_id:
|
|
4312
|
-
inverting_input_source_port_id:
|
|
4313
|
-
non_inverting_input_source_port_id:
|
|
4314
|
-
output_source_port_id:
|
|
4315
|
-
positive_supply_source_port_id:
|
|
4316
|
-
negative_supply_source_port_id:
|
|
4543
|
+
source_component_id: z195.string().optional(),
|
|
4544
|
+
inverting_input_source_port_id: z195.string(),
|
|
4545
|
+
non_inverting_input_source_port_id: z195.string(),
|
|
4546
|
+
output_source_port_id: z195.string(),
|
|
4547
|
+
positive_supply_source_port_id: z195.string(),
|
|
4548
|
+
negative_supply_source_port_id: z195.string()
|
|
4317
4549
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
4318
4550
|
expectTypesMatch(true);
|
|
4319
|
-
var simulation_spice_subcircuit =
|
|
4320
|
-
type:
|
|
4551
|
+
var simulation_spice_subcircuit = z196.object({
|
|
4552
|
+
type: z196.literal("simulation_spice_subcircuit"),
|
|
4321
4553
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
4322
4554
|
"simulation_spice_subcircuit"
|
|
4323
4555
|
),
|
|
4324
|
-
source_component_id:
|
|
4325
|
-
spice_pin_to_source_port_map:
|
|
4326
|
-
subcircuit_source:
|
|
4556
|
+
source_component_id: z196.string(),
|
|
4557
|
+
spice_pin_to_source_port_map: z196.record(z196.string(), z196.string()),
|
|
4558
|
+
subcircuit_source: z196.string()
|
|
4327
4559
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
4328
4560
|
expectTypesMatch(
|
|
4329
4561
|
true
|
|
4330
4562
|
);
|
|
4331
4563
|
var hasValue = (value) => value !== void 0;
|
|
4332
|
-
var simulation_oscilloscope_trace =
|
|
4333
|
-
type:
|
|
4564
|
+
var simulation_oscilloscope_trace = z197.object({
|
|
4565
|
+
type: z197.literal("simulation_oscilloscope_trace"),
|
|
4334
4566
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
4335
4567
|
"simulation_oscilloscope_trace"
|
|
4336
4568
|
),
|
|
4337
|
-
simulation_transient_voltage_graph_id:
|
|
4338
|
-
simulation_transient_current_graph_id:
|
|
4339
|
-
simulation_voltage_probe_id:
|
|
4340
|
-
simulation_current_probe_id:
|
|
4341
|
-
display_name:
|
|
4342
|
-
color:
|
|
4343
|
-
display_center_value:
|
|
4344
|
-
display_center_offset_divs:
|
|
4345
|
-
volts_per_div:
|
|
4346
|
-
amps_per_div:
|
|
4569
|
+
simulation_transient_voltage_graph_id: z197.string().optional(),
|
|
4570
|
+
simulation_transient_current_graph_id: z197.string().optional(),
|
|
4571
|
+
simulation_voltage_probe_id: z197.string().optional(),
|
|
4572
|
+
simulation_current_probe_id: z197.string().optional(),
|
|
4573
|
+
display_name: z197.string().optional(),
|
|
4574
|
+
color: z197.string().optional(),
|
|
4575
|
+
display_center_value: z197.number().optional(),
|
|
4576
|
+
display_center_offset_divs: z197.number().optional(),
|
|
4577
|
+
volts_per_div: z197.number().positive().optional(),
|
|
4578
|
+
amps_per_div: z197.number().positive().optional()
|
|
4347
4579
|
}).describe(
|
|
4348
4580
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
4349
4581
|
).superRefine((data, ctx) => {
|
|
@@ -4357,25 +4589,25 @@ var simulation_oscilloscope_trace = z191.object({
|
|
|
4357
4589
|
].filter(hasValue).length;
|
|
4358
4590
|
if (voltageReferences + currentReferences !== 1) {
|
|
4359
4591
|
ctx.addIssue({
|
|
4360
|
-
code:
|
|
4592
|
+
code: z197.ZodIssueCode.custom,
|
|
4361
4593
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
4362
4594
|
});
|
|
4363
4595
|
}
|
|
4364
4596
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
4365
4597
|
ctx.addIssue({
|
|
4366
|
-
code:
|
|
4598
|
+
code: z197.ZodIssueCode.custom,
|
|
4367
4599
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
4368
4600
|
});
|
|
4369
4601
|
}
|
|
4370
4602
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
4371
4603
|
ctx.addIssue({
|
|
4372
|
-
code:
|
|
4604
|
+
code: z197.ZodIssueCode.custom,
|
|
4373
4605
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
4374
4606
|
});
|
|
4375
4607
|
}
|
|
4376
4608
|
});
|
|
4377
4609
|
expectTypesMatch(true);
|
|
4378
|
-
var any_circuit_element =
|
|
4610
|
+
var any_circuit_element = z198.union([
|
|
4379
4611
|
source_trace,
|
|
4380
4612
|
source_port,
|
|
4381
4613
|
source_component_internal_connection,
|
|
@@ -4420,12 +4652,14 @@ var any_circuit_element = z192.union([
|
|
|
4420
4652
|
source_component_misconfigured_error,
|
|
4421
4653
|
source_ambiguous_port_reference,
|
|
4422
4654
|
pcb_component,
|
|
4655
|
+
pcb_debug_object,
|
|
4423
4656
|
pcb_hole,
|
|
4424
4657
|
pcb_missing_footprint_error,
|
|
4425
4658
|
external_footprint_load_error,
|
|
4426
4659
|
circuit_json_footprint_load_error,
|
|
4427
4660
|
pcb_manual_edit_conflict_warning,
|
|
4428
4661
|
pcb_connector_not_in_accessible_orientation_warning,
|
|
4662
|
+
pcb_component_missing_courtyard_warning,
|
|
4429
4663
|
supplier_footprint_mismatch_warning,
|
|
4430
4664
|
pcb_plated_hole,
|
|
4431
4665
|
pcb_keepout,
|
|
@@ -4435,6 +4669,7 @@ var any_circuit_element = z192.union([
|
|
|
4435
4669
|
pcb_trace,
|
|
4436
4670
|
pcb_trace_warning,
|
|
4437
4671
|
pcb_trace_too_long_warning,
|
|
4672
|
+
pcb_trace_too_many_vias_warning,
|
|
4438
4673
|
pcb_via,
|
|
4439
4674
|
pcb_smtpad,
|
|
4440
4675
|
pcb_solder_paste,
|
|
@@ -4506,6 +4741,7 @@ var any_circuit_element = z192.union([
|
|
|
4506
4741
|
schematic_voltage_probe,
|
|
4507
4742
|
schematic_manual_edit_conflict_warning,
|
|
4508
4743
|
schematic_component_overlap_warning,
|
|
4744
|
+
schematic_component_styling_warning,
|
|
4509
4745
|
schematic_element_outside_sheet_warning,
|
|
4510
4746
|
schematic_group,
|
|
4511
4747
|
schematic_sheet,
|
|
@@ -7189,17 +7425,17 @@ var parseObjBounds = (objText) => {
|
|
|
7189
7425
|
const [, xStr, yStr, zStr] = trimmed.split(/\s+/, 4);
|
|
7190
7426
|
const x = Number(xStr);
|
|
7191
7427
|
const y = Number(yStr);
|
|
7192
|
-
const
|
|
7193
|
-
if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(
|
|
7428
|
+
const z202 = Number(zStr);
|
|
7429
|
+
if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(z202)) {
|
|
7194
7430
|
continue;
|
|
7195
7431
|
}
|
|
7196
7432
|
vertexCount += 1;
|
|
7197
7433
|
minX = Math.min(minX, x);
|
|
7198
7434
|
minY = Math.min(minY, y);
|
|
7199
|
-
minZ = Math.min(minZ,
|
|
7435
|
+
minZ = Math.min(minZ, z202);
|
|
7200
7436
|
maxX = Math.max(maxX, x);
|
|
7201
7437
|
maxY = Math.max(maxY, y);
|
|
7202
|
-
maxZ = Math.max(maxZ,
|
|
7438
|
+
maxZ = Math.max(maxZ, z202);
|
|
7203
7439
|
}
|
|
7204
7440
|
if (vertexCount === 0) return null;
|
|
7205
7441
|
return {
|
|
@@ -7317,18 +7553,18 @@ async function fetchEasyEDAComponent(jlcpcbPartNumber, {
|
|
|
7317
7553
|
}
|
|
7318
7554
|
|
|
7319
7555
|
// lib/schemas/easy-eda-json-schema.ts
|
|
7320
|
-
import { z as
|
|
7556
|
+
import { z as z201 } from "zod";
|
|
7321
7557
|
|
|
7322
7558
|
// lib/schemas/package-detail-shape-schema.ts
|
|
7323
|
-
import { z as
|
|
7324
|
-
var safeNumber = (defaultValue = 0) =>
|
|
7559
|
+
import { z as z199 } from "zod";
|
|
7560
|
+
var safeNumber = (defaultValue = 0) => z199.union([z199.number(), z199.string()]).transform((val) => {
|
|
7325
7561
|
const num = Number(val);
|
|
7326
7562
|
return Number.isNaN(num) ? defaultValue : num;
|
|
7327
7563
|
}).default(defaultValue);
|
|
7328
|
-
var tenthmil =
|
|
7564
|
+
var tenthmil = z199.union([z199.number(), z199.string()]).optional().transform(
|
|
7329
7565
|
(n) => typeof n === "string" && n.endsWith("mil") ? n : `${Number.parseFloat(n) * 10}mil`
|
|
7330
|
-
).pipe(
|
|
7331
|
-
var PointSchema =
|
|
7566
|
+
).pipe(z199.string());
|
|
7567
|
+
var PointSchema = z199.any().transform((p) => {
|
|
7332
7568
|
if (Array.isArray(p)) {
|
|
7333
7569
|
const [x, y] = p;
|
|
7334
7570
|
return { x, y };
|
|
@@ -7338,106 +7574,106 @@ var PointSchema = z193.any().transform((p) => {
|
|
|
7338
7574
|
}
|
|
7339
7575
|
throw new Error(`Invalid point: ${p}`);
|
|
7340
7576
|
}).pipe(
|
|
7341
|
-
|
|
7342
|
-
x:
|
|
7343
|
-
y:
|
|
7577
|
+
z199.object({
|
|
7578
|
+
x: z199.number(),
|
|
7579
|
+
y: z199.number()
|
|
7344
7580
|
})
|
|
7345
7581
|
);
|
|
7346
|
-
var BaseShapeSchema =
|
|
7347
|
-
type:
|
|
7348
|
-
id:
|
|
7349
|
-
layer:
|
|
7582
|
+
var BaseShapeSchema = z199.object({
|
|
7583
|
+
type: z199.string(),
|
|
7584
|
+
id: z199.string().optional(),
|
|
7585
|
+
layer: z199.coerce.number().optional()
|
|
7350
7586
|
});
|
|
7351
7587
|
var TrackSchema = BaseShapeSchema.extend({
|
|
7352
|
-
type:
|
|
7353
|
-
width:
|
|
7354
|
-
points:
|
|
7588
|
+
type: z199.literal("TRACK"),
|
|
7589
|
+
width: z199.coerce.number(),
|
|
7590
|
+
points: z199.array(PointSchema)
|
|
7355
7591
|
});
|
|
7356
7592
|
var PadSchema = BaseShapeSchema.extend({
|
|
7357
|
-
type:
|
|
7358
|
-
shape:
|
|
7359
|
-
center:
|
|
7593
|
+
type: z199.literal("PAD"),
|
|
7594
|
+
shape: z199.enum(["RECT", "ELLIPSE", "OVAL", "POLYGON"]),
|
|
7595
|
+
center: z199.object({
|
|
7360
7596
|
x: tenthmil,
|
|
7361
7597
|
y: tenthmil
|
|
7362
7598
|
}),
|
|
7363
7599
|
width: tenthmil,
|
|
7364
7600
|
height: tenthmil,
|
|
7365
|
-
layermask:
|
|
7366
|
-
net:
|
|
7367
|
-
number:
|
|
7601
|
+
layermask: z199.number(),
|
|
7602
|
+
net: z199.union([z199.string(), z199.number()]).optional(),
|
|
7603
|
+
number: z199.union([z199.string(), z199.number()]),
|
|
7368
7604
|
holeRadius: tenthmil,
|
|
7369
|
-
points:
|
|
7605
|
+
points: z199.array(PointSchema).optional(),
|
|
7370
7606
|
rotation: safeNumber(0),
|
|
7371
7607
|
// Will default to 0 if NaN or missing
|
|
7372
|
-
plated:
|
|
7608
|
+
plated: z199.boolean()
|
|
7373
7609
|
});
|
|
7374
7610
|
var ArcSchema = BaseShapeSchema.extend({
|
|
7375
|
-
type:
|
|
7376
|
-
width:
|
|
7611
|
+
type: z199.literal("ARC"),
|
|
7612
|
+
width: z199.number(),
|
|
7377
7613
|
start: PointSchema,
|
|
7378
7614
|
end: PointSchema,
|
|
7379
|
-
radiusX:
|
|
7380
|
-
radiusY:
|
|
7381
|
-
largeArc:
|
|
7382
|
-
sweepDirection:
|
|
7615
|
+
radiusX: z199.number(),
|
|
7616
|
+
radiusY: z199.number(),
|
|
7617
|
+
largeArc: z199.boolean(),
|
|
7618
|
+
sweepDirection: z199.enum(["CW", "CCW"])
|
|
7383
7619
|
});
|
|
7384
7620
|
var CircleSchema = BaseShapeSchema.extend({
|
|
7385
|
-
type:
|
|
7621
|
+
type: z199.literal("CIRCLE"),
|
|
7386
7622
|
center: PointSchema,
|
|
7387
|
-
radius:
|
|
7388
|
-
width:
|
|
7623
|
+
radius: z199.number(),
|
|
7624
|
+
width: z199.number()
|
|
7389
7625
|
});
|
|
7390
7626
|
var SolidRegionSchema = BaseShapeSchema.extend({
|
|
7391
|
-
type:
|
|
7392
|
-
layermask:
|
|
7393
|
-
pathData:
|
|
7394
|
-
points:
|
|
7395
|
-
fillStyle:
|
|
7627
|
+
type: z199.literal("SOLIDREGION"),
|
|
7628
|
+
layermask: z199.number(),
|
|
7629
|
+
pathData: z199.string(),
|
|
7630
|
+
points: z199.array(PointSchema),
|
|
7631
|
+
fillStyle: z199.string().default("none")
|
|
7396
7632
|
});
|
|
7397
7633
|
var SVGNodeSchema = BaseShapeSchema.extend({
|
|
7398
|
-
type:
|
|
7399
|
-
svgData:
|
|
7400
|
-
gId:
|
|
7401
|
-
nodeName:
|
|
7402
|
-
nodeType:
|
|
7403
|
-
layerid:
|
|
7404
|
-
attrs:
|
|
7405
|
-
childNodes:
|
|
7634
|
+
type: z199.literal("SVGNODE"),
|
|
7635
|
+
svgData: z199.object({
|
|
7636
|
+
gId: z199.string(),
|
|
7637
|
+
nodeName: z199.string(),
|
|
7638
|
+
nodeType: z199.number(),
|
|
7639
|
+
layerid: z199.string(),
|
|
7640
|
+
attrs: z199.record(z199.string(), z199.string()),
|
|
7641
|
+
childNodes: z199.array(z199.unknown())
|
|
7406
7642
|
})
|
|
7407
7643
|
});
|
|
7408
7644
|
var HoleSchema = BaseShapeSchema.extend({
|
|
7409
|
-
type:
|
|
7645
|
+
type: z199.literal("HOLE"),
|
|
7410
7646
|
center: PointSchema,
|
|
7411
|
-
radius:
|
|
7647
|
+
radius: z199.number()
|
|
7412
7648
|
});
|
|
7413
7649
|
var ViaSchema = BaseShapeSchema.extend({
|
|
7414
|
-
type:
|
|
7650
|
+
type: z199.literal("VIA"),
|
|
7415
7651
|
center: PointSchema,
|
|
7416
|
-
outerDiameter:
|
|
7417
|
-
holeRadius:
|
|
7652
|
+
outerDiameter: z199.number(),
|
|
7653
|
+
holeRadius: z199.number()
|
|
7418
7654
|
});
|
|
7419
7655
|
var RectSchema = BaseShapeSchema.extend({
|
|
7420
|
-
type:
|
|
7656
|
+
type: z199.literal("RECT"),
|
|
7421
7657
|
x: tenthmil,
|
|
7422
7658
|
y: tenthmil,
|
|
7423
7659
|
width: tenthmil,
|
|
7424
7660
|
height: tenthmil,
|
|
7425
|
-
lineWidth:
|
|
7426
|
-
fillStyle:
|
|
7427
|
-
rotation:
|
|
7661
|
+
lineWidth: z199.number(),
|
|
7662
|
+
fillStyle: z199.string().default("none"),
|
|
7663
|
+
rotation: z199.number().optional()
|
|
7428
7664
|
});
|
|
7429
7665
|
var TextSchema = BaseShapeSchema.extend({
|
|
7430
|
-
type:
|
|
7431
|
-
text:
|
|
7666
|
+
type: z199.literal("TEXT"),
|
|
7667
|
+
text: z199.string(),
|
|
7432
7668
|
x: tenthmil,
|
|
7433
7669
|
y: tenthmil,
|
|
7434
|
-
size_mm:
|
|
7435
|
-
rotation:
|
|
7436
|
-
layer:
|
|
7437
|
-
textAnchor:
|
|
7438
|
-
font:
|
|
7670
|
+
size_mm: z199.number(),
|
|
7671
|
+
rotation: z199.number().optional(),
|
|
7672
|
+
layer: z199.number().optional(),
|
|
7673
|
+
textAnchor: z199.enum(["L", "C", "R", ""]).optional().transform((val) => val === "" ? void 0 : val),
|
|
7674
|
+
font: z199.string().optional()
|
|
7439
7675
|
});
|
|
7440
|
-
var PackageDetailShapeSchema =
|
|
7676
|
+
var PackageDetailShapeSchema = z199.discriminatedUnion("type", [
|
|
7441
7677
|
TrackSchema,
|
|
7442
7678
|
PadSchema,
|
|
7443
7679
|
ArcSchema,
|
|
@@ -7459,9 +7695,9 @@ var pairs = (arr) => {
|
|
|
7459
7695
|
var parsePoints = (pointsStr) => pairs(
|
|
7460
7696
|
pointsStr.trim().split(" ").map((n) => Number(n))
|
|
7461
7697
|
);
|
|
7462
|
-
var ShapeItemSchema =
|
|
7463
|
-
type:
|
|
7464
|
-
data:
|
|
7698
|
+
var ShapeItemSchema = z199.object({
|
|
7699
|
+
type: z199.string(),
|
|
7700
|
+
data: z199.string()
|
|
7465
7701
|
}).transform((shape) => {
|
|
7466
7702
|
switch (shape.type) {
|
|
7467
7703
|
case "TRACK": {
|
|
@@ -7642,23 +7878,23 @@ var ShapeItemSchema = z193.object({
|
|
|
7642
7878
|
throw new Error(`Unknown shape type: ${shape.type}`);
|
|
7643
7879
|
}
|
|
7644
7880
|
}).pipe(PackageDetailShapeSchema);
|
|
7645
|
-
var ShapesArraySchema =
|
|
7881
|
+
var ShapesArraySchema = z199.array(ShapeItemSchema);
|
|
7646
7882
|
|
|
7647
7883
|
// lib/schemas/single-letter-shape-schema.ts
|
|
7648
|
-
import { z as
|
|
7649
|
-
var PointSchema2 =
|
|
7650
|
-
x:
|
|
7651
|
-
y:
|
|
7884
|
+
import { z as z200 } from "zod";
|
|
7885
|
+
var PointSchema2 = z200.object({
|
|
7886
|
+
x: z200.number(),
|
|
7887
|
+
y: z200.number()
|
|
7652
7888
|
});
|
|
7653
|
-
var RectangleShapeOutputSchema =
|
|
7654
|
-
type:
|
|
7889
|
+
var RectangleShapeOutputSchema = z200.object({
|
|
7890
|
+
type: z200.literal("RECTANGLE"),
|
|
7655
7891
|
position: PointSchema2,
|
|
7656
|
-
width:
|
|
7657
|
-
height:
|
|
7658
|
-
color:
|
|
7659
|
-
lineWidth:
|
|
7660
|
-
fillColor:
|
|
7661
|
-
id:
|
|
7892
|
+
width: z200.number(),
|
|
7893
|
+
height: z200.number(),
|
|
7894
|
+
color: z200.string(),
|
|
7895
|
+
lineWidth: z200.number(),
|
|
7896
|
+
fillColor: z200.string().optional(),
|
|
7897
|
+
id: z200.string()
|
|
7662
7898
|
});
|
|
7663
7899
|
var parseRectangle = (str) => {
|
|
7664
7900
|
const [, x, y, , , width, height, color, lineWidth, , fillColor, id] = str.split("~");
|
|
@@ -7673,16 +7909,16 @@ var parseRectangle = (str) => {
|
|
|
7673
7909
|
id
|
|
7674
7910
|
};
|
|
7675
7911
|
};
|
|
7676
|
-
var RectangleShapeSchema =
|
|
7677
|
-
var EllipseShapeOutputSchema =
|
|
7678
|
-
type:
|
|
7912
|
+
var RectangleShapeSchema = z200.string().startsWith("R~").transform(parseRectangle).pipe(RectangleShapeOutputSchema);
|
|
7913
|
+
var EllipseShapeOutputSchema = z200.object({
|
|
7914
|
+
type: z200.literal("ELLIPSE"),
|
|
7679
7915
|
center: PointSchema2,
|
|
7680
|
-
radiusX:
|
|
7681
|
-
radiusY:
|
|
7682
|
-
color:
|
|
7683
|
-
lineWidth:
|
|
7684
|
-
fillColor:
|
|
7685
|
-
id:
|
|
7916
|
+
radiusX: z200.number(),
|
|
7917
|
+
radiusY: z200.number(),
|
|
7918
|
+
color: z200.string(),
|
|
7919
|
+
lineWidth: z200.number(),
|
|
7920
|
+
fillColor: z200.string().optional(),
|
|
7921
|
+
id: z200.string()
|
|
7686
7922
|
});
|
|
7687
7923
|
var parseEllipse = (str) => {
|
|
7688
7924
|
const [, x, y, radiusX, radiusY, color, lineWidth, , fillColor, id] = str.split("~");
|
|
@@ -7697,17 +7933,17 @@ var parseEllipse = (str) => {
|
|
|
7697
7933
|
id
|
|
7698
7934
|
};
|
|
7699
7935
|
};
|
|
7700
|
-
var EllipseShapeSchema =
|
|
7701
|
-
var ArcShapeOutputSchema =
|
|
7702
|
-
type:
|
|
7703
|
-
pathData:
|
|
7936
|
+
var EllipseShapeSchema = z200.string().startsWith("E~").transform(parseEllipse).pipe(EllipseShapeOutputSchema);
|
|
7937
|
+
var ArcShapeOutputSchema = z200.object({
|
|
7938
|
+
type: z200.literal("ARC"),
|
|
7939
|
+
pathData: z200.string(),
|
|
7704
7940
|
start: PointSchema2,
|
|
7705
7941
|
end: PointSchema2,
|
|
7706
|
-
radius:
|
|
7707
|
-
sweepFlag:
|
|
7708
|
-
color:
|
|
7709
|
-
lineWidth:
|
|
7710
|
-
id:
|
|
7942
|
+
radius: z200.number(),
|
|
7943
|
+
sweepFlag: z200.boolean(),
|
|
7944
|
+
color: z200.string(),
|
|
7945
|
+
lineWidth: z200.number(),
|
|
7946
|
+
id: z200.string()
|
|
7711
7947
|
});
|
|
7712
7948
|
var parseArc = (str) => {
|
|
7713
7949
|
const [, pathData, ...fields] = str.split("~");
|
|
@@ -7731,19 +7967,19 @@ var parseArc = (str) => {
|
|
|
7731
7967
|
id
|
|
7732
7968
|
};
|
|
7733
7969
|
};
|
|
7734
|
-
var ArcShapeSchema =
|
|
7735
|
-
var PinShapeOutputSchema =
|
|
7736
|
-
type:
|
|
7737
|
-
visibility:
|
|
7738
|
-
pinNumber:
|
|
7739
|
-
x:
|
|
7740
|
-
y:
|
|
7741
|
-
rotation:
|
|
7742
|
-
id:
|
|
7743
|
-
label:
|
|
7744
|
-
labelColor:
|
|
7745
|
-
path:
|
|
7746
|
-
arrow:
|
|
7970
|
+
var ArcShapeSchema = z200.string().startsWith("A~").transform(parseArc).pipe(ArcShapeOutputSchema);
|
|
7971
|
+
var PinShapeOutputSchema = z200.object({
|
|
7972
|
+
type: z200.literal("PIN"),
|
|
7973
|
+
visibility: z200.enum(["show", "hide", "none"]),
|
|
7974
|
+
pinNumber: z200.union([z200.string(), z200.number()]),
|
|
7975
|
+
x: z200.number(),
|
|
7976
|
+
y: z200.number(),
|
|
7977
|
+
rotation: z200.number(),
|
|
7978
|
+
id: z200.string(),
|
|
7979
|
+
label: z200.string(),
|
|
7980
|
+
labelColor: z200.string(),
|
|
7981
|
+
path: z200.string(),
|
|
7982
|
+
arrow: z200.string()
|
|
7747
7983
|
});
|
|
7748
7984
|
var parsePin = (pinString) => {
|
|
7749
7985
|
const parts = pinString.split("~");
|
|
@@ -7776,13 +8012,13 @@ var parsePin = (pinString) => {
|
|
|
7776
8012
|
arrow
|
|
7777
8013
|
};
|
|
7778
8014
|
};
|
|
7779
|
-
var PinShapeSchema =
|
|
7780
|
-
var PolylineShapeOutputSchema =
|
|
7781
|
-
type:
|
|
7782
|
-
points:
|
|
7783
|
-
color:
|
|
7784
|
-
lineWidth:
|
|
7785
|
-
id:
|
|
8015
|
+
var PinShapeSchema = z200.string().startsWith("P~").transform(parsePin).pipe(PinShapeOutputSchema);
|
|
8016
|
+
var PolylineShapeOutputSchema = z200.object({
|
|
8017
|
+
type: z200.literal("POLYLINE"),
|
|
8018
|
+
points: z200.array(PointSchema2),
|
|
8019
|
+
color: z200.string(),
|
|
8020
|
+
lineWidth: z200.number(),
|
|
8021
|
+
id: z200.string()
|
|
7786
8022
|
});
|
|
7787
8023
|
var parsePoints2 = (pointsStr) => {
|
|
7788
8024
|
return pointsStr.split(" ").reduce((acc, value, index) => {
|
|
@@ -7805,14 +8041,14 @@ var parsePolyline = (str) => {
|
|
|
7805
8041
|
id
|
|
7806
8042
|
};
|
|
7807
8043
|
};
|
|
7808
|
-
var PolylineShapeSchema =
|
|
7809
|
-
var PolygonShapeOutputSchema =
|
|
7810
|
-
type:
|
|
7811
|
-
points:
|
|
7812
|
-
fillColor:
|
|
7813
|
-
lineWidth:
|
|
7814
|
-
lineColor:
|
|
7815
|
-
id:
|
|
8044
|
+
var PolylineShapeSchema = z200.string().startsWith("PL~").transform(parsePolyline).pipe(PolylineShapeOutputSchema);
|
|
8045
|
+
var PolygonShapeOutputSchema = z200.object({
|
|
8046
|
+
type: z200.literal("POLYGON"),
|
|
8047
|
+
points: z200.array(PointSchema2),
|
|
8048
|
+
fillColor: z200.string(),
|
|
8049
|
+
lineWidth: z200.number(),
|
|
8050
|
+
lineColor: z200.string(),
|
|
8051
|
+
id: z200.string()
|
|
7816
8052
|
});
|
|
7817
8053
|
var parsePolygon = (str) => {
|
|
7818
8054
|
const [, ...rest] = str.split("~");
|
|
@@ -7826,14 +8062,14 @@ var parsePolygon = (str) => {
|
|
|
7826
8062
|
id
|
|
7827
8063
|
};
|
|
7828
8064
|
};
|
|
7829
|
-
var PolygonShapeSchema =
|
|
7830
|
-
var PathShapeOutputSchema =
|
|
7831
|
-
type:
|
|
7832
|
-
pathData:
|
|
7833
|
-
fillColor:
|
|
7834
|
-
strokeWidth:
|
|
7835
|
-
strokeColor:
|
|
7836
|
-
id:
|
|
8065
|
+
var PolygonShapeSchema = z200.string().startsWith("PG~").transform(parsePolygon).pipe(PolygonShapeOutputSchema);
|
|
8066
|
+
var PathShapeOutputSchema = z200.object({
|
|
8067
|
+
type: z200.literal("PATH"),
|
|
8068
|
+
pathData: z200.string(),
|
|
8069
|
+
fillColor: z200.string(),
|
|
8070
|
+
strokeWidth: z200.number(),
|
|
8071
|
+
strokeColor: z200.string(),
|
|
8072
|
+
id: z200.string()
|
|
7837
8073
|
});
|
|
7838
8074
|
var parsePath = (str) => {
|
|
7839
8075
|
const [, pathData, strokeColor, strokeWidth, , fillColor, id] = str.split("~");
|
|
@@ -7846,19 +8082,19 @@ var parsePath = (str) => {
|
|
|
7846
8082
|
id
|
|
7847
8083
|
};
|
|
7848
8084
|
};
|
|
7849
|
-
var PathShapeSchema =
|
|
7850
|
-
var IgnoredShapeOutputSchema =
|
|
7851
|
-
type:
|
|
7852
|
-
sourceType:
|
|
8085
|
+
var PathShapeSchema = z200.string().startsWith("PT~").transform(parsePath).pipe(PathShapeOutputSchema);
|
|
8086
|
+
var IgnoredShapeOutputSchema = z200.object({
|
|
8087
|
+
type: z200.literal("IGNORED"),
|
|
8088
|
+
sourceType: z200.enum(["AR", "I"])
|
|
7853
8089
|
});
|
|
7854
|
-
var IgnoredShapeSchema =
|
|
8090
|
+
var IgnoredShapeSchema = z200.string().transform((shape) => {
|
|
7855
8091
|
const sourceType = shape.startsWith("AR~") ? "AR" : shape.startsWith("I~") ? "I" : void 0;
|
|
7856
8092
|
if (!sourceType) {
|
|
7857
8093
|
throw new Error(`Invalid ignored shape: ${shape}`);
|
|
7858
8094
|
}
|
|
7859
8095
|
return { type: "IGNORED", sourceType };
|
|
7860
8096
|
}).pipe(IgnoredShapeOutputSchema);
|
|
7861
|
-
var optionalEasyEdaTextField = (fieldSchema) =>
|
|
8097
|
+
var optionalEasyEdaTextField = (fieldSchema) => z200.preprocess((textField) => {
|
|
7862
8098
|
if (textField == null) return void 0;
|
|
7863
8099
|
if (typeof textField === "string") {
|
|
7864
8100
|
const trimmedTextField = textField.trim();
|
|
@@ -7868,25 +8104,25 @@ var optionalEasyEdaTextField = (fieldSchema) => z194.preprocess((textField) => {
|
|
|
7868
8104
|
}
|
|
7869
8105
|
return textField;
|
|
7870
8106
|
}, fieldSchema);
|
|
7871
|
-
var TextShapeOutputSchema =
|
|
7872
|
-
type:
|
|
7873
|
-
alignment:
|
|
7874
|
-
x:
|
|
7875
|
-
y:
|
|
7876
|
-
rotation:
|
|
7877
|
-
fontColor:
|
|
7878
|
-
backgroundColor: optionalEasyEdaTextField(
|
|
7879
|
-
fontSize:
|
|
7880
|
-
fontWeight: optionalEasyEdaTextField(
|
|
8107
|
+
var TextShapeOutputSchema = z200.object({
|
|
8108
|
+
type: z200.literal("TEXT"),
|
|
8109
|
+
alignment: z200.enum(["L", "C", "R"]),
|
|
8110
|
+
x: z200.number(),
|
|
8111
|
+
y: z200.number(),
|
|
8112
|
+
rotation: z200.number(),
|
|
8113
|
+
fontColor: z200.string(),
|
|
8114
|
+
backgroundColor: optionalEasyEdaTextField(z200.string().optional()),
|
|
8115
|
+
fontSize: z200.string(),
|
|
8116
|
+
fontWeight: optionalEasyEdaTextField(z200.string().optional().default("normal")),
|
|
7881
8117
|
fontStyle: optionalEasyEdaTextField(
|
|
7882
|
-
|
|
8118
|
+
z200.enum(["normal", "italic"]).optional().default("normal")
|
|
7883
8119
|
),
|
|
7884
|
-
fontDecoration: optionalEasyEdaTextField(
|
|
7885
|
-
content:
|
|
7886
|
-
textType:
|
|
7887
|
-
visibility:
|
|
7888
|
-
mirror:
|
|
7889
|
-
id:
|
|
8120
|
+
fontDecoration: optionalEasyEdaTextField(z200.string().optional().default("")),
|
|
8121
|
+
content: z200.string(),
|
|
8122
|
+
textType: z200.string(),
|
|
8123
|
+
visibility: z200.enum(["0", "1"]),
|
|
8124
|
+
mirror: z200.string(),
|
|
8125
|
+
id: z200.string()
|
|
7890
8126
|
});
|
|
7891
8127
|
var parseText = (str) => {
|
|
7892
8128
|
const [
|
|
@@ -7927,8 +8163,8 @@ var parseText = (str) => {
|
|
|
7927
8163
|
id
|
|
7928
8164
|
};
|
|
7929
8165
|
};
|
|
7930
|
-
var TextShapeSchema =
|
|
7931
|
-
var SingleLetterShapeSchema =
|
|
8166
|
+
var TextShapeSchema = z200.string().startsWith("T~").transform(parseText).pipe(TextShapeOutputSchema);
|
|
8167
|
+
var SingleLetterShapeSchema = z200.string().transform((x) => {
|
|
7932
8168
|
if (x.startsWith("R~")) return RectangleShapeSchema.parse(x);
|
|
7933
8169
|
if (x.startsWith("E~")) return EllipseShapeSchema.parse(x);
|
|
7934
8170
|
if (x.startsWith("P~")) return PinShapeSchema.parse(x);
|
|
@@ -7942,7 +8178,7 @@ var SingleLetterShapeSchema = z194.string().transform((x) => {
|
|
|
7942
8178
|
if (x.startsWith("A~")) return ArcShapeSchema.parse(x);
|
|
7943
8179
|
throw new Error(`Invalid shape type: ${x}`);
|
|
7944
8180
|
}).pipe(
|
|
7945
|
-
|
|
8181
|
+
z200.union([
|
|
7946
8182
|
RectangleShapeOutputSchema,
|
|
7947
8183
|
EllipseShapeOutputSchema,
|
|
7948
8184
|
PinShapeOutputSchema,
|
|
@@ -7956,84 +8192,84 @@ var SingleLetterShapeSchema = z194.string().transform((x) => {
|
|
|
7956
8192
|
);
|
|
7957
8193
|
|
|
7958
8194
|
// lib/schemas/easy-eda-json-schema.ts
|
|
7959
|
-
var maybeNumber =
|
|
7960
|
-
var optionalNumberWithNumericString =
|
|
8195
|
+
var maybeNumber = z201.any().transform((k) => k === "nan" || Number.isNaN(k) ? null : k).pipe(z201.number().nullable().optional());
|
|
8196
|
+
var optionalNumberWithNumericString = z201.preprocess((value) => {
|
|
7961
8197
|
if (typeof value !== "string") return value;
|
|
7962
8198
|
if (value.trim() === "") return void 0;
|
|
7963
8199
|
return Number(value);
|
|
7964
|
-
},
|
|
7965
|
-
var SzlcscSchema =
|
|
7966
|
-
id:
|
|
8200
|
+
}, z201.number().optional());
|
|
8201
|
+
var SzlcscSchema = z201.object({
|
|
8202
|
+
id: z201.preprocess((value) => {
|
|
7967
8203
|
if (typeof value === "string" && /^\d+$/.test(value)) {
|
|
7968
8204
|
return Number(value);
|
|
7969
8205
|
}
|
|
7970
8206
|
return value;
|
|
7971
|
-
},
|
|
7972
|
-
number:
|
|
7973
|
-
step:
|
|
7974
|
-
min:
|
|
8207
|
+
}, z201.number()),
|
|
8208
|
+
number: z201.string(),
|
|
8209
|
+
step: z201.number().optional(),
|
|
8210
|
+
min: z201.number().optional(),
|
|
7975
8211
|
price: optionalNumberWithNumericString,
|
|
7976
|
-
stock:
|
|
7977
|
-
url:
|
|
7978
|
-
image:
|
|
7979
|
-
});
|
|
7980
|
-
var LcscSchema =
|
|
7981
|
-
id:
|
|
7982
|
-
number:
|
|
7983
|
-
step:
|
|
7984
|
-
min:
|
|
8212
|
+
stock: z201.number().optional(),
|
|
8213
|
+
url: z201.string().url().optional(),
|
|
8214
|
+
image: z201.string().optional().optional()
|
|
8215
|
+
});
|
|
8216
|
+
var LcscSchema = z201.object({
|
|
8217
|
+
id: z201.number(),
|
|
8218
|
+
number: z201.string(),
|
|
8219
|
+
step: z201.number().optional(),
|
|
8220
|
+
min: z201.number().optional(),
|
|
7985
8221
|
price: optionalNumberWithNumericString,
|
|
7986
|
-
stock:
|
|
7987
|
-
url:
|
|
7988
|
-
});
|
|
7989
|
-
var OwnerSchema =
|
|
7990
|
-
uuid:
|
|
7991
|
-
username:
|
|
7992
|
-
nickname:
|
|
7993
|
-
avatar:
|
|
7994
|
-
});
|
|
7995
|
-
var HeadSchema =
|
|
7996
|
-
docType:
|
|
7997
|
-
editorVersion:
|
|
7998
|
-
c_para:
|
|
7999
|
-
x:
|
|
8000
|
-
y:
|
|
8001
|
-
puuid:
|
|
8002
|
-
uuid:
|
|
8003
|
-
utime:
|
|
8222
|
+
stock: z201.number().optional(),
|
|
8223
|
+
url: z201.string().url().optional()
|
|
8224
|
+
});
|
|
8225
|
+
var OwnerSchema = z201.object({
|
|
8226
|
+
uuid: z201.string(),
|
|
8227
|
+
username: z201.string(),
|
|
8228
|
+
nickname: z201.string(),
|
|
8229
|
+
avatar: z201.string()
|
|
8230
|
+
});
|
|
8231
|
+
var HeadSchema = z201.object({
|
|
8232
|
+
docType: z201.preprocess((val) => val == null ? val : String(val), z201.string()),
|
|
8233
|
+
editorVersion: z201.string().default(""),
|
|
8234
|
+
c_para: z201.record(z201.string(), z201.string().nullable()),
|
|
8235
|
+
x: z201.number(),
|
|
8236
|
+
y: z201.number(),
|
|
8237
|
+
puuid: z201.string().optional(),
|
|
8238
|
+
uuid: z201.string(),
|
|
8239
|
+
utime: z201.preprocess((val) => {
|
|
8004
8240
|
if (val == null || val === "") return void 0;
|
|
8005
8241
|
if (typeof val === "string") return Number(val);
|
|
8006
8242
|
return val;
|
|
8007
|
-
},
|
|
8008
|
-
importFlag:
|
|
8009
|
-
c_spiceCmd:
|
|
8010
|
-
hasIdFlag:
|
|
8011
|
-
});
|
|
8012
|
-
var BBoxSchema =
|
|
8013
|
-
x:
|
|
8014
|
-
y:
|
|
8015
|
-
width:
|
|
8016
|
-
height:
|
|
8017
|
-
});
|
|
8018
|
-
var LayerItemSchema =
|
|
8019
|
-
name:
|
|
8020
|
-
color:
|
|
8021
|
-
visible:
|
|
8022
|
-
active:
|
|
8023
|
-
config:
|
|
8024
|
-
transparency:
|
|
8025
|
-
});
|
|
8026
|
-
var ObjectItemSchema =
|
|
8027
|
-
name:
|
|
8028
|
-
visible:
|
|
8029
|
-
locked:
|
|
8030
|
-
});
|
|
8031
|
-
var DataStrSchema =
|
|
8243
|
+
}, z201.number().optional()),
|
|
8244
|
+
importFlag: z201.number().optional(),
|
|
8245
|
+
c_spiceCmd: z201.any().optional(),
|
|
8246
|
+
hasIdFlag: z201.boolean().default(false)
|
|
8247
|
+
});
|
|
8248
|
+
var BBoxSchema = z201.object({
|
|
8249
|
+
x: z201.number(),
|
|
8250
|
+
y: z201.number(),
|
|
8251
|
+
width: z201.number(),
|
|
8252
|
+
height: z201.number()
|
|
8253
|
+
});
|
|
8254
|
+
var LayerItemSchema = z201.object({
|
|
8255
|
+
name: z201.string(),
|
|
8256
|
+
color: z201.string(),
|
|
8257
|
+
visible: z201.boolean(),
|
|
8258
|
+
active: z201.boolean(),
|
|
8259
|
+
config: z201.boolean(),
|
|
8260
|
+
transparency: z201.boolean()
|
|
8261
|
+
});
|
|
8262
|
+
var ObjectItemSchema = z201.object({
|
|
8263
|
+
name: z201.string(),
|
|
8264
|
+
visible: z201.boolean(),
|
|
8265
|
+
locked: z201.boolean()
|
|
8266
|
+
});
|
|
8267
|
+
var DataStrSchema = z201.object({
|
|
8032
8268
|
head: HeadSchema,
|
|
8033
|
-
canvas:
|
|
8034
|
-
shape:
|
|
8269
|
+
canvas: z201.string(),
|
|
8270
|
+
shape: z201.array(SingleLetterShapeSchema),
|
|
8035
8271
|
BBox: BBoxSchema.optional(),
|
|
8036
|
-
colors:
|
|
8272
|
+
colors: z201.union([z201.array(z201.string()), z201.record(z201.string())]).default([])
|
|
8037
8273
|
}).transform((data) => ({
|
|
8038
8274
|
...data,
|
|
8039
8275
|
BBox: data.BBox ?? {
|
|
@@ -8043,16 +8279,16 @@ var DataStrSchema = z195.object({
|
|
|
8043
8279
|
height: 0
|
|
8044
8280
|
}
|
|
8045
8281
|
}));
|
|
8046
|
-
var PackageDetailDataStrSchema =
|
|
8282
|
+
var PackageDetailDataStrSchema = z201.object({
|
|
8047
8283
|
head: HeadSchema,
|
|
8048
|
-
canvas:
|
|
8049
|
-
shape:
|
|
8284
|
+
canvas: z201.string(),
|
|
8285
|
+
shape: z201.array(z201.string()).transform(
|
|
8050
8286
|
(shapes) => shapes.map((shape) => {
|
|
8051
8287
|
const [type, ...data] = shape.split("~");
|
|
8052
8288
|
return ShapeItemSchema.parse({ type, data: data.join("~") });
|
|
8053
8289
|
})
|
|
8054
|
-
).pipe(
|
|
8055
|
-
layers:
|
|
8290
|
+
).pipe(z201.array(PackageDetailShapeSchema)),
|
|
8291
|
+
layers: z201.array(z201.string()).transform(
|
|
8056
8292
|
(layers) => layers.map((layer) => {
|
|
8057
8293
|
const [name, color, visible, active, config, transparency] = layer.split("~");
|
|
8058
8294
|
return LayerItemSchema.parse({
|
|
@@ -8065,7 +8301,7 @@ var PackageDetailDataStrSchema = z195.object({
|
|
|
8065
8301
|
});
|
|
8066
8302
|
})
|
|
8067
8303
|
),
|
|
8068
|
-
objects:
|
|
8304
|
+
objects: z201.array(z201.string()).transform(
|
|
8069
8305
|
(objects) => objects.map((obj) => {
|
|
8070
8306
|
const [name, visible, locked] = obj.split("~");
|
|
8071
8307
|
return ObjectItemSchema.parse({
|
|
@@ -8076,52 +8312,52 @@ var PackageDetailDataStrSchema = z195.object({
|
|
|
8076
8312
|
})
|
|
8077
8313
|
),
|
|
8078
8314
|
BBox: BBoxSchema,
|
|
8079
|
-
netColors:
|
|
8315
|
+
netColors: z201.array(z201.unknown()).optional()
|
|
8080
8316
|
});
|
|
8081
|
-
var PackageDetailSchema =
|
|
8082
|
-
uuid:
|
|
8083
|
-
title:
|
|
8084
|
-
docType:
|
|
8085
|
-
updateTime:
|
|
8317
|
+
var PackageDetailSchema = z201.object({
|
|
8318
|
+
uuid: z201.string(),
|
|
8319
|
+
title: z201.string(),
|
|
8320
|
+
docType: z201.number(),
|
|
8321
|
+
updateTime: z201.number(),
|
|
8086
8322
|
owner: OwnerSchema,
|
|
8087
|
-
datastrid:
|
|
8088
|
-
writable:
|
|
8323
|
+
datastrid: z201.string(),
|
|
8324
|
+
writable: z201.boolean(),
|
|
8089
8325
|
dataStr: PackageDetailDataStrSchema
|
|
8090
8326
|
});
|
|
8091
|
-
var ModelBoundsSchema =
|
|
8092
|
-
min:
|
|
8093
|
-
x:
|
|
8094
|
-
y:
|
|
8095
|
-
z:
|
|
8327
|
+
var ModelBoundsSchema = z201.object({
|
|
8328
|
+
min: z201.object({
|
|
8329
|
+
x: z201.number(),
|
|
8330
|
+
y: z201.number(),
|
|
8331
|
+
z: z201.number()
|
|
8096
8332
|
}),
|
|
8097
|
-
max:
|
|
8098
|
-
x:
|
|
8099
|
-
y:
|
|
8100
|
-
z:
|
|
8333
|
+
max: z201.object({
|
|
8334
|
+
x: z201.number(),
|
|
8335
|
+
y: z201.number(),
|
|
8336
|
+
z: z201.number()
|
|
8101
8337
|
})
|
|
8102
8338
|
});
|
|
8103
|
-
var EasyEdaJsonSchema =
|
|
8104
|
-
uuid:
|
|
8105
|
-
title:
|
|
8106
|
-
description:
|
|
8107
|
-
docType:
|
|
8108
|
-
type:
|
|
8339
|
+
var EasyEdaJsonSchema = z201.object({
|
|
8340
|
+
uuid: z201.string(),
|
|
8341
|
+
title: z201.string(),
|
|
8342
|
+
description: z201.string(),
|
|
8343
|
+
docType: z201.number(),
|
|
8344
|
+
type: z201.number(),
|
|
8109
8345
|
szlcsc: SzlcscSchema,
|
|
8110
8346
|
lcsc: LcscSchema,
|
|
8111
8347
|
owner: OwnerSchema,
|
|
8112
|
-
tags:
|
|
8113
|
-
category:
|
|
8114
|
-
updateTime:
|
|
8115
|
-
updated_at:
|
|
8348
|
+
tags: z201.array(z201.string()),
|
|
8349
|
+
category: z201.string().optional(),
|
|
8350
|
+
updateTime: z201.number(),
|
|
8351
|
+
updated_at: z201.string(),
|
|
8116
8352
|
dataStr: DataStrSchema,
|
|
8117
|
-
verify:
|
|
8118
|
-
SMT:
|
|
8119
|
-
datastrid:
|
|
8120
|
-
jlcOnSale:
|
|
8121
|
-
writable:
|
|
8122
|
-
isFavorite:
|
|
8353
|
+
verify: z201.boolean(),
|
|
8354
|
+
SMT: z201.boolean().optional(),
|
|
8355
|
+
datastrid: z201.string(),
|
|
8356
|
+
jlcOnSale: z201.number().optional(),
|
|
8357
|
+
writable: z201.boolean(),
|
|
8358
|
+
isFavorite: z201.boolean(),
|
|
8123
8359
|
packageDetail: PackageDetailSchema,
|
|
8124
|
-
_objMetadata:
|
|
8360
|
+
_objMetadata: z201.object({
|
|
8125
8361
|
bounds: ModelBoundsSchema
|
|
8126
8362
|
}).optional()
|
|
8127
8363
|
});
|
|
@@ -8151,17 +8387,17 @@ var parseObjBounds2 = (objText) => {
|
|
|
8151
8387
|
const [, xStr, yStr, zStr] = trimmed.split(/\s+/, 4);
|
|
8152
8388
|
const x = Number(xStr);
|
|
8153
8389
|
const y = Number(yStr);
|
|
8154
|
-
const
|
|
8155
|
-
if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(
|
|
8390
|
+
const z202 = Number(zStr);
|
|
8391
|
+
if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(z202)) {
|
|
8156
8392
|
continue;
|
|
8157
8393
|
}
|
|
8158
8394
|
vertexCount += 1;
|
|
8159
8395
|
minX = Math.min(minX, x);
|
|
8160
8396
|
minY = Math.min(minY, y);
|
|
8161
|
-
minZ = Math.min(minZ,
|
|
8397
|
+
minZ = Math.min(minZ, z202);
|
|
8162
8398
|
maxX = Math.max(maxX, x);
|
|
8163
8399
|
maxY = Math.max(maxY, y);
|
|
8164
|
-
maxZ = Math.max(maxZ,
|
|
8400
|
+
maxZ = Math.max(maxZ, z202);
|
|
8165
8401
|
}
|
|
8166
8402
|
if (vertexCount === 0) return null;
|
|
8167
8403
|
return {
|
|
@@ -8485,11 +8721,11 @@ var generateShapeTsx = ({
|
|
|
8485
8721
|
x: shape.position.x + shape.width / 2,
|
|
8486
8722
|
y: shape.position.y + shape.height / 2
|
|
8487
8723
|
});
|
|
8488
|
-
return `<schematicrect schX={${center.x}} schY={${center.y}} width={${toSchematicUnits(shape.width)}} height={${toSchematicUnits(shape.height)}} color=${JSON.stringify(shape.color)}${shape.fillColor && shape.fillColor !== "none" ? ` isFilled fillColor=${JSON.stringify(shape.fillColor)}` : ""} />`;
|
|
8724
|
+
return `<schematicrect schX={${center.x}} schY={${center.y}} width={${toSchematicUnits(shape.width)}} height={${toSchematicUnits(shape.height)}} strokeWidth={${toSchematicUnits(shape.lineWidth)}} color=${JSON.stringify(shape.color)}${shape.fillColor && shape.fillColor !== "none" ? ` isFilled fillColor=${JSON.stringify(shape.fillColor)}` : ""} />`;
|
|
8489
8725
|
}
|
|
8490
8726
|
if (shape.type === "ELLIPSE") {
|
|
8491
8727
|
const center = transformPoint(shape.center);
|
|
8492
|
-
return `<schematiccircle center={{ x: ${center.x}, y: ${center.y} }} radius={${toSchematicUnits(Math.max(shape.radiusX, shape.radiusY))}} color=${JSON.stringify(shape.color)}${shape.fillColor && shape.fillColor !== "none" ? ` isFilled fillColor=${JSON.stringify(shape.fillColor)}` : ""} />`;
|
|
8728
|
+
return `<schematiccircle center={{ x: ${center.x}, y: ${center.y} }} radius={${toSchematicUnits(Math.max(shape.radiusX, shape.radiusY))}} strokeWidth={${toSchematicUnits(shape.lineWidth)}} color=${JSON.stringify(shape.color)}${shape.fillColor && shape.fillColor !== "none" ? ` isFilled fillColor=${JSON.stringify(shape.fillColor)}` : ""} />`;
|
|
8493
8729
|
}
|
|
8494
8730
|
if (shape.type === "POLYLINE" || shape.type === "POLYGON") {
|
|
8495
8731
|
const isPolygon = shape.type === "POLYGON";
|
|
@@ -8801,7 +9037,8 @@ var generateTypescriptComponent = ({
|
|
|
8801
9037
|
crystalFrequency,
|
|
8802
9038
|
crystalPinVariant,
|
|
8803
9039
|
symbolTsx,
|
|
8804
|
-
schPinArrangement
|
|
9040
|
+
schPinArrangement,
|
|
9041
|
+
useSymbolPortsOnly = false
|
|
8805
9042
|
}) => {
|
|
8806
9043
|
const safePinLabels = pinLabels ?? {};
|
|
8807
9044
|
const polarizedPinMetadata = getPolarizedPinMetadata(safePinLabels);
|
|
@@ -9096,8 +9333,7 @@ ${pinLabelsString}
|
|
|
9096
9333
|
${pinAttributesBlock}export const ${componentName} = (props: ChipProps<typeof pinLabels>) => {
|
|
9097
9334
|
return (
|
|
9098
9335
|
<chip
|
|
9099
|
-
pinLabels={pinLabels}
|
|
9100
|
-
${pinAttributesProp}${symbolProp}${schPinArrangementProp} supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
|
|
9336
|
+
${useSymbolPortsOnly ? "" : " pinLabels={pinLabels}\n"}${pinAttributesProp}${symbolProp}${schPinArrangementProp} supplierPartNumbers={${JSON.stringify(supplierPartNumbers, null, " ")}}
|
|
9101
9337
|
manufacturerPartNumber="${manufacturerPartNumber}"
|
|
9102
9338
|
footprint={${footprintTsx}}
|
|
9103
9339
|
${objUrl || stepUrl ? `cadModel={{
|
|
@@ -9134,6 +9370,29 @@ var isCrystalComponent = (betterEasy) => {
|
|
|
9134
9370
|
return componentParameters.pre === "X?" && packageName?.toUpperCase().startsWith("CRYSTAL-") === true && typeof value === "string" && frequencyPattern.test(value.trim());
|
|
9135
9371
|
};
|
|
9136
9372
|
|
|
9373
|
+
// lib/websafe/convert-to-typescript-component/is-dip-switch-category-component.ts
|
|
9374
|
+
var categoryValueContainsDipSwitch = (value) => {
|
|
9375
|
+
if (typeof value === "string") {
|
|
9376
|
+
return /\bdip\s+switch(?:es)?\b/i.test(value);
|
|
9377
|
+
}
|
|
9378
|
+
if (Array.isArray(value)) return value.some(categoryValueContainsDipSwitch);
|
|
9379
|
+
if (value && typeof value === "object") {
|
|
9380
|
+
return Object.values(value).some(categoryValueContainsDipSwitch);
|
|
9381
|
+
}
|
|
9382
|
+
return false;
|
|
9383
|
+
};
|
|
9384
|
+
var isDipSwitchCategoryComponent = (betterEasy) => {
|
|
9385
|
+
const cPara = betterEasy.dataStr.head.c_para;
|
|
9386
|
+
return [
|
|
9387
|
+
betterEasy.tags,
|
|
9388
|
+
cPara.category,
|
|
9389
|
+
cPara.Category,
|
|
9390
|
+
cPara["LCSC Category"],
|
|
9391
|
+
cPara["JLCPCB Category"],
|
|
9392
|
+
betterEasy.category
|
|
9393
|
+
].some(categoryValueContainsDipSwitch);
|
|
9394
|
+
};
|
|
9395
|
+
|
|
9137
9396
|
// lib/websafe/convert-to-typescript-component/is-inductor-component.ts
|
|
9138
9397
|
var inductancePattern = /^\d+(?:\.\d+)?\s*(?:pH|nH|uH|µH|mH|H)$/i;
|
|
9139
9398
|
var isInductorComponent = (betterEasy) => {
|
|
@@ -9257,6 +9516,7 @@ var getGeneratedComponentType = (betterEasy, pinCount) => {
|
|
|
9257
9516
|
if (isLedCategoryComponent(betterEasy) && pinCount === 2) return "led";
|
|
9258
9517
|
if (isDiodeCategoryComponent(betterEasy) && pinCount === 2) return "diode";
|
|
9259
9518
|
if (isPushbuttonCategoryComponent(betterEasy)) return "pushbutton";
|
|
9519
|
+
if (isDipSwitchCategoryComponent(betterEasy)) return "chip";
|
|
9260
9520
|
if (isSwitchCategoryComponent(betterEasy)) return "switch";
|
|
9261
9521
|
if (isCapacitorComponent(betterEasy)) return "capacitor";
|
|
9262
9522
|
if (isResistorComponent(betterEasy) && pinCount === 2) return "resistor";
|
|
@@ -9355,6 +9615,7 @@ var convertBetterEasyToTsx = async ({
|
|
|
9355
9615
|
betterEasy,
|
|
9356
9616
|
sourcePorts.length
|
|
9357
9617
|
);
|
|
9618
|
+
const isDipSwitch = isDipSwitchCategoryComponent(betterEasy);
|
|
9358
9619
|
const inductance2 = componentType === "inductor" ? betterEasy.dataStr.head.c_para.Value?.trim() : void 0;
|
|
9359
9620
|
const capacitance2 = componentType === "capacitor" ? normalizeCapacitanceValue(betterEasy.dataStr.head.c_para.Value) : void 0;
|
|
9360
9621
|
const resistance2 = componentType === "resistor" ? normalizeResistorValue(betterEasy.dataStr.head.c_para.Value) : void 0;
|
|
@@ -9382,7 +9643,8 @@ var convertBetterEasyToTsx = async ({
|
|
|
9382
9643
|
crystalFrequency,
|
|
9383
9644
|
crystalPinVariant,
|
|
9384
9645
|
symbolTsx,
|
|
9385
|
-
schPinArrangement
|
|
9646
|
+
schPinArrangement,
|
|
9647
|
+
useSymbolPortsOnly: isDipSwitch && Boolean(symbolTsx)
|
|
9386
9648
|
});
|
|
9387
9649
|
};
|
|
9388
9650
|
var checkModelObjUrlValidity = async (url) => {
|