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