circuit-json 0.0.520 → 0.0.521
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +86 -1
- package/dist/index.mjs +1519 -1500
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1754,36 +1754,53 @@ var schematic_component_styling_warning = z100.object({
|
|
|
1754
1754
|
);
|
|
1755
1755
|
expectTypesMatch(true);
|
|
1756
1756
|
|
|
1757
|
-
// src/schematic/
|
|
1757
|
+
// src/schematic/schematic_sheet_styling_warning.ts
|
|
1758
1758
|
import { z as z101 } from "zod";
|
|
1759
|
-
var
|
|
1760
|
-
type: z101.literal("
|
|
1761
|
-
|
|
1762
|
-
"
|
|
1759
|
+
var schematic_sheet_styling_warning = z101.object({
|
|
1760
|
+
type: z101.literal("schematic_sheet_styling_warning"),
|
|
1761
|
+
schematic_sheet_styling_warning_id: getZodPrefixedIdWithDefault(
|
|
1762
|
+
"schematic_sheet_styling_warning"
|
|
1763
1763
|
),
|
|
1764
|
-
warning_type: z101.literal("
|
|
1764
|
+
warning_type: z101.literal("schematic_sheet_styling_warning").default("schematic_sheet_styling_warning"),
|
|
1765
1765
|
message: z101.string(),
|
|
1766
1766
|
schematic_sheet_id: z101.string(),
|
|
1767
|
-
|
|
1767
|
+
styling_issue_type: z101.literal("non_default_sheet_size"),
|
|
1768
|
+
subcircuit_id: z101.string().optional()
|
|
1769
|
+
}).describe(
|
|
1770
|
+
"Style warning emitted when a schematic sheet uses a non-default size"
|
|
1771
|
+
);
|
|
1772
|
+
expectTypesMatch(true);
|
|
1773
|
+
|
|
1774
|
+
// src/schematic/schematic_element_outside_sheet_warning.ts
|
|
1775
|
+
import { z as z102 } from "zod";
|
|
1776
|
+
var schematic_element_outside_sheet_warning = z102.object({
|
|
1777
|
+
type: z102.literal("schematic_element_outside_sheet_warning"),
|
|
1778
|
+
schematic_element_outside_sheet_warning_id: getZodPrefixedIdWithDefault(
|
|
1779
|
+
"schematic_element_outside_sheet_warning"
|
|
1780
|
+
),
|
|
1781
|
+
warning_type: z102.literal("schematic_element_outside_sheet_warning").default("schematic_element_outside_sheet_warning"),
|
|
1782
|
+
message: z102.string(),
|
|
1783
|
+
schematic_sheet_id: z102.string(),
|
|
1784
|
+
schematic_element_type: z102.enum([
|
|
1768
1785
|
"schematic_component",
|
|
1769
1786
|
"schematic_net_label",
|
|
1770
1787
|
"schematic_trace"
|
|
1771
1788
|
]),
|
|
1772
|
-
schematic_element_id:
|
|
1789
|
+
schematic_element_id: z102.string()
|
|
1773
1790
|
}).describe(
|
|
1774
1791
|
"Warning emitted when a schematic component, net label, or trace extends outside its schematic sheet"
|
|
1775
1792
|
);
|
|
1776
1793
|
expectTypesMatch(true);
|
|
1777
1794
|
|
|
1778
1795
|
// src/schematic/schematic_graphic.ts
|
|
1779
|
-
import { z as
|
|
1780
|
-
var positiveFiniteDistance = distance.pipe(
|
|
1781
|
-
var schematic_graphic =
|
|
1782
|
-
type:
|
|
1796
|
+
import { z as z103 } from "zod";
|
|
1797
|
+
var positiveFiniteDistance = distance.pipe(z103.number().positive().finite());
|
|
1798
|
+
var schematic_graphic = z103.object({
|
|
1799
|
+
type: z103.literal("schematic_graphic"),
|
|
1783
1800
|
schematic_graphic_id: getZodPrefixedIdWithDefault("schematic_graphic"),
|
|
1784
|
-
schematic_sheet_id:
|
|
1801
|
+
schematic_sheet_id: z103.string().optional(),
|
|
1785
1802
|
asset: asset.optional(),
|
|
1786
|
-
svg_content:
|
|
1803
|
+
svg_content: z103.string().optional(),
|
|
1787
1804
|
width: positiveFiniteDistance.optional(),
|
|
1788
1805
|
height: positiveFiniteDistance.optional()
|
|
1789
1806
|
}).describe(
|
|
@@ -1791,7 +1808,7 @@ var schematic_graphic = z102.object({
|
|
|
1791
1808
|
).superRefine(({ asset: asset2, svg_content }, ctx) => {
|
|
1792
1809
|
if (asset2 === void 0 && svg_content === void 0) {
|
|
1793
1810
|
ctx.addIssue({
|
|
1794
|
-
code:
|
|
1811
|
+
code: z103.ZodIssueCode.custom,
|
|
1795
1812
|
message: "At least one of asset or svg_content is required"
|
|
1796
1813
|
});
|
|
1797
1814
|
}
|
|
@@ -1799,117 +1816,117 @@ var schematic_graphic = z102.object({
|
|
|
1799
1816
|
expectTypesMatch(true);
|
|
1800
1817
|
|
|
1801
1818
|
// src/schematic/schematic_group.ts
|
|
1802
|
-
import { z as
|
|
1803
|
-
var schematic_group =
|
|
1804
|
-
type:
|
|
1819
|
+
import { z as z104 } from "zod";
|
|
1820
|
+
var schematic_group = z104.object({
|
|
1821
|
+
type: z104.literal("schematic_group"),
|
|
1805
1822
|
schematic_group_id: getZodPrefixedIdWithDefault("schematic_group"),
|
|
1806
|
-
schematic_sheet_id:
|
|
1807
|
-
source_group_id:
|
|
1808
|
-
is_subcircuit:
|
|
1809
|
-
subcircuit_id:
|
|
1823
|
+
schematic_sheet_id: z104.string().optional(),
|
|
1824
|
+
source_group_id: z104.string(),
|
|
1825
|
+
is_subcircuit: z104.boolean().optional(),
|
|
1826
|
+
subcircuit_id: z104.string().optional(),
|
|
1810
1827
|
width: length,
|
|
1811
1828
|
height: length,
|
|
1812
1829
|
center: point,
|
|
1813
|
-
schematic_component_ids:
|
|
1814
|
-
show_as_schematic_box:
|
|
1815
|
-
name:
|
|
1816
|
-
description:
|
|
1830
|
+
schematic_component_ids: z104.array(z104.string()),
|
|
1831
|
+
show_as_schematic_box: z104.boolean().optional(),
|
|
1832
|
+
name: z104.string().optional(),
|
|
1833
|
+
description: z104.string().optional()
|
|
1817
1834
|
}).describe("Defines a group of components on the schematic");
|
|
1818
1835
|
expectTypesMatch(true);
|
|
1819
1836
|
|
|
1820
1837
|
// src/schematic/schematic_table.ts
|
|
1821
|
-
import { z as
|
|
1822
|
-
var schematic_table =
|
|
1823
|
-
type:
|
|
1838
|
+
import { z as z105 } from "zod";
|
|
1839
|
+
var schematic_table = z105.object({
|
|
1840
|
+
type: z105.literal("schematic_table"),
|
|
1824
1841
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
1825
|
-
schematic_sheet_id:
|
|
1842
|
+
schematic_sheet_id: z105.string().optional(),
|
|
1826
1843
|
anchor_position: point,
|
|
1827
|
-
column_widths:
|
|
1828
|
-
row_heights:
|
|
1844
|
+
column_widths: z105.array(distance),
|
|
1845
|
+
row_heights: z105.array(distance),
|
|
1829
1846
|
cell_padding: distance.optional(),
|
|
1830
1847
|
border_width: distance.optional(),
|
|
1831
|
-
subcircuit_id:
|
|
1832
|
-
schematic_component_id:
|
|
1848
|
+
subcircuit_id: z105.string().optional(),
|
|
1849
|
+
schematic_component_id: z105.string().optional(),
|
|
1833
1850
|
anchor: ninePointAnchor.optional()
|
|
1834
1851
|
}).describe("Defines a table on the schematic");
|
|
1835
1852
|
expectTypesMatch(true);
|
|
1836
1853
|
|
|
1837
1854
|
// src/schematic/schematic_table_cell.ts
|
|
1838
|
-
import { z as
|
|
1839
|
-
var schematic_table_cell =
|
|
1840
|
-
type:
|
|
1855
|
+
import { z as z106 } from "zod";
|
|
1856
|
+
var schematic_table_cell = z106.object({
|
|
1857
|
+
type: z106.literal("schematic_table_cell"),
|
|
1841
1858
|
schematic_table_cell_id: getZodPrefixedIdWithDefault(
|
|
1842
1859
|
"schematic_table_cell"
|
|
1843
1860
|
),
|
|
1844
|
-
schematic_sheet_id:
|
|
1845
|
-
schematic_table_id:
|
|
1846
|
-
start_row_index:
|
|
1847
|
-
end_row_index:
|
|
1848
|
-
start_column_index:
|
|
1849
|
-
end_column_index:
|
|
1850
|
-
text:
|
|
1861
|
+
schematic_sheet_id: z106.string().optional(),
|
|
1862
|
+
schematic_table_id: z106.string(),
|
|
1863
|
+
start_row_index: z106.number(),
|
|
1864
|
+
end_row_index: z106.number(),
|
|
1865
|
+
start_column_index: z106.number(),
|
|
1866
|
+
end_column_index: z106.number(),
|
|
1867
|
+
text: z106.string().optional(),
|
|
1851
1868
|
center: point,
|
|
1852
1869
|
width: distance,
|
|
1853
1870
|
height: distance,
|
|
1854
|
-
horizontal_align:
|
|
1855
|
-
vertical_align:
|
|
1871
|
+
horizontal_align: z106.enum(["left", "center", "right"]).optional(),
|
|
1872
|
+
vertical_align: z106.enum(["top", "middle", "bottom"]).optional(),
|
|
1856
1873
|
font_size: distance.optional(),
|
|
1857
|
-
subcircuit_id:
|
|
1874
|
+
subcircuit_id: z106.string().optional()
|
|
1858
1875
|
}).describe("Defines a cell within a schematic_table");
|
|
1859
1876
|
expectTypesMatch(true);
|
|
1860
1877
|
|
|
1861
1878
|
// src/schematic/schematic_sheet.ts
|
|
1862
|
-
import { z as
|
|
1863
|
-
var schematic_sheet_size =
|
|
1864
|
-
var schematic_sheet =
|
|
1865
|
-
type:
|
|
1879
|
+
import { z as z107 } from "zod";
|
|
1880
|
+
var schematic_sheet_size = z107.enum(["a4", "ansi_b"]);
|
|
1881
|
+
var schematic_sheet = z107.object({
|
|
1882
|
+
type: z107.literal("schematic_sheet"),
|
|
1866
1883
|
schematic_sheet_id: getZodPrefixedIdWithDefault("schematic_sheet"),
|
|
1867
|
-
name:
|
|
1868
|
-
sheet_index:
|
|
1884
|
+
name: z107.string().optional(),
|
|
1885
|
+
sheet_index: z107.number().optional(),
|
|
1869
1886
|
sheet_size: schematic_sheet_size.optional(),
|
|
1870
|
-
sheet_width:
|
|
1871
|
-
sheet_height:
|
|
1872
|
-
subcircuit_id:
|
|
1873
|
-
outline_color:
|
|
1887
|
+
sheet_width: z107.number().positive().optional(),
|
|
1888
|
+
sheet_height: z107.number().positive().optional(),
|
|
1889
|
+
subcircuit_id: z107.string().optional(),
|
|
1890
|
+
outline_color: z107.string().optional()
|
|
1874
1891
|
}).describe(
|
|
1875
1892
|
"Defines a schematic sheet or page that components can be placed on"
|
|
1876
1893
|
);
|
|
1877
1894
|
expectTypesMatch(true);
|
|
1878
1895
|
|
|
1879
1896
|
// src/schematic/schematic_missing_sheet_warning.ts
|
|
1880
|
-
import { z as
|
|
1881
|
-
var schematic_missing_sheet_warning =
|
|
1882
|
-
type:
|
|
1897
|
+
import { z as z108 } from "zod";
|
|
1898
|
+
var schematic_missing_sheet_warning = z108.object({
|
|
1899
|
+
type: z108.literal("schematic_missing_sheet_warning"),
|
|
1883
1900
|
schematic_missing_sheet_warning_id: getZodPrefixedIdWithDefault(
|
|
1884
1901
|
"schematic_missing_sheet_warning"
|
|
1885
1902
|
),
|
|
1886
|
-
warning_type:
|
|
1887
|
-
message:
|
|
1903
|
+
warning_type: z108.literal("schematic_missing_sheet_warning").default("schematic_missing_sheet_warning"),
|
|
1904
|
+
message: z108.string()
|
|
1888
1905
|
}).describe(
|
|
1889
1906
|
"Circuit-wide warning emitted when a schematic has no schematic sheet. Display as a banner without attaching it to a component or drawing a target outline or leader line."
|
|
1890
1907
|
);
|
|
1891
1908
|
expectTypesMatch(true);
|
|
1892
1909
|
|
|
1893
1910
|
// src/pcb/properties/brep.ts
|
|
1894
|
-
import { z as
|
|
1895
|
-
var point_with_bulge =
|
|
1911
|
+
import { z as z109 } from "zod";
|
|
1912
|
+
var point_with_bulge = z109.object({
|
|
1896
1913
|
x: distance,
|
|
1897
1914
|
y: distance,
|
|
1898
|
-
bulge:
|
|
1915
|
+
bulge: z109.number().optional()
|
|
1899
1916
|
});
|
|
1900
1917
|
expectTypesMatch(true);
|
|
1901
|
-
var ring =
|
|
1902
|
-
vertices:
|
|
1918
|
+
var ring = z109.object({
|
|
1919
|
+
vertices: z109.array(point_with_bulge)
|
|
1903
1920
|
});
|
|
1904
1921
|
expectTypesMatch(true);
|
|
1905
|
-
var brep_shape =
|
|
1922
|
+
var brep_shape = z109.object({
|
|
1906
1923
|
outer_ring: ring,
|
|
1907
|
-
inner_rings:
|
|
1924
|
+
inner_rings: z109.array(ring).default([])
|
|
1908
1925
|
});
|
|
1909
1926
|
expectTypesMatch(true);
|
|
1910
1927
|
|
|
1911
1928
|
// src/pcb/properties/insertion_direction.ts
|
|
1912
|
-
import { z as
|
|
1929
|
+
import { z as z110 } from "zod";
|
|
1913
1930
|
var insertionDirectionToCanonical = {
|
|
1914
1931
|
from_left: "from_left",
|
|
1915
1932
|
from_right: "from_right",
|
|
@@ -1936,7 +1953,7 @@ var insertionDirectionToVector = {
|
|
|
1936
1953
|
from_above: { x: 0, y: 0, z: 1 },
|
|
1937
1954
|
from_below: { x: 0, y: 0, z: -1 }
|
|
1938
1955
|
};
|
|
1939
|
-
var insertion_direction =
|
|
1956
|
+
var insertion_direction = z110.enum([
|
|
1940
1957
|
"from_left",
|
|
1941
1958
|
"from_right",
|
|
1942
1959
|
"from_top",
|
|
@@ -1961,8 +1978,8 @@ expectTypesMatch(
|
|
|
1961
1978
|
);
|
|
1962
1979
|
|
|
1963
1980
|
// src/pcb/properties/pcb_pin1_location.ts
|
|
1964
|
-
import { z as
|
|
1965
|
-
var pcb_pin1_location =
|
|
1981
|
+
import { z as z111 } from "zod";
|
|
1982
|
+
var pcb_pin1_location = z111.enum([
|
|
1966
1983
|
"leftside_top",
|
|
1967
1984
|
"leftside_bottom",
|
|
1968
1985
|
"rightside_top",
|
|
@@ -1999,31 +2016,31 @@ var getRotationBetweenPcbPin1Locations = (from, to) => {
|
|
|
1999
2016
|
};
|
|
2000
2017
|
|
|
2001
2018
|
// src/pcb/properties/pcb_route_hints.ts
|
|
2002
|
-
import { z as
|
|
2003
|
-
var pcb_route_hint =
|
|
2019
|
+
import { z as z112 } from "zod";
|
|
2020
|
+
var pcb_route_hint = z112.object({
|
|
2004
2021
|
x: distance,
|
|
2005
2022
|
y: distance,
|
|
2006
|
-
via:
|
|
2023
|
+
via: z112.boolean().optional(),
|
|
2007
2024
|
via_to_layer: layer_ref.optional()
|
|
2008
2025
|
});
|
|
2009
|
-
var pcb_route_hints =
|
|
2026
|
+
var pcb_route_hints = z112.array(pcb_route_hint);
|
|
2010
2027
|
expectTypesMatch(true);
|
|
2011
2028
|
expectTypesMatch(true);
|
|
2012
2029
|
|
|
2013
2030
|
// src/pcb/properties/route_hint_point.ts
|
|
2014
|
-
import { z as
|
|
2015
|
-
var route_hint_point =
|
|
2031
|
+
import { z as z113 } from "zod";
|
|
2032
|
+
var route_hint_point = z113.object({
|
|
2016
2033
|
x: distance,
|
|
2017
2034
|
y: distance,
|
|
2018
|
-
via:
|
|
2035
|
+
via: z113.boolean().optional(),
|
|
2019
2036
|
to_layer: layer_ref.optional(),
|
|
2020
2037
|
trace_width: distance.optional()
|
|
2021
2038
|
});
|
|
2022
2039
|
expectTypesMatch(true);
|
|
2023
2040
|
|
|
2024
2041
|
// src/pcb/properties/manufacturing_drc_properties.ts
|
|
2025
|
-
import { z as
|
|
2026
|
-
var manufacturing_drc_properties =
|
|
2042
|
+
import { z as z114 } from "zod";
|
|
2043
|
+
var manufacturing_drc_properties = z114.object({
|
|
2027
2044
|
min_trace_width: length.optional(),
|
|
2028
2045
|
min_board_edge_clearance: length.optional(),
|
|
2029
2046
|
min_via_hole_edge_to_via_hole_edge_clearance: length.optional(),
|
|
@@ -2041,27 +2058,27 @@ var manufacturing_drc_properties = z113.object({
|
|
|
2041
2058
|
});
|
|
2042
2059
|
|
|
2043
2060
|
// src/pcb/pcb_component.ts
|
|
2044
|
-
import { z as
|
|
2045
|
-
var pcb_component =
|
|
2046
|
-
type:
|
|
2061
|
+
import { z as z115 } from "zod";
|
|
2062
|
+
var pcb_component = z115.object({
|
|
2063
|
+
type: z115.literal("pcb_component"),
|
|
2047
2064
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
2048
|
-
source_component_id:
|
|
2065
|
+
source_component_id: z115.string(),
|
|
2049
2066
|
center: point,
|
|
2050
2067
|
layer: layer_ref,
|
|
2051
2068
|
rotation,
|
|
2052
|
-
display_offset_x:
|
|
2069
|
+
display_offset_x: z115.string().optional().describe(
|
|
2053
2070
|
"How to display the x offset for this part, usually corresponding with how the user specified it"
|
|
2054
2071
|
),
|
|
2055
|
-
display_offset_y:
|
|
2072
|
+
display_offset_y: z115.string().optional().describe(
|
|
2056
2073
|
"How to display the y offset for this part, usually corresponding with how the user specified it"
|
|
2057
2074
|
),
|
|
2058
2075
|
width: length,
|
|
2059
2076
|
height: length,
|
|
2060
|
-
do_not_place:
|
|
2061
|
-
is_allowed_to_be_off_board:
|
|
2062
|
-
subcircuit_id:
|
|
2063
|
-
pcb_group_id:
|
|
2064
|
-
position_mode:
|
|
2077
|
+
do_not_place: z115.boolean().optional(),
|
|
2078
|
+
is_allowed_to_be_off_board: z115.boolean().optional(),
|
|
2079
|
+
subcircuit_id: z115.string().optional(),
|
|
2080
|
+
pcb_group_id: z115.string().optional(),
|
|
2081
|
+
position_mode: z115.enum([
|
|
2065
2082
|
"packed",
|
|
2066
2083
|
"relative_to_group_anchor",
|
|
2067
2084
|
"relative_to_another_component",
|
|
@@ -2069,48 +2086,48 @@ var pcb_component = z114.object({
|
|
|
2069
2086
|
]).optional(),
|
|
2070
2087
|
anchor_position: point.optional(),
|
|
2071
2088
|
anchor_alignment: ninePointAnchor.optional(),
|
|
2072
|
-
positioned_relative_to_pcb_group_id:
|
|
2073
|
-
positioned_relative_to_pcb_board_id:
|
|
2089
|
+
positioned_relative_to_pcb_group_id: z115.string().optional(),
|
|
2090
|
+
positioned_relative_to_pcb_board_id: z115.string().optional(),
|
|
2074
2091
|
cable_insertion_center: point.optional(),
|
|
2075
2092
|
insertion_direction: insertion_direction.optional(),
|
|
2076
2093
|
pin1_location: pcb_pin1_location.optional().describe(
|
|
2077
2094
|
"Location of pin 1 on the unrotated, top-view component footprint"
|
|
2078
2095
|
),
|
|
2079
|
-
supplier_pin1_location_map:
|
|
2096
|
+
supplier_pin1_location_map: z115.record(supplier_name, pcb_pin1_location).optional().describe(
|
|
2080
2097
|
"Pin 1 location for each supplier's unrotated, top-view footprint"
|
|
2081
2098
|
),
|
|
2082
|
-
metadata:
|
|
2099
|
+
metadata: z115.object({
|
|
2083
2100
|
kicad_footprint: kicadFootprintMetadata.optional()
|
|
2084
2101
|
}).optional(),
|
|
2085
|
-
obstructs_within_bounds:
|
|
2102
|
+
obstructs_within_bounds: z115.boolean().default(true).describe(
|
|
2086
2103
|
"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"
|
|
2087
2104
|
)
|
|
2088
2105
|
}).describe("Defines a component on the PCB");
|
|
2089
2106
|
expectTypesMatch(true);
|
|
2090
2107
|
|
|
2091
2108
|
// src/pcb/pcb_debug_object.ts
|
|
2092
|
-
import { z as
|
|
2093
|
-
var pcb_debug_object_base =
|
|
2094
|
-
type:
|
|
2109
|
+
import { z as z116 } from "zod";
|
|
2110
|
+
var pcb_debug_object_base = z116.object({
|
|
2111
|
+
type: z116.literal("pcb_debug_object"),
|
|
2095
2112
|
pcb_debug_object_id: getZodPrefixedIdWithDefault("pcb_debug_object"),
|
|
2096
|
-
label:
|
|
2097
|
-
subcircuit_id:
|
|
2113
|
+
label: z116.string().optional(),
|
|
2114
|
+
subcircuit_id: z116.string().optional()
|
|
2098
2115
|
});
|
|
2099
2116
|
var pcb_debug_rect = pcb_debug_object_base.extend({
|
|
2100
|
-
shape:
|
|
2117
|
+
shape: z116.literal("rect"),
|
|
2101
2118
|
center: point,
|
|
2102
2119
|
size
|
|
2103
2120
|
});
|
|
2104
2121
|
var pcb_debug_line = pcb_debug_object_base.extend({
|
|
2105
|
-
shape:
|
|
2122
|
+
shape: z116.literal("line"),
|
|
2106
2123
|
start: point,
|
|
2107
2124
|
end: point
|
|
2108
2125
|
});
|
|
2109
2126
|
var pcb_debug_point = pcb_debug_object_base.extend({
|
|
2110
|
-
shape:
|
|
2127
|
+
shape: z116.literal("point"),
|
|
2111
2128
|
center: point
|
|
2112
2129
|
});
|
|
2113
|
-
var pcb_debug_object =
|
|
2130
|
+
var pcb_debug_object = z116.discriminatedUnion("shape", [
|
|
2114
2131
|
pcb_debug_rect,
|
|
2115
2132
|
pcb_debug_line,
|
|
2116
2133
|
pcb_debug_point
|
|
@@ -2118,109 +2135,109 @@ var pcb_debug_object = z115.discriminatedUnion("shape", [
|
|
|
2118
2135
|
expectTypesMatch(true);
|
|
2119
2136
|
|
|
2120
2137
|
// src/pcb/pcb_hole.ts
|
|
2121
|
-
import { z as
|
|
2122
|
-
var pcb_hole_circle =
|
|
2123
|
-
type:
|
|
2138
|
+
import { z as z117 } from "zod";
|
|
2139
|
+
var pcb_hole_circle = z117.object({
|
|
2140
|
+
type: z117.literal("pcb_hole"),
|
|
2124
2141
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
2125
|
-
pcb_group_id:
|
|
2126
|
-
subcircuit_id:
|
|
2127
|
-
pcb_component_id:
|
|
2128
|
-
hole_shape:
|
|
2129
|
-
hole_diameter:
|
|
2142
|
+
pcb_group_id: z117.string().optional(),
|
|
2143
|
+
subcircuit_id: z117.string().optional(),
|
|
2144
|
+
pcb_component_id: z117.string().optional(),
|
|
2145
|
+
hole_shape: z117.literal("circle"),
|
|
2146
|
+
hole_diameter: z117.number(),
|
|
2130
2147
|
x: distance,
|
|
2131
2148
|
y: distance,
|
|
2132
|
-
is_covered_with_solder_mask:
|
|
2133
|
-
soldermask_margin:
|
|
2149
|
+
is_covered_with_solder_mask: z117.boolean().optional(),
|
|
2150
|
+
soldermask_margin: z117.number().optional()
|
|
2134
2151
|
});
|
|
2135
2152
|
var pcb_hole_circle_shape = pcb_hole_circle.describe(
|
|
2136
2153
|
"Defines a circular hole on the PCB"
|
|
2137
2154
|
);
|
|
2138
2155
|
expectTypesMatch(true);
|
|
2139
|
-
var pcb_hole_rect =
|
|
2140
|
-
type:
|
|
2156
|
+
var pcb_hole_rect = z117.object({
|
|
2157
|
+
type: z117.literal("pcb_hole"),
|
|
2141
2158
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
2142
|
-
pcb_group_id:
|
|
2143
|
-
subcircuit_id:
|
|
2144
|
-
pcb_component_id:
|
|
2145
|
-
hole_shape:
|
|
2146
|
-
hole_width:
|
|
2147
|
-
hole_height:
|
|
2159
|
+
pcb_group_id: z117.string().optional(),
|
|
2160
|
+
subcircuit_id: z117.string().optional(),
|
|
2161
|
+
pcb_component_id: z117.string().optional(),
|
|
2162
|
+
hole_shape: z117.literal("rect"),
|
|
2163
|
+
hole_width: z117.number(),
|
|
2164
|
+
hole_height: z117.number(),
|
|
2148
2165
|
x: distance,
|
|
2149
2166
|
y: distance,
|
|
2150
|
-
is_covered_with_solder_mask:
|
|
2151
|
-
soldermask_margin:
|
|
2167
|
+
is_covered_with_solder_mask: z117.boolean().optional(),
|
|
2168
|
+
soldermask_margin: z117.number().optional()
|
|
2152
2169
|
});
|
|
2153
2170
|
var pcb_hole_rect_shape = pcb_hole_rect.describe(
|
|
2154
2171
|
"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."
|
|
2155
2172
|
);
|
|
2156
2173
|
expectTypesMatch(true);
|
|
2157
|
-
var pcb_hole_circle_or_square =
|
|
2158
|
-
type:
|
|
2174
|
+
var pcb_hole_circle_or_square = z117.object({
|
|
2175
|
+
type: z117.literal("pcb_hole"),
|
|
2159
2176
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
2160
|
-
pcb_group_id:
|
|
2161
|
-
subcircuit_id:
|
|
2162
|
-
pcb_component_id:
|
|
2163
|
-
hole_shape:
|
|
2164
|
-
hole_diameter:
|
|
2177
|
+
pcb_group_id: z117.string().optional(),
|
|
2178
|
+
subcircuit_id: z117.string().optional(),
|
|
2179
|
+
pcb_component_id: z117.string().optional(),
|
|
2180
|
+
hole_shape: z117.enum(["circle", "square"]),
|
|
2181
|
+
hole_diameter: z117.number(),
|
|
2165
2182
|
x: distance,
|
|
2166
2183
|
y: distance,
|
|
2167
|
-
is_covered_with_solder_mask:
|
|
2168
|
-
soldermask_margin:
|
|
2184
|
+
is_covered_with_solder_mask: z117.boolean().optional(),
|
|
2185
|
+
soldermask_margin: z117.number().optional()
|
|
2169
2186
|
});
|
|
2170
2187
|
var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
2171
2188
|
"Defines a circular or square hole on the PCB"
|
|
2172
2189
|
);
|
|
2173
2190
|
expectTypesMatch(true);
|
|
2174
|
-
var pcb_hole_oval =
|
|
2175
|
-
type:
|
|
2191
|
+
var pcb_hole_oval = z117.object({
|
|
2192
|
+
type: z117.literal("pcb_hole"),
|
|
2176
2193
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
2177
|
-
pcb_group_id:
|
|
2178
|
-
subcircuit_id:
|
|
2179
|
-
pcb_component_id:
|
|
2180
|
-
hole_shape:
|
|
2181
|
-
hole_width:
|
|
2182
|
-
hole_height:
|
|
2194
|
+
pcb_group_id: z117.string().optional(),
|
|
2195
|
+
subcircuit_id: z117.string().optional(),
|
|
2196
|
+
pcb_component_id: z117.string().optional(),
|
|
2197
|
+
hole_shape: z117.literal("oval"),
|
|
2198
|
+
hole_width: z117.number(),
|
|
2199
|
+
hole_height: z117.number(),
|
|
2183
2200
|
x: distance,
|
|
2184
2201
|
y: distance,
|
|
2185
|
-
is_covered_with_solder_mask:
|
|
2186
|
-
soldermask_margin:
|
|
2202
|
+
is_covered_with_solder_mask: z117.boolean().optional(),
|
|
2203
|
+
soldermask_margin: z117.number().optional()
|
|
2187
2204
|
});
|
|
2188
2205
|
var pcb_hole_oval_shape = pcb_hole_oval.describe(
|
|
2189
2206
|
"Defines an oval hole on the PCB"
|
|
2190
2207
|
);
|
|
2191
2208
|
expectTypesMatch(true);
|
|
2192
|
-
var pcb_hole_pill =
|
|
2193
|
-
type:
|
|
2209
|
+
var pcb_hole_pill = z117.object({
|
|
2210
|
+
type: z117.literal("pcb_hole"),
|
|
2194
2211
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
2195
|
-
pcb_group_id:
|
|
2196
|
-
subcircuit_id:
|
|
2197
|
-
pcb_component_id:
|
|
2198
|
-
hole_shape:
|
|
2199
|
-
hole_width:
|
|
2200
|
-
hole_height:
|
|
2212
|
+
pcb_group_id: z117.string().optional(),
|
|
2213
|
+
subcircuit_id: z117.string().optional(),
|
|
2214
|
+
pcb_component_id: z117.string().optional(),
|
|
2215
|
+
hole_shape: z117.literal("pill"),
|
|
2216
|
+
hole_width: z117.number(),
|
|
2217
|
+
hole_height: z117.number(),
|
|
2201
2218
|
x: distance,
|
|
2202
2219
|
y: distance,
|
|
2203
|
-
is_covered_with_solder_mask:
|
|
2204
|
-
soldermask_margin:
|
|
2220
|
+
is_covered_with_solder_mask: z117.boolean().optional(),
|
|
2221
|
+
soldermask_margin: z117.number().optional()
|
|
2205
2222
|
});
|
|
2206
2223
|
var pcb_hole_pill_shape = pcb_hole_pill.describe(
|
|
2207
2224
|
"Defines a pill-shaped hole on the PCB"
|
|
2208
2225
|
);
|
|
2209
2226
|
expectTypesMatch(true);
|
|
2210
|
-
var pcb_hole_rotated_pill =
|
|
2211
|
-
type:
|
|
2227
|
+
var pcb_hole_rotated_pill = z117.object({
|
|
2228
|
+
type: z117.literal("pcb_hole"),
|
|
2212
2229
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
2213
|
-
pcb_group_id:
|
|
2214
|
-
subcircuit_id:
|
|
2215
|
-
pcb_component_id:
|
|
2216
|
-
hole_shape:
|
|
2217
|
-
hole_width:
|
|
2218
|
-
hole_height:
|
|
2230
|
+
pcb_group_id: z117.string().optional(),
|
|
2231
|
+
subcircuit_id: z117.string().optional(),
|
|
2232
|
+
pcb_component_id: z117.string().optional(),
|
|
2233
|
+
hole_shape: z117.literal("rotated_pill"),
|
|
2234
|
+
hole_width: z117.number(),
|
|
2235
|
+
hole_height: z117.number(),
|
|
2219
2236
|
x: distance,
|
|
2220
2237
|
y: distance,
|
|
2221
2238
|
ccw_rotation: rotation,
|
|
2222
|
-
is_covered_with_solder_mask:
|
|
2223
|
-
soldermask_margin:
|
|
2239
|
+
is_covered_with_solder_mask: z117.boolean().optional(),
|
|
2240
|
+
soldermask_margin: z117.number().optional()
|
|
2224
2241
|
});
|
|
2225
2242
|
var pcb_hole_rotated_pill_shape = pcb_hole_rotated_pill.describe(
|
|
2226
2243
|
"Defines a rotated pill-shaped hole on the PCB"
|
|
@@ -2229,147 +2246,147 @@ expectTypesMatch(true);
|
|
|
2229
2246
|
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);
|
|
2230
2247
|
|
|
2231
2248
|
// src/pcb/pcb_plated_hole.ts
|
|
2232
|
-
import { z as
|
|
2233
|
-
var pcb_plated_hole_circle =
|
|
2234
|
-
type:
|
|
2235
|
-
shape:
|
|
2236
|
-
pcb_group_id:
|
|
2237
|
-
subcircuit_id:
|
|
2238
|
-
outer_diameter:
|
|
2239
|
-
hole_diameter:
|
|
2240
|
-
is_covered_with_solder_mask:
|
|
2249
|
+
import { z as z118 } from "zod";
|
|
2250
|
+
var pcb_plated_hole_circle = z118.object({
|
|
2251
|
+
type: z118.literal("pcb_plated_hole"),
|
|
2252
|
+
shape: z118.literal("circle"),
|
|
2253
|
+
pcb_group_id: z118.string().optional(),
|
|
2254
|
+
subcircuit_id: z118.string().optional(),
|
|
2255
|
+
outer_diameter: z118.number(),
|
|
2256
|
+
hole_diameter: z118.number(),
|
|
2257
|
+
is_covered_with_solder_mask: z118.boolean().optional(),
|
|
2241
2258
|
x: distance,
|
|
2242
2259
|
y: distance,
|
|
2243
|
-
layers:
|
|
2244
|
-
port_hints:
|
|
2245
|
-
pcb_component_id:
|
|
2246
|
-
pcb_port_id:
|
|
2260
|
+
layers: z118.array(layer_ref),
|
|
2261
|
+
port_hints: z118.array(z118.string()).optional(),
|
|
2262
|
+
pcb_component_id: z118.string().optional(),
|
|
2263
|
+
pcb_port_id: z118.string().optional(),
|
|
2247
2264
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2248
|
-
soldermask_margin:
|
|
2265
|
+
soldermask_margin: z118.number().optional()
|
|
2249
2266
|
});
|
|
2250
|
-
var pcb_plated_hole_oval =
|
|
2251
|
-
type:
|
|
2252
|
-
shape:
|
|
2253
|
-
pcb_group_id:
|
|
2254
|
-
subcircuit_id:
|
|
2255
|
-
outer_width:
|
|
2256
|
-
outer_height:
|
|
2257
|
-
hole_width:
|
|
2258
|
-
hole_height:
|
|
2259
|
-
is_covered_with_solder_mask:
|
|
2267
|
+
var pcb_plated_hole_oval = z118.object({
|
|
2268
|
+
type: z118.literal("pcb_plated_hole"),
|
|
2269
|
+
shape: z118.enum(["oval", "pill"]),
|
|
2270
|
+
pcb_group_id: z118.string().optional(),
|
|
2271
|
+
subcircuit_id: z118.string().optional(),
|
|
2272
|
+
outer_width: z118.number(),
|
|
2273
|
+
outer_height: z118.number(),
|
|
2274
|
+
hole_width: z118.number(),
|
|
2275
|
+
hole_height: z118.number(),
|
|
2276
|
+
is_covered_with_solder_mask: z118.boolean().optional(),
|
|
2260
2277
|
x: distance,
|
|
2261
2278
|
y: distance,
|
|
2262
2279
|
ccw_rotation: rotation,
|
|
2263
|
-
layers:
|
|
2264
|
-
port_hints:
|
|
2265
|
-
pcb_component_id:
|
|
2266
|
-
pcb_port_id:
|
|
2280
|
+
layers: z118.array(layer_ref),
|
|
2281
|
+
port_hints: z118.array(z118.string()).optional(),
|
|
2282
|
+
pcb_component_id: z118.string().optional(),
|
|
2283
|
+
pcb_port_id: z118.string().optional(),
|
|
2267
2284
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2268
|
-
soldermask_margin:
|
|
2285
|
+
soldermask_margin: z118.number().optional()
|
|
2269
2286
|
});
|
|
2270
|
-
var pcb_circular_hole_with_rect_pad =
|
|
2271
|
-
type:
|
|
2272
|
-
shape:
|
|
2273
|
-
pcb_group_id:
|
|
2274
|
-
subcircuit_id:
|
|
2275
|
-
hole_shape:
|
|
2276
|
-
pad_shape:
|
|
2277
|
-
hole_diameter:
|
|
2278
|
-
rect_pad_width:
|
|
2279
|
-
rect_pad_height:
|
|
2280
|
-
rect_border_radius:
|
|
2287
|
+
var pcb_circular_hole_with_rect_pad = z118.object({
|
|
2288
|
+
type: z118.literal("pcb_plated_hole"),
|
|
2289
|
+
shape: z118.literal("circular_hole_with_rect_pad"),
|
|
2290
|
+
pcb_group_id: z118.string().optional(),
|
|
2291
|
+
subcircuit_id: z118.string().optional(),
|
|
2292
|
+
hole_shape: z118.literal("circle"),
|
|
2293
|
+
pad_shape: z118.literal("rect"),
|
|
2294
|
+
hole_diameter: z118.number(),
|
|
2295
|
+
rect_pad_width: z118.number(),
|
|
2296
|
+
rect_pad_height: z118.number(),
|
|
2297
|
+
rect_border_radius: z118.number().optional(),
|
|
2281
2298
|
hole_offset_x: distance.default(0),
|
|
2282
2299
|
hole_offset_y: distance.default(0),
|
|
2283
|
-
is_covered_with_solder_mask:
|
|
2300
|
+
is_covered_with_solder_mask: z118.boolean().optional(),
|
|
2284
2301
|
x: distance,
|
|
2285
2302
|
y: distance,
|
|
2286
|
-
layers:
|
|
2287
|
-
port_hints:
|
|
2288
|
-
pcb_component_id:
|
|
2289
|
-
pcb_port_id:
|
|
2303
|
+
layers: z118.array(layer_ref),
|
|
2304
|
+
port_hints: z118.array(z118.string()).optional(),
|
|
2305
|
+
pcb_component_id: z118.string().optional(),
|
|
2306
|
+
pcb_port_id: z118.string().optional(),
|
|
2290
2307
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2291
|
-
soldermask_margin:
|
|
2308
|
+
soldermask_margin: z118.number().optional(),
|
|
2292
2309
|
rect_ccw_rotation: rotation.optional()
|
|
2293
2310
|
});
|
|
2294
|
-
var pcb_pill_hole_with_rect_pad =
|
|
2295
|
-
type:
|
|
2296
|
-
shape:
|
|
2297
|
-
pcb_group_id:
|
|
2298
|
-
subcircuit_id:
|
|
2299
|
-
hole_shape:
|
|
2300
|
-
pad_shape:
|
|
2301
|
-
hole_width:
|
|
2302
|
-
hole_height:
|
|
2303
|
-
rect_pad_width:
|
|
2304
|
-
rect_pad_height:
|
|
2305
|
-
rect_border_radius:
|
|
2311
|
+
var pcb_pill_hole_with_rect_pad = z118.object({
|
|
2312
|
+
type: z118.literal("pcb_plated_hole"),
|
|
2313
|
+
shape: z118.literal("pill_hole_with_rect_pad"),
|
|
2314
|
+
pcb_group_id: z118.string().optional(),
|
|
2315
|
+
subcircuit_id: z118.string().optional(),
|
|
2316
|
+
hole_shape: z118.literal("pill"),
|
|
2317
|
+
pad_shape: z118.literal("rect"),
|
|
2318
|
+
hole_width: z118.number(),
|
|
2319
|
+
hole_height: z118.number(),
|
|
2320
|
+
rect_pad_width: z118.number(),
|
|
2321
|
+
rect_pad_height: z118.number(),
|
|
2322
|
+
rect_border_radius: z118.number().optional(),
|
|
2306
2323
|
hole_offset_x: distance.default(0),
|
|
2307
2324
|
hole_offset_y: distance.default(0),
|
|
2308
|
-
is_covered_with_solder_mask:
|
|
2325
|
+
is_covered_with_solder_mask: z118.boolean().optional(),
|
|
2309
2326
|
x: distance,
|
|
2310
2327
|
y: distance,
|
|
2311
|
-
layers:
|
|
2312
|
-
port_hints:
|
|
2313
|
-
pcb_component_id:
|
|
2314
|
-
pcb_port_id:
|
|
2328
|
+
layers: z118.array(layer_ref),
|
|
2329
|
+
port_hints: z118.array(z118.string()).optional(),
|
|
2330
|
+
pcb_component_id: z118.string().optional(),
|
|
2331
|
+
pcb_port_id: z118.string().optional(),
|
|
2315
2332
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2316
|
-
soldermask_margin:
|
|
2333
|
+
soldermask_margin: z118.number().optional()
|
|
2317
2334
|
});
|
|
2318
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
2319
|
-
type:
|
|
2320
|
-
shape:
|
|
2321
|
-
pcb_group_id:
|
|
2322
|
-
subcircuit_id:
|
|
2323
|
-
hole_shape:
|
|
2324
|
-
pad_shape:
|
|
2325
|
-
hole_width:
|
|
2326
|
-
hole_height:
|
|
2335
|
+
var pcb_rotated_pill_hole_with_rect_pad = z118.object({
|
|
2336
|
+
type: z118.literal("pcb_plated_hole"),
|
|
2337
|
+
shape: z118.literal("rotated_pill_hole_with_rect_pad"),
|
|
2338
|
+
pcb_group_id: z118.string().optional(),
|
|
2339
|
+
subcircuit_id: z118.string().optional(),
|
|
2340
|
+
hole_shape: z118.literal("rotated_pill"),
|
|
2341
|
+
pad_shape: z118.literal("rect"),
|
|
2342
|
+
hole_width: z118.number(),
|
|
2343
|
+
hole_height: z118.number(),
|
|
2327
2344
|
hole_ccw_rotation: rotation,
|
|
2328
|
-
rect_pad_width:
|
|
2329
|
-
rect_pad_height:
|
|
2330
|
-
rect_border_radius:
|
|
2345
|
+
rect_pad_width: z118.number(),
|
|
2346
|
+
rect_pad_height: z118.number(),
|
|
2347
|
+
rect_border_radius: z118.number().optional(),
|
|
2331
2348
|
rect_ccw_rotation: rotation,
|
|
2332
2349
|
hole_offset_x: distance.default(0),
|
|
2333
2350
|
hole_offset_y: distance.default(0),
|
|
2334
|
-
is_covered_with_solder_mask:
|
|
2351
|
+
is_covered_with_solder_mask: z118.boolean().optional(),
|
|
2335
2352
|
x: distance,
|
|
2336
2353
|
y: distance,
|
|
2337
|
-
layers:
|
|
2338
|
-
port_hints:
|
|
2339
|
-
pcb_component_id:
|
|
2340
|
-
pcb_port_id:
|
|
2354
|
+
layers: z118.array(layer_ref),
|
|
2355
|
+
port_hints: z118.array(z118.string()).optional(),
|
|
2356
|
+
pcb_component_id: z118.string().optional(),
|
|
2357
|
+
pcb_port_id: z118.string().optional(),
|
|
2341
2358
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2342
|
-
soldermask_margin:
|
|
2359
|
+
soldermask_margin: z118.number().optional()
|
|
2343
2360
|
});
|
|
2344
|
-
var pcb_hole_with_polygon_pad =
|
|
2345
|
-
type:
|
|
2346
|
-
shape:
|
|
2347
|
-
pcb_group_id:
|
|
2348
|
-
subcircuit_id:
|
|
2349
|
-
hole_shape:
|
|
2350
|
-
hole_diameter:
|
|
2351
|
-
hole_width:
|
|
2352
|
-
hole_height:
|
|
2353
|
-
pad_outline:
|
|
2354
|
-
|
|
2361
|
+
var pcb_hole_with_polygon_pad = z118.object({
|
|
2362
|
+
type: z118.literal("pcb_plated_hole"),
|
|
2363
|
+
shape: z118.literal("hole_with_polygon_pad"),
|
|
2364
|
+
pcb_group_id: z118.string().optional(),
|
|
2365
|
+
subcircuit_id: z118.string().optional(),
|
|
2366
|
+
hole_shape: z118.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
2367
|
+
hole_diameter: z118.number().optional(),
|
|
2368
|
+
hole_width: z118.number().optional(),
|
|
2369
|
+
hole_height: z118.number().optional(),
|
|
2370
|
+
pad_outline: z118.array(
|
|
2371
|
+
z118.object({
|
|
2355
2372
|
x: distance,
|
|
2356
2373
|
y: distance
|
|
2357
2374
|
})
|
|
2358
2375
|
).min(3),
|
|
2359
2376
|
hole_offset_x: distance.default(0),
|
|
2360
2377
|
hole_offset_y: distance.default(0),
|
|
2361
|
-
is_covered_with_solder_mask:
|
|
2378
|
+
is_covered_with_solder_mask: z118.boolean().optional(),
|
|
2362
2379
|
x: distance,
|
|
2363
2380
|
y: distance,
|
|
2364
|
-
layers:
|
|
2365
|
-
port_hints:
|
|
2366
|
-
pcb_component_id:
|
|
2367
|
-
pcb_port_id:
|
|
2381
|
+
layers: z118.array(layer_ref),
|
|
2382
|
+
port_hints: z118.array(z118.string()).optional(),
|
|
2383
|
+
pcb_component_id: z118.string().optional(),
|
|
2384
|
+
pcb_port_id: z118.string().optional(),
|
|
2368
2385
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2369
|
-
soldermask_margin:
|
|
2386
|
+
soldermask_margin: z118.number().optional(),
|
|
2370
2387
|
ccw_rotation: rotation.optional()
|
|
2371
2388
|
});
|
|
2372
|
-
var pcb_plated_hole =
|
|
2389
|
+
var pcb_plated_hole = z118.union([
|
|
2373
2390
|
pcb_plated_hole_circle,
|
|
2374
2391
|
pcb_plated_hole_oval,
|
|
2375
2392
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -2387,144 +2404,144 @@ expectTypesMatch(true);
|
|
|
2387
2404
|
expectTypesMatch(true);
|
|
2388
2405
|
|
|
2389
2406
|
// src/pcb/pcb_port.ts
|
|
2390
|
-
import { z as
|
|
2391
|
-
var pcb_port =
|
|
2392
|
-
type:
|
|
2407
|
+
import { z as z119 } from "zod";
|
|
2408
|
+
var pcb_port = z119.object({
|
|
2409
|
+
type: z119.literal("pcb_port"),
|
|
2393
2410
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
2394
|
-
pcb_group_id:
|
|
2395
|
-
subcircuit_id:
|
|
2396
|
-
source_port_id:
|
|
2397
|
-
pcb_component_id:
|
|
2411
|
+
pcb_group_id: z119.string().optional(),
|
|
2412
|
+
subcircuit_id: z119.string().optional(),
|
|
2413
|
+
source_port_id: z119.string(),
|
|
2414
|
+
pcb_component_id: z119.string().optional(),
|
|
2398
2415
|
x: distance,
|
|
2399
2416
|
y: distance,
|
|
2400
|
-
layers:
|
|
2401
|
-
is_board_pinout:
|
|
2417
|
+
layers: z119.array(layer_ref),
|
|
2418
|
+
is_board_pinout: z119.boolean().optional()
|
|
2402
2419
|
}).describe("Defines a port on the PCB");
|
|
2403
2420
|
expectTypesMatch(true);
|
|
2404
2421
|
|
|
2405
2422
|
// src/pcb/pcb_smtpad.ts
|
|
2406
|
-
import { z as
|
|
2407
|
-
var pcb_smtpad_circle =
|
|
2408
|
-
type:
|
|
2409
|
-
shape:
|
|
2423
|
+
import { z as z120 } from "zod";
|
|
2424
|
+
var pcb_smtpad_circle = z120.object({
|
|
2425
|
+
type: z120.literal("pcb_smtpad"),
|
|
2426
|
+
shape: z120.literal("circle"),
|
|
2410
2427
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2411
|
-
pcb_group_id:
|
|
2412
|
-
subcircuit_id:
|
|
2428
|
+
pcb_group_id: z120.string().optional(),
|
|
2429
|
+
subcircuit_id: z120.string().optional(),
|
|
2413
2430
|
x: distance,
|
|
2414
2431
|
y: distance,
|
|
2415
|
-
radius:
|
|
2432
|
+
radius: z120.number(),
|
|
2416
2433
|
layer: layer_ref,
|
|
2417
|
-
port_hints:
|
|
2418
|
-
pcb_component_id:
|
|
2419
|
-
pcb_port_id:
|
|
2420
|
-
is_covered_with_solder_mask:
|
|
2421
|
-
soldermask_margin:
|
|
2422
|
-
solderpaste_margin:
|
|
2423
|
-
});
|
|
2424
|
-
var pcb_smtpad_rect =
|
|
2425
|
-
type:
|
|
2426
|
-
shape:
|
|
2434
|
+
port_hints: z120.array(z120.string()).optional(),
|
|
2435
|
+
pcb_component_id: z120.string().optional(),
|
|
2436
|
+
pcb_port_id: z120.string().optional(),
|
|
2437
|
+
is_covered_with_solder_mask: z120.boolean().optional(),
|
|
2438
|
+
soldermask_margin: z120.number().optional(),
|
|
2439
|
+
solderpaste_margin: z120.number().optional()
|
|
2440
|
+
});
|
|
2441
|
+
var pcb_smtpad_rect = z120.object({
|
|
2442
|
+
type: z120.literal("pcb_smtpad"),
|
|
2443
|
+
shape: z120.literal("rect"),
|
|
2427
2444
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2428
|
-
pcb_group_id:
|
|
2429
|
-
subcircuit_id:
|
|
2445
|
+
pcb_group_id: z120.string().optional(),
|
|
2446
|
+
subcircuit_id: z120.string().optional(),
|
|
2430
2447
|
x: distance,
|
|
2431
2448
|
y: distance,
|
|
2432
|
-
width:
|
|
2433
|
-
height:
|
|
2434
|
-
rect_border_radius:
|
|
2435
|
-
corner_radius:
|
|
2449
|
+
width: z120.number(),
|
|
2450
|
+
height: z120.number(),
|
|
2451
|
+
rect_border_radius: z120.number().optional(),
|
|
2452
|
+
corner_radius: z120.number().optional(),
|
|
2436
2453
|
layer: layer_ref,
|
|
2437
|
-
port_hints:
|
|
2438
|
-
pcb_component_id:
|
|
2439
|
-
pcb_port_id:
|
|
2440
|
-
is_covered_with_solder_mask:
|
|
2441
|
-
soldermask_margin:
|
|
2442
|
-
soldermask_margin_left:
|
|
2443
|
-
soldermask_margin_top:
|
|
2444
|
-
soldermask_margin_right:
|
|
2445
|
-
soldermask_margin_bottom:
|
|
2446
|
-
solderpaste_margin:
|
|
2447
|
-
});
|
|
2448
|
-
var pcb_smtpad_rotated_rect =
|
|
2449
|
-
type:
|
|
2450
|
-
shape:
|
|
2454
|
+
port_hints: z120.array(z120.string()).optional(),
|
|
2455
|
+
pcb_component_id: z120.string().optional(),
|
|
2456
|
+
pcb_port_id: z120.string().optional(),
|
|
2457
|
+
is_covered_with_solder_mask: z120.boolean().optional(),
|
|
2458
|
+
soldermask_margin: z120.number().optional(),
|
|
2459
|
+
soldermask_margin_left: z120.number().optional(),
|
|
2460
|
+
soldermask_margin_top: z120.number().optional(),
|
|
2461
|
+
soldermask_margin_right: z120.number().optional(),
|
|
2462
|
+
soldermask_margin_bottom: z120.number().optional(),
|
|
2463
|
+
solderpaste_margin: z120.number().optional()
|
|
2464
|
+
});
|
|
2465
|
+
var pcb_smtpad_rotated_rect = z120.object({
|
|
2466
|
+
type: z120.literal("pcb_smtpad"),
|
|
2467
|
+
shape: z120.literal("rotated_rect"),
|
|
2451
2468
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2452
|
-
pcb_group_id:
|
|
2453
|
-
subcircuit_id:
|
|
2469
|
+
pcb_group_id: z120.string().optional(),
|
|
2470
|
+
subcircuit_id: z120.string().optional(),
|
|
2454
2471
|
x: distance,
|
|
2455
2472
|
y: distance,
|
|
2456
|
-
width:
|
|
2457
|
-
height:
|
|
2458
|
-
rect_border_radius:
|
|
2459
|
-
corner_radius:
|
|
2473
|
+
width: z120.number(),
|
|
2474
|
+
height: z120.number(),
|
|
2475
|
+
rect_border_radius: z120.number().optional(),
|
|
2476
|
+
corner_radius: z120.number().optional(),
|
|
2460
2477
|
ccw_rotation: rotation,
|
|
2461
2478
|
layer: layer_ref,
|
|
2462
|
-
port_hints:
|
|
2463
|
-
pcb_component_id:
|
|
2464
|
-
pcb_port_id:
|
|
2465
|
-
is_covered_with_solder_mask:
|
|
2466
|
-
soldermask_margin:
|
|
2467
|
-
soldermask_margin_left:
|
|
2468
|
-
soldermask_margin_top:
|
|
2469
|
-
soldermask_margin_right:
|
|
2470
|
-
soldermask_margin_bottom:
|
|
2471
|
-
solderpaste_margin:
|
|
2472
|
-
});
|
|
2473
|
-
var pcb_smtpad_pill =
|
|
2474
|
-
type:
|
|
2475
|
-
shape:
|
|
2479
|
+
port_hints: z120.array(z120.string()).optional(),
|
|
2480
|
+
pcb_component_id: z120.string().optional(),
|
|
2481
|
+
pcb_port_id: z120.string().optional(),
|
|
2482
|
+
is_covered_with_solder_mask: z120.boolean().optional(),
|
|
2483
|
+
soldermask_margin: z120.number().optional(),
|
|
2484
|
+
soldermask_margin_left: z120.number().optional(),
|
|
2485
|
+
soldermask_margin_top: z120.number().optional(),
|
|
2486
|
+
soldermask_margin_right: z120.number().optional(),
|
|
2487
|
+
soldermask_margin_bottom: z120.number().optional(),
|
|
2488
|
+
solderpaste_margin: z120.number().optional()
|
|
2489
|
+
});
|
|
2490
|
+
var pcb_smtpad_pill = z120.object({
|
|
2491
|
+
type: z120.literal("pcb_smtpad"),
|
|
2492
|
+
shape: z120.literal("pill"),
|
|
2476
2493
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2477
|
-
pcb_group_id:
|
|
2478
|
-
subcircuit_id:
|
|
2494
|
+
pcb_group_id: z120.string().optional(),
|
|
2495
|
+
subcircuit_id: z120.string().optional(),
|
|
2479
2496
|
x: distance,
|
|
2480
2497
|
y: distance,
|
|
2481
|
-
width:
|
|
2482
|
-
height:
|
|
2483
|
-
radius:
|
|
2498
|
+
width: z120.number(),
|
|
2499
|
+
height: z120.number(),
|
|
2500
|
+
radius: z120.number(),
|
|
2484
2501
|
layer: layer_ref,
|
|
2485
|
-
port_hints:
|
|
2486
|
-
pcb_component_id:
|
|
2487
|
-
pcb_port_id:
|
|
2488
|
-
is_covered_with_solder_mask:
|
|
2489
|
-
soldermask_margin:
|
|
2490
|
-
solderpaste_margin:
|
|
2491
|
-
});
|
|
2492
|
-
var pcb_smtpad_rotated_pill =
|
|
2493
|
-
type:
|
|
2494
|
-
shape:
|
|
2502
|
+
port_hints: z120.array(z120.string()).optional(),
|
|
2503
|
+
pcb_component_id: z120.string().optional(),
|
|
2504
|
+
pcb_port_id: z120.string().optional(),
|
|
2505
|
+
is_covered_with_solder_mask: z120.boolean().optional(),
|
|
2506
|
+
soldermask_margin: z120.number().optional(),
|
|
2507
|
+
solderpaste_margin: z120.number().optional()
|
|
2508
|
+
});
|
|
2509
|
+
var pcb_smtpad_rotated_pill = z120.object({
|
|
2510
|
+
type: z120.literal("pcb_smtpad"),
|
|
2511
|
+
shape: z120.literal("rotated_pill"),
|
|
2495
2512
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2496
|
-
pcb_group_id:
|
|
2497
|
-
subcircuit_id:
|
|
2513
|
+
pcb_group_id: z120.string().optional(),
|
|
2514
|
+
subcircuit_id: z120.string().optional(),
|
|
2498
2515
|
x: distance,
|
|
2499
2516
|
y: distance,
|
|
2500
|
-
width:
|
|
2501
|
-
height:
|
|
2502
|
-
radius:
|
|
2517
|
+
width: z120.number(),
|
|
2518
|
+
height: z120.number(),
|
|
2519
|
+
radius: z120.number(),
|
|
2503
2520
|
ccw_rotation: rotation,
|
|
2504
2521
|
layer: layer_ref,
|
|
2505
|
-
port_hints:
|
|
2506
|
-
pcb_component_id:
|
|
2507
|
-
pcb_port_id:
|
|
2508
|
-
is_covered_with_solder_mask:
|
|
2509
|
-
soldermask_margin:
|
|
2510
|
-
solderpaste_margin:
|
|
2511
|
-
});
|
|
2512
|
-
var pcb_smtpad_polygon =
|
|
2513
|
-
type:
|
|
2514
|
-
shape:
|
|
2522
|
+
port_hints: z120.array(z120.string()).optional(),
|
|
2523
|
+
pcb_component_id: z120.string().optional(),
|
|
2524
|
+
pcb_port_id: z120.string().optional(),
|
|
2525
|
+
is_covered_with_solder_mask: z120.boolean().optional(),
|
|
2526
|
+
soldermask_margin: z120.number().optional(),
|
|
2527
|
+
solderpaste_margin: z120.number().optional()
|
|
2528
|
+
});
|
|
2529
|
+
var pcb_smtpad_polygon = z120.object({
|
|
2530
|
+
type: z120.literal("pcb_smtpad"),
|
|
2531
|
+
shape: z120.literal("polygon"),
|
|
2515
2532
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2516
|
-
pcb_group_id:
|
|
2517
|
-
subcircuit_id:
|
|
2518
|
-
points:
|
|
2533
|
+
pcb_group_id: z120.string().optional(),
|
|
2534
|
+
subcircuit_id: z120.string().optional(),
|
|
2535
|
+
points: z120.array(point),
|
|
2519
2536
|
layer: layer_ref,
|
|
2520
|
-
port_hints:
|
|
2521
|
-
pcb_component_id:
|
|
2522
|
-
pcb_port_id:
|
|
2523
|
-
is_covered_with_solder_mask:
|
|
2524
|
-
soldermask_margin:
|
|
2525
|
-
solderpaste_margin:
|
|
2537
|
+
port_hints: z120.array(z120.string()).optional(),
|
|
2538
|
+
pcb_component_id: z120.string().optional(),
|
|
2539
|
+
pcb_port_id: z120.string().optional(),
|
|
2540
|
+
is_covered_with_solder_mask: z120.boolean().optional(),
|
|
2541
|
+
soldermask_margin: z120.number().optional(),
|
|
2542
|
+
solderpaste_margin: z120.number().optional()
|
|
2526
2543
|
});
|
|
2527
|
-
var pcb_smtpad =
|
|
2544
|
+
var pcb_smtpad = z120.discriminatedUnion("shape", [
|
|
2528
2545
|
pcb_smtpad_circle,
|
|
2529
2546
|
pcb_smtpad_rect,
|
|
2530
2547
|
pcb_smtpad_rotated_rect,
|
|
@@ -2540,105 +2557,105 @@ expectTypesMatch(true);
|
|
|
2540
2557
|
expectTypesMatch(true);
|
|
2541
2558
|
|
|
2542
2559
|
// src/pcb/pcb_solder_paste.ts
|
|
2543
|
-
import { z as
|
|
2544
|
-
var pcb_solder_paste_circle =
|
|
2545
|
-
type:
|
|
2546
|
-
shape:
|
|
2560
|
+
import { z as z121 } from "zod";
|
|
2561
|
+
var pcb_solder_paste_circle = z121.object({
|
|
2562
|
+
type: z121.literal("pcb_solder_paste"),
|
|
2563
|
+
shape: z121.literal("circle"),
|
|
2547
2564
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2548
|
-
pcb_group_id:
|
|
2549
|
-
subcircuit_id:
|
|
2565
|
+
pcb_group_id: z121.string().optional(),
|
|
2566
|
+
subcircuit_id: z121.string().optional(),
|
|
2550
2567
|
x: distance,
|
|
2551
2568
|
y: distance,
|
|
2552
|
-
radius:
|
|
2569
|
+
radius: z121.number(),
|
|
2553
2570
|
layer: layer_ref,
|
|
2554
|
-
pcb_component_id:
|
|
2555
|
-
pcb_smtpad_id:
|
|
2571
|
+
pcb_component_id: z121.string().optional(),
|
|
2572
|
+
pcb_smtpad_id: z121.string().optional()
|
|
2556
2573
|
});
|
|
2557
|
-
var pcb_solder_paste_rect =
|
|
2558
|
-
type:
|
|
2559
|
-
shape:
|
|
2574
|
+
var pcb_solder_paste_rect = z121.object({
|
|
2575
|
+
type: z121.literal("pcb_solder_paste"),
|
|
2576
|
+
shape: z121.literal("rect"),
|
|
2560
2577
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2561
|
-
pcb_group_id:
|
|
2562
|
-
subcircuit_id:
|
|
2578
|
+
pcb_group_id: z121.string().optional(),
|
|
2579
|
+
subcircuit_id: z121.string().optional(),
|
|
2563
2580
|
x: distance,
|
|
2564
2581
|
y: distance,
|
|
2565
|
-
width:
|
|
2566
|
-
height:
|
|
2582
|
+
width: z121.number(),
|
|
2583
|
+
height: z121.number(),
|
|
2567
2584
|
layer: layer_ref,
|
|
2568
|
-
pcb_component_id:
|
|
2569
|
-
pcb_smtpad_id:
|
|
2585
|
+
pcb_component_id: z121.string().optional(),
|
|
2586
|
+
pcb_smtpad_id: z121.string().optional()
|
|
2570
2587
|
});
|
|
2571
|
-
var pcb_solder_paste_pill =
|
|
2572
|
-
type:
|
|
2573
|
-
shape:
|
|
2588
|
+
var pcb_solder_paste_pill = z121.object({
|
|
2589
|
+
type: z121.literal("pcb_solder_paste"),
|
|
2590
|
+
shape: z121.literal("pill"),
|
|
2574
2591
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2575
|
-
pcb_group_id:
|
|
2576
|
-
subcircuit_id:
|
|
2592
|
+
pcb_group_id: z121.string().optional(),
|
|
2593
|
+
subcircuit_id: z121.string().optional(),
|
|
2577
2594
|
x: distance,
|
|
2578
2595
|
y: distance,
|
|
2579
|
-
width:
|
|
2580
|
-
height:
|
|
2581
|
-
radius:
|
|
2596
|
+
width: z121.number(),
|
|
2597
|
+
height: z121.number(),
|
|
2598
|
+
radius: z121.number(),
|
|
2582
2599
|
layer: layer_ref,
|
|
2583
|
-
pcb_component_id:
|
|
2584
|
-
pcb_smtpad_id:
|
|
2600
|
+
pcb_component_id: z121.string().optional(),
|
|
2601
|
+
pcb_smtpad_id: z121.string().optional()
|
|
2585
2602
|
});
|
|
2586
|
-
var pcb_solder_paste_rotated_rect =
|
|
2587
|
-
type:
|
|
2588
|
-
shape:
|
|
2603
|
+
var pcb_solder_paste_rotated_rect = z121.object({
|
|
2604
|
+
type: z121.literal("pcb_solder_paste"),
|
|
2605
|
+
shape: z121.literal("rotated_rect"),
|
|
2589
2606
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2590
|
-
pcb_group_id:
|
|
2591
|
-
subcircuit_id:
|
|
2607
|
+
pcb_group_id: z121.string().optional(),
|
|
2608
|
+
subcircuit_id: z121.string().optional(),
|
|
2592
2609
|
x: distance,
|
|
2593
2610
|
y: distance,
|
|
2594
|
-
width:
|
|
2595
|
-
height:
|
|
2611
|
+
width: z121.number(),
|
|
2612
|
+
height: z121.number(),
|
|
2596
2613
|
ccw_rotation: distance,
|
|
2597
2614
|
layer: layer_ref,
|
|
2598
|
-
pcb_component_id:
|
|
2599
|
-
pcb_smtpad_id:
|
|
2615
|
+
pcb_component_id: z121.string().optional(),
|
|
2616
|
+
pcb_smtpad_id: z121.string().optional()
|
|
2600
2617
|
});
|
|
2601
|
-
var pcb_solder_paste_rotated_pill =
|
|
2602
|
-
type:
|
|
2603
|
-
shape:
|
|
2618
|
+
var pcb_solder_paste_rotated_pill = z121.object({
|
|
2619
|
+
type: z121.literal("pcb_solder_paste"),
|
|
2620
|
+
shape: z121.literal("rotated_pill"),
|
|
2604
2621
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2605
|
-
pcb_group_id:
|
|
2606
|
-
subcircuit_id:
|
|
2622
|
+
pcb_group_id: z121.string().optional(),
|
|
2623
|
+
subcircuit_id: z121.string().optional(),
|
|
2607
2624
|
x: distance,
|
|
2608
2625
|
y: distance,
|
|
2609
|
-
width:
|
|
2610
|
-
height:
|
|
2611
|
-
radius:
|
|
2626
|
+
width: z121.number(),
|
|
2627
|
+
height: z121.number(),
|
|
2628
|
+
radius: z121.number(),
|
|
2612
2629
|
ccw_rotation: rotation,
|
|
2613
2630
|
layer: layer_ref,
|
|
2614
|
-
pcb_component_id:
|
|
2615
|
-
pcb_smtpad_id:
|
|
2631
|
+
pcb_component_id: z121.string().optional(),
|
|
2632
|
+
pcb_smtpad_id: z121.string().optional()
|
|
2616
2633
|
});
|
|
2617
|
-
var pcb_solder_paste_oval =
|
|
2618
|
-
type:
|
|
2619
|
-
shape:
|
|
2634
|
+
var pcb_solder_paste_oval = z121.object({
|
|
2635
|
+
type: z121.literal("pcb_solder_paste"),
|
|
2636
|
+
shape: z121.literal("oval"),
|
|
2620
2637
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2621
|
-
pcb_group_id:
|
|
2622
|
-
subcircuit_id:
|
|
2638
|
+
pcb_group_id: z121.string().optional(),
|
|
2639
|
+
subcircuit_id: z121.string().optional(),
|
|
2623
2640
|
x: distance,
|
|
2624
2641
|
y: distance,
|
|
2625
|
-
width:
|
|
2626
|
-
height:
|
|
2642
|
+
width: z121.number(),
|
|
2643
|
+
height: z121.number(),
|
|
2627
2644
|
layer: layer_ref,
|
|
2628
|
-
pcb_component_id:
|
|
2629
|
-
pcb_smtpad_id:
|
|
2645
|
+
pcb_component_id: z121.string().optional(),
|
|
2646
|
+
pcb_smtpad_id: z121.string().optional()
|
|
2630
2647
|
});
|
|
2631
2648
|
var pcb_solder_paste_polygon = polygon_shape.extend({
|
|
2632
|
-
type:
|
|
2649
|
+
type: z121.literal("pcb_solder_paste"),
|
|
2633
2650
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2634
|
-
pcb_group_id:
|
|
2635
|
-
subcircuit_id:
|
|
2636
|
-
holes:
|
|
2651
|
+
pcb_group_id: z121.string().optional(),
|
|
2652
|
+
subcircuit_id: z121.string().optional(),
|
|
2653
|
+
holes: z121.array(polygon_shape.shape.points).optional(),
|
|
2637
2654
|
layer: layer_ref,
|
|
2638
|
-
pcb_component_id:
|
|
2639
|
-
pcb_smtpad_id:
|
|
2655
|
+
pcb_component_id: z121.string().optional(),
|
|
2656
|
+
pcb_smtpad_id: z121.string().optional()
|
|
2640
2657
|
});
|
|
2641
|
-
var pcb_solder_paste =
|
|
2658
|
+
var pcb_solder_paste = z121.union([
|
|
2642
2659
|
pcb_solder_paste_circle,
|
|
2643
2660
|
pcb_solder_paste_rect,
|
|
2644
2661
|
pcb_solder_paste_pill,
|
|
@@ -2660,18 +2677,18 @@ expectTypesMatch(true);
|
|
|
2660
2677
|
expectTypesMatch(true);
|
|
2661
2678
|
|
|
2662
2679
|
// src/pcb/pcb_soldermask_opening.ts
|
|
2663
|
-
import { z as
|
|
2664
|
-
var opening_base =
|
|
2665
|
-
type:
|
|
2680
|
+
import { z as z122 } from "zod";
|
|
2681
|
+
var opening_base = z122.object({
|
|
2682
|
+
type: z122.literal("pcb_soldermask_opening"),
|
|
2666
2683
|
pcb_soldermask_opening_id: getZodPrefixedIdWithDefault(
|
|
2667
2684
|
"pcb_soldermask_opening"
|
|
2668
2685
|
),
|
|
2669
2686
|
layer: layer_ref.pipe(visible_layer),
|
|
2670
|
-
pcb_component_id:
|
|
2671
|
-
pcb_group_id:
|
|
2672
|
-
subcircuit_id:
|
|
2687
|
+
pcb_component_id: z122.string().optional(),
|
|
2688
|
+
pcb_group_id: z122.string().optional(),
|
|
2689
|
+
subcircuit_id: z122.string().optional()
|
|
2673
2690
|
});
|
|
2674
|
-
var pcb_soldermask_opening =
|
|
2691
|
+
var pcb_soldermask_opening = z122.discriminatedUnion("shape", [
|
|
2675
2692
|
circle_shape.extend(opening_base.shape),
|
|
2676
2693
|
rect_shape.extend(opening_base.shape),
|
|
2677
2694
|
rotated_rect_shape.extend(opening_base.shape),
|
|
@@ -2684,38 +2701,38 @@ expectTypesMatch(
|
|
|
2684
2701
|
);
|
|
2685
2702
|
|
|
2686
2703
|
// src/pcb/pcb_text.ts
|
|
2687
|
-
import { z as
|
|
2688
|
-
var pcb_text =
|
|
2689
|
-
type:
|
|
2704
|
+
import { z as z123 } from "zod";
|
|
2705
|
+
var pcb_text = z123.object({
|
|
2706
|
+
type: z123.literal("pcb_text"),
|
|
2690
2707
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
2691
|
-
pcb_group_id:
|
|
2692
|
-
subcircuit_id:
|
|
2693
|
-
text:
|
|
2708
|
+
pcb_group_id: z123.string().optional(),
|
|
2709
|
+
subcircuit_id: z123.string().optional(),
|
|
2710
|
+
text: z123.string(),
|
|
2694
2711
|
center: point,
|
|
2695
2712
|
layer: layer_ref,
|
|
2696
2713
|
width: length,
|
|
2697
2714
|
height: length,
|
|
2698
|
-
lines:
|
|
2715
|
+
lines: z123.number(),
|
|
2699
2716
|
// @ts-ignore
|
|
2700
|
-
align:
|
|
2717
|
+
align: z123.enum(["bottom-left"])
|
|
2701
2718
|
}).describe("Defines text on the PCB");
|
|
2702
2719
|
expectTypesMatch(true);
|
|
2703
2720
|
|
|
2704
2721
|
// src/pcb/pcb_trace.ts
|
|
2705
|
-
import { z as
|
|
2706
|
-
var positive_width = distance.pipe(
|
|
2707
|
-
var pcb_trace_route_point_wire =
|
|
2708
|
-
route_type:
|
|
2722
|
+
import { z as z124 } from "zod";
|
|
2723
|
+
var positive_width = distance.pipe(z124.number().finite().positive());
|
|
2724
|
+
var pcb_trace_route_point_wire = z124.object({
|
|
2725
|
+
route_type: z124.literal("wire"),
|
|
2709
2726
|
x: distance,
|
|
2710
2727
|
y: distance,
|
|
2711
2728
|
width: distance,
|
|
2712
2729
|
start_width: positive_width.optional(),
|
|
2713
2730
|
end_width: positive_width.optional(),
|
|
2714
|
-
width_interpolation_mode:
|
|
2715
|
-
copper_pour_id:
|
|
2716
|
-
is_inside_copper_pour:
|
|
2717
|
-
start_pcb_port_id:
|
|
2718
|
-
end_pcb_port_id:
|
|
2731
|
+
width_interpolation_mode: z124.enum(["linear", "quadratic"]).optional(),
|
|
2732
|
+
copper_pour_id: z124.string().optional(),
|
|
2733
|
+
is_inside_copper_pour: z124.boolean().optional(),
|
|
2734
|
+
start_pcb_port_id: z124.string().optional(),
|
|
2735
|
+
end_pcb_port_id: z124.string().optional(),
|
|
2719
2736
|
layer: layer_ref
|
|
2720
2737
|
}).superRefine((wire, ctx) => {
|
|
2721
2738
|
const present = [
|
|
@@ -2726,66 +2743,66 @@ var pcb_trace_route_point_wire = z123.object({
|
|
|
2726
2743
|
if (present === 0) return;
|
|
2727
2744
|
if (present !== 3) {
|
|
2728
2745
|
ctx.addIssue({
|
|
2729
|
-
code:
|
|
2746
|
+
code: z124.ZodIssueCode.custom,
|
|
2730
2747
|
message: "Wire taper requires start_width, end_width and width_interpolation_mode together"
|
|
2731
2748
|
});
|
|
2732
2749
|
}
|
|
2733
2750
|
if (wire.width !== wire.start_width) {
|
|
2734
2751
|
ctx.addIssue({
|
|
2735
|
-
code:
|
|
2752
|
+
code: z124.ZodIssueCode.custom,
|
|
2736
2753
|
path: ["start_width"],
|
|
2737
2754
|
message: "start_width must equal width"
|
|
2738
2755
|
});
|
|
2739
2756
|
}
|
|
2740
2757
|
if (!Number.isFinite(wire.x) || !Number.isFinite(wire.y)) {
|
|
2741
2758
|
ctx.addIssue({
|
|
2742
|
-
code:
|
|
2759
|
+
code: z124.ZodIssueCode.custom,
|
|
2743
2760
|
message: "Tapered wire coordinates must be finite"
|
|
2744
2761
|
});
|
|
2745
2762
|
}
|
|
2746
2763
|
});
|
|
2747
|
-
var pcb_trace_route_point_via =
|
|
2748
|
-
route_type:
|
|
2764
|
+
var pcb_trace_route_point_via = z124.object({
|
|
2765
|
+
route_type: z124.literal("via"),
|
|
2749
2766
|
x: distance,
|
|
2750
2767
|
y: distance,
|
|
2751
|
-
copper_pour_id:
|
|
2752
|
-
is_inside_copper_pour:
|
|
2768
|
+
copper_pour_id: z124.string().optional(),
|
|
2769
|
+
is_inside_copper_pour: z124.boolean().optional(),
|
|
2753
2770
|
hole_diameter: distance.optional(),
|
|
2754
2771
|
outer_diameter: distance.optional(),
|
|
2755
|
-
tented_on_top:
|
|
2756
|
-
tented_on_bottom:
|
|
2772
|
+
tented_on_top: z124.boolean().optional(),
|
|
2773
|
+
tented_on_bottom: z124.boolean().optional(),
|
|
2757
2774
|
from_layer: layer_ref,
|
|
2758
2775
|
to_layer: layer_ref
|
|
2759
2776
|
});
|
|
2760
|
-
var pcb_trace_route_point_through_pad =
|
|
2761
|
-
route_type:
|
|
2777
|
+
var pcb_trace_route_point_through_pad = z124.object({
|
|
2778
|
+
route_type: z124.literal("through_pad"),
|
|
2762
2779
|
start: point,
|
|
2763
2780
|
end: point,
|
|
2764
2781
|
width: distance,
|
|
2765
2782
|
start_layer: layer_ref,
|
|
2766
2783
|
end_layer: layer_ref,
|
|
2767
|
-
pcb_smtpad_id:
|
|
2768
|
-
pcb_plated_hole_id:
|
|
2784
|
+
pcb_smtpad_id: z124.string().optional(),
|
|
2785
|
+
pcb_plated_hole_id: z124.string().optional()
|
|
2769
2786
|
});
|
|
2770
|
-
var pcb_trace_route_point =
|
|
2787
|
+
var pcb_trace_route_point = z124.union([
|
|
2771
2788
|
pcb_trace_route_point_wire,
|
|
2772
2789
|
pcb_trace_route_point_via,
|
|
2773
2790
|
pcb_trace_route_point_through_pad
|
|
2774
2791
|
]);
|
|
2775
|
-
var pcb_trace =
|
|
2776
|
-
type:
|
|
2777
|
-
source_trace_id:
|
|
2778
|
-
pcb_component_id:
|
|
2792
|
+
var pcb_trace = z124.object({
|
|
2793
|
+
type: z124.literal("pcb_trace"),
|
|
2794
|
+
source_trace_id: z124.string().optional(),
|
|
2795
|
+
pcb_component_id: z124.string().optional(),
|
|
2779
2796
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
2780
|
-
pcb_group_id:
|
|
2781
|
-
subcircuit_id:
|
|
2782
|
-
route_thickness_mode:
|
|
2783
|
-
route_order_index:
|
|
2784
|
-
should_round_corners:
|
|
2785
|
-
trace_length:
|
|
2786
|
-
is_antenna_trace:
|
|
2787
|
-
highlight_color:
|
|
2788
|
-
route:
|
|
2797
|
+
pcb_group_id: z124.string().optional(),
|
|
2798
|
+
subcircuit_id: z124.string().optional(),
|
|
2799
|
+
route_thickness_mode: z124.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
2800
|
+
route_order_index: z124.number().optional(),
|
|
2801
|
+
should_round_corners: z124.boolean().optional(),
|
|
2802
|
+
trace_length: z124.number().optional(),
|
|
2803
|
+
is_antenna_trace: z124.boolean().optional(),
|
|
2804
|
+
highlight_color: z124.string().optional(),
|
|
2805
|
+
route: z124.array(pcb_trace_route_point).superRefine((route, ctx) => {
|
|
2789
2806
|
for (const [i, wire] of route.entries()) {
|
|
2790
2807
|
if (wire.route_type !== "wire" || wire.width_interpolation_mode === void 0)
|
|
2791
2808
|
continue;
|
|
@@ -2795,7 +2812,7 @@ var pcb_trace = z123.object({
|
|
|
2795
2812
|
const length4 = end ? Math.hypot(end.x - wire.x, end.y - wire.y) : NaN;
|
|
2796
2813
|
if (!Number.isFinite(length4) || length4 <= 0 || layer !== wire.layer) {
|
|
2797
2814
|
ctx.addIssue({
|
|
2798
|
-
code:
|
|
2815
|
+
code: z124.ZodIssueCode.custom,
|
|
2799
2816
|
path: [i],
|
|
2800
2817
|
message: "Tapered wire must lead to a distinct finite next point on the same layer"
|
|
2801
2818
|
});
|
|
@@ -2807,164 +2824,164 @@ expectTypesMatch(true);
|
|
|
2807
2824
|
expectTypesMatch(true);
|
|
2808
2825
|
|
|
2809
2826
|
// src/pcb/pcb_trace_warning.ts
|
|
2810
|
-
import { z as
|
|
2811
|
-
var pcb_trace_warning =
|
|
2812
|
-
type:
|
|
2827
|
+
import { z as z125 } from "zod";
|
|
2828
|
+
var pcb_trace_warning = z125.object({
|
|
2829
|
+
type: z125.literal("pcb_trace_warning"),
|
|
2813
2830
|
pcb_trace_warning_id: getZodPrefixedIdWithDefault("pcb_trace_warning"),
|
|
2814
|
-
warning_type:
|
|
2815
|
-
message:
|
|
2831
|
+
warning_type: z125.literal("pcb_trace_warning").default("pcb_trace_warning"),
|
|
2832
|
+
message: z125.string(),
|
|
2816
2833
|
center: point.optional(),
|
|
2817
|
-
pcb_trace_id:
|
|
2818
|
-
source_trace_id:
|
|
2819
|
-
pcb_component_ids:
|
|
2820
|
-
pcb_port_ids:
|
|
2821
|
-
subcircuit_id:
|
|
2834
|
+
pcb_trace_id: z125.string(),
|
|
2835
|
+
source_trace_id: z125.string(),
|
|
2836
|
+
pcb_component_ids: z125.array(z125.string()),
|
|
2837
|
+
pcb_port_ids: z125.array(z125.string()),
|
|
2838
|
+
subcircuit_id: z125.string().optional()
|
|
2822
2839
|
}).describe("Defines a trace warning on the PCB");
|
|
2823
2840
|
expectTypesMatch(true);
|
|
2824
2841
|
|
|
2825
2842
|
// src/pcb/pcb_trace_too_long_error.ts
|
|
2826
|
-
import { z as
|
|
2827
|
-
var pcb_trace_too_long_error =
|
|
2828
|
-
type:
|
|
2843
|
+
import { z as z126 } from "zod";
|
|
2844
|
+
var pcb_trace_too_long_error = z126.object({
|
|
2845
|
+
type: z126.literal("pcb_trace_too_long_error"),
|
|
2829
2846
|
pcb_trace_too_long_error_id: getZodPrefixedIdWithDefault(
|
|
2830
2847
|
"pcb_trace_too_long_error"
|
|
2831
2848
|
),
|
|
2832
|
-
error_type:
|
|
2833
|
-
message:
|
|
2834
|
-
pcb_trace_id:
|
|
2835
|
-
source_net_id:
|
|
2836
|
-
source_trace_id:
|
|
2849
|
+
error_type: z126.literal("pcb_trace_too_long_error").default("pcb_trace_too_long_error"),
|
|
2850
|
+
message: z126.string(),
|
|
2851
|
+
pcb_trace_id: z126.string(),
|
|
2852
|
+
source_net_id: z126.string().optional(),
|
|
2853
|
+
source_trace_id: z126.string().optional(),
|
|
2837
2854
|
actual_trace_length: distance,
|
|
2838
2855
|
maximum_trace_length: distance,
|
|
2839
|
-
subcircuit_id:
|
|
2856
|
+
subcircuit_id: z126.string().optional()
|
|
2840
2857
|
}).describe(
|
|
2841
2858
|
"Error emitted when a PCB trace is longer than its maximum allowed length"
|
|
2842
2859
|
);
|
|
2843
2860
|
expectTypesMatch(true);
|
|
2844
2861
|
|
|
2845
2862
|
// src/pcb/pcb_bus_length_skew_error.ts
|
|
2846
|
-
import { z as
|
|
2863
|
+
import { z as z127 } from "zod";
|
|
2847
2864
|
var pcb_bus_length_skew_error = base_circuit_json_error.extend({
|
|
2848
|
-
type:
|
|
2865
|
+
type: z127.literal("pcb_bus_length_skew_error"),
|
|
2849
2866
|
pcb_bus_length_skew_error_id: getZodPrefixedIdWithDefault(
|
|
2850
2867
|
"pcb_bus_length_skew_error"
|
|
2851
2868
|
),
|
|
2852
|
-
error_type:
|
|
2853
|
-
source_bus_id:
|
|
2854
|
-
source_trace_ids:
|
|
2855
|
-
pcb_trace_ids:
|
|
2856
|
-
actual_length_skew:
|
|
2857
|
-
maximum_length_skew:
|
|
2858
|
-
subcircuit_id:
|
|
2869
|
+
error_type: z127.literal("pcb_bus_length_skew_error").default("pcb_bus_length_skew_error"),
|
|
2870
|
+
source_bus_id: z127.string(),
|
|
2871
|
+
source_trace_ids: z127.array(z127.string()),
|
|
2872
|
+
pcb_trace_ids: z127.array(z127.string()),
|
|
2873
|
+
actual_length_skew: z127.number().nonnegative().finite(),
|
|
2874
|
+
maximum_length_skew: z127.number().nonnegative().finite(),
|
|
2875
|
+
subcircuit_id: z127.string().optional()
|
|
2859
2876
|
});
|
|
2860
2877
|
expectTypesMatch(true);
|
|
2861
2878
|
|
|
2862
2879
|
// src/pcb/pcb_trace_too_long_warning.ts
|
|
2863
|
-
import { z as
|
|
2864
|
-
var pcb_trace_too_long_warning =
|
|
2865
|
-
type:
|
|
2880
|
+
import { z as z128 } from "zod";
|
|
2881
|
+
var pcb_trace_too_long_warning = z128.object({
|
|
2882
|
+
type: z128.literal("pcb_trace_too_long_warning"),
|
|
2866
2883
|
pcb_trace_too_long_warning_id: getZodPrefixedIdWithDefault(
|
|
2867
2884
|
"pcb_trace_too_long_warning"
|
|
2868
2885
|
),
|
|
2869
|
-
warning_type:
|
|
2870
|
-
message:
|
|
2871
|
-
pcb_trace_id:
|
|
2872
|
-
source_net_id:
|
|
2873
|
-
source_trace_id:
|
|
2886
|
+
warning_type: z128.literal("pcb_trace_too_long_warning").default("pcb_trace_too_long_warning"),
|
|
2887
|
+
message: z128.string(),
|
|
2888
|
+
pcb_trace_id: z128.string(),
|
|
2889
|
+
source_net_id: z128.string().optional(),
|
|
2890
|
+
source_trace_id: z128.string().optional(),
|
|
2874
2891
|
actual_trace_length: distance,
|
|
2875
2892
|
maximum_trace_length: distance,
|
|
2876
|
-
subcircuit_id:
|
|
2893
|
+
subcircuit_id: z128.string().optional()
|
|
2877
2894
|
}).describe(
|
|
2878
2895
|
"Warning emitted when a PCB trace is longer than its maximum allowed length"
|
|
2879
2896
|
);
|
|
2880
2897
|
expectTypesMatch(true);
|
|
2881
2898
|
|
|
2882
2899
|
// src/pcb/pcb_trace_too_many_vias_warning.ts
|
|
2883
|
-
import { z as
|
|
2884
|
-
var pcb_trace_too_many_vias_warning =
|
|
2885
|
-
type:
|
|
2900
|
+
import { z as z129 } from "zod";
|
|
2901
|
+
var pcb_trace_too_many_vias_warning = z129.object({
|
|
2902
|
+
type: z129.literal("pcb_trace_too_many_vias_warning"),
|
|
2886
2903
|
pcb_trace_too_many_vias_warning_id: getZodPrefixedIdWithDefault(
|
|
2887
2904
|
"pcb_trace_too_many_vias_warning"
|
|
2888
2905
|
),
|
|
2889
|
-
warning_type:
|
|
2890
|
-
message:
|
|
2891
|
-
pcb_trace_id:
|
|
2892
|
-
source_net_id:
|
|
2893
|
-
source_trace_id:
|
|
2894
|
-
actual_via_count:
|
|
2895
|
-
maximum_via_count:
|
|
2896
|
-
subcircuit_id:
|
|
2906
|
+
warning_type: z129.literal("pcb_trace_too_many_vias_warning").default("pcb_trace_too_many_vias_warning"),
|
|
2907
|
+
message: z129.string(),
|
|
2908
|
+
pcb_trace_id: z129.string(),
|
|
2909
|
+
source_net_id: z129.string().optional(),
|
|
2910
|
+
source_trace_id: z129.string().optional(),
|
|
2911
|
+
actual_via_count: z129.number().int().nonnegative(),
|
|
2912
|
+
maximum_via_count: z129.number().int().nonnegative(),
|
|
2913
|
+
subcircuit_id: z129.string().optional()
|
|
2897
2914
|
}).describe(
|
|
2898
2915
|
"Warning emitted when a PCB trace has more vias than its maximum allowed count"
|
|
2899
2916
|
);
|
|
2900
2917
|
expectTypesMatch(true);
|
|
2901
2918
|
|
|
2902
2919
|
// src/pcb/pcb_bus_routing_constraint_error.ts
|
|
2903
|
-
import { z as
|
|
2920
|
+
import { z as z130 } from "zod";
|
|
2904
2921
|
var error_base = base_circuit_json_error.extend({
|
|
2905
|
-
type:
|
|
2922
|
+
type: z130.literal("pcb_bus_routing_constraint_error"),
|
|
2906
2923
|
pcb_bus_routing_constraint_error_id: getZodPrefixedIdWithDefault(
|
|
2907
2924
|
"pcb_bus_routing_constraint_error"
|
|
2908
2925
|
),
|
|
2909
|
-
error_type:
|
|
2910
|
-
source_bus_id:
|
|
2911
|
-
source_trace_ids:
|
|
2912
|
-
pcb_trace_ids:
|
|
2913
|
-
subcircuit_id:
|
|
2926
|
+
error_type: z130.literal("pcb_bus_routing_constraint_error").default("pcb_bus_routing_constraint_error"),
|
|
2927
|
+
source_bus_id: z130.string(),
|
|
2928
|
+
source_trace_ids: z130.array(z130.string()).min(1),
|
|
2929
|
+
pcb_trace_ids: z130.array(z130.string()),
|
|
2930
|
+
subcircuit_id: z130.string().optional()
|
|
2914
2931
|
});
|
|
2915
|
-
var pcb_bus_routing_constraint_error =
|
|
2932
|
+
var pcb_bus_routing_constraint_error = z130.discriminatedUnion("routing_rule", [
|
|
2916
2933
|
error_base.extend({
|
|
2917
|
-
routing_rule:
|
|
2918
|
-
actual_length_skew:
|
|
2919
|
-
maximum_length_skew:
|
|
2934
|
+
routing_rule: z130.literal("length_skew"),
|
|
2935
|
+
actual_length_skew: z130.number().nonnegative().finite(),
|
|
2936
|
+
maximum_length_skew: z130.number().nonnegative().finite()
|
|
2920
2937
|
}),
|
|
2921
2938
|
error_base.extend({
|
|
2922
|
-
routing_rule:
|
|
2923
|
-
actual_trace_length:
|
|
2924
|
-
minimum_trace_length:
|
|
2939
|
+
routing_rule: z130.literal("min_length"),
|
|
2940
|
+
actual_trace_length: z130.number().nonnegative().finite(),
|
|
2941
|
+
minimum_trace_length: z130.number().finite()
|
|
2925
2942
|
}),
|
|
2926
2943
|
error_base.extend({
|
|
2927
|
-
routing_rule:
|
|
2928
|
-
actual_trace_length:
|
|
2929
|
-
maximum_trace_length:
|
|
2944
|
+
routing_rule: z130.literal("max_length"),
|
|
2945
|
+
actual_trace_length: z130.number().nonnegative().finite(),
|
|
2946
|
+
maximum_trace_length: z130.number().finite()
|
|
2930
2947
|
}),
|
|
2931
2948
|
error_base.extend({
|
|
2932
|
-
routing_rule:
|
|
2933
|
-
actual_trace_length:
|
|
2934
|
-
target_trace_length:
|
|
2935
|
-
length_tolerance:
|
|
2949
|
+
routing_rule: z130.literal("target_length"),
|
|
2950
|
+
actual_trace_length: z130.number().nonnegative().finite(),
|
|
2951
|
+
target_trace_length: z130.number().finite(),
|
|
2952
|
+
length_tolerance: z130.number().nonnegative().finite()
|
|
2936
2953
|
}),
|
|
2937
2954
|
error_base.extend({
|
|
2938
|
-
routing_rule:
|
|
2939
|
-
other_pcb_trace_id:
|
|
2940
|
-
other_source_trace_id:
|
|
2941
|
-
actual_centerline_spacing:
|
|
2942
|
-
minimum_centerline_spacing:
|
|
2955
|
+
routing_rule: z130.literal("pcb_trace_spacing"),
|
|
2956
|
+
other_pcb_trace_id: z130.string(),
|
|
2957
|
+
other_source_trace_id: z130.string().optional(),
|
|
2958
|
+
actual_centerline_spacing: z130.number().nonnegative().finite(),
|
|
2959
|
+
minimum_centerline_spacing: z130.number().positive().finite()
|
|
2943
2960
|
}),
|
|
2944
2961
|
error_base.extend({
|
|
2945
|
-
routing_rule:
|
|
2946
|
-
other_pcb_trace_id:
|
|
2947
|
-
other_source_trace_id:
|
|
2948
|
-
actual_centerline_spacing:
|
|
2949
|
-
minimum_centerline_spacing:
|
|
2962
|
+
routing_rule: z130.literal("pcb_spacing_to_other_signals"),
|
|
2963
|
+
other_pcb_trace_id: z130.string(),
|
|
2964
|
+
other_source_trace_id: z130.string().optional(),
|
|
2965
|
+
actual_centerline_spacing: z130.number().nonnegative().finite(),
|
|
2966
|
+
minimum_centerline_spacing: z130.number().positive().finite()
|
|
2950
2967
|
}),
|
|
2951
2968
|
error_base.extend({
|
|
2952
|
-
routing_rule:
|
|
2953
|
-
target_impedance:
|
|
2954
|
-
minimum_impedance:
|
|
2955
|
-
maximum_impedance:
|
|
2969
|
+
routing_rule: z130.literal("impedance_target"),
|
|
2970
|
+
target_impedance: z130.number().positive().finite(),
|
|
2971
|
+
minimum_impedance: z130.number().positive().finite().optional(),
|
|
2972
|
+
maximum_impedance: z130.number().positive().finite().optional()
|
|
2956
2973
|
})
|
|
2957
2974
|
]).superRefine((error, ctx) => {
|
|
2958
2975
|
if (error.routing_rule !== "impedance_target") return;
|
|
2959
2976
|
if (error.minimum_impedance === void 0 && error.maximum_impedance === void 0)
|
|
2960
2977
|
ctx.addIssue({
|
|
2961
|
-
code:
|
|
2978
|
+
code: z130.ZodIssueCode.custom,
|
|
2962
2979
|
path: ["minimum_impedance"],
|
|
2963
2980
|
message: "Provide an impedance bound"
|
|
2964
2981
|
});
|
|
2965
2982
|
if (error.minimum_impedance !== void 0 && error.maximum_impedance !== void 0 && error.minimum_impedance > error.maximum_impedance)
|
|
2966
2983
|
ctx.addIssue({
|
|
2967
|
-
code:
|
|
2984
|
+
code: z130.ZodIssueCode.custom,
|
|
2968
2985
|
path: ["maximum_impedance"],
|
|
2969
2986
|
message: "Impedance bounds must be ordered"
|
|
2970
2987
|
});
|
|
@@ -2974,134 +2991,134 @@ var pcb_bus_routing_constraint_error = z129.discriminatedUnion("routing_rule", [
|
|
|
2974
2991
|
expectTypesMatch(true);
|
|
2975
2992
|
|
|
2976
2993
|
// src/pcb/pcb_bus_routing_constraint_warning.ts
|
|
2977
|
-
import { z as
|
|
2978
|
-
var warning_base =
|
|
2979
|
-
type:
|
|
2994
|
+
import { z as z131 } from "zod";
|
|
2995
|
+
var warning_base = z131.object({
|
|
2996
|
+
type: z131.literal("pcb_bus_routing_constraint_warning"),
|
|
2980
2997
|
pcb_bus_routing_constraint_warning_id: getZodPrefixedIdWithDefault(
|
|
2981
2998
|
"pcb_bus_routing_constraint_warning"
|
|
2982
2999
|
),
|
|
2983
|
-
warning_type:
|
|
2984
|
-
source_bus_id:
|
|
2985
|
-
source_trace_ids:
|
|
2986
|
-
pcb_trace_ids:
|
|
2987
|
-
message:
|
|
2988
|
-
subcircuit_id:
|
|
3000
|
+
warning_type: z131.literal("pcb_bus_routing_constraint_warning").default("pcb_bus_routing_constraint_warning"),
|
|
3001
|
+
source_bus_id: z131.string(),
|
|
3002
|
+
source_trace_ids: z131.array(z131.string()).min(1),
|
|
3003
|
+
pcb_trace_ids: z131.array(z131.string()),
|
|
3004
|
+
message: z131.string(),
|
|
3005
|
+
subcircuit_id: z131.string().optional()
|
|
2989
3006
|
}).describe(
|
|
2990
3007
|
"A declared bus or pair constraint could not be verified; this is not a pass."
|
|
2991
3008
|
);
|
|
2992
|
-
var pcb_bus_routing_constraint_warning =
|
|
3009
|
+
var pcb_bus_routing_constraint_warning = z131.discriminatedUnion(
|
|
2993
3010
|
"routing_rule",
|
|
2994
3011
|
[
|
|
2995
|
-
warning_base.extend({ routing_rule:
|
|
2996
|
-
warning_base.extend({ routing_rule:
|
|
2997
|
-
warning_base.extend({ routing_rule:
|
|
2998
|
-
warning_base.extend({ routing_rule:
|
|
2999
|
-
warning_base.extend({ routing_rule:
|
|
3012
|
+
warning_base.extend({ routing_rule: z131.literal("route_geometry") }),
|
|
3013
|
+
warning_base.extend({ routing_rule: z131.literal("reference_geometry") }),
|
|
3014
|
+
warning_base.extend({ routing_rule: z131.literal("spacing_geometry") }),
|
|
3015
|
+
warning_base.extend({ routing_rule: z131.literal("target_length") }),
|
|
3016
|
+
warning_base.extend({ routing_rule: z131.literal("physical_impedance") })
|
|
3000
3017
|
]
|
|
3001
3018
|
);
|
|
3002
3019
|
expectTypesMatch(true);
|
|
3003
3020
|
|
|
3004
3021
|
// src/pcb/pcb_trace_error.ts
|
|
3005
|
-
import { z as
|
|
3022
|
+
import { z as z132 } from "zod";
|
|
3006
3023
|
var pcb_trace_error = base_circuit_json_error.extend({
|
|
3007
|
-
type:
|
|
3024
|
+
type: z132.literal("pcb_trace_error"),
|
|
3008
3025
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
3009
|
-
error_type:
|
|
3026
|
+
error_type: z132.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
3010
3027
|
center: point.optional(),
|
|
3011
|
-
pcb_trace_id:
|
|
3012
|
-
source_trace_id:
|
|
3013
|
-
pcb_component_ids:
|
|
3014
|
-
pcb_port_ids:
|
|
3015
|
-
subcircuit_id:
|
|
3028
|
+
pcb_trace_id: z132.string(),
|
|
3029
|
+
source_trace_id: z132.string(),
|
|
3030
|
+
pcb_component_ids: z132.array(z132.string()),
|
|
3031
|
+
pcb_port_ids: z132.array(z132.string()),
|
|
3032
|
+
subcircuit_id: z132.string().optional()
|
|
3016
3033
|
}).describe("Defines a trace error on the PCB");
|
|
3017
3034
|
expectTypesMatch(true);
|
|
3018
3035
|
|
|
3019
3036
|
// src/pcb/pcb_trace_missing_error.ts
|
|
3020
|
-
import { z as
|
|
3037
|
+
import { z as z133 } from "zod";
|
|
3021
3038
|
var pcb_trace_missing_error = base_circuit_json_error.extend({
|
|
3022
|
-
type:
|
|
3039
|
+
type: z133.literal("pcb_trace_missing_error"),
|
|
3023
3040
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
3024
3041
|
"pcb_trace_missing_error"
|
|
3025
3042
|
),
|
|
3026
|
-
error_type:
|
|
3043
|
+
error_type: z133.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
3027
3044
|
center: point.optional(),
|
|
3028
|
-
source_trace_id:
|
|
3029
|
-
pcb_component_ids:
|
|
3030
|
-
pcb_port_ids:
|
|
3031
|
-
subcircuit_id:
|
|
3045
|
+
source_trace_id: z133.string(),
|
|
3046
|
+
pcb_component_ids: z133.array(z133.string()),
|
|
3047
|
+
pcb_port_ids: z133.array(z133.string()),
|
|
3048
|
+
subcircuit_id: z133.string().optional()
|
|
3032
3049
|
}).describe(
|
|
3033
3050
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
3034
3051
|
);
|
|
3035
3052
|
expectTypesMatch(true);
|
|
3036
3053
|
|
|
3037
3054
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
3038
|
-
import { z as
|
|
3055
|
+
import { z as z134 } from "zod";
|
|
3039
3056
|
var pcb_port_not_matched_error = base_circuit_json_error.extend({
|
|
3040
|
-
type:
|
|
3057
|
+
type: z134.literal("pcb_port_not_matched_error"),
|
|
3041
3058
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3042
|
-
error_type:
|
|
3043
|
-
pcb_component_ids:
|
|
3044
|
-
subcircuit_id:
|
|
3059
|
+
error_type: z134.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
3060
|
+
pcb_component_ids: z134.array(z134.string()),
|
|
3061
|
+
subcircuit_id: z134.string().optional()
|
|
3045
3062
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
3046
3063
|
expectTypesMatch(true);
|
|
3047
3064
|
|
|
3048
3065
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
3049
|
-
import { z as
|
|
3066
|
+
import { z as z135 } from "zod";
|
|
3050
3067
|
var pcb_port_not_connected_error = base_circuit_json_error.extend({
|
|
3051
|
-
type:
|
|
3068
|
+
type: z135.literal("pcb_port_not_connected_error"),
|
|
3052
3069
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
3053
3070
|
"pcb_port_not_connected_error"
|
|
3054
3071
|
),
|
|
3055
|
-
error_type:
|
|
3056
|
-
pcb_port_ids:
|
|
3057
|
-
pcb_component_ids:
|
|
3058
|
-
subcircuit_id:
|
|
3072
|
+
error_type: z135.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
3073
|
+
pcb_port_ids: z135.array(z135.string()),
|
|
3074
|
+
pcb_component_ids: z135.array(z135.string()),
|
|
3075
|
+
subcircuit_id: z135.string().optional()
|
|
3059
3076
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
3060
3077
|
expectTypesMatch(
|
|
3061
3078
|
true
|
|
3062
3079
|
);
|
|
3063
3080
|
|
|
3064
3081
|
// src/pcb/pcb_net.ts
|
|
3065
|
-
import { z as
|
|
3066
|
-
var pcb_net =
|
|
3067
|
-
type:
|
|
3082
|
+
import { z as z136 } from "zod";
|
|
3083
|
+
var pcb_net = z136.object({
|
|
3084
|
+
type: z136.literal("pcb_net"),
|
|
3068
3085
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
3069
|
-
source_net_id:
|
|
3070
|
-
highlight_color:
|
|
3086
|
+
source_net_id: z136.string().optional(),
|
|
3087
|
+
highlight_color: z136.string().optional()
|
|
3071
3088
|
}).describe("Defines a net on the PCB");
|
|
3072
3089
|
expectTypesMatch(true);
|
|
3073
3090
|
|
|
3074
3091
|
// src/pcb/pcb_via.ts
|
|
3075
|
-
import { z as
|
|
3076
|
-
var pcb_via =
|
|
3077
|
-
type:
|
|
3092
|
+
import { z as z137 } from "zod";
|
|
3093
|
+
var pcb_via = z137.object({
|
|
3094
|
+
type: z137.literal("pcb_via"),
|
|
3078
3095
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
3079
|
-
pcb_group_id:
|
|
3080
|
-
subcircuit_id:
|
|
3081
|
-
subcircuit_connectivity_map_key:
|
|
3096
|
+
pcb_group_id: z137.string().optional(),
|
|
3097
|
+
subcircuit_id: z137.string().optional(),
|
|
3098
|
+
subcircuit_connectivity_map_key: z137.string().optional(),
|
|
3082
3099
|
x: distance,
|
|
3083
3100
|
y: distance,
|
|
3084
3101
|
outer_diameter: distance.default("0.6mm"),
|
|
3085
3102
|
hole_diameter: distance.default("0.25mm"),
|
|
3086
3103
|
topmost_drill_layer: layer_ref.optional(),
|
|
3087
3104
|
bottommost_drill_layer: layer_ref.optional(),
|
|
3088
|
-
through_hole:
|
|
3105
|
+
through_hole: z137.boolean().optional(),
|
|
3089
3106
|
/** @deprecated */
|
|
3090
3107
|
from_layer: layer_ref.optional(),
|
|
3091
3108
|
/** @deprecated */
|
|
3092
3109
|
to_layer: layer_ref.optional(),
|
|
3093
|
-
layers:
|
|
3110
|
+
layers: z137.array(layer_ref),
|
|
3094
3111
|
/** PCB ports belonging to this via, including layer ports and aliases. */
|
|
3095
|
-
pcb_port_ids:
|
|
3096
|
-
pcb_trace_id:
|
|
3097
|
-
source_trace_id:
|
|
3098
|
-
source_net_id:
|
|
3099
|
-
net_is_assignable:
|
|
3100
|
-
net_assigned:
|
|
3112
|
+
pcb_port_ids: z137.array(z137.string()).optional(),
|
|
3113
|
+
pcb_trace_id: z137.string().optional(),
|
|
3114
|
+
source_trace_id: z137.string().optional(),
|
|
3115
|
+
source_net_id: z137.string().min(1).optional(),
|
|
3116
|
+
net_is_assignable: z137.boolean().optional(),
|
|
3117
|
+
net_assigned: z137.boolean().optional(),
|
|
3101
3118
|
/** @deprecated Use tented_on_top and tented_on_bottom instead. */
|
|
3102
|
-
is_tented:
|
|
3103
|
-
tented_on_top:
|
|
3104
|
-
tented_on_bottom:
|
|
3119
|
+
is_tented: z137.boolean().optional(),
|
|
3120
|
+
tented_on_top: z137.boolean().optional(),
|
|
3121
|
+
tented_on_bottom: z137.boolean().optional()
|
|
3105
3122
|
}).transform(({ is_tented, ...via }) => {
|
|
3106
3123
|
if (is_tented !== void 0) {
|
|
3107
3124
|
via.tented_on_top ??= is_tented;
|
|
@@ -3112,62 +3129,62 @@ var pcb_via = z136.object({
|
|
|
3112
3129
|
expectTypesMatch(true);
|
|
3113
3130
|
|
|
3114
3131
|
// src/pcb/pcb_board.ts
|
|
3115
|
-
import { z as
|
|
3116
|
-
var pcb_board =
|
|
3117
|
-
type:
|
|
3132
|
+
import { z as z138 } from "zod";
|
|
3133
|
+
var pcb_board = z138.object({
|
|
3134
|
+
type: z138.literal("pcb_board"),
|
|
3118
3135
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
3119
|
-
pcb_panel_id:
|
|
3120
|
-
carrier_pcb_board_id:
|
|
3121
|
-
is_subcircuit:
|
|
3122
|
-
subcircuit_id:
|
|
3123
|
-
is_mounted_to_carrier_board:
|
|
3124
|
-
is_via_in_pad_allowed:
|
|
3125
|
-
default_via_tented_on_top:
|
|
3126
|
-
default_via_tented_on_bottom:
|
|
3127
|
-
default_via_plugged:
|
|
3136
|
+
pcb_panel_id: z138.string().optional(),
|
|
3137
|
+
carrier_pcb_board_id: z138.string().optional(),
|
|
3138
|
+
is_subcircuit: z138.boolean().optional(),
|
|
3139
|
+
subcircuit_id: z138.string().optional(),
|
|
3140
|
+
is_mounted_to_carrier_board: z138.boolean().optional(),
|
|
3141
|
+
is_via_in_pad_allowed: z138.boolean().optional(),
|
|
3142
|
+
default_via_tented_on_top: z138.boolean().optional(),
|
|
3143
|
+
default_via_tented_on_bottom: z138.boolean().optional(),
|
|
3144
|
+
default_via_plugged: z138.boolean().optional(),
|
|
3128
3145
|
width: length.optional(),
|
|
3129
3146
|
height: length.optional(),
|
|
3130
3147
|
center: point,
|
|
3131
|
-
display_offset_x:
|
|
3148
|
+
display_offset_x: z138.string().optional().describe(
|
|
3132
3149
|
"How to display the x offset for this board, usually corresponding with how the user specified it"
|
|
3133
3150
|
),
|
|
3134
|
-
display_offset_y:
|
|
3151
|
+
display_offset_y: z138.string().optional().describe(
|
|
3135
3152
|
"How to display the y offset for this board, usually corresponding with how the user specified it"
|
|
3136
3153
|
),
|
|
3137
3154
|
thickness: length.optional().default(1.4),
|
|
3138
|
-
num_layers:
|
|
3139
|
-
allow_blind_and_buried_vias:
|
|
3155
|
+
num_layers: z138.number().optional().default(4),
|
|
3156
|
+
allow_blind_and_buried_vias: z138.boolean().optional().describe(
|
|
3140
3157
|
"Whether autorouters may generate blind and buried vias. False restricts newly generated vias to the full board stack."
|
|
3141
3158
|
),
|
|
3142
|
-
outline:
|
|
3143
|
-
shape:
|
|
3144
|
-
material:
|
|
3145
|
-
solder_mask_color:
|
|
3146
|
-
silkscreen_color:
|
|
3159
|
+
outline: z138.array(point).optional(),
|
|
3160
|
+
shape: z138.enum(["rect", "polygon"]).optional(),
|
|
3161
|
+
material: z138.enum(["fr4", "fr1", "flex"]).default("fr4"),
|
|
3162
|
+
solder_mask_color: z138.string().optional(),
|
|
3163
|
+
silkscreen_color: z138.string().optional(),
|
|
3147
3164
|
anchor_position: point.optional(),
|
|
3148
3165
|
anchor_alignment: ninePointAnchor.optional(),
|
|
3149
|
-
position_mode:
|
|
3166
|
+
position_mode: z138.enum(["relative_to_panel_anchor", "none"]).optional()
|
|
3150
3167
|
}).merge(manufacturing_drc_properties).describe("Defines the board outline of the PCB");
|
|
3151
3168
|
expectTypesMatch(true);
|
|
3152
3169
|
|
|
3153
3170
|
// src/pcb/pcb_bend.ts
|
|
3154
|
-
import { z as
|
|
3171
|
+
import { z as z139 } from "zod";
|
|
3155
3172
|
var finite_point = point.extend({
|
|
3156
|
-
x: length.pipe(
|
|
3157
|
-
y: length.pipe(
|
|
3173
|
+
x: length.pipe(z139.number().finite()),
|
|
3174
|
+
y: length.pipe(z139.number().finite())
|
|
3158
3175
|
});
|
|
3159
|
-
var pcb_bend =
|
|
3160
|
-
type:
|
|
3176
|
+
var pcb_bend = z139.object({
|
|
3177
|
+
type: z139.literal("pcb_bend"),
|
|
3161
3178
|
pcb_bend_id: getZodPrefixedIdWithDefault("pcb_bend"),
|
|
3162
|
-
pcb_board_id:
|
|
3163
|
-
pcb_group_id:
|
|
3164
|
-
subcircuit_id:
|
|
3165
|
-
name:
|
|
3179
|
+
pcb_board_id: z139.string(),
|
|
3180
|
+
pcb_group_id: z139.string().optional(),
|
|
3181
|
+
subcircuit_id: z139.string().optional(),
|
|
3182
|
+
name: z139.string().optional(),
|
|
3166
3183
|
start: finite_point,
|
|
3167
3184
|
end: finite_point,
|
|
3168
|
-
bend_angle: rotation.pipe(
|
|
3169
|
-
bend_radius: length.pipe(
|
|
3170
|
-
bend_side:
|
|
3185
|
+
bend_angle: rotation.pipe(z139.number().finite()),
|
|
3186
|
+
bend_radius: length.pipe(z139.number().finite().positive()),
|
|
3187
|
+
bend_side: z139.enum(["left", "right"])
|
|
3171
3188
|
}).refine(({ start, end }) => start.x !== end.x || start.y !== end.y, {
|
|
3172
3189
|
message: "Bend centerline endpoints must be distinct",
|
|
3173
3190
|
path: ["end"]
|
|
@@ -3177,123 +3194,123 @@ var pcb_bend = z138.object({
|
|
|
3177
3194
|
expectTypesMatch(true);
|
|
3178
3195
|
|
|
3179
3196
|
// src/pcb/pcb_stiffener.ts
|
|
3180
|
-
import { z as
|
|
3181
|
-
var positive_length = length.pipe(
|
|
3197
|
+
import { z as z140 } from "zod";
|
|
3198
|
+
var positive_length = length.pipe(z140.number().finite().positive());
|
|
3182
3199
|
var finite_point2 = point.extend({
|
|
3183
|
-
x: length.pipe(
|
|
3184
|
-
y: length.pipe(
|
|
3200
|
+
x: length.pipe(z140.number().finite()),
|
|
3201
|
+
y: length.pipe(z140.number().finite())
|
|
3185
3202
|
});
|
|
3186
|
-
var pcb_stiffener_base =
|
|
3187
|
-
type:
|
|
3203
|
+
var pcb_stiffener_base = z140.object({
|
|
3204
|
+
type: z140.literal("pcb_stiffener"),
|
|
3188
3205
|
pcb_stiffener_id: getZodPrefixedIdWithDefault("pcb_stiffener"),
|
|
3189
|
-
pcb_board_id:
|
|
3190
|
-
pcb_group_id:
|
|
3191
|
-
subcircuit_id:
|
|
3192
|
-
name:
|
|
3193
|
-
layer:
|
|
3194
|
-
material:
|
|
3206
|
+
pcb_board_id: z140.string(),
|
|
3207
|
+
pcb_group_id: z140.string().optional(),
|
|
3208
|
+
subcircuit_id: z140.string().optional(),
|
|
3209
|
+
name: z140.string().optional(),
|
|
3210
|
+
layer: z140.enum(["top", "bottom"]),
|
|
3211
|
+
material: z140.enum(["fr4", "polyimide", "stainless_steel", "aluminum"]),
|
|
3195
3212
|
thickness: positive_length,
|
|
3196
|
-
adhesive_thickness: length.pipe(
|
|
3213
|
+
adhesive_thickness: length.pipe(z140.number().finite().nonnegative()).optional()
|
|
3197
3214
|
});
|
|
3198
3215
|
var pcb_stiffener_rect = pcb_stiffener_base.extend({
|
|
3199
|
-
shape:
|
|
3216
|
+
shape: z140.literal("rect"),
|
|
3200
3217
|
center: finite_point2,
|
|
3201
|
-
rotation: rotation.pipe(
|
|
3218
|
+
rotation: rotation.pipe(z140.number().finite()).optional(),
|
|
3202
3219
|
width: positive_length,
|
|
3203
3220
|
height: positive_length,
|
|
3204
|
-
outline:
|
|
3221
|
+
outline: z140.never().optional()
|
|
3205
3222
|
});
|
|
3206
3223
|
expectTypesMatch(true);
|
|
3207
3224
|
var pcb_stiffener_polygon = pcb_stiffener_base.extend({
|
|
3208
|
-
shape:
|
|
3209
|
-
outline:
|
|
3225
|
+
shape: z140.literal("polygon"),
|
|
3226
|
+
outline: z140.array(finite_point2).min(3).refine((points) => {
|
|
3210
3227
|
const twice_area = points.reduce((sum, p, i) => {
|
|
3211
3228
|
const next = points[(i + 1) % points.length];
|
|
3212
3229
|
return sum + p.x * next.y - next.x * p.y;
|
|
3213
3230
|
}, 0);
|
|
3214
3231
|
return Number.isFinite(twice_area) && twice_area !== 0;
|
|
3215
3232
|
}, "Stiffener outline must enclose a nonzero area"),
|
|
3216
|
-
center:
|
|
3217
|
-
rotation:
|
|
3218
|
-
width:
|
|
3219
|
-
height:
|
|
3233
|
+
center: z140.never().optional(),
|
|
3234
|
+
rotation: z140.never().optional(),
|
|
3235
|
+
width: z140.never().optional(),
|
|
3236
|
+
height: z140.never().optional()
|
|
3220
3237
|
});
|
|
3221
3238
|
expectTypesMatch(
|
|
3222
3239
|
true
|
|
3223
3240
|
);
|
|
3224
|
-
var pcb_stiffener =
|
|
3241
|
+
var pcb_stiffener = z140.discriminatedUnion("shape", [pcb_stiffener_rect, pcb_stiffener_polygon]).describe(
|
|
3225
3242
|
"Defines bonded mechanical PCB reinforcement without adding copper layers"
|
|
3226
3243
|
);
|
|
3227
3244
|
expectTypesMatch(true);
|
|
3228
3245
|
|
|
3229
3246
|
// src/pcb/pcb_panel.ts
|
|
3230
|
-
import { z as
|
|
3231
|
-
var pcb_panel =
|
|
3232
|
-
type:
|
|
3247
|
+
import { z as z141 } from "zod";
|
|
3248
|
+
var pcb_panel = z141.object({
|
|
3249
|
+
type: z141.literal("pcb_panel"),
|
|
3233
3250
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
3234
3251
|
width: length,
|
|
3235
3252
|
height: length,
|
|
3236
3253
|
center: point,
|
|
3237
3254
|
thickness: length.optional().default(1.4),
|
|
3238
|
-
covered_with_solder_mask:
|
|
3255
|
+
covered_with_solder_mask: z141.boolean().optional().default(true)
|
|
3239
3256
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
3240
3257
|
expectTypesMatch(true);
|
|
3241
3258
|
|
|
3242
3259
|
// src/pcb/pcb_placement_error.ts
|
|
3243
|
-
import { z as
|
|
3260
|
+
import { z as z142 } from "zod";
|
|
3244
3261
|
var pcb_placement_error = base_circuit_json_error.extend({
|
|
3245
|
-
type:
|
|
3262
|
+
type: z142.literal("pcb_placement_error"),
|
|
3246
3263
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
3247
|
-
error_type:
|
|
3248
|
-
subcircuit_id:
|
|
3264
|
+
error_type: z142.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
3265
|
+
subcircuit_id: z142.string().optional()
|
|
3249
3266
|
}).describe("Defines a placement error on the PCB");
|
|
3250
3267
|
expectTypesMatch(true);
|
|
3251
3268
|
|
|
3252
3269
|
// src/pcb/pcb_packing_error.ts
|
|
3253
|
-
import { z as
|
|
3270
|
+
import { z as z143 } from "zod";
|
|
3254
3271
|
var pcb_packing_error = base_circuit_json_error.extend({
|
|
3255
|
-
type:
|
|
3272
|
+
type: z143.literal("pcb_packing_error"),
|
|
3256
3273
|
pcb_packing_error_id: getZodPrefixedIdWithDefault("pcb_packing_error"),
|
|
3257
|
-
error_type:
|
|
3258
|
-
pcb_group_id:
|
|
3259
|
-
subcircuit_id:
|
|
3274
|
+
error_type: z143.literal("pcb_packing_error").default("pcb_packing_error"),
|
|
3275
|
+
pcb_group_id: z143.string().optional(),
|
|
3276
|
+
subcircuit_id: z143.string().optional()
|
|
3260
3277
|
}).describe("Defines a failure to pack PCB components within layout bounds");
|
|
3261
3278
|
expectTypesMatch(true);
|
|
3262
3279
|
|
|
3263
3280
|
// src/pcb/pcb_panelization_placement_error.ts
|
|
3264
|
-
import { z as
|
|
3281
|
+
import { z as z144 } from "zod";
|
|
3265
3282
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
3266
|
-
type:
|
|
3283
|
+
type: z144.literal("pcb_panelization_placement_error"),
|
|
3267
3284
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
3268
3285
|
"pcb_panelization_placement_error"
|
|
3269
3286
|
),
|
|
3270
|
-
error_type:
|
|
3271
|
-
pcb_panel_id:
|
|
3272
|
-
pcb_board_id:
|
|
3273
|
-
subcircuit_id:
|
|
3287
|
+
error_type: z144.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
|
|
3288
|
+
pcb_panel_id: z144.string().optional(),
|
|
3289
|
+
pcb_board_id: z144.string().optional(),
|
|
3290
|
+
subcircuit_id: z144.string().optional()
|
|
3274
3291
|
}).describe("Defines a panelization placement error on the PCB");
|
|
3275
3292
|
expectTypesMatch(true);
|
|
3276
3293
|
|
|
3277
3294
|
// src/pcb/pcb_trace_hint.ts
|
|
3278
|
-
import { z as
|
|
3279
|
-
var pcb_trace_hint =
|
|
3280
|
-
type:
|
|
3295
|
+
import { z as z145 } from "zod";
|
|
3296
|
+
var pcb_trace_hint = z145.object({
|
|
3297
|
+
type: z145.literal("pcb_trace_hint"),
|
|
3281
3298
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
3282
|
-
pcb_port_id:
|
|
3283
|
-
pcb_component_id:
|
|
3284
|
-
route:
|
|
3285
|
-
subcircuit_id:
|
|
3299
|
+
pcb_port_id: z145.string(),
|
|
3300
|
+
pcb_component_id: z145.string(),
|
|
3301
|
+
route: z145.array(route_hint_point),
|
|
3302
|
+
subcircuit_id: z145.string().optional()
|
|
3286
3303
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
3287
3304
|
expectTypesMatch(true);
|
|
3288
3305
|
|
|
3289
3306
|
// src/pcb/pcb_silkscreen_line.ts
|
|
3290
|
-
import { z as
|
|
3291
|
-
var pcb_silkscreen_line =
|
|
3292
|
-
type:
|
|
3307
|
+
import { z as z146 } from "zod";
|
|
3308
|
+
var pcb_silkscreen_line = z146.object({
|
|
3309
|
+
type: z146.literal("pcb_silkscreen_line"),
|
|
3293
3310
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
3294
|
-
pcb_component_id:
|
|
3295
|
-
pcb_group_id:
|
|
3296
|
-
subcircuit_id:
|
|
3311
|
+
pcb_component_id: z146.string(),
|
|
3312
|
+
pcb_group_id: z146.string().optional(),
|
|
3313
|
+
subcircuit_id: z146.string().optional(),
|
|
3297
3314
|
stroke_width: distance.default("0.1mm"),
|
|
3298
3315
|
x1: distance,
|
|
3299
3316
|
y1: distance,
|
|
@@ -3304,32 +3321,32 @@ var pcb_silkscreen_line = z145.object({
|
|
|
3304
3321
|
expectTypesMatch(true);
|
|
3305
3322
|
|
|
3306
3323
|
// src/pcb/pcb_silkscreen_path.ts
|
|
3307
|
-
import { z as
|
|
3308
|
-
var pcb_silkscreen_path =
|
|
3309
|
-
type:
|
|
3324
|
+
import { z as z147 } from "zod";
|
|
3325
|
+
var pcb_silkscreen_path = z147.object({
|
|
3326
|
+
type: z147.literal("pcb_silkscreen_path"),
|
|
3310
3327
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
3311
|
-
pcb_component_id:
|
|
3312
|
-
pcb_group_id:
|
|
3313
|
-
subcircuit_id:
|
|
3328
|
+
pcb_component_id: z147.string(),
|
|
3329
|
+
pcb_group_id: z147.string().optional(),
|
|
3330
|
+
subcircuit_id: z147.string().optional(),
|
|
3314
3331
|
layer: visible_layer,
|
|
3315
|
-
route:
|
|
3332
|
+
route: z147.array(point),
|
|
3316
3333
|
stroke_width: length
|
|
3317
3334
|
}).describe("Defines a silkscreen path on the PCB");
|
|
3318
3335
|
expectTypesMatch(true);
|
|
3319
3336
|
|
|
3320
3337
|
// src/pcb/pcb_silkscreen_text.ts
|
|
3321
|
-
import { z as
|
|
3322
|
-
var pcb_silkscreen_text =
|
|
3323
|
-
type:
|
|
3338
|
+
import { z as z148 } from "zod";
|
|
3339
|
+
var pcb_silkscreen_text = z148.object({
|
|
3340
|
+
type: z148.literal("pcb_silkscreen_text"),
|
|
3324
3341
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
3325
|
-
pcb_group_id:
|
|
3326
|
-
subcircuit_id:
|
|
3327
|
-
font:
|
|
3342
|
+
pcb_group_id: z148.string().optional(),
|
|
3343
|
+
subcircuit_id: z148.string().optional(),
|
|
3344
|
+
font: z148.literal("tscircuit2024").default("tscircuit2024"),
|
|
3328
3345
|
font_size: distance.default("0.2mm"),
|
|
3329
|
-
pcb_component_id:
|
|
3330
|
-
text:
|
|
3331
|
-
is_knockout:
|
|
3332
|
-
knockout_padding:
|
|
3346
|
+
pcb_component_id: z148.string(),
|
|
3347
|
+
text: z148.string(),
|
|
3348
|
+
is_knockout: z148.boolean().default(false).optional(),
|
|
3349
|
+
knockout_padding: z148.object({
|
|
3333
3350
|
left: length,
|
|
3334
3351
|
top: length,
|
|
3335
3352
|
bottom: length,
|
|
@@ -3340,27 +3357,27 @@ var pcb_silkscreen_text = z147.object({
|
|
|
3340
3357
|
bottom: "0.2mm",
|
|
3341
3358
|
right: "0.2mm"
|
|
3342
3359
|
}).optional(),
|
|
3343
|
-
ccw_rotation:
|
|
3360
|
+
ccw_rotation: z148.number().optional(),
|
|
3344
3361
|
layer: layer_ref,
|
|
3345
|
-
is_mirrored:
|
|
3362
|
+
is_mirrored: z148.boolean().default(false).optional(),
|
|
3346
3363
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3347
3364
|
anchor_alignment: ninePointAnchor.default("center")
|
|
3348
3365
|
}).describe("Defines silkscreen text on the PCB");
|
|
3349
3366
|
expectTypesMatch(true);
|
|
3350
3367
|
|
|
3351
3368
|
// src/pcb/pcb_copper_text.ts
|
|
3352
|
-
import { z as
|
|
3353
|
-
var pcb_copper_text =
|
|
3354
|
-
type:
|
|
3369
|
+
import { z as z149 } from "zod";
|
|
3370
|
+
var pcb_copper_text = z149.object({
|
|
3371
|
+
type: z149.literal("pcb_copper_text"),
|
|
3355
3372
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
3356
|
-
pcb_group_id:
|
|
3357
|
-
subcircuit_id:
|
|
3358
|
-
font:
|
|
3373
|
+
pcb_group_id: z149.string().optional(),
|
|
3374
|
+
subcircuit_id: z149.string().optional(),
|
|
3375
|
+
font: z149.literal("tscircuit2024").default("tscircuit2024"),
|
|
3359
3376
|
font_size: distance.default("0.2mm"),
|
|
3360
|
-
pcb_component_id:
|
|
3361
|
-
text:
|
|
3362
|
-
is_knockout:
|
|
3363
|
-
knockout_padding:
|
|
3377
|
+
pcb_component_id: z149.string(),
|
|
3378
|
+
text: z149.string(),
|
|
3379
|
+
is_knockout: z149.boolean().default(false).optional(),
|
|
3380
|
+
knockout_padding: z149.object({
|
|
3364
3381
|
left: length,
|
|
3365
3382
|
top: length,
|
|
3366
3383
|
bottom: length,
|
|
@@ -3371,61 +3388,61 @@ var pcb_copper_text = z148.object({
|
|
|
3371
3388
|
bottom: "0.2mm",
|
|
3372
3389
|
right: "0.2mm"
|
|
3373
3390
|
}).optional(),
|
|
3374
|
-
ccw_rotation:
|
|
3391
|
+
ccw_rotation: z149.number().optional(),
|
|
3375
3392
|
layer: layer_ref,
|
|
3376
|
-
is_mirrored:
|
|
3393
|
+
is_mirrored: z149.boolean().default(false).optional(),
|
|
3377
3394
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3378
3395
|
anchor_alignment: ninePointAnchor.default("center")
|
|
3379
3396
|
}).describe("Defines copper text on the PCB");
|
|
3380
3397
|
expectTypesMatch(true);
|
|
3381
3398
|
|
|
3382
3399
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
3383
|
-
import { z as
|
|
3384
|
-
var pcb_silkscreen_rect =
|
|
3385
|
-
type:
|
|
3400
|
+
import { z as z150 } from "zod";
|
|
3401
|
+
var pcb_silkscreen_rect = z150.object({
|
|
3402
|
+
type: z150.literal("pcb_silkscreen_rect"),
|
|
3386
3403
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
3387
|
-
pcb_component_id:
|
|
3388
|
-
pcb_group_id:
|
|
3389
|
-
subcircuit_id:
|
|
3404
|
+
pcb_component_id: z150.string(),
|
|
3405
|
+
pcb_group_id: z150.string().optional(),
|
|
3406
|
+
subcircuit_id: z150.string().optional(),
|
|
3390
3407
|
center: point,
|
|
3391
3408
|
width: length,
|
|
3392
3409
|
height: length,
|
|
3393
3410
|
layer: layer_ref,
|
|
3394
3411
|
stroke_width: length.default("1mm"),
|
|
3395
3412
|
corner_radius: length.optional(),
|
|
3396
|
-
is_filled:
|
|
3397
|
-
has_stroke:
|
|
3398
|
-
is_stroke_dashed:
|
|
3399
|
-
ccw_rotation:
|
|
3413
|
+
is_filled: z150.boolean().default(true).optional(),
|
|
3414
|
+
has_stroke: z150.boolean().optional(),
|
|
3415
|
+
is_stroke_dashed: z150.boolean().optional(),
|
|
3416
|
+
ccw_rotation: z150.number().optional()
|
|
3400
3417
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
3401
3418
|
expectTypesMatch(true);
|
|
3402
3419
|
|
|
3403
3420
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
3404
|
-
import { z as
|
|
3405
|
-
var pcb_silkscreen_circle =
|
|
3406
|
-
type:
|
|
3421
|
+
import { z as z151 } from "zod";
|
|
3422
|
+
var pcb_silkscreen_circle = z151.object({
|
|
3423
|
+
type: z151.literal("pcb_silkscreen_circle"),
|
|
3407
3424
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
3408
3425
|
"pcb_silkscreen_circle"
|
|
3409
3426
|
),
|
|
3410
|
-
pcb_component_id:
|
|
3411
|
-
pcb_group_id:
|
|
3412
|
-
subcircuit_id:
|
|
3427
|
+
pcb_component_id: z151.string(),
|
|
3428
|
+
pcb_group_id: z151.string().optional(),
|
|
3429
|
+
subcircuit_id: z151.string().optional(),
|
|
3413
3430
|
center: point,
|
|
3414
3431
|
radius: length,
|
|
3415
3432
|
layer: visible_layer,
|
|
3416
3433
|
stroke_width: length.default("1mm"),
|
|
3417
|
-
is_filled:
|
|
3434
|
+
is_filled: z151.boolean().optional()
|
|
3418
3435
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
3419
3436
|
expectTypesMatch(true);
|
|
3420
3437
|
|
|
3421
3438
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
3422
|
-
import { z as
|
|
3423
|
-
var pcb_silkscreen_oval =
|
|
3424
|
-
type:
|
|
3439
|
+
import { z as z152 } from "zod";
|
|
3440
|
+
var pcb_silkscreen_oval = z152.object({
|
|
3441
|
+
type: z152.literal("pcb_silkscreen_oval"),
|
|
3425
3442
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
3426
|
-
pcb_component_id:
|
|
3427
|
-
pcb_group_id:
|
|
3428
|
-
subcircuit_id:
|
|
3443
|
+
pcb_component_id: z152.string(),
|
|
3444
|
+
pcb_group_id: z152.string().optional(),
|
|
3445
|
+
subcircuit_id: z152.string().optional(),
|
|
3429
3446
|
center: point,
|
|
3430
3447
|
radius_x: distance,
|
|
3431
3448
|
radius_y: distance,
|
|
@@ -3435,267 +3452,267 @@ var pcb_silkscreen_oval = z151.object({
|
|
|
3435
3452
|
expectTypesMatch(true);
|
|
3436
3453
|
|
|
3437
3454
|
// src/pcb/pcb_silkscreen_graphic.ts
|
|
3438
|
-
import { z as
|
|
3439
|
-
var pcb_silkscreen_graphic_base =
|
|
3440
|
-
type:
|
|
3455
|
+
import { z as z153 } from "zod";
|
|
3456
|
+
var pcb_silkscreen_graphic_base = z153.object({
|
|
3457
|
+
type: z153.literal("pcb_silkscreen_graphic"),
|
|
3441
3458
|
pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
|
|
3442
3459
|
"pcb_silkscreen_graphic"
|
|
3443
3460
|
),
|
|
3444
|
-
pcb_component_id:
|
|
3445
|
-
pcb_group_id:
|
|
3446
|
-
subcircuit_id:
|
|
3461
|
+
pcb_component_id: z153.string(),
|
|
3462
|
+
pcb_group_id: z153.string().optional(),
|
|
3463
|
+
subcircuit_id: z153.string().optional(),
|
|
3447
3464
|
layer: visible_layer,
|
|
3448
3465
|
image_asset: asset.optional()
|
|
3449
3466
|
});
|
|
3450
3467
|
var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
|
|
3451
|
-
shape:
|
|
3468
|
+
shape: z153.literal("brep"),
|
|
3452
3469
|
brep_shape
|
|
3453
3470
|
}).describe("Defines a BRep silkscreen graphic on the PCB");
|
|
3454
3471
|
expectTypesMatch(
|
|
3455
3472
|
true
|
|
3456
3473
|
);
|
|
3457
|
-
var pcb_silkscreen_graphic =
|
|
3474
|
+
var pcb_silkscreen_graphic = z153.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
|
|
3458
3475
|
expectTypesMatch(true);
|
|
3459
3476
|
|
|
3460
3477
|
// src/pcb/pcb_silkscreen_pill.ts
|
|
3461
|
-
import { z as
|
|
3462
|
-
var pcb_silkscreen_pill =
|
|
3463
|
-
type:
|
|
3478
|
+
import { z as z154 } from "zod";
|
|
3479
|
+
var pcb_silkscreen_pill = z154.object({
|
|
3480
|
+
type: z154.literal("pcb_silkscreen_pill"),
|
|
3464
3481
|
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
3465
|
-
pcb_component_id:
|
|
3466
|
-
pcb_group_id:
|
|
3467
|
-
subcircuit_id:
|
|
3482
|
+
pcb_component_id: z154.string(),
|
|
3483
|
+
pcb_group_id: z154.string().optional(),
|
|
3484
|
+
subcircuit_id: z154.string().optional(),
|
|
3468
3485
|
center: point,
|
|
3469
3486
|
width: length,
|
|
3470
3487
|
height: length,
|
|
3471
3488
|
layer: layer_ref,
|
|
3472
|
-
ccw_rotation:
|
|
3489
|
+
ccw_rotation: z154.number().optional()
|
|
3473
3490
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
3474
3491
|
expectTypesMatch(true);
|
|
3475
3492
|
|
|
3476
3493
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
3477
|
-
import { z as
|
|
3478
|
-
var pcb_fabrication_note_text =
|
|
3479
|
-
type:
|
|
3494
|
+
import { z as z155 } from "zod";
|
|
3495
|
+
var pcb_fabrication_note_text = z155.object({
|
|
3496
|
+
type: z155.literal("pcb_fabrication_note_text"),
|
|
3480
3497
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
3481
3498
|
"pcb_fabrication_note_text"
|
|
3482
3499
|
),
|
|
3483
|
-
subcircuit_id:
|
|
3484
|
-
pcb_group_id:
|
|
3485
|
-
font:
|
|
3500
|
+
subcircuit_id: z155.string().optional(),
|
|
3501
|
+
pcb_group_id: z155.string().optional(),
|
|
3502
|
+
font: z155.literal("tscircuit2024").default("tscircuit2024"),
|
|
3486
3503
|
font_size: distance.default("1mm"),
|
|
3487
|
-
pcb_component_id:
|
|
3488
|
-
text:
|
|
3489
|
-
ccw_rotation:
|
|
3504
|
+
pcb_component_id: z155.string(),
|
|
3505
|
+
text: z155.string(),
|
|
3506
|
+
ccw_rotation: z155.number().optional(),
|
|
3490
3507
|
layer: visible_layer,
|
|
3491
3508
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3492
|
-
anchor_alignment:
|
|
3493
|
-
color:
|
|
3509
|
+
anchor_alignment: z155.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3510
|
+
color: z155.string().optional()
|
|
3494
3511
|
}).describe(
|
|
3495
3512
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
3496
3513
|
);
|
|
3497
3514
|
expectTypesMatch(true);
|
|
3498
3515
|
|
|
3499
3516
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
3500
|
-
import { z as
|
|
3501
|
-
var pcb_fabrication_note_path =
|
|
3502
|
-
type:
|
|
3517
|
+
import { z as z156 } from "zod";
|
|
3518
|
+
var pcb_fabrication_note_path = z156.object({
|
|
3519
|
+
type: z156.literal("pcb_fabrication_note_path"),
|
|
3503
3520
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
3504
3521
|
"pcb_fabrication_note_path"
|
|
3505
3522
|
),
|
|
3506
|
-
pcb_component_id:
|
|
3507
|
-
subcircuit_id:
|
|
3523
|
+
pcb_component_id: z156.string(),
|
|
3524
|
+
subcircuit_id: z156.string().optional(),
|
|
3508
3525
|
layer: layer_ref,
|
|
3509
|
-
route:
|
|
3526
|
+
route: z156.array(point),
|
|
3510
3527
|
stroke_width: length,
|
|
3511
|
-
color:
|
|
3512
|
-
is_filled:
|
|
3513
|
-
has_stroke:
|
|
3528
|
+
color: z156.string().optional(),
|
|
3529
|
+
is_filled: z156.boolean().optional(),
|
|
3530
|
+
has_stroke: z156.boolean().optional()
|
|
3514
3531
|
}).describe(
|
|
3515
3532
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
3516
3533
|
);
|
|
3517
3534
|
expectTypesMatch(true);
|
|
3518
3535
|
|
|
3519
3536
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
3520
|
-
import { z as
|
|
3521
|
-
var pcb_fabrication_note_rect =
|
|
3522
|
-
type:
|
|
3537
|
+
import { z as z157 } from "zod";
|
|
3538
|
+
var pcb_fabrication_note_rect = z157.object({
|
|
3539
|
+
type: z157.literal("pcb_fabrication_note_rect"),
|
|
3523
3540
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
3524
3541
|
"pcb_fabrication_note_rect"
|
|
3525
3542
|
),
|
|
3526
|
-
pcb_component_id:
|
|
3527
|
-
pcb_group_id:
|
|
3528
|
-
subcircuit_id:
|
|
3543
|
+
pcb_component_id: z157.string(),
|
|
3544
|
+
pcb_group_id: z157.string().optional(),
|
|
3545
|
+
subcircuit_id: z157.string().optional(),
|
|
3529
3546
|
center: point,
|
|
3530
3547
|
width: length,
|
|
3531
3548
|
height: length,
|
|
3532
3549
|
layer: visible_layer,
|
|
3533
3550
|
stroke_width: length.default("0.1mm"),
|
|
3534
3551
|
corner_radius: length.optional(),
|
|
3535
|
-
is_filled:
|
|
3536
|
-
has_stroke:
|
|
3537
|
-
is_stroke_dashed:
|
|
3538
|
-
color:
|
|
3552
|
+
is_filled: z157.boolean().optional(),
|
|
3553
|
+
has_stroke: z157.boolean().optional(),
|
|
3554
|
+
is_stroke_dashed: z157.boolean().optional(),
|
|
3555
|
+
color: z157.string().optional()
|
|
3539
3556
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
3540
3557
|
expectTypesMatch(true);
|
|
3541
3558
|
|
|
3542
3559
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
3543
|
-
import { z as
|
|
3544
|
-
var pcb_fabrication_note_dimension =
|
|
3545
|
-
type:
|
|
3560
|
+
import { z as z158 } from "zod";
|
|
3561
|
+
var pcb_fabrication_note_dimension = z158.object({
|
|
3562
|
+
type: z158.literal("pcb_fabrication_note_dimension"),
|
|
3546
3563
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
3547
3564
|
"pcb_fabrication_note_dimension"
|
|
3548
3565
|
),
|
|
3549
|
-
pcb_component_id:
|
|
3550
|
-
pcb_group_id:
|
|
3551
|
-
subcircuit_id:
|
|
3566
|
+
pcb_component_id: z158.string(),
|
|
3567
|
+
pcb_group_id: z158.string().optional(),
|
|
3568
|
+
subcircuit_id: z158.string().optional(),
|
|
3552
3569
|
layer: visible_layer,
|
|
3553
3570
|
from: point,
|
|
3554
3571
|
to: point,
|
|
3555
|
-
text:
|
|
3556
|
-
text_ccw_rotation:
|
|
3572
|
+
text: z158.string().optional(),
|
|
3573
|
+
text_ccw_rotation: z158.number().optional(),
|
|
3557
3574
|
offset: length.optional(),
|
|
3558
3575
|
offset_distance: length.optional(),
|
|
3559
|
-
offset_direction:
|
|
3560
|
-
x:
|
|
3561
|
-
y:
|
|
3576
|
+
offset_direction: z158.object({
|
|
3577
|
+
x: z158.number(),
|
|
3578
|
+
y: z158.number()
|
|
3562
3579
|
}).optional(),
|
|
3563
|
-
font:
|
|
3580
|
+
font: z158.literal("tscircuit2024").default("tscircuit2024"),
|
|
3564
3581
|
font_size: length.default("1mm"),
|
|
3565
|
-
color:
|
|
3582
|
+
color: z158.string().optional(),
|
|
3566
3583
|
arrow_size: length.default("1mm")
|
|
3567
3584
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
3568
3585
|
expectTypesMatch(true);
|
|
3569
3586
|
|
|
3570
3587
|
// src/pcb/pcb_note_text.ts
|
|
3571
|
-
import { z as z158 } from "zod";
|
|
3572
|
-
var pcb_note_text = z158.object({
|
|
3573
|
-
type: z158.literal("pcb_note_text"),
|
|
3574
|
-
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
3575
|
-
pcb_component_id: z158.string().optional(),
|
|
3576
|
-
pcb_group_id: z158.string().optional(),
|
|
3577
|
-
subcircuit_id: z158.string().optional(),
|
|
3578
|
-
name: z158.string().optional(),
|
|
3579
|
-
font: z158.literal("tscircuit2024").default("tscircuit2024"),
|
|
3580
|
-
font_size: distance.default("1mm"),
|
|
3581
|
-
text: z158.string().optional(),
|
|
3582
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3583
|
-
anchor_alignment: z158.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3584
|
-
layer: visible_layer.default("top"),
|
|
3585
|
-
is_mirrored_from_top_view: z158.boolean().optional(),
|
|
3586
|
-
color: z158.string().optional()
|
|
3587
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
3588
|
-
expectTypesMatch(true);
|
|
3589
|
-
|
|
3590
|
-
// src/pcb/pcb_note_rect.ts
|
|
3591
3588
|
import { z as z159 } from "zod";
|
|
3592
|
-
var
|
|
3593
|
-
type: z159.literal("
|
|
3594
|
-
|
|
3589
|
+
var pcb_note_text = z159.object({
|
|
3590
|
+
type: z159.literal("pcb_note_text"),
|
|
3591
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
3595
3592
|
pcb_component_id: z159.string().optional(),
|
|
3596
3593
|
pcb_group_id: z159.string().optional(),
|
|
3597
3594
|
subcircuit_id: z159.string().optional(),
|
|
3598
3595
|
name: z159.string().optional(),
|
|
3596
|
+
font: z159.literal("tscircuit2024").default("tscircuit2024"),
|
|
3597
|
+
font_size: distance.default("1mm"),
|
|
3599
3598
|
text: z159.string().optional(),
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
height: length,
|
|
3599
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3600
|
+
anchor_alignment: z159.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3603
3601
|
layer: visible_layer.default("top"),
|
|
3604
|
-
|
|
3605
|
-
corner_radius: length.optional(),
|
|
3606
|
-
is_filled: z159.boolean().optional(),
|
|
3607
|
-
has_stroke: z159.boolean().optional(),
|
|
3608
|
-
is_stroke_dashed: z159.boolean().optional(),
|
|
3602
|
+
is_mirrored_from_top_view: z159.boolean().optional(),
|
|
3609
3603
|
color: z159.string().optional()
|
|
3610
|
-
}).describe("Defines a
|
|
3604
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
3611
3605
|
expectTypesMatch(true);
|
|
3612
3606
|
|
|
3613
|
-
// src/pcb/
|
|
3607
|
+
// src/pcb/pcb_note_rect.ts
|
|
3614
3608
|
import { z as z160 } from "zod";
|
|
3615
|
-
var
|
|
3616
|
-
type: z160.literal("
|
|
3617
|
-
|
|
3609
|
+
var pcb_note_rect = z160.object({
|
|
3610
|
+
type: z160.literal("pcb_note_rect"),
|
|
3611
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
3618
3612
|
pcb_component_id: z160.string().optional(),
|
|
3619
3613
|
pcb_group_id: z160.string().optional(),
|
|
3620
3614
|
subcircuit_id: z160.string().optional(),
|
|
3621
3615
|
name: z160.string().optional(),
|
|
3622
3616
|
text: z160.string().optional(),
|
|
3623
|
-
|
|
3617
|
+
center: point,
|
|
3618
|
+
width: length,
|
|
3619
|
+
height: length,
|
|
3624
3620
|
layer: visible_layer.default("top"),
|
|
3625
3621
|
stroke_width: length.default("0.1mm"),
|
|
3622
|
+
corner_radius: length.optional(),
|
|
3623
|
+
is_filled: z160.boolean().optional(),
|
|
3624
|
+
has_stroke: z160.boolean().optional(),
|
|
3625
|
+
is_stroke_dashed: z160.boolean().optional(),
|
|
3626
3626
|
color: z160.string().optional()
|
|
3627
|
-
}).describe("Defines a
|
|
3627
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
3628
3628
|
expectTypesMatch(true);
|
|
3629
3629
|
|
|
3630
|
-
// src/pcb/
|
|
3630
|
+
// src/pcb/pcb_note_path.ts
|
|
3631
3631
|
import { z as z161 } from "zod";
|
|
3632
|
-
var
|
|
3633
|
-
type: z161.literal("
|
|
3634
|
-
|
|
3632
|
+
var pcb_note_path = z161.object({
|
|
3633
|
+
type: z161.literal("pcb_note_path"),
|
|
3634
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
3635
3635
|
pcb_component_id: z161.string().optional(),
|
|
3636
3636
|
pcb_group_id: z161.string().optional(),
|
|
3637
3637
|
subcircuit_id: z161.string().optional(),
|
|
3638
3638
|
name: z161.string().optional(),
|
|
3639
3639
|
text: z161.string().optional(),
|
|
3640
|
+
route: z161.array(point),
|
|
3641
|
+
layer: visible_layer.default("top"),
|
|
3642
|
+
stroke_width: length.default("0.1mm"),
|
|
3643
|
+
color: z161.string().optional()
|
|
3644
|
+
}).describe("Defines a polyline documentation note on the PCB");
|
|
3645
|
+
expectTypesMatch(true);
|
|
3646
|
+
|
|
3647
|
+
// src/pcb/pcb_note_line.ts
|
|
3648
|
+
import { z as z162 } from "zod";
|
|
3649
|
+
var pcb_note_line = z162.object({
|
|
3650
|
+
type: z162.literal("pcb_note_line"),
|
|
3651
|
+
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
3652
|
+
pcb_component_id: z162.string().optional(),
|
|
3653
|
+
pcb_group_id: z162.string().optional(),
|
|
3654
|
+
subcircuit_id: z162.string().optional(),
|
|
3655
|
+
name: z162.string().optional(),
|
|
3656
|
+
text: z162.string().optional(),
|
|
3640
3657
|
x1: distance,
|
|
3641
3658
|
y1: distance,
|
|
3642
3659
|
x2: distance,
|
|
3643
3660
|
y2: distance,
|
|
3644
3661
|
layer: visible_layer.default("top"),
|
|
3645
3662
|
stroke_width: distance.default("0.1mm"),
|
|
3646
|
-
color:
|
|
3647
|
-
is_dashed:
|
|
3663
|
+
color: z162.string().optional(),
|
|
3664
|
+
is_dashed: z162.boolean().optional()
|
|
3648
3665
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
3649
3666
|
expectTypesMatch(true);
|
|
3650
3667
|
|
|
3651
3668
|
// src/pcb/pcb_note_dimension.ts
|
|
3652
|
-
import { z as
|
|
3653
|
-
var pcb_note_dimension =
|
|
3654
|
-
type:
|
|
3669
|
+
import { z as z163 } from "zod";
|
|
3670
|
+
var pcb_note_dimension = z163.object({
|
|
3671
|
+
type: z163.literal("pcb_note_dimension"),
|
|
3655
3672
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
3656
|
-
pcb_component_id:
|
|
3657
|
-
pcb_group_id:
|
|
3658
|
-
subcircuit_id:
|
|
3659
|
-
name:
|
|
3673
|
+
pcb_component_id: z163.string().optional(),
|
|
3674
|
+
pcb_group_id: z163.string().optional(),
|
|
3675
|
+
subcircuit_id: z163.string().optional(),
|
|
3676
|
+
name: z163.string().optional(),
|
|
3660
3677
|
from: point,
|
|
3661
3678
|
to: point,
|
|
3662
|
-
text:
|
|
3663
|
-
text_ccw_rotation:
|
|
3679
|
+
text: z163.string().optional(),
|
|
3680
|
+
text_ccw_rotation: z163.number().optional(),
|
|
3664
3681
|
offset_distance: length.optional(),
|
|
3665
|
-
offset_direction:
|
|
3666
|
-
x:
|
|
3667
|
-
y:
|
|
3682
|
+
offset_direction: z163.object({
|
|
3683
|
+
x: z163.number(),
|
|
3684
|
+
y: z163.number()
|
|
3668
3685
|
}).optional(),
|
|
3669
|
-
font:
|
|
3686
|
+
font: z163.literal("tscircuit2024").default("tscircuit2024"),
|
|
3670
3687
|
font_size: length.default("1mm"),
|
|
3671
3688
|
layer: visible_layer.default("top"),
|
|
3672
|
-
color:
|
|
3689
|
+
color: z163.string().optional(),
|
|
3673
3690
|
arrow_size: length.default("1mm")
|
|
3674
3691
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
3675
3692
|
expectTypesMatch(true);
|
|
3676
3693
|
|
|
3677
3694
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
3678
|
-
import { z as
|
|
3695
|
+
import { z as z164 } from "zod";
|
|
3679
3696
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
3680
|
-
type:
|
|
3697
|
+
type: z164.literal("pcb_footprint_overlap_error"),
|
|
3681
3698
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3682
|
-
error_type:
|
|
3683
|
-
pcb_smtpad_ids:
|
|
3684
|
-
pcb_plated_hole_ids:
|
|
3685
|
-
pcb_hole_ids:
|
|
3686
|
-
pcb_keepout_ids:
|
|
3699
|
+
error_type: z164.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
3700
|
+
pcb_smtpad_ids: z164.array(z164.string()).optional(),
|
|
3701
|
+
pcb_plated_hole_ids: z164.array(z164.string()).optional(),
|
|
3702
|
+
pcb_hole_ids: z164.array(z164.string()).optional(),
|
|
3703
|
+
pcb_keepout_ids: z164.array(z164.string()).optional()
|
|
3687
3704
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
3688
3705
|
expectTypesMatch(
|
|
3689
3706
|
true
|
|
3690
3707
|
);
|
|
3691
3708
|
|
|
3692
3709
|
// src/pcb/pcb_courtyard_overlap_error.ts
|
|
3693
|
-
import { z as
|
|
3710
|
+
import { z as z165 } from "zod";
|
|
3694
3711
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
3695
|
-
type:
|
|
3712
|
+
type: z165.literal("pcb_courtyard_overlap_error"),
|
|
3696
3713
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3697
|
-
error_type:
|
|
3698
|
-
pcb_component_ids:
|
|
3714
|
+
error_type: z165.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
|
|
3715
|
+
pcb_component_ids: z165.tuple([z165.string(), z165.string()])
|
|
3699
3716
|
}).describe(
|
|
3700
3717
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
3701
3718
|
);
|
|
@@ -3704,78 +3721,78 @@ expectTypesMatch(
|
|
|
3704
3721
|
);
|
|
3705
3722
|
|
|
3706
3723
|
// src/pcb/pcb_keepout.ts
|
|
3707
|
-
import { z as
|
|
3708
|
-
var pcb_keepout_outline =
|
|
3709
|
-
type:
|
|
3710
|
-
shape:
|
|
3711
|
-
pcb_group_id:
|
|
3712
|
-
subcircuit_id:
|
|
3713
|
-
outline:
|
|
3724
|
+
import { z as z166 } from "zod";
|
|
3725
|
+
var pcb_keepout_outline = z166.object({
|
|
3726
|
+
type: z166.literal("pcb_keepout"),
|
|
3727
|
+
shape: z166.literal("outline"),
|
|
3728
|
+
pcb_group_id: z166.string().optional(),
|
|
3729
|
+
subcircuit_id: z166.string().optional(),
|
|
3730
|
+
outline: z166.array(point).min(2),
|
|
3714
3731
|
stroke_width: length,
|
|
3715
|
-
pcb_keepout_id:
|
|
3716
|
-
layers:
|
|
3717
|
-
description:
|
|
3718
|
-
excluded_pcb_component_ids:
|
|
3719
|
-
warning_only:
|
|
3720
|
-
allow_traces:
|
|
3721
|
-
allow_placements:
|
|
3722
|
-
});
|
|
3723
|
-
var pcb_keepout =
|
|
3724
|
-
type:
|
|
3725
|
-
shape:
|
|
3726
|
-
pcb_group_id:
|
|
3727
|
-
subcircuit_id:
|
|
3732
|
+
pcb_keepout_id: z166.string(),
|
|
3733
|
+
layers: z166.array(z166.string()),
|
|
3734
|
+
description: z166.string().optional(),
|
|
3735
|
+
excluded_pcb_component_ids: z166.array(z166.string()).optional(),
|
|
3736
|
+
warning_only: z166.boolean().optional(),
|
|
3737
|
+
allow_traces: z166.boolean().optional(),
|
|
3738
|
+
allow_placements: z166.boolean().optional()
|
|
3739
|
+
});
|
|
3740
|
+
var pcb_keepout = z166.object({
|
|
3741
|
+
type: z166.literal("pcb_keepout"),
|
|
3742
|
+
shape: z166.literal("rect"),
|
|
3743
|
+
pcb_group_id: z166.string().optional(),
|
|
3744
|
+
subcircuit_id: z166.string().optional(),
|
|
3728
3745
|
center: point,
|
|
3729
3746
|
width: distance,
|
|
3730
3747
|
height: distance,
|
|
3731
|
-
pcb_keepout_id:
|
|
3732
|
-
layers:
|
|
3748
|
+
pcb_keepout_id: z166.string(),
|
|
3749
|
+
layers: z166.array(z166.string()),
|
|
3733
3750
|
// Specify layers where the keepout applies
|
|
3734
|
-
description:
|
|
3751
|
+
description: z166.string().optional(),
|
|
3735
3752
|
// Optional description of the keepout
|
|
3736
|
-
excluded_pcb_component_ids:
|
|
3737
|
-
warning_only:
|
|
3738
|
-
allow_traces:
|
|
3739
|
-
allow_placements:
|
|
3753
|
+
excluded_pcb_component_ids: z166.array(z166.string()).optional(),
|
|
3754
|
+
warning_only: z166.boolean().optional(),
|
|
3755
|
+
allow_traces: z166.boolean().optional(),
|
|
3756
|
+
allow_placements: z166.boolean().optional()
|
|
3740
3757
|
}).or(
|
|
3741
|
-
|
|
3742
|
-
type:
|
|
3743
|
-
shape:
|
|
3744
|
-
pcb_group_id:
|
|
3745
|
-
subcircuit_id:
|
|
3758
|
+
z166.object({
|
|
3759
|
+
type: z166.literal("pcb_keepout"),
|
|
3760
|
+
shape: z166.literal("circle"),
|
|
3761
|
+
pcb_group_id: z166.string().optional(),
|
|
3762
|
+
subcircuit_id: z166.string().optional(),
|
|
3746
3763
|
center: point,
|
|
3747
3764
|
radius: distance,
|
|
3748
|
-
pcb_keepout_id:
|
|
3749
|
-
layers:
|
|
3765
|
+
pcb_keepout_id: z166.string(),
|
|
3766
|
+
layers: z166.array(z166.string()),
|
|
3750
3767
|
// Specify layers where the keepout applies
|
|
3751
|
-
description:
|
|
3768
|
+
description: z166.string().optional(),
|
|
3752
3769
|
// Optional description of the keepout
|
|
3753
|
-
excluded_pcb_component_ids:
|
|
3754
|
-
warning_only:
|
|
3755
|
-
allow_traces:
|
|
3756
|
-
allow_placements:
|
|
3770
|
+
excluded_pcb_component_ids: z166.array(z166.string()).optional(),
|
|
3771
|
+
warning_only: z166.boolean().optional(),
|
|
3772
|
+
allow_traces: z166.boolean().optional(),
|
|
3773
|
+
allow_placements: z166.boolean().optional()
|
|
3757
3774
|
})
|
|
3758
3775
|
).or(pcb_keepout_outline);
|
|
3759
3776
|
expectTypesMatch(true);
|
|
3760
3777
|
expectTypesMatch(true);
|
|
3761
3778
|
|
|
3762
3779
|
// src/pcb/pcb_keepout_overlap_warning.ts
|
|
3763
|
-
import { z as
|
|
3764
|
-
var pcb_keepout_overlap_warning =
|
|
3765
|
-
type:
|
|
3780
|
+
import { z as z167 } from "zod";
|
|
3781
|
+
var pcb_keepout_overlap_warning = z167.object({
|
|
3782
|
+
type: z167.literal("pcb_keepout_overlap_warning"),
|
|
3766
3783
|
pcb_keepout_overlap_warning_id: getZodPrefixedIdWithDefault(
|
|
3767
3784
|
"pcb_keepout_overlap_warning"
|
|
3768
3785
|
),
|
|
3769
|
-
warning_type:
|
|
3770
|
-
message:
|
|
3771
|
-
pcb_keepout_id:
|
|
3772
|
-
pcb_component_ids:
|
|
3773
|
-
pcb_trace_ids:
|
|
3774
|
-
pcb_smtpad_ids:
|
|
3775
|
-
pcb_plated_hole_ids:
|
|
3776
|
-
pcb_via_ids:
|
|
3786
|
+
warning_type: z167.literal("pcb_keepout_overlap_warning").default("pcb_keepout_overlap_warning"),
|
|
3787
|
+
message: z167.string(),
|
|
3788
|
+
pcb_keepout_id: z167.string(),
|
|
3789
|
+
pcb_component_ids: z167.array(z167.string()).optional(),
|
|
3790
|
+
pcb_trace_ids: z167.array(z167.string()).optional(),
|
|
3791
|
+
pcb_smtpad_ids: z167.array(z167.string()).optional(),
|
|
3792
|
+
pcb_plated_hole_ids: z167.array(z167.string()).optional(),
|
|
3793
|
+
pcb_via_ids: z167.array(z167.string()).optional(),
|
|
3777
3794
|
center: point.optional(),
|
|
3778
|
-
subcircuit_id:
|
|
3795
|
+
subcircuit_id: z167.string().optional()
|
|
3779
3796
|
}).describe(
|
|
3780
3797
|
"Warning emitted when copper overlaps a PCB keepout with warning_only enabled"
|
|
3781
3798
|
);
|
|
@@ -3784,18 +3801,18 @@ expectTypesMatch(
|
|
|
3784
3801
|
);
|
|
3785
3802
|
|
|
3786
3803
|
// src/pcb/pcb_cutout.ts
|
|
3787
|
-
import { z as
|
|
3788
|
-
var pcb_cutout_base =
|
|
3789
|
-
type:
|
|
3804
|
+
import { z as z168 } from "zod";
|
|
3805
|
+
var pcb_cutout_base = z168.object({
|
|
3806
|
+
type: z168.literal("pcb_cutout"),
|
|
3790
3807
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
3791
|
-
pcb_component_id:
|
|
3792
|
-
pcb_group_id:
|
|
3793
|
-
subcircuit_id:
|
|
3794
|
-
pcb_board_id:
|
|
3795
|
-
pcb_panel_id:
|
|
3808
|
+
pcb_component_id: z168.string().optional(),
|
|
3809
|
+
pcb_group_id: z168.string().optional(),
|
|
3810
|
+
subcircuit_id: z168.string().optional(),
|
|
3811
|
+
pcb_board_id: z168.string().optional(),
|
|
3812
|
+
pcb_panel_id: z168.string().optional()
|
|
3796
3813
|
});
|
|
3797
3814
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
3798
|
-
shape:
|
|
3815
|
+
shape: z168.literal("rect"),
|
|
3799
3816
|
center: point,
|
|
3800
3817
|
width: length,
|
|
3801
3818
|
height: length,
|
|
@@ -3804,26 +3821,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
3804
3821
|
});
|
|
3805
3822
|
expectTypesMatch(true);
|
|
3806
3823
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
3807
|
-
shape:
|
|
3824
|
+
shape: z168.literal("circle"),
|
|
3808
3825
|
center: point,
|
|
3809
3826
|
radius: length
|
|
3810
3827
|
});
|
|
3811
3828
|
expectTypesMatch(true);
|
|
3812
3829
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
3813
|
-
shape:
|
|
3814
|
-
points:
|
|
3830
|
+
shape: z168.literal("polygon"),
|
|
3831
|
+
points: z168.array(point)
|
|
3815
3832
|
});
|
|
3816
3833
|
expectTypesMatch(true);
|
|
3817
3834
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
3818
|
-
shape:
|
|
3819
|
-
route:
|
|
3835
|
+
shape: z168.literal("path"),
|
|
3836
|
+
route: z168.array(point),
|
|
3820
3837
|
slot_width: length,
|
|
3821
3838
|
slot_length: length.optional(),
|
|
3822
3839
|
space_between_slots: length.optional(),
|
|
3823
3840
|
slot_corner_radius: length.optional()
|
|
3824
3841
|
});
|
|
3825
3842
|
expectTypesMatch(true);
|
|
3826
|
-
var pcb_cutout =
|
|
3843
|
+
var pcb_cutout = z168.discriminatedUnion("shape", [
|
|
3827
3844
|
pcb_cutout_rect,
|
|
3828
3845
|
pcb_cutout_circle,
|
|
3829
3846
|
pcb_cutout_polygon,
|
|
@@ -3832,223 +3849,223 @@ var pcb_cutout = z167.discriminatedUnion("shape", [
|
|
|
3832
3849
|
expectTypesMatch(true);
|
|
3833
3850
|
|
|
3834
3851
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
3835
|
-
import { z as
|
|
3852
|
+
import { z as z169 } from "zod";
|
|
3836
3853
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
3837
|
-
type:
|
|
3854
|
+
type: z169.literal("pcb_missing_footprint_error"),
|
|
3838
3855
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
3839
3856
|
"pcb_missing_footprint_error"
|
|
3840
3857
|
),
|
|
3841
|
-
pcb_group_id:
|
|
3842
|
-
subcircuit_id:
|
|
3843
|
-
error_type:
|
|
3844
|
-
source_component_id:
|
|
3858
|
+
pcb_group_id: z169.string().optional(),
|
|
3859
|
+
subcircuit_id: z169.string().optional(),
|
|
3860
|
+
error_type: z169.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
3861
|
+
source_component_id: z169.string()
|
|
3845
3862
|
}).describe("Defines a missing footprint error on the PCB");
|
|
3846
3863
|
expectTypesMatch(
|
|
3847
3864
|
true
|
|
3848
3865
|
);
|
|
3849
3866
|
|
|
3850
3867
|
// src/pcb/external_footprint_load_error.ts
|
|
3851
|
-
import { z as
|
|
3868
|
+
import { z as z170 } from "zod";
|
|
3852
3869
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
3853
|
-
type:
|
|
3870
|
+
type: z170.literal("external_footprint_load_error"),
|
|
3854
3871
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3855
3872
|
"external_footprint_load_error"
|
|
3856
3873
|
),
|
|
3857
|
-
pcb_component_id:
|
|
3858
|
-
source_component_id:
|
|
3859
|
-
pcb_group_id:
|
|
3860
|
-
subcircuit_id:
|
|
3861
|
-
footprinter_string:
|
|
3862
|
-
error_type:
|
|
3874
|
+
pcb_component_id: z170.string(),
|
|
3875
|
+
source_component_id: z170.string(),
|
|
3876
|
+
pcb_group_id: z170.string().optional(),
|
|
3877
|
+
subcircuit_id: z170.string().optional(),
|
|
3878
|
+
footprinter_string: z170.string().optional(),
|
|
3879
|
+
error_type: z170.literal("external_footprint_load_error").default("external_footprint_load_error")
|
|
3863
3880
|
}).describe("Defines an error when an external footprint fails to load");
|
|
3864
3881
|
expectTypesMatch(true);
|
|
3865
3882
|
|
|
3866
3883
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
3867
|
-
import { z as
|
|
3884
|
+
import { z as z171 } from "zod";
|
|
3868
3885
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
3869
|
-
type:
|
|
3886
|
+
type: z171.literal("circuit_json_footprint_load_error"),
|
|
3870
3887
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3871
3888
|
"circuit_json_footprint_load_error"
|
|
3872
3889
|
),
|
|
3873
|
-
pcb_component_id:
|
|
3874
|
-
source_component_id:
|
|
3875
|
-
pcb_group_id:
|
|
3876
|
-
subcircuit_id:
|
|
3877
|
-
error_type:
|
|
3878
|
-
circuit_json:
|
|
3890
|
+
pcb_component_id: z171.string(),
|
|
3891
|
+
source_component_id: z171.string(),
|
|
3892
|
+
pcb_group_id: z171.string().optional(),
|
|
3893
|
+
subcircuit_id: z171.string().optional(),
|
|
3894
|
+
error_type: z171.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
3895
|
+
circuit_json: z171.array(z171.any()).optional()
|
|
3879
3896
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
3880
3897
|
expectTypesMatch(true);
|
|
3881
3898
|
|
|
3882
3899
|
// src/pcb/pcb_group.ts
|
|
3883
|
-
import { z as
|
|
3884
|
-
var pcb_group =
|
|
3885
|
-
type:
|
|
3900
|
+
import { z as z172 } from "zod";
|
|
3901
|
+
var pcb_group = z172.object({
|
|
3902
|
+
type: z172.literal("pcb_group"),
|
|
3886
3903
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
3887
|
-
source_group_id:
|
|
3888
|
-
is_subcircuit:
|
|
3889
|
-
subcircuit_id:
|
|
3904
|
+
source_group_id: z172.string(),
|
|
3905
|
+
is_subcircuit: z172.boolean().optional(),
|
|
3906
|
+
subcircuit_id: z172.string().optional(),
|
|
3890
3907
|
width: length.optional(),
|
|
3891
3908
|
height: length.optional(),
|
|
3892
3909
|
center: point,
|
|
3893
|
-
display_offset_x:
|
|
3910
|
+
display_offset_x: z172.string().optional().describe(
|
|
3894
3911
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
3895
3912
|
),
|
|
3896
|
-
display_offset_y:
|
|
3913
|
+
display_offset_y: z172.string().optional().describe(
|
|
3897
3914
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
3898
3915
|
),
|
|
3899
|
-
outline:
|
|
3916
|
+
outline: z172.array(point).optional(),
|
|
3900
3917
|
anchor_position: point.optional(),
|
|
3901
3918
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
3902
|
-
position_mode:
|
|
3903
|
-
positioned_relative_to_pcb_group_id:
|
|
3904
|
-
positioned_relative_to_pcb_board_id:
|
|
3905
|
-
pcb_component_ids:
|
|
3906
|
-
child_layout_mode:
|
|
3907
|
-
name:
|
|
3908
|
-
description:
|
|
3909
|
-
layout_mode:
|
|
3910
|
-
autorouter_configuration:
|
|
3919
|
+
position_mode: z172.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
3920
|
+
positioned_relative_to_pcb_group_id: z172.string().optional(),
|
|
3921
|
+
positioned_relative_to_pcb_board_id: z172.string().optional(),
|
|
3922
|
+
pcb_component_ids: z172.array(z172.string()),
|
|
3923
|
+
child_layout_mode: z172.enum(["packed", "none"]).optional(),
|
|
3924
|
+
name: z172.string().optional(),
|
|
3925
|
+
description: z172.string().optional(),
|
|
3926
|
+
layout_mode: z172.string().optional(),
|
|
3927
|
+
autorouter_configuration: z172.object({
|
|
3911
3928
|
trace_clearance: length
|
|
3912
3929
|
}).optional(),
|
|
3913
|
-
autorouter_used_string:
|
|
3930
|
+
autorouter_used_string: z172.string().optional()
|
|
3914
3931
|
}).describe("Defines a group of components on the PCB");
|
|
3915
3932
|
expectTypesMatch(true);
|
|
3916
3933
|
|
|
3917
3934
|
// src/pcb/pcb_autorouting_error.ts
|
|
3918
|
-
import { z as
|
|
3935
|
+
import { z as z173 } from "zod";
|
|
3919
3936
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
3920
|
-
type:
|
|
3937
|
+
type: z173.literal("pcb_autorouting_error"),
|
|
3921
3938
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
3922
|
-
error_type:
|
|
3923
|
-
subcircuit_id:
|
|
3939
|
+
error_type: z173.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
3940
|
+
subcircuit_id: z173.string().optional()
|
|
3924
3941
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
3925
3942
|
expectTypesMatch(true);
|
|
3926
3943
|
|
|
3927
3944
|
// src/pcb/pcb_preflight_routing_error.ts
|
|
3928
|
-
import { z as
|
|
3945
|
+
import { z as z174 } from "zod";
|
|
3929
3946
|
var pcb_preflight_routing_error = base_circuit_json_error.extend({
|
|
3930
|
-
type:
|
|
3947
|
+
type: z174.literal("pcb_preflight_routing_error"),
|
|
3931
3948
|
pcb_preflight_routing_error_id: getZodPrefixedIdWithDefault(
|
|
3932
3949
|
"pcb_preflight_routing_error"
|
|
3933
3950
|
),
|
|
3934
|
-
error_type:
|
|
3935
|
-
error_code:
|
|
3936
|
-
subcircuit_id:
|
|
3937
|
-
pcb_group_id:
|
|
3938
|
-
routing_phase_index:
|
|
3939
|
-
phase_name:
|
|
3940
|
-
source_trace_ids:
|
|
3941
|
-
pcb_component_ids:
|
|
3942
|
-
pcb_port_ids:
|
|
3943
|
-
related_error_ids:
|
|
3944
|
-
measurements:
|
|
3951
|
+
error_type: z174.literal("pcb_preflight_routing_error").default("pcb_preflight_routing_error"),
|
|
3952
|
+
error_code: z174.string(),
|
|
3953
|
+
subcircuit_id: z174.string().optional(),
|
|
3954
|
+
pcb_group_id: z174.string().optional(),
|
|
3955
|
+
routing_phase_index: z174.number().int().optional(),
|
|
3956
|
+
phase_name: z174.string().optional(),
|
|
3957
|
+
source_trace_ids: z174.array(z174.string()).optional(),
|
|
3958
|
+
pcb_component_ids: z174.array(z174.string()).optional(),
|
|
3959
|
+
pcb_port_ids: z174.array(z174.string()).optional(),
|
|
3960
|
+
related_error_ids: z174.array(z174.string()).optional(),
|
|
3961
|
+
measurements: z174.record(z174.number().finite()).optional()
|
|
3945
3962
|
});
|
|
3946
3963
|
expectTypesMatch(true);
|
|
3947
3964
|
|
|
3948
3965
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
3949
|
-
import { z as
|
|
3950
|
-
var pcb_manual_edit_conflict_warning =
|
|
3951
|
-
type:
|
|
3966
|
+
import { z as z175 } from "zod";
|
|
3967
|
+
var pcb_manual_edit_conflict_warning = z175.object({
|
|
3968
|
+
type: z175.literal("pcb_manual_edit_conflict_warning"),
|
|
3952
3969
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
3953
3970
|
"pcb_manual_edit_conflict_warning"
|
|
3954
3971
|
),
|
|
3955
|
-
warning_type:
|
|
3956
|
-
message:
|
|
3957
|
-
pcb_component_id:
|
|
3958
|
-
pcb_group_id:
|
|
3959
|
-
subcircuit_id:
|
|
3960
|
-
source_component_id:
|
|
3972
|
+
warning_type: z175.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
3973
|
+
message: z175.string(),
|
|
3974
|
+
pcb_component_id: z175.string(),
|
|
3975
|
+
pcb_group_id: z175.string().optional(),
|
|
3976
|
+
subcircuit_id: z175.string().optional(),
|
|
3977
|
+
source_component_id: z175.string()
|
|
3961
3978
|
}).describe(
|
|
3962
3979
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3963
3980
|
);
|
|
3964
3981
|
expectTypesMatch(true);
|
|
3965
3982
|
|
|
3966
3983
|
// src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts
|
|
3967
|
-
import { z as
|
|
3968
|
-
var connectorOrientationDirection =
|
|
3969
|
-
var pcb_connector_not_in_accessible_orientation_warning =
|
|
3970
|
-
type:
|
|
3984
|
+
import { z as z176 } from "zod";
|
|
3985
|
+
var connectorOrientationDirection = z176.enum(["x-", "x+", "y+", "y-"]);
|
|
3986
|
+
var pcb_connector_not_in_accessible_orientation_warning = z176.object({
|
|
3987
|
+
type: z176.literal("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3971
3988
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3972
3989
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3973
3990
|
),
|
|
3974
|
-
warning_type:
|
|
3975
|
-
message:
|
|
3976
|
-
pcb_component_id:
|
|
3977
|
-
source_component_id:
|
|
3978
|
-
pcb_board_id:
|
|
3991
|
+
warning_type: z176.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3992
|
+
message: z176.string(),
|
|
3993
|
+
pcb_component_id: z176.string(),
|
|
3994
|
+
source_component_id: z176.string().optional(),
|
|
3995
|
+
pcb_board_id: z176.string().optional(),
|
|
3979
3996
|
facing_direction: connectorOrientationDirection,
|
|
3980
3997
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3981
|
-
subcircuit_id:
|
|
3998
|
+
subcircuit_id: z176.string().optional()
|
|
3982
3999
|
}).describe(
|
|
3983
4000
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
3984
4001
|
);
|
|
3985
4002
|
expectTypesMatch(true);
|
|
3986
4003
|
|
|
3987
4004
|
// src/pcb/pcb_component_missing_courtyard_warning.ts
|
|
3988
|
-
import { z as
|
|
3989
|
-
var pcb_component_missing_courtyard_warning =
|
|
3990
|
-
type:
|
|
4005
|
+
import { z as z177 } from "zod";
|
|
4006
|
+
var pcb_component_missing_courtyard_warning = z177.object({
|
|
4007
|
+
type: z177.literal("pcb_component_missing_courtyard_warning"),
|
|
3991
4008
|
pcb_component_missing_courtyard_warning_id: getZodPrefixedIdWithDefault(
|
|
3992
4009
|
"pcb_component_missing_courtyard_warning"
|
|
3993
4010
|
),
|
|
3994
|
-
warning_type:
|
|
3995
|
-
message:
|
|
3996
|
-
pcb_component_id:
|
|
3997
|
-
source_component_id:
|
|
3998
|
-
subcircuit_id:
|
|
4011
|
+
warning_type: z177.literal("pcb_component_missing_courtyard_warning").default("pcb_component_missing_courtyard_warning"),
|
|
4012
|
+
message: z177.string(),
|
|
4013
|
+
pcb_component_id: z177.string(),
|
|
4014
|
+
source_component_id: z177.string().optional(),
|
|
4015
|
+
subcircuit_id: z177.string().optional()
|
|
3999
4016
|
}).describe("Warning emitted when a PCB component has no courtyard geometry");
|
|
4000
4017
|
expectTypesMatch(true);
|
|
4001
4018
|
|
|
4002
4019
|
// src/pcb/supplier_footprint_mismatch_warning.ts
|
|
4003
|
-
import { z as
|
|
4004
|
-
var supplier_footprint_mismatch_warning =
|
|
4005
|
-
type:
|
|
4020
|
+
import { z as z178 } from "zod";
|
|
4021
|
+
var supplier_footprint_mismatch_warning = z178.object({
|
|
4022
|
+
type: z178.literal("supplier_footprint_mismatch_warning"),
|
|
4006
4023
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
4007
4024
|
"supplier_footprint_mismatch_warning"
|
|
4008
4025
|
),
|
|
4009
|
-
warning_type:
|
|
4010
|
-
message:
|
|
4011
|
-
source_component_id:
|
|
4012
|
-
pcb_component_id:
|
|
4013
|
-
pcb_group_id:
|
|
4014
|
-
subcircuit_id:
|
|
4026
|
+
warning_type: z178.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
|
|
4027
|
+
message: z178.string(),
|
|
4028
|
+
source_component_id: z178.string(),
|
|
4029
|
+
pcb_component_id: z178.string().optional(),
|
|
4030
|
+
pcb_group_id: z178.string().optional(),
|
|
4031
|
+
subcircuit_id: z178.string().optional(),
|
|
4015
4032
|
supplier_name: supplier_name.optional(),
|
|
4016
|
-
supplier_part_number:
|
|
4017
|
-
supplier_footprint_url:
|
|
4018
|
-
footprint_copper_intersection_over_union:
|
|
4033
|
+
supplier_part_number: z178.string().optional(),
|
|
4034
|
+
supplier_footprint_url: z178.string().optional(),
|
|
4035
|
+
footprint_copper_intersection_over_union: z178.number()
|
|
4019
4036
|
}).describe(
|
|
4020
4037
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
4021
4038
|
);
|
|
4022
4039
|
expectTypesMatch(true);
|
|
4023
4040
|
|
|
4024
4041
|
// src/pcb/pcb_fabricator_extra_charge_warning.ts
|
|
4025
|
-
import { z as
|
|
4026
|
-
var pcb_fabricator_extra_charge_warning =
|
|
4027
|
-
type:
|
|
4042
|
+
import { z as z179 } from "zod";
|
|
4043
|
+
var pcb_fabricator_extra_charge_warning = z179.object({
|
|
4044
|
+
type: z179.literal("pcb_fabricator_extra_charge_warning"),
|
|
4028
4045
|
pcb_fabricator_extra_charge_warning_id: getZodPrefixedIdWithDefault(
|
|
4029
4046
|
"pcb_fabricator_extra_charge_warning"
|
|
4030
4047
|
),
|
|
4031
|
-
warning_type:
|
|
4032
|
-
message:
|
|
4033
|
-
fabricator_preset:
|
|
4034
|
-
pcb_board_id:
|
|
4035
|
-
pcb_via_ids:
|
|
4036
|
-
subcircuit_id:
|
|
4048
|
+
warning_type: z179.literal("pcb_fabricator_extra_charge_warning").default("pcb_fabricator_extra_charge_warning"),
|
|
4049
|
+
message: z179.string(),
|
|
4050
|
+
fabricator_preset: z179.string(),
|
|
4051
|
+
pcb_board_id: z179.string().optional(),
|
|
4052
|
+
pcb_via_ids: z179.array(z179.string()).optional(),
|
|
4053
|
+
subcircuit_id: z179.string().optional()
|
|
4037
4054
|
}).describe(
|
|
4038
4055
|
"Warning that a design feature incurs an extra charge for the selected fabricator preset, such as via hole diameters below 0.3 mm with JLCPCB economy or standard presets."
|
|
4039
4056
|
);
|
|
4040
4057
|
expectTypesMatch(true);
|
|
4041
4058
|
|
|
4042
4059
|
// src/pcb/pcb_breakout_point.ts
|
|
4043
|
-
import { z as
|
|
4044
|
-
var pcb_breakout_point =
|
|
4045
|
-
type:
|
|
4060
|
+
import { z as z180 } from "zod";
|
|
4061
|
+
var pcb_breakout_point = z180.object({
|
|
4062
|
+
type: z180.literal("pcb_breakout_point"),
|
|
4046
4063
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
4047
|
-
pcb_group_id:
|
|
4048
|
-
subcircuit_id:
|
|
4049
|
-
source_trace_id:
|
|
4050
|
-
source_port_id:
|
|
4051
|
-
source_net_id:
|
|
4064
|
+
pcb_group_id: z180.string(),
|
|
4065
|
+
subcircuit_id: z180.string().optional(),
|
|
4066
|
+
source_trace_id: z180.string().optional(),
|
|
4067
|
+
source_port_id: z180.string().optional(),
|
|
4068
|
+
source_net_id: z180.string().optional(),
|
|
4052
4069
|
layer: layer_ref.optional(),
|
|
4053
4070
|
x: distance,
|
|
4054
4071
|
y: distance
|
|
@@ -4058,61 +4075,61 @@ var pcb_breakout_point = z179.object({
|
|
|
4058
4075
|
expectTypesMatch(true);
|
|
4059
4076
|
|
|
4060
4077
|
// src/pcb/pcb_ground_plane.ts
|
|
4061
|
-
import { z as
|
|
4062
|
-
var pcb_ground_plane =
|
|
4063
|
-
type:
|
|
4078
|
+
import { z as z181 } from "zod";
|
|
4079
|
+
var pcb_ground_plane = z181.object({
|
|
4080
|
+
type: z181.literal("pcb_ground_plane"),
|
|
4064
4081
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
4065
|
-
source_pcb_ground_plane_id:
|
|
4066
|
-
source_net_id:
|
|
4067
|
-
pcb_group_id:
|
|
4068
|
-
subcircuit_id:
|
|
4082
|
+
source_pcb_ground_plane_id: z181.string(),
|
|
4083
|
+
source_net_id: z181.string(),
|
|
4084
|
+
pcb_group_id: z181.string().optional(),
|
|
4085
|
+
subcircuit_id: z181.string().optional()
|
|
4069
4086
|
}).describe("Defines a ground plane on the PCB");
|
|
4070
4087
|
expectTypesMatch(true);
|
|
4071
4088
|
|
|
4072
4089
|
// src/pcb/pcb_ground_plane_region.ts
|
|
4073
|
-
import { z as
|
|
4074
|
-
var pcb_ground_plane_region =
|
|
4075
|
-
type:
|
|
4090
|
+
import { z as z182 } from "zod";
|
|
4091
|
+
var pcb_ground_plane_region = z182.object({
|
|
4092
|
+
type: z182.literal("pcb_ground_plane_region"),
|
|
4076
4093
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
4077
4094
|
"pcb_ground_plane_region"
|
|
4078
4095
|
),
|
|
4079
|
-
pcb_ground_plane_id:
|
|
4080
|
-
pcb_group_id:
|
|
4081
|
-
subcircuit_id:
|
|
4096
|
+
pcb_ground_plane_id: z182.string(),
|
|
4097
|
+
pcb_group_id: z182.string().optional(),
|
|
4098
|
+
subcircuit_id: z182.string().optional(),
|
|
4082
4099
|
layer: layer_ref,
|
|
4083
|
-
points:
|
|
4100
|
+
points: z182.array(point)
|
|
4084
4101
|
}).describe("Defines a polygon region of a ground plane");
|
|
4085
4102
|
expectTypesMatch(true);
|
|
4086
4103
|
|
|
4087
4104
|
// src/pcb/pcb_thermal_spoke.ts
|
|
4088
|
-
import { z as
|
|
4089
|
-
var pcb_thermal_spoke =
|
|
4090
|
-
type:
|
|
4105
|
+
import { z as z183 } from "zod";
|
|
4106
|
+
var pcb_thermal_spoke = z183.object({
|
|
4107
|
+
type: z183.literal("pcb_thermal_spoke"),
|
|
4091
4108
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
4092
|
-
pcb_ground_plane_id:
|
|
4093
|
-
shape:
|
|
4094
|
-
spoke_count:
|
|
4109
|
+
pcb_ground_plane_id: z183.string(),
|
|
4110
|
+
shape: z183.string(),
|
|
4111
|
+
spoke_count: z183.number(),
|
|
4095
4112
|
spoke_thickness: distance,
|
|
4096
4113
|
spoke_inner_diameter: distance,
|
|
4097
4114
|
spoke_outer_diameter: distance,
|
|
4098
|
-
pcb_plated_hole_id:
|
|
4099
|
-
subcircuit_id:
|
|
4115
|
+
pcb_plated_hole_id: z183.string().optional(),
|
|
4116
|
+
subcircuit_id: z183.string().optional()
|
|
4100
4117
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
4101
4118
|
expectTypesMatch(true);
|
|
4102
4119
|
|
|
4103
4120
|
// src/pcb/pcb_copper_pour.ts
|
|
4104
|
-
import { z as
|
|
4105
|
-
var pcb_copper_pour_base =
|
|
4106
|
-
type:
|
|
4121
|
+
import { z as z184 } from "zod";
|
|
4122
|
+
var pcb_copper_pour_base = z184.object({
|
|
4123
|
+
type: z184.literal("pcb_copper_pour"),
|
|
4107
4124
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
4108
|
-
pcb_group_id:
|
|
4109
|
-
subcircuit_id:
|
|
4125
|
+
pcb_group_id: z184.string().optional(),
|
|
4126
|
+
subcircuit_id: z184.string().optional(),
|
|
4110
4127
|
layer: layer_ref,
|
|
4111
|
-
source_net_id:
|
|
4112
|
-
covered_with_solder_mask:
|
|
4128
|
+
source_net_id: z184.string().optional(),
|
|
4129
|
+
covered_with_solder_mask: z184.boolean().optional().default(true)
|
|
4113
4130
|
});
|
|
4114
4131
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
4115
|
-
shape:
|
|
4132
|
+
shape: z184.literal("rect"),
|
|
4116
4133
|
center: point,
|
|
4117
4134
|
width: length,
|
|
4118
4135
|
height: length,
|
|
@@ -4120,16 +4137,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
4120
4137
|
});
|
|
4121
4138
|
expectTypesMatch(true);
|
|
4122
4139
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
4123
|
-
shape:
|
|
4140
|
+
shape: z184.literal("brep"),
|
|
4124
4141
|
brep_shape
|
|
4125
4142
|
});
|
|
4126
4143
|
expectTypesMatch(true);
|
|
4127
4144
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
4128
|
-
shape:
|
|
4129
|
-
points:
|
|
4145
|
+
shape: z184.literal("polygon"),
|
|
4146
|
+
points: z184.array(point)
|
|
4130
4147
|
});
|
|
4131
4148
|
expectTypesMatch(true);
|
|
4132
|
-
var pcb_copper_pour =
|
|
4149
|
+
var pcb_copper_pour = z184.discriminatedUnion("shape", [
|
|
4133
4150
|
pcb_copper_pour_rect,
|
|
4134
4151
|
pcb_copper_pour_brep,
|
|
4135
4152
|
pcb_copper_pour_polygon
|
|
@@ -4137,99 +4154,99 @@ var pcb_copper_pour = z183.discriminatedUnion("shape", [
|
|
|
4137
4154
|
expectTypesMatch(true);
|
|
4138
4155
|
|
|
4139
4156
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
4140
|
-
import { z as
|
|
4157
|
+
import { z as z185 } from "zod";
|
|
4141
4158
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
4142
|
-
type:
|
|
4159
|
+
type: z185.literal("pcb_component_outside_board_error"),
|
|
4143
4160
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
4144
4161
|
"pcb_component_outside_board_error"
|
|
4145
4162
|
),
|
|
4146
|
-
error_type:
|
|
4147
|
-
pcb_component_id:
|
|
4148
|
-
pcb_board_id:
|
|
4163
|
+
error_type: z185.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
4164
|
+
pcb_component_id: z185.string(),
|
|
4165
|
+
pcb_board_id: z185.string(),
|
|
4149
4166
|
component_center: point,
|
|
4150
|
-
component_bounds:
|
|
4151
|
-
min_x:
|
|
4152
|
-
max_x:
|
|
4153
|
-
min_y:
|
|
4154
|
-
max_y:
|
|
4167
|
+
component_bounds: z185.object({
|
|
4168
|
+
min_x: z185.number(),
|
|
4169
|
+
max_x: z185.number(),
|
|
4170
|
+
min_y: z185.number(),
|
|
4171
|
+
max_y: z185.number()
|
|
4155
4172
|
}),
|
|
4156
|
-
subcircuit_id:
|
|
4157
|
-
source_component_id:
|
|
4173
|
+
subcircuit_id: z185.string().optional(),
|
|
4174
|
+
source_component_id: z185.string().optional()
|
|
4158
4175
|
}).describe(
|
|
4159
4176
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
4160
4177
|
);
|
|
4161
4178
|
expectTypesMatch(true);
|
|
4162
4179
|
|
|
4163
4180
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
4164
|
-
import { z as
|
|
4181
|
+
import { z as z186 } from "zod";
|
|
4165
4182
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
4166
|
-
type:
|
|
4183
|
+
type: z186.literal("pcb_component_not_on_board_edge_error"),
|
|
4167
4184
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
4168
4185
|
"pcb_component_not_on_board_edge_error"
|
|
4169
4186
|
),
|
|
4170
|
-
error_type:
|
|
4171
|
-
pcb_component_id:
|
|
4172
|
-
pcb_board_id:
|
|
4187
|
+
error_type: z186.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
4188
|
+
pcb_component_id: z186.string(),
|
|
4189
|
+
pcb_board_id: z186.string(),
|
|
4173
4190
|
component_center: point,
|
|
4174
|
-
pad_to_nearest_board_edge_distance:
|
|
4175
|
-
source_component_id:
|
|
4176
|
-
subcircuit_id:
|
|
4191
|
+
pad_to_nearest_board_edge_distance: z186.number(),
|
|
4192
|
+
source_component_id: z186.string().optional(),
|
|
4193
|
+
subcircuit_id: z186.string().optional()
|
|
4177
4194
|
}).describe(
|
|
4178
4195
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
4179
4196
|
);
|
|
4180
4197
|
expectTypesMatch(true);
|
|
4181
4198
|
|
|
4182
4199
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
4183
|
-
import { z as
|
|
4200
|
+
import { z as z187 } from "zod";
|
|
4184
4201
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
4185
|
-
type:
|
|
4202
|
+
type: z187.literal("pcb_component_invalid_layer_error"),
|
|
4186
4203
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
4187
4204
|
"pcb_component_invalid_layer_error"
|
|
4188
4205
|
),
|
|
4189
|
-
error_type:
|
|
4190
|
-
pcb_component_id:
|
|
4191
|
-
source_component_id:
|
|
4206
|
+
error_type: z187.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
4207
|
+
pcb_component_id: z187.string().optional(),
|
|
4208
|
+
source_component_id: z187.string(),
|
|
4192
4209
|
layer: layer_ref,
|
|
4193
|
-
subcircuit_id:
|
|
4210
|
+
subcircuit_id: z187.string().optional()
|
|
4194
4211
|
}).describe(
|
|
4195
4212
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
4196
4213
|
);
|
|
4197
4214
|
expectTypesMatch(true);
|
|
4198
4215
|
|
|
4199
4216
|
// src/pcb/pcb_via_clearance_error.ts
|
|
4200
|
-
import { z as
|
|
4217
|
+
import { z as z188 } from "zod";
|
|
4201
4218
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
4202
|
-
type:
|
|
4219
|
+
type: z188.literal("pcb_via_clearance_error"),
|
|
4203
4220
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
4204
|
-
error_type:
|
|
4205
|
-
pcb_via_ids:
|
|
4221
|
+
error_type: z188.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
4222
|
+
pcb_via_ids: z188.array(z188.string()).min(2),
|
|
4206
4223
|
minimum_clearance: distance.optional(),
|
|
4207
4224
|
actual_clearance: distance.optional(),
|
|
4208
|
-
pcb_center:
|
|
4209
|
-
x:
|
|
4210
|
-
y:
|
|
4225
|
+
pcb_center: z188.object({
|
|
4226
|
+
x: z188.number().optional(),
|
|
4227
|
+
y: z188.number().optional()
|
|
4211
4228
|
}).optional(),
|
|
4212
|
-
subcircuit_id:
|
|
4229
|
+
subcircuit_id: z188.string().optional()
|
|
4213
4230
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
4214
4231
|
expectTypesMatch(true);
|
|
4215
4232
|
|
|
4216
4233
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
4217
|
-
import { z as
|
|
4234
|
+
import { z as z189 } from "zod";
|
|
4218
4235
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
4219
|
-
type:
|
|
4236
|
+
type: z189.literal("pcb_via_trace_clearance_error"),
|
|
4220
4237
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
4221
4238
|
"pcb_via_trace_clearance_error"
|
|
4222
4239
|
),
|
|
4223
|
-
error_type:
|
|
4224
|
-
pcb_via_id:
|
|
4225
|
-
pcb_trace_id:
|
|
4240
|
+
error_type: z189.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
4241
|
+
pcb_via_id: z189.string(),
|
|
4242
|
+
pcb_trace_id: z189.string(),
|
|
4226
4243
|
minimum_clearance: distance.optional(),
|
|
4227
4244
|
actual_clearance: distance.optional(),
|
|
4228
|
-
center:
|
|
4229
|
-
x:
|
|
4230
|
-
y:
|
|
4245
|
+
center: z189.object({
|
|
4246
|
+
x: z189.number().optional(),
|
|
4247
|
+
y: z189.number().optional()
|
|
4231
4248
|
}).optional(),
|
|
4232
|
-
subcircuit_id:
|
|
4249
|
+
subcircuit_id: z189.string().optional()
|
|
4233
4250
|
}).describe(
|
|
4234
4251
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
4235
4252
|
);
|
|
@@ -4238,41 +4255,41 @@ expectTypesMatch(
|
|
|
4238
4255
|
);
|
|
4239
4256
|
|
|
4240
4257
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
4241
|
-
import { z as
|
|
4258
|
+
import { z as z190 } from "zod";
|
|
4242
4259
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
4243
|
-
type:
|
|
4260
|
+
type: z190.literal("pcb_pad_pad_clearance_error"),
|
|
4244
4261
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
4245
4262
|
"pcb_pad_pad_clearance_error"
|
|
4246
4263
|
),
|
|
4247
|
-
error_type:
|
|
4248
|
-
pcb_pad_ids:
|
|
4264
|
+
error_type: z190.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
4265
|
+
pcb_pad_ids: z190.array(z190.string()).min(2),
|
|
4249
4266
|
minimum_clearance: distance.optional(),
|
|
4250
4267
|
actual_clearance: distance.optional(),
|
|
4251
|
-
center:
|
|
4252
|
-
x:
|
|
4253
|
-
y:
|
|
4268
|
+
center: z190.object({
|
|
4269
|
+
x: z190.number().optional(),
|
|
4270
|
+
y: z190.number().optional()
|
|
4254
4271
|
}).optional(),
|
|
4255
|
-
subcircuit_id:
|
|
4272
|
+
subcircuit_id: z190.string().optional()
|
|
4256
4273
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
4257
4274
|
expectTypesMatch(true);
|
|
4258
4275
|
|
|
4259
4276
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
4260
|
-
import { z as
|
|
4277
|
+
import { z as z191 } from "zod";
|
|
4261
4278
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
4262
|
-
type:
|
|
4279
|
+
type: z191.literal("pcb_pad_trace_clearance_error"),
|
|
4263
4280
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
4264
4281
|
"pcb_pad_trace_clearance_error"
|
|
4265
4282
|
),
|
|
4266
|
-
error_type:
|
|
4267
|
-
pcb_pad_id:
|
|
4268
|
-
pcb_trace_id:
|
|
4283
|
+
error_type: z191.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
4284
|
+
pcb_pad_id: z191.string(),
|
|
4285
|
+
pcb_trace_id: z191.string(),
|
|
4269
4286
|
minimum_clearance: distance.optional(),
|
|
4270
4287
|
actual_clearance: distance.optional(),
|
|
4271
|
-
center:
|
|
4272
|
-
x:
|
|
4273
|
-
y:
|
|
4288
|
+
center: z191.object({
|
|
4289
|
+
x: z191.number().optional(),
|
|
4290
|
+
y: z191.number().optional()
|
|
4274
4291
|
}).optional(),
|
|
4275
|
-
subcircuit_id:
|
|
4292
|
+
subcircuit_id: z191.string().optional()
|
|
4276
4293
|
}).describe(
|
|
4277
4294
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
4278
4295
|
);
|
|
@@ -4281,89 +4298,89 @@ expectTypesMatch(
|
|
|
4281
4298
|
);
|
|
4282
4299
|
|
|
4283
4300
|
// src/pcb/pcb_courtyard_rect.ts
|
|
4284
|
-
import { z as
|
|
4285
|
-
var pcb_courtyard_rect =
|
|
4286
|
-
type:
|
|
4301
|
+
import { z as z192 } from "zod";
|
|
4302
|
+
var pcb_courtyard_rect = z192.object({
|
|
4303
|
+
type: z192.literal("pcb_courtyard_rect"),
|
|
4287
4304
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
4288
|
-
pcb_component_id:
|
|
4289
|
-
pcb_group_id:
|
|
4290
|
-
subcircuit_id:
|
|
4305
|
+
pcb_component_id: z192.string(),
|
|
4306
|
+
pcb_group_id: z192.string().optional(),
|
|
4307
|
+
subcircuit_id: z192.string().optional(),
|
|
4291
4308
|
center: point,
|
|
4292
4309
|
width: length,
|
|
4293
4310
|
height: length,
|
|
4294
4311
|
layer: visible_layer,
|
|
4295
4312
|
ccw_rotation: rotation.optional(),
|
|
4296
|
-
color:
|
|
4313
|
+
color: z192.string().optional()
|
|
4297
4314
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
4298
4315
|
expectTypesMatch(true);
|
|
4299
4316
|
|
|
4300
4317
|
// src/pcb/pcb_courtyard_outline.ts
|
|
4301
|
-
import { z as
|
|
4302
|
-
var pcb_courtyard_outline =
|
|
4303
|
-
type:
|
|
4318
|
+
import { z as z193 } from "zod";
|
|
4319
|
+
var pcb_courtyard_outline = z193.object({
|
|
4320
|
+
type: z193.literal("pcb_courtyard_outline"),
|
|
4304
4321
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
4305
4322
|
"pcb_courtyard_outline"
|
|
4306
4323
|
),
|
|
4307
|
-
pcb_component_id:
|
|
4308
|
-
pcb_group_id:
|
|
4309
|
-
subcircuit_id:
|
|
4324
|
+
pcb_component_id: z193.string(),
|
|
4325
|
+
pcb_group_id: z193.string().optional(),
|
|
4326
|
+
subcircuit_id: z193.string().optional(),
|
|
4310
4327
|
layer: visible_layer,
|
|
4311
|
-
outline:
|
|
4328
|
+
outline: z193.array(point).min(2)
|
|
4312
4329
|
}).describe("Defines a courtyard outline on the PCB");
|
|
4313
4330
|
expectTypesMatch(true);
|
|
4314
4331
|
|
|
4315
4332
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
4316
|
-
import { z as
|
|
4317
|
-
var pcb_courtyard_polygon =
|
|
4318
|
-
type:
|
|
4333
|
+
import { z as z194 } from "zod";
|
|
4334
|
+
var pcb_courtyard_polygon = z194.object({
|
|
4335
|
+
type: z194.literal("pcb_courtyard_polygon"),
|
|
4319
4336
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
4320
4337
|
"pcb_courtyard_polygon"
|
|
4321
4338
|
),
|
|
4322
|
-
pcb_component_id:
|
|
4323
|
-
pcb_group_id:
|
|
4324
|
-
subcircuit_id:
|
|
4339
|
+
pcb_component_id: z194.string(),
|
|
4340
|
+
pcb_group_id: z194.string().optional(),
|
|
4341
|
+
subcircuit_id: z194.string().optional(),
|
|
4325
4342
|
layer: visible_layer,
|
|
4326
|
-
points:
|
|
4327
|
-
color:
|
|
4343
|
+
points: z194.array(point).min(3),
|
|
4344
|
+
color: z194.string().optional()
|
|
4328
4345
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
4329
4346
|
expectTypesMatch(true);
|
|
4330
4347
|
|
|
4331
4348
|
// src/pcb/pcb_courtyard_circle.ts
|
|
4332
|
-
import { z as
|
|
4333
|
-
var pcb_courtyard_circle =
|
|
4334
|
-
type:
|
|
4349
|
+
import { z as z195 } from "zod";
|
|
4350
|
+
var pcb_courtyard_circle = z195.object({
|
|
4351
|
+
type: z195.literal("pcb_courtyard_circle"),
|
|
4335
4352
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
4336
4353
|
"pcb_courtyard_circle"
|
|
4337
4354
|
),
|
|
4338
|
-
pcb_component_id:
|
|
4339
|
-
pcb_group_id:
|
|
4340
|
-
subcircuit_id:
|
|
4355
|
+
pcb_component_id: z195.string(),
|
|
4356
|
+
pcb_group_id: z195.string().optional(),
|
|
4357
|
+
subcircuit_id: z195.string().optional(),
|
|
4341
4358
|
center: point,
|
|
4342
4359
|
radius: length,
|
|
4343
4360
|
layer: visible_layer,
|
|
4344
|
-
color:
|
|
4361
|
+
color: z195.string().optional()
|
|
4345
4362
|
}).describe("Defines a courtyard circle on the PCB");
|
|
4346
4363
|
expectTypesMatch(true);
|
|
4347
4364
|
|
|
4348
4365
|
// src/pcb/pcb_courtyard_pill.ts
|
|
4349
|
-
import { z as
|
|
4350
|
-
var pcb_courtyard_pill =
|
|
4351
|
-
type:
|
|
4366
|
+
import { z as z196 } from "zod";
|
|
4367
|
+
var pcb_courtyard_pill = z196.object({
|
|
4368
|
+
type: z196.literal("pcb_courtyard_pill"),
|
|
4352
4369
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
4353
|
-
pcb_component_id:
|
|
4354
|
-
pcb_group_id:
|
|
4355
|
-
subcircuit_id:
|
|
4370
|
+
pcb_component_id: z196.string(),
|
|
4371
|
+
pcb_group_id: z196.string().optional(),
|
|
4372
|
+
subcircuit_id: z196.string().optional(),
|
|
4356
4373
|
center: point,
|
|
4357
4374
|
width: length,
|
|
4358
4375
|
height: length,
|
|
4359
4376
|
radius: length,
|
|
4360
4377
|
layer: visible_layer,
|
|
4361
|
-
color:
|
|
4378
|
+
color: z196.string().optional()
|
|
4362
4379
|
}).describe("Defines a courtyard pill on the PCB");
|
|
4363
4380
|
expectTypesMatch(true);
|
|
4364
4381
|
|
|
4365
4382
|
// src/cad/cad_component.ts
|
|
4366
|
-
import { z as
|
|
4383
|
+
import { z as z197 } from "zod";
|
|
4367
4384
|
|
|
4368
4385
|
// src/cad/cad_model_conventions.ts
|
|
4369
4386
|
var cad_model_formats = [
|
|
@@ -4394,87 +4411,87 @@ var cadModelDefaultDirectionMap = {
|
|
|
4394
4411
|
};
|
|
4395
4412
|
|
|
4396
4413
|
// src/cad/cad_component.ts
|
|
4397
|
-
var cad_component =
|
|
4398
|
-
type:
|
|
4399
|
-
cad_component_id:
|
|
4400
|
-
pcb_component_id:
|
|
4414
|
+
var cad_component = z197.object({
|
|
4415
|
+
type: z197.literal("cad_component"),
|
|
4416
|
+
cad_component_id: z197.string(),
|
|
4417
|
+
pcb_component_id: z197.string().optional().describe(
|
|
4401
4418
|
"Optional PCB component reference; omit for CAD geometry without a PCB component"
|
|
4402
4419
|
),
|
|
4403
|
-
source_component_id:
|
|
4420
|
+
source_component_id: z197.string(),
|
|
4404
4421
|
position: point3,
|
|
4405
4422
|
rotation: point3.optional(),
|
|
4406
|
-
is_on_folded_board:
|
|
4423
|
+
is_on_folded_board: z197.boolean().optional().describe(
|
|
4407
4424
|
"True when position and rotation describe the assembled folded board pose. False or omitted means the flat board pose. PCB records remain flat; pcb_component_id identifies the flat mount and owning board for reversible transforms."
|
|
4408
4425
|
),
|
|
4409
4426
|
size: point3.optional(),
|
|
4410
4427
|
layer: layer_ref.optional(),
|
|
4411
|
-
subcircuit_id:
|
|
4428
|
+
subcircuit_id: z197.string().optional(),
|
|
4412
4429
|
// These are all ways to generate/load the 3d model
|
|
4413
|
-
footprinter_string:
|
|
4414
|
-
model_obj_url:
|
|
4415
|
-
model_stl_url:
|
|
4416
|
-
model_3mf_url:
|
|
4417
|
-
model_gltf_url:
|
|
4418
|
-
model_glb_url:
|
|
4419
|
-
model_step_url:
|
|
4420
|
-
model_wrl_url:
|
|
4430
|
+
footprinter_string: z197.string().optional(),
|
|
4431
|
+
model_obj_url: z197.string().optional(),
|
|
4432
|
+
model_stl_url: z197.string().optional(),
|
|
4433
|
+
model_3mf_url: z197.string().optional(),
|
|
4434
|
+
model_gltf_url: z197.string().optional(),
|
|
4435
|
+
model_glb_url: z197.string().optional(),
|
|
4436
|
+
model_step_url: z197.string().optional(),
|
|
4437
|
+
model_wrl_url: z197.string().optional(),
|
|
4421
4438
|
model_asset: asset.optional(),
|
|
4422
|
-
model_unit_to_mm_scale_factor:
|
|
4423
|
-
model_board_normal_direction:
|
|
4439
|
+
model_unit_to_mm_scale_factor: z197.number().optional(),
|
|
4440
|
+
model_board_normal_direction: z197.enum(cad_model_axis_directions).optional().describe(
|
|
4424
4441
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
4425
4442
|
),
|
|
4426
4443
|
model_origin_position: point3.optional(),
|
|
4427
|
-
model_origin_alignment:
|
|
4444
|
+
model_origin_alignment: z197.enum([
|
|
4428
4445
|
"unknown",
|
|
4429
4446
|
"center",
|
|
4430
4447
|
"center_of_component_on_board_surface",
|
|
4431
4448
|
"bottom_center_of_component"
|
|
4432
4449
|
]).optional(),
|
|
4433
|
-
model_object_fit:
|
|
4434
|
-
model_jscad:
|
|
4435
|
-
show_as_translucent_model:
|
|
4436
|
-
show_as_bounding_box:
|
|
4437
|
-
show_hidden_edges:
|
|
4438
|
-
anchor_alignment:
|
|
4450
|
+
model_object_fit: z197.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
4451
|
+
model_jscad: z197.any().optional(),
|
|
4452
|
+
show_as_translucent_model: z197.boolean().optional(),
|
|
4453
|
+
show_as_bounding_box: z197.boolean().optional(),
|
|
4454
|
+
show_hidden_edges: z197.boolean().optional(),
|
|
4455
|
+
anchor_alignment: z197.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
4439
4456
|
}).describe("Defines CAD geometry, optionally associated with a PCB component");
|
|
4440
4457
|
expectTypesMatch(true);
|
|
4441
4458
|
|
|
4442
4459
|
// src/cad/cad_collision_error.ts
|
|
4443
|
-
import { z as
|
|
4460
|
+
import { z as z198 } from "zod";
|
|
4444
4461
|
var cad_collision_error = base_circuit_json_error.extend({
|
|
4445
|
-
type:
|
|
4462
|
+
type: z198.literal("cad_collision_error"),
|
|
4446
4463
|
cad_collision_error_id: getZodPrefixedIdWithDefault("cad_collision_error"),
|
|
4447
|
-
error_type:
|
|
4448
|
-
cad_component_ids:
|
|
4449
|
-
pcb_component_ids:
|
|
4450
|
-
source_component_ids:
|
|
4451
|
-
intersection_area_mm2:
|
|
4452
|
-
threshold_area_mm2:
|
|
4464
|
+
error_type: z198.literal("cad_collision_error").default("cad_collision_error"),
|
|
4465
|
+
cad_component_ids: z198.array(z198.string()).min(1),
|
|
4466
|
+
pcb_component_ids: z198.array(z198.string()).optional(),
|
|
4467
|
+
source_component_ids: z198.array(z198.string()).min(1),
|
|
4468
|
+
intersection_area_mm2: z198.number().finite().nonnegative(),
|
|
4469
|
+
threshold_area_mm2: z198.number().finite().nonnegative()
|
|
4453
4470
|
}).describe(
|
|
4454
4471
|
"An aperture-bearing part intersects the finished enclosure. The intersection_area_mm2 is the union silhouette area of the solid intersection projected along the aperture face normal, in the right-handed Circuit JSON world frame (+X right, +Y top, +Z above). It is an area in square millimetres, not intersection volume or surface area. This indicates possible aperture misplacement, insufficient size/depth, or body clearance problems; it does not prove which cause applies."
|
|
4455
4472
|
);
|
|
4456
4473
|
expectTypesMatch(true);
|
|
4457
4474
|
|
|
4458
4475
|
// src/cad/cad_cable.ts
|
|
4459
|
-
import { z as
|
|
4476
|
+
import { z as z199 } from "zod";
|
|
4460
4477
|
var connectorPin1Position = point3.refine(
|
|
4461
4478
|
(point2) => [point2.x, point2.y, point2.z].every(Number.isFinite),
|
|
4462
4479
|
"Connector pin 1 positions must be finite"
|
|
4463
4480
|
).describe(
|
|
4464
4481
|
"Resolved pin 1 position at the connector mating face, in right-handed circuit world, millimeters: +X right, +Y top, +Z above. An absolute point, not a direction. Computed by the circuit producer from endpoint geometry. Together with the endpoint path tangent, fixes connector roll and identifies its pin 1 side; renderers must not infer it from footprints."
|
|
4465
4482
|
);
|
|
4466
|
-
var cad_cable =
|
|
4467
|
-
type:
|
|
4468
|
-
cad_cable_id:
|
|
4469
|
-
name:
|
|
4470
|
-
from_source_component_id:
|
|
4471
|
-
to_source_component_id:
|
|
4483
|
+
var cad_cable = z199.object({
|
|
4484
|
+
type: z199.literal("cad_cable"),
|
|
4485
|
+
cad_cable_id: z199.string(),
|
|
4486
|
+
name: z199.string().min(1),
|
|
4487
|
+
from_source_component_id: z199.string(),
|
|
4488
|
+
to_source_component_id: z199.string(),
|
|
4472
4489
|
from_connector_pin1_position: connectorPin1Position.optional(),
|
|
4473
4490
|
to_connector_pin1_position: connectorPin1Position.optional(),
|
|
4474
|
-
cableprinter_string:
|
|
4491
|
+
cableprinter_string: z199.string().min(1).describe(
|
|
4475
4492
|
'Physical cable definition, e.g. "usb_c" or "jst_ph_pins6". Independent of the route.'
|
|
4476
4493
|
),
|
|
4477
|
-
path:
|
|
4494
|
+
path: z199.array(point3).min(2).refine(
|
|
4478
4495
|
(path) => path.every(
|
|
4479
4496
|
(point2, i) => [point2.x, point2.y, point2.z].every(Number.isFinite) && (i === 0 || Math.hypot(
|
|
4480
4497
|
point2.x - path[i - 1].x,
|
|
@@ -4492,9 +4509,9 @@ var cad_cable = z198.object({
|
|
|
4492
4509
|
expectTypesMatch(true);
|
|
4493
4510
|
|
|
4494
4511
|
// src/simulation/simulation_voltage_source.ts
|
|
4495
|
-
import { z as
|
|
4496
|
-
var wave_shape =
|
|
4497
|
-
var percentage =
|
|
4512
|
+
import { z as z200 } from "zod";
|
|
4513
|
+
var wave_shape = z200.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
4514
|
+
var percentage = z200.union([z200.string(), z200.number()]).transform((val) => {
|
|
4498
4515
|
if (typeof val === "string") {
|
|
4499
4516
|
if (val.endsWith("%")) {
|
|
4500
4517
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -4503,32 +4520,32 @@ var percentage = z199.union([z199.string(), z199.number()]).transform((val) => {
|
|
|
4503
4520
|
}
|
|
4504
4521
|
return val;
|
|
4505
4522
|
}).pipe(
|
|
4506
|
-
|
|
4523
|
+
z200.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
4507
4524
|
);
|
|
4508
|
-
var simulation_dc_voltage_source =
|
|
4509
|
-
type:
|
|
4525
|
+
var simulation_dc_voltage_source = z200.object({
|
|
4526
|
+
type: z200.literal("simulation_voltage_source"),
|
|
4510
4527
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
4511
4528
|
"simulation_voltage_source"
|
|
4512
4529
|
),
|
|
4513
|
-
is_dc_source:
|
|
4514
|
-
positive_source_port_id:
|
|
4515
|
-
negative_source_port_id:
|
|
4516
|
-
positive_source_net_id:
|
|
4517
|
-
negative_source_net_id:
|
|
4530
|
+
is_dc_source: z200.literal(true).optional().default(true),
|
|
4531
|
+
positive_source_port_id: z200.string().optional(),
|
|
4532
|
+
negative_source_port_id: z200.string().optional(),
|
|
4533
|
+
positive_source_net_id: z200.string().optional(),
|
|
4534
|
+
negative_source_net_id: z200.string().optional(),
|
|
4518
4535
|
voltage,
|
|
4519
4536
|
ac_magnitude: voltage.optional(),
|
|
4520
4537
|
ac_phase: rotation.optional()
|
|
4521
4538
|
}).describe("Defines a DC voltage source for simulation");
|
|
4522
|
-
var simulation_ac_voltage_source =
|
|
4523
|
-
type:
|
|
4539
|
+
var simulation_ac_voltage_source = z200.object({
|
|
4540
|
+
type: z200.literal("simulation_voltage_source"),
|
|
4524
4541
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
4525
4542
|
"simulation_voltage_source"
|
|
4526
4543
|
),
|
|
4527
|
-
is_dc_source:
|
|
4528
|
-
terminal1_source_port_id:
|
|
4529
|
-
terminal2_source_port_id:
|
|
4530
|
-
terminal1_source_net_id:
|
|
4531
|
-
terminal2_source_net_id:
|
|
4544
|
+
is_dc_source: z200.literal(false),
|
|
4545
|
+
terminal1_source_port_id: z200.string().optional(),
|
|
4546
|
+
terminal2_source_port_id: z200.string().optional(),
|
|
4547
|
+
terminal1_source_net_id: z200.string().optional(),
|
|
4548
|
+
terminal2_source_net_id: z200.string().optional(),
|
|
4532
4549
|
voltage: voltage.optional(),
|
|
4533
4550
|
frequency: frequency.optional(),
|
|
4534
4551
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -4543,14 +4560,14 @@ var simulation_ac_voltage_source = z199.object({
|
|
|
4543
4560
|
ac_magnitude: voltage.optional(),
|
|
4544
4561
|
ac_phase: rotation.optional()
|
|
4545
4562
|
}).describe("Defines an AC voltage source for simulation");
|
|
4546
|
-
var simulation_voltage_source =
|
|
4563
|
+
var simulation_voltage_source = z200.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
4547
4564
|
expectTypesMatch(true);
|
|
4548
4565
|
expectTypesMatch(true);
|
|
4549
4566
|
expectTypesMatch(true);
|
|
4550
4567
|
|
|
4551
4568
|
// src/simulation/simulation_current_source.ts
|
|
4552
|
-
import { z as
|
|
4553
|
-
var percentage2 =
|
|
4569
|
+
import { z as z201 } from "zod";
|
|
4570
|
+
var percentage2 = z201.union([z201.string(), z201.number()]).transform((val) => {
|
|
4554
4571
|
if (typeof val === "string") {
|
|
4555
4572
|
if (val.endsWith("%")) {
|
|
4556
4573
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -4559,32 +4576,32 @@ var percentage2 = z200.union([z200.string(), z200.number()]).transform((val) =>
|
|
|
4559
4576
|
}
|
|
4560
4577
|
return val;
|
|
4561
4578
|
}).pipe(
|
|
4562
|
-
|
|
4579
|
+
z201.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
4563
4580
|
);
|
|
4564
|
-
var simulation_dc_current_source =
|
|
4565
|
-
type:
|
|
4581
|
+
var simulation_dc_current_source = z201.object({
|
|
4582
|
+
type: z201.literal("simulation_current_source"),
|
|
4566
4583
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
4567
4584
|
"simulation_current_source"
|
|
4568
4585
|
),
|
|
4569
|
-
is_dc_source:
|
|
4570
|
-
positive_source_port_id:
|
|
4571
|
-
negative_source_port_id:
|
|
4572
|
-
positive_source_net_id:
|
|
4573
|
-
negative_source_net_id:
|
|
4586
|
+
is_dc_source: z201.literal(true).optional().default(true),
|
|
4587
|
+
positive_source_port_id: z201.string().optional(),
|
|
4588
|
+
negative_source_port_id: z201.string().optional(),
|
|
4589
|
+
positive_source_net_id: z201.string().optional(),
|
|
4590
|
+
negative_source_net_id: z201.string().optional(),
|
|
4574
4591
|
current,
|
|
4575
4592
|
ac_magnitude: current.optional(),
|
|
4576
4593
|
ac_phase: rotation.optional()
|
|
4577
4594
|
}).describe("Defines a DC current source for simulation");
|
|
4578
|
-
var simulation_ac_current_source =
|
|
4579
|
-
type:
|
|
4595
|
+
var simulation_ac_current_source = z201.object({
|
|
4596
|
+
type: z201.literal("simulation_current_source"),
|
|
4580
4597
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
4581
4598
|
"simulation_current_source"
|
|
4582
4599
|
),
|
|
4583
|
-
is_dc_source:
|
|
4584
|
-
terminal1_source_port_id:
|
|
4585
|
-
terminal2_source_port_id:
|
|
4586
|
-
terminal1_source_net_id:
|
|
4587
|
-
terminal2_source_net_id:
|
|
4600
|
+
is_dc_source: z201.literal(false),
|
|
4601
|
+
terminal1_source_port_id: z201.string().optional(),
|
|
4602
|
+
terminal2_source_port_id: z201.string().optional(),
|
|
4603
|
+
terminal1_source_net_id: z201.string().optional(),
|
|
4604
|
+
terminal2_source_net_id: z201.string().optional(),
|
|
4588
4605
|
current: current.optional(),
|
|
4589
4606
|
frequency: frequency.optional(),
|
|
4590
4607
|
peak_to_peak_current: current.optional(),
|
|
@@ -4594,58 +4611,58 @@ var simulation_ac_current_source = z200.object({
|
|
|
4594
4611
|
ac_magnitude: current.optional(),
|
|
4595
4612
|
ac_phase: rotation.optional()
|
|
4596
4613
|
}).describe("Defines an AC current source for simulation");
|
|
4597
|
-
var simulation_current_source =
|
|
4614
|
+
var simulation_current_source = z201.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
4598
4615
|
expectTypesMatch(true);
|
|
4599
4616
|
expectTypesMatch(true);
|
|
4600
4617
|
expectTypesMatch(true);
|
|
4601
4618
|
|
|
4602
4619
|
// src/simulation/simulation_experiment.ts
|
|
4603
|
-
import { z as
|
|
4620
|
+
import { z as z203 } from "zod";
|
|
4604
4621
|
|
|
4605
4622
|
// src/simulation/simulation_units.ts
|
|
4606
|
-
import { z as
|
|
4607
|
-
var simulation_dc_sweep_unit =
|
|
4623
|
+
import { z as z202 } from "zod";
|
|
4624
|
+
var simulation_dc_sweep_unit = z202.custom(
|
|
4608
4625
|
(dcSweepUnit) => dcSweepUnit === "V" || dcSweepUnit === "A"
|
|
4609
4626
|
);
|
|
4610
|
-
var simulation_parameter_unit =
|
|
4627
|
+
var simulation_parameter_unit = z202.custom(
|
|
4611
4628
|
(parameterUnit) => parameterUnit === "\u03A9" || parameterUnit === "F" || parameterUnit === "H" || parameterUnit === "V" || parameterUnit === "A"
|
|
4612
4629
|
);
|
|
4613
4630
|
|
|
4614
4631
|
// src/simulation/simulation_experiment.ts
|
|
4615
|
-
var experiment_type =
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4632
|
+
var experiment_type = z203.union([
|
|
4633
|
+
z203.literal("spice_dc_sweep"),
|
|
4634
|
+
z203.literal("spice_dc_operating_point"),
|
|
4635
|
+
z203.literal("spice_transient_analysis"),
|
|
4636
|
+
z203.literal("spice_ac_analysis")
|
|
4620
4637
|
]);
|
|
4621
|
-
var spice_simulation_options =
|
|
4622
|
-
method:
|
|
4623
|
-
reltol:
|
|
4624
|
-
abstol:
|
|
4625
|
-
vntol:
|
|
4638
|
+
var spice_simulation_options = z203.object({
|
|
4639
|
+
method: z203.enum(["trap", "gear"]).optional(),
|
|
4640
|
+
reltol: z203.union([z203.number(), z203.string()]).optional(),
|
|
4641
|
+
abstol: z203.union([z203.number(), z203.string()]).optional(),
|
|
4642
|
+
vntol: z203.union([z203.number(), z203.string()]).optional()
|
|
4626
4643
|
}).describe("SPICE solver options for a simulation experiment");
|
|
4627
|
-
var simulation_experiment =
|
|
4628
|
-
type:
|
|
4644
|
+
var simulation_experiment = z203.object({
|
|
4645
|
+
type: z203.literal("simulation_experiment"),
|
|
4629
4646
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
4630
4647
|
"simulation_experiment"
|
|
4631
4648
|
),
|
|
4632
|
-
name:
|
|
4649
|
+
name: z203.string(),
|
|
4633
4650
|
experiment_type,
|
|
4634
4651
|
time_per_step: duration_ms.optional(),
|
|
4635
4652
|
start_time_ms: ms.optional(),
|
|
4636
4653
|
end_time_ms: ms.optional(),
|
|
4637
4654
|
spice_options: spice_simulation_options.optional(),
|
|
4638
|
-
dc_sweep_voltage_source_id:
|
|
4639
|
-
dc_sweep_current_source_id:
|
|
4640
|
-
dc_sweep_start:
|
|
4641
|
-
dc_sweep_stop:
|
|
4642
|
-
dc_sweep_step:
|
|
4655
|
+
dc_sweep_voltage_source_id: z203.string().optional(),
|
|
4656
|
+
dc_sweep_current_source_id: z203.string().optional(),
|
|
4657
|
+
dc_sweep_start: z203.number().optional(),
|
|
4658
|
+
dc_sweep_stop: z203.number().optional(),
|
|
4659
|
+
dc_sweep_step: z203.number().refine((dcSweepStep) => dcSweepStep !== 0).optional(),
|
|
4643
4660
|
dc_sweep_unit: simulation_dc_sweep_unit.optional(),
|
|
4644
|
-
ac_sweep_type:
|
|
4645
|
-
ac_samples_per_interval:
|
|
4646
|
-
ac_sample_count:
|
|
4647
|
-
ac_start_frequency_hz:
|
|
4648
|
-
ac_stop_frequency_hz:
|
|
4661
|
+
ac_sweep_type: z203.enum(["linear", "decade", "octave"]).optional(),
|
|
4662
|
+
ac_samples_per_interval: z203.number().int().positive().optional(),
|
|
4663
|
+
ac_sample_count: z203.number().int().positive().optional(),
|
|
4664
|
+
ac_start_frequency_hz: z203.number().positive().optional(),
|
|
4665
|
+
ac_stop_frequency_hz: z203.number().positive().optional()
|
|
4649
4666
|
}).superRefine((experiment, context) => {
|
|
4650
4667
|
if (experiment.experiment_type === "spice_dc_sweep") {
|
|
4651
4668
|
const requiredFields = [
|
|
@@ -4657,7 +4674,7 @@ var simulation_experiment = z202.object({
|
|
|
4657
4674
|
for (const field of requiredFields) {
|
|
4658
4675
|
if (experiment[field] === void 0) {
|
|
4659
4676
|
context.addIssue({
|
|
4660
|
-
code:
|
|
4677
|
+
code: z203.ZodIssueCode.custom,
|
|
4661
4678
|
path: [field],
|
|
4662
4679
|
message: `${field} is required for a DC sweep`
|
|
4663
4680
|
});
|
|
@@ -4667,7 +4684,7 @@ var simulation_experiment = z202.object({
|
|
|
4667
4684
|
const hasCurrentSource = experiment.dc_sweep_current_source_id !== void 0;
|
|
4668
4685
|
if (hasVoltageSource === hasCurrentSource) {
|
|
4669
4686
|
context.addIssue({
|
|
4670
|
-
code:
|
|
4687
|
+
code: z203.ZodIssueCode.custom,
|
|
4671
4688
|
path: ["dc_sweep_voltage_source_id"],
|
|
4672
4689
|
message: "Exactly one DC sweep voltage or current source ID is required"
|
|
4673
4690
|
});
|
|
@@ -4676,35 +4693,35 @@ var simulation_experiment = z202.object({
|
|
|
4676
4693
|
if (experiment.experiment_type === "spice_ac_analysis") {
|
|
4677
4694
|
if (experiment.ac_sweep_type === void 0) {
|
|
4678
4695
|
context.addIssue({
|
|
4679
|
-
code:
|
|
4696
|
+
code: z203.ZodIssueCode.custom,
|
|
4680
4697
|
path: ["ac_sweep_type"],
|
|
4681
4698
|
message: "ac_sweep_type is required for an AC analysis"
|
|
4682
4699
|
});
|
|
4683
4700
|
}
|
|
4684
4701
|
if (experiment.ac_start_frequency_hz === void 0) {
|
|
4685
4702
|
context.addIssue({
|
|
4686
|
-
code:
|
|
4703
|
+
code: z203.ZodIssueCode.custom,
|
|
4687
4704
|
path: ["ac_start_frequency_hz"],
|
|
4688
4705
|
message: "ac_start_frequency_hz is required for an AC analysis"
|
|
4689
4706
|
});
|
|
4690
4707
|
}
|
|
4691
4708
|
if (experiment.ac_stop_frequency_hz === void 0) {
|
|
4692
4709
|
context.addIssue({
|
|
4693
|
-
code:
|
|
4710
|
+
code: z203.ZodIssueCode.custom,
|
|
4694
4711
|
path: ["ac_stop_frequency_hz"],
|
|
4695
4712
|
message: "ac_stop_frequency_hz is required for an AC analysis"
|
|
4696
4713
|
});
|
|
4697
4714
|
}
|
|
4698
4715
|
if (experiment.ac_sweep_type === "linear" && experiment.ac_sample_count === void 0) {
|
|
4699
4716
|
context.addIssue({
|
|
4700
|
-
code:
|
|
4717
|
+
code: z203.ZodIssueCode.custom,
|
|
4701
4718
|
path: ["ac_sample_count"],
|
|
4702
4719
|
message: "ac_sample_count is required for a linear AC analysis"
|
|
4703
4720
|
});
|
|
4704
4721
|
}
|
|
4705
4722
|
if ((experiment.ac_sweep_type === "decade" || experiment.ac_sweep_type === "octave") && experiment.ac_samples_per_interval === void 0) {
|
|
4706
4723
|
context.addIssue({
|
|
4707
|
-
code:
|
|
4724
|
+
code: z203.ZodIssueCode.custom,
|
|
4708
4725
|
path: ["ac_samples_per_interval"],
|
|
4709
4726
|
message: "ac_samples_per_interval is required for decade and octave AC analyses"
|
|
4710
4727
|
});
|
|
@@ -4714,87 +4731,87 @@ var simulation_experiment = z202.object({
|
|
|
4714
4731
|
expectTypesMatch(true);
|
|
4715
4732
|
|
|
4716
4733
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
4717
|
-
import { z as
|
|
4734
|
+
import { z as z205 } from "zod";
|
|
4718
4735
|
|
|
4719
4736
|
// src/simulation/simulation_parameter_sweep_coordinate.ts
|
|
4720
|
-
import { z as
|
|
4721
|
-
var simulation_parameter_sweep_coordinate =
|
|
4722
|
-
simulation_parameter_sweep_id:
|
|
4723
|
-
sweep_index:
|
|
4724
|
-
parameter_value:
|
|
4737
|
+
import { z as z204 } from "zod";
|
|
4738
|
+
var simulation_parameter_sweep_coordinate = z204.object({
|
|
4739
|
+
simulation_parameter_sweep_id: z204.string(),
|
|
4740
|
+
sweep_index: z204.number().int().nonnegative(),
|
|
4741
|
+
parameter_value: z204.number(),
|
|
4725
4742
|
parameter_unit: simulation_parameter_unit
|
|
4726
4743
|
});
|
|
4727
4744
|
expectTypesMatch(true);
|
|
4728
4745
|
|
|
4729
4746
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
4730
|
-
var simulation_transient_voltage_graph =
|
|
4731
|
-
type:
|
|
4747
|
+
var simulation_transient_voltage_graph = z205.object({
|
|
4748
|
+
type: z205.literal("simulation_transient_voltage_graph"),
|
|
4732
4749
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4733
4750
|
"simulation_transient_voltage_graph"
|
|
4734
4751
|
),
|
|
4735
|
-
simulation_experiment_id:
|
|
4752
|
+
simulation_experiment_id: z205.string(),
|
|
4736
4753
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4737
|
-
timestamps_ms:
|
|
4738
|
-
voltage_levels:
|
|
4739
|
-
source_component_id:
|
|
4740
|
-
subcircuit_connectivity_map_key:
|
|
4754
|
+
timestamps_ms: z205.array(z205.number()).optional(),
|
|
4755
|
+
voltage_levels: z205.array(z205.number()),
|
|
4756
|
+
source_component_id: z205.string().optional(),
|
|
4757
|
+
subcircuit_connectivity_map_key: z205.string().optional(),
|
|
4741
4758
|
time_per_step: duration_ms,
|
|
4742
4759
|
start_time_ms: ms,
|
|
4743
4760
|
end_time_ms: ms,
|
|
4744
|
-
name:
|
|
4745
|
-
color:
|
|
4761
|
+
name: z205.string().optional(),
|
|
4762
|
+
color: z205.string().optional()
|
|
4746
4763
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
4747
4764
|
expectTypesMatch(true);
|
|
4748
4765
|
|
|
4749
4766
|
// src/simulation/simulation_transient_current_graph.ts
|
|
4750
|
-
import { z as
|
|
4751
|
-
var simulation_transient_current_graph =
|
|
4752
|
-
type:
|
|
4767
|
+
import { z as z206 } from "zod";
|
|
4768
|
+
var simulation_transient_current_graph = z206.object({
|
|
4769
|
+
type: z206.literal("simulation_transient_current_graph"),
|
|
4753
4770
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4754
4771
|
"simulation_transient_current_graph"
|
|
4755
4772
|
),
|
|
4756
|
-
simulation_experiment_id:
|
|
4773
|
+
simulation_experiment_id: z206.string(),
|
|
4757
4774
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4758
|
-
timestamps_ms:
|
|
4759
|
-
current_levels:
|
|
4760
|
-
source_component_id:
|
|
4761
|
-
subcircuit_connectivity_map_key:
|
|
4775
|
+
timestamps_ms: z206.array(z206.number()).optional(),
|
|
4776
|
+
current_levels: z206.array(z206.number()),
|
|
4777
|
+
source_component_id: z206.string().optional(),
|
|
4778
|
+
subcircuit_connectivity_map_key: z206.string().optional(),
|
|
4762
4779
|
time_per_step: duration_ms,
|
|
4763
4780
|
start_time_ms: ms,
|
|
4764
4781
|
end_time_ms: ms,
|
|
4765
|
-
name:
|
|
4766
|
-
color:
|
|
4782
|
+
name: z206.string().optional(),
|
|
4783
|
+
color: z206.string().optional()
|
|
4767
4784
|
}).describe("Stores current measurements over time for a simulation");
|
|
4768
4785
|
expectTypesMatch(true);
|
|
4769
4786
|
|
|
4770
4787
|
// src/simulation/simulation_switch.ts
|
|
4771
|
-
import { z as
|
|
4772
|
-
var simulation_switch =
|
|
4773
|
-
type:
|
|
4788
|
+
import { z as z207 } from "zod";
|
|
4789
|
+
var simulation_switch = z207.object({
|
|
4790
|
+
type: z207.literal("simulation_switch"),
|
|
4774
4791
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
4775
|
-
source_component_id:
|
|
4792
|
+
source_component_id: z207.string().optional(),
|
|
4776
4793
|
closes_at: ms.optional(),
|
|
4777
4794
|
opens_at: ms.optional(),
|
|
4778
|
-
starts_closed:
|
|
4795
|
+
starts_closed: z207.boolean().optional(),
|
|
4779
4796
|
switching_frequency: frequency.optional()
|
|
4780
4797
|
}).describe("Defines a switch for simulation timing control");
|
|
4781
4798
|
expectTypesMatch(true);
|
|
4782
4799
|
|
|
4783
4800
|
// src/simulation/simulation_voltage_probe.ts
|
|
4784
|
-
import { z as
|
|
4785
|
-
var simulation_voltage_probe =
|
|
4786
|
-
type:
|
|
4801
|
+
import { z as z208 } from "zod";
|
|
4802
|
+
var simulation_voltage_probe = z208.object({
|
|
4803
|
+
type: z208.literal("simulation_voltage_probe"),
|
|
4787
4804
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
4788
4805
|
"simulation_voltage_probe"
|
|
4789
4806
|
),
|
|
4790
|
-
source_component_id:
|
|
4791
|
-
name:
|
|
4792
|
-
signal_input_source_port_id:
|
|
4793
|
-
signal_input_source_net_id:
|
|
4794
|
-
reference_input_source_port_id:
|
|
4795
|
-
reference_input_source_net_id:
|
|
4796
|
-
subcircuit_id:
|
|
4797
|
-
color:
|
|
4807
|
+
source_component_id: z208.string().optional(),
|
|
4808
|
+
name: z208.string().optional(),
|
|
4809
|
+
signal_input_source_port_id: z208.string().optional(),
|
|
4810
|
+
signal_input_source_net_id: z208.string().optional(),
|
|
4811
|
+
reference_input_source_port_id: z208.string().optional(),
|
|
4812
|
+
reference_input_source_net_id: z208.string().optional(),
|
|
4813
|
+
subcircuit_id: z208.string().optional(),
|
|
4814
|
+
color: z208.string().optional()
|
|
4798
4815
|
}).describe(
|
|
4799
4816
|
"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."
|
|
4800
4817
|
).superRefine((data, ctx) => {
|
|
@@ -4804,20 +4821,20 @@ var simulation_voltage_probe = z207.object({
|
|
|
4804
4821
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
4805
4822
|
if (has_ports && has_nets) {
|
|
4806
4823
|
ctx.addIssue({
|
|
4807
|
-
code:
|
|
4824
|
+
code: z208.ZodIssueCode.custom,
|
|
4808
4825
|
message: "Cannot mix port and net connections in a differential probe."
|
|
4809
4826
|
});
|
|
4810
4827
|
} else if (has_ports) {
|
|
4811
4828
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
4812
4829
|
ctx.addIssue({
|
|
4813
|
-
code:
|
|
4830
|
+
code: z208.ZodIssueCode.custom,
|
|
4814
4831
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
4815
4832
|
});
|
|
4816
4833
|
}
|
|
4817
4834
|
} else if (has_nets) {
|
|
4818
4835
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
4819
4836
|
ctx.addIssue({
|
|
4820
|
-
code:
|
|
4837
|
+
code: z208.ZodIssueCode.custom,
|
|
4821
4838
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
4822
4839
|
});
|
|
4823
4840
|
}
|
|
@@ -4825,7 +4842,7 @@ var simulation_voltage_probe = z207.object({
|
|
|
4825
4842
|
} else {
|
|
4826
4843
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
4827
4844
|
ctx.addIssue({
|
|
4828
|
-
code:
|
|
4845
|
+
code: z208.ZodIssueCode.custom,
|
|
4829
4846
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
4830
4847
|
});
|
|
4831
4848
|
}
|
|
@@ -4834,20 +4851,20 @@ var simulation_voltage_probe = z207.object({
|
|
|
4834
4851
|
expectTypesMatch(true);
|
|
4835
4852
|
|
|
4836
4853
|
// src/simulation/simulation_current_probe.ts
|
|
4837
|
-
import { z as
|
|
4838
|
-
var simulation_current_probe =
|
|
4839
|
-
type:
|
|
4854
|
+
import { z as z209 } from "zod";
|
|
4855
|
+
var simulation_current_probe = z209.object({
|
|
4856
|
+
type: z209.literal("simulation_current_probe"),
|
|
4840
4857
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
4841
4858
|
"simulation_current_probe"
|
|
4842
4859
|
),
|
|
4843
|
-
source_component_id:
|
|
4844
|
-
name:
|
|
4845
|
-
positive_source_port_id:
|
|
4846
|
-
negative_source_port_id:
|
|
4847
|
-
positive_source_net_id:
|
|
4848
|
-
negative_source_net_id:
|
|
4849
|
-
subcircuit_id:
|
|
4850
|
-
color:
|
|
4860
|
+
source_component_id: z209.string().optional(),
|
|
4861
|
+
name: z209.string().optional(),
|
|
4862
|
+
positive_source_port_id: z209.string().optional(),
|
|
4863
|
+
negative_source_port_id: z209.string().optional(),
|
|
4864
|
+
positive_source_net_id: z209.string().optional(),
|
|
4865
|
+
negative_source_net_id: z209.string().optional(),
|
|
4866
|
+
subcircuit_id: z209.string().optional(),
|
|
4867
|
+
color: z209.string().optional()
|
|
4851
4868
|
}).describe(
|
|
4852
4869
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
4853
4870
|
).superRefine((data, ctx) => {
|
|
@@ -4859,7 +4876,7 @@ var simulation_current_probe = z208.object({
|
|
|
4859
4876
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
4860
4877
|
if (hasPorts && hasNets) {
|
|
4861
4878
|
ctx.addIssue({
|
|
4862
|
-
code:
|
|
4879
|
+
code: z209.ZodIssueCode.custom,
|
|
4863
4880
|
message: "Cannot mix port and net connections in a current probe."
|
|
4864
4881
|
});
|
|
4865
4882
|
return;
|
|
@@ -4867,7 +4884,7 @@ var simulation_current_probe = z208.object({
|
|
|
4867
4884
|
if (hasPorts) {
|
|
4868
4885
|
if (!hasPositivePort || !hasNegativePort) {
|
|
4869
4886
|
ctx.addIssue({
|
|
4870
|
-
code:
|
|
4887
|
+
code: z209.ZodIssueCode.custom,
|
|
4871
4888
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
4872
4889
|
});
|
|
4873
4890
|
}
|
|
@@ -4876,71 +4893,71 @@ var simulation_current_probe = z208.object({
|
|
|
4876
4893
|
if (hasNets) {
|
|
4877
4894
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
4878
4895
|
ctx.addIssue({
|
|
4879
|
-
code:
|
|
4896
|
+
code: z209.ZodIssueCode.custom,
|
|
4880
4897
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
4881
4898
|
});
|
|
4882
4899
|
}
|
|
4883
4900
|
return;
|
|
4884
4901
|
}
|
|
4885
4902
|
ctx.addIssue({
|
|
4886
|
-
code:
|
|
4903
|
+
code: z209.ZodIssueCode.custom,
|
|
4887
4904
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
4888
4905
|
});
|
|
4889
4906
|
});
|
|
4890
4907
|
expectTypesMatch(true);
|
|
4891
4908
|
|
|
4892
4909
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
4893
|
-
import { z as
|
|
4910
|
+
import { z as z210 } from "zod";
|
|
4894
4911
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
4895
|
-
type:
|
|
4912
|
+
type: z210.literal("simulation_unknown_experiment_error"),
|
|
4896
4913
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
4897
4914
|
"simulation_unknown_experiment_error"
|
|
4898
4915
|
),
|
|
4899
|
-
error_type:
|
|
4900
|
-
simulation_experiment_id:
|
|
4901
|
-
subcircuit_id:
|
|
4916
|
+
error_type: z210.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
4917
|
+
simulation_experiment_id: z210.string().optional(),
|
|
4918
|
+
subcircuit_id: z210.string().optional()
|
|
4902
4919
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
4903
4920
|
expectTypesMatch(true);
|
|
4904
4921
|
|
|
4905
4922
|
// src/simulation/simulation_parameter_sweep.ts
|
|
4906
|
-
import { z as
|
|
4907
|
-
var simulation_parameter_type =
|
|
4923
|
+
import { z as z211 } from "zod";
|
|
4924
|
+
var simulation_parameter_type = z211.enum([
|
|
4908
4925
|
"resistance",
|
|
4909
4926
|
"capacitance",
|
|
4910
4927
|
"inductance",
|
|
4911
4928
|
"voltage",
|
|
4912
4929
|
"current"
|
|
4913
4930
|
]);
|
|
4914
|
-
var simulation_parameter_sweep_base =
|
|
4915
|
-
type:
|
|
4931
|
+
var simulation_parameter_sweep_base = z211.object({
|
|
4932
|
+
type: z211.literal("simulation_parameter_sweep"),
|
|
4916
4933
|
simulation_parameter_sweep_id: getZodPrefixedIdWithDefault(
|
|
4917
4934
|
"simulation_parameter_sweep"
|
|
4918
4935
|
),
|
|
4919
|
-
simulation_experiment_id:
|
|
4920
|
-
name:
|
|
4921
|
-
parameter_values:
|
|
4936
|
+
simulation_experiment_id: z211.string(),
|
|
4937
|
+
name: z211.string().optional(),
|
|
4938
|
+
parameter_values: z211.array(z211.number()).min(1),
|
|
4922
4939
|
parameter_unit: simulation_parameter_unit
|
|
4923
4940
|
});
|
|
4924
|
-
var simulation_parameter_sweep =
|
|
4941
|
+
var simulation_parameter_sweep = z211.discriminatedUnion("parameter_type", [
|
|
4925
4942
|
simulation_parameter_sweep_base.extend({
|
|
4926
|
-
parameter_type:
|
|
4927
|
-
resistor_source_component_id:
|
|
4943
|
+
parameter_type: z211.literal("resistance"),
|
|
4944
|
+
resistor_source_component_id: z211.string()
|
|
4928
4945
|
}),
|
|
4929
4946
|
simulation_parameter_sweep_base.extend({
|
|
4930
|
-
parameter_type:
|
|
4931
|
-
capacitor_source_component_id:
|
|
4947
|
+
parameter_type: z211.literal("capacitance"),
|
|
4948
|
+
capacitor_source_component_id: z211.string()
|
|
4932
4949
|
}),
|
|
4933
4950
|
simulation_parameter_sweep_base.extend({
|
|
4934
|
-
parameter_type:
|
|
4935
|
-
inductor_source_component_id:
|
|
4951
|
+
parameter_type: z211.literal("inductance"),
|
|
4952
|
+
inductor_source_component_id: z211.string()
|
|
4936
4953
|
}),
|
|
4937
4954
|
simulation_parameter_sweep_base.extend({
|
|
4938
|
-
parameter_type:
|
|
4939
|
-
source_net_id:
|
|
4955
|
+
parameter_type: z211.literal("voltage"),
|
|
4956
|
+
source_net_id: z211.string()
|
|
4940
4957
|
}),
|
|
4941
4958
|
simulation_parameter_sweep_base.extend({
|
|
4942
|
-
parameter_type:
|
|
4943
|
-
current_source_component_id:
|
|
4959
|
+
parameter_type: z211.literal("current"),
|
|
4960
|
+
current_source_component_id: z211.string()
|
|
4944
4961
|
})
|
|
4945
4962
|
]).describe("Repeats a simulation experiment over component parameter values");
|
|
4946
4963
|
expectTypesMatch(
|
|
@@ -4948,52 +4965,52 @@ expectTypesMatch(
|
|
|
4948
4965
|
);
|
|
4949
4966
|
|
|
4950
4967
|
// src/simulation/simulation_dc_operating_point_voltage.ts
|
|
4951
|
-
import { z as
|
|
4952
|
-
var simulation_dc_operating_point_voltage =
|
|
4953
|
-
type:
|
|
4968
|
+
import { z as z212 } from "zod";
|
|
4969
|
+
var simulation_dc_operating_point_voltage = z212.object({
|
|
4970
|
+
type: z212.literal("simulation_dc_operating_point_voltage"),
|
|
4954
4971
|
simulation_dc_operating_point_voltage_id: getZodPrefixedIdWithDefault(
|
|
4955
4972
|
"simulation_dc_operating_point_voltage"
|
|
4956
4973
|
),
|
|
4957
|
-
simulation_experiment_id:
|
|
4974
|
+
simulation_experiment_id: z212.string(),
|
|
4958
4975
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4959
|
-
simulation_voltage_probe_id:
|
|
4960
|
-
voltage:
|
|
4961
|
-
name:
|
|
4962
|
-
color:
|
|
4976
|
+
simulation_voltage_probe_id: z212.string(),
|
|
4977
|
+
voltage: z212.number(),
|
|
4978
|
+
name: z212.string().optional(),
|
|
4979
|
+
color: z212.string().optional()
|
|
4963
4980
|
});
|
|
4964
4981
|
expectTypesMatch(true);
|
|
4965
4982
|
|
|
4966
4983
|
// src/simulation/simulation_dc_operating_point_current.ts
|
|
4967
|
-
import { z as
|
|
4968
|
-
var simulation_dc_operating_point_current =
|
|
4969
|
-
type:
|
|
4984
|
+
import { z as z213 } from "zod";
|
|
4985
|
+
var simulation_dc_operating_point_current = z213.object({
|
|
4986
|
+
type: z213.literal("simulation_dc_operating_point_current"),
|
|
4970
4987
|
simulation_dc_operating_point_current_id: getZodPrefixedIdWithDefault(
|
|
4971
4988
|
"simulation_dc_operating_point_current"
|
|
4972
4989
|
),
|
|
4973
|
-
simulation_experiment_id:
|
|
4990
|
+
simulation_experiment_id: z213.string(),
|
|
4974
4991
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4975
|
-
simulation_current_probe_id:
|
|
4976
|
-
current:
|
|
4977
|
-
name:
|
|
4978
|
-
color:
|
|
4992
|
+
simulation_current_probe_id: z213.string(),
|
|
4993
|
+
current: z213.number(),
|
|
4994
|
+
name: z213.string().optional(),
|
|
4995
|
+
color: z213.string().optional()
|
|
4979
4996
|
});
|
|
4980
4997
|
expectTypesMatch(true);
|
|
4981
4998
|
|
|
4982
4999
|
// src/simulation/simulation_dc_sweep_voltage_graph.ts
|
|
4983
|
-
import { z as
|
|
4984
|
-
var simulation_dc_sweep_voltage_graph =
|
|
4985
|
-
type:
|
|
5000
|
+
import { z as z214 } from "zod";
|
|
5001
|
+
var simulation_dc_sweep_voltage_graph = z214.object({
|
|
5002
|
+
type: z214.literal("simulation_dc_sweep_voltage_graph"),
|
|
4986
5003
|
simulation_dc_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4987
5004
|
"simulation_dc_sweep_voltage_graph"
|
|
4988
5005
|
),
|
|
4989
|
-
simulation_experiment_id:
|
|
5006
|
+
simulation_experiment_id: z214.string(),
|
|
4990
5007
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4991
|
-
simulation_voltage_probe_id:
|
|
4992
|
-
sweep_values:
|
|
5008
|
+
simulation_voltage_probe_id: z214.string(),
|
|
5009
|
+
sweep_values: z214.array(z214.number()),
|
|
4993
5010
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4994
|
-
voltage_levels:
|
|
4995
|
-
name:
|
|
4996
|
-
color:
|
|
5011
|
+
voltage_levels: z214.array(z214.number()),
|
|
5012
|
+
name: z214.string().optional(),
|
|
5013
|
+
color: z214.string().optional()
|
|
4997
5014
|
}).refine(
|
|
4998
5015
|
(graph) => graph.sweep_values.length === graph.voltage_levels.length,
|
|
4999
5016
|
{
|
|
@@ -5003,20 +5020,20 @@ var simulation_dc_sweep_voltage_graph = z213.object({
|
|
|
5003
5020
|
expectTypesMatch(true);
|
|
5004
5021
|
|
|
5005
5022
|
// src/simulation/simulation_dc_sweep_current_graph.ts
|
|
5006
|
-
import { z as
|
|
5007
|
-
var simulation_dc_sweep_current_graph =
|
|
5008
|
-
type:
|
|
5023
|
+
import { z as z215 } from "zod";
|
|
5024
|
+
var simulation_dc_sweep_current_graph = z215.object({
|
|
5025
|
+
type: z215.literal("simulation_dc_sweep_current_graph"),
|
|
5009
5026
|
simulation_dc_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
5010
5027
|
"simulation_dc_sweep_current_graph"
|
|
5011
5028
|
),
|
|
5012
|
-
simulation_experiment_id:
|
|
5029
|
+
simulation_experiment_id: z215.string(),
|
|
5013
5030
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
5014
|
-
simulation_current_probe_id:
|
|
5015
|
-
sweep_values:
|
|
5031
|
+
simulation_current_probe_id: z215.string(),
|
|
5032
|
+
sweep_values: z215.array(z215.number()),
|
|
5016
5033
|
sweep_unit: simulation_dc_sweep_unit,
|
|
5017
|
-
current_levels:
|
|
5018
|
-
name:
|
|
5019
|
-
color:
|
|
5034
|
+
current_levels: z215.array(z215.number()),
|
|
5035
|
+
name: z215.string().optional(),
|
|
5036
|
+
color: z215.string().optional()
|
|
5020
5037
|
}).refine(
|
|
5021
5038
|
(graph) => graph.sweep_values.length === graph.current_levels.length,
|
|
5022
5039
|
{
|
|
@@ -5026,29 +5043,29 @@ var simulation_dc_sweep_current_graph = z214.object({
|
|
|
5026
5043
|
expectTypesMatch(true);
|
|
5027
5044
|
|
|
5028
5045
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
5029
|
-
import { z as
|
|
5046
|
+
import { z as z217 } from "zod";
|
|
5030
5047
|
|
|
5031
5048
|
// src/simulation/simulation_complex_sample.ts
|
|
5032
|
-
import { z as
|
|
5033
|
-
var simulation_complex_sample =
|
|
5034
|
-
re:
|
|
5035
|
-
im:
|
|
5049
|
+
import { z as z216 } from "zod";
|
|
5050
|
+
var simulation_complex_sample = z216.object({
|
|
5051
|
+
re: z216.number(),
|
|
5052
|
+
im: z216.number()
|
|
5036
5053
|
});
|
|
5037
5054
|
expectTypesMatch(true);
|
|
5038
5055
|
|
|
5039
5056
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
5040
|
-
var simulation_ac_sweep_voltage_graph =
|
|
5041
|
-
type:
|
|
5057
|
+
var simulation_ac_sweep_voltage_graph = z217.object({
|
|
5058
|
+
type: z217.literal("simulation_ac_sweep_voltage_graph"),
|
|
5042
5059
|
simulation_ac_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
5043
5060
|
"simulation_ac_sweep_voltage_graph"
|
|
5044
5061
|
),
|
|
5045
|
-
simulation_experiment_id:
|
|
5062
|
+
simulation_experiment_id: z217.string(),
|
|
5046
5063
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
5047
|
-
simulation_voltage_probe_id:
|
|
5048
|
-
frequencies_hz:
|
|
5049
|
-
complex_voltages:
|
|
5050
|
-
name:
|
|
5051
|
-
color:
|
|
5064
|
+
simulation_voltage_probe_id: z217.string(),
|
|
5065
|
+
frequencies_hz: z217.array(z217.number()),
|
|
5066
|
+
complex_voltages: z217.array(simulation_complex_sample),
|
|
5067
|
+
name: z217.string().optional(),
|
|
5068
|
+
color: z217.string().optional()
|
|
5052
5069
|
}).refine(
|
|
5053
5070
|
(graph) => graph.frequencies_hz.length === graph.complex_voltages.length,
|
|
5054
5071
|
{
|
|
@@ -5058,19 +5075,19 @@ var simulation_ac_sweep_voltage_graph = z216.object({
|
|
|
5058
5075
|
expectTypesMatch(true);
|
|
5059
5076
|
|
|
5060
5077
|
// src/simulation/simulation_ac_sweep_current_graph.ts
|
|
5061
|
-
import { z as
|
|
5062
|
-
var simulation_ac_sweep_current_graph =
|
|
5063
|
-
type:
|
|
5078
|
+
import { z as z218 } from "zod";
|
|
5079
|
+
var simulation_ac_sweep_current_graph = z218.object({
|
|
5080
|
+
type: z218.literal("simulation_ac_sweep_current_graph"),
|
|
5064
5081
|
simulation_ac_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
5065
5082
|
"simulation_ac_sweep_current_graph"
|
|
5066
5083
|
),
|
|
5067
|
-
simulation_experiment_id:
|
|
5084
|
+
simulation_experiment_id: z218.string(),
|
|
5068
5085
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
5069
|
-
simulation_current_probe_id:
|
|
5070
|
-
frequencies_hz:
|
|
5071
|
-
complex_currents:
|
|
5072
|
-
name:
|
|
5073
|
-
color:
|
|
5086
|
+
simulation_current_probe_id: z218.string(),
|
|
5087
|
+
frequencies_hz: z218.array(z218.number()),
|
|
5088
|
+
complex_currents: z218.array(simulation_complex_sample),
|
|
5089
|
+
name: z218.string().optional(),
|
|
5090
|
+
color: z218.string().optional()
|
|
5074
5091
|
}).refine(
|
|
5075
5092
|
(graph) => graph.frequencies_hz.length === graph.complex_currents.length,
|
|
5076
5093
|
{
|
|
@@ -5080,52 +5097,52 @@ var simulation_ac_sweep_current_graph = z217.object({
|
|
|
5080
5097
|
expectTypesMatch(true);
|
|
5081
5098
|
|
|
5082
5099
|
// src/simulation/simulation_op_amp.ts
|
|
5083
|
-
import { z as
|
|
5084
|
-
var simulation_op_amp =
|
|
5085
|
-
type:
|
|
5100
|
+
import { z as z219 } from "zod";
|
|
5101
|
+
var simulation_op_amp = z219.object({
|
|
5102
|
+
type: z219.literal("simulation_op_amp"),
|
|
5086
5103
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
5087
|
-
source_component_id:
|
|
5088
|
-
inverting_input_source_port_id:
|
|
5089
|
-
non_inverting_input_source_port_id:
|
|
5090
|
-
output_source_port_id:
|
|
5091
|
-
positive_supply_source_port_id:
|
|
5092
|
-
negative_supply_source_port_id:
|
|
5104
|
+
source_component_id: z219.string().optional(),
|
|
5105
|
+
inverting_input_source_port_id: z219.string(),
|
|
5106
|
+
non_inverting_input_source_port_id: z219.string(),
|
|
5107
|
+
output_source_port_id: z219.string(),
|
|
5108
|
+
positive_supply_source_port_id: z219.string(),
|
|
5109
|
+
negative_supply_source_port_id: z219.string()
|
|
5093
5110
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
5094
5111
|
expectTypesMatch(true);
|
|
5095
5112
|
|
|
5096
5113
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
5097
|
-
import { z as
|
|
5098
|
-
var simulation_spice_subcircuit =
|
|
5099
|
-
type:
|
|
5114
|
+
import { z as z220 } from "zod";
|
|
5115
|
+
var simulation_spice_subcircuit = z220.object({
|
|
5116
|
+
type: z220.literal("simulation_spice_subcircuit"),
|
|
5100
5117
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
5101
5118
|
"simulation_spice_subcircuit"
|
|
5102
5119
|
),
|
|
5103
|
-
source_component_id:
|
|
5104
|
-
spice_pin_to_source_port_map:
|
|
5105
|
-
subcircuit_source:
|
|
5120
|
+
source_component_id: z220.string(),
|
|
5121
|
+
spice_pin_to_source_port_map: z220.record(z220.string(), z220.string()),
|
|
5122
|
+
subcircuit_source: z220.string()
|
|
5106
5123
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
5107
5124
|
expectTypesMatch(
|
|
5108
5125
|
true
|
|
5109
5126
|
);
|
|
5110
5127
|
|
|
5111
5128
|
// src/simulation/simulation_oscilloscope_trace.ts
|
|
5112
|
-
import { z as
|
|
5129
|
+
import { z as z221 } from "zod";
|
|
5113
5130
|
var hasValue = (value) => value !== void 0;
|
|
5114
|
-
var simulation_oscilloscope_trace =
|
|
5115
|
-
type:
|
|
5131
|
+
var simulation_oscilloscope_trace = z221.object({
|
|
5132
|
+
type: z221.literal("simulation_oscilloscope_trace"),
|
|
5116
5133
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
5117
5134
|
"simulation_oscilloscope_trace"
|
|
5118
5135
|
),
|
|
5119
|
-
simulation_transient_voltage_graph_id:
|
|
5120
|
-
simulation_transient_current_graph_id:
|
|
5121
|
-
simulation_voltage_probe_id:
|
|
5122
|
-
simulation_current_probe_id:
|
|
5123
|
-
display_name:
|
|
5124
|
-
color:
|
|
5125
|
-
display_center_value:
|
|
5126
|
-
display_center_offset_divs:
|
|
5127
|
-
volts_per_div:
|
|
5128
|
-
amps_per_div:
|
|
5136
|
+
simulation_transient_voltage_graph_id: z221.string().optional(),
|
|
5137
|
+
simulation_transient_current_graph_id: z221.string().optional(),
|
|
5138
|
+
simulation_voltage_probe_id: z221.string().optional(),
|
|
5139
|
+
simulation_current_probe_id: z221.string().optional(),
|
|
5140
|
+
display_name: z221.string().optional(),
|
|
5141
|
+
color: z221.string().optional(),
|
|
5142
|
+
display_center_value: z221.number().optional(),
|
|
5143
|
+
display_center_offset_divs: z221.number().optional(),
|
|
5144
|
+
volts_per_div: z221.number().positive().optional(),
|
|
5145
|
+
amps_per_div: z221.number().positive().optional()
|
|
5129
5146
|
}).describe(
|
|
5130
5147
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
5131
5148
|
).superRefine((data, ctx) => {
|
|
@@ -5139,19 +5156,19 @@ var simulation_oscilloscope_trace = z220.object({
|
|
|
5139
5156
|
].filter(hasValue).length;
|
|
5140
5157
|
if (voltageReferences + currentReferences !== 1) {
|
|
5141
5158
|
ctx.addIssue({
|
|
5142
|
-
code:
|
|
5159
|
+
code: z221.ZodIssueCode.custom,
|
|
5143
5160
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
5144
5161
|
});
|
|
5145
5162
|
}
|
|
5146
5163
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
5147
5164
|
ctx.addIssue({
|
|
5148
|
-
code:
|
|
5165
|
+
code: z221.ZodIssueCode.custom,
|
|
5149
5166
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
5150
5167
|
});
|
|
5151
5168
|
}
|
|
5152
5169
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
5153
5170
|
ctx.addIssue({
|
|
5154
|
-
code:
|
|
5171
|
+
code: z221.ZodIssueCode.custom,
|
|
5155
5172
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
5156
5173
|
});
|
|
5157
5174
|
}
|
|
@@ -5159,8 +5176,8 @@ var simulation_oscilloscope_trace = z220.object({
|
|
|
5159
5176
|
expectTypesMatch(true);
|
|
5160
5177
|
|
|
5161
5178
|
// src/any_circuit_element.ts
|
|
5162
|
-
import { z as
|
|
5163
|
-
var any_circuit_element =
|
|
5179
|
+
import { z as z222 } from "zod";
|
|
5180
|
+
var any_circuit_element = z222.union([
|
|
5164
5181
|
source_runtime_error,
|
|
5165
5182
|
source_trace,
|
|
5166
5183
|
source_bus,
|
|
@@ -5309,6 +5326,7 @@ var any_circuit_element = z221.union([
|
|
|
5309
5326
|
schematic_manual_edit_conflict_warning,
|
|
5310
5327
|
schematic_component_overlap_warning,
|
|
5311
5328
|
schematic_component_styling_warning,
|
|
5329
|
+
schematic_sheet_styling_warning,
|
|
5312
5330
|
schematic_missing_sheet_warning,
|
|
5313
5331
|
schematic_element_outside_sheet_warning,
|
|
5314
5332
|
schematic_graphic,
|
|
@@ -5544,6 +5562,7 @@ export {
|
|
|
5544
5562
|
schematic_rect,
|
|
5545
5563
|
schematic_sheet,
|
|
5546
5564
|
schematic_sheet_size,
|
|
5565
|
+
schematic_sheet_styling_warning,
|
|
5547
5566
|
schematic_symbol,
|
|
5548
5567
|
schematic_table,
|
|
5549
5568
|
schematic_table_cell,
|