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