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