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