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