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