circuit-json 0.0.486 → 0.0.488
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -1
- package/dist/index.d.mts +222 -5
- package/dist/index.mjs +1260 -1235
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1713,26 +1713,40 @@ var schematic_sheet = z99.object({
|
|
|
1713
1713
|
);
|
|
1714
1714
|
expectTypesMatch(true);
|
|
1715
1715
|
|
|
1716
|
-
// src/
|
|
1716
|
+
// src/schematic/schematic_missing_sheet_warning.ts
|
|
1717
1717
|
import { z as z100 } from "zod";
|
|
1718
|
-
var
|
|
1718
|
+
var schematic_missing_sheet_warning = z100.object({
|
|
1719
|
+
type: z100.literal("schematic_missing_sheet_warning"),
|
|
1720
|
+
schematic_missing_sheet_warning_id: getZodPrefixedIdWithDefault(
|
|
1721
|
+
"schematic_missing_sheet_warning"
|
|
1722
|
+
),
|
|
1723
|
+
warning_type: z100.literal("schematic_missing_sheet_warning").default("schematic_missing_sheet_warning"),
|
|
1724
|
+
message: z100.string()
|
|
1725
|
+
}).describe(
|
|
1726
|
+
"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."
|
|
1727
|
+
);
|
|
1728
|
+
expectTypesMatch(true);
|
|
1729
|
+
|
|
1730
|
+
// src/pcb/properties/brep.ts
|
|
1731
|
+
import { z as z101 } from "zod";
|
|
1732
|
+
var point_with_bulge = z101.object({
|
|
1719
1733
|
x: distance,
|
|
1720
1734
|
y: distance,
|
|
1721
|
-
bulge:
|
|
1735
|
+
bulge: z101.number().optional()
|
|
1722
1736
|
});
|
|
1723
1737
|
expectTypesMatch(true);
|
|
1724
|
-
var ring =
|
|
1725
|
-
vertices:
|
|
1738
|
+
var ring = z101.object({
|
|
1739
|
+
vertices: z101.array(point_with_bulge)
|
|
1726
1740
|
});
|
|
1727
1741
|
expectTypesMatch(true);
|
|
1728
|
-
var brep_shape =
|
|
1742
|
+
var brep_shape = z101.object({
|
|
1729
1743
|
outer_ring: ring,
|
|
1730
|
-
inner_rings:
|
|
1744
|
+
inner_rings: z101.array(ring).default([])
|
|
1731
1745
|
});
|
|
1732
1746
|
expectTypesMatch(true);
|
|
1733
1747
|
|
|
1734
1748
|
// src/pcb/properties/insertion_direction.ts
|
|
1735
|
-
import { z as
|
|
1749
|
+
import { z as z102 } from "zod";
|
|
1736
1750
|
var insertionDirectionToCanonical = {
|
|
1737
1751
|
from_left: "from_left",
|
|
1738
1752
|
from_right: "from_right",
|
|
@@ -1759,7 +1773,7 @@ var insertionDirectionToVector = {
|
|
|
1759
1773
|
from_above: { x: 0, y: 0, z: 1 },
|
|
1760
1774
|
from_below: { x: 0, y: 0, z: -1 }
|
|
1761
1775
|
};
|
|
1762
|
-
var insertion_direction =
|
|
1776
|
+
var insertion_direction = z102.enum([
|
|
1763
1777
|
"from_left",
|
|
1764
1778
|
"from_right",
|
|
1765
1779
|
"from_top",
|
|
@@ -1784,8 +1798,8 @@ expectTypesMatch(
|
|
|
1784
1798
|
);
|
|
1785
1799
|
|
|
1786
1800
|
// src/pcb/properties/pcb_pin1_location.ts
|
|
1787
|
-
import { z as
|
|
1788
|
-
var pcb_pin1_location =
|
|
1801
|
+
import { z as z103 } from "zod";
|
|
1802
|
+
var pcb_pin1_location = z103.enum([
|
|
1789
1803
|
"leftside_top",
|
|
1790
1804
|
"leftside_bottom",
|
|
1791
1805
|
"rightside_top",
|
|
@@ -1822,31 +1836,31 @@ var getRotationBetweenPcbPin1Locations = (from, to) => {
|
|
|
1822
1836
|
};
|
|
1823
1837
|
|
|
1824
1838
|
// src/pcb/properties/pcb_route_hints.ts
|
|
1825
|
-
import { z as
|
|
1826
|
-
var pcb_route_hint =
|
|
1839
|
+
import { z as z104 } from "zod";
|
|
1840
|
+
var pcb_route_hint = z104.object({
|
|
1827
1841
|
x: distance,
|
|
1828
1842
|
y: distance,
|
|
1829
|
-
via:
|
|
1843
|
+
via: z104.boolean().optional(),
|
|
1830
1844
|
via_to_layer: layer_ref.optional()
|
|
1831
1845
|
});
|
|
1832
|
-
var pcb_route_hints =
|
|
1846
|
+
var pcb_route_hints = z104.array(pcb_route_hint);
|
|
1833
1847
|
expectTypesMatch(true);
|
|
1834
1848
|
expectTypesMatch(true);
|
|
1835
1849
|
|
|
1836
1850
|
// src/pcb/properties/route_hint_point.ts
|
|
1837
|
-
import { z as
|
|
1838
|
-
var route_hint_point =
|
|
1851
|
+
import { z as z105 } from "zod";
|
|
1852
|
+
var route_hint_point = z105.object({
|
|
1839
1853
|
x: distance,
|
|
1840
1854
|
y: distance,
|
|
1841
|
-
via:
|
|
1855
|
+
via: z105.boolean().optional(),
|
|
1842
1856
|
to_layer: layer_ref.optional(),
|
|
1843
1857
|
trace_width: distance.optional()
|
|
1844
1858
|
});
|
|
1845
1859
|
expectTypesMatch(true);
|
|
1846
1860
|
|
|
1847
1861
|
// src/pcb/properties/manufacturing_drc_properties.ts
|
|
1848
|
-
import { z as
|
|
1849
|
-
var manufacturing_drc_properties =
|
|
1862
|
+
import { z as z106 } from "zod";
|
|
1863
|
+
var manufacturing_drc_properties = z106.object({
|
|
1850
1864
|
min_trace_width: length.optional(),
|
|
1851
1865
|
min_board_edge_clearance: length.optional(),
|
|
1852
1866
|
min_via_hole_edge_to_via_hole_edge_clearance: length.optional(),
|
|
@@ -1861,27 +1875,27 @@ var manufacturing_drc_properties = z105.object({
|
|
|
1861
1875
|
});
|
|
1862
1876
|
|
|
1863
1877
|
// src/pcb/pcb_component.ts
|
|
1864
|
-
import { z as
|
|
1865
|
-
var pcb_component =
|
|
1866
|
-
type:
|
|
1878
|
+
import { z as z107 } from "zod";
|
|
1879
|
+
var pcb_component = z107.object({
|
|
1880
|
+
type: z107.literal("pcb_component"),
|
|
1867
1881
|
pcb_component_id: getZodPrefixedIdWithDefault("pcb_component"),
|
|
1868
|
-
source_component_id:
|
|
1882
|
+
source_component_id: z107.string(),
|
|
1869
1883
|
center: point,
|
|
1870
1884
|
layer: layer_ref,
|
|
1871
1885
|
rotation,
|
|
1872
|
-
display_offset_x:
|
|
1886
|
+
display_offset_x: z107.string().optional().describe(
|
|
1873
1887
|
"How to display the x offset for this part, usually corresponding with how the user specified it"
|
|
1874
1888
|
),
|
|
1875
|
-
display_offset_y:
|
|
1889
|
+
display_offset_y: z107.string().optional().describe(
|
|
1876
1890
|
"How to display the y offset for this part, usually corresponding with how the user specified it"
|
|
1877
1891
|
),
|
|
1878
1892
|
width: length,
|
|
1879
1893
|
height: length,
|
|
1880
|
-
do_not_place:
|
|
1881
|
-
is_allowed_to_be_off_board:
|
|
1882
|
-
subcircuit_id:
|
|
1883
|
-
pcb_group_id:
|
|
1884
|
-
position_mode:
|
|
1894
|
+
do_not_place: z107.boolean().optional(),
|
|
1895
|
+
is_allowed_to_be_off_board: z107.boolean().optional(),
|
|
1896
|
+
subcircuit_id: z107.string().optional(),
|
|
1897
|
+
pcb_group_id: z107.string().optional(),
|
|
1898
|
+
position_mode: z107.enum([
|
|
1885
1899
|
"packed",
|
|
1886
1900
|
"relative_to_group_anchor",
|
|
1887
1901
|
"relative_to_another_component",
|
|
@@ -1889,48 +1903,48 @@ var pcb_component = z106.object({
|
|
|
1889
1903
|
]).optional(),
|
|
1890
1904
|
anchor_position: point.optional(),
|
|
1891
1905
|
anchor_alignment: ninePointAnchor.optional(),
|
|
1892
|
-
positioned_relative_to_pcb_group_id:
|
|
1893
|
-
positioned_relative_to_pcb_board_id:
|
|
1906
|
+
positioned_relative_to_pcb_group_id: z107.string().optional(),
|
|
1907
|
+
positioned_relative_to_pcb_board_id: z107.string().optional(),
|
|
1894
1908
|
cable_insertion_center: point.optional(),
|
|
1895
1909
|
insertion_direction: insertion_direction.optional(),
|
|
1896
1910
|
pin1_location: pcb_pin1_location.optional().describe(
|
|
1897
1911
|
"Location of pin 1 on the unrotated, top-view component footprint"
|
|
1898
1912
|
),
|
|
1899
|
-
supplier_pin1_location_map:
|
|
1913
|
+
supplier_pin1_location_map: z107.record(supplier_name, pcb_pin1_location).optional().describe(
|
|
1900
1914
|
"Pin 1 location for each supplier's unrotated, top-view footprint"
|
|
1901
1915
|
),
|
|
1902
|
-
metadata:
|
|
1916
|
+
metadata: z107.object({
|
|
1903
1917
|
kicad_footprint: kicadFootprintMetadata.optional()
|
|
1904
1918
|
}).optional(),
|
|
1905
|
-
obstructs_within_bounds:
|
|
1919
|
+
obstructs_within_bounds: z107.boolean().default(true).describe(
|
|
1906
1920
|
"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"
|
|
1907
1921
|
)
|
|
1908
1922
|
}).describe("Defines a component on the PCB");
|
|
1909
1923
|
expectTypesMatch(true);
|
|
1910
1924
|
|
|
1911
1925
|
// src/pcb/pcb_debug_object.ts
|
|
1912
|
-
import { z as
|
|
1913
|
-
var pcb_debug_object_base =
|
|
1914
|
-
type:
|
|
1926
|
+
import { z as z108 } from "zod";
|
|
1927
|
+
var pcb_debug_object_base = z108.object({
|
|
1928
|
+
type: z108.literal("pcb_debug_object"),
|
|
1915
1929
|
pcb_debug_object_id: getZodPrefixedIdWithDefault("pcb_debug_object"),
|
|
1916
|
-
label:
|
|
1917
|
-
subcircuit_id:
|
|
1930
|
+
label: z108.string().optional(),
|
|
1931
|
+
subcircuit_id: z108.string().optional()
|
|
1918
1932
|
});
|
|
1919
1933
|
var pcb_debug_rect = pcb_debug_object_base.extend({
|
|
1920
|
-
shape:
|
|
1934
|
+
shape: z108.literal("rect"),
|
|
1921
1935
|
center: point,
|
|
1922
1936
|
size
|
|
1923
1937
|
});
|
|
1924
1938
|
var pcb_debug_line = pcb_debug_object_base.extend({
|
|
1925
|
-
shape:
|
|
1939
|
+
shape: z108.literal("line"),
|
|
1926
1940
|
start: point,
|
|
1927
1941
|
end: point
|
|
1928
1942
|
});
|
|
1929
1943
|
var pcb_debug_point = pcb_debug_object_base.extend({
|
|
1930
|
-
shape:
|
|
1944
|
+
shape: z108.literal("point"),
|
|
1931
1945
|
center: point
|
|
1932
1946
|
});
|
|
1933
|
-
var pcb_debug_object =
|
|
1947
|
+
var pcb_debug_object = z108.discriminatedUnion("shape", [
|
|
1934
1948
|
pcb_debug_rect,
|
|
1935
1949
|
pcb_debug_line,
|
|
1936
1950
|
pcb_debug_point
|
|
@@ -1938,109 +1952,109 @@ var pcb_debug_object = z107.discriminatedUnion("shape", [
|
|
|
1938
1952
|
expectTypesMatch(true);
|
|
1939
1953
|
|
|
1940
1954
|
// src/pcb/pcb_hole.ts
|
|
1941
|
-
import { z as
|
|
1942
|
-
var pcb_hole_circle =
|
|
1943
|
-
type:
|
|
1955
|
+
import { z as z109 } from "zod";
|
|
1956
|
+
var pcb_hole_circle = z109.object({
|
|
1957
|
+
type: z109.literal("pcb_hole"),
|
|
1944
1958
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1945
|
-
pcb_group_id:
|
|
1946
|
-
subcircuit_id:
|
|
1947
|
-
pcb_component_id:
|
|
1948
|
-
hole_shape:
|
|
1949
|
-
hole_diameter:
|
|
1959
|
+
pcb_group_id: z109.string().optional(),
|
|
1960
|
+
subcircuit_id: z109.string().optional(),
|
|
1961
|
+
pcb_component_id: z109.string().optional(),
|
|
1962
|
+
hole_shape: z109.literal("circle"),
|
|
1963
|
+
hole_diameter: z109.number(),
|
|
1950
1964
|
x: distance,
|
|
1951
1965
|
y: distance,
|
|
1952
|
-
is_covered_with_solder_mask:
|
|
1953
|
-
soldermask_margin:
|
|
1966
|
+
is_covered_with_solder_mask: z109.boolean().optional(),
|
|
1967
|
+
soldermask_margin: z109.number().optional()
|
|
1954
1968
|
});
|
|
1955
1969
|
var pcb_hole_circle_shape = pcb_hole_circle.describe(
|
|
1956
1970
|
"Defines a circular hole on the PCB"
|
|
1957
1971
|
);
|
|
1958
1972
|
expectTypesMatch(true);
|
|
1959
|
-
var pcb_hole_rect =
|
|
1960
|
-
type:
|
|
1973
|
+
var pcb_hole_rect = z109.object({
|
|
1974
|
+
type: z109.literal("pcb_hole"),
|
|
1961
1975
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1962
|
-
pcb_group_id:
|
|
1963
|
-
subcircuit_id:
|
|
1964
|
-
pcb_component_id:
|
|
1965
|
-
hole_shape:
|
|
1966
|
-
hole_width:
|
|
1967
|
-
hole_height:
|
|
1976
|
+
pcb_group_id: z109.string().optional(),
|
|
1977
|
+
subcircuit_id: z109.string().optional(),
|
|
1978
|
+
pcb_component_id: z109.string().optional(),
|
|
1979
|
+
hole_shape: z109.literal("rect"),
|
|
1980
|
+
hole_width: z109.number(),
|
|
1981
|
+
hole_height: z109.number(),
|
|
1968
1982
|
x: distance,
|
|
1969
1983
|
y: distance,
|
|
1970
|
-
is_covered_with_solder_mask:
|
|
1971
|
-
soldermask_margin:
|
|
1984
|
+
is_covered_with_solder_mask: z109.boolean().optional(),
|
|
1985
|
+
soldermask_margin: z109.number().optional()
|
|
1972
1986
|
});
|
|
1973
1987
|
var pcb_hole_rect_shape = pcb_hole_rect.describe(
|
|
1974
1988
|
"Defines a rectangular (square-capable) hole on the PCB. Use equal width/height for square."
|
|
1975
1989
|
);
|
|
1976
1990
|
expectTypesMatch(true);
|
|
1977
|
-
var pcb_hole_circle_or_square =
|
|
1978
|
-
type:
|
|
1991
|
+
var pcb_hole_circle_or_square = z109.object({
|
|
1992
|
+
type: z109.literal("pcb_hole"),
|
|
1979
1993
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1980
|
-
pcb_group_id:
|
|
1981
|
-
subcircuit_id:
|
|
1982
|
-
pcb_component_id:
|
|
1983
|
-
hole_shape:
|
|
1984
|
-
hole_diameter:
|
|
1994
|
+
pcb_group_id: z109.string().optional(),
|
|
1995
|
+
subcircuit_id: z109.string().optional(),
|
|
1996
|
+
pcb_component_id: z109.string().optional(),
|
|
1997
|
+
hole_shape: z109.enum(["circle", "square"]),
|
|
1998
|
+
hole_diameter: z109.number(),
|
|
1985
1999
|
x: distance,
|
|
1986
2000
|
y: distance,
|
|
1987
|
-
is_covered_with_solder_mask:
|
|
1988
|
-
soldermask_margin:
|
|
2001
|
+
is_covered_with_solder_mask: z109.boolean().optional(),
|
|
2002
|
+
soldermask_margin: z109.number().optional()
|
|
1989
2003
|
});
|
|
1990
2004
|
var pcb_hole_circle_or_square_shape = pcb_hole_circle_or_square.describe(
|
|
1991
2005
|
"Defines a circular or square hole on the PCB"
|
|
1992
2006
|
);
|
|
1993
2007
|
expectTypesMatch(true);
|
|
1994
|
-
var pcb_hole_oval =
|
|
1995
|
-
type:
|
|
2008
|
+
var pcb_hole_oval = z109.object({
|
|
2009
|
+
type: z109.literal("pcb_hole"),
|
|
1996
2010
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
1997
|
-
pcb_group_id:
|
|
1998
|
-
subcircuit_id:
|
|
1999
|
-
pcb_component_id:
|
|
2000
|
-
hole_shape:
|
|
2001
|
-
hole_width:
|
|
2002
|
-
hole_height:
|
|
2011
|
+
pcb_group_id: z109.string().optional(),
|
|
2012
|
+
subcircuit_id: z109.string().optional(),
|
|
2013
|
+
pcb_component_id: z109.string().optional(),
|
|
2014
|
+
hole_shape: z109.literal("oval"),
|
|
2015
|
+
hole_width: z109.number(),
|
|
2016
|
+
hole_height: z109.number(),
|
|
2003
2017
|
x: distance,
|
|
2004
2018
|
y: distance,
|
|
2005
|
-
is_covered_with_solder_mask:
|
|
2006
|
-
soldermask_margin:
|
|
2019
|
+
is_covered_with_solder_mask: z109.boolean().optional(),
|
|
2020
|
+
soldermask_margin: z109.number().optional()
|
|
2007
2021
|
});
|
|
2008
2022
|
var pcb_hole_oval_shape = pcb_hole_oval.describe(
|
|
2009
2023
|
"Defines an oval hole on the PCB"
|
|
2010
2024
|
);
|
|
2011
2025
|
expectTypesMatch(true);
|
|
2012
|
-
var pcb_hole_pill =
|
|
2013
|
-
type:
|
|
2026
|
+
var pcb_hole_pill = z109.object({
|
|
2027
|
+
type: z109.literal("pcb_hole"),
|
|
2014
2028
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
2015
|
-
pcb_group_id:
|
|
2016
|
-
subcircuit_id:
|
|
2017
|
-
pcb_component_id:
|
|
2018
|
-
hole_shape:
|
|
2019
|
-
hole_width:
|
|
2020
|
-
hole_height:
|
|
2029
|
+
pcb_group_id: z109.string().optional(),
|
|
2030
|
+
subcircuit_id: z109.string().optional(),
|
|
2031
|
+
pcb_component_id: z109.string().optional(),
|
|
2032
|
+
hole_shape: z109.literal("pill"),
|
|
2033
|
+
hole_width: z109.number(),
|
|
2034
|
+
hole_height: z109.number(),
|
|
2021
2035
|
x: distance,
|
|
2022
2036
|
y: distance,
|
|
2023
|
-
is_covered_with_solder_mask:
|
|
2024
|
-
soldermask_margin:
|
|
2037
|
+
is_covered_with_solder_mask: z109.boolean().optional(),
|
|
2038
|
+
soldermask_margin: z109.number().optional()
|
|
2025
2039
|
});
|
|
2026
2040
|
var pcb_hole_pill_shape = pcb_hole_pill.describe(
|
|
2027
2041
|
"Defines a pill-shaped hole on the PCB"
|
|
2028
2042
|
);
|
|
2029
2043
|
expectTypesMatch(true);
|
|
2030
|
-
var pcb_hole_rotated_pill =
|
|
2031
|
-
type:
|
|
2044
|
+
var pcb_hole_rotated_pill = z109.object({
|
|
2045
|
+
type: z109.literal("pcb_hole"),
|
|
2032
2046
|
pcb_hole_id: getZodPrefixedIdWithDefault("pcb_hole"),
|
|
2033
|
-
pcb_group_id:
|
|
2034
|
-
subcircuit_id:
|
|
2035
|
-
pcb_component_id:
|
|
2036
|
-
hole_shape:
|
|
2037
|
-
hole_width:
|
|
2038
|
-
hole_height:
|
|
2047
|
+
pcb_group_id: z109.string().optional(),
|
|
2048
|
+
subcircuit_id: z109.string().optional(),
|
|
2049
|
+
pcb_component_id: z109.string().optional(),
|
|
2050
|
+
hole_shape: z109.literal("rotated_pill"),
|
|
2051
|
+
hole_width: z109.number(),
|
|
2052
|
+
hole_height: z109.number(),
|
|
2039
2053
|
x: distance,
|
|
2040
2054
|
y: distance,
|
|
2041
2055
|
ccw_rotation: rotation,
|
|
2042
|
-
is_covered_with_solder_mask:
|
|
2043
|
-
soldermask_margin:
|
|
2056
|
+
is_covered_with_solder_mask: z109.boolean().optional(),
|
|
2057
|
+
soldermask_margin: z109.number().optional()
|
|
2044
2058
|
});
|
|
2045
2059
|
var pcb_hole_rotated_pill_shape = pcb_hole_rotated_pill.describe(
|
|
2046
2060
|
"Defines a rotated pill-shaped hole on the PCB"
|
|
@@ -2049,147 +2063,147 @@ expectTypesMatch(true);
|
|
|
2049
2063
|
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);
|
|
2050
2064
|
|
|
2051
2065
|
// src/pcb/pcb_plated_hole.ts
|
|
2052
|
-
import { z as
|
|
2053
|
-
var pcb_plated_hole_circle =
|
|
2054
|
-
type:
|
|
2055
|
-
shape:
|
|
2056
|
-
pcb_group_id:
|
|
2057
|
-
subcircuit_id:
|
|
2058
|
-
outer_diameter:
|
|
2059
|
-
hole_diameter:
|
|
2060
|
-
is_covered_with_solder_mask:
|
|
2066
|
+
import { z as z110 } from "zod";
|
|
2067
|
+
var pcb_plated_hole_circle = z110.object({
|
|
2068
|
+
type: z110.literal("pcb_plated_hole"),
|
|
2069
|
+
shape: z110.literal("circle"),
|
|
2070
|
+
pcb_group_id: z110.string().optional(),
|
|
2071
|
+
subcircuit_id: z110.string().optional(),
|
|
2072
|
+
outer_diameter: z110.number(),
|
|
2073
|
+
hole_diameter: z110.number(),
|
|
2074
|
+
is_covered_with_solder_mask: z110.boolean().optional(),
|
|
2061
2075
|
x: distance,
|
|
2062
2076
|
y: distance,
|
|
2063
|
-
layers:
|
|
2064
|
-
port_hints:
|
|
2065
|
-
pcb_component_id:
|
|
2066
|
-
pcb_port_id:
|
|
2077
|
+
layers: z110.array(layer_ref),
|
|
2078
|
+
port_hints: z110.array(z110.string()).optional(),
|
|
2079
|
+
pcb_component_id: z110.string().optional(),
|
|
2080
|
+
pcb_port_id: z110.string().optional(),
|
|
2067
2081
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2068
|
-
soldermask_margin:
|
|
2082
|
+
soldermask_margin: z110.number().optional()
|
|
2069
2083
|
});
|
|
2070
|
-
var pcb_plated_hole_oval =
|
|
2071
|
-
type:
|
|
2072
|
-
shape:
|
|
2073
|
-
pcb_group_id:
|
|
2074
|
-
subcircuit_id:
|
|
2075
|
-
outer_width:
|
|
2076
|
-
outer_height:
|
|
2077
|
-
hole_width:
|
|
2078
|
-
hole_height:
|
|
2079
|
-
is_covered_with_solder_mask:
|
|
2084
|
+
var pcb_plated_hole_oval = z110.object({
|
|
2085
|
+
type: z110.literal("pcb_plated_hole"),
|
|
2086
|
+
shape: z110.enum(["oval", "pill"]),
|
|
2087
|
+
pcb_group_id: z110.string().optional(),
|
|
2088
|
+
subcircuit_id: z110.string().optional(),
|
|
2089
|
+
outer_width: z110.number(),
|
|
2090
|
+
outer_height: z110.number(),
|
|
2091
|
+
hole_width: z110.number(),
|
|
2092
|
+
hole_height: z110.number(),
|
|
2093
|
+
is_covered_with_solder_mask: z110.boolean().optional(),
|
|
2080
2094
|
x: distance,
|
|
2081
2095
|
y: distance,
|
|
2082
2096
|
ccw_rotation: rotation,
|
|
2083
|
-
layers:
|
|
2084
|
-
port_hints:
|
|
2085
|
-
pcb_component_id:
|
|
2086
|
-
pcb_port_id:
|
|
2097
|
+
layers: z110.array(layer_ref),
|
|
2098
|
+
port_hints: z110.array(z110.string()).optional(),
|
|
2099
|
+
pcb_component_id: z110.string().optional(),
|
|
2100
|
+
pcb_port_id: z110.string().optional(),
|
|
2087
2101
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2088
|
-
soldermask_margin:
|
|
2102
|
+
soldermask_margin: z110.number().optional()
|
|
2089
2103
|
});
|
|
2090
|
-
var pcb_circular_hole_with_rect_pad =
|
|
2091
|
-
type:
|
|
2092
|
-
shape:
|
|
2093
|
-
pcb_group_id:
|
|
2094
|
-
subcircuit_id:
|
|
2095
|
-
hole_shape:
|
|
2096
|
-
pad_shape:
|
|
2097
|
-
hole_diameter:
|
|
2098
|
-
rect_pad_width:
|
|
2099
|
-
rect_pad_height:
|
|
2100
|
-
rect_border_radius:
|
|
2104
|
+
var pcb_circular_hole_with_rect_pad = z110.object({
|
|
2105
|
+
type: z110.literal("pcb_plated_hole"),
|
|
2106
|
+
shape: z110.literal("circular_hole_with_rect_pad"),
|
|
2107
|
+
pcb_group_id: z110.string().optional(),
|
|
2108
|
+
subcircuit_id: z110.string().optional(),
|
|
2109
|
+
hole_shape: z110.literal("circle"),
|
|
2110
|
+
pad_shape: z110.literal("rect"),
|
|
2111
|
+
hole_diameter: z110.number(),
|
|
2112
|
+
rect_pad_width: z110.number(),
|
|
2113
|
+
rect_pad_height: z110.number(),
|
|
2114
|
+
rect_border_radius: z110.number().optional(),
|
|
2101
2115
|
hole_offset_x: distance.default(0),
|
|
2102
2116
|
hole_offset_y: distance.default(0),
|
|
2103
|
-
is_covered_with_solder_mask:
|
|
2117
|
+
is_covered_with_solder_mask: z110.boolean().optional(),
|
|
2104
2118
|
x: distance,
|
|
2105
2119
|
y: distance,
|
|
2106
|
-
layers:
|
|
2107
|
-
port_hints:
|
|
2108
|
-
pcb_component_id:
|
|
2109
|
-
pcb_port_id:
|
|
2120
|
+
layers: z110.array(layer_ref),
|
|
2121
|
+
port_hints: z110.array(z110.string()).optional(),
|
|
2122
|
+
pcb_component_id: z110.string().optional(),
|
|
2123
|
+
pcb_port_id: z110.string().optional(),
|
|
2110
2124
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2111
|
-
soldermask_margin:
|
|
2125
|
+
soldermask_margin: z110.number().optional(),
|
|
2112
2126
|
rect_ccw_rotation: rotation.optional()
|
|
2113
2127
|
});
|
|
2114
|
-
var pcb_pill_hole_with_rect_pad =
|
|
2115
|
-
type:
|
|
2116
|
-
shape:
|
|
2117
|
-
pcb_group_id:
|
|
2118
|
-
subcircuit_id:
|
|
2119
|
-
hole_shape:
|
|
2120
|
-
pad_shape:
|
|
2121
|
-
hole_width:
|
|
2122
|
-
hole_height:
|
|
2123
|
-
rect_pad_width:
|
|
2124
|
-
rect_pad_height:
|
|
2125
|
-
rect_border_radius:
|
|
2128
|
+
var pcb_pill_hole_with_rect_pad = z110.object({
|
|
2129
|
+
type: z110.literal("pcb_plated_hole"),
|
|
2130
|
+
shape: z110.literal("pill_hole_with_rect_pad"),
|
|
2131
|
+
pcb_group_id: z110.string().optional(),
|
|
2132
|
+
subcircuit_id: z110.string().optional(),
|
|
2133
|
+
hole_shape: z110.literal("pill"),
|
|
2134
|
+
pad_shape: z110.literal("rect"),
|
|
2135
|
+
hole_width: z110.number(),
|
|
2136
|
+
hole_height: z110.number(),
|
|
2137
|
+
rect_pad_width: z110.number(),
|
|
2138
|
+
rect_pad_height: z110.number(),
|
|
2139
|
+
rect_border_radius: z110.number().optional(),
|
|
2126
2140
|
hole_offset_x: distance.default(0),
|
|
2127
2141
|
hole_offset_y: distance.default(0),
|
|
2128
|
-
is_covered_with_solder_mask:
|
|
2142
|
+
is_covered_with_solder_mask: z110.boolean().optional(),
|
|
2129
2143
|
x: distance,
|
|
2130
2144
|
y: distance,
|
|
2131
|
-
layers:
|
|
2132
|
-
port_hints:
|
|
2133
|
-
pcb_component_id:
|
|
2134
|
-
pcb_port_id:
|
|
2145
|
+
layers: z110.array(layer_ref),
|
|
2146
|
+
port_hints: z110.array(z110.string()).optional(),
|
|
2147
|
+
pcb_component_id: z110.string().optional(),
|
|
2148
|
+
pcb_port_id: z110.string().optional(),
|
|
2135
2149
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2136
|
-
soldermask_margin:
|
|
2150
|
+
soldermask_margin: z110.number().optional()
|
|
2137
2151
|
});
|
|
2138
|
-
var pcb_rotated_pill_hole_with_rect_pad =
|
|
2139
|
-
type:
|
|
2140
|
-
shape:
|
|
2141
|
-
pcb_group_id:
|
|
2142
|
-
subcircuit_id:
|
|
2143
|
-
hole_shape:
|
|
2144
|
-
pad_shape:
|
|
2145
|
-
hole_width:
|
|
2146
|
-
hole_height:
|
|
2152
|
+
var pcb_rotated_pill_hole_with_rect_pad = z110.object({
|
|
2153
|
+
type: z110.literal("pcb_plated_hole"),
|
|
2154
|
+
shape: z110.literal("rotated_pill_hole_with_rect_pad"),
|
|
2155
|
+
pcb_group_id: z110.string().optional(),
|
|
2156
|
+
subcircuit_id: z110.string().optional(),
|
|
2157
|
+
hole_shape: z110.literal("rotated_pill"),
|
|
2158
|
+
pad_shape: z110.literal("rect"),
|
|
2159
|
+
hole_width: z110.number(),
|
|
2160
|
+
hole_height: z110.number(),
|
|
2147
2161
|
hole_ccw_rotation: rotation,
|
|
2148
|
-
rect_pad_width:
|
|
2149
|
-
rect_pad_height:
|
|
2150
|
-
rect_border_radius:
|
|
2162
|
+
rect_pad_width: z110.number(),
|
|
2163
|
+
rect_pad_height: z110.number(),
|
|
2164
|
+
rect_border_radius: z110.number().optional(),
|
|
2151
2165
|
rect_ccw_rotation: rotation,
|
|
2152
2166
|
hole_offset_x: distance.default(0),
|
|
2153
2167
|
hole_offset_y: distance.default(0),
|
|
2154
|
-
is_covered_with_solder_mask:
|
|
2168
|
+
is_covered_with_solder_mask: z110.boolean().optional(),
|
|
2155
2169
|
x: distance,
|
|
2156
2170
|
y: distance,
|
|
2157
|
-
layers:
|
|
2158
|
-
port_hints:
|
|
2159
|
-
pcb_component_id:
|
|
2160
|
-
pcb_port_id:
|
|
2171
|
+
layers: z110.array(layer_ref),
|
|
2172
|
+
port_hints: z110.array(z110.string()).optional(),
|
|
2173
|
+
pcb_component_id: z110.string().optional(),
|
|
2174
|
+
pcb_port_id: z110.string().optional(),
|
|
2161
2175
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2162
|
-
soldermask_margin:
|
|
2176
|
+
soldermask_margin: z110.number().optional()
|
|
2163
2177
|
});
|
|
2164
|
-
var pcb_hole_with_polygon_pad =
|
|
2165
|
-
type:
|
|
2166
|
-
shape:
|
|
2167
|
-
pcb_group_id:
|
|
2168
|
-
subcircuit_id:
|
|
2169
|
-
hole_shape:
|
|
2170
|
-
hole_diameter:
|
|
2171
|
-
hole_width:
|
|
2172
|
-
hole_height:
|
|
2173
|
-
pad_outline:
|
|
2174
|
-
|
|
2178
|
+
var pcb_hole_with_polygon_pad = z110.object({
|
|
2179
|
+
type: z110.literal("pcb_plated_hole"),
|
|
2180
|
+
shape: z110.literal("hole_with_polygon_pad"),
|
|
2181
|
+
pcb_group_id: z110.string().optional(),
|
|
2182
|
+
subcircuit_id: z110.string().optional(),
|
|
2183
|
+
hole_shape: z110.enum(["circle", "oval", "pill", "rotated_pill"]),
|
|
2184
|
+
hole_diameter: z110.number().optional(),
|
|
2185
|
+
hole_width: z110.number().optional(),
|
|
2186
|
+
hole_height: z110.number().optional(),
|
|
2187
|
+
pad_outline: z110.array(
|
|
2188
|
+
z110.object({
|
|
2175
2189
|
x: distance,
|
|
2176
2190
|
y: distance
|
|
2177
2191
|
})
|
|
2178
2192
|
).min(3),
|
|
2179
2193
|
hole_offset_x: distance.default(0),
|
|
2180
2194
|
hole_offset_y: distance.default(0),
|
|
2181
|
-
is_covered_with_solder_mask:
|
|
2195
|
+
is_covered_with_solder_mask: z110.boolean().optional(),
|
|
2182
2196
|
x: distance,
|
|
2183
2197
|
y: distance,
|
|
2184
|
-
layers:
|
|
2185
|
-
port_hints:
|
|
2186
|
-
pcb_component_id:
|
|
2187
|
-
pcb_port_id:
|
|
2198
|
+
layers: z110.array(layer_ref),
|
|
2199
|
+
port_hints: z110.array(z110.string()).optional(),
|
|
2200
|
+
pcb_component_id: z110.string().optional(),
|
|
2201
|
+
pcb_port_id: z110.string().optional(),
|
|
2188
2202
|
pcb_plated_hole_id: getZodPrefixedIdWithDefault("pcb_plated_hole"),
|
|
2189
|
-
soldermask_margin:
|
|
2203
|
+
soldermask_margin: z110.number().optional(),
|
|
2190
2204
|
ccw_rotation: rotation.optional()
|
|
2191
2205
|
});
|
|
2192
|
-
var pcb_plated_hole =
|
|
2206
|
+
var pcb_plated_hole = z110.union([
|
|
2193
2207
|
pcb_plated_hole_circle,
|
|
2194
2208
|
pcb_plated_hole_oval,
|
|
2195
2209
|
pcb_circular_hole_with_rect_pad,
|
|
@@ -2207,144 +2221,144 @@ expectTypesMatch(true);
|
|
|
2207
2221
|
expectTypesMatch(true);
|
|
2208
2222
|
|
|
2209
2223
|
// src/pcb/pcb_port.ts
|
|
2210
|
-
import { z as
|
|
2211
|
-
var pcb_port =
|
|
2212
|
-
type:
|
|
2224
|
+
import { z as z111 } from "zod";
|
|
2225
|
+
var pcb_port = z111.object({
|
|
2226
|
+
type: z111.literal("pcb_port"),
|
|
2213
2227
|
pcb_port_id: getZodPrefixedIdWithDefault("pcb_port"),
|
|
2214
|
-
pcb_group_id:
|
|
2215
|
-
subcircuit_id:
|
|
2216
|
-
source_port_id:
|
|
2217
|
-
pcb_component_id:
|
|
2228
|
+
pcb_group_id: z111.string().optional(),
|
|
2229
|
+
subcircuit_id: z111.string().optional(),
|
|
2230
|
+
source_port_id: z111.string(),
|
|
2231
|
+
pcb_component_id: z111.string().optional(),
|
|
2218
2232
|
x: distance,
|
|
2219
2233
|
y: distance,
|
|
2220
|
-
layers:
|
|
2221
|
-
is_board_pinout:
|
|
2234
|
+
layers: z111.array(layer_ref),
|
|
2235
|
+
is_board_pinout: z111.boolean().optional()
|
|
2222
2236
|
}).describe("Defines a port on the PCB");
|
|
2223
2237
|
expectTypesMatch(true);
|
|
2224
2238
|
|
|
2225
2239
|
// src/pcb/pcb_smtpad.ts
|
|
2226
|
-
import { z as
|
|
2227
|
-
var pcb_smtpad_circle =
|
|
2228
|
-
type:
|
|
2229
|
-
shape:
|
|
2240
|
+
import { z as z112 } from "zod";
|
|
2241
|
+
var pcb_smtpad_circle = z112.object({
|
|
2242
|
+
type: z112.literal("pcb_smtpad"),
|
|
2243
|
+
shape: z112.literal("circle"),
|
|
2230
2244
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2231
|
-
pcb_group_id:
|
|
2232
|
-
subcircuit_id:
|
|
2245
|
+
pcb_group_id: z112.string().optional(),
|
|
2246
|
+
subcircuit_id: z112.string().optional(),
|
|
2233
2247
|
x: distance,
|
|
2234
2248
|
y: distance,
|
|
2235
|
-
radius:
|
|
2249
|
+
radius: z112.number(),
|
|
2236
2250
|
layer: layer_ref,
|
|
2237
|
-
port_hints:
|
|
2238
|
-
pcb_component_id:
|
|
2239
|
-
pcb_port_id:
|
|
2240
|
-
is_covered_with_solder_mask:
|
|
2241
|
-
soldermask_margin:
|
|
2242
|
-
solderpaste_margin:
|
|
2251
|
+
port_hints: z112.array(z112.string()).optional(),
|
|
2252
|
+
pcb_component_id: z112.string().optional(),
|
|
2253
|
+
pcb_port_id: z112.string().optional(),
|
|
2254
|
+
is_covered_with_solder_mask: z112.boolean().optional(),
|
|
2255
|
+
soldermask_margin: z112.number().optional(),
|
|
2256
|
+
solderpaste_margin: z112.number().optional()
|
|
2243
2257
|
});
|
|
2244
|
-
var pcb_smtpad_rect =
|
|
2245
|
-
type:
|
|
2246
|
-
shape:
|
|
2258
|
+
var pcb_smtpad_rect = z112.object({
|
|
2259
|
+
type: z112.literal("pcb_smtpad"),
|
|
2260
|
+
shape: z112.literal("rect"),
|
|
2247
2261
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2248
|
-
pcb_group_id:
|
|
2249
|
-
subcircuit_id:
|
|
2262
|
+
pcb_group_id: z112.string().optional(),
|
|
2263
|
+
subcircuit_id: z112.string().optional(),
|
|
2250
2264
|
x: distance,
|
|
2251
2265
|
y: distance,
|
|
2252
|
-
width:
|
|
2253
|
-
height:
|
|
2254
|
-
rect_border_radius:
|
|
2255
|
-
corner_radius:
|
|
2266
|
+
width: z112.number(),
|
|
2267
|
+
height: z112.number(),
|
|
2268
|
+
rect_border_radius: z112.number().optional(),
|
|
2269
|
+
corner_radius: z112.number().optional(),
|
|
2256
2270
|
layer: layer_ref,
|
|
2257
|
-
port_hints:
|
|
2258
|
-
pcb_component_id:
|
|
2259
|
-
pcb_port_id:
|
|
2260
|
-
is_covered_with_solder_mask:
|
|
2261
|
-
soldermask_margin:
|
|
2262
|
-
soldermask_margin_left:
|
|
2263
|
-
soldermask_margin_top:
|
|
2264
|
-
soldermask_margin_right:
|
|
2265
|
-
soldermask_margin_bottom:
|
|
2266
|
-
solderpaste_margin:
|
|
2271
|
+
port_hints: z112.array(z112.string()).optional(),
|
|
2272
|
+
pcb_component_id: z112.string().optional(),
|
|
2273
|
+
pcb_port_id: z112.string().optional(),
|
|
2274
|
+
is_covered_with_solder_mask: z112.boolean().optional(),
|
|
2275
|
+
soldermask_margin: z112.number().optional(),
|
|
2276
|
+
soldermask_margin_left: z112.number().optional(),
|
|
2277
|
+
soldermask_margin_top: z112.number().optional(),
|
|
2278
|
+
soldermask_margin_right: z112.number().optional(),
|
|
2279
|
+
soldermask_margin_bottom: z112.number().optional(),
|
|
2280
|
+
solderpaste_margin: z112.number().optional()
|
|
2267
2281
|
});
|
|
2268
|
-
var pcb_smtpad_rotated_rect =
|
|
2269
|
-
type:
|
|
2270
|
-
shape:
|
|
2282
|
+
var pcb_smtpad_rotated_rect = z112.object({
|
|
2283
|
+
type: z112.literal("pcb_smtpad"),
|
|
2284
|
+
shape: z112.literal("rotated_rect"),
|
|
2271
2285
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2272
|
-
pcb_group_id:
|
|
2273
|
-
subcircuit_id:
|
|
2286
|
+
pcb_group_id: z112.string().optional(),
|
|
2287
|
+
subcircuit_id: z112.string().optional(),
|
|
2274
2288
|
x: distance,
|
|
2275
2289
|
y: distance,
|
|
2276
|
-
width:
|
|
2277
|
-
height:
|
|
2278
|
-
rect_border_radius:
|
|
2279
|
-
corner_radius:
|
|
2290
|
+
width: z112.number(),
|
|
2291
|
+
height: z112.number(),
|
|
2292
|
+
rect_border_radius: z112.number().optional(),
|
|
2293
|
+
corner_radius: z112.number().optional(),
|
|
2280
2294
|
ccw_rotation: rotation,
|
|
2281
2295
|
layer: layer_ref,
|
|
2282
|
-
port_hints:
|
|
2283
|
-
pcb_component_id:
|
|
2284
|
-
pcb_port_id:
|
|
2285
|
-
is_covered_with_solder_mask:
|
|
2286
|
-
soldermask_margin:
|
|
2287
|
-
soldermask_margin_left:
|
|
2288
|
-
soldermask_margin_top:
|
|
2289
|
-
soldermask_margin_right:
|
|
2290
|
-
soldermask_margin_bottom:
|
|
2291
|
-
solderpaste_margin:
|
|
2296
|
+
port_hints: z112.array(z112.string()).optional(),
|
|
2297
|
+
pcb_component_id: z112.string().optional(),
|
|
2298
|
+
pcb_port_id: z112.string().optional(),
|
|
2299
|
+
is_covered_with_solder_mask: z112.boolean().optional(),
|
|
2300
|
+
soldermask_margin: z112.number().optional(),
|
|
2301
|
+
soldermask_margin_left: z112.number().optional(),
|
|
2302
|
+
soldermask_margin_top: z112.number().optional(),
|
|
2303
|
+
soldermask_margin_right: z112.number().optional(),
|
|
2304
|
+
soldermask_margin_bottom: z112.number().optional(),
|
|
2305
|
+
solderpaste_margin: z112.number().optional()
|
|
2292
2306
|
});
|
|
2293
|
-
var pcb_smtpad_pill =
|
|
2294
|
-
type:
|
|
2295
|
-
shape:
|
|
2307
|
+
var pcb_smtpad_pill = z112.object({
|
|
2308
|
+
type: z112.literal("pcb_smtpad"),
|
|
2309
|
+
shape: z112.literal("pill"),
|
|
2296
2310
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2297
|
-
pcb_group_id:
|
|
2298
|
-
subcircuit_id:
|
|
2311
|
+
pcb_group_id: z112.string().optional(),
|
|
2312
|
+
subcircuit_id: z112.string().optional(),
|
|
2299
2313
|
x: distance,
|
|
2300
2314
|
y: distance,
|
|
2301
|
-
width:
|
|
2302
|
-
height:
|
|
2303
|
-
radius:
|
|
2315
|
+
width: z112.number(),
|
|
2316
|
+
height: z112.number(),
|
|
2317
|
+
radius: z112.number(),
|
|
2304
2318
|
layer: layer_ref,
|
|
2305
|
-
port_hints:
|
|
2306
|
-
pcb_component_id:
|
|
2307
|
-
pcb_port_id:
|
|
2308
|
-
is_covered_with_solder_mask:
|
|
2309
|
-
soldermask_margin:
|
|
2310
|
-
solderpaste_margin:
|
|
2319
|
+
port_hints: z112.array(z112.string()).optional(),
|
|
2320
|
+
pcb_component_id: z112.string().optional(),
|
|
2321
|
+
pcb_port_id: z112.string().optional(),
|
|
2322
|
+
is_covered_with_solder_mask: z112.boolean().optional(),
|
|
2323
|
+
soldermask_margin: z112.number().optional(),
|
|
2324
|
+
solderpaste_margin: z112.number().optional()
|
|
2311
2325
|
});
|
|
2312
|
-
var pcb_smtpad_rotated_pill =
|
|
2313
|
-
type:
|
|
2314
|
-
shape:
|
|
2326
|
+
var pcb_smtpad_rotated_pill = z112.object({
|
|
2327
|
+
type: z112.literal("pcb_smtpad"),
|
|
2328
|
+
shape: z112.literal("rotated_pill"),
|
|
2315
2329
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2316
|
-
pcb_group_id:
|
|
2317
|
-
subcircuit_id:
|
|
2330
|
+
pcb_group_id: z112.string().optional(),
|
|
2331
|
+
subcircuit_id: z112.string().optional(),
|
|
2318
2332
|
x: distance,
|
|
2319
2333
|
y: distance,
|
|
2320
|
-
width:
|
|
2321
|
-
height:
|
|
2322
|
-
radius:
|
|
2334
|
+
width: z112.number(),
|
|
2335
|
+
height: z112.number(),
|
|
2336
|
+
radius: z112.number(),
|
|
2323
2337
|
ccw_rotation: rotation,
|
|
2324
2338
|
layer: layer_ref,
|
|
2325
|
-
port_hints:
|
|
2326
|
-
pcb_component_id:
|
|
2327
|
-
pcb_port_id:
|
|
2328
|
-
is_covered_with_solder_mask:
|
|
2329
|
-
soldermask_margin:
|
|
2330
|
-
solderpaste_margin:
|
|
2339
|
+
port_hints: z112.array(z112.string()).optional(),
|
|
2340
|
+
pcb_component_id: z112.string().optional(),
|
|
2341
|
+
pcb_port_id: z112.string().optional(),
|
|
2342
|
+
is_covered_with_solder_mask: z112.boolean().optional(),
|
|
2343
|
+
soldermask_margin: z112.number().optional(),
|
|
2344
|
+
solderpaste_margin: z112.number().optional()
|
|
2331
2345
|
});
|
|
2332
|
-
var pcb_smtpad_polygon =
|
|
2333
|
-
type:
|
|
2334
|
-
shape:
|
|
2346
|
+
var pcb_smtpad_polygon = z112.object({
|
|
2347
|
+
type: z112.literal("pcb_smtpad"),
|
|
2348
|
+
shape: z112.literal("polygon"),
|
|
2335
2349
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
2336
|
-
pcb_group_id:
|
|
2337
|
-
subcircuit_id:
|
|
2338
|
-
points:
|
|
2350
|
+
pcb_group_id: z112.string().optional(),
|
|
2351
|
+
subcircuit_id: z112.string().optional(),
|
|
2352
|
+
points: z112.array(point),
|
|
2339
2353
|
layer: layer_ref,
|
|
2340
|
-
port_hints:
|
|
2341
|
-
pcb_component_id:
|
|
2342
|
-
pcb_port_id:
|
|
2343
|
-
is_covered_with_solder_mask:
|
|
2344
|
-
soldermask_margin:
|
|
2345
|
-
solderpaste_margin:
|
|
2354
|
+
port_hints: z112.array(z112.string()).optional(),
|
|
2355
|
+
pcb_component_id: z112.string().optional(),
|
|
2356
|
+
pcb_port_id: z112.string().optional(),
|
|
2357
|
+
is_covered_with_solder_mask: z112.boolean().optional(),
|
|
2358
|
+
soldermask_margin: z112.number().optional(),
|
|
2359
|
+
solderpaste_margin: z112.number().optional()
|
|
2346
2360
|
});
|
|
2347
|
-
var pcb_smtpad =
|
|
2361
|
+
var pcb_smtpad = z112.discriminatedUnion("shape", [
|
|
2348
2362
|
pcb_smtpad_circle,
|
|
2349
2363
|
pcb_smtpad_rect,
|
|
2350
2364
|
pcb_smtpad_rotated_rect,
|
|
@@ -2360,95 +2374,95 @@ expectTypesMatch(true);
|
|
|
2360
2374
|
expectTypesMatch(true);
|
|
2361
2375
|
|
|
2362
2376
|
// src/pcb/pcb_solder_paste.ts
|
|
2363
|
-
import { z as
|
|
2364
|
-
var pcb_solder_paste_circle =
|
|
2365
|
-
type:
|
|
2366
|
-
shape:
|
|
2377
|
+
import { z as z113 } from "zod";
|
|
2378
|
+
var pcb_solder_paste_circle = z113.object({
|
|
2379
|
+
type: z113.literal("pcb_solder_paste"),
|
|
2380
|
+
shape: z113.literal("circle"),
|
|
2367
2381
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2368
|
-
pcb_group_id:
|
|
2369
|
-
subcircuit_id:
|
|
2382
|
+
pcb_group_id: z113.string().optional(),
|
|
2383
|
+
subcircuit_id: z113.string().optional(),
|
|
2370
2384
|
x: distance,
|
|
2371
2385
|
y: distance,
|
|
2372
|
-
radius:
|
|
2386
|
+
radius: z113.number(),
|
|
2373
2387
|
layer: layer_ref,
|
|
2374
|
-
pcb_component_id:
|
|
2375
|
-
pcb_smtpad_id:
|
|
2388
|
+
pcb_component_id: z113.string().optional(),
|
|
2389
|
+
pcb_smtpad_id: z113.string().optional()
|
|
2376
2390
|
});
|
|
2377
|
-
var pcb_solder_paste_rect =
|
|
2378
|
-
type:
|
|
2379
|
-
shape:
|
|
2391
|
+
var pcb_solder_paste_rect = z113.object({
|
|
2392
|
+
type: z113.literal("pcb_solder_paste"),
|
|
2393
|
+
shape: z113.literal("rect"),
|
|
2380
2394
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2381
|
-
pcb_group_id:
|
|
2382
|
-
subcircuit_id:
|
|
2395
|
+
pcb_group_id: z113.string().optional(),
|
|
2396
|
+
subcircuit_id: z113.string().optional(),
|
|
2383
2397
|
x: distance,
|
|
2384
2398
|
y: distance,
|
|
2385
|
-
width:
|
|
2386
|
-
height:
|
|
2399
|
+
width: z113.number(),
|
|
2400
|
+
height: z113.number(),
|
|
2387
2401
|
layer: layer_ref,
|
|
2388
|
-
pcb_component_id:
|
|
2389
|
-
pcb_smtpad_id:
|
|
2402
|
+
pcb_component_id: z113.string().optional(),
|
|
2403
|
+
pcb_smtpad_id: z113.string().optional()
|
|
2390
2404
|
});
|
|
2391
|
-
var pcb_solder_paste_pill =
|
|
2392
|
-
type:
|
|
2393
|
-
shape:
|
|
2405
|
+
var pcb_solder_paste_pill = z113.object({
|
|
2406
|
+
type: z113.literal("pcb_solder_paste"),
|
|
2407
|
+
shape: z113.literal("pill"),
|
|
2394
2408
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2395
|
-
pcb_group_id:
|
|
2396
|
-
subcircuit_id:
|
|
2409
|
+
pcb_group_id: z113.string().optional(),
|
|
2410
|
+
subcircuit_id: z113.string().optional(),
|
|
2397
2411
|
x: distance,
|
|
2398
2412
|
y: distance,
|
|
2399
|
-
width:
|
|
2400
|
-
height:
|
|
2401
|
-
radius:
|
|
2413
|
+
width: z113.number(),
|
|
2414
|
+
height: z113.number(),
|
|
2415
|
+
radius: z113.number(),
|
|
2402
2416
|
layer: layer_ref,
|
|
2403
|
-
pcb_component_id:
|
|
2404
|
-
pcb_smtpad_id:
|
|
2417
|
+
pcb_component_id: z113.string().optional(),
|
|
2418
|
+
pcb_smtpad_id: z113.string().optional()
|
|
2405
2419
|
});
|
|
2406
|
-
var pcb_solder_paste_rotated_rect =
|
|
2407
|
-
type:
|
|
2408
|
-
shape:
|
|
2420
|
+
var pcb_solder_paste_rotated_rect = z113.object({
|
|
2421
|
+
type: z113.literal("pcb_solder_paste"),
|
|
2422
|
+
shape: z113.literal("rotated_rect"),
|
|
2409
2423
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2410
|
-
pcb_group_id:
|
|
2411
|
-
subcircuit_id:
|
|
2424
|
+
pcb_group_id: z113.string().optional(),
|
|
2425
|
+
subcircuit_id: z113.string().optional(),
|
|
2412
2426
|
x: distance,
|
|
2413
2427
|
y: distance,
|
|
2414
|
-
width:
|
|
2415
|
-
height:
|
|
2428
|
+
width: z113.number(),
|
|
2429
|
+
height: z113.number(),
|
|
2416
2430
|
ccw_rotation: distance,
|
|
2417
2431
|
layer: layer_ref,
|
|
2418
|
-
pcb_component_id:
|
|
2419
|
-
pcb_smtpad_id:
|
|
2432
|
+
pcb_component_id: z113.string().optional(),
|
|
2433
|
+
pcb_smtpad_id: z113.string().optional()
|
|
2420
2434
|
});
|
|
2421
|
-
var pcb_solder_paste_rotated_pill =
|
|
2422
|
-
type:
|
|
2423
|
-
shape:
|
|
2435
|
+
var pcb_solder_paste_rotated_pill = z113.object({
|
|
2436
|
+
type: z113.literal("pcb_solder_paste"),
|
|
2437
|
+
shape: z113.literal("rotated_pill"),
|
|
2424
2438
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2425
|
-
pcb_group_id:
|
|
2426
|
-
subcircuit_id:
|
|
2439
|
+
pcb_group_id: z113.string().optional(),
|
|
2440
|
+
subcircuit_id: z113.string().optional(),
|
|
2427
2441
|
x: distance,
|
|
2428
2442
|
y: distance,
|
|
2429
|
-
width:
|
|
2430
|
-
height:
|
|
2431
|
-
radius:
|
|
2443
|
+
width: z113.number(),
|
|
2444
|
+
height: z113.number(),
|
|
2445
|
+
radius: z113.number(),
|
|
2432
2446
|
ccw_rotation: rotation,
|
|
2433
2447
|
layer: layer_ref,
|
|
2434
|
-
pcb_component_id:
|
|
2435
|
-
pcb_smtpad_id:
|
|
2448
|
+
pcb_component_id: z113.string().optional(),
|
|
2449
|
+
pcb_smtpad_id: z113.string().optional()
|
|
2436
2450
|
});
|
|
2437
|
-
var pcb_solder_paste_oval =
|
|
2438
|
-
type:
|
|
2439
|
-
shape:
|
|
2451
|
+
var pcb_solder_paste_oval = z113.object({
|
|
2452
|
+
type: z113.literal("pcb_solder_paste"),
|
|
2453
|
+
shape: z113.literal("oval"),
|
|
2440
2454
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
2441
|
-
pcb_group_id:
|
|
2442
|
-
subcircuit_id:
|
|
2455
|
+
pcb_group_id: z113.string().optional(),
|
|
2456
|
+
subcircuit_id: z113.string().optional(),
|
|
2443
2457
|
x: distance,
|
|
2444
2458
|
y: distance,
|
|
2445
|
-
width:
|
|
2446
|
-
height:
|
|
2459
|
+
width: z113.number(),
|
|
2460
|
+
height: z113.number(),
|
|
2447
2461
|
layer: layer_ref,
|
|
2448
|
-
pcb_component_id:
|
|
2449
|
-
pcb_smtpad_id:
|
|
2462
|
+
pcb_component_id: z113.string().optional(),
|
|
2463
|
+
pcb_smtpad_id: z113.string().optional()
|
|
2450
2464
|
});
|
|
2451
|
-
var pcb_solder_paste =
|
|
2465
|
+
var pcb_solder_paste = z113.union([
|
|
2452
2466
|
pcb_solder_paste_circle,
|
|
2453
2467
|
pcb_solder_paste_rect,
|
|
2454
2468
|
pcb_solder_paste_pill,
|
|
@@ -2468,213 +2482,213 @@ expectTypesMatch(
|
|
|
2468
2482
|
expectTypesMatch(true);
|
|
2469
2483
|
|
|
2470
2484
|
// src/pcb/pcb_text.ts
|
|
2471
|
-
import { z as
|
|
2472
|
-
var pcb_text =
|
|
2473
|
-
type:
|
|
2485
|
+
import { z as z114 } from "zod";
|
|
2486
|
+
var pcb_text = z114.object({
|
|
2487
|
+
type: z114.literal("pcb_text"),
|
|
2474
2488
|
pcb_text_id: getZodPrefixedIdWithDefault("pcb_text"),
|
|
2475
|
-
pcb_group_id:
|
|
2476
|
-
subcircuit_id:
|
|
2477
|
-
text:
|
|
2489
|
+
pcb_group_id: z114.string().optional(),
|
|
2490
|
+
subcircuit_id: z114.string().optional(),
|
|
2491
|
+
text: z114.string(),
|
|
2478
2492
|
center: point,
|
|
2479
2493
|
layer: layer_ref,
|
|
2480
2494
|
width: length,
|
|
2481
2495
|
height: length,
|
|
2482
|
-
lines:
|
|
2496
|
+
lines: z114.number(),
|
|
2483
2497
|
// @ts-ignore
|
|
2484
|
-
align:
|
|
2498
|
+
align: z114.enum(["bottom-left"])
|
|
2485
2499
|
}).describe("Defines text on the PCB");
|
|
2486
2500
|
expectTypesMatch(true);
|
|
2487
2501
|
|
|
2488
2502
|
// src/pcb/pcb_trace.ts
|
|
2489
|
-
import { z as
|
|
2490
|
-
var pcb_trace_route_point_wire =
|
|
2491
|
-
route_type:
|
|
2503
|
+
import { z as z115 } from "zod";
|
|
2504
|
+
var pcb_trace_route_point_wire = z115.object({
|
|
2505
|
+
route_type: z115.literal("wire"),
|
|
2492
2506
|
x: distance,
|
|
2493
2507
|
y: distance,
|
|
2494
2508
|
width: distance,
|
|
2495
|
-
copper_pour_id:
|
|
2496
|
-
is_inside_copper_pour:
|
|
2497
|
-
start_pcb_port_id:
|
|
2498
|
-
end_pcb_port_id:
|
|
2509
|
+
copper_pour_id: z115.string().optional(),
|
|
2510
|
+
is_inside_copper_pour: z115.boolean().optional(),
|
|
2511
|
+
start_pcb_port_id: z115.string().optional(),
|
|
2512
|
+
end_pcb_port_id: z115.string().optional(),
|
|
2499
2513
|
layer: layer_ref
|
|
2500
2514
|
});
|
|
2501
|
-
var pcb_trace_route_point_via =
|
|
2502
|
-
route_type:
|
|
2515
|
+
var pcb_trace_route_point_via = z115.object({
|
|
2516
|
+
route_type: z115.literal("via"),
|
|
2503
2517
|
x: distance,
|
|
2504
2518
|
y: distance,
|
|
2505
|
-
copper_pour_id:
|
|
2506
|
-
is_inside_copper_pour:
|
|
2519
|
+
copper_pour_id: z115.string().optional(),
|
|
2520
|
+
is_inside_copper_pour: z115.boolean().optional(),
|
|
2507
2521
|
hole_diameter: distance.optional(),
|
|
2508
2522
|
outer_diameter: distance.optional(),
|
|
2509
2523
|
from_layer: layer_ref,
|
|
2510
2524
|
to_layer: layer_ref
|
|
2511
2525
|
});
|
|
2512
|
-
var pcb_trace_route_point_through_pad =
|
|
2513
|
-
route_type:
|
|
2526
|
+
var pcb_trace_route_point_through_pad = z115.object({
|
|
2527
|
+
route_type: z115.literal("through_pad"),
|
|
2514
2528
|
start: point,
|
|
2515
2529
|
end: point,
|
|
2516
2530
|
width: distance,
|
|
2517
2531
|
start_layer: layer_ref,
|
|
2518
2532
|
end_layer: layer_ref,
|
|
2519
|
-
pcb_smtpad_id:
|
|
2520
|
-
pcb_plated_hole_id:
|
|
2533
|
+
pcb_smtpad_id: z115.string().optional(),
|
|
2534
|
+
pcb_plated_hole_id: z115.string().optional()
|
|
2521
2535
|
});
|
|
2522
|
-
var pcb_trace_route_point =
|
|
2536
|
+
var pcb_trace_route_point = z115.union([
|
|
2523
2537
|
pcb_trace_route_point_wire,
|
|
2524
2538
|
pcb_trace_route_point_via,
|
|
2525
2539
|
pcb_trace_route_point_through_pad
|
|
2526
2540
|
]);
|
|
2527
|
-
var pcb_trace =
|
|
2528
|
-
type:
|
|
2529
|
-
source_trace_id:
|
|
2530
|
-
pcb_component_id:
|
|
2541
|
+
var pcb_trace = z115.object({
|
|
2542
|
+
type: z115.literal("pcb_trace"),
|
|
2543
|
+
source_trace_id: z115.string().optional(),
|
|
2544
|
+
pcb_component_id: z115.string().optional(),
|
|
2531
2545
|
pcb_trace_id: getZodPrefixedIdWithDefault("pcb_trace"),
|
|
2532
|
-
pcb_group_id:
|
|
2533
|
-
subcircuit_id:
|
|
2534
|
-
route_thickness_mode:
|
|
2535
|
-
route_order_index:
|
|
2536
|
-
should_round_corners:
|
|
2537
|
-
trace_length:
|
|
2538
|
-
highlight_color:
|
|
2539
|
-
route:
|
|
2546
|
+
pcb_group_id: z115.string().optional(),
|
|
2547
|
+
subcircuit_id: z115.string().optional(),
|
|
2548
|
+
route_thickness_mode: z115.enum(["constant", "interpolated"]).default("constant").optional(),
|
|
2549
|
+
route_order_index: z115.number().optional(),
|
|
2550
|
+
should_round_corners: z115.boolean().optional(),
|
|
2551
|
+
trace_length: z115.number().optional(),
|
|
2552
|
+
highlight_color: z115.string().optional(),
|
|
2553
|
+
route: z115.array(pcb_trace_route_point)
|
|
2540
2554
|
}).describe("Defines a trace on the PCB");
|
|
2541
2555
|
expectTypesMatch(true);
|
|
2542
2556
|
expectTypesMatch(true);
|
|
2543
2557
|
|
|
2544
2558
|
// src/pcb/pcb_trace_warning.ts
|
|
2545
|
-
import { z as
|
|
2546
|
-
var pcb_trace_warning =
|
|
2547
|
-
type:
|
|
2559
|
+
import { z as z116 } from "zod";
|
|
2560
|
+
var pcb_trace_warning = z116.object({
|
|
2561
|
+
type: z116.literal("pcb_trace_warning"),
|
|
2548
2562
|
pcb_trace_warning_id: getZodPrefixedIdWithDefault("pcb_trace_warning"),
|
|
2549
|
-
warning_type:
|
|
2550
|
-
message:
|
|
2563
|
+
warning_type: z116.literal("pcb_trace_warning").default("pcb_trace_warning"),
|
|
2564
|
+
message: z116.string(),
|
|
2551
2565
|
center: point.optional(),
|
|
2552
|
-
pcb_trace_id:
|
|
2553
|
-
source_trace_id:
|
|
2554
|
-
pcb_component_ids:
|
|
2555
|
-
pcb_port_ids:
|
|
2556
|
-
subcircuit_id:
|
|
2566
|
+
pcb_trace_id: z116.string(),
|
|
2567
|
+
source_trace_id: z116.string(),
|
|
2568
|
+
pcb_component_ids: z116.array(z116.string()),
|
|
2569
|
+
pcb_port_ids: z116.array(z116.string()),
|
|
2570
|
+
subcircuit_id: z116.string().optional()
|
|
2557
2571
|
}).describe("Defines a trace warning on the PCB");
|
|
2558
2572
|
expectTypesMatch(true);
|
|
2559
2573
|
|
|
2560
2574
|
// src/pcb/pcb_trace_too_long_warning.ts
|
|
2561
|
-
import { z as
|
|
2562
|
-
var pcb_trace_too_long_warning =
|
|
2563
|
-
type:
|
|
2575
|
+
import { z as z117 } from "zod";
|
|
2576
|
+
var pcb_trace_too_long_warning = z117.object({
|
|
2577
|
+
type: z117.literal("pcb_trace_too_long_warning"),
|
|
2564
2578
|
pcb_trace_too_long_warning_id: getZodPrefixedIdWithDefault(
|
|
2565
2579
|
"pcb_trace_too_long_warning"
|
|
2566
2580
|
),
|
|
2567
|
-
warning_type:
|
|
2568
|
-
message:
|
|
2569
|
-
pcb_trace_id:
|
|
2570
|
-
source_net_id:
|
|
2571
|
-
source_trace_id:
|
|
2581
|
+
warning_type: z117.literal("pcb_trace_too_long_warning").default("pcb_trace_too_long_warning"),
|
|
2582
|
+
message: z117.string(),
|
|
2583
|
+
pcb_trace_id: z117.string(),
|
|
2584
|
+
source_net_id: z117.string().optional(),
|
|
2585
|
+
source_trace_id: z117.string().optional(),
|
|
2572
2586
|
actual_trace_length: distance,
|
|
2573
2587
|
maximum_trace_length: distance,
|
|
2574
|
-
subcircuit_id:
|
|
2588
|
+
subcircuit_id: z117.string().optional()
|
|
2575
2589
|
}).describe(
|
|
2576
2590
|
"Warning emitted when a PCB trace is longer than its maximum allowed length"
|
|
2577
2591
|
);
|
|
2578
2592
|
expectTypesMatch(true);
|
|
2579
2593
|
|
|
2580
2594
|
// src/pcb/pcb_trace_too_many_vias_warning.ts
|
|
2581
|
-
import { z as
|
|
2582
|
-
var pcb_trace_too_many_vias_warning =
|
|
2583
|
-
type:
|
|
2595
|
+
import { z as z118 } from "zod";
|
|
2596
|
+
var pcb_trace_too_many_vias_warning = z118.object({
|
|
2597
|
+
type: z118.literal("pcb_trace_too_many_vias_warning"),
|
|
2584
2598
|
pcb_trace_too_many_vias_warning_id: getZodPrefixedIdWithDefault(
|
|
2585
2599
|
"pcb_trace_too_many_vias_warning"
|
|
2586
2600
|
),
|
|
2587
|
-
warning_type:
|
|
2588
|
-
message:
|
|
2589
|
-
pcb_trace_id:
|
|
2590
|
-
source_net_id:
|
|
2591
|
-
source_trace_id:
|
|
2592
|
-
actual_via_count:
|
|
2593
|
-
maximum_via_count:
|
|
2594
|
-
subcircuit_id:
|
|
2601
|
+
warning_type: z118.literal("pcb_trace_too_many_vias_warning").default("pcb_trace_too_many_vias_warning"),
|
|
2602
|
+
message: z118.string(),
|
|
2603
|
+
pcb_trace_id: z118.string(),
|
|
2604
|
+
source_net_id: z118.string().optional(),
|
|
2605
|
+
source_trace_id: z118.string().optional(),
|
|
2606
|
+
actual_via_count: z118.number().int().nonnegative(),
|
|
2607
|
+
maximum_via_count: z118.number().int().nonnegative(),
|
|
2608
|
+
subcircuit_id: z118.string().optional()
|
|
2595
2609
|
}).describe(
|
|
2596
2610
|
"Warning emitted when a PCB trace has more vias than its maximum allowed count"
|
|
2597
2611
|
);
|
|
2598
2612
|
expectTypesMatch(true);
|
|
2599
2613
|
|
|
2600
2614
|
// src/pcb/pcb_trace_error.ts
|
|
2601
|
-
import { z as
|
|
2615
|
+
import { z as z119 } from "zod";
|
|
2602
2616
|
var pcb_trace_error = base_circuit_json_error.extend({
|
|
2603
|
-
type:
|
|
2617
|
+
type: z119.literal("pcb_trace_error"),
|
|
2604
2618
|
pcb_trace_error_id: getZodPrefixedIdWithDefault("pcb_trace_error"),
|
|
2605
|
-
error_type:
|
|
2619
|
+
error_type: z119.literal("pcb_trace_error").default("pcb_trace_error"),
|
|
2606
2620
|
center: point.optional(),
|
|
2607
|
-
pcb_trace_id:
|
|
2608
|
-
source_trace_id:
|
|
2609
|
-
pcb_component_ids:
|
|
2610
|
-
pcb_port_ids:
|
|
2611
|
-
subcircuit_id:
|
|
2621
|
+
pcb_trace_id: z119.string(),
|
|
2622
|
+
source_trace_id: z119.string(),
|
|
2623
|
+
pcb_component_ids: z119.array(z119.string()),
|
|
2624
|
+
pcb_port_ids: z119.array(z119.string()),
|
|
2625
|
+
subcircuit_id: z119.string().optional()
|
|
2612
2626
|
}).describe("Defines a trace error on the PCB");
|
|
2613
2627
|
expectTypesMatch(true);
|
|
2614
2628
|
|
|
2615
2629
|
// src/pcb/pcb_trace_missing_error.ts
|
|
2616
|
-
import { z as
|
|
2630
|
+
import { z as z120 } from "zod";
|
|
2617
2631
|
var pcb_trace_missing_error = base_circuit_json_error.extend({
|
|
2618
|
-
type:
|
|
2632
|
+
type: z120.literal("pcb_trace_missing_error"),
|
|
2619
2633
|
pcb_trace_missing_error_id: getZodPrefixedIdWithDefault(
|
|
2620
2634
|
"pcb_trace_missing_error"
|
|
2621
2635
|
),
|
|
2622
|
-
error_type:
|
|
2636
|
+
error_type: z120.literal("pcb_trace_missing_error").default("pcb_trace_missing_error"),
|
|
2623
2637
|
center: point.optional(),
|
|
2624
|
-
source_trace_id:
|
|
2625
|
-
pcb_component_ids:
|
|
2626
|
-
pcb_port_ids:
|
|
2627
|
-
subcircuit_id:
|
|
2638
|
+
source_trace_id: z120.string(),
|
|
2639
|
+
pcb_component_ids: z120.array(z120.string()),
|
|
2640
|
+
pcb_port_ids: z120.array(z120.string()),
|
|
2641
|
+
subcircuit_id: z120.string().optional()
|
|
2628
2642
|
}).describe(
|
|
2629
2643
|
"Defines an error when a source trace has no corresponding PCB trace"
|
|
2630
2644
|
);
|
|
2631
2645
|
expectTypesMatch(true);
|
|
2632
2646
|
|
|
2633
2647
|
// src/pcb/pcb_port_not_matched_error.ts
|
|
2634
|
-
import { z as
|
|
2648
|
+
import { z as z121 } from "zod";
|
|
2635
2649
|
var pcb_port_not_matched_error = base_circuit_json_error.extend({
|
|
2636
|
-
type:
|
|
2650
|
+
type: z121.literal("pcb_port_not_matched_error"),
|
|
2637
2651
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
2638
|
-
error_type:
|
|
2639
|
-
pcb_component_ids:
|
|
2640
|
-
subcircuit_id:
|
|
2652
|
+
error_type: z121.literal("pcb_port_not_matched_error").default("pcb_port_not_matched_error"),
|
|
2653
|
+
pcb_component_ids: z121.array(z121.string()),
|
|
2654
|
+
subcircuit_id: z121.string().optional()
|
|
2641
2655
|
}).describe("Defines a trace error on the PCB where a port is not matched");
|
|
2642
2656
|
expectTypesMatch(true);
|
|
2643
2657
|
|
|
2644
2658
|
// src/pcb/pcb_port_not_connected_error.ts
|
|
2645
|
-
import { z as
|
|
2659
|
+
import { z as z122 } from "zod";
|
|
2646
2660
|
var pcb_port_not_connected_error = base_circuit_json_error.extend({
|
|
2647
|
-
type:
|
|
2661
|
+
type: z122.literal("pcb_port_not_connected_error"),
|
|
2648
2662
|
pcb_port_not_connected_error_id: getZodPrefixedIdWithDefault(
|
|
2649
2663
|
"pcb_port_not_connected_error"
|
|
2650
2664
|
),
|
|
2651
|
-
error_type:
|
|
2652
|
-
pcb_port_ids:
|
|
2653
|
-
pcb_component_ids:
|
|
2654
|
-
subcircuit_id:
|
|
2665
|
+
error_type: z122.literal("pcb_port_not_connected_error").default("pcb_port_not_connected_error"),
|
|
2666
|
+
pcb_port_ids: z122.array(z122.string()),
|
|
2667
|
+
pcb_component_ids: z122.array(z122.string()),
|
|
2668
|
+
subcircuit_id: z122.string().optional()
|
|
2655
2669
|
}).describe("Defines an error when a pcb port is not connected to any trace");
|
|
2656
2670
|
expectTypesMatch(
|
|
2657
2671
|
true
|
|
2658
2672
|
);
|
|
2659
2673
|
|
|
2660
2674
|
// src/pcb/pcb_net.ts
|
|
2661
|
-
import { z as
|
|
2662
|
-
var pcb_net =
|
|
2663
|
-
type:
|
|
2675
|
+
import { z as z123 } from "zod";
|
|
2676
|
+
var pcb_net = z123.object({
|
|
2677
|
+
type: z123.literal("pcb_net"),
|
|
2664
2678
|
pcb_net_id: getZodPrefixedIdWithDefault("pcb_net"),
|
|
2665
|
-
source_net_id:
|
|
2666
|
-
highlight_color:
|
|
2679
|
+
source_net_id: z123.string().optional(),
|
|
2680
|
+
highlight_color: z123.string().optional()
|
|
2667
2681
|
}).describe("Defines a net on the PCB");
|
|
2668
2682
|
expectTypesMatch(true);
|
|
2669
2683
|
|
|
2670
2684
|
// src/pcb/pcb_via.ts
|
|
2671
|
-
import { z as
|
|
2672
|
-
var pcb_via =
|
|
2673
|
-
type:
|
|
2685
|
+
import { z as z124 } from "zod";
|
|
2686
|
+
var pcb_via = z124.object({
|
|
2687
|
+
type: z124.literal("pcb_via"),
|
|
2674
2688
|
pcb_via_id: getZodPrefixedIdWithDefault("pcb_via"),
|
|
2675
|
-
pcb_group_id:
|
|
2676
|
-
subcircuit_id:
|
|
2677
|
-
subcircuit_connectivity_map_key:
|
|
2689
|
+
pcb_group_id: z124.string().optional(),
|
|
2690
|
+
subcircuit_id: z124.string().optional(),
|
|
2691
|
+
subcircuit_connectivity_map_key: z124.string().optional(),
|
|
2678
2692
|
x: distance,
|
|
2679
2693
|
y: distance,
|
|
2680
2694
|
outer_diameter: distance.default("0.6mm"),
|
|
@@ -2683,120 +2697,129 @@ var pcb_via = z123.object({
|
|
|
2683
2697
|
from_layer: layer_ref.optional(),
|
|
2684
2698
|
/** @deprecated */
|
|
2685
2699
|
to_layer: layer_ref.optional(),
|
|
2686
|
-
layers:
|
|
2687
|
-
pcb_trace_id:
|
|
2688
|
-
source_trace_id:
|
|
2689
|
-
source_net_id:
|
|
2690
|
-
net_is_assignable:
|
|
2691
|
-
net_assigned:
|
|
2692
|
-
|
|
2700
|
+
layers: z124.array(layer_ref),
|
|
2701
|
+
pcb_trace_id: z124.string().optional(),
|
|
2702
|
+
source_trace_id: z124.string().optional(),
|
|
2703
|
+
source_net_id: z124.string().min(1).optional(),
|
|
2704
|
+
net_is_assignable: z124.boolean().optional(),
|
|
2705
|
+
net_assigned: z124.boolean().optional(),
|
|
2706
|
+
/** @deprecated Use tented_on_top and tented_on_bottom instead. */
|
|
2707
|
+
is_tented: z124.boolean().optional(),
|
|
2708
|
+
tented_on_top: z124.boolean().optional(),
|
|
2709
|
+
tented_on_bottom: z124.boolean().optional()
|
|
2710
|
+
}).transform(({ is_tented, ...via }) => {
|
|
2711
|
+
if (is_tented !== void 0) {
|
|
2712
|
+
via.tented_on_top ??= is_tented;
|
|
2713
|
+
via.tented_on_bottom ??= is_tented;
|
|
2714
|
+
}
|
|
2715
|
+
return via;
|
|
2693
2716
|
}).describe("Defines a via on the PCB");
|
|
2694
2717
|
expectTypesMatch(true);
|
|
2695
2718
|
|
|
2696
2719
|
// src/pcb/pcb_board.ts
|
|
2697
|
-
import { z as
|
|
2698
|
-
var pcb_board =
|
|
2699
|
-
type:
|
|
2720
|
+
import { z as z125 } from "zod";
|
|
2721
|
+
var pcb_board = z125.object({
|
|
2722
|
+
type: z125.literal("pcb_board"),
|
|
2700
2723
|
pcb_board_id: getZodPrefixedIdWithDefault("pcb_board"),
|
|
2701
|
-
pcb_panel_id:
|
|
2702
|
-
carrier_pcb_board_id:
|
|
2703
|
-
is_subcircuit:
|
|
2704
|
-
subcircuit_id:
|
|
2705
|
-
is_mounted_to_carrier_board:
|
|
2706
|
-
is_via_in_pad_allowed:
|
|
2724
|
+
pcb_panel_id: z125.string().optional(),
|
|
2725
|
+
carrier_pcb_board_id: z125.string().optional(),
|
|
2726
|
+
is_subcircuit: z125.boolean().optional(),
|
|
2727
|
+
subcircuit_id: z125.string().optional(),
|
|
2728
|
+
is_mounted_to_carrier_board: z125.boolean().optional(),
|
|
2729
|
+
is_via_in_pad_allowed: z125.boolean().optional(),
|
|
2707
2730
|
width: length.optional(),
|
|
2708
2731
|
height: length.optional(),
|
|
2709
2732
|
center: point,
|
|
2710
|
-
display_offset_x:
|
|
2733
|
+
display_offset_x: z125.string().optional().describe(
|
|
2711
2734
|
"How to display the x offset for this board, usually corresponding with how the user specified it"
|
|
2712
2735
|
),
|
|
2713
|
-
display_offset_y:
|
|
2736
|
+
display_offset_y: z125.string().optional().describe(
|
|
2714
2737
|
"How to display the y offset for this board, usually corresponding with how the user specified it"
|
|
2715
2738
|
),
|
|
2716
2739
|
thickness: length.optional().default(1.4),
|
|
2717
|
-
num_layers:
|
|
2718
|
-
allow_blind_and_buried_vias:
|
|
2740
|
+
num_layers: z125.number().optional().default(4),
|
|
2741
|
+
allow_blind_and_buried_vias: z125.boolean().optional().describe(
|
|
2719
2742
|
"Whether autorouters may generate blind and buried vias. False restricts newly generated vias to the full board stack."
|
|
2720
2743
|
),
|
|
2721
|
-
outline:
|
|
2722
|
-
shape:
|
|
2723
|
-
material:
|
|
2724
|
-
solder_mask_color:
|
|
2725
|
-
silkscreen_color:
|
|
2744
|
+
outline: z125.array(point).optional(),
|
|
2745
|
+
shape: z125.enum(["rect", "polygon"]).optional(),
|
|
2746
|
+
material: z125.enum(["fr4", "fr1"]).default("fr4"),
|
|
2747
|
+
solder_mask_color: z125.string().optional(),
|
|
2748
|
+
silkscreen_color: z125.string().optional(),
|
|
2726
2749
|
anchor_position: point.optional(),
|
|
2727
2750
|
anchor_alignment: ninePointAnchor.optional(),
|
|
2728
|
-
position_mode:
|
|
2751
|
+
position_mode: z125.enum(["relative_to_panel_anchor", "none"]).optional()
|
|
2729
2752
|
}).merge(manufacturing_drc_properties).describe("Defines the board outline of the PCB");
|
|
2730
2753
|
expectTypesMatch(true);
|
|
2731
2754
|
|
|
2732
2755
|
// src/pcb/pcb_panel.ts
|
|
2733
|
-
import { z as
|
|
2734
|
-
var pcb_panel =
|
|
2735
|
-
type:
|
|
2756
|
+
import { z as z126 } from "zod";
|
|
2757
|
+
var pcb_panel = z126.object({
|
|
2758
|
+
type: z126.literal("pcb_panel"),
|
|
2736
2759
|
pcb_panel_id: getZodPrefixedIdWithDefault("pcb_panel"),
|
|
2737
2760
|
width: length,
|
|
2738
2761
|
height: length,
|
|
2739
2762
|
center: point,
|
|
2740
2763
|
thickness: length.optional().default(1.4),
|
|
2741
|
-
covered_with_solder_mask:
|
|
2764
|
+
covered_with_solder_mask: z126.boolean().optional().default(true)
|
|
2742
2765
|
}).describe("Defines a PCB panel that can contain multiple boards");
|
|
2743
2766
|
expectTypesMatch(true);
|
|
2744
2767
|
|
|
2745
2768
|
// src/pcb/pcb_placement_error.ts
|
|
2746
|
-
import { z as
|
|
2769
|
+
import { z as z127 } from "zod";
|
|
2747
2770
|
var pcb_placement_error = base_circuit_json_error.extend({
|
|
2748
|
-
type:
|
|
2771
|
+
type: z127.literal("pcb_placement_error"),
|
|
2749
2772
|
pcb_placement_error_id: getZodPrefixedIdWithDefault("pcb_placement_error"),
|
|
2750
|
-
error_type:
|
|
2751
|
-
subcircuit_id:
|
|
2773
|
+
error_type: z127.literal("pcb_placement_error").default("pcb_placement_error"),
|
|
2774
|
+
subcircuit_id: z127.string().optional()
|
|
2752
2775
|
}).describe("Defines a placement error on the PCB");
|
|
2753
2776
|
expectTypesMatch(true);
|
|
2754
2777
|
|
|
2755
2778
|
// src/pcb/pcb_packing_error.ts
|
|
2756
|
-
import { z as
|
|
2779
|
+
import { z as z128 } from "zod";
|
|
2757
2780
|
var pcb_packing_error = base_circuit_json_error.extend({
|
|
2758
|
-
type:
|
|
2781
|
+
type: z128.literal("pcb_packing_error"),
|
|
2759
2782
|
pcb_packing_error_id: getZodPrefixedIdWithDefault("pcb_packing_error"),
|
|
2760
|
-
error_type:
|
|
2761
|
-
pcb_group_id:
|
|
2762
|
-
subcircuit_id:
|
|
2783
|
+
error_type: z128.literal("pcb_packing_error").default("pcb_packing_error"),
|
|
2784
|
+
pcb_group_id: z128.string().optional(),
|
|
2785
|
+
subcircuit_id: z128.string().optional()
|
|
2763
2786
|
}).describe("Defines a failure to pack PCB components within layout bounds");
|
|
2764
2787
|
expectTypesMatch(true);
|
|
2765
2788
|
|
|
2766
2789
|
// src/pcb/pcb_panelization_placement_error.ts
|
|
2767
|
-
import { z as
|
|
2790
|
+
import { z as z129 } from "zod";
|
|
2768
2791
|
var pcb_panelization_placement_error = base_circuit_json_error.extend({
|
|
2769
|
-
type:
|
|
2792
|
+
type: z129.literal("pcb_panelization_placement_error"),
|
|
2770
2793
|
pcb_panelization_placement_error_id: getZodPrefixedIdWithDefault(
|
|
2771
2794
|
"pcb_panelization_placement_error"
|
|
2772
2795
|
),
|
|
2773
|
-
error_type:
|
|
2774
|
-
pcb_panel_id:
|
|
2775
|
-
pcb_board_id:
|
|
2776
|
-
subcircuit_id:
|
|
2796
|
+
error_type: z129.literal("pcb_panelization_placement_error").default("pcb_panelization_placement_error"),
|
|
2797
|
+
pcb_panel_id: z129.string().optional(),
|
|
2798
|
+
pcb_board_id: z129.string().optional(),
|
|
2799
|
+
subcircuit_id: z129.string().optional()
|
|
2777
2800
|
}).describe("Defines a panelization placement error on the PCB");
|
|
2778
2801
|
expectTypesMatch(true);
|
|
2779
2802
|
|
|
2780
2803
|
// src/pcb/pcb_trace_hint.ts
|
|
2781
|
-
import { z as
|
|
2782
|
-
var pcb_trace_hint =
|
|
2783
|
-
type:
|
|
2804
|
+
import { z as z130 } from "zod";
|
|
2805
|
+
var pcb_trace_hint = z130.object({
|
|
2806
|
+
type: z130.literal("pcb_trace_hint"),
|
|
2784
2807
|
pcb_trace_hint_id: getZodPrefixedIdWithDefault("pcb_trace_hint"),
|
|
2785
|
-
pcb_port_id:
|
|
2786
|
-
pcb_component_id:
|
|
2787
|
-
route:
|
|
2788
|
-
subcircuit_id:
|
|
2808
|
+
pcb_port_id: z130.string(),
|
|
2809
|
+
pcb_component_id: z130.string(),
|
|
2810
|
+
route: z130.array(route_hint_point),
|
|
2811
|
+
subcircuit_id: z130.string().optional()
|
|
2789
2812
|
}).describe("A hint that can be used during generation of a PCB trace");
|
|
2790
2813
|
expectTypesMatch(true);
|
|
2791
2814
|
|
|
2792
2815
|
// src/pcb/pcb_silkscreen_line.ts
|
|
2793
|
-
import { z as
|
|
2794
|
-
var pcb_silkscreen_line =
|
|
2795
|
-
type:
|
|
2816
|
+
import { z as z131 } from "zod";
|
|
2817
|
+
var pcb_silkscreen_line = z131.object({
|
|
2818
|
+
type: z131.literal("pcb_silkscreen_line"),
|
|
2796
2819
|
pcb_silkscreen_line_id: getZodPrefixedIdWithDefault("pcb_silkscreen_line"),
|
|
2797
|
-
pcb_component_id:
|
|
2798
|
-
pcb_group_id:
|
|
2799
|
-
subcircuit_id:
|
|
2820
|
+
pcb_component_id: z131.string(),
|
|
2821
|
+
pcb_group_id: z131.string().optional(),
|
|
2822
|
+
subcircuit_id: z131.string().optional(),
|
|
2800
2823
|
stroke_width: distance.default("0.1mm"),
|
|
2801
2824
|
x1: distance,
|
|
2802
2825
|
y1: distance,
|
|
@@ -2807,32 +2830,32 @@ var pcb_silkscreen_line = z130.object({
|
|
|
2807
2830
|
expectTypesMatch(true);
|
|
2808
2831
|
|
|
2809
2832
|
// src/pcb/pcb_silkscreen_path.ts
|
|
2810
|
-
import { z as
|
|
2811
|
-
var pcb_silkscreen_path =
|
|
2812
|
-
type:
|
|
2833
|
+
import { z as z132 } from "zod";
|
|
2834
|
+
var pcb_silkscreen_path = z132.object({
|
|
2835
|
+
type: z132.literal("pcb_silkscreen_path"),
|
|
2813
2836
|
pcb_silkscreen_path_id: getZodPrefixedIdWithDefault("pcb_silkscreen_path"),
|
|
2814
|
-
pcb_component_id:
|
|
2815
|
-
pcb_group_id:
|
|
2816
|
-
subcircuit_id:
|
|
2837
|
+
pcb_component_id: z132.string(),
|
|
2838
|
+
pcb_group_id: z132.string().optional(),
|
|
2839
|
+
subcircuit_id: z132.string().optional(),
|
|
2817
2840
|
layer: visible_layer,
|
|
2818
|
-
route:
|
|
2841
|
+
route: z132.array(point),
|
|
2819
2842
|
stroke_width: length
|
|
2820
2843
|
}).describe("Defines a silkscreen path on the PCB");
|
|
2821
2844
|
expectTypesMatch(true);
|
|
2822
2845
|
|
|
2823
2846
|
// src/pcb/pcb_silkscreen_text.ts
|
|
2824
|
-
import { z as
|
|
2825
|
-
var pcb_silkscreen_text =
|
|
2826
|
-
type:
|
|
2847
|
+
import { z as z133 } from "zod";
|
|
2848
|
+
var pcb_silkscreen_text = z133.object({
|
|
2849
|
+
type: z133.literal("pcb_silkscreen_text"),
|
|
2827
2850
|
pcb_silkscreen_text_id: getZodPrefixedIdWithDefault("pcb_silkscreen_text"),
|
|
2828
|
-
pcb_group_id:
|
|
2829
|
-
subcircuit_id:
|
|
2830
|
-
font:
|
|
2851
|
+
pcb_group_id: z133.string().optional(),
|
|
2852
|
+
subcircuit_id: z133.string().optional(),
|
|
2853
|
+
font: z133.literal("tscircuit2024").default("tscircuit2024"),
|
|
2831
2854
|
font_size: distance.default("0.2mm"),
|
|
2832
|
-
pcb_component_id:
|
|
2833
|
-
text:
|
|
2834
|
-
is_knockout:
|
|
2835
|
-
knockout_padding:
|
|
2855
|
+
pcb_component_id: z133.string(),
|
|
2856
|
+
text: z133.string(),
|
|
2857
|
+
is_knockout: z133.boolean().default(false).optional(),
|
|
2858
|
+
knockout_padding: z133.object({
|
|
2836
2859
|
left: length,
|
|
2837
2860
|
top: length,
|
|
2838
2861
|
bottom: length,
|
|
@@ -2843,27 +2866,27 @@ var pcb_silkscreen_text = z132.object({
|
|
|
2843
2866
|
bottom: "0.2mm",
|
|
2844
2867
|
right: "0.2mm"
|
|
2845
2868
|
}).optional(),
|
|
2846
|
-
ccw_rotation:
|
|
2869
|
+
ccw_rotation: z133.number().optional(),
|
|
2847
2870
|
layer: layer_ref,
|
|
2848
|
-
is_mirrored:
|
|
2871
|
+
is_mirrored: z133.boolean().default(false).optional(),
|
|
2849
2872
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2850
2873
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2851
2874
|
}).describe("Defines silkscreen text on the PCB");
|
|
2852
2875
|
expectTypesMatch(true);
|
|
2853
2876
|
|
|
2854
2877
|
// src/pcb/pcb_copper_text.ts
|
|
2855
|
-
import { z as
|
|
2856
|
-
var pcb_copper_text =
|
|
2857
|
-
type:
|
|
2878
|
+
import { z as z134 } from "zod";
|
|
2879
|
+
var pcb_copper_text = z134.object({
|
|
2880
|
+
type: z134.literal("pcb_copper_text"),
|
|
2858
2881
|
pcb_copper_text_id: getZodPrefixedIdWithDefault("pcb_copper_text"),
|
|
2859
|
-
pcb_group_id:
|
|
2860
|
-
subcircuit_id:
|
|
2861
|
-
font:
|
|
2882
|
+
pcb_group_id: z134.string().optional(),
|
|
2883
|
+
subcircuit_id: z134.string().optional(),
|
|
2884
|
+
font: z134.literal("tscircuit2024").default("tscircuit2024"),
|
|
2862
2885
|
font_size: distance.default("0.2mm"),
|
|
2863
|
-
pcb_component_id:
|
|
2864
|
-
text:
|
|
2865
|
-
is_knockout:
|
|
2866
|
-
knockout_padding:
|
|
2886
|
+
pcb_component_id: z134.string(),
|
|
2887
|
+
text: z134.string(),
|
|
2888
|
+
is_knockout: z134.boolean().default(false).optional(),
|
|
2889
|
+
knockout_padding: z134.object({
|
|
2867
2890
|
left: length,
|
|
2868
2891
|
top: length,
|
|
2869
2892
|
bottom: length,
|
|
@@ -2874,61 +2897,61 @@ var pcb_copper_text = z133.object({
|
|
|
2874
2897
|
bottom: "0.2mm",
|
|
2875
2898
|
right: "0.2mm"
|
|
2876
2899
|
}).optional(),
|
|
2877
|
-
ccw_rotation:
|
|
2900
|
+
ccw_rotation: z134.number().optional(),
|
|
2878
2901
|
layer: layer_ref,
|
|
2879
|
-
is_mirrored:
|
|
2902
|
+
is_mirrored: z134.boolean().default(false).optional(),
|
|
2880
2903
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2881
2904
|
anchor_alignment: ninePointAnchor.default("center")
|
|
2882
2905
|
}).describe("Defines copper text on the PCB");
|
|
2883
2906
|
expectTypesMatch(true);
|
|
2884
2907
|
|
|
2885
2908
|
// src/pcb/pcb_silkscreen_rect.ts
|
|
2886
|
-
import { z as
|
|
2887
|
-
var pcb_silkscreen_rect =
|
|
2888
|
-
type:
|
|
2909
|
+
import { z as z135 } from "zod";
|
|
2910
|
+
var pcb_silkscreen_rect = z135.object({
|
|
2911
|
+
type: z135.literal("pcb_silkscreen_rect"),
|
|
2889
2912
|
pcb_silkscreen_rect_id: getZodPrefixedIdWithDefault("pcb_silkscreen_rect"),
|
|
2890
|
-
pcb_component_id:
|
|
2891
|
-
pcb_group_id:
|
|
2892
|
-
subcircuit_id:
|
|
2913
|
+
pcb_component_id: z135.string(),
|
|
2914
|
+
pcb_group_id: z135.string().optional(),
|
|
2915
|
+
subcircuit_id: z135.string().optional(),
|
|
2893
2916
|
center: point,
|
|
2894
2917
|
width: length,
|
|
2895
2918
|
height: length,
|
|
2896
2919
|
layer: layer_ref,
|
|
2897
2920
|
stroke_width: length.default("1mm"),
|
|
2898
2921
|
corner_radius: length.optional(),
|
|
2899
|
-
is_filled:
|
|
2900
|
-
has_stroke:
|
|
2901
|
-
is_stroke_dashed:
|
|
2902
|
-
ccw_rotation:
|
|
2922
|
+
is_filled: z135.boolean().default(true).optional(),
|
|
2923
|
+
has_stroke: z135.boolean().optional(),
|
|
2924
|
+
is_stroke_dashed: z135.boolean().optional(),
|
|
2925
|
+
ccw_rotation: z135.number().optional()
|
|
2903
2926
|
}).describe("Defines a silkscreen rect on the PCB");
|
|
2904
2927
|
expectTypesMatch(true);
|
|
2905
2928
|
|
|
2906
2929
|
// src/pcb/pcb_silkscreen_circle.ts
|
|
2907
|
-
import { z as
|
|
2908
|
-
var pcb_silkscreen_circle =
|
|
2909
|
-
type:
|
|
2930
|
+
import { z as z136 } from "zod";
|
|
2931
|
+
var pcb_silkscreen_circle = z136.object({
|
|
2932
|
+
type: z136.literal("pcb_silkscreen_circle"),
|
|
2910
2933
|
pcb_silkscreen_circle_id: getZodPrefixedIdWithDefault(
|
|
2911
2934
|
"pcb_silkscreen_circle"
|
|
2912
2935
|
),
|
|
2913
|
-
pcb_component_id:
|
|
2914
|
-
pcb_group_id:
|
|
2915
|
-
subcircuit_id:
|
|
2936
|
+
pcb_component_id: z136.string(),
|
|
2937
|
+
pcb_group_id: z136.string().optional(),
|
|
2938
|
+
subcircuit_id: z136.string().optional(),
|
|
2916
2939
|
center: point,
|
|
2917
2940
|
radius: length,
|
|
2918
2941
|
layer: visible_layer,
|
|
2919
2942
|
stroke_width: length.default("1mm"),
|
|
2920
|
-
is_filled:
|
|
2943
|
+
is_filled: z136.boolean().optional()
|
|
2921
2944
|
}).describe("Defines a silkscreen circle on the PCB");
|
|
2922
2945
|
expectTypesMatch(true);
|
|
2923
2946
|
|
|
2924
2947
|
// src/pcb/pcb_silkscreen_oval.ts
|
|
2925
|
-
import { z as
|
|
2926
|
-
var pcb_silkscreen_oval =
|
|
2927
|
-
type:
|
|
2948
|
+
import { z as z137 } from "zod";
|
|
2949
|
+
var pcb_silkscreen_oval = z137.object({
|
|
2950
|
+
type: z137.literal("pcb_silkscreen_oval"),
|
|
2928
2951
|
pcb_silkscreen_oval_id: getZodPrefixedIdWithDefault("pcb_silkscreen_oval"),
|
|
2929
|
-
pcb_component_id:
|
|
2930
|
-
pcb_group_id:
|
|
2931
|
-
subcircuit_id:
|
|
2952
|
+
pcb_component_id: z137.string(),
|
|
2953
|
+
pcb_group_id: z137.string().optional(),
|
|
2954
|
+
subcircuit_id: z137.string().optional(),
|
|
2932
2955
|
center: point,
|
|
2933
2956
|
radius_x: distance,
|
|
2934
2957
|
radius_y: distance,
|
|
@@ -2938,265 +2961,265 @@ var pcb_silkscreen_oval = z136.object({
|
|
|
2938
2961
|
expectTypesMatch(true);
|
|
2939
2962
|
|
|
2940
2963
|
// src/pcb/pcb_silkscreen_graphic.ts
|
|
2941
|
-
import { z as
|
|
2942
|
-
var pcb_silkscreen_graphic_base =
|
|
2943
|
-
type:
|
|
2964
|
+
import { z as z138 } from "zod";
|
|
2965
|
+
var pcb_silkscreen_graphic_base = z138.object({
|
|
2966
|
+
type: z138.literal("pcb_silkscreen_graphic"),
|
|
2944
2967
|
pcb_silkscreen_graphic_id: getZodPrefixedIdWithDefault(
|
|
2945
2968
|
"pcb_silkscreen_graphic"
|
|
2946
2969
|
),
|
|
2947
|
-
pcb_component_id:
|
|
2948
|
-
pcb_group_id:
|
|
2949
|
-
subcircuit_id:
|
|
2970
|
+
pcb_component_id: z138.string(),
|
|
2971
|
+
pcb_group_id: z138.string().optional(),
|
|
2972
|
+
subcircuit_id: z138.string().optional(),
|
|
2950
2973
|
layer: visible_layer,
|
|
2951
2974
|
image_asset: asset.optional()
|
|
2952
2975
|
});
|
|
2953
2976
|
var pcb_silkscreen_graphic_brep = pcb_silkscreen_graphic_base.extend({
|
|
2954
|
-
shape:
|
|
2977
|
+
shape: z138.literal("brep"),
|
|
2955
2978
|
brep_shape
|
|
2956
2979
|
}).describe("Defines a BRep silkscreen graphic on the PCB");
|
|
2957
2980
|
expectTypesMatch(
|
|
2958
2981
|
true
|
|
2959
2982
|
);
|
|
2960
|
-
var pcb_silkscreen_graphic =
|
|
2983
|
+
var pcb_silkscreen_graphic = z138.discriminatedUnion("shape", [pcb_silkscreen_graphic_brep]).describe("Defines a silkscreen graphic on the PCB");
|
|
2961
2984
|
expectTypesMatch(true);
|
|
2962
2985
|
|
|
2963
2986
|
// src/pcb/pcb_silkscreen_pill.ts
|
|
2964
|
-
import { z as
|
|
2965
|
-
var pcb_silkscreen_pill =
|
|
2966
|
-
type:
|
|
2987
|
+
import { z as z139 } from "zod";
|
|
2988
|
+
var pcb_silkscreen_pill = z139.object({
|
|
2989
|
+
type: z139.literal("pcb_silkscreen_pill"),
|
|
2967
2990
|
pcb_silkscreen_pill_id: getZodPrefixedIdWithDefault("pcb_silkscreen_pill"),
|
|
2968
|
-
pcb_component_id:
|
|
2969
|
-
pcb_group_id:
|
|
2970
|
-
subcircuit_id:
|
|
2991
|
+
pcb_component_id: z139.string(),
|
|
2992
|
+
pcb_group_id: z139.string().optional(),
|
|
2993
|
+
subcircuit_id: z139.string().optional(),
|
|
2971
2994
|
center: point,
|
|
2972
2995
|
width: length,
|
|
2973
2996
|
height: length,
|
|
2974
2997
|
layer: layer_ref,
|
|
2975
|
-
ccw_rotation:
|
|
2998
|
+
ccw_rotation: z139.number().optional()
|
|
2976
2999
|
}).describe("Defines a silkscreen pill on the PCB");
|
|
2977
3000
|
expectTypesMatch(true);
|
|
2978
3001
|
|
|
2979
3002
|
// src/pcb/pcb_fabrication_note_text.ts
|
|
2980
|
-
import { z as
|
|
2981
|
-
var pcb_fabrication_note_text =
|
|
2982
|
-
type:
|
|
3003
|
+
import { z as z140 } from "zod";
|
|
3004
|
+
var pcb_fabrication_note_text = z140.object({
|
|
3005
|
+
type: z140.literal("pcb_fabrication_note_text"),
|
|
2983
3006
|
pcb_fabrication_note_text_id: getZodPrefixedIdWithDefault(
|
|
2984
3007
|
"pcb_fabrication_note_text"
|
|
2985
3008
|
),
|
|
2986
|
-
subcircuit_id:
|
|
2987
|
-
pcb_group_id:
|
|
2988
|
-
font:
|
|
3009
|
+
subcircuit_id: z140.string().optional(),
|
|
3010
|
+
pcb_group_id: z140.string().optional(),
|
|
3011
|
+
font: z140.literal("tscircuit2024").default("tscircuit2024"),
|
|
2989
3012
|
font_size: distance.default("1mm"),
|
|
2990
|
-
pcb_component_id:
|
|
2991
|
-
text:
|
|
2992
|
-
ccw_rotation:
|
|
3013
|
+
pcb_component_id: z140.string(),
|
|
3014
|
+
text: z140.string(),
|
|
3015
|
+
ccw_rotation: z140.number().optional(),
|
|
2993
3016
|
layer: visible_layer,
|
|
2994
3017
|
anchor_position: point.default({ x: 0, y: 0 }),
|
|
2995
|
-
anchor_alignment:
|
|
2996
|
-
color:
|
|
3018
|
+
anchor_alignment: z140.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3019
|
+
color: z140.string().optional()
|
|
2997
3020
|
}).describe(
|
|
2998
3021
|
"Defines a fabrication note in text on the PCB, useful for leaving notes for assemblers or fabricators"
|
|
2999
3022
|
);
|
|
3000
3023
|
expectTypesMatch(true);
|
|
3001
3024
|
|
|
3002
3025
|
// src/pcb/pcb_fabrication_note_path.ts
|
|
3003
|
-
import { z as
|
|
3004
|
-
var pcb_fabrication_note_path =
|
|
3005
|
-
type:
|
|
3026
|
+
import { z as z141 } from "zod";
|
|
3027
|
+
var pcb_fabrication_note_path = z141.object({
|
|
3028
|
+
type: z141.literal("pcb_fabrication_note_path"),
|
|
3006
3029
|
pcb_fabrication_note_path_id: getZodPrefixedIdWithDefault(
|
|
3007
3030
|
"pcb_fabrication_note_path"
|
|
3008
3031
|
),
|
|
3009
|
-
pcb_component_id:
|
|
3010
|
-
subcircuit_id:
|
|
3032
|
+
pcb_component_id: z141.string(),
|
|
3033
|
+
subcircuit_id: z141.string().optional(),
|
|
3011
3034
|
layer: layer_ref,
|
|
3012
|
-
route:
|
|
3035
|
+
route: z141.array(point),
|
|
3013
3036
|
stroke_width: length,
|
|
3014
|
-
color:
|
|
3037
|
+
color: z141.string().optional()
|
|
3015
3038
|
}).describe(
|
|
3016
3039
|
"Defines a fabrication path on the PCB for fabricators or assemblers"
|
|
3017
3040
|
);
|
|
3018
3041
|
expectTypesMatch(true);
|
|
3019
3042
|
|
|
3020
3043
|
// src/pcb/pcb_fabrication_note_rect.ts
|
|
3021
|
-
import { z as
|
|
3022
|
-
var pcb_fabrication_note_rect =
|
|
3023
|
-
type:
|
|
3044
|
+
import { z as z142 } from "zod";
|
|
3045
|
+
var pcb_fabrication_note_rect = z142.object({
|
|
3046
|
+
type: z142.literal("pcb_fabrication_note_rect"),
|
|
3024
3047
|
pcb_fabrication_note_rect_id: getZodPrefixedIdWithDefault(
|
|
3025
3048
|
"pcb_fabrication_note_rect"
|
|
3026
3049
|
),
|
|
3027
|
-
pcb_component_id:
|
|
3028
|
-
pcb_group_id:
|
|
3029
|
-
subcircuit_id:
|
|
3050
|
+
pcb_component_id: z142.string(),
|
|
3051
|
+
pcb_group_id: z142.string().optional(),
|
|
3052
|
+
subcircuit_id: z142.string().optional(),
|
|
3030
3053
|
center: point,
|
|
3031
3054
|
width: length,
|
|
3032
3055
|
height: length,
|
|
3033
3056
|
layer: visible_layer,
|
|
3034
3057
|
stroke_width: length.default("0.1mm"),
|
|
3035
3058
|
corner_radius: length.optional(),
|
|
3036
|
-
is_filled:
|
|
3037
|
-
has_stroke:
|
|
3038
|
-
is_stroke_dashed:
|
|
3039
|
-
color:
|
|
3059
|
+
is_filled: z142.boolean().optional(),
|
|
3060
|
+
has_stroke: z142.boolean().optional(),
|
|
3061
|
+
is_stroke_dashed: z142.boolean().optional(),
|
|
3062
|
+
color: z142.string().optional()
|
|
3040
3063
|
}).describe("Defines a fabrication note rectangle on the PCB");
|
|
3041
3064
|
expectTypesMatch(true);
|
|
3042
3065
|
|
|
3043
3066
|
// src/pcb/pcb_fabrication_note_dimension.ts
|
|
3044
|
-
import { z as
|
|
3045
|
-
var pcb_fabrication_note_dimension =
|
|
3046
|
-
type:
|
|
3067
|
+
import { z as z143 } from "zod";
|
|
3068
|
+
var pcb_fabrication_note_dimension = z143.object({
|
|
3069
|
+
type: z143.literal("pcb_fabrication_note_dimension"),
|
|
3047
3070
|
pcb_fabrication_note_dimension_id: getZodPrefixedIdWithDefault(
|
|
3048
3071
|
"pcb_fabrication_note_dimension"
|
|
3049
3072
|
),
|
|
3050
|
-
pcb_component_id:
|
|
3051
|
-
pcb_group_id:
|
|
3052
|
-
subcircuit_id:
|
|
3073
|
+
pcb_component_id: z143.string(),
|
|
3074
|
+
pcb_group_id: z143.string().optional(),
|
|
3075
|
+
subcircuit_id: z143.string().optional(),
|
|
3053
3076
|
layer: visible_layer,
|
|
3054
3077
|
from: point,
|
|
3055
3078
|
to: point,
|
|
3056
|
-
text:
|
|
3057
|
-
text_ccw_rotation:
|
|
3079
|
+
text: z143.string().optional(),
|
|
3080
|
+
text_ccw_rotation: z143.number().optional(),
|
|
3058
3081
|
offset: length.optional(),
|
|
3059
3082
|
offset_distance: length.optional(),
|
|
3060
|
-
offset_direction:
|
|
3061
|
-
x:
|
|
3062
|
-
y:
|
|
3083
|
+
offset_direction: z143.object({
|
|
3084
|
+
x: z143.number(),
|
|
3085
|
+
y: z143.number()
|
|
3063
3086
|
}).optional(),
|
|
3064
|
-
font:
|
|
3087
|
+
font: z143.literal("tscircuit2024").default("tscircuit2024"),
|
|
3065
3088
|
font_size: length.default("1mm"),
|
|
3066
|
-
color:
|
|
3089
|
+
color: z143.string().optional(),
|
|
3067
3090
|
arrow_size: length.default("1mm")
|
|
3068
3091
|
}).describe("Defines a measurement annotation within PCB fabrication notes");
|
|
3069
3092
|
expectTypesMatch(true);
|
|
3070
3093
|
|
|
3071
3094
|
// src/pcb/pcb_note_text.ts
|
|
3072
|
-
import { z as z143 } from "zod";
|
|
3073
|
-
var pcb_note_text = z143.object({
|
|
3074
|
-
type: z143.literal("pcb_note_text"),
|
|
3075
|
-
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
3076
|
-
pcb_component_id: z143.string().optional(),
|
|
3077
|
-
pcb_group_id: z143.string().optional(),
|
|
3078
|
-
subcircuit_id: z143.string().optional(),
|
|
3079
|
-
name: z143.string().optional(),
|
|
3080
|
-
font: z143.literal("tscircuit2024").default("tscircuit2024"),
|
|
3081
|
-
font_size: distance.default("1mm"),
|
|
3082
|
-
text: z143.string().optional(),
|
|
3083
|
-
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3084
|
-
anchor_alignment: z143.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3085
|
-
layer: visible_layer.default("top"),
|
|
3086
|
-
is_mirrored_from_top_view: z143.boolean().optional(),
|
|
3087
|
-
color: z143.string().optional()
|
|
3088
|
-
}).describe("Defines a documentation note in text on the PCB");
|
|
3089
|
-
expectTypesMatch(true);
|
|
3090
|
-
|
|
3091
|
-
// src/pcb/pcb_note_rect.ts
|
|
3092
3095
|
import { z as z144 } from "zod";
|
|
3093
|
-
var
|
|
3094
|
-
type: z144.literal("
|
|
3095
|
-
|
|
3096
|
+
var pcb_note_text = z144.object({
|
|
3097
|
+
type: z144.literal("pcb_note_text"),
|
|
3098
|
+
pcb_note_text_id: getZodPrefixedIdWithDefault("pcb_note_text"),
|
|
3096
3099
|
pcb_component_id: z144.string().optional(),
|
|
3097
3100
|
pcb_group_id: z144.string().optional(),
|
|
3098
3101
|
subcircuit_id: z144.string().optional(),
|
|
3099
3102
|
name: z144.string().optional(),
|
|
3103
|
+
font: z144.literal("tscircuit2024").default("tscircuit2024"),
|
|
3104
|
+
font_size: distance.default("1mm"),
|
|
3100
3105
|
text: z144.string().optional(),
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
height: length,
|
|
3106
|
+
anchor_position: point.default({ x: 0, y: 0 }),
|
|
3107
|
+
anchor_alignment: z144.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
3104
3108
|
layer: visible_layer.default("top"),
|
|
3105
|
-
|
|
3106
|
-
corner_radius: length.optional(),
|
|
3107
|
-
is_filled: z144.boolean().optional(),
|
|
3108
|
-
has_stroke: z144.boolean().optional(),
|
|
3109
|
-
is_stroke_dashed: z144.boolean().optional(),
|
|
3109
|
+
is_mirrored_from_top_view: z144.boolean().optional(),
|
|
3110
3110
|
color: z144.string().optional()
|
|
3111
|
-
}).describe("Defines a
|
|
3111
|
+
}).describe("Defines a documentation note in text on the PCB");
|
|
3112
3112
|
expectTypesMatch(true);
|
|
3113
3113
|
|
|
3114
|
-
// src/pcb/
|
|
3114
|
+
// src/pcb/pcb_note_rect.ts
|
|
3115
3115
|
import { z as z145 } from "zod";
|
|
3116
|
-
var
|
|
3117
|
-
type: z145.literal("
|
|
3118
|
-
|
|
3116
|
+
var pcb_note_rect = z145.object({
|
|
3117
|
+
type: z145.literal("pcb_note_rect"),
|
|
3118
|
+
pcb_note_rect_id: getZodPrefixedIdWithDefault("pcb_note_rect"),
|
|
3119
3119
|
pcb_component_id: z145.string().optional(),
|
|
3120
3120
|
pcb_group_id: z145.string().optional(),
|
|
3121
3121
|
subcircuit_id: z145.string().optional(),
|
|
3122
3122
|
name: z145.string().optional(),
|
|
3123
3123
|
text: z145.string().optional(),
|
|
3124
|
-
|
|
3124
|
+
center: point,
|
|
3125
|
+
width: length,
|
|
3126
|
+
height: length,
|
|
3125
3127
|
layer: visible_layer.default("top"),
|
|
3126
3128
|
stroke_width: length.default("0.1mm"),
|
|
3129
|
+
corner_radius: length.optional(),
|
|
3130
|
+
is_filled: z145.boolean().optional(),
|
|
3131
|
+
has_stroke: z145.boolean().optional(),
|
|
3132
|
+
is_stroke_dashed: z145.boolean().optional(),
|
|
3127
3133
|
color: z145.string().optional()
|
|
3128
|
-
}).describe("Defines a
|
|
3134
|
+
}).describe("Defines a rectangular documentation note on the PCB");
|
|
3129
3135
|
expectTypesMatch(true);
|
|
3130
3136
|
|
|
3131
|
-
// src/pcb/
|
|
3137
|
+
// src/pcb/pcb_note_path.ts
|
|
3132
3138
|
import { z as z146 } from "zod";
|
|
3133
|
-
var
|
|
3134
|
-
type: z146.literal("
|
|
3135
|
-
|
|
3139
|
+
var pcb_note_path = z146.object({
|
|
3140
|
+
type: z146.literal("pcb_note_path"),
|
|
3141
|
+
pcb_note_path_id: getZodPrefixedIdWithDefault("pcb_note_path"),
|
|
3136
3142
|
pcb_component_id: z146.string().optional(),
|
|
3137
3143
|
pcb_group_id: z146.string().optional(),
|
|
3138
3144
|
subcircuit_id: z146.string().optional(),
|
|
3139
3145
|
name: z146.string().optional(),
|
|
3140
3146
|
text: z146.string().optional(),
|
|
3147
|
+
route: z146.array(point),
|
|
3148
|
+
layer: visible_layer.default("top"),
|
|
3149
|
+
stroke_width: length.default("0.1mm"),
|
|
3150
|
+
color: z146.string().optional()
|
|
3151
|
+
}).describe("Defines a polyline documentation note on the PCB");
|
|
3152
|
+
expectTypesMatch(true);
|
|
3153
|
+
|
|
3154
|
+
// src/pcb/pcb_note_line.ts
|
|
3155
|
+
import { z as z147 } from "zod";
|
|
3156
|
+
var pcb_note_line = z147.object({
|
|
3157
|
+
type: z147.literal("pcb_note_line"),
|
|
3158
|
+
pcb_note_line_id: getZodPrefixedIdWithDefault("pcb_note_line"),
|
|
3159
|
+
pcb_component_id: z147.string().optional(),
|
|
3160
|
+
pcb_group_id: z147.string().optional(),
|
|
3161
|
+
subcircuit_id: z147.string().optional(),
|
|
3162
|
+
name: z147.string().optional(),
|
|
3163
|
+
text: z147.string().optional(),
|
|
3141
3164
|
x1: distance,
|
|
3142
3165
|
y1: distance,
|
|
3143
3166
|
x2: distance,
|
|
3144
3167
|
y2: distance,
|
|
3145
3168
|
layer: visible_layer.default("top"),
|
|
3146
3169
|
stroke_width: distance.default("0.1mm"),
|
|
3147
|
-
color:
|
|
3148
|
-
is_dashed:
|
|
3170
|
+
color: z147.string().optional(),
|
|
3171
|
+
is_dashed: z147.boolean().optional()
|
|
3149
3172
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
3150
3173
|
expectTypesMatch(true);
|
|
3151
3174
|
|
|
3152
3175
|
// src/pcb/pcb_note_dimension.ts
|
|
3153
|
-
import { z as
|
|
3154
|
-
var pcb_note_dimension =
|
|
3155
|
-
type:
|
|
3176
|
+
import { z as z148 } from "zod";
|
|
3177
|
+
var pcb_note_dimension = z148.object({
|
|
3178
|
+
type: z148.literal("pcb_note_dimension"),
|
|
3156
3179
|
pcb_note_dimension_id: getZodPrefixedIdWithDefault("pcb_note_dimension"),
|
|
3157
|
-
pcb_component_id:
|
|
3158
|
-
pcb_group_id:
|
|
3159
|
-
subcircuit_id:
|
|
3160
|
-
name:
|
|
3180
|
+
pcb_component_id: z148.string().optional(),
|
|
3181
|
+
pcb_group_id: z148.string().optional(),
|
|
3182
|
+
subcircuit_id: z148.string().optional(),
|
|
3183
|
+
name: z148.string().optional(),
|
|
3161
3184
|
from: point,
|
|
3162
3185
|
to: point,
|
|
3163
|
-
text:
|
|
3164
|
-
text_ccw_rotation:
|
|
3186
|
+
text: z148.string().optional(),
|
|
3187
|
+
text_ccw_rotation: z148.number().optional(),
|
|
3165
3188
|
offset_distance: length.optional(),
|
|
3166
|
-
offset_direction:
|
|
3167
|
-
x:
|
|
3168
|
-
y:
|
|
3189
|
+
offset_direction: z148.object({
|
|
3190
|
+
x: z148.number(),
|
|
3191
|
+
y: z148.number()
|
|
3169
3192
|
}).optional(),
|
|
3170
|
-
font:
|
|
3193
|
+
font: z148.literal("tscircuit2024").default("tscircuit2024"),
|
|
3171
3194
|
font_size: length.default("1mm"),
|
|
3172
3195
|
layer: visible_layer.default("top"),
|
|
3173
|
-
color:
|
|
3196
|
+
color: z148.string().optional(),
|
|
3174
3197
|
arrow_size: length.default("1mm")
|
|
3175
3198
|
}).describe("Defines a measurement annotation within PCB documentation notes");
|
|
3176
3199
|
expectTypesMatch(true);
|
|
3177
3200
|
|
|
3178
3201
|
// src/pcb/pcb_footprint_overlap_error.ts
|
|
3179
|
-
import { z as
|
|
3202
|
+
import { z as z149 } from "zod";
|
|
3180
3203
|
var pcb_footprint_overlap_error = base_circuit_json_error.extend({
|
|
3181
|
-
type:
|
|
3204
|
+
type: z149.literal("pcb_footprint_overlap_error"),
|
|
3182
3205
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3183
|
-
error_type:
|
|
3184
|
-
pcb_smtpad_ids:
|
|
3185
|
-
pcb_plated_hole_ids:
|
|
3186
|
-
pcb_hole_ids:
|
|
3187
|
-
pcb_keepout_ids:
|
|
3206
|
+
error_type: z149.literal("pcb_footprint_overlap_error").default("pcb_footprint_overlap_error"),
|
|
3207
|
+
pcb_smtpad_ids: z149.array(z149.string()).optional(),
|
|
3208
|
+
pcb_plated_hole_ids: z149.array(z149.string()).optional(),
|
|
3209
|
+
pcb_hole_ids: z149.array(z149.string()).optional(),
|
|
3210
|
+
pcb_keepout_ids: z149.array(z149.string()).optional()
|
|
3188
3211
|
}).describe("Error emitted when a pcb footprint overlaps with another element");
|
|
3189
3212
|
expectTypesMatch(
|
|
3190
3213
|
true
|
|
3191
3214
|
);
|
|
3192
3215
|
|
|
3193
3216
|
// src/pcb/pcb_courtyard_overlap_error.ts
|
|
3194
|
-
import { z as
|
|
3217
|
+
import { z as z150 } from "zod";
|
|
3195
3218
|
var pcb_courtyard_overlap_error = base_circuit_json_error.extend({
|
|
3196
|
-
type:
|
|
3219
|
+
type: z150.literal("pcb_courtyard_overlap_error"),
|
|
3197
3220
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3198
|
-
error_type:
|
|
3199
|
-
pcb_component_ids:
|
|
3221
|
+
error_type: z150.literal("pcb_courtyard_overlap_error").default("pcb_courtyard_overlap_error"),
|
|
3222
|
+
pcb_component_ids: z150.tuple([z150.string(), z150.string()])
|
|
3200
3223
|
}).describe(
|
|
3201
3224
|
"Error emitted when the courtyard (CrtYd) of one PCB component overlaps with the courtyard of another"
|
|
3202
3225
|
);
|
|
@@ -3205,65 +3228,65 @@ expectTypesMatch(
|
|
|
3205
3228
|
);
|
|
3206
3229
|
|
|
3207
3230
|
// src/pcb/pcb_keepout.ts
|
|
3208
|
-
import { z as
|
|
3209
|
-
var pcb_keepout_outline =
|
|
3210
|
-
type:
|
|
3211
|
-
shape:
|
|
3212
|
-
pcb_group_id:
|
|
3213
|
-
subcircuit_id:
|
|
3214
|
-
outline:
|
|
3231
|
+
import { z as z151 } from "zod";
|
|
3232
|
+
var pcb_keepout_outline = z151.object({
|
|
3233
|
+
type: z151.literal("pcb_keepout"),
|
|
3234
|
+
shape: z151.literal("outline"),
|
|
3235
|
+
pcb_group_id: z151.string().optional(),
|
|
3236
|
+
subcircuit_id: z151.string().optional(),
|
|
3237
|
+
outline: z151.array(point).min(2),
|
|
3215
3238
|
stroke_width: length,
|
|
3216
|
-
pcb_keepout_id:
|
|
3217
|
-
layers:
|
|
3218
|
-
description:
|
|
3219
|
-
excluded_pcb_component_ids:
|
|
3239
|
+
pcb_keepout_id: z151.string(),
|
|
3240
|
+
layers: z151.array(z151.string()),
|
|
3241
|
+
description: z151.string().optional(),
|
|
3242
|
+
excluded_pcb_component_ids: z151.array(z151.string()).optional()
|
|
3220
3243
|
});
|
|
3221
|
-
var pcb_keepout =
|
|
3222
|
-
type:
|
|
3223
|
-
shape:
|
|
3224
|
-
pcb_group_id:
|
|
3225
|
-
subcircuit_id:
|
|
3244
|
+
var pcb_keepout = z151.object({
|
|
3245
|
+
type: z151.literal("pcb_keepout"),
|
|
3246
|
+
shape: z151.literal("rect"),
|
|
3247
|
+
pcb_group_id: z151.string().optional(),
|
|
3248
|
+
subcircuit_id: z151.string().optional(),
|
|
3226
3249
|
center: point,
|
|
3227
3250
|
width: distance,
|
|
3228
3251
|
height: distance,
|
|
3229
|
-
pcb_keepout_id:
|
|
3230
|
-
layers:
|
|
3252
|
+
pcb_keepout_id: z151.string(),
|
|
3253
|
+
layers: z151.array(z151.string()),
|
|
3231
3254
|
// Specify layers where the keepout applies
|
|
3232
|
-
description:
|
|
3255
|
+
description: z151.string().optional(),
|
|
3233
3256
|
// Optional description of the keepout
|
|
3234
|
-
excluded_pcb_component_ids:
|
|
3257
|
+
excluded_pcb_component_ids: z151.array(z151.string()).optional()
|
|
3235
3258
|
}).or(
|
|
3236
|
-
|
|
3237
|
-
type:
|
|
3238
|
-
shape:
|
|
3239
|
-
pcb_group_id:
|
|
3240
|
-
subcircuit_id:
|
|
3259
|
+
z151.object({
|
|
3260
|
+
type: z151.literal("pcb_keepout"),
|
|
3261
|
+
shape: z151.literal("circle"),
|
|
3262
|
+
pcb_group_id: z151.string().optional(),
|
|
3263
|
+
subcircuit_id: z151.string().optional(),
|
|
3241
3264
|
center: point,
|
|
3242
3265
|
radius: distance,
|
|
3243
|
-
pcb_keepout_id:
|
|
3244
|
-
layers:
|
|
3266
|
+
pcb_keepout_id: z151.string(),
|
|
3267
|
+
layers: z151.array(z151.string()),
|
|
3245
3268
|
// Specify layers where the keepout applies
|
|
3246
|
-
description:
|
|
3269
|
+
description: z151.string().optional(),
|
|
3247
3270
|
// Optional description of the keepout
|
|
3248
|
-
excluded_pcb_component_ids:
|
|
3271
|
+
excluded_pcb_component_ids: z151.array(z151.string()).optional()
|
|
3249
3272
|
})
|
|
3250
3273
|
).or(pcb_keepout_outline);
|
|
3251
3274
|
expectTypesMatch(true);
|
|
3252
3275
|
expectTypesMatch(true);
|
|
3253
3276
|
|
|
3254
3277
|
// src/pcb/pcb_cutout.ts
|
|
3255
|
-
import { z as
|
|
3256
|
-
var pcb_cutout_base =
|
|
3257
|
-
type:
|
|
3278
|
+
import { z as z152 } from "zod";
|
|
3279
|
+
var pcb_cutout_base = z152.object({
|
|
3280
|
+
type: z152.literal("pcb_cutout"),
|
|
3258
3281
|
pcb_cutout_id: getZodPrefixedIdWithDefault("pcb_cutout"),
|
|
3259
|
-
pcb_component_id:
|
|
3260
|
-
pcb_group_id:
|
|
3261
|
-
subcircuit_id:
|
|
3262
|
-
pcb_board_id:
|
|
3263
|
-
pcb_panel_id:
|
|
3282
|
+
pcb_component_id: z152.string().optional(),
|
|
3283
|
+
pcb_group_id: z152.string().optional(),
|
|
3284
|
+
subcircuit_id: z152.string().optional(),
|
|
3285
|
+
pcb_board_id: z152.string().optional(),
|
|
3286
|
+
pcb_panel_id: z152.string().optional()
|
|
3264
3287
|
});
|
|
3265
3288
|
var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
3266
|
-
shape:
|
|
3289
|
+
shape: z152.literal("rect"),
|
|
3267
3290
|
center: point,
|
|
3268
3291
|
width: length,
|
|
3269
3292
|
height: length,
|
|
@@ -3272,26 +3295,26 @@ var pcb_cutout_rect = pcb_cutout_base.extend({
|
|
|
3272
3295
|
});
|
|
3273
3296
|
expectTypesMatch(true);
|
|
3274
3297
|
var pcb_cutout_circle = pcb_cutout_base.extend({
|
|
3275
|
-
shape:
|
|
3298
|
+
shape: z152.literal("circle"),
|
|
3276
3299
|
center: point,
|
|
3277
3300
|
radius: length
|
|
3278
3301
|
});
|
|
3279
3302
|
expectTypesMatch(true);
|
|
3280
3303
|
var pcb_cutout_polygon = pcb_cutout_base.extend({
|
|
3281
|
-
shape:
|
|
3282
|
-
points:
|
|
3304
|
+
shape: z152.literal("polygon"),
|
|
3305
|
+
points: z152.array(point)
|
|
3283
3306
|
});
|
|
3284
3307
|
expectTypesMatch(true);
|
|
3285
3308
|
var pcb_cutout_path = pcb_cutout_base.extend({
|
|
3286
|
-
shape:
|
|
3287
|
-
route:
|
|
3309
|
+
shape: z152.literal("path"),
|
|
3310
|
+
route: z152.array(point),
|
|
3288
3311
|
slot_width: length,
|
|
3289
3312
|
slot_length: length.optional(),
|
|
3290
3313
|
space_between_slots: length.optional(),
|
|
3291
3314
|
slot_corner_radius: length.optional()
|
|
3292
3315
|
});
|
|
3293
3316
|
expectTypesMatch(true);
|
|
3294
|
-
var pcb_cutout =
|
|
3317
|
+
var pcb_cutout = z152.discriminatedUnion("shape", [
|
|
3295
3318
|
pcb_cutout_rect,
|
|
3296
3319
|
pcb_cutout_circle,
|
|
3297
3320
|
pcb_cutout_polygon,
|
|
@@ -3300,184 +3323,184 @@ var pcb_cutout = z151.discriminatedUnion("shape", [
|
|
|
3300
3323
|
expectTypesMatch(true);
|
|
3301
3324
|
|
|
3302
3325
|
// src/pcb/pcb_missing_footprint_error.ts
|
|
3303
|
-
import { z as
|
|
3326
|
+
import { z as z153 } from "zod";
|
|
3304
3327
|
var pcb_missing_footprint_error = base_circuit_json_error.extend({
|
|
3305
|
-
type:
|
|
3328
|
+
type: z153.literal("pcb_missing_footprint_error"),
|
|
3306
3329
|
pcb_missing_footprint_error_id: getZodPrefixedIdWithDefault(
|
|
3307
3330
|
"pcb_missing_footprint_error"
|
|
3308
3331
|
),
|
|
3309
|
-
pcb_group_id:
|
|
3310
|
-
subcircuit_id:
|
|
3311
|
-
error_type:
|
|
3312
|
-
source_component_id:
|
|
3332
|
+
pcb_group_id: z153.string().optional(),
|
|
3333
|
+
subcircuit_id: z153.string().optional(),
|
|
3334
|
+
error_type: z153.literal("pcb_missing_footprint_error").default("pcb_missing_footprint_error"),
|
|
3335
|
+
source_component_id: z153.string()
|
|
3313
3336
|
}).describe("Defines a missing footprint error on the PCB");
|
|
3314
3337
|
expectTypesMatch(
|
|
3315
3338
|
true
|
|
3316
3339
|
);
|
|
3317
3340
|
|
|
3318
3341
|
// src/pcb/external_footprint_load_error.ts
|
|
3319
|
-
import { z as
|
|
3342
|
+
import { z as z154 } from "zod";
|
|
3320
3343
|
var external_footprint_load_error = base_circuit_json_error.extend({
|
|
3321
|
-
type:
|
|
3344
|
+
type: z154.literal("external_footprint_load_error"),
|
|
3322
3345
|
external_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3323
3346
|
"external_footprint_load_error"
|
|
3324
3347
|
),
|
|
3325
|
-
pcb_component_id:
|
|
3326
|
-
source_component_id:
|
|
3327
|
-
pcb_group_id:
|
|
3328
|
-
subcircuit_id:
|
|
3329
|
-
footprinter_string:
|
|
3330
|
-
error_type:
|
|
3348
|
+
pcb_component_id: z154.string(),
|
|
3349
|
+
source_component_id: z154.string(),
|
|
3350
|
+
pcb_group_id: z154.string().optional(),
|
|
3351
|
+
subcircuit_id: z154.string().optional(),
|
|
3352
|
+
footprinter_string: z154.string().optional(),
|
|
3353
|
+
error_type: z154.literal("external_footprint_load_error").default("external_footprint_load_error")
|
|
3331
3354
|
}).describe("Defines an error when an external footprint fails to load");
|
|
3332
3355
|
expectTypesMatch(true);
|
|
3333
3356
|
|
|
3334
3357
|
// src/pcb/circuit_json_footprint_load_error.ts
|
|
3335
|
-
import { z as
|
|
3358
|
+
import { z as z155 } from "zod";
|
|
3336
3359
|
var circuit_json_footprint_load_error = base_circuit_json_error.extend({
|
|
3337
|
-
type:
|
|
3360
|
+
type: z155.literal("circuit_json_footprint_load_error"),
|
|
3338
3361
|
circuit_json_footprint_load_error_id: getZodPrefixedIdWithDefault(
|
|
3339
3362
|
"circuit_json_footprint_load_error"
|
|
3340
3363
|
),
|
|
3341
|
-
pcb_component_id:
|
|
3342
|
-
source_component_id:
|
|
3343
|
-
pcb_group_id:
|
|
3344
|
-
subcircuit_id:
|
|
3345
|
-
error_type:
|
|
3346
|
-
circuit_json:
|
|
3364
|
+
pcb_component_id: z155.string(),
|
|
3365
|
+
source_component_id: z155.string(),
|
|
3366
|
+
pcb_group_id: z155.string().optional(),
|
|
3367
|
+
subcircuit_id: z155.string().optional(),
|
|
3368
|
+
error_type: z155.literal("circuit_json_footprint_load_error").default("circuit_json_footprint_load_error"),
|
|
3369
|
+
circuit_json: z155.array(z155.any()).optional()
|
|
3347
3370
|
}).describe("Defines an error when a circuit JSON footprint fails to load");
|
|
3348
3371
|
expectTypesMatch(true);
|
|
3349
3372
|
|
|
3350
3373
|
// src/pcb/pcb_group.ts
|
|
3351
|
-
import { z as
|
|
3352
|
-
var pcb_group =
|
|
3353
|
-
type:
|
|
3374
|
+
import { z as z156 } from "zod";
|
|
3375
|
+
var pcb_group = z156.object({
|
|
3376
|
+
type: z156.literal("pcb_group"),
|
|
3354
3377
|
pcb_group_id: getZodPrefixedIdWithDefault("pcb_group"),
|
|
3355
|
-
source_group_id:
|
|
3356
|
-
is_subcircuit:
|
|
3357
|
-
subcircuit_id:
|
|
3378
|
+
source_group_id: z156.string(),
|
|
3379
|
+
is_subcircuit: z156.boolean().optional(),
|
|
3380
|
+
subcircuit_id: z156.string().optional(),
|
|
3358
3381
|
width: length.optional(),
|
|
3359
3382
|
height: length.optional(),
|
|
3360
3383
|
center: point,
|
|
3361
|
-
display_offset_x:
|
|
3384
|
+
display_offset_x: z156.string().optional().describe(
|
|
3362
3385
|
"How to display the x offset for this group, usually corresponding with how the user specified it"
|
|
3363
3386
|
),
|
|
3364
|
-
display_offset_y:
|
|
3387
|
+
display_offset_y: z156.string().optional().describe(
|
|
3365
3388
|
"How to display the y offset for this group, usually corresponding with how the user specified it"
|
|
3366
3389
|
),
|
|
3367
|
-
outline:
|
|
3390
|
+
outline: z156.array(point).optional(),
|
|
3368
3391
|
anchor_position: point.optional(),
|
|
3369
3392
|
anchor_alignment: ninePointAnchor.default("center"),
|
|
3370
|
-
position_mode:
|
|
3371
|
-
positioned_relative_to_pcb_group_id:
|
|
3372
|
-
positioned_relative_to_pcb_board_id:
|
|
3373
|
-
pcb_component_ids:
|
|
3374
|
-
child_layout_mode:
|
|
3375
|
-
name:
|
|
3376
|
-
description:
|
|
3377
|
-
layout_mode:
|
|
3378
|
-
autorouter_configuration:
|
|
3393
|
+
position_mode: z156.enum(["packed", "relative_to_group_anchor", "none"]).optional(),
|
|
3394
|
+
positioned_relative_to_pcb_group_id: z156.string().optional(),
|
|
3395
|
+
positioned_relative_to_pcb_board_id: z156.string().optional(),
|
|
3396
|
+
pcb_component_ids: z156.array(z156.string()),
|
|
3397
|
+
child_layout_mode: z156.enum(["packed", "none"]).optional(),
|
|
3398
|
+
name: z156.string().optional(),
|
|
3399
|
+
description: z156.string().optional(),
|
|
3400
|
+
layout_mode: z156.string().optional(),
|
|
3401
|
+
autorouter_configuration: z156.object({
|
|
3379
3402
|
trace_clearance: length
|
|
3380
3403
|
}).optional(),
|
|
3381
|
-
autorouter_used_string:
|
|
3404
|
+
autorouter_used_string: z156.string().optional()
|
|
3382
3405
|
}).describe("Defines a group of components on the PCB");
|
|
3383
3406
|
expectTypesMatch(true);
|
|
3384
3407
|
|
|
3385
3408
|
// src/pcb/pcb_autorouting_error.ts
|
|
3386
|
-
import { z as
|
|
3409
|
+
import { z as z157 } from "zod";
|
|
3387
3410
|
var pcb_autorouting_error = base_circuit_json_error.extend({
|
|
3388
|
-
type:
|
|
3411
|
+
type: z157.literal("pcb_autorouting_error"),
|
|
3389
3412
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_autorouting_error"),
|
|
3390
|
-
error_type:
|
|
3391
|
-
subcircuit_id:
|
|
3413
|
+
error_type: z157.literal("pcb_autorouting_error").default("pcb_autorouting_error"),
|
|
3414
|
+
subcircuit_id: z157.string().optional()
|
|
3392
3415
|
}).describe("The autorouting has failed to route a portion of the board");
|
|
3393
3416
|
expectTypesMatch(true);
|
|
3394
3417
|
|
|
3395
3418
|
// src/pcb/pcb_manual_edit_conflict_warning.ts
|
|
3396
|
-
import { z as
|
|
3397
|
-
var pcb_manual_edit_conflict_warning =
|
|
3398
|
-
type:
|
|
3419
|
+
import { z as z158 } from "zod";
|
|
3420
|
+
var pcb_manual_edit_conflict_warning = z158.object({
|
|
3421
|
+
type: z158.literal("pcb_manual_edit_conflict_warning"),
|
|
3399
3422
|
pcb_manual_edit_conflict_warning_id: getZodPrefixedIdWithDefault(
|
|
3400
3423
|
"pcb_manual_edit_conflict_warning"
|
|
3401
3424
|
),
|
|
3402
|
-
warning_type:
|
|
3403
|
-
message:
|
|
3404
|
-
pcb_component_id:
|
|
3405
|
-
pcb_group_id:
|
|
3406
|
-
subcircuit_id:
|
|
3407
|
-
source_component_id:
|
|
3425
|
+
warning_type: z158.literal("pcb_manual_edit_conflict_warning").default("pcb_manual_edit_conflict_warning"),
|
|
3426
|
+
message: z158.string(),
|
|
3427
|
+
pcb_component_id: z158.string(),
|
|
3428
|
+
pcb_group_id: z158.string().optional(),
|
|
3429
|
+
subcircuit_id: z158.string().optional(),
|
|
3430
|
+
source_component_id: z158.string()
|
|
3408
3431
|
}).describe(
|
|
3409
3432
|
"Warning emitted when a component has both manual placement and explicit pcbX/pcbY coordinates"
|
|
3410
3433
|
);
|
|
3411
3434
|
expectTypesMatch(true);
|
|
3412
3435
|
|
|
3413
3436
|
// src/pcb/pcb_connector_not_in_accessible_orientation_warning.ts
|
|
3414
|
-
import { z as
|
|
3415
|
-
var connectorOrientationDirection =
|
|
3416
|
-
var pcb_connector_not_in_accessible_orientation_warning =
|
|
3417
|
-
type:
|
|
3437
|
+
import { z as z159 } from "zod";
|
|
3438
|
+
var connectorOrientationDirection = z159.enum(["x-", "x+", "y+", "y-"]);
|
|
3439
|
+
var pcb_connector_not_in_accessible_orientation_warning = z159.object({
|
|
3440
|
+
type: z159.literal("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3418
3441
|
pcb_connector_not_in_accessible_orientation_warning_id: getZodPrefixedIdWithDefault(
|
|
3419
3442
|
"pcb_connector_not_in_accessible_orientation_warning"
|
|
3420
3443
|
),
|
|
3421
|
-
warning_type:
|
|
3422
|
-
message:
|
|
3423
|
-
pcb_component_id:
|
|
3424
|
-
source_component_id:
|
|
3425
|
-
pcb_board_id:
|
|
3444
|
+
warning_type: z159.literal("pcb_connector_not_in_accessible_orientation_warning").default("pcb_connector_not_in_accessible_orientation_warning"),
|
|
3445
|
+
message: z159.string(),
|
|
3446
|
+
pcb_component_id: z159.string(),
|
|
3447
|
+
source_component_id: z159.string().optional(),
|
|
3448
|
+
pcb_board_id: z159.string().optional(),
|
|
3426
3449
|
facing_direction: connectorOrientationDirection,
|
|
3427
3450
|
recommended_facing_direction: connectorOrientationDirection,
|
|
3428
|
-
subcircuit_id:
|
|
3451
|
+
subcircuit_id: z159.string().optional()
|
|
3429
3452
|
}).describe(
|
|
3430
3453
|
"Warning emitted when a connector PCB component is facing inward toward the board and should be reoriented to an outward-facing direction"
|
|
3431
3454
|
);
|
|
3432
3455
|
expectTypesMatch(true);
|
|
3433
3456
|
|
|
3434
3457
|
// src/pcb/pcb_component_missing_courtyard_warning.ts
|
|
3435
|
-
import { z as
|
|
3436
|
-
var pcb_component_missing_courtyard_warning =
|
|
3437
|
-
type:
|
|
3458
|
+
import { z as z160 } from "zod";
|
|
3459
|
+
var pcb_component_missing_courtyard_warning = z160.object({
|
|
3460
|
+
type: z160.literal("pcb_component_missing_courtyard_warning"),
|
|
3438
3461
|
pcb_component_missing_courtyard_warning_id: getZodPrefixedIdWithDefault(
|
|
3439
3462
|
"pcb_component_missing_courtyard_warning"
|
|
3440
3463
|
),
|
|
3441
|
-
warning_type:
|
|
3442
|
-
message:
|
|
3443
|
-
pcb_component_id:
|
|
3444
|
-
source_component_id:
|
|
3445
|
-
subcircuit_id:
|
|
3464
|
+
warning_type: z160.literal("pcb_component_missing_courtyard_warning").default("pcb_component_missing_courtyard_warning"),
|
|
3465
|
+
message: z160.string(),
|
|
3466
|
+
pcb_component_id: z160.string(),
|
|
3467
|
+
source_component_id: z160.string().optional(),
|
|
3468
|
+
subcircuit_id: z160.string().optional()
|
|
3446
3469
|
}).describe("Warning emitted when a PCB component has no courtyard geometry");
|
|
3447
3470
|
expectTypesMatch(true);
|
|
3448
3471
|
|
|
3449
3472
|
// src/pcb/supplier_footprint_mismatch_warning.ts
|
|
3450
|
-
import { z as
|
|
3451
|
-
var supplier_footprint_mismatch_warning =
|
|
3452
|
-
type:
|
|
3473
|
+
import { z as z161 } from "zod";
|
|
3474
|
+
var supplier_footprint_mismatch_warning = z161.object({
|
|
3475
|
+
type: z161.literal("supplier_footprint_mismatch_warning"),
|
|
3453
3476
|
supplier_footprint_mismatch_warning_id: getZodPrefixedIdWithDefault(
|
|
3454
3477
|
"supplier_footprint_mismatch_warning"
|
|
3455
3478
|
),
|
|
3456
|
-
warning_type:
|
|
3457
|
-
message:
|
|
3458
|
-
source_component_id:
|
|
3459
|
-
pcb_component_id:
|
|
3460
|
-
pcb_group_id:
|
|
3461
|
-
subcircuit_id:
|
|
3479
|
+
warning_type: z161.literal("supplier_footprint_mismatch_warning").default("supplier_footprint_mismatch_warning"),
|
|
3480
|
+
message: z161.string(),
|
|
3481
|
+
source_component_id: z161.string(),
|
|
3482
|
+
pcb_component_id: z161.string().optional(),
|
|
3483
|
+
pcb_group_id: z161.string().optional(),
|
|
3484
|
+
subcircuit_id: z161.string().optional(),
|
|
3462
3485
|
supplier_name: supplier_name.optional(),
|
|
3463
|
-
supplier_part_number:
|
|
3464
|
-
supplier_footprint_url:
|
|
3465
|
-
footprint_copper_intersection_over_union:
|
|
3486
|
+
supplier_part_number: z161.string().optional(),
|
|
3487
|
+
supplier_footprint_url: z161.string().optional(),
|
|
3488
|
+
footprint_copper_intersection_over_union: z161.number()
|
|
3466
3489
|
}).describe(
|
|
3467
3490
|
"Warning emitted when a supplier part footprint does not match the expected footprint"
|
|
3468
3491
|
);
|
|
3469
3492
|
expectTypesMatch(true);
|
|
3470
3493
|
|
|
3471
3494
|
// src/pcb/pcb_breakout_point.ts
|
|
3472
|
-
import { z as
|
|
3473
|
-
var pcb_breakout_point =
|
|
3474
|
-
type:
|
|
3495
|
+
import { z as z162 } from "zod";
|
|
3496
|
+
var pcb_breakout_point = z162.object({
|
|
3497
|
+
type: z162.literal("pcb_breakout_point"),
|
|
3475
3498
|
pcb_breakout_point_id: getZodPrefixedIdWithDefault("pcb_breakout_point"),
|
|
3476
|
-
pcb_group_id:
|
|
3477
|
-
subcircuit_id:
|
|
3478
|
-
source_trace_id:
|
|
3479
|
-
source_port_id:
|
|
3480
|
-
source_net_id:
|
|
3499
|
+
pcb_group_id: z162.string(),
|
|
3500
|
+
subcircuit_id: z162.string().optional(),
|
|
3501
|
+
source_trace_id: z162.string().optional(),
|
|
3502
|
+
source_port_id: z162.string().optional(),
|
|
3503
|
+
source_net_id: z162.string().optional(),
|
|
3481
3504
|
layer: layer_ref.optional(),
|
|
3482
3505
|
x: distance,
|
|
3483
3506
|
y: distance
|
|
@@ -3487,61 +3510,61 @@ var pcb_breakout_point = z161.object({
|
|
|
3487
3510
|
expectTypesMatch(true);
|
|
3488
3511
|
|
|
3489
3512
|
// src/pcb/pcb_ground_plane.ts
|
|
3490
|
-
import { z as
|
|
3491
|
-
var pcb_ground_plane =
|
|
3492
|
-
type:
|
|
3513
|
+
import { z as z163 } from "zod";
|
|
3514
|
+
var pcb_ground_plane = z163.object({
|
|
3515
|
+
type: z163.literal("pcb_ground_plane"),
|
|
3493
3516
|
pcb_ground_plane_id: getZodPrefixedIdWithDefault("pcb_ground_plane"),
|
|
3494
|
-
source_pcb_ground_plane_id:
|
|
3495
|
-
source_net_id:
|
|
3496
|
-
pcb_group_id:
|
|
3497
|
-
subcircuit_id:
|
|
3517
|
+
source_pcb_ground_plane_id: z163.string(),
|
|
3518
|
+
source_net_id: z163.string(),
|
|
3519
|
+
pcb_group_id: z163.string().optional(),
|
|
3520
|
+
subcircuit_id: z163.string().optional()
|
|
3498
3521
|
}).describe("Defines a ground plane on the PCB");
|
|
3499
3522
|
expectTypesMatch(true);
|
|
3500
3523
|
|
|
3501
3524
|
// src/pcb/pcb_ground_plane_region.ts
|
|
3502
|
-
import { z as
|
|
3503
|
-
var pcb_ground_plane_region =
|
|
3504
|
-
type:
|
|
3525
|
+
import { z as z164 } from "zod";
|
|
3526
|
+
var pcb_ground_plane_region = z164.object({
|
|
3527
|
+
type: z164.literal("pcb_ground_plane_region"),
|
|
3505
3528
|
pcb_ground_plane_region_id: getZodPrefixedIdWithDefault(
|
|
3506
3529
|
"pcb_ground_plane_region"
|
|
3507
3530
|
),
|
|
3508
|
-
pcb_ground_plane_id:
|
|
3509
|
-
pcb_group_id:
|
|
3510
|
-
subcircuit_id:
|
|
3531
|
+
pcb_ground_plane_id: z164.string(),
|
|
3532
|
+
pcb_group_id: z164.string().optional(),
|
|
3533
|
+
subcircuit_id: z164.string().optional(),
|
|
3511
3534
|
layer: layer_ref,
|
|
3512
|
-
points:
|
|
3535
|
+
points: z164.array(point)
|
|
3513
3536
|
}).describe("Defines a polygon region of a ground plane");
|
|
3514
3537
|
expectTypesMatch(true);
|
|
3515
3538
|
|
|
3516
3539
|
// src/pcb/pcb_thermal_spoke.ts
|
|
3517
|
-
import { z as
|
|
3518
|
-
var pcb_thermal_spoke =
|
|
3519
|
-
type:
|
|
3540
|
+
import { z as z165 } from "zod";
|
|
3541
|
+
var pcb_thermal_spoke = z165.object({
|
|
3542
|
+
type: z165.literal("pcb_thermal_spoke"),
|
|
3520
3543
|
pcb_thermal_spoke_id: getZodPrefixedIdWithDefault("pcb_thermal_spoke"),
|
|
3521
|
-
pcb_ground_plane_id:
|
|
3522
|
-
shape:
|
|
3523
|
-
spoke_count:
|
|
3544
|
+
pcb_ground_plane_id: z165.string(),
|
|
3545
|
+
shape: z165.string(),
|
|
3546
|
+
spoke_count: z165.number(),
|
|
3524
3547
|
spoke_thickness: distance,
|
|
3525
3548
|
spoke_inner_diameter: distance,
|
|
3526
3549
|
spoke_outer_diameter: distance,
|
|
3527
|
-
pcb_plated_hole_id:
|
|
3528
|
-
subcircuit_id:
|
|
3550
|
+
pcb_plated_hole_id: z165.string().optional(),
|
|
3551
|
+
subcircuit_id: z165.string().optional()
|
|
3529
3552
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
3530
3553
|
expectTypesMatch(true);
|
|
3531
3554
|
|
|
3532
3555
|
// src/pcb/pcb_copper_pour.ts
|
|
3533
|
-
import { z as
|
|
3534
|
-
var pcb_copper_pour_base =
|
|
3535
|
-
type:
|
|
3556
|
+
import { z as z166 } from "zod";
|
|
3557
|
+
var pcb_copper_pour_base = z166.object({
|
|
3558
|
+
type: z166.literal("pcb_copper_pour"),
|
|
3536
3559
|
pcb_copper_pour_id: getZodPrefixedIdWithDefault("pcb_copper_pour"),
|
|
3537
|
-
pcb_group_id:
|
|
3538
|
-
subcircuit_id:
|
|
3560
|
+
pcb_group_id: z166.string().optional(),
|
|
3561
|
+
subcircuit_id: z166.string().optional(),
|
|
3539
3562
|
layer: layer_ref,
|
|
3540
|
-
source_net_id:
|
|
3541
|
-
covered_with_solder_mask:
|
|
3563
|
+
source_net_id: z166.string().optional(),
|
|
3564
|
+
covered_with_solder_mask: z166.boolean().optional().default(true)
|
|
3542
3565
|
});
|
|
3543
3566
|
var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
3544
|
-
shape:
|
|
3567
|
+
shape: z166.literal("rect"),
|
|
3545
3568
|
center: point,
|
|
3546
3569
|
width: length,
|
|
3547
3570
|
height: length,
|
|
@@ -3549,16 +3572,16 @@ var pcb_copper_pour_rect = pcb_copper_pour_base.extend({
|
|
|
3549
3572
|
});
|
|
3550
3573
|
expectTypesMatch(true);
|
|
3551
3574
|
var pcb_copper_pour_brep = pcb_copper_pour_base.extend({
|
|
3552
|
-
shape:
|
|
3575
|
+
shape: z166.literal("brep"),
|
|
3553
3576
|
brep_shape
|
|
3554
3577
|
});
|
|
3555
3578
|
expectTypesMatch(true);
|
|
3556
3579
|
var pcb_copper_pour_polygon = pcb_copper_pour_base.extend({
|
|
3557
|
-
shape:
|
|
3558
|
-
points:
|
|
3580
|
+
shape: z166.literal("polygon"),
|
|
3581
|
+
points: z166.array(point)
|
|
3559
3582
|
});
|
|
3560
3583
|
expectTypesMatch(true);
|
|
3561
|
-
var pcb_copper_pour =
|
|
3584
|
+
var pcb_copper_pour = z166.discriminatedUnion("shape", [
|
|
3562
3585
|
pcb_copper_pour_rect,
|
|
3563
3586
|
pcb_copper_pour_brep,
|
|
3564
3587
|
pcb_copper_pour_polygon
|
|
@@ -3566,99 +3589,99 @@ var pcb_copper_pour = z165.discriminatedUnion("shape", [
|
|
|
3566
3589
|
expectTypesMatch(true);
|
|
3567
3590
|
|
|
3568
3591
|
// src/pcb/pcb_component_outside_board_error.ts
|
|
3569
|
-
import { z as
|
|
3592
|
+
import { z as z167 } from "zod";
|
|
3570
3593
|
var pcb_component_outside_board_error = base_circuit_json_error.extend({
|
|
3571
|
-
type:
|
|
3594
|
+
type: z167.literal("pcb_component_outside_board_error"),
|
|
3572
3595
|
pcb_component_outside_board_error_id: getZodPrefixedIdWithDefault(
|
|
3573
3596
|
"pcb_component_outside_board_error"
|
|
3574
3597
|
),
|
|
3575
|
-
error_type:
|
|
3576
|
-
pcb_component_id:
|
|
3577
|
-
pcb_board_id:
|
|
3598
|
+
error_type: z167.literal("pcb_component_outside_board_error").default("pcb_component_outside_board_error"),
|
|
3599
|
+
pcb_component_id: z167.string(),
|
|
3600
|
+
pcb_board_id: z167.string(),
|
|
3578
3601
|
component_center: point,
|
|
3579
|
-
component_bounds:
|
|
3580
|
-
min_x:
|
|
3581
|
-
max_x:
|
|
3582
|
-
min_y:
|
|
3583
|
-
max_y:
|
|
3602
|
+
component_bounds: z167.object({
|
|
3603
|
+
min_x: z167.number(),
|
|
3604
|
+
max_x: z167.number(),
|
|
3605
|
+
min_y: z167.number(),
|
|
3606
|
+
max_y: z167.number()
|
|
3584
3607
|
}),
|
|
3585
|
-
subcircuit_id:
|
|
3586
|
-
source_component_id:
|
|
3608
|
+
subcircuit_id: z167.string().optional(),
|
|
3609
|
+
source_component_id: z167.string().optional()
|
|
3587
3610
|
}).describe(
|
|
3588
3611
|
"Error emitted when a PCB component is placed outside the board boundaries"
|
|
3589
3612
|
);
|
|
3590
3613
|
expectTypesMatch(true);
|
|
3591
3614
|
|
|
3592
3615
|
// src/pcb/pcb_component_not_on_board_edge_error.ts
|
|
3593
|
-
import { z as
|
|
3616
|
+
import { z as z168 } from "zod";
|
|
3594
3617
|
var pcb_component_not_on_board_edge_error = base_circuit_json_error.extend({
|
|
3595
|
-
type:
|
|
3618
|
+
type: z168.literal("pcb_component_not_on_board_edge_error"),
|
|
3596
3619
|
pcb_component_not_on_board_edge_error_id: getZodPrefixedIdWithDefault(
|
|
3597
3620
|
"pcb_component_not_on_board_edge_error"
|
|
3598
3621
|
),
|
|
3599
|
-
error_type:
|
|
3600
|
-
pcb_component_id:
|
|
3601
|
-
pcb_board_id:
|
|
3622
|
+
error_type: z168.literal("pcb_component_not_on_board_edge_error").default("pcb_component_not_on_board_edge_error"),
|
|
3623
|
+
pcb_component_id: z168.string(),
|
|
3624
|
+
pcb_board_id: z168.string(),
|
|
3602
3625
|
component_center: point,
|
|
3603
|
-
pad_to_nearest_board_edge_distance:
|
|
3604
|
-
source_component_id:
|
|
3605
|
-
subcircuit_id:
|
|
3626
|
+
pad_to_nearest_board_edge_distance: z168.number(),
|
|
3627
|
+
source_component_id: z168.string().optional(),
|
|
3628
|
+
subcircuit_id: z168.string().optional()
|
|
3606
3629
|
}).describe(
|
|
3607
3630
|
"Error emitted when a component that must be placed on the board edge is centered away from the edge"
|
|
3608
3631
|
);
|
|
3609
3632
|
expectTypesMatch(true);
|
|
3610
3633
|
|
|
3611
3634
|
// src/pcb/pcb_component_invalid_layer_error.ts
|
|
3612
|
-
import { z as
|
|
3635
|
+
import { z as z169 } from "zod";
|
|
3613
3636
|
var pcb_component_invalid_layer_error = base_circuit_json_error.extend({
|
|
3614
|
-
type:
|
|
3637
|
+
type: z169.literal("pcb_component_invalid_layer_error"),
|
|
3615
3638
|
pcb_component_invalid_layer_error_id: getZodPrefixedIdWithDefault(
|
|
3616
3639
|
"pcb_component_invalid_layer_error"
|
|
3617
3640
|
),
|
|
3618
|
-
error_type:
|
|
3619
|
-
pcb_component_id:
|
|
3620
|
-
source_component_id:
|
|
3641
|
+
error_type: z169.literal("pcb_component_invalid_layer_error").default("pcb_component_invalid_layer_error"),
|
|
3642
|
+
pcb_component_id: z169.string().optional(),
|
|
3643
|
+
source_component_id: z169.string(),
|
|
3621
3644
|
layer: layer_ref,
|
|
3622
|
-
subcircuit_id:
|
|
3645
|
+
subcircuit_id: z169.string().optional()
|
|
3623
3646
|
}).describe(
|
|
3624
3647
|
"Error emitted when a component is placed on an invalid layer (components can only be on 'top' or 'bottom' layers)"
|
|
3625
3648
|
);
|
|
3626
3649
|
expectTypesMatch(true);
|
|
3627
3650
|
|
|
3628
3651
|
// src/pcb/pcb_via_clearance_error.ts
|
|
3629
|
-
import { z as
|
|
3652
|
+
import { z as z170 } from "zod";
|
|
3630
3653
|
var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
3631
|
-
type:
|
|
3654
|
+
type: z170.literal("pcb_via_clearance_error"),
|
|
3632
3655
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
3633
|
-
error_type:
|
|
3634
|
-
pcb_via_ids:
|
|
3656
|
+
error_type: z170.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
3657
|
+
pcb_via_ids: z170.array(z170.string()).min(2),
|
|
3635
3658
|
minimum_clearance: distance.optional(),
|
|
3636
3659
|
actual_clearance: distance.optional(),
|
|
3637
|
-
pcb_center:
|
|
3638
|
-
x:
|
|
3639
|
-
y:
|
|
3660
|
+
pcb_center: z170.object({
|
|
3661
|
+
x: z170.number().optional(),
|
|
3662
|
+
y: z170.number().optional()
|
|
3640
3663
|
}).optional(),
|
|
3641
|
-
subcircuit_id:
|
|
3664
|
+
subcircuit_id: z170.string().optional()
|
|
3642
3665
|
}).describe("Error emitted when vias are closer than the allowed clearance");
|
|
3643
3666
|
expectTypesMatch(true);
|
|
3644
3667
|
|
|
3645
3668
|
// src/pcb/pcb_via_trace_clearance_error.ts
|
|
3646
|
-
import { z as
|
|
3669
|
+
import { z as z171 } from "zod";
|
|
3647
3670
|
var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
3648
|
-
type:
|
|
3671
|
+
type: z171.literal("pcb_via_trace_clearance_error"),
|
|
3649
3672
|
pcb_via_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3650
3673
|
"pcb_via_trace_clearance_error"
|
|
3651
3674
|
),
|
|
3652
|
-
error_type:
|
|
3653
|
-
pcb_via_id:
|
|
3654
|
-
pcb_trace_id:
|
|
3675
|
+
error_type: z171.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
3676
|
+
pcb_via_id: z171.string(),
|
|
3677
|
+
pcb_trace_id: z171.string(),
|
|
3655
3678
|
minimum_clearance: distance.optional(),
|
|
3656
3679
|
actual_clearance: distance.optional(),
|
|
3657
|
-
center:
|
|
3658
|
-
x:
|
|
3659
|
-
y:
|
|
3680
|
+
center: z171.object({
|
|
3681
|
+
x: z171.number().optional(),
|
|
3682
|
+
y: z171.number().optional()
|
|
3660
3683
|
}).optional(),
|
|
3661
|
-
subcircuit_id:
|
|
3684
|
+
subcircuit_id: z171.string().optional()
|
|
3662
3685
|
}).describe(
|
|
3663
3686
|
"Error emitted when a via and trace are closer than the allowed clearance"
|
|
3664
3687
|
);
|
|
@@ -3667,41 +3690,41 @@ expectTypesMatch(
|
|
|
3667
3690
|
);
|
|
3668
3691
|
|
|
3669
3692
|
// src/pcb/pcb_pad_pad_clearance_error.ts
|
|
3670
|
-
import { z as
|
|
3693
|
+
import { z as z172 } from "zod";
|
|
3671
3694
|
var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
3672
|
-
type:
|
|
3695
|
+
type: z172.literal("pcb_pad_pad_clearance_error"),
|
|
3673
3696
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3674
3697
|
"pcb_pad_pad_clearance_error"
|
|
3675
3698
|
),
|
|
3676
|
-
error_type:
|
|
3677
|
-
pcb_pad_ids:
|
|
3699
|
+
error_type: z172.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
3700
|
+
pcb_pad_ids: z172.array(z172.string()).min(2),
|
|
3678
3701
|
minimum_clearance: distance.optional(),
|
|
3679
3702
|
actual_clearance: distance.optional(),
|
|
3680
|
-
center:
|
|
3681
|
-
x:
|
|
3682
|
-
y:
|
|
3703
|
+
center: z172.object({
|
|
3704
|
+
x: z172.number().optional(),
|
|
3705
|
+
y: z172.number().optional()
|
|
3683
3706
|
}).optional(),
|
|
3684
|
-
subcircuit_id:
|
|
3707
|
+
subcircuit_id: z172.string().optional()
|
|
3685
3708
|
}).describe("Error emitted when pads are closer than the allowed clearance");
|
|
3686
3709
|
expectTypesMatch(true);
|
|
3687
3710
|
|
|
3688
3711
|
// src/pcb/pcb_pad_trace_clearance_error.ts
|
|
3689
|
-
import { z as
|
|
3712
|
+
import { z as z173 } from "zod";
|
|
3690
3713
|
var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
3691
|
-
type:
|
|
3714
|
+
type: z173.literal("pcb_pad_trace_clearance_error"),
|
|
3692
3715
|
pcb_pad_trace_clearance_error_id: getZodPrefixedIdWithDefault(
|
|
3693
3716
|
"pcb_pad_trace_clearance_error"
|
|
3694
3717
|
),
|
|
3695
|
-
error_type:
|
|
3696
|
-
pcb_pad_id:
|
|
3697
|
-
pcb_trace_id:
|
|
3718
|
+
error_type: z173.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
3719
|
+
pcb_pad_id: z173.string(),
|
|
3720
|
+
pcb_trace_id: z173.string(),
|
|
3698
3721
|
minimum_clearance: distance.optional(),
|
|
3699
3722
|
actual_clearance: distance.optional(),
|
|
3700
|
-
center:
|
|
3701
|
-
x:
|
|
3702
|
-
y:
|
|
3723
|
+
center: z173.object({
|
|
3724
|
+
x: z173.number().optional(),
|
|
3725
|
+
y: z173.number().optional()
|
|
3703
3726
|
}).optional(),
|
|
3704
|
-
subcircuit_id:
|
|
3727
|
+
subcircuit_id: z173.string().optional()
|
|
3705
3728
|
}).describe(
|
|
3706
3729
|
"Error emitted when a pad and trace are closer than allowed clearance"
|
|
3707
3730
|
);
|
|
@@ -3710,89 +3733,89 @@ expectTypesMatch(
|
|
|
3710
3733
|
);
|
|
3711
3734
|
|
|
3712
3735
|
// src/pcb/pcb_courtyard_rect.ts
|
|
3713
|
-
import { z as
|
|
3714
|
-
var pcb_courtyard_rect =
|
|
3715
|
-
type:
|
|
3736
|
+
import { z as z174 } from "zod";
|
|
3737
|
+
var pcb_courtyard_rect = z174.object({
|
|
3738
|
+
type: z174.literal("pcb_courtyard_rect"),
|
|
3716
3739
|
pcb_courtyard_rect_id: getZodPrefixedIdWithDefault("pcb_courtyard_rect"),
|
|
3717
|
-
pcb_component_id:
|
|
3718
|
-
pcb_group_id:
|
|
3719
|
-
subcircuit_id:
|
|
3740
|
+
pcb_component_id: z174.string(),
|
|
3741
|
+
pcb_group_id: z174.string().optional(),
|
|
3742
|
+
subcircuit_id: z174.string().optional(),
|
|
3720
3743
|
center: point,
|
|
3721
3744
|
width: length,
|
|
3722
3745
|
height: length,
|
|
3723
3746
|
layer: visible_layer,
|
|
3724
3747
|
ccw_rotation: rotation.optional(),
|
|
3725
|
-
color:
|
|
3748
|
+
color: z174.string().optional()
|
|
3726
3749
|
}).describe("Defines a courtyard rectangle on the PCB");
|
|
3727
3750
|
expectTypesMatch(true);
|
|
3728
3751
|
|
|
3729
3752
|
// src/pcb/pcb_courtyard_outline.ts
|
|
3730
|
-
import { z as
|
|
3731
|
-
var pcb_courtyard_outline =
|
|
3732
|
-
type:
|
|
3753
|
+
import { z as z175 } from "zod";
|
|
3754
|
+
var pcb_courtyard_outline = z175.object({
|
|
3755
|
+
type: z175.literal("pcb_courtyard_outline"),
|
|
3733
3756
|
pcb_courtyard_outline_id: getZodPrefixedIdWithDefault(
|
|
3734
3757
|
"pcb_courtyard_outline"
|
|
3735
3758
|
),
|
|
3736
|
-
pcb_component_id:
|
|
3737
|
-
pcb_group_id:
|
|
3738
|
-
subcircuit_id:
|
|
3759
|
+
pcb_component_id: z175.string(),
|
|
3760
|
+
pcb_group_id: z175.string().optional(),
|
|
3761
|
+
subcircuit_id: z175.string().optional(),
|
|
3739
3762
|
layer: visible_layer,
|
|
3740
|
-
outline:
|
|
3763
|
+
outline: z175.array(point).min(2)
|
|
3741
3764
|
}).describe("Defines a courtyard outline on the PCB");
|
|
3742
3765
|
expectTypesMatch(true);
|
|
3743
3766
|
|
|
3744
3767
|
// src/pcb/pcb_courtyard_polygon.ts
|
|
3745
|
-
import { z as
|
|
3746
|
-
var pcb_courtyard_polygon =
|
|
3747
|
-
type:
|
|
3768
|
+
import { z as z176 } from "zod";
|
|
3769
|
+
var pcb_courtyard_polygon = z176.object({
|
|
3770
|
+
type: z176.literal("pcb_courtyard_polygon"),
|
|
3748
3771
|
pcb_courtyard_polygon_id: getZodPrefixedIdWithDefault(
|
|
3749
3772
|
"pcb_courtyard_polygon"
|
|
3750
3773
|
),
|
|
3751
|
-
pcb_component_id:
|
|
3752
|
-
pcb_group_id:
|
|
3753
|
-
subcircuit_id:
|
|
3774
|
+
pcb_component_id: z176.string(),
|
|
3775
|
+
pcb_group_id: z176.string().optional(),
|
|
3776
|
+
subcircuit_id: z176.string().optional(),
|
|
3754
3777
|
layer: visible_layer,
|
|
3755
|
-
points:
|
|
3756
|
-
color:
|
|
3778
|
+
points: z176.array(point).min(3),
|
|
3779
|
+
color: z176.string().optional()
|
|
3757
3780
|
}).describe("Defines a courtyard polygon on the PCB");
|
|
3758
3781
|
expectTypesMatch(true);
|
|
3759
3782
|
|
|
3760
3783
|
// src/pcb/pcb_courtyard_circle.ts
|
|
3761
|
-
import { z as
|
|
3762
|
-
var pcb_courtyard_circle =
|
|
3763
|
-
type:
|
|
3784
|
+
import { z as z177 } from "zod";
|
|
3785
|
+
var pcb_courtyard_circle = z177.object({
|
|
3786
|
+
type: z177.literal("pcb_courtyard_circle"),
|
|
3764
3787
|
pcb_courtyard_circle_id: getZodPrefixedIdWithDefault(
|
|
3765
3788
|
"pcb_courtyard_circle"
|
|
3766
3789
|
),
|
|
3767
|
-
pcb_component_id:
|
|
3768
|
-
pcb_group_id:
|
|
3769
|
-
subcircuit_id:
|
|
3790
|
+
pcb_component_id: z177.string(),
|
|
3791
|
+
pcb_group_id: z177.string().optional(),
|
|
3792
|
+
subcircuit_id: z177.string().optional(),
|
|
3770
3793
|
center: point,
|
|
3771
3794
|
radius: length,
|
|
3772
3795
|
layer: visible_layer,
|
|
3773
|
-
color:
|
|
3796
|
+
color: z177.string().optional()
|
|
3774
3797
|
}).describe("Defines a courtyard circle on the PCB");
|
|
3775
3798
|
expectTypesMatch(true);
|
|
3776
3799
|
|
|
3777
3800
|
// src/pcb/pcb_courtyard_pill.ts
|
|
3778
|
-
import { z as
|
|
3779
|
-
var pcb_courtyard_pill =
|
|
3780
|
-
type:
|
|
3801
|
+
import { z as z178 } from "zod";
|
|
3802
|
+
var pcb_courtyard_pill = z178.object({
|
|
3803
|
+
type: z178.literal("pcb_courtyard_pill"),
|
|
3781
3804
|
pcb_courtyard_pill_id: getZodPrefixedIdWithDefault("pcb_courtyard_pill"),
|
|
3782
|
-
pcb_component_id:
|
|
3783
|
-
pcb_group_id:
|
|
3784
|
-
subcircuit_id:
|
|
3805
|
+
pcb_component_id: z178.string(),
|
|
3806
|
+
pcb_group_id: z178.string().optional(),
|
|
3807
|
+
subcircuit_id: z178.string().optional(),
|
|
3785
3808
|
center: point,
|
|
3786
3809
|
width: length,
|
|
3787
3810
|
height: length,
|
|
3788
3811
|
radius: length,
|
|
3789
3812
|
layer: visible_layer,
|
|
3790
|
-
color:
|
|
3813
|
+
color: z178.string().optional()
|
|
3791
3814
|
}).describe("Defines a courtyard pill on the PCB");
|
|
3792
3815
|
expectTypesMatch(true);
|
|
3793
3816
|
|
|
3794
3817
|
// src/cad/cad_component.ts
|
|
3795
|
-
import { z as
|
|
3818
|
+
import { z as z179 } from "zod";
|
|
3796
3819
|
|
|
3797
3820
|
// src/cad/cad_model_conventions.ts
|
|
3798
3821
|
var cad_model_formats = [
|
|
@@ -3823,50 +3846,50 @@ var cadModelDefaultDirectionMap = {
|
|
|
3823
3846
|
};
|
|
3824
3847
|
|
|
3825
3848
|
// src/cad/cad_component.ts
|
|
3826
|
-
var cad_component =
|
|
3827
|
-
type:
|
|
3828
|
-
cad_component_id:
|
|
3829
|
-
pcb_component_id:
|
|
3830
|
-
source_component_id:
|
|
3849
|
+
var cad_component = z179.object({
|
|
3850
|
+
type: z179.literal("cad_component"),
|
|
3851
|
+
cad_component_id: z179.string(),
|
|
3852
|
+
pcb_component_id: z179.string(),
|
|
3853
|
+
source_component_id: z179.string(),
|
|
3831
3854
|
position: point3,
|
|
3832
3855
|
rotation: point3.optional(),
|
|
3833
3856
|
size: point3.optional(),
|
|
3834
3857
|
layer: layer_ref.optional(),
|
|
3835
|
-
subcircuit_id:
|
|
3858
|
+
subcircuit_id: z179.string().optional(),
|
|
3836
3859
|
// These are all ways to generate/load the 3d model
|
|
3837
|
-
footprinter_string:
|
|
3838
|
-
model_obj_url:
|
|
3839
|
-
model_stl_url:
|
|
3840
|
-
model_3mf_url:
|
|
3841
|
-
model_gltf_url:
|
|
3842
|
-
model_glb_url:
|
|
3843
|
-
model_step_url:
|
|
3844
|
-
model_wrl_url:
|
|
3860
|
+
footprinter_string: z179.string().optional(),
|
|
3861
|
+
model_obj_url: z179.string().optional(),
|
|
3862
|
+
model_stl_url: z179.string().optional(),
|
|
3863
|
+
model_3mf_url: z179.string().optional(),
|
|
3864
|
+
model_gltf_url: z179.string().optional(),
|
|
3865
|
+
model_glb_url: z179.string().optional(),
|
|
3866
|
+
model_step_url: z179.string().optional(),
|
|
3867
|
+
model_wrl_url: z179.string().optional(),
|
|
3845
3868
|
model_asset: asset.optional(),
|
|
3846
|
-
model_unit_to_mm_scale_factor:
|
|
3847
|
-
model_board_normal_direction:
|
|
3869
|
+
model_unit_to_mm_scale_factor: z179.number().optional(),
|
|
3870
|
+
model_board_normal_direction: z179.enum(cad_model_axis_directions).optional().describe(
|
|
3848
3871
|
`The direction in the model's coordinate space that is considered "up" or "coming out of the board surface"`
|
|
3849
3872
|
),
|
|
3850
3873
|
model_origin_position: point3.optional(),
|
|
3851
|
-
model_origin_alignment:
|
|
3874
|
+
model_origin_alignment: z179.enum([
|
|
3852
3875
|
"unknown",
|
|
3853
3876
|
"center",
|
|
3854
3877
|
"center_of_component_on_board_surface",
|
|
3855
3878
|
"bottom_center_of_component"
|
|
3856
3879
|
]).optional(),
|
|
3857
|
-
model_object_fit:
|
|
3858
|
-
model_jscad:
|
|
3859
|
-
show_as_translucent_model:
|
|
3860
|
-
show_as_bounding_box:
|
|
3861
|
-
show_hidden_edges:
|
|
3862
|
-
anchor_alignment:
|
|
3880
|
+
model_object_fit: z179.enum(["contain_within_bounds", "fill_bounds"]).optional().default("contain_within_bounds"),
|
|
3881
|
+
model_jscad: z179.any().optional(),
|
|
3882
|
+
show_as_translucent_model: z179.boolean().optional(),
|
|
3883
|
+
show_as_bounding_box: z179.boolean().optional(),
|
|
3884
|
+
show_hidden_edges: z179.boolean().optional(),
|
|
3885
|
+
anchor_alignment: z179.enum(["center", "center_of_component_on_board_surface"]).optional().default("center")
|
|
3863
3886
|
}).describe("Defines a component on the PCB");
|
|
3864
3887
|
expectTypesMatch(true);
|
|
3865
3888
|
|
|
3866
3889
|
// src/simulation/simulation_voltage_source.ts
|
|
3867
|
-
import { z as
|
|
3868
|
-
var wave_shape =
|
|
3869
|
-
var percentage =
|
|
3890
|
+
import { z as z180 } from "zod";
|
|
3891
|
+
var wave_shape = z180.enum(["sinewave", "square", "triangle", "sawtooth"]);
|
|
3892
|
+
var percentage = z180.union([z180.string(), z180.number()]).transform((val) => {
|
|
3870
3893
|
if (typeof val === "string") {
|
|
3871
3894
|
if (val.endsWith("%")) {
|
|
3872
3895
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3875,32 +3898,32 @@ var percentage = z179.union([z179.string(), z179.number()]).transform((val) => {
|
|
|
3875
3898
|
}
|
|
3876
3899
|
return val;
|
|
3877
3900
|
}).pipe(
|
|
3878
|
-
|
|
3901
|
+
z180.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3879
3902
|
);
|
|
3880
|
-
var simulation_dc_voltage_source =
|
|
3881
|
-
type:
|
|
3903
|
+
var simulation_dc_voltage_source = z180.object({
|
|
3904
|
+
type: z180.literal("simulation_voltage_source"),
|
|
3882
3905
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3883
3906
|
"simulation_voltage_source"
|
|
3884
3907
|
),
|
|
3885
|
-
is_dc_source:
|
|
3886
|
-
positive_source_port_id:
|
|
3887
|
-
negative_source_port_id:
|
|
3888
|
-
positive_source_net_id:
|
|
3889
|
-
negative_source_net_id:
|
|
3908
|
+
is_dc_source: z180.literal(true).optional().default(true),
|
|
3909
|
+
positive_source_port_id: z180.string().optional(),
|
|
3910
|
+
negative_source_port_id: z180.string().optional(),
|
|
3911
|
+
positive_source_net_id: z180.string().optional(),
|
|
3912
|
+
negative_source_net_id: z180.string().optional(),
|
|
3890
3913
|
voltage,
|
|
3891
3914
|
ac_magnitude: voltage.optional(),
|
|
3892
3915
|
ac_phase: rotation.optional()
|
|
3893
3916
|
}).describe("Defines a DC voltage source for simulation");
|
|
3894
|
-
var simulation_ac_voltage_source =
|
|
3895
|
-
type:
|
|
3917
|
+
var simulation_ac_voltage_source = z180.object({
|
|
3918
|
+
type: z180.literal("simulation_voltage_source"),
|
|
3896
3919
|
simulation_voltage_source_id: getZodPrefixedIdWithDefault(
|
|
3897
3920
|
"simulation_voltage_source"
|
|
3898
3921
|
),
|
|
3899
|
-
is_dc_source:
|
|
3900
|
-
terminal1_source_port_id:
|
|
3901
|
-
terminal2_source_port_id:
|
|
3902
|
-
terminal1_source_net_id:
|
|
3903
|
-
terminal2_source_net_id:
|
|
3922
|
+
is_dc_source: z180.literal(false),
|
|
3923
|
+
terminal1_source_port_id: z180.string().optional(),
|
|
3924
|
+
terminal2_source_port_id: z180.string().optional(),
|
|
3925
|
+
terminal1_source_net_id: z180.string().optional(),
|
|
3926
|
+
terminal2_source_net_id: z180.string().optional(),
|
|
3904
3927
|
voltage: voltage.optional(),
|
|
3905
3928
|
frequency: frequency.optional(),
|
|
3906
3929
|
peak_to_peak_voltage: voltage.optional(),
|
|
@@ -3915,14 +3938,14 @@ var simulation_ac_voltage_source = z179.object({
|
|
|
3915
3938
|
ac_magnitude: voltage.optional(),
|
|
3916
3939
|
ac_phase: rotation.optional()
|
|
3917
3940
|
}).describe("Defines an AC voltage source for simulation");
|
|
3918
|
-
var simulation_voltage_source =
|
|
3941
|
+
var simulation_voltage_source = z180.union([simulation_dc_voltage_source, simulation_ac_voltage_source]).describe("Defines a voltage source for simulation");
|
|
3919
3942
|
expectTypesMatch(true);
|
|
3920
3943
|
expectTypesMatch(true);
|
|
3921
3944
|
expectTypesMatch(true);
|
|
3922
3945
|
|
|
3923
3946
|
// src/simulation/simulation_current_source.ts
|
|
3924
|
-
import { z as
|
|
3925
|
-
var percentage2 =
|
|
3947
|
+
import { z as z181 } from "zod";
|
|
3948
|
+
var percentage2 = z181.union([z181.string(), z181.number()]).transform((val) => {
|
|
3926
3949
|
if (typeof val === "string") {
|
|
3927
3950
|
if (val.endsWith("%")) {
|
|
3928
3951
|
return parseFloat(val.slice(0, -1)) / 100;
|
|
@@ -3931,32 +3954,32 @@ var percentage2 = z180.union([z180.string(), z180.number()]).transform((val) =>
|
|
|
3931
3954
|
}
|
|
3932
3955
|
return val;
|
|
3933
3956
|
}).pipe(
|
|
3934
|
-
|
|
3957
|
+
z181.number().min(0, "Duty cycle must be non-negative").max(1, "Duty cycle cannot be greater than 100%")
|
|
3935
3958
|
);
|
|
3936
|
-
var simulation_dc_current_source =
|
|
3937
|
-
type:
|
|
3959
|
+
var simulation_dc_current_source = z181.object({
|
|
3960
|
+
type: z181.literal("simulation_current_source"),
|
|
3938
3961
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3939
3962
|
"simulation_current_source"
|
|
3940
3963
|
),
|
|
3941
|
-
is_dc_source:
|
|
3942
|
-
positive_source_port_id:
|
|
3943
|
-
negative_source_port_id:
|
|
3944
|
-
positive_source_net_id:
|
|
3945
|
-
negative_source_net_id:
|
|
3964
|
+
is_dc_source: z181.literal(true).optional().default(true),
|
|
3965
|
+
positive_source_port_id: z181.string().optional(),
|
|
3966
|
+
negative_source_port_id: z181.string().optional(),
|
|
3967
|
+
positive_source_net_id: z181.string().optional(),
|
|
3968
|
+
negative_source_net_id: z181.string().optional(),
|
|
3946
3969
|
current,
|
|
3947
3970
|
ac_magnitude: current.optional(),
|
|
3948
3971
|
ac_phase: rotation.optional()
|
|
3949
3972
|
}).describe("Defines a DC current source for simulation");
|
|
3950
|
-
var simulation_ac_current_source =
|
|
3951
|
-
type:
|
|
3973
|
+
var simulation_ac_current_source = z181.object({
|
|
3974
|
+
type: z181.literal("simulation_current_source"),
|
|
3952
3975
|
simulation_current_source_id: getZodPrefixedIdWithDefault(
|
|
3953
3976
|
"simulation_current_source"
|
|
3954
3977
|
),
|
|
3955
|
-
is_dc_source:
|
|
3956
|
-
terminal1_source_port_id:
|
|
3957
|
-
terminal2_source_port_id:
|
|
3958
|
-
terminal1_source_net_id:
|
|
3959
|
-
terminal2_source_net_id:
|
|
3978
|
+
is_dc_source: z181.literal(false),
|
|
3979
|
+
terminal1_source_port_id: z181.string().optional(),
|
|
3980
|
+
terminal2_source_port_id: z181.string().optional(),
|
|
3981
|
+
terminal1_source_net_id: z181.string().optional(),
|
|
3982
|
+
terminal2_source_net_id: z181.string().optional(),
|
|
3960
3983
|
current: current.optional(),
|
|
3961
3984
|
frequency: frequency.optional(),
|
|
3962
3985
|
peak_to_peak_current: current.optional(),
|
|
@@ -3966,58 +3989,58 @@ var simulation_ac_current_source = z180.object({
|
|
|
3966
3989
|
ac_magnitude: current.optional(),
|
|
3967
3990
|
ac_phase: rotation.optional()
|
|
3968
3991
|
}).describe("Defines an AC current source for simulation");
|
|
3969
|
-
var simulation_current_source =
|
|
3992
|
+
var simulation_current_source = z181.union([simulation_dc_current_source, simulation_ac_current_source]).describe("Defines a current source for simulation");
|
|
3970
3993
|
expectTypesMatch(true);
|
|
3971
3994
|
expectTypesMatch(true);
|
|
3972
3995
|
expectTypesMatch(true);
|
|
3973
3996
|
|
|
3974
3997
|
// src/simulation/simulation_experiment.ts
|
|
3975
|
-
import { z as
|
|
3998
|
+
import { z as z183 } from "zod";
|
|
3976
3999
|
|
|
3977
4000
|
// src/simulation/simulation_units.ts
|
|
3978
|
-
import { z as
|
|
3979
|
-
var simulation_dc_sweep_unit =
|
|
4001
|
+
import { z as z182 } from "zod";
|
|
4002
|
+
var simulation_dc_sweep_unit = z182.custom(
|
|
3980
4003
|
(dcSweepUnit) => dcSweepUnit === "V" || dcSweepUnit === "A"
|
|
3981
4004
|
);
|
|
3982
|
-
var simulation_parameter_unit =
|
|
4005
|
+
var simulation_parameter_unit = z182.custom(
|
|
3983
4006
|
(parameterUnit) => parameterUnit === "\u03A9" || parameterUnit === "F" || parameterUnit === "H" || parameterUnit === "V" || parameterUnit === "A"
|
|
3984
4007
|
);
|
|
3985
4008
|
|
|
3986
4009
|
// src/simulation/simulation_experiment.ts
|
|
3987
|
-
var experiment_type =
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
4010
|
+
var experiment_type = z183.union([
|
|
4011
|
+
z183.literal("spice_dc_sweep"),
|
|
4012
|
+
z183.literal("spice_dc_operating_point"),
|
|
4013
|
+
z183.literal("spice_transient_analysis"),
|
|
4014
|
+
z183.literal("spice_ac_analysis")
|
|
3992
4015
|
]);
|
|
3993
|
-
var spice_simulation_options =
|
|
3994
|
-
method:
|
|
3995
|
-
reltol:
|
|
3996
|
-
abstol:
|
|
3997
|
-
vntol:
|
|
4016
|
+
var spice_simulation_options = z183.object({
|
|
4017
|
+
method: z183.enum(["trap", "gear"]).optional(),
|
|
4018
|
+
reltol: z183.union([z183.number(), z183.string()]).optional(),
|
|
4019
|
+
abstol: z183.union([z183.number(), z183.string()]).optional(),
|
|
4020
|
+
vntol: z183.union([z183.number(), z183.string()]).optional()
|
|
3998
4021
|
}).describe("SPICE solver options for a simulation experiment");
|
|
3999
|
-
var simulation_experiment =
|
|
4000
|
-
type:
|
|
4022
|
+
var simulation_experiment = z183.object({
|
|
4023
|
+
type: z183.literal("simulation_experiment"),
|
|
4001
4024
|
simulation_experiment_id: getZodPrefixedIdWithDefault(
|
|
4002
4025
|
"simulation_experiment"
|
|
4003
4026
|
),
|
|
4004
|
-
name:
|
|
4027
|
+
name: z183.string(),
|
|
4005
4028
|
experiment_type,
|
|
4006
4029
|
time_per_step: duration_ms.optional(),
|
|
4007
4030
|
start_time_ms: ms.optional(),
|
|
4008
4031
|
end_time_ms: ms.optional(),
|
|
4009
4032
|
spice_options: spice_simulation_options.optional(),
|
|
4010
|
-
dc_sweep_voltage_source_id:
|
|
4011
|
-
dc_sweep_current_source_id:
|
|
4012
|
-
dc_sweep_start:
|
|
4013
|
-
dc_sweep_stop:
|
|
4014
|
-
dc_sweep_step:
|
|
4033
|
+
dc_sweep_voltage_source_id: z183.string().optional(),
|
|
4034
|
+
dc_sweep_current_source_id: z183.string().optional(),
|
|
4035
|
+
dc_sweep_start: z183.number().optional(),
|
|
4036
|
+
dc_sweep_stop: z183.number().optional(),
|
|
4037
|
+
dc_sweep_step: z183.number().refine((dcSweepStep) => dcSweepStep !== 0).optional(),
|
|
4015
4038
|
dc_sweep_unit: simulation_dc_sweep_unit.optional(),
|
|
4016
|
-
ac_sweep_type:
|
|
4017
|
-
ac_samples_per_interval:
|
|
4018
|
-
ac_sample_count:
|
|
4019
|
-
ac_start_frequency_hz:
|
|
4020
|
-
ac_stop_frequency_hz:
|
|
4039
|
+
ac_sweep_type: z183.enum(["linear", "decade", "octave"]).optional(),
|
|
4040
|
+
ac_samples_per_interval: z183.number().int().positive().optional(),
|
|
4041
|
+
ac_sample_count: z183.number().int().positive().optional(),
|
|
4042
|
+
ac_start_frequency_hz: z183.number().positive().optional(),
|
|
4043
|
+
ac_stop_frequency_hz: z183.number().positive().optional()
|
|
4021
4044
|
}).superRefine((experiment, context) => {
|
|
4022
4045
|
if (experiment.experiment_type === "spice_dc_sweep") {
|
|
4023
4046
|
const requiredFields = [
|
|
@@ -4029,7 +4052,7 @@ var simulation_experiment = z182.object({
|
|
|
4029
4052
|
for (const field of requiredFields) {
|
|
4030
4053
|
if (experiment[field] === void 0) {
|
|
4031
4054
|
context.addIssue({
|
|
4032
|
-
code:
|
|
4055
|
+
code: z183.ZodIssueCode.custom,
|
|
4033
4056
|
path: [field],
|
|
4034
4057
|
message: `${field} is required for a DC sweep`
|
|
4035
4058
|
});
|
|
@@ -4039,7 +4062,7 @@ var simulation_experiment = z182.object({
|
|
|
4039
4062
|
const hasCurrentSource = experiment.dc_sweep_current_source_id !== void 0;
|
|
4040
4063
|
if (hasVoltageSource === hasCurrentSource) {
|
|
4041
4064
|
context.addIssue({
|
|
4042
|
-
code:
|
|
4065
|
+
code: z183.ZodIssueCode.custom,
|
|
4043
4066
|
path: ["dc_sweep_voltage_source_id"],
|
|
4044
4067
|
message: "Exactly one DC sweep voltage or current source ID is required"
|
|
4045
4068
|
});
|
|
@@ -4048,35 +4071,35 @@ var simulation_experiment = z182.object({
|
|
|
4048
4071
|
if (experiment.experiment_type === "spice_ac_analysis") {
|
|
4049
4072
|
if (experiment.ac_sweep_type === void 0) {
|
|
4050
4073
|
context.addIssue({
|
|
4051
|
-
code:
|
|
4074
|
+
code: z183.ZodIssueCode.custom,
|
|
4052
4075
|
path: ["ac_sweep_type"],
|
|
4053
4076
|
message: "ac_sweep_type is required for an AC analysis"
|
|
4054
4077
|
});
|
|
4055
4078
|
}
|
|
4056
4079
|
if (experiment.ac_start_frequency_hz === void 0) {
|
|
4057
4080
|
context.addIssue({
|
|
4058
|
-
code:
|
|
4081
|
+
code: z183.ZodIssueCode.custom,
|
|
4059
4082
|
path: ["ac_start_frequency_hz"],
|
|
4060
4083
|
message: "ac_start_frequency_hz is required for an AC analysis"
|
|
4061
4084
|
});
|
|
4062
4085
|
}
|
|
4063
4086
|
if (experiment.ac_stop_frequency_hz === void 0) {
|
|
4064
4087
|
context.addIssue({
|
|
4065
|
-
code:
|
|
4088
|
+
code: z183.ZodIssueCode.custom,
|
|
4066
4089
|
path: ["ac_stop_frequency_hz"],
|
|
4067
4090
|
message: "ac_stop_frequency_hz is required for an AC analysis"
|
|
4068
4091
|
});
|
|
4069
4092
|
}
|
|
4070
4093
|
if (experiment.ac_sweep_type === "linear" && experiment.ac_sample_count === void 0) {
|
|
4071
4094
|
context.addIssue({
|
|
4072
|
-
code:
|
|
4095
|
+
code: z183.ZodIssueCode.custom,
|
|
4073
4096
|
path: ["ac_sample_count"],
|
|
4074
4097
|
message: "ac_sample_count is required for a linear AC analysis"
|
|
4075
4098
|
});
|
|
4076
4099
|
}
|
|
4077
4100
|
if ((experiment.ac_sweep_type === "decade" || experiment.ac_sweep_type === "octave") && experiment.ac_samples_per_interval === void 0) {
|
|
4078
4101
|
context.addIssue({
|
|
4079
|
-
code:
|
|
4102
|
+
code: z183.ZodIssueCode.custom,
|
|
4080
4103
|
path: ["ac_samples_per_interval"],
|
|
4081
4104
|
message: "ac_samples_per_interval is required for decade and octave AC analyses"
|
|
4082
4105
|
});
|
|
@@ -4086,87 +4109,87 @@ var simulation_experiment = z182.object({
|
|
|
4086
4109
|
expectTypesMatch(true);
|
|
4087
4110
|
|
|
4088
4111
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
4089
|
-
import { z as
|
|
4112
|
+
import { z as z185 } from "zod";
|
|
4090
4113
|
|
|
4091
4114
|
// src/simulation/simulation_parameter_sweep_coordinate.ts
|
|
4092
|
-
import { z as
|
|
4093
|
-
var simulation_parameter_sweep_coordinate =
|
|
4094
|
-
simulation_parameter_sweep_id:
|
|
4095
|
-
sweep_index:
|
|
4096
|
-
parameter_value:
|
|
4115
|
+
import { z as z184 } from "zod";
|
|
4116
|
+
var simulation_parameter_sweep_coordinate = z184.object({
|
|
4117
|
+
simulation_parameter_sweep_id: z184.string(),
|
|
4118
|
+
sweep_index: z184.number().int().nonnegative(),
|
|
4119
|
+
parameter_value: z184.number(),
|
|
4097
4120
|
parameter_unit: simulation_parameter_unit
|
|
4098
4121
|
});
|
|
4099
4122
|
expectTypesMatch(true);
|
|
4100
4123
|
|
|
4101
4124
|
// src/simulation/simulation_transient_voltage_graph.ts
|
|
4102
|
-
var simulation_transient_voltage_graph =
|
|
4103
|
-
type:
|
|
4125
|
+
var simulation_transient_voltage_graph = z185.object({
|
|
4126
|
+
type: z185.literal("simulation_transient_voltage_graph"),
|
|
4104
4127
|
simulation_transient_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4105
4128
|
"simulation_transient_voltage_graph"
|
|
4106
4129
|
),
|
|
4107
|
-
simulation_experiment_id:
|
|
4130
|
+
simulation_experiment_id: z185.string(),
|
|
4108
4131
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4109
|
-
timestamps_ms:
|
|
4110
|
-
voltage_levels:
|
|
4111
|
-
source_component_id:
|
|
4112
|
-
subcircuit_connectivity_map_key:
|
|
4132
|
+
timestamps_ms: z185.array(z185.number()).optional(),
|
|
4133
|
+
voltage_levels: z185.array(z185.number()),
|
|
4134
|
+
source_component_id: z185.string().optional(),
|
|
4135
|
+
subcircuit_connectivity_map_key: z185.string().optional(),
|
|
4113
4136
|
time_per_step: duration_ms,
|
|
4114
4137
|
start_time_ms: ms,
|
|
4115
4138
|
end_time_ms: ms,
|
|
4116
|
-
name:
|
|
4117
|
-
color:
|
|
4139
|
+
name: z185.string().optional(),
|
|
4140
|
+
color: z185.string().optional()
|
|
4118
4141
|
}).describe("Stores voltage measurements over time for a simulation");
|
|
4119
4142
|
expectTypesMatch(true);
|
|
4120
4143
|
|
|
4121
4144
|
// src/simulation/simulation_transient_current_graph.ts
|
|
4122
|
-
import { z as
|
|
4123
|
-
var simulation_transient_current_graph =
|
|
4124
|
-
type:
|
|
4145
|
+
import { z as z186 } from "zod";
|
|
4146
|
+
var simulation_transient_current_graph = z186.object({
|
|
4147
|
+
type: z186.literal("simulation_transient_current_graph"),
|
|
4125
4148
|
simulation_transient_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4126
4149
|
"simulation_transient_current_graph"
|
|
4127
4150
|
),
|
|
4128
|
-
simulation_experiment_id:
|
|
4151
|
+
simulation_experiment_id: z186.string(),
|
|
4129
4152
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4130
|
-
timestamps_ms:
|
|
4131
|
-
current_levels:
|
|
4132
|
-
source_component_id:
|
|
4133
|
-
subcircuit_connectivity_map_key:
|
|
4153
|
+
timestamps_ms: z186.array(z186.number()).optional(),
|
|
4154
|
+
current_levels: z186.array(z186.number()),
|
|
4155
|
+
source_component_id: z186.string().optional(),
|
|
4156
|
+
subcircuit_connectivity_map_key: z186.string().optional(),
|
|
4134
4157
|
time_per_step: duration_ms,
|
|
4135
4158
|
start_time_ms: ms,
|
|
4136
4159
|
end_time_ms: ms,
|
|
4137
|
-
name:
|
|
4138
|
-
color:
|
|
4160
|
+
name: z186.string().optional(),
|
|
4161
|
+
color: z186.string().optional()
|
|
4139
4162
|
}).describe("Stores current measurements over time for a simulation");
|
|
4140
4163
|
expectTypesMatch(true);
|
|
4141
4164
|
|
|
4142
4165
|
// src/simulation/simulation_switch.ts
|
|
4143
|
-
import { z as
|
|
4144
|
-
var simulation_switch =
|
|
4145
|
-
type:
|
|
4166
|
+
import { z as z187 } from "zod";
|
|
4167
|
+
var simulation_switch = z187.object({
|
|
4168
|
+
type: z187.literal("simulation_switch"),
|
|
4146
4169
|
simulation_switch_id: getZodPrefixedIdWithDefault("simulation_switch"),
|
|
4147
|
-
source_component_id:
|
|
4170
|
+
source_component_id: z187.string().optional(),
|
|
4148
4171
|
closes_at: ms.optional(),
|
|
4149
4172
|
opens_at: ms.optional(),
|
|
4150
|
-
starts_closed:
|
|
4173
|
+
starts_closed: z187.boolean().optional(),
|
|
4151
4174
|
switching_frequency: frequency.optional()
|
|
4152
4175
|
}).describe("Defines a switch for simulation timing control");
|
|
4153
4176
|
expectTypesMatch(true);
|
|
4154
4177
|
|
|
4155
4178
|
// src/simulation/simulation_voltage_probe.ts
|
|
4156
|
-
import { z as
|
|
4157
|
-
var simulation_voltage_probe =
|
|
4158
|
-
type:
|
|
4179
|
+
import { z as z188 } from "zod";
|
|
4180
|
+
var simulation_voltage_probe = z188.object({
|
|
4181
|
+
type: z188.literal("simulation_voltage_probe"),
|
|
4159
4182
|
simulation_voltage_probe_id: getZodPrefixedIdWithDefault(
|
|
4160
4183
|
"simulation_voltage_probe"
|
|
4161
4184
|
),
|
|
4162
|
-
source_component_id:
|
|
4163
|
-
name:
|
|
4164
|
-
signal_input_source_port_id:
|
|
4165
|
-
signal_input_source_net_id:
|
|
4166
|
-
reference_input_source_port_id:
|
|
4167
|
-
reference_input_source_net_id:
|
|
4168
|
-
subcircuit_id:
|
|
4169
|
-
color:
|
|
4185
|
+
source_component_id: z188.string().optional(),
|
|
4186
|
+
name: z188.string().optional(),
|
|
4187
|
+
signal_input_source_port_id: z188.string().optional(),
|
|
4188
|
+
signal_input_source_net_id: z188.string().optional(),
|
|
4189
|
+
reference_input_source_port_id: z188.string().optional(),
|
|
4190
|
+
reference_input_source_net_id: z188.string().optional(),
|
|
4191
|
+
subcircuit_id: z188.string().optional(),
|
|
4192
|
+
color: z188.string().optional()
|
|
4170
4193
|
}).describe(
|
|
4171
4194
|
"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."
|
|
4172
4195
|
).superRefine((data, ctx) => {
|
|
@@ -4176,20 +4199,20 @@ var simulation_voltage_probe = z187.object({
|
|
|
4176
4199
|
const has_nets = !!data.signal_input_source_net_id || !!data.reference_input_source_net_id;
|
|
4177
4200
|
if (has_ports && has_nets) {
|
|
4178
4201
|
ctx.addIssue({
|
|
4179
|
-
code:
|
|
4202
|
+
code: z188.ZodIssueCode.custom,
|
|
4180
4203
|
message: "Cannot mix port and net connections in a differential probe."
|
|
4181
4204
|
});
|
|
4182
4205
|
} else if (has_ports) {
|
|
4183
4206
|
if (!data.signal_input_source_port_id || !data.reference_input_source_port_id) {
|
|
4184
4207
|
ctx.addIssue({
|
|
4185
|
-
code:
|
|
4208
|
+
code: z188.ZodIssueCode.custom,
|
|
4186
4209
|
message: "Differential port probe requires both signal_input_source_port_id and reference_input_source_port_id."
|
|
4187
4210
|
});
|
|
4188
4211
|
}
|
|
4189
4212
|
} else if (has_nets) {
|
|
4190
4213
|
if (!data.signal_input_source_net_id || !data.reference_input_source_net_id) {
|
|
4191
4214
|
ctx.addIssue({
|
|
4192
|
-
code:
|
|
4215
|
+
code: z188.ZodIssueCode.custom,
|
|
4193
4216
|
message: "Differential net probe requires both signal_input_source_net_id and reference_input_source_net_id."
|
|
4194
4217
|
});
|
|
4195
4218
|
}
|
|
@@ -4197,7 +4220,7 @@ var simulation_voltage_probe = z187.object({
|
|
|
4197
4220
|
} else {
|
|
4198
4221
|
if (!!data.signal_input_source_port_id === !!data.signal_input_source_net_id) {
|
|
4199
4222
|
ctx.addIssue({
|
|
4200
|
-
code:
|
|
4223
|
+
code: z188.ZodIssueCode.custom,
|
|
4201
4224
|
message: "A voltage probe must have exactly one of signal_input_source_port_id or signal_input_source_net_id."
|
|
4202
4225
|
});
|
|
4203
4226
|
}
|
|
@@ -4206,20 +4229,20 @@ var simulation_voltage_probe = z187.object({
|
|
|
4206
4229
|
expectTypesMatch(true);
|
|
4207
4230
|
|
|
4208
4231
|
// src/simulation/simulation_current_probe.ts
|
|
4209
|
-
import { z as
|
|
4210
|
-
var simulation_current_probe =
|
|
4211
|
-
type:
|
|
4232
|
+
import { z as z189 } from "zod";
|
|
4233
|
+
var simulation_current_probe = z189.object({
|
|
4234
|
+
type: z189.literal("simulation_current_probe"),
|
|
4212
4235
|
simulation_current_probe_id: getZodPrefixedIdWithDefault(
|
|
4213
4236
|
"simulation_current_probe"
|
|
4214
4237
|
),
|
|
4215
|
-
source_component_id:
|
|
4216
|
-
name:
|
|
4217
|
-
positive_source_port_id:
|
|
4218
|
-
negative_source_port_id:
|
|
4219
|
-
positive_source_net_id:
|
|
4220
|
-
negative_source_net_id:
|
|
4221
|
-
subcircuit_id:
|
|
4222
|
-
color:
|
|
4238
|
+
source_component_id: z189.string().optional(),
|
|
4239
|
+
name: z189.string().optional(),
|
|
4240
|
+
positive_source_port_id: z189.string().optional(),
|
|
4241
|
+
negative_source_port_id: z189.string().optional(),
|
|
4242
|
+
positive_source_net_id: z189.string().optional(),
|
|
4243
|
+
negative_source_net_id: z189.string().optional(),
|
|
4244
|
+
subcircuit_id: z189.string().optional(),
|
|
4245
|
+
color: z189.string().optional()
|
|
4223
4246
|
}).describe(
|
|
4224
4247
|
"Defines a current probe for simulation. It measures current flowing from the positive endpoint to the negative endpoint."
|
|
4225
4248
|
).superRefine((data, ctx) => {
|
|
@@ -4231,7 +4254,7 @@ var simulation_current_probe = z188.object({
|
|
|
4231
4254
|
const hasNets = hasPositiveNet || hasNegativeNet;
|
|
4232
4255
|
if (hasPorts && hasNets) {
|
|
4233
4256
|
ctx.addIssue({
|
|
4234
|
-
code:
|
|
4257
|
+
code: z189.ZodIssueCode.custom,
|
|
4235
4258
|
message: "Cannot mix port and net connections in a current probe."
|
|
4236
4259
|
});
|
|
4237
4260
|
return;
|
|
@@ -4239,7 +4262,7 @@ var simulation_current_probe = z188.object({
|
|
|
4239
4262
|
if (hasPorts) {
|
|
4240
4263
|
if (!hasPositivePort || !hasNegativePort) {
|
|
4241
4264
|
ctx.addIssue({
|
|
4242
|
-
code:
|
|
4265
|
+
code: z189.ZodIssueCode.custom,
|
|
4243
4266
|
message: "Current probe using source ports requires both positive_source_port_id and negative_source_port_id."
|
|
4244
4267
|
});
|
|
4245
4268
|
}
|
|
@@ -4248,71 +4271,71 @@ var simulation_current_probe = z188.object({
|
|
|
4248
4271
|
if (hasNets) {
|
|
4249
4272
|
if (!hasPositiveNet || !hasNegativeNet) {
|
|
4250
4273
|
ctx.addIssue({
|
|
4251
|
-
code:
|
|
4274
|
+
code: z189.ZodIssueCode.custom,
|
|
4252
4275
|
message: "Current probe using source nets requires both positive_source_net_id and negative_source_net_id."
|
|
4253
4276
|
});
|
|
4254
4277
|
}
|
|
4255
4278
|
return;
|
|
4256
4279
|
}
|
|
4257
4280
|
ctx.addIssue({
|
|
4258
|
-
code:
|
|
4281
|
+
code: z189.ZodIssueCode.custom,
|
|
4259
4282
|
message: "A current probe must have either positive/negative source port ids or positive/negative source net ids."
|
|
4260
4283
|
});
|
|
4261
4284
|
});
|
|
4262
4285
|
expectTypesMatch(true);
|
|
4263
4286
|
|
|
4264
4287
|
// src/simulation/simulation_unknown_experiment_error.ts
|
|
4265
|
-
import { z as
|
|
4288
|
+
import { z as z190 } from "zod";
|
|
4266
4289
|
var simulation_unknown_experiment_error = base_circuit_json_error.extend({
|
|
4267
|
-
type:
|
|
4290
|
+
type: z190.literal("simulation_unknown_experiment_error"),
|
|
4268
4291
|
simulation_unknown_experiment_error_id: getZodPrefixedIdWithDefault(
|
|
4269
4292
|
"simulation_unknown_experiment_error"
|
|
4270
4293
|
),
|
|
4271
|
-
error_type:
|
|
4272
|
-
simulation_experiment_id:
|
|
4273
|
-
subcircuit_id:
|
|
4294
|
+
error_type: z190.literal("simulation_unknown_experiment_error").default("simulation_unknown_experiment_error"),
|
|
4295
|
+
simulation_experiment_id: z190.string().optional(),
|
|
4296
|
+
subcircuit_id: z190.string().optional()
|
|
4274
4297
|
}).describe("An unknown error occurred during the simulation experiment.");
|
|
4275
4298
|
expectTypesMatch(true);
|
|
4276
4299
|
|
|
4277
4300
|
// src/simulation/simulation_parameter_sweep.ts
|
|
4278
|
-
import { z as
|
|
4279
|
-
var simulation_parameter_type =
|
|
4301
|
+
import { z as z191 } from "zod";
|
|
4302
|
+
var simulation_parameter_type = z191.enum([
|
|
4280
4303
|
"resistance",
|
|
4281
4304
|
"capacitance",
|
|
4282
4305
|
"inductance",
|
|
4283
4306
|
"voltage",
|
|
4284
4307
|
"current"
|
|
4285
4308
|
]);
|
|
4286
|
-
var simulation_parameter_sweep_base =
|
|
4287
|
-
type:
|
|
4309
|
+
var simulation_parameter_sweep_base = z191.object({
|
|
4310
|
+
type: z191.literal("simulation_parameter_sweep"),
|
|
4288
4311
|
simulation_parameter_sweep_id: getZodPrefixedIdWithDefault(
|
|
4289
4312
|
"simulation_parameter_sweep"
|
|
4290
4313
|
),
|
|
4291
|
-
simulation_experiment_id:
|
|
4292
|
-
name:
|
|
4293
|
-
parameter_values:
|
|
4314
|
+
simulation_experiment_id: z191.string(),
|
|
4315
|
+
name: z191.string().optional(),
|
|
4316
|
+
parameter_values: z191.array(z191.number()).min(1),
|
|
4294
4317
|
parameter_unit: simulation_parameter_unit
|
|
4295
4318
|
});
|
|
4296
|
-
var simulation_parameter_sweep =
|
|
4319
|
+
var simulation_parameter_sweep = z191.discriminatedUnion("parameter_type", [
|
|
4297
4320
|
simulation_parameter_sweep_base.extend({
|
|
4298
|
-
parameter_type:
|
|
4299
|
-
resistor_source_component_id:
|
|
4321
|
+
parameter_type: z191.literal("resistance"),
|
|
4322
|
+
resistor_source_component_id: z191.string()
|
|
4300
4323
|
}),
|
|
4301
4324
|
simulation_parameter_sweep_base.extend({
|
|
4302
|
-
parameter_type:
|
|
4303
|
-
capacitor_source_component_id:
|
|
4325
|
+
parameter_type: z191.literal("capacitance"),
|
|
4326
|
+
capacitor_source_component_id: z191.string()
|
|
4304
4327
|
}),
|
|
4305
4328
|
simulation_parameter_sweep_base.extend({
|
|
4306
|
-
parameter_type:
|
|
4307
|
-
inductor_source_component_id:
|
|
4329
|
+
parameter_type: z191.literal("inductance"),
|
|
4330
|
+
inductor_source_component_id: z191.string()
|
|
4308
4331
|
}),
|
|
4309
4332
|
simulation_parameter_sweep_base.extend({
|
|
4310
|
-
parameter_type:
|
|
4311
|
-
source_net_id:
|
|
4333
|
+
parameter_type: z191.literal("voltage"),
|
|
4334
|
+
source_net_id: z191.string()
|
|
4312
4335
|
}),
|
|
4313
4336
|
simulation_parameter_sweep_base.extend({
|
|
4314
|
-
parameter_type:
|
|
4315
|
-
current_source_component_id:
|
|
4337
|
+
parameter_type: z191.literal("current"),
|
|
4338
|
+
current_source_component_id: z191.string()
|
|
4316
4339
|
})
|
|
4317
4340
|
]).describe("Repeats a simulation experiment over component parameter values");
|
|
4318
4341
|
expectTypesMatch(
|
|
@@ -4320,52 +4343,52 @@ expectTypesMatch(
|
|
|
4320
4343
|
);
|
|
4321
4344
|
|
|
4322
4345
|
// src/simulation/simulation_dc_operating_point_voltage.ts
|
|
4323
|
-
import { z as
|
|
4324
|
-
var simulation_dc_operating_point_voltage =
|
|
4325
|
-
type:
|
|
4346
|
+
import { z as z192 } from "zod";
|
|
4347
|
+
var simulation_dc_operating_point_voltage = z192.object({
|
|
4348
|
+
type: z192.literal("simulation_dc_operating_point_voltage"),
|
|
4326
4349
|
simulation_dc_operating_point_voltage_id: getZodPrefixedIdWithDefault(
|
|
4327
4350
|
"simulation_dc_operating_point_voltage"
|
|
4328
4351
|
),
|
|
4329
|
-
simulation_experiment_id:
|
|
4352
|
+
simulation_experiment_id: z192.string(),
|
|
4330
4353
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4331
|
-
simulation_voltage_probe_id:
|
|
4332
|
-
voltage:
|
|
4333
|
-
name:
|
|
4334
|
-
color:
|
|
4354
|
+
simulation_voltage_probe_id: z192.string(),
|
|
4355
|
+
voltage: z192.number(),
|
|
4356
|
+
name: z192.string().optional(),
|
|
4357
|
+
color: z192.string().optional()
|
|
4335
4358
|
});
|
|
4336
4359
|
expectTypesMatch(true);
|
|
4337
4360
|
|
|
4338
4361
|
// src/simulation/simulation_dc_operating_point_current.ts
|
|
4339
|
-
import { z as
|
|
4340
|
-
var simulation_dc_operating_point_current =
|
|
4341
|
-
type:
|
|
4362
|
+
import { z as z193 } from "zod";
|
|
4363
|
+
var simulation_dc_operating_point_current = z193.object({
|
|
4364
|
+
type: z193.literal("simulation_dc_operating_point_current"),
|
|
4342
4365
|
simulation_dc_operating_point_current_id: getZodPrefixedIdWithDefault(
|
|
4343
4366
|
"simulation_dc_operating_point_current"
|
|
4344
4367
|
),
|
|
4345
|
-
simulation_experiment_id:
|
|
4368
|
+
simulation_experiment_id: z193.string(),
|
|
4346
4369
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4347
|
-
simulation_current_probe_id:
|
|
4348
|
-
current:
|
|
4349
|
-
name:
|
|
4350
|
-
color:
|
|
4370
|
+
simulation_current_probe_id: z193.string(),
|
|
4371
|
+
current: z193.number(),
|
|
4372
|
+
name: z193.string().optional(),
|
|
4373
|
+
color: z193.string().optional()
|
|
4351
4374
|
});
|
|
4352
4375
|
expectTypesMatch(true);
|
|
4353
4376
|
|
|
4354
4377
|
// src/simulation/simulation_dc_sweep_voltage_graph.ts
|
|
4355
|
-
import { z as
|
|
4356
|
-
var simulation_dc_sweep_voltage_graph =
|
|
4357
|
-
type:
|
|
4378
|
+
import { z as z194 } from "zod";
|
|
4379
|
+
var simulation_dc_sweep_voltage_graph = z194.object({
|
|
4380
|
+
type: z194.literal("simulation_dc_sweep_voltage_graph"),
|
|
4358
4381
|
simulation_dc_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4359
4382
|
"simulation_dc_sweep_voltage_graph"
|
|
4360
4383
|
),
|
|
4361
|
-
simulation_experiment_id:
|
|
4384
|
+
simulation_experiment_id: z194.string(),
|
|
4362
4385
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4363
|
-
simulation_voltage_probe_id:
|
|
4364
|
-
sweep_values:
|
|
4386
|
+
simulation_voltage_probe_id: z194.string(),
|
|
4387
|
+
sweep_values: z194.array(z194.number()),
|
|
4365
4388
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4366
|
-
voltage_levels:
|
|
4367
|
-
name:
|
|
4368
|
-
color:
|
|
4389
|
+
voltage_levels: z194.array(z194.number()),
|
|
4390
|
+
name: z194.string().optional(),
|
|
4391
|
+
color: z194.string().optional()
|
|
4369
4392
|
}).refine(
|
|
4370
4393
|
(graph) => graph.sweep_values.length === graph.voltage_levels.length,
|
|
4371
4394
|
{
|
|
@@ -4375,20 +4398,20 @@ var simulation_dc_sweep_voltage_graph = z193.object({
|
|
|
4375
4398
|
expectTypesMatch(true);
|
|
4376
4399
|
|
|
4377
4400
|
// src/simulation/simulation_dc_sweep_current_graph.ts
|
|
4378
|
-
import { z as
|
|
4379
|
-
var simulation_dc_sweep_current_graph =
|
|
4380
|
-
type:
|
|
4401
|
+
import { z as z195 } from "zod";
|
|
4402
|
+
var simulation_dc_sweep_current_graph = z195.object({
|
|
4403
|
+
type: z195.literal("simulation_dc_sweep_current_graph"),
|
|
4381
4404
|
simulation_dc_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4382
4405
|
"simulation_dc_sweep_current_graph"
|
|
4383
4406
|
),
|
|
4384
|
-
simulation_experiment_id:
|
|
4407
|
+
simulation_experiment_id: z195.string(),
|
|
4385
4408
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4386
|
-
simulation_current_probe_id:
|
|
4387
|
-
sweep_values:
|
|
4409
|
+
simulation_current_probe_id: z195.string(),
|
|
4410
|
+
sweep_values: z195.array(z195.number()),
|
|
4388
4411
|
sweep_unit: simulation_dc_sweep_unit,
|
|
4389
|
-
current_levels:
|
|
4390
|
-
name:
|
|
4391
|
-
color:
|
|
4412
|
+
current_levels: z195.array(z195.number()),
|
|
4413
|
+
name: z195.string().optional(),
|
|
4414
|
+
color: z195.string().optional()
|
|
4392
4415
|
}).refine(
|
|
4393
4416
|
(graph) => graph.sweep_values.length === graph.current_levels.length,
|
|
4394
4417
|
{
|
|
@@ -4398,29 +4421,29 @@ var simulation_dc_sweep_current_graph = z194.object({
|
|
|
4398
4421
|
expectTypesMatch(true);
|
|
4399
4422
|
|
|
4400
4423
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4401
|
-
import { z as
|
|
4424
|
+
import { z as z197 } from "zod";
|
|
4402
4425
|
|
|
4403
4426
|
// src/simulation/simulation_complex_sample.ts
|
|
4404
|
-
import { z as
|
|
4405
|
-
var simulation_complex_sample =
|
|
4406
|
-
re:
|
|
4407
|
-
im:
|
|
4427
|
+
import { z as z196 } from "zod";
|
|
4428
|
+
var simulation_complex_sample = z196.object({
|
|
4429
|
+
re: z196.number(),
|
|
4430
|
+
im: z196.number()
|
|
4408
4431
|
});
|
|
4409
4432
|
expectTypesMatch(true);
|
|
4410
4433
|
|
|
4411
4434
|
// src/simulation/simulation_ac_sweep_voltage_graph.ts
|
|
4412
|
-
var simulation_ac_sweep_voltage_graph =
|
|
4413
|
-
type:
|
|
4435
|
+
var simulation_ac_sweep_voltage_graph = z197.object({
|
|
4436
|
+
type: z197.literal("simulation_ac_sweep_voltage_graph"),
|
|
4414
4437
|
simulation_ac_sweep_voltage_graph_id: getZodPrefixedIdWithDefault(
|
|
4415
4438
|
"simulation_ac_sweep_voltage_graph"
|
|
4416
4439
|
),
|
|
4417
|
-
simulation_experiment_id:
|
|
4440
|
+
simulation_experiment_id: z197.string(),
|
|
4418
4441
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4419
|
-
simulation_voltage_probe_id:
|
|
4420
|
-
frequencies_hz:
|
|
4421
|
-
complex_voltages:
|
|
4422
|
-
name:
|
|
4423
|
-
color:
|
|
4442
|
+
simulation_voltage_probe_id: z197.string(),
|
|
4443
|
+
frequencies_hz: z197.array(z197.number()),
|
|
4444
|
+
complex_voltages: z197.array(simulation_complex_sample),
|
|
4445
|
+
name: z197.string().optional(),
|
|
4446
|
+
color: z197.string().optional()
|
|
4424
4447
|
}).refine(
|
|
4425
4448
|
(graph) => graph.frequencies_hz.length === graph.complex_voltages.length,
|
|
4426
4449
|
{
|
|
@@ -4430,19 +4453,19 @@ var simulation_ac_sweep_voltage_graph = z196.object({
|
|
|
4430
4453
|
expectTypesMatch(true);
|
|
4431
4454
|
|
|
4432
4455
|
// src/simulation/simulation_ac_sweep_current_graph.ts
|
|
4433
|
-
import { z as
|
|
4434
|
-
var simulation_ac_sweep_current_graph =
|
|
4435
|
-
type:
|
|
4456
|
+
import { z as z198 } from "zod";
|
|
4457
|
+
var simulation_ac_sweep_current_graph = z198.object({
|
|
4458
|
+
type: z198.literal("simulation_ac_sweep_current_graph"),
|
|
4436
4459
|
simulation_ac_sweep_current_graph_id: getZodPrefixedIdWithDefault(
|
|
4437
4460
|
"simulation_ac_sweep_current_graph"
|
|
4438
4461
|
),
|
|
4439
|
-
simulation_experiment_id:
|
|
4462
|
+
simulation_experiment_id: z198.string(),
|
|
4440
4463
|
simulation_parameter_sweep_coordinate: simulation_parameter_sweep_coordinate.optional(),
|
|
4441
|
-
simulation_current_probe_id:
|
|
4442
|
-
frequencies_hz:
|
|
4443
|
-
complex_currents:
|
|
4444
|
-
name:
|
|
4445
|
-
color:
|
|
4464
|
+
simulation_current_probe_id: z198.string(),
|
|
4465
|
+
frequencies_hz: z198.array(z198.number()),
|
|
4466
|
+
complex_currents: z198.array(simulation_complex_sample),
|
|
4467
|
+
name: z198.string().optional(),
|
|
4468
|
+
color: z198.string().optional()
|
|
4446
4469
|
}).refine(
|
|
4447
4470
|
(graph) => graph.frequencies_hz.length === graph.complex_currents.length,
|
|
4448
4471
|
{
|
|
@@ -4452,52 +4475,52 @@ var simulation_ac_sweep_current_graph = z197.object({
|
|
|
4452
4475
|
expectTypesMatch(true);
|
|
4453
4476
|
|
|
4454
4477
|
// src/simulation/simulation_op_amp.ts
|
|
4455
|
-
import { z as
|
|
4456
|
-
var simulation_op_amp =
|
|
4457
|
-
type:
|
|
4478
|
+
import { z as z199 } from "zod";
|
|
4479
|
+
var simulation_op_amp = z199.object({
|
|
4480
|
+
type: z199.literal("simulation_op_amp"),
|
|
4458
4481
|
simulation_op_amp_id: getZodPrefixedIdWithDefault("simulation_op_amp"),
|
|
4459
|
-
source_component_id:
|
|
4460
|
-
inverting_input_source_port_id:
|
|
4461
|
-
non_inverting_input_source_port_id:
|
|
4462
|
-
output_source_port_id:
|
|
4463
|
-
positive_supply_source_port_id:
|
|
4464
|
-
negative_supply_source_port_id:
|
|
4482
|
+
source_component_id: z199.string().optional(),
|
|
4483
|
+
inverting_input_source_port_id: z199.string(),
|
|
4484
|
+
non_inverting_input_source_port_id: z199.string(),
|
|
4485
|
+
output_source_port_id: z199.string(),
|
|
4486
|
+
positive_supply_source_port_id: z199.string(),
|
|
4487
|
+
negative_supply_source_port_id: z199.string()
|
|
4465
4488
|
}).describe("Defines a simple ideal operational amplifier for simulation");
|
|
4466
4489
|
expectTypesMatch(true);
|
|
4467
4490
|
|
|
4468
4491
|
// src/simulation/simulation_spice_subcircuit.ts
|
|
4469
|
-
import { z as
|
|
4470
|
-
var simulation_spice_subcircuit =
|
|
4471
|
-
type:
|
|
4492
|
+
import { z as z200 } from "zod";
|
|
4493
|
+
var simulation_spice_subcircuit = z200.object({
|
|
4494
|
+
type: z200.literal("simulation_spice_subcircuit"),
|
|
4472
4495
|
simulation_spice_subcircuit_id: getZodPrefixedIdWithDefault(
|
|
4473
4496
|
"simulation_spice_subcircuit"
|
|
4474
4497
|
),
|
|
4475
|
-
source_component_id:
|
|
4476
|
-
spice_pin_to_source_port_map:
|
|
4477
|
-
subcircuit_source:
|
|
4498
|
+
source_component_id: z200.string(),
|
|
4499
|
+
spice_pin_to_source_port_map: z200.record(z200.string(), z200.string()),
|
|
4500
|
+
subcircuit_source: z200.string()
|
|
4478
4501
|
}).describe("Defines a custom SPICE subcircuit model for simulation");
|
|
4479
4502
|
expectTypesMatch(
|
|
4480
4503
|
true
|
|
4481
4504
|
);
|
|
4482
4505
|
|
|
4483
4506
|
// src/simulation/simulation_oscilloscope_trace.ts
|
|
4484
|
-
import { z as
|
|
4507
|
+
import { z as z201 } from "zod";
|
|
4485
4508
|
var hasValue = (value) => value !== void 0;
|
|
4486
|
-
var simulation_oscilloscope_trace =
|
|
4487
|
-
type:
|
|
4509
|
+
var simulation_oscilloscope_trace = z201.object({
|
|
4510
|
+
type: z201.literal("simulation_oscilloscope_trace"),
|
|
4488
4511
|
simulation_oscilloscope_trace_id: getZodPrefixedIdWithDefault(
|
|
4489
4512
|
"simulation_oscilloscope_trace"
|
|
4490
4513
|
),
|
|
4491
|
-
simulation_transient_voltage_graph_id:
|
|
4492
|
-
simulation_transient_current_graph_id:
|
|
4493
|
-
simulation_voltage_probe_id:
|
|
4494
|
-
simulation_current_probe_id:
|
|
4495
|
-
display_name:
|
|
4496
|
-
color:
|
|
4497
|
-
display_center_value:
|
|
4498
|
-
display_center_offset_divs:
|
|
4499
|
-
volts_per_div:
|
|
4500
|
-
amps_per_div:
|
|
4514
|
+
simulation_transient_voltage_graph_id: z201.string().optional(),
|
|
4515
|
+
simulation_transient_current_graph_id: z201.string().optional(),
|
|
4516
|
+
simulation_voltage_probe_id: z201.string().optional(),
|
|
4517
|
+
simulation_current_probe_id: z201.string().optional(),
|
|
4518
|
+
display_name: z201.string().optional(),
|
|
4519
|
+
color: z201.string().optional(),
|
|
4520
|
+
display_center_value: z201.number().optional(),
|
|
4521
|
+
display_center_offset_divs: z201.number().optional(),
|
|
4522
|
+
volts_per_div: z201.number().positive().optional(),
|
|
4523
|
+
amps_per_div: z201.number().positive().optional()
|
|
4501
4524
|
}).describe(
|
|
4502
4525
|
"Defines how a simulation measurement is rendered as an oscilloscope-style trace."
|
|
4503
4526
|
).superRefine((data, ctx) => {
|
|
@@ -4511,19 +4534,19 @@ var simulation_oscilloscope_trace = z200.object({
|
|
|
4511
4534
|
].filter(hasValue).length;
|
|
4512
4535
|
if (voltageReferences + currentReferences !== 1) {
|
|
4513
4536
|
ctx.addIssue({
|
|
4514
|
-
code:
|
|
4537
|
+
code: z201.ZodIssueCode.custom,
|
|
4515
4538
|
message: "An oscilloscope trace must reference exactly one voltage graph, current graph, voltage probe, or current probe."
|
|
4516
4539
|
});
|
|
4517
4540
|
}
|
|
4518
4541
|
if (voltageReferences > 0 && data.amps_per_div !== void 0) {
|
|
4519
4542
|
ctx.addIssue({
|
|
4520
|
-
code:
|
|
4543
|
+
code: z201.ZodIssueCode.custom,
|
|
4521
4544
|
message: "Voltage oscilloscope traces must use volts_per_div, not amps_per_div."
|
|
4522
4545
|
});
|
|
4523
4546
|
}
|
|
4524
4547
|
if (currentReferences > 0 && data.volts_per_div !== void 0) {
|
|
4525
4548
|
ctx.addIssue({
|
|
4526
|
-
code:
|
|
4549
|
+
code: z201.ZodIssueCode.custom,
|
|
4527
4550
|
message: "Current oscilloscope traces must use amps_per_div, not volts_per_div."
|
|
4528
4551
|
});
|
|
4529
4552
|
}
|
|
@@ -4531,8 +4554,8 @@ var simulation_oscilloscope_trace = z200.object({
|
|
|
4531
4554
|
expectTypesMatch(true);
|
|
4532
4555
|
|
|
4533
4556
|
// src/any_circuit_element.ts
|
|
4534
|
-
import { z as
|
|
4535
|
-
var any_circuit_element =
|
|
4557
|
+
import { z as z202 } from "zod";
|
|
4558
|
+
var any_circuit_element = z202.union([
|
|
4536
4559
|
source_trace,
|
|
4537
4560
|
source_port,
|
|
4538
4561
|
source_component_internal_connection,
|
|
@@ -4668,6 +4691,7 @@ var any_circuit_element = z201.union([
|
|
|
4668
4691
|
schematic_manual_edit_conflict_warning,
|
|
4669
4692
|
schematic_component_overlap_warning,
|
|
4670
4693
|
schematic_component_styling_warning,
|
|
4694
|
+
schematic_missing_sheet_warning,
|
|
4671
4695
|
schematic_element_outside_sheet_warning,
|
|
4672
4696
|
schematic_graphic,
|
|
4673
4697
|
schematic_group,
|
|
@@ -4874,6 +4898,7 @@ export {
|
|
|
4874
4898
|
schematic_layout_error,
|
|
4875
4899
|
schematic_line,
|
|
4876
4900
|
schematic_manual_edit_conflict_warning,
|
|
4901
|
+
schematic_missing_sheet_warning,
|
|
4877
4902
|
schematic_net_label,
|
|
4878
4903
|
schematic_path,
|
|
4879
4904
|
schematic_pin_styles,
|