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