@tscircuit/cli 0.1.2050 → 0.1.2051
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/main.js +585 -375
- package/dist/lib/index.js +2 -2
- package/package.json +2 -2
package/dist/cli/main.js
CHANGED
|
@@ -153243,7 +153243,7 @@ var import_perfect_cli = __toESM3(require_dist3(), 1);
|
|
|
153243
153243
|
// lib/getVersion.ts
|
|
153244
153244
|
import { createRequire as createRequire2 } from "node:module";
|
|
153245
153245
|
// package.json
|
|
153246
|
-
var version = "0.1.
|
|
153246
|
+
var version = "0.1.2049";
|
|
153247
153247
|
var package_default = {
|
|
153248
153248
|
name: "@tscircuit/cli",
|
|
153249
153249
|
version,
|
|
@@ -153262,7 +153262,7 @@ var package_default = {
|
|
|
153262
153262
|
"@tscircuit/check-shorts": "https://jscdn.tscircuit.com/@tscircuit/check-shorts/0.0.19.tgz",
|
|
153263
153263
|
"@tscircuit/circuit-json-placement-analysis": "^0.0.15",
|
|
153264
153264
|
"@tscircuit/circuit-json-routing-analysis": "^0.0.8",
|
|
153265
|
-
"@tscircuit/circuit-json-schematic-placement-analysis": "github:tscircuit/circuit-json-schematic-placement-analysis#
|
|
153265
|
+
"@tscircuit/circuit-json-schematic-placement-analysis": "github:tscircuit/circuit-json-schematic-placement-analysis#41260fc05b736c0f3fdc33892b6da0ece40107b9",
|
|
153266
153266
|
"@tscircuit/circuit-json-util": "^0.0.113",
|
|
153267
153267
|
"@tscircuit/eval": "^0.0.1016",
|
|
153268
153268
|
"@tscircuit/fake-snippets": "^0.0.182",
|
|
@@ -319403,7 +319403,7 @@ var registerCheckRoutingDifficulty = (program) => {
|
|
|
319403
319403
|
});
|
|
319404
319404
|
};
|
|
319405
319405
|
|
|
319406
|
-
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/
|
|
319406
|
+
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/ConnectorPlacementSolver/ConnectorPlacementSolver.ts
|
|
319407
319407
|
import { BaseSolver as BaseSolver5 } from "@tscircuit/solver-utils";
|
|
319408
319408
|
|
|
319409
319409
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/utils/format.ts
|
|
@@ -319424,6 +319424,21 @@ var addAttr = (attrs, key, value, options) => {
|
|
|
319424
319424
|
attrs.push(`${key}="${stringValue}"`);
|
|
319425
319425
|
};
|
|
319426
319426
|
|
|
319427
|
+
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/utils/geometry.ts
|
|
319428
|
+
function centeredRect(cx, cy, w, h) {
|
|
319429
|
+
return {
|
|
319430
|
+
left: cx - w / 2,
|
|
319431
|
+
right: cx + w / 2,
|
|
319432
|
+
top: cy + h / 2,
|
|
319433
|
+
bottom: cy - h / 2
|
|
319434
|
+
};
|
|
319435
|
+
}
|
|
319436
|
+
function rectOverlap(a, b) {
|
|
319437
|
+
const ow = Math.min(a.right, b.right) - Math.max(a.left, b.left);
|
|
319438
|
+
const oh = Math.min(a.top, b.top) - Math.max(a.bottom, b.bottom);
|
|
319439
|
+
return ow > 0 && oh > 0 ? { ow, oh } : null;
|
|
319440
|
+
}
|
|
319441
|
+
|
|
319427
319442
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/utils/source-connectivity.ts
|
|
319428
319443
|
function getSourceConnectivity(circuitJson) {
|
|
319429
319444
|
const parent = new Map;
|
|
@@ -319568,6 +319583,207 @@ function append2(map, key, value) {
|
|
|
319568
319583
|
map.set(key, [value]);
|
|
319569
319584
|
}
|
|
319570
319585
|
|
|
319586
|
+
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/ConnectorPlacementSolver/ConnectorPlacementSolver.ts
|
|
319587
|
+
var EPSILON3 = 0.01;
|
|
319588
|
+
var directions = {
|
|
319589
|
+
right: { x: 1, y: 0 },
|
|
319590
|
+
left: { x: -1, y: 0 },
|
|
319591
|
+
up: { x: 0, y: 1 },
|
|
319592
|
+
down: { x: 0, y: -1 }
|
|
319593
|
+
};
|
|
319594
|
+
var dot = (a, b) => a.x * b.x + a.y * b.y;
|
|
319595
|
+
var distance49 = (a, b) => Math.abs(a.x - b.x) + Math.abs(a.y - b.y);
|
|
319596
|
+
var near = (a, b) => distance49(a, b) <= EPSILON3;
|
|
319597
|
+
var round = (value) => Math.round(value * 100) / 100;
|
|
319598
|
+
|
|
319599
|
+
class ConnectorPlacementSolver extends BaseSolver5 {
|
|
319600
|
+
params;
|
|
319601
|
+
constructor(params2) {
|
|
319602
|
+
super();
|
|
319603
|
+
this.params = params2;
|
|
319604
|
+
}
|
|
319605
|
+
_step() {
|
|
319606
|
+
const { ctx, issues } = this.params;
|
|
319607
|
+
const index = new PlacementNetworkIndex(ctx);
|
|
319608
|
+
for (const ports of index.portsByComponent.values()) {
|
|
319609
|
+
for (const port of ports) {
|
|
319610
|
+
const net = index.connected(port.source_port_id);
|
|
319611
|
+
if (port.requires_ground || port.provides_ground)
|
|
319612
|
+
index.groundNets.add(net);
|
|
319613
|
+
if (port.requires_power || port.provides_power)
|
|
319614
|
+
index.powerNets.add(net);
|
|
319615
|
+
}
|
|
319616
|
+
}
|
|
319617
|
+
const allTraces = ctx.circuitJson.filter((e) => e.type === "schematic_trace");
|
|
319618
|
+
for (const [id, source] of index.components) {
|
|
319619
|
+
if (source.ftype !== "simple_pin_header" && source.ftype !== "simple_connector")
|
|
319620
|
+
continue;
|
|
319621
|
+
const connector = index.placement(id);
|
|
319622
|
+
const sourcePorts = index.portsByComponent.get(id) ?? [];
|
|
319623
|
+
if (!connector || sourcePorts.length < 2)
|
|
319624
|
+
continue;
|
|
319625
|
+
const pins = sourcePorts.map((p) => index.port(p));
|
|
319626
|
+
const facing = pins[0]?.facing_direction;
|
|
319627
|
+
if (!facing || pins.some((p) => !p || p.facing_direction !== facing))
|
|
319628
|
+
continue;
|
|
319629
|
+
const along = directions[facing];
|
|
319630
|
+
const across = { x: -along.y, y: along.x };
|
|
319631
|
+
const traces = allTraces.filter((t) => t.schematic_sheet_id === connector.schematicSheetId);
|
|
319632
|
+
const railLabels = ctx.circuitJson.filter((e) => e.type === "schematic_net_label" && e.schematic_sheet_id === connector.schematicSheetId);
|
|
319633
|
+
const connections = [];
|
|
319634
|
+
let ambiguous = false;
|
|
319635
|
+
for (const sourcePort of sourcePorts) {
|
|
319636
|
+
const pin = index.port(sourcePort);
|
|
319637
|
+
const net = index.connected(sourcePort.source_port_id);
|
|
319638
|
+
const peers = (index.portsByNet.get(net) ?? []).filter((p) => p.source_port_id !== sourcePort.source_port_id);
|
|
319639
|
+
const incidentTraces = traces.filter((t) => t.edges.some((edge) => near(edge.from, pin.center) || near(edge.to, pin.center)));
|
|
319640
|
+
if (index.isRail(net)) {
|
|
319641
|
+
if (incidentTraces.some((t) => !railLabels.some((label) => label.anchor_position && joins(t, pin.center, label.anchor_position))))
|
|
319642
|
+
ambiguous = true;
|
|
319643
|
+
continue;
|
|
319644
|
+
}
|
|
319645
|
+
if (peers.length === 0) {
|
|
319646
|
+
if (incidentTraces.length > 0)
|
|
319647
|
+
ambiguous = true;
|
|
319648
|
+
continue;
|
|
319649
|
+
}
|
|
319650
|
+
const peer = peers.length === 1 ? index.port(peers[0]) : undefined;
|
|
319651
|
+
const component = peers.length === 1 ? index.placement(peers[0].source_component_id) : undefined;
|
|
319652
|
+
if (!peer?.facing_direction || !component || !index.sameLocalScope(connector, component) || dot(directions[peer.facing_direction], along) !== -1) {
|
|
319653
|
+
ambiguous = true;
|
|
319654
|
+
break;
|
|
319655
|
+
}
|
|
319656
|
+
connections.push({ pin, peer, component });
|
|
319657
|
+
}
|
|
319658
|
+
if (ambiguous || connections.length < 2)
|
|
319659
|
+
continue;
|
|
319660
|
+
if (connections.some((c) => dot(c.peer.center, along) >= dot(c.pin.center, along) - 2))
|
|
319661
|
+
continue;
|
|
319662
|
+
const detouredConnections = connections.map((c) => traces.filter((t) => joins(t, c.pin.center, c.peer.center) && bendCount(t) >= 3)).filter((t) => t.length > 0);
|
|
319663
|
+
if (detouredConnections.length < 2)
|
|
319664
|
+
continue;
|
|
319665
|
+
const detours = detouredConnections.flat();
|
|
319666
|
+
const ordered = [...connections].sort((a, b) => dot(a.pin.center, across) - dot(b.pin.center, across));
|
|
319667
|
+
if (ordered.some((c, i) => i > 0 && dot(c.peer.center, across) <= dot(ordered[i - 1].peer.center, across) + EPSILON3))
|
|
319668
|
+
continue;
|
|
319669
|
+
const center = { x: connector.schX, y: connector.schY };
|
|
319670
|
+
const pinOffset = Math.max(...connections.map((c) => dot(c.pin.center, along) - dot(center, along)));
|
|
319671
|
+
const targetAlong = Math.min(...connections.map((c) => dot(c.peer.center, along))) - 2 - pinOffset;
|
|
319672
|
+
const offsets = connections.map((c) => dot(c.peer.center, across) - dot(c.pin.center, across) + dot(center, across)).sort((a, b) => a - b);
|
|
319673
|
+
const targetAcross = offsets[Math.floor(offsets.length / 2)];
|
|
319674
|
+
const target = {
|
|
319675
|
+
x: round(along.x * targetAlong + across.x * targetAcross),
|
|
319676
|
+
y: round(along.y * targetAlong + across.y * targetAcross)
|
|
319677
|
+
};
|
|
319678
|
+
const delta = { x: target.x - center.x, y: target.y - center.y };
|
|
319679
|
+
const movedPin = (pin) => ({
|
|
319680
|
+
x: pin.center.x + delta.x,
|
|
319681
|
+
y: pin.center.y + delta.y
|
|
319682
|
+
});
|
|
319683
|
+
if (connections.some((c) => distance49(movedPin(c.pin), c.peer.center) > distance49(c.pin.center, c.peer.center) + EPSILON3))
|
|
319684
|
+
continue;
|
|
319685
|
+
const before = connections.reduce((sum, c) => sum + distance49(c.pin.center, c.peer.center), 0);
|
|
319686
|
+
const after = connections.reduce((sum, c) => sum + distance49(movedPin(c.pin), c.peer.center), 0);
|
|
319687
|
+
if (before - after < 4 || after > before * 0.75)
|
|
319688
|
+
continue;
|
|
319689
|
+
const obstacles = ctx.componentPlacements.filter((p) => p.schematicSheetId === connector.schematicSheetId && p.schematicComponentId !== connector.schematicComponentId);
|
|
319690
|
+
const targetBounds = centeredRect(target.x, target.y, connector.width + 0.4, connector.height + 0.4);
|
|
319691
|
+
if (obstacles.some((p) => rectOverlap(targetBounds, centeredRect(p.schX, p.schY, p.width, p.height))))
|
|
319692
|
+
continue;
|
|
319693
|
+
if (connections.some((c) => {
|
|
319694
|
+
const start = movedPin(c.pin);
|
|
319695
|
+
const end = c.peer.center;
|
|
319696
|
+
const middleAlong = (dot(start, along) + dot(end, along)) / 2;
|
|
319697
|
+
const points = [
|
|
319698
|
+
start,
|
|
319699
|
+
{
|
|
319700
|
+
x: along.x * middleAlong + across.x * dot(start, across),
|
|
319701
|
+
y: along.y * middleAlong + across.y * dot(start, across)
|
|
319702
|
+
},
|
|
319703
|
+
{
|
|
319704
|
+
x: along.x * middleAlong + across.x * dot(end, across),
|
|
319705
|
+
y: along.y * middleAlong + across.y * dot(end, across)
|
|
319706
|
+
},
|
|
319707
|
+
end
|
|
319708
|
+
];
|
|
319709
|
+
return obstacles.some((p) => p.schematicComponentId !== c.component.schematicComponentId && points.slice(1).some((point, i) => segmentCrossesBox(points[i], point, p)));
|
|
319710
|
+
}))
|
|
319711
|
+
continue;
|
|
319712
|
+
const connectedComponents = [
|
|
319713
|
+
...new Map(connections.map((c) => [
|
|
319714
|
+
c.component.schematicComponentId,
|
|
319715
|
+
c.component
|
|
319716
|
+
])).values()
|
|
319717
|
+
];
|
|
319718
|
+
const name = connector.sourceComponentName ?? connector.schematicComponentId;
|
|
319719
|
+
issues.push({
|
|
319720
|
+
lineItemType: "ConnectorPositionCausesTraceDetours",
|
|
319721
|
+
connectorSchematicBox: connector,
|
|
319722
|
+
connectedComponents,
|
|
319723
|
+
schematicTraceIds: [
|
|
319724
|
+
...new Set(detours.map((t) => t.schematic_trace_id))
|
|
319725
|
+
],
|
|
319726
|
+
evaluatedSignalCount: connections.length,
|
|
319727
|
+
newSchX: target.x,
|
|
319728
|
+
newSchY: target.y,
|
|
319729
|
+
deltaSchX: round(delta.x),
|
|
319730
|
+
deltaSchY: round(delta.y),
|
|
319731
|
+
currentTotalSignalDistance: round(before),
|
|
319732
|
+
suggestedTotalSignalDistance: round(after),
|
|
319733
|
+
message: `Move ${name} to schX=${target.x}, schY=${target.y} so its signal pins face ${connectedComponents.map((p) => p.sourceComponentName ?? p.schematicComponentId).join(", ")}. Preserve rotation and pin assignments; reroute the connections and attached rail labels.`
|
|
319734
|
+
});
|
|
319735
|
+
}
|
|
319736
|
+
this.solved = true;
|
|
319737
|
+
}
|
|
319738
|
+
static issueToString(issue) {
|
|
319739
|
+
const attrs = [];
|
|
319740
|
+
addAttr(attrs, "connectorComponentName", issue.connectorSchematicBox.sourceComponentName);
|
|
319741
|
+
addAttr(attrs, "connectedComponents", issue.connectedComponents.map((p) => p.sourceComponentName ?? p.schematicComponentId).join(","));
|
|
319742
|
+
for (const key of [
|
|
319743
|
+
"evaluatedSignalCount",
|
|
319744
|
+
"newSchX",
|
|
319745
|
+
"newSchY",
|
|
319746
|
+
"deltaSchX",
|
|
319747
|
+
"deltaSchY",
|
|
319748
|
+
"currentTotalSignalDistance",
|
|
319749
|
+
"suggestedTotalSignalDistance"
|
|
319750
|
+
])
|
|
319751
|
+
addAttr(attrs, key, issue[key]);
|
|
319752
|
+
addAttr(attrs, "message", issue.message);
|
|
319753
|
+
return `<ConnectorPositionCausesTraceDetours ${attrs.join(" ")} />`;
|
|
319754
|
+
}
|
|
319755
|
+
}
|
|
319756
|
+
function joins(trace, a, b) {
|
|
319757
|
+
const first = trace.edges[0]?.from;
|
|
319758
|
+
const last = trace.edges.at(-1)?.to;
|
|
319759
|
+
return !!first && !!last && (near(first, a) && near(last, b) || near(first, b) && near(last, a));
|
|
319760
|
+
}
|
|
319761
|
+
function bendCount(trace) {
|
|
319762
|
+
let previousAxis;
|
|
319763
|
+
let bends = 0;
|
|
319764
|
+
for (let i = 0;i < trace.edges.length; i++) {
|
|
319765
|
+
const edge = trace.edges[i];
|
|
319766
|
+
if (i > 0 && !near(trace.edges[i - 1].to, edge.from))
|
|
319767
|
+
return 0;
|
|
319768
|
+
if (near(edge.from, edge.to))
|
|
319769
|
+
continue;
|
|
319770
|
+
const axis = Math.abs(edge.from.y - edge.to.y) < EPSILON3 ? "x" : Math.abs(edge.from.x - edge.to.x) < EPSILON3 ? "y" : undefined;
|
|
319771
|
+
if (!axis)
|
|
319772
|
+
return 0;
|
|
319773
|
+
if (previousAxis && previousAxis !== axis)
|
|
319774
|
+
bends++;
|
|
319775
|
+
previousAxis = axis;
|
|
319776
|
+
}
|
|
319777
|
+
return bends;
|
|
319778
|
+
}
|
|
319779
|
+
function segmentCrossesBox(a, b, box) {
|
|
319780
|
+
const bounds = centeredRect(box.schX, box.schY, box.width + 0.2, box.height + 0.2);
|
|
319781
|
+
return Math.max(a.x, b.x) > bounds.left && Math.min(a.x, b.x) < bounds.right && Math.max(a.y, b.y) > bounds.bottom && Math.min(a.y, b.y) < bounds.top;
|
|
319782
|
+
}
|
|
319783
|
+
|
|
319784
|
+
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/CapacitorOrientationSolver/CapacitorOrientationSolver.ts
|
|
319785
|
+
import { BaseSolver as BaseSolver6 } from "@tscircuit/solver-utils";
|
|
319786
|
+
|
|
319571
319787
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/utils/graphics.ts
|
|
319572
319788
|
import { mergeGraphics as mergeGraphics2 } from "graphics-debug";
|
|
319573
319789
|
function mergeGraphicsObjects2(objects) {
|
|
@@ -319601,7 +319817,7 @@ function visualizeCircuitJson(circuitJson) {
|
|
|
319601
319817
|
}
|
|
319602
319818
|
|
|
319603
319819
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/CapacitorOrientationSolver/CapacitorOrientationSolver.ts
|
|
319604
|
-
class CapacitorOrientationSolver extends
|
|
319820
|
+
class CapacitorOrientationSolver extends BaseSolver6 {
|
|
319605
319821
|
static ORIENTATION_MESSAGE = 'Use schOrientation="vertical" on this capacitor to fix the symbol orientation';
|
|
319606
319822
|
ctx;
|
|
319607
319823
|
out;
|
|
@@ -319725,8 +319941,8 @@ class CapacitorOrientationSolver extends BaseSolver5 {
|
|
|
319725
319941
|
}
|
|
319726
319942
|
|
|
319727
319943
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/DecouplingCapacitorGroupingSolver/DecouplingCapacitorGroupingSolver.ts
|
|
319728
|
-
import { BaseSolver as
|
|
319729
|
-
class DecouplingCapacitorGroupingSolver extends
|
|
319944
|
+
import { BaseSolver as BaseSolver7 } from "@tscircuit/solver-utils";
|
|
319945
|
+
class DecouplingCapacitorGroupingSolver extends BaseSolver7 {
|
|
319730
319946
|
params;
|
|
319731
319947
|
static MIN_BODY_GAP = 4;
|
|
319732
319948
|
banks = [];
|
|
@@ -319823,25 +320039,8 @@ class DecouplingCapacitorGroupingSolver extends BaseSolver6 {
|
|
|
319823
320039
|
}
|
|
319824
320040
|
|
|
319825
320041
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/ComponentNetLabelCollisionSolver/ComponentNetLabelCollisionSolver.ts
|
|
319826
|
-
import { BaseSolver as
|
|
319827
|
-
|
|
319828
|
-
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/utils/geometry.ts
|
|
319829
|
-
function centeredRect(cx, cy, w, h) {
|
|
319830
|
-
return {
|
|
319831
|
-
left: cx - w / 2,
|
|
319832
|
-
right: cx + w / 2,
|
|
319833
|
-
top: cy + h / 2,
|
|
319834
|
-
bottom: cy - h / 2
|
|
319835
|
-
};
|
|
319836
|
-
}
|
|
319837
|
-
function rectOverlap(a, b) {
|
|
319838
|
-
const ow = Math.min(a.right, b.right) - Math.max(a.left, b.left);
|
|
319839
|
-
const oh = Math.min(a.top, b.top) - Math.max(a.bottom, b.bottom);
|
|
319840
|
-
return ow > 0 && oh > 0 ? { ow, oh } : null;
|
|
319841
|
-
}
|
|
319842
|
-
|
|
319843
|
-
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/ComponentNetLabelCollisionSolver/ComponentNetLabelCollisionSolver.ts
|
|
319844
|
-
class ComponentNetLabelCollisionSolver extends BaseSolver7 {
|
|
320042
|
+
import { BaseSolver as BaseSolver8 } from "@tscircuit/solver-utils";
|
|
320043
|
+
class ComponentNetLabelCollisionSolver extends BaseSolver8 {
|
|
319845
320044
|
params;
|
|
319846
320045
|
LABEL_HALF_HEIGHT = 0.1;
|
|
319847
320046
|
LABEL_BOUNDS_SLACK = 0.1;
|
|
@@ -320201,8 +320400,8 @@ class ComponentNetLabelCollisionSolver extends BaseSolver7 {
|
|
|
320201
320400
|
}
|
|
320202
320401
|
|
|
320203
320402
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/ComponentPinAlignmentSolver/ComponentPinAlignmentSolver.ts
|
|
320204
|
-
import { BaseSolver as
|
|
320205
|
-
class ComponentPinAlignmentSolver extends
|
|
320403
|
+
import { BaseSolver as BaseSolver9 } from "@tscircuit/solver-utils";
|
|
320404
|
+
class ComponentPinAlignmentSolver extends BaseSolver9 {
|
|
320206
320405
|
static ALIGNMENT_EPSILON = 0.01;
|
|
320207
320406
|
ctx;
|
|
320208
320407
|
out;
|
|
@@ -320336,8 +320535,8 @@ class ComponentPinAlignmentSolver extends BaseSolver8 {
|
|
|
320336
320535
|
}
|
|
320337
320536
|
|
|
320338
320537
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/CrystalLoadCapacitorPlacementSolver/CrystalLoadCapacitorPlacementSolver.ts
|
|
320339
|
-
import { BaseSolver as
|
|
320340
|
-
class CrystalLoadCapacitorPlacementSolver extends
|
|
320538
|
+
import { BaseSolver as BaseSolver10 } from "@tscircuit/solver-utils";
|
|
320539
|
+
class CrystalLoadCapacitorPlacementSolver extends BaseSolver10 {
|
|
320341
320540
|
static ALIGNMENT_TOLERANCE = 0.1;
|
|
320342
320541
|
issues;
|
|
320343
320542
|
networks;
|
|
@@ -320359,8 +320558,8 @@ class CrystalLoadCapacitorPlacementSolver extends BaseSolver9 {
|
|
|
320359
320558
|
}
|
|
320360
320559
|
this.currentNetworkIndex += 1;
|
|
320361
320560
|
this.solved = this.currentNetworkIndex >= this.networks.length;
|
|
320362
|
-
const deltaSchX =
|
|
320363
|
-
const deltaSchY =
|
|
320561
|
+
const deltaSchX = round2(network.newSchX - network.crystal.schX);
|
|
320562
|
+
const deltaSchY = round2(network.newSchY - network.crystal.schY);
|
|
320364
320563
|
if (Math.abs(deltaSchX) <= CrystalLoadCapacitorPlacementSolver.ALIGNMENT_TOLERANCE && Math.abs(deltaSchY) <= CrystalLoadCapacitorPlacementSolver.ALIGNMENT_TOLERANCE) {
|
|
320365
320564
|
return;
|
|
320366
320565
|
}
|
|
@@ -320473,8 +320672,8 @@ class CrystalLoadCapacitorPlacementSolver extends BaseSolver9 {
|
|
|
320473
320672
|
crystal: crystalPlacement,
|
|
320474
320673
|
firstLoadCapacitor: capacitors[0],
|
|
320475
320674
|
secondLoadCapacitor: capacitors[1],
|
|
320476
|
-
newSchX:
|
|
320477
|
-
newSchY:
|
|
320675
|
+
newSchX: round2((loadPorts[0].center.x + loadPorts[1].center.x) / 2),
|
|
320676
|
+
newSchY: round2((loadPorts[0].center.y + loadPorts[1].center.y) / 2)
|
|
320478
320677
|
});
|
|
320479
320678
|
}
|
|
320480
320679
|
return networks;
|
|
@@ -320492,13 +320691,13 @@ class CrystalLoadCapacitorPlacementSolver extends BaseSolver9 {
|
|
|
320492
320691
|
return `<CrystalNotCenteredOverLoadCapacitors ${attrs.join(" ")} />`;
|
|
320493
320692
|
}
|
|
320494
320693
|
}
|
|
320495
|
-
var pairDistance = (pair, crystal) =>
|
|
320496
|
-
var
|
|
320497
|
-
var
|
|
320694
|
+
var pairDistance = (pair, crystal) => distance50(pair.firstConnection.capacitor, crystal) + distance50(pair.secondConnection.capacitor, crystal);
|
|
320695
|
+
var distance50 = (first, second) => Math.hypot(first.schX - second.schX, first.schY - second.schY);
|
|
320696
|
+
var round2 = (value) => Math.round(value * 100) / 100;
|
|
320498
320697
|
|
|
320499
320698
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/DiodeResistorAlignmentSolver/DiodeResistorAlignmentSolver.ts
|
|
320500
|
-
import { BaseSolver as
|
|
320501
|
-
class DiodeResistorAlignmentSolver extends
|
|
320699
|
+
import { BaseSolver as BaseSolver11 } from "@tscircuit/solver-utils";
|
|
320700
|
+
class DiodeResistorAlignmentSolver extends BaseSolver11 {
|
|
320502
320701
|
static DIODE_FTYPES = new Set(["simple_led", "simple_diode"]);
|
|
320503
320702
|
ctx;
|
|
320504
320703
|
out;
|
|
@@ -320660,8 +320859,8 @@ class DiodeResistorAlignmentSolver extends BaseSolver10 {
|
|
|
320660
320859
|
}
|
|
320661
320860
|
|
|
320662
320861
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/FeedbackNetworkPlacementSolver/FeedbackNetworkPlacementSolver.ts
|
|
320663
|
-
import { BaseSolver as
|
|
320664
|
-
class FeedbackNetworkPlacementSolver extends
|
|
320862
|
+
import { BaseSolver as BaseSolver12 } from "@tscircuit/solver-utils";
|
|
320863
|
+
class FeedbackNetworkPlacementSolver extends BaseSolver12 {
|
|
320665
320864
|
static MIN_BODY_GAP = 4;
|
|
320666
320865
|
index;
|
|
320667
320866
|
amplifierIds;
|
|
@@ -320746,8 +320945,8 @@ function distanceBetweenBoxes(a, b) {
|
|
|
320746
320945
|
}
|
|
320747
320946
|
|
|
320748
320947
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/PullResistorPlacementSolver/PullResistorPlacementSolver.ts
|
|
320749
|
-
import { BaseSolver as
|
|
320750
|
-
class PullResistorPlacementSolver extends
|
|
320948
|
+
import { BaseSolver as BaseSolver13 } from "@tscircuit/solver-utils";
|
|
320949
|
+
class PullResistorPlacementSolver extends BaseSolver13 {
|
|
320751
320950
|
static MIN_WRONG_SIDE_GAP = 1.5;
|
|
320752
320951
|
index;
|
|
320753
320952
|
resistorIds;
|
|
@@ -320843,8 +321042,8 @@ class PullResistorPlacementSolver extends BaseSolver12 {
|
|
|
320843
321042
|
}
|
|
320844
321043
|
|
|
320845
321044
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/TwoPinComponentRailOrientationSolver/TwoPinComponentRailOrientationSolver.ts
|
|
320846
|
-
import { BaseSolver as
|
|
320847
|
-
class TwoPinComponentRailOrientationSolver extends
|
|
321045
|
+
import { BaseSolver as BaseSolver14 } from "@tscircuit/solver-utils";
|
|
321046
|
+
class TwoPinComponentRailOrientationSolver extends BaseSolver14 {
|
|
320848
321047
|
static EPSILON = 0.01;
|
|
320849
321048
|
index;
|
|
320850
321049
|
powerNets;
|
|
@@ -320928,8 +321127,8 @@ class TwoPinComponentRailOrientationSolver extends BaseSolver13 {
|
|
|
320928
321127
|
}
|
|
320929
321128
|
|
|
320930
321129
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/SchematicBoxInnerLabelCollisionSolver/SchematicBoxInnerLabelCollisionSolver.ts
|
|
320931
|
-
import { BaseSolver as
|
|
320932
|
-
class SchematicBoxInnerLabelCollisionSolver extends
|
|
321130
|
+
import { BaseSolver as BaseSolver15 } from "@tscircuit/solver-utils";
|
|
321131
|
+
class SchematicBoxInnerLabelCollisionSolver extends BaseSolver15 {
|
|
320933
321132
|
params;
|
|
320934
321133
|
MESSAGE = "Inner labels are colliding. Increase the schWidth or schHeight.";
|
|
320935
321134
|
PIN_LABEL_EDGE_PADDING = 0.1;
|
|
@@ -321127,8 +321326,8 @@ class SchematicBoxInnerLabelCollisionSolver extends BaseSolver14 {
|
|
|
321127
321326
|
}
|
|
321128
321327
|
|
|
321129
321328
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/SchematicBoxOverlapSolver/SchematicBoxOverlapSolver.ts
|
|
321130
|
-
import { BaseSolver as
|
|
321131
|
-
class SchematicBoxOverlapSolver extends
|
|
321329
|
+
import { BaseSolver as BaseSolver16 } from "@tscircuit/solver-utils";
|
|
321330
|
+
class SchematicBoxOverlapSolver extends BaseSolver16 {
|
|
321132
321331
|
params;
|
|
321133
321332
|
placements;
|
|
321134
321333
|
firstIndex = 0;
|
|
@@ -321247,8 +321446,8 @@ class SchematicBoxOverlapSolver extends BaseSolver15 {
|
|
|
321247
321446
|
}
|
|
321248
321447
|
|
|
321249
321448
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/SchematicBoxTooWideSolver/SchematicBoxTooWideSolver.ts
|
|
321250
|
-
import { BaseSolver as
|
|
321251
|
-
class SchematicBoxTooWideSolver extends
|
|
321449
|
+
import { BaseSolver as BaseSolver17 } from "@tscircuit/solver-utils";
|
|
321450
|
+
class SchematicBoxTooWideSolver extends BaseSolver17 {
|
|
321252
321451
|
params;
|
|
321253
321452
|
SCHEMATIC_BOX_TOO_WIDE_MESSAGE = "Shrink schematic box width";
|
|
321254
321453
|
PIN_HEADER_MAX_ALLOWED_GAP = 0.1;
|
|
@@ -321423,8 +321622,8 @@ class SchematicBoxTooWideSolver extends BaseSolver16 {
|
|
|
321423
321622
|
}
|
|
321424
321623
|
|
|
321425
321624
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/SchematicPinPaddingToEdgeSolver/SchematicPinPaddingToEdgeSolver.ts
|
|
321426
|
-
import { BaseSolver as
|
|
321427
|
-
class SchematicPinPaddingToEdgeSolver extends
|
|
321625
|
+
import { BaseSolver as BaseSolver18 } from "@tscircuit/solver-utils";
|
|
321626
|
+
class SchematicPinPaddingToEdgeSolver extends BaseSolver18 {
|
|
321428
321627
|
params;
|
|
321429
321628
|
MESSAGE = "Move schematic pins closer to the box edge or change the schematic box";
|
|
321430
321629
|
PIN_NAME_CHARACTER_WIDTH = 0.095;
|
|
@@ -321762,8 +321961,8 @@ var buildSolverContext = (circuitJson) => {
|
|
|
321762
321961
|
};
|
|
321763
321962
|
|
|
321764
321963
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/TraceSimplificationSolver/TraceSimplificationSolver.ts
|
|
321765
|
-
import { BaseSolver as
|
|
321766
|
-
class TraceSimplificationSolver extends
|
|
321964
|
+
import { BaseSolver as BaseSolver19 } from "@tscircuit/solver-utils";
|
|
321965
|
+
class TraceSimplificationSolver extends BaseSolver19 {
|
|
321767
321966
|
static EPSILON = 0.01;
|
|
321768
321967
|
ctx;
|
|
321769
321968
|
out;
|
|
@@ -321993,7 +322192,7 @@ class TraceSimplificationSolver extends BaseSolver18 {
|
|
|
321993
322192
|
}
|
|
321994
322193
|
|
|
321995
322194
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/TwoPinComponentOrientationSolver/TwoPinComponentOrientationSolver.ts
|
|
321996
|
-
import { BaseSolver as
|
|
322195
|
+
import { BaseSolver as BaseSolver20 } from "@tscircuit/solver-utils";
|
|
321997
322196
|
|
|
321998
322197
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/TwoPinComponentOrientationSolver/getPowerOrGroundConnectionIds.ts
|
|
321999
322198
|
import {
|
|
@@ -322032,7 +322231,7 @@ function getPowerOrGroundConnectionIds(circuitJson) {
|
|
|
322032
322231
|
}
|
|
322033
322232
|
|
|
322034
322233
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/TwoPinComponentOrientationSolver/TwoPinComponentOrientationSolver.ts
|
|
322035
|
-
class TwoPinComponentOrientationSolver extends
|
|
322234
|
+
class TwoPinComponentOrientationSolver extends BaseSolver20 {
|
|
322036
322235
|
static EPSILON = 0.01;
|
|
322037
322236
|
ctx;
|
|
322038
322237
|
out;
|
|
@@ -322277,8 +322476,8 @@ class TwoPinComponentOrientationSolver extends BaseSolver19 {
|
|
|
322277
322476
|
}
|
|
322278
322477
|
|
|
322279
322478
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/VerboseNetLabelSolver/VerboseNetLabelSolver.ts
|
|
322280
|
-
import { BaseSolver as
|
|
322281
|
-
class VerboseNetLabelSolver extends
|
|
322479
|
+
import { BaseSolver as BaseSolver21 } from "@tscircuit/solver-utils";
|
|
322480
|
+
class VerboseNetLabelSolver extends BaseSolver21 {
|
|
322282
322481
|
params;
|
|
322283
322482
|
VERBOSE_NET_LABEL_MESSAGE = "Create trace with schDisplayLabel";
|
|
322284
322483
|
netLabels;
|
|
@@ -322387,7 +322586,7 @@ class VerboseNetLabelSolver extends BaseSolver20 {
|
|
|
322387
322586
|
}
|
|
322388
322587
|
|
|
322389
322588
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/SchematicTextClearanceSolver/SchematicTextClearanceSolver.ts
|
|
322390
|
-
import { BaseSolver as
|
|
322589
|
+
import { BaseSolver as BaseSolver22 } from "@tscircuit/solver-utils";
|
|
322391
322590
|
|
|
322392
322591
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/utils/schematic-text-geometry.ts
|
|
322393
322592
|
var rectPolygon = (bounds) => [
|
|
@@ -322510,7 +322709,7 @@ var polygonBounds = (polygons) => {
|
|
|
322510
322709
|
};
|
|
322511
322710
|
|
|
322512
322711
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/SchematicTextClearanceSolver/SchematicTextClearanceSolver.ts
|
|
322513
|
-
class SchematicTextClearanceSolver extends
|
|
322712
|
+
class SchematicTextClearanceSolver extends BaseSolver22 {
|
|
322514
322713
|
params;
|
|
322515
322714
|
texts;
|
|
322516
322715
|
obstacles;
|
|
@@ -322661,8 +322860,8 @@ class SchematicTextClearanceSolver extends BaseSolver21 {
|
|
|
322661
322860
|
}
|
|
322662
322861
|
|
|
322663
322862
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/ResetNetworkGroupingSolver/ResetNetworkGroupingSolver.ts
|
|
322664
|
-
import { BaseSolver as
|
|
322665
|
-
class ResetNetworkGroupingSolver extends
|
|
322863
|
+
import { BaseSolver as BaseSolver23 } from "@tscircuit/solver-utils";
|
|
322864
|
+
class ResetNetworkGroupingSolver extends BaseSolver23 {
|
|
322666
322865
|
params;
|
|
322667
322866
|
static MIN_DISTANCE = 6;
|
|
322668
322867
|
networks;
|
|
@@ -322873,6 +323072,9 @@ class SchematicPlacementPipeline extends BasePipelineSolver2 {
|
|
|
322873
323072
|
]),
|
|
322874
323073
|
definePipelineStep3("DecouplingCapacitorGroupingSolver", DecouplingCapacitorGroupingSolver, (p) => [
|
|
322875
323074
|
{ ctx: p.ctx, issues: p.issues }
|
|
323075
|
+
]),
|
|
323076
|
+
definePipelineStep3("ConnectorPlacementSolver", ConnectorPlacementSolver, (p) => [
|
|
323077
|
+
{ ctx: p.ctx, issues: p.issues }
|
|
322876
323078
|
])
|
|
322877
323079
|
];
|
|
322878
323080
|
_setup() {
|
|
@@ -322928,6 +323130,11 @@ var getRelevantPlacementsForIssues = ({
|
|
|
322928
323130
|
for (const placement of issue.capacitorSchematicBoxes)
|
|
322929
323131
|
addPlacement(placement);
|
|
322930
323132
|
break;
|
|
323133
|
+
case "ConnectorPositionCausesTraceDetours":
|
|
323134
|
+
addPlacement(issue.connectorSchematicBox);
|
|
323135
|
+
for (const placement of issue.connectedComponents)
|
|
323136
|
+
addPlacement(placement);
|
|
323137
|
+
break;
|
|
322931
323138
|
case "ResetNetworkNotGrouped":
|
|
322932
323139
|
addPlacement(issue.hostSchematicBox);
|
|
322933
323140
|
for (const placement of issue.supportNetworkComponents)
|
|
@@ -323106,7 +323313,8 @@ class SchematicPlacementAnalysis {
|
|
|
323106
323313
|
ResetNetworkNotGrouped: 0,
|
|
323107
323314
|
TwoPinComponentCouldBeFlipped: 0,
|
|
323108
323315
|
TwoPinComponentShouldBeVertical: 0,
|
|
323109
|
-
DecouplingCapacitorsNotCloseTogether: 0
|
|
323316
|
+
DecouplingCapacitorsNotCloseTogether: 0,
|
|
323317
|
+
ConnectorPositionCausesTraceDetours: 0
|
|
323110
323318
|
};
|
|
323111
323319
|
for (const issue of this.getIssues(filter))
|
|
323112
323320
|
counts[issue.lineItemType]++;
|
|
@@ -323164,6 +323372,8 @@ class SchematicPlacementAnalysis {
|
|
|
323164
323372
|
return SchematicTextClearanceSolver.issueToString(issue);
|
|
323165
323373
|
case "ResetNetworkNotGrouped":
|
|
323166
323374
|
return ResetNetworkGroupingSolver.issueToString(issue);
|
|
323375
|
+
case "ConnectorPositionCausesTraceDetours":
|
|
323376
|
+
return ConnectorPlacementSolver.issueToString(issue);
|
|
323167
323377
|
default:
|
|
323168
323378
|
return "";
|
|
323169
323379
|
}
|
|
@@ -342502,7 +342712,7 @@ __export5(dist_exports, {
|
|
|
342502
342712
|
capacitance: () => capacitance4,
|
|
342503
342713
|
circuit_json_footprint_load_error: () => circuit_json_footprint_load_error2,
|
|
342504
342714
|
current: () => current2,
|
|
342505
|
-
distance: () =>
|
|
342715
|
+
distance: () => distance51,
|
|
342506
342716
|
duration_ms: () => duration_ms,
|
|
342507
342717
|
experiment_type: () => experiment_type,
|
|
342508
342718
|
external_footprint_load_error: () => external_footprint_load_error2,
|
|
@@ -346969,7 +347179,7 @@ var inductance2 = external_exports2.string().or(external_exports2.number()).tran
|
|
|
346969
347179
|
var voltage5 = external_exports2.string().or(external_exports2.number()).transform((v) => parseAndConvertSiUnit(v, "V").value);
|
|
346970
347180
|
var length67 = external_exports2.string().or(external_exports2.number()).transform((v) => parseAndConvertSiUnit(v).value);
|
|
346971
347181
|
var frequency7 = external_exports2.string().or(external_exports2.number()).transform((v) => parseAndConvertSiUnit(v, "Hz").value);
|
|
346972
|
-
var
|
|
347182
|
+
var distance51 = length67;
|
|
346973
347183
|
var current2 = external_exports2.string().or(external_exports2.number()).transform((v) => parseAndConvertSiUnit(v, "A").value);
|
|
346974
347184
|
var duration_ms = external_exports2.string().or(external_exports2.number()).transform((v) => parseAndConvertSiUnit(v).value);
|
|
346975
347185
|
var time = duration_ms;
|
|
@@ -347010,16 +347220,16 @@ expectStringUnionsMatch('T2 has extra: "c"');
|
|
|
347010
347220
|
expectStringUnionsMatch('T1 has extra: "d", T2 has extra: "c"');
|
|
347011
347221
|
expectStringUnionsMatch(true);
|
|
347012
347222
|
var point9 = external_exports2.object({
|
|
347013
|
-
x:
|
|
347014
|
-
y:
|
|
347223
|
+
x: distance51,
|
|
347224
|
+
y: distance51
|
|
347015
347225
|
});
|
|
347016
347226
|
var position = point9;
|
|
347017
347227
|
expectTypesMatch2(true);
|
|
347018
347228
|
expectTypesMatch2(true);
|
|
347019
347229
|
var point33 = external_exports2.object({
|
|
347020
|
-
x:
|
|
347021
|
-
y:
|
|
347022
|
-
z:
|
|
347230
|
+
x: distance51,
|
|
347231
|
+
y: distance51,
|
|
347232
|
+
z: distance51
|
|
347023
347233
|
});
|
|
347024
347234
|
var position3 = point33;
|
|
347025
347235
|
expectTypesMatch2(true);
|
|
@@ -347084,7 +347294,7 @@ var kicadAt2 = point9.extend({
|
|
|
347084
347294
|
expectTypesMatch2(true);
|
|
347085
347295
|
var kicadFont2 = external_exports2.object({
|
|
347086
347296
|
size: point9.optional(),
|
|
347087
|
-
thickness:
|
|
347297
|
+
thickness: distance51.optional()
|
|
347088
347298
|
});
|
|
347089
347299
|
expectTypesMatch2(true);
|
|
347090
347300
|
var kicadEffects2 = external_exports2.object({
|
|
@@ -347120,7 +347330,7 @@ var kicadFootprintPad2 = external_exports2.object({
|
|
|
347120
347330
|
shape: external_exports2.string().optional(),
|
|
347121
347331
|
at: kicadAt2.optional(),
|
|
347122
347332
|
size: point9.optional(),
|
|
347123
|
-
drill:
|
|
347333
|
+
drill: distance51.optional(),
|
|
347124
347334
|
layers: external_exports2.array(external_exports2.string()).optional(),
|
|
347125
347335
|
removeUnusedLayers: external_exports2.boolean().optional(),
|
|
347126
347336
|
uuid: external_exports2.string().optional()
|
|
@@ -347151,7 +347361,7 @@ var kicadSymbolPinNumbers2 = external_exports2.object({
|
|
|
347151
347361
|
});
|
|
347152
347362
|
expectTypesMatch2(true);
|
|
347153
347363
|
var kicadSymbolPinNames2 = external_exports2.object({
|
|
347154
|
-
offset:
|
|
347364
|
+
offset: distance51.optional(),
|
|
347155
347365
|
hide: external_exports2.boolean().optional()
|
|
347156
347366
|
});
|
|
347157
347367
|
expectTypesMatch2(true);
|
|
@@ -347225,7 +347435,7 @@ var source_simple_capacitor = source_component_base.extend({
|
|
|
347225
347435
|
capacitance: capacitance4,
|
|
347226
347436
|
max_voltage_rating: voltage5.optional(),
|
|
347227
347437
|
display_capacitance: external_exports2.string().optional(),
|
|
347228
|
-
max_decoupling_trace_length:
|
|
347438
|
+
max_decoupling_trace_length: distance51.optional()
|
|
347229
347439
|
});
|
|
347230
347440
|
expectTypesMatch2(true);
|
|
347231
347441
|
var source_simple_resistor = source_component_base.extend({
|
|
@@ -347783,11 +347993,11 @@ var schematic_box = external_exports2.object({
|
|
|
347783
347993
|
schematic_sheet_id: external_exports2.string().optional(),
|
|
347784
347994
|
schematic_component_id: external_exports2.string().optional(),
|
|
347785
347995
|
schematic_symbol_id: external_exports2.string().optional(),
|
|
347786
|
-
width:
|
|
347787
|
-
height:
|
|
347996
|
+
width: distance51,
|
|
347997
|
+
height: distance51,
|
|
347788
347998
|
is_dashed: external_exports2.boolean().default(false),
|
|
347789
|
-
x:
|
|
347790
|
-
y:
|
|
347999
|
+
x: distance51,
|
|
348000
|
+
y: distance51,
|
|
347791
348001
|
subcircuit_id: external_exports2.string().optional()
|
|
347792
348002
|
}).describe("Draws a box on the schematic");
|
|
347793
348003
|
expectTypesMatch2(true);
|
|
@@ -347800,10 +348010,10 @@ var schematic_path = external_exports2.object({
|
|
|
347800
348010
|
fill_color: external_exports2.string().optional(),
|
|
347801
348011
|
is_filled: external_exports2.boolean().optional(),
|
|
347802
348012
|
is_dashed: external_exports2.boolean().default(false),
|
|
347803
|
-
stroke_width:
|
|
348013
|
+
stroke_width: distance51.nullable().optional(),
|
|
347804
348014
|
stroke_color: external_exports2.string().optional(),
|
|
347805
|
-
dash_length:
|
|
347806
|
-
dash_gap:
|
|
348015
|
+
dash_length: distance51.optional(),
|
|
348016
|
+
dash_gap: distance51.optional(),
|
|
347807
348017
|
points: external_exports2.array(point9),
|
|
347808
348018
|
subcircuit_id: external_exports2.string().optional()
|
|
347809
348019
|
});
|
|
@@ -347882,15 +348092,15 @@ var schematic_line = external_exports2.object({
|
|
|
347882
348092
|
schematic_sheet_id: external_exports2.string().optional(),
|
|
347883
348093
|
schematic_component_id: external_exports2.string().optional(),
|
|
347884
348094
|
schematic_symbol_id: external_exports2.string().optional(),
|
|
347885
|
-
x1:
|
|
347886
|
-
y1:
|
|
347887
|
-
x2:
|
|
347888
|
-
y2:
|
|
347889
|
-
stroke_width:
|
|
348095
|
+
x1: distance51,
|
|
348096
|
+
y1: distance51,
|
|
348097
|
+
x2: distance51,
|
|
348098
|
+
y2: distance51,
|
|
348099
|
+
stroke_width: distance51.nullable().optional(),
|
|
347890
348100
|
color: external_exports2.string().default("#000000"),
|
|
347891
348101
|
is_dashed: external_exports2.boolean().default(false),
|
|
347892
|
-
dash_length:
|
|
347893
|
-
dash_gap:
|
|
348102
|
+
dash_length: distance51.optional(),
|
|
348103
|
+
dash_gap: distance51.optional(),
|
|
347894
348104
|
subcircuit_id: external_exports2.string().optional()
|
|
347895
348105
|
}).describe("Draws a styled line on the schematic");
|
|
347896
348106
|
expectTypesMatch2(true);
|
|
@@ -347901,10 +348111,10 @@ var schematic_rect = external_exports2.object({
|
|
|
347901
348111
|
schematic_component_id: external_exports2.string().optional(),
|
|
347902
348112
|
schematic_symbol_id: external_exports2.string().optional(),
|
|
347903
348113
|
center: point9,
|
|
347904
|
-
width:
|
|
347905
|
-
height:
|
|
348114
|
+
width: distance51,
|
|
348115
|
+
height: distance51,
|
|
347906
348116
|
rotation: rotation11.default(0),
|
|
347907
|
-
stroke_width:
|
|
348117
|
+
stroke_width: distance51.nullable().optional(),
|
|
347908
348118
|
color: external_exports2.string().default("#000000"),
|
|
347909
348119
|
is_filled: external_exports2.boolean().default(false),
|
|
347910
348120
|
fill_color: external_exports2.string().optional(),
|
|
@@ -347919,8 +348129,8 @@ var schematic_circle = external_exports2.object({
|
|
|
347919
348129
|
schematic_component_id: external_exports2.string().optional(),
|
|
347920
348130
|
schematic_symbol_id: external_exports2.string().optional(),
|
|
347921
348131
|
center: point9,
|
|
347922
|
-
radius:
|
|
347923
|
-
stroke_width:
|
|
348132
|
+
radius: distance51,
|
|
348133
|
+
stroke_width: distance51.nullable().optional(),
|
|
347924
348134
|
color: external_exports2.string().default("#000000"),
|
|
347925
348135
|
is_filled: external_exports2.boolean().default(false),
|
|
347926
348136
|
fill_color: external_exports2.string().optional(),
|
|
@@ -347935,11 +348145,11 @@ var schematic_arc = external_exports2.object({
|
|
|
347935
348145
|
schematic_component_id: external_exports2.string().optional(),
|
|
347936
348146
|
schematic_symbol_id: external_exports2.string().optional(),
|
|
347937
348147
|
center: point9,
|
|
347938
|
-
radius:
|
|
348148
|
+
radius: distance51,
|
|
347939
348149
|
start_angle_degrees: rotation11,
|
|
347940
348150
|
end_angle_degrees: rotation11,
|
|
347941
348151
|
direction: external_exports2.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
347942
|
-
stroke_width:
|
|
348152
|
+
stroke_width: distance51.nullable().optional(),
|
|
347943
348153
|
color: external_exports2.string().default("#000000"),
|
|
347944
348154
|
is_dashed: external_exports2.boolean().default(false),
|
|
347945
348155
|
subcircuit_id: external_exports2.string().optional()
|
|
@@ -347989,8 +348199,8 @@ var schematic_text = external_exports2.object({
|
|
|
347989
348199
|
text: external_exports2.string(),
|
|
347990
348200
|
font_size: external_exports2.number().default(0.18),
|
|
347991
348201
|
position: external_exports2.object({
|
|
347992
|
-
x:
|
|
347993
|
-
y:
|
|
348202
|
+
x: distance51,
|
|
348203
|
+
y: distance51
|
|
347994
348204
|
}),
|
|
347995
348205
|
rotation: external_exports2.number().default(0),
|
|
347996
348206
|
anchor: external_exports2.union([fivePointAnchor2.describe("legacy"), ninePointAnchor2]).default("center"),
|
|
@@ -348160,10 +348370,10 @@ var schematic_table = external_exports2.object({
|
|
|
348160
348370
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
348161
348371
|
schematic_sheet_id: external_exports2.string().optional(),
|
|
348162
348372
|
anchor_position: point9,
|
|
348163
|
-
column_widths: external_exports2.array(
|
|
348164
|
-
row_heights: external_exports2.array(
|
|
348165
|
-
cell_padding:
|
|
348166
|
-
border_width:
|
|
348373
|
+
column_widths: external_exports2.array(distance51),
|
|
348374
|
+
row_heights: external_exports2.array(distance51),
|
|
348375
|
+
cell_padding: distance51.optional(),
|
|
348376
|
+
border_width: distance51.optional(),
|
|
348167
348377
|
subcircuit_id: external_exports2.string().optional(),
|
|
348168
348378
|
schematic_component_id: external_exports2.string().optional(),
|
|
348169
348379
|
anchor: ninePointAnchor2.optional()
|
|
@@ -348180,11 +348390,11 @@ var schematic_table_cell = external_exports2.object({
|
|
|
348180
348390
|
end_column_index: external_exports2.number(),
|
|
348181
348391
|
text: external_exports2.string().optional(),
|
|
348182
348392
|
center: point9,
|
|
348183
|
-
width:
|
|
348184
|
-
height:
|
|
348393
|
+
width: distance51,
|
|
348394
|
+
height: distance51,
|
|
348185
348395
|
horizontal_align: external_exports2.enum(["left", "center", "right"]).optional(),
|
|
348186
348396
|
vertical_align: external_exports2.enum(["top", "middle", "bottom"]).optional(),
|
|
348187
|
-
font_size:
|
|
348397
|
+
font_size: distance51.optional(),
|
|
348188
348398
|
subcircuit_id: external_exports2.string().optional()
|
|
348189
348399
|
}).describe("Defines a cell within a schematic_table");
|
|
348190
348400
|
expectTypesMatch2(true);
|
|
@@ -348198,8 +348408,8 @@ var schematic_sheet = external_exports2.object({
|
|
|
348198
348408
|
}).describe("Defines a schematic sheet or page that components can be placed on");
|
|
348199
348409
|
expectTypesMatch2(true);
|
|
348200
348410
|
var point_with_bulge = external_exports2.object({
|
|
348201
|
-
x:
|
|
348202
|
-
y:
|
|
348411
|
+
x: distance51,
|
|
348412
|
+
y: distance51,
|
|
348203
348413
|
bulge: external_exports2.number().optional()
|
|
348204
348414
|
});
|
|
348205
348415
|
expectTypesMatch2(true);
|
|
@@ -348290,8 +348500,8 @@ var getRotationBetweenPcbPin1Locations2 = (from, to) => {
|
|
|
348290
348500
|
return null;
|
|
348291
348501
|
};
|
|
348292
348502
|
var pcb_route_hint = external_exports2.object({
|
|
348293
|
-
x:
|
|
348294
|
-
y:
|
|
348503
|
+
x: distance51,
|
|
348504
|
+
y: distance51,
|
|
348295
348505
|
via: external_exports2.boolean().optional(),
|
|
348296
348506
|
via_to_layer: layer_ref2.optional()
|
|
348297
348507
|
});
|
|
@@ -348299,11 +348509,11 @@ var pcb_route_hints = external_exports2.array(pcb_route_hint);
|
|
|
348299
348509
|
expectTypesMatch2(true);
|
|
348300
348510
|
expectTypesMatch2(true);
|
|
348301
348511
|
var route_hint_point8 = external_exports2.object({
|
|
348302
|
-
x:
|
|
348303
|
-
y:
|
|
348512
|
+
x: distance51,
|
|
348513
|
+
y: distance51,
|
|
348304
348514
|
via: external_exports2.boolean().optional(),
|
|
348305
348515
|
to_layer: layer_ref2.optional(),
|
|
348306
|
-
trace_width:
|
|
348516
|
+
trace_width: distance51.optional()
|
|
348307
348517
|
});
|
|
348308
348518
|
expectTypesMatch2(true);
|
|
348309
348519
|
var manufacturing_drc_properties = external_exports2.object({
|
|
@@ -348388,8 +348598,8 @@ var pcb_hole_circle = external_exports2.object({
|
|
|
348388
348598
|
pcb_component_id: external_exports2.string().optional(),
|
|
348389
348599
|
hole_shape: external_exports2.literal("circle"),
|
|
348390
348600
|
hole_diameter: external_exports2.number(),
|
|
348391
|
-
x:
|
|
348392
|
-
y:
|
|
348601
|
+
x: distance51,
|
|
348602
|
+
y: distance51,
|
|
348393
348603
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348394
348604
|
soldermask_margin: external_exports2.number().optional()
|
|
348395
348605
|
});
|
|
@@ -348404,8 +348614,8 @@ var pcb_hole_rect = external_exports2.object({
|
|
|
348404
348614
|
hole_shape: external_exports2.literal("rect"),
|
|
348405
348615
|
hole_width: external_exports2.number(),
|
|
348406
348616
|
hole_height: external_exports2.number(),
|
|
348407
|
-
x:
|
|
348408
|
-
y:
|
|
348617
|
+
x: distance51,
|
|
348618
|
+
y: distance51,
|
|
348409
348619
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348410
348620
|
soldermask_margin: external_exports2.number().optional()
|
|
348411
348621
|
});
|
|
@@ -348419,8 +348629,8 @@ var pcb_hole_circle_or_square = external_exports2.object({
|
|
|
348419
348629
|
pcb_component_id: external_exports2.string().optional(),
|
|
348420
348630
|
hole_shape: external_exports2.enum(["circle", "square"]),
|
|
348421
348631
|
hole_diameter: external_exports2.number(),
|
|
348422
|
-
x:
|
|
348423
|
-
y:
|
|
348632
|
+
x: distance51,
|
|
348633
|
+
y: distance51,
|
|
348424
348634
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348425
348635
|
soldermask_margin: external_exports2.number().optional()
|
|
348426
348636
|
});
|
|
@@ -348435,8 +348645,8 @@ var pcb_hole_oval = external_exports2.object({
|
|
|
348435
348645
|
hole_shape: external_exports2.literal("oval"),
|
|
348436
348646
|
hole_width: external_exports2.number(),
|
|
348437
348647
|
hole_height: external_exports2.number(),
|
|
348438
|
-
x:
|
|
348439
|
-
y:
|
|
348648
|
+
x: distance51,
|
|
348649
|
+
y: distance51,
|
|
348440
348650
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348441
348651
|
soldermask_margin: external_exports2.number().optional()
|
|
348442
348652
|
});
|
|
@@ -348451,8 +348661,8 @@ var pcb_hole_pill = external_exports2.object({
|
|
|
348451
348661
|
hole_shape: external_exports2.literal("pill"),
|
|
348452
348662
|
hole_width: external_exports2.number(),
|
|
348453
348663
|
hole_height: external_exports2.number(),
|
|
348454
|
-
x:
|
|
348455
|
-
y:
|
|
348664
|
+
x: distance51,
|
|
348665
|
+
y: distance51,
|
|
348456
348666
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348457
348667
|
soldermask_margin: external_exports2.number().optional()
|
|
348458
348668
|
});
|
|
@@ -348467,8 +348677,8 @@ var pcb_hole_rotated_pill = external_exports2.object({
|
|
|
348467
348677
|
hole_shape: external_exports2.literal("rotated_pill"),
|
|
348468
348678
|
hole_width: external_exports2.number(),
|
|
348469
348679
|
hole_height: external_exports2.number(),
|
|
348470
|
-
x:
|
|
348471
|
-
y:
|
|
348680
|
+
x: distance51,
|
|
348681
|
+
y: distance51,
|
|
348472
348682
|
ccw_rotation: rotation11,
|
|
348473
348683
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348474
348684
|
soldermask_margin: external_exports2.number().optional()
|
|
@@ -348484,8 +348694,8 @@ var pcb_plated_hole_circle = external_exports2.object({
|
|
|
348484
348694
|
outer_diameter: external_exports2.number(),
|
|
348485
348695
|
hole_diameter: external_exports2.number(),
|
|
348486
348696
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348487
|
-
x:
|
|
348488
|
-
y:
|
|
348697
|
+
x: distance51,
|
|
348698
|
+
y: distance51,
|
|
348489
348699
|
layers: external_exports2.array(layer_ref2),
|
|
348490
348700
|
port_hints: external_exports2.array(external_exports2.string()).optional(),
|
|
348491
348701
|
pcb_component_id: external_exports2.string().optional(),
|
|
@@ -348503,8 +348713,8 @@ var pcb_plated_hole_oval = external_exports2.object({
|
|
|
348503
348713
|
hole_width: external_exports2.number(),
|
|
348504
348714
|
hole_height: external_exports2.number(),
|
|
348505
348715
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348506
|
-
x:
|
|
348507
|
-
y:
|
|
348716
|
+
x: distance51,
|
|
348717
|
+
y: distance51,
|
|
348508
348718
|
ccw_rotation: rotation11,
|
|
348509
348719
|
layers: external_exports2.array(layer_ref2),
|
|
348510
348720
|
port_hints: external_exports2.array(external_exports2.string()).optional(),
|
|
@@ -348524,11 +348734,11 @@ var pcb_circular_hole_with_rect_pad = external_exports2.object({
|
|
|
348524
348734
|
rect_pad_width: external_exports2.number(),
|
|
348525
348735
|
rect_pad_height: external_exports2.number(),
|
|
348526
348736
|
rect_border_radius: external_exports2.number().optional(),
|
|
348527
|
-
hole_offset_x:
|
|
348528
|
-
hole_offset_y:
|
|
348737
|
+
hole_offset_x: distance51.default(0),
|
|
348738
|
+
hole_offset_y: distance51.default(0),
|
|
348529
348739
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348530
|
-
x:
|
|
348531
|
-
y:
|
|
348740
|
+
x: distance51,
|
|
348741
|
+
y: distance51,
|
|
348532
348742
|
layers: external_exports2.array(layer_ref2),
|
|
348533
348743
|
port_hints: external_exports2.array(external_exports2.string()).optional(),
|
|
348534
348744
|
pcb_component_id: external_exports2.string().optional(),
|
|
@@ -348549,11 +348759,11 @@ var pcb_pill_hole_with_rect_pad = external_exports2.object({
|
|
|
348549
348759
|
rect_pad_width: external_exports2.number(),
|
|
348550
348760
|
rect_pad_height: external_exports2.number(),
|
|
348551
348761
|
rect_border_radius: external_exports2.number().optional(),
|
|
348552
|
-
hole_offset_x:
|
|
348553
|
-
hole_offset_y:
|
|
348762
|
+
hole_offset_x: distance51.default(0),
|
|
348763
|
+
hole_offset_y: distance51.default(0),
|
|
348554
348764
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348555
|
-
x:
|
|
348556
|
-
y:
|
|
348765
|
+
x: distance51,
|
|
348766
|
+
y: distance51,
|
|
348557
348767
|
layers: external_exports2.array(layer_ref2),
|
|
348558
348768
|
port_hints: external_exports2.array(external_exports2.string()).optional(),
|
|
348559
348769
|
pcb_component_id: external_exports2.string().optional(),
|
|
@@ -348575,11 +348785,11 @@ var pcb_rotated_pill_hole_with_rect_pad = external_exports2.object({
|
|
|
348575
348785
|
rect_pad_height: external_exports2.number(),
|
|
348576
348786
|
rect_border_radius: external_exports2.number().optional(),
|
|
348577
348787
|
rect_ccw_rotation: rotation11,
|
|
348578
|
-
hole_offset_x:
|
|
348579
|
-
hole_offset_y:
|
|
348788
|
+
hole_offset_x: distance51.default(0),
|
|
348789
|
+
hole_offset_y: distance51.default(0),
|
|
348580
348790
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348581
|
-
x:
|
|
348582
|
-
y:
|
|
348791
|
+
x: distance51,
|
|
348792
|
+
y: distance51,
|
|
348583
348793
|
layers: external_exports2.array(layer_ref2),
|
|
348584
348794
|
port_hints: external_exports2.array(external_exports2.string()).optional(),
|
|
348585
348795
|
pcb_component_id: external_exports2.string().optional(),
|
|
@@ -348597,14 +348807,14 @@ var pcb_hole_with_polygon_pad = external_exports2.object({
|
|
|
348597
348807
|
hole_width: external_exports2.number().optional(),
|
|
348598
348808
|
hole_height: external_exports2.number().optional(),
|
|
348599
348809
|
pad_outline: external_exports2.array(external_exports2.object({
|
|
348600
|
-
x:
|
|
348601
|
-
y:
|
|
348810
|
+
x: distance51,
|
|
348811
|
+
y: distance51
|
|
348602
348812
|
})).min(3),
|
|
348603
|
-
hole_offset_x:
|
|
348604
|
-
hole_offset_y:
|
|
348813
|
+
hole_offset_x: distance51.default(0),
|
|
348814
|
+
hole_offset_y: distance51.default(0),
|
|
348605
348815
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348606
|
-
x:
|
|
348607
|
-
y:
|
|
348816
|
+
x: distance51,
|
|
348817
|
+
y: distance51,
|
|
348608
348818
|
layers: external_exports2.array(layer_ref2),
|
|
348609
348819
|
port_hints: external_exports2.array(external_exports2.string()).optional(),
|
|
348610
348820
|
pcb_component_id: external_exports2.string().optional(),
|
|
@@ -348634,8 +348844,8 @@ var pcb_port = external_exports2.object({
|
|
|
348634
348844
|
subcircuit_id: external_exports2.string().optional(),
|
|
348635
348845
|
source_port_id: external_exports2.string(),
|
|
348636
348846
|
pcb_component_id: external_exports2.string().optional(),
|
|
348637
|
-
x:
|
|
348638
|
-
y:
|
|
348847
|
+
x: distance51,
|
|
348848
|
+
y: distance51,
|
|
348639
348849
|
layers: external_exports2.array(layer_ref2),
|
|
348640
348850
|
is_board_pinout: external_exports2.boolean().optional()
|
|
348641
348851
|
}).describe("Defines a port on the PCB");
|
|
@@ -348646,8 +348856,8 @@ var pcb_smtpad_circle = external_exports2.object({
|
|
|
348646
348856
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
348647
348857
|
pcb_group_id: external_exports2.string().optional(),
|
|
348648
348858
|
subcircuit_id: external_exports2.string().optional(),
|
|
348649
|
-
x:
|
|
348650
|
-
y:
|
|
348859
|
+
x: distance51,
|
|
348860
|
+
y: distance51,
|
|
348651
348861
|
radius: external_exports2.number(),
|
|
348652
348862
|
layer: layer_ref2,
|
|
348653
348863
|
port_hints: external_exports2.array(external_exports2.string()).optional(),
|
|
@@ -348663,8 +348873,8 @@ var pcb_smtpad_rect = external_exports2.object({
|
|
|
348663
348873
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
348664
348874
|
pcb_group_id: external_exports2.string().optional(),
|
|
348665
348875
|
subcircuit_id: external_exports2.string().optional(),
|
|
348666
|
-
x:
|
|
348667
|
-
y:
|
|
348876
|
+
x: distance51,
|
|
348877
|
+
y: distance51,
|
|
348668
348878
|
width: external_exports2.number(),
|
|
348669
348879
|
height: external_exports2.number(),
|
|
348670
348880
|
rect_border_radius: external_exports2.number().optional(),
|
|
@@ -348687,8 +348897,8 @@ var pcb_smtpad_rotated_rect = external_exports2.object({
|
|
|
348687
348897
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
348688
348898
|
pcb_group_id: external_exports2.string().optional(),
|
|
348689
348899
|
subcircuit_id: external_exports2.string().optional(),
|
|
348690
|
-
x:
|
|
348691
|
-
y:
|
|
348900
|
+
x: distance51,
|
|
348901
|
+
y: distance51,
|
|
348692
348902
|
width: external_exports2.number(),
|
|
348693
348903
|
height: external_exports2.number(),
|
|
348694
348904
|
rect_border_radius: external_exports2.number().optional(),
|
|
@@ -348712,8 +348922,8 @@ var pcb_smtpad_pill = external_exports2.object({
|
|
|
348712
348922
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
348713
348923
|
pcb_group_id: external_exports2.string().optional(),
|
|
348714
348924
|
subcircuit_id: external_exports2.string().optional(),
|
|
348715
|
-
x:
|
|
348716
|
-
y:
|
|
348925
|
+
x: distance51,
|
|
348926
|
+
y: distance51,
|
|
348717
348927
|
width: external_exports2.number(),
|
|
348718
348928
|
height: external_exports2.number(),
|
|
348719
348929
|
radius: external_exports2.number(),
|
|
@@ -348731,8 +348941,8 @@ var pcb_smtpad_rotated_pill = external_exports2.object({
|
|
|
348731
348941
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
348732
348942
|
pcb_group_id: external_exports2.string().optional(),
|
|
348733
348943
|
subcircuit_id: external_exports2.string().optional(),
|
|
348734
|
-
x:
|
|
348735
|
-
y:
|
|
348944
|
+
x: distance51,
|
|
348945
|
+
y: distance51,
|
|
348736
348946
|
width: external_exports2.number(),
|
|
348737
348947
|
height: external_exports2.number(),
|
|
348738
348948
|
radius: external_exports2.number(),
|
|
@@ -348780,8 +348990,8 @@ var pcb_solder_paste_circle = external_exports2.object({
|
|
|
348780
348990
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
348781
348991
|
pcb_group_id: external_exports2.string().optional(),
|
|
348782
348992
|
subcircuit_id: external_exports2.string().optional(),
|
|
348783
|
-
x:
|
|
348784
|
-
y:
|
|
348993
|
+
x: distance51,
|
|
348994
|
+
y: distance51,
|
|
348785
348995
|
radius: external_exports2.number(),
|
|
348786
348996
|
layer: layer_ref2,
|
|
348787
348997
|
pcb_component_id: external_exports2.string().optional(),
|
|
@@ -348793,8 +349003,8 @@ var pcb_solder_paste_rect = external_exports2.object({
|
|
|
348793
349003
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
348794
349004
|
pcb_group_id: external_exports2.string().optional(),
|
|
348795
349005
|
subcircuit_id: external_exports2.string().optional(),
|
|
348796
|
-
x:
|
|
348797
|
-
y:
|
|
349006
|
+
x: distance51,
|
|
349007
|
+
y: distance51,
|
|
348798
349008
|
width: external_exports2.number(),
|
|
348799
349009
|
height: external_exports2.number(),
|
|
348800
349010
|
layer: layer_ref2,
|
|
@@ -348807,8 +349017,8 @@ var pcb_solder_paste_pill = external_exports2.object({
|
|
|
348807
349017
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
348808
349018
|
pcb_group_id: external_exports2.string().optional(),
|
|
348809
349019
|
subcircuit_id: external_exports2.string().optional(),
|
|
348810
|
-
x:
|
|
348811
|
-
y:
|
|
349020
|
+
x: distance51,
|
|
349021
|
+
y: distance51,
|
|
348812
349022
|
width: external_exports2.number(),
|
|
348813
349023
|
height: external_exports2.number(),
|
|
348814
349024
|
radius: external_exports2.number(),
|
|
@@ -348822,11 +349032,11 @@ var pcb_solder_paste_rotated_rect = external_exports2.object({
|
|
|
348822
349032
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
348823
349033
|
pcb_group_id: external_exports2.string().optional(),
|
|
348824
349034
|
subcircuit_id: external_exports2.string().optional(),
|
|
348825
|
-
x:
|
|
348826
|
-
y:
|
|
349035
|
+
x: distance51,
|
|
349036
|
+
y: distance51,
|
|
348827
349037
|
width: external_exports2.number(),
|
|
348828
349038
|
height: external_exports2.number(),
|
|
348829
|
-
ccw_rotation:
|
|
349039
|
+
ccw_rotation: distance51,
|
|
348830
349040
|
layer: layer_ref2,
|
|
348831
349041
|
pcb_component_id: external_exports2.string().optional(),
|
|
348832
349042
|
pcb_smtpad_id: external_exports2.string().optional()
|
|
@@ -348837,8 +349047,8 @@ var pcb_solder_paste_rotated_pill = external_exports2.object({
|
|
|
348837
349047
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
348838
349048
|
pcb_group_id: external_exports2.string().optional(),
|
|
348839
349049
|
subcircuit_id: external_exports2.string().optional(),
|
|
348840
|
-
x:
|
|
348841
|
-
y:
|
|
349050
|
+
x: distance51,
|
|
349051
|
+
y: distance51,
|
|
348842
349052
|
width: external_exports2.number(),
|
|
348843
349053
|
height: external_exports2.number(),
|
|
348844
349054
|
radius: external_exports2.number(),
|
|
@@ -348853,8 +349063,8 @@ var pcb_solder_paste_oval = external_exports2.object({
|
|
|
348853
349063
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
348854
349064
|
pcb_group_id: external_exports2.string().optional(),
|
|
348855
349065
|
subcircuit_id: external_exports2.string().optional(),
|
|
348856
|
-
x:
|
|
348857
|
-
y:
|
|
349066
|
+
x: distance51,
|
|
349067
|
+
y: distance51,
|
|
348858
349068
|
width: external_exports2.number(),
|
|
348859
349069
|
height: external_exports2.number(),
|
|
348860
349070
|
layer: layer_ref2,
|
|
@@ -348891,9 +349101,9 @@ var pcb_text = external_exports2.object({
|
|
|
348891
349101
|
expectTypesMatch2(true);
|
|
348892
349102
|
var pcb_trace_route_point_wire = external_exports2.object({
|
|
348893
349103
|
route_type: external_exports2.literal("wire"),
|
|
348894
|
-
x:
|
|
348895
|
-
y:
|
|
348896
|
-
width:
|
|
349104
|
+
x: distance51,
|
|
349105
|
+
y: distance51,
|
|
349106
|
+
width: distance51,
|
|
348897
349107
|
copper_pour_id: external_exports2.string().optional(),
|
|
348898
349108
|
is_inside_copper_pour: external_exports2.boolean().optional(),
|
|
348899
349109
|
start_pcb_port_id: external_exports2.string().optional(),
|
|
@@ -348902,12 +349112,12 @@ var pcb_trace_route_point_wire = external_exports2.object({
|
|
|
348902
349112
|
});
|
|
348903
349113
|
var pcb_trace_route_point_via = external_exports2.object({
|
|
348904
349114
|
route_type: external_exports2.literal("via"),
|
|
348905
|
-
x:
|
|
348906
|
-
y:
|
|
349115
|
+
x: distance51,
|
|
349116
|
+
y: distance51,
|
|
348907
349117
|
copper_pour_id: external_exports2.string().optional(),
|
|
348908
349118
|
is_inside_copper_pour: external_exports2.boolean().optional(),
|
|
348909
|
-
hole_diameter:
|
|
348910
|
-
outer_diameter:
|
|
349119
|
+
hole_diameter: distance51.optional(),
|
|
349120
|
+
outer_diameter: distance51.optional(),
|
|
348911
349121
|
from_layer: layer_ref2,
|
|
348912
349122
|
to_layer: layer_ref2
|
|
348913
349123
|
});
|
|
@@ -348915,7 +349125,7 @@ var pcb_trace_route_point_through_pad = external_exports2.object({
|
|
|
348915
349125
|
route_type: external_exports2.literal("through_pad"),
|
|
348916
349126
|
start: point9,
|
|
348917
349127
|
end: point9,
|
|
348918
|
-
width:
|
|
349128
|
+
width: distance51,
|
|
348919
349129
|
start_layer: layer_ref2,
|
|
348920
349130
|
end_layer: layer_ref2,
|
|
348921
349131
|
pcb_smtpad_id: external_exports2.string().optional(),
|
|
@@ -348963,8 +349173,8 @@ var pcb_trace_too_long_warning = external_exports2.object({
|
|
|
348963
349173
|
pcb_trace_id: external_exports2.string(),
|
|
348964
349174
|
source_net_id: external_exports2.string().optional(),
|
|
348965
349175
|
source_trace_id: external_exports2.string().optional(),
|
|
348966
|
-
actual_trace_length:
|
|
348967
|
-
maximum_trace_length:
|
|
349176
|
+
actual_trace_length: distance51,
|
|
349177
|
+
maximum_trace_length: distance51,
|
|
348968
349178
|
subcircuit_id: external_exports2.string().optional()
|
|
348969
349179
|
}).describe("Warning emitted when a PCB trace is longer than its maximum allowed length");
|
|
348970
349180
|
expectTypesMatch2(true);
|
|
@@ -349034,10 +349244,10 @@ var pcb_via = external_exports2.object({
|
|
|
349034
349244
|
pcb_group_id: external_exports2.string().optional(),
|
|
349035
349245
|
subcircuit_id: external_exports2.string().optional(),
|
|
349036
349246
|
subcircuit_connectivity_map_key: external_exports2.string().optional(),
|
|
349037
|
-
x:
|
|
349038
|
-
y:
|
|
349039
|
-
outer_diameter:
|
|
349040
|
-
hole_diameter:
|
|
349247
|
+
x: distance51,
|
|
349248
|
+
y: distance51,
|
|
349249
|
+
outer_diameter: distance51.default("0.6mm"),
|
|
349250
|
+
hole_diameter: distance51.default("0.25mm"),
|
|
349041
349251
|
from_layer: layer_ref2.optional(),
|
|
349042
349252
|
to_layer: layer_ref2.optional(),
|
|
349043
349253
|
layers: external_exports2.array(layer_ref2),
|
|
@@ -349125,11 +349335,11 @@ var pcb_silkscreen_line = external_exports2.object({
|
|
|
349125
349335
|
pcb_component_id: external_exports2.string(),
|
|
349126
349336
|
pcb_group_id: external_exports2.string().optional(),
|
|
349127
349337
|
subcircuit_id: external_exports2.string().optional(),
|
|
349128
|
-
stroke_width:
|
|
349129
|
-
x1:
|
|
349130
|
-
y1:
|
|
349131
|
-
x2:
|
|
349132
|
-
y2:
|
|
349338
|
+
stroke_width: distance51.default("0.1mm"),
|
|
349339
|
+
x1: distance51,
|
|
349340
|
+
y1: distance51,
|
|
349341
|
+
x2: distance51,
|
|
349342
|
+
y2: distance51,
|
|
349133
349343
|
layer: visible_layer
|
|
349134
349344
|
}).describe("Defines a silkscreen line on the PCB");
|
|
349135
349345
|
expectTypesMatch2(true);
|
|
@@ -349150,7 +349360,7 @@ var pcb_silkscreen_text = external_exports2.object({
|
|
|
349150
349360
|
pcb_group_id: external_exports2.string().optional(),
|
|
349151
349361
|
subcircuit_id: external_exports2.string().optional(),
|
|
349152
349362
|
font: external_exports2.literal("tscircuit2024").default("tscircuit2024"),
|
|
349153
|
-
font_size:
|
|
349363
|
+
font_size: distance51.default("0.2mm"),
|
|
349154
349364
|
pcb_component_id: external_exports2.string(),
|
|
349155
349365
|
text: external_exports2.string(),
|
|
349156
349366
|
is_knockout: external_exports2.boolean().default(false).optional(),
|
|
@@ -349178,7 +349388,7 @@ var pcb_copper_text = external_exports2.object({
|
|
|
349178
349388
|
pcb_group_id: external_exports2.string().optional(),
|
|
349179
349389
|
subcircuit_id: external_exports2.string().optional(),
|
|
349180
349390
|
font: external_exports2.literal("tscircuit2024").default("tscircuit2024"),
|
|
349181
|
-
font_size:
|
|
349391
|
+
font_size: distance51.default("0.2mm"),
|
|
349182
349392
|
pcb_component_id: external_exports2.string(),
|
|
349183
349393
|
text: external_exports2.string(),
|
|
349184
349394
|
is_knockout: external_exports2.boolean().default(false).optional(),
|
|
@@ -349238,8 +349448,8 @@ var pcb_silkscreen_oval = external_exports2.object({
|
|
|
349238
349448
|
pcb_group_id: external_exports2.string().optional(),
|
|
349239
349449
|
subcircuit_id: external_exports2.string().optional(),
|
|
349240
349450
|
center: point9,
|
|
349241
|
-
radius_x:
|
|
349242
|
-
radius_y:
|
|
349451
|
+
radius_x: distance51,
|
|
349452
|
+
radius_y: distance51,
|
|
349243
349453
|
layer: visible_layer,
|
|
349244
349454
|
ccw_rotation: rotation11.optional()
|
|
349245
349455
|
}).describe("Defines a silkscreen oval on the PCB");
|
|
@@ -349279,7 +349489,7 @@ var pcb_fabrication_note_text2 = external_exports2.object({
|
|
|
349279
349489
|
subcircuit_id: external_exports2.string().optional(),
|
|
349280
349490
|
pcb_group_id: external_exports2.string().optional(),
|
|
349281
349491
|
font: external_exports2.literal("tscircuit2024").default("tscircuit2024"),
|
|
349282
|
-
font_size:
|
|
349492
|
+
font_size: distance51.default("1mm"),
|
|
349283
349493
|
pcb_component_id: external_exports2.string(),
|
|
349284
349494
|
text: external_exports2.string(),
|
|
349285
349495
|
ccw_rotation: external_exports2.number().optional(),
|
|
@@ -349349,7 +349559,7 @@ var pcb_note_text2 = external_exports2.object({
|
|
|
349349
349559
|
subcircuit_id: external_exports2.string().optional(),
|
|
349350
349560
|
name: external_exports2.string().optional(),
|
|
349351
349561
|
font: external_exports2.literal("tscircuit2024").default("tscircuit2024"),
|
|
349352
|
-
font_size:
|
|
349562
|
+
font_size: distance51.default("1mm"),
|
|
349353
349563
|
text: external_exports2.string().optional(),
|
|
349354
349564
|
anchor_position: point9.default({ x: 0, y: 0 }),
|
|
349355
349565
|
anchor_alignment: external_exports2.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
@@ -349400,12 +349610,12 @@ var pcb_note_line2 = external_exports2.object({
|
|
|
349400
349610
|
subcircuit_id: external_exports2.string().optional(),
|
|
349401
349611
|
name: external_exports2.string().optional(),
|
|
349402
349612
|
text: external_exports2.string().optional(),
|
|
349403
|
-
x1:
|
|
349404
|
-
y1:
|
|
349405
|
-
x2:
|
|
349406
|
-
y2:
|
|
349613
|
+
x1: distance51,
|
|
349614
|
+
y1: distance51,
|
|
349615
|
+
x2: distance51,
|
|
349616
|
+
y2: distance51,
|
|
349407
349617
|
layer: visible_layer.default("top"),
|
|
349408
|
-
stroke_width:
|
|
349618
|
+
stroke_width: distance51.default("0.1mm"),
|
|
349409
349619
|
color: external_exports2.string().optional(),
|
|
349410
349620
|
is_dashed: external_exports2.boolean().optional()
|
|
349411
349621
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
@@ -349456,8 +349666,8 @@ var pcb_keepout2 = external_exports2.object({
|
|
|
349456
349666
|
pcb_group_id: external_exports2.string().optional(),
|
|
349457
349667
|
subcircuit_id: external_exports2.string().optional(),
|
|
349458
349668
|
center: point9,
|
|
349459
|
-
width:
|
|
349460
|
-
height:
|
|
349669
|
+
width: distance51,
|
|
349670
|
+
height: distance51,
|
|
349461
349671
|
pcb_keepout_id: external_exports2.string(),
|
|
349462
349672
|
layers: external_exports2.array(external_exports2.string()),
|
|
349463
349673
|
description: external_exports2.string().optional(),
|
|
@@ -349468,7 +349678,7 @@ var pcb_keepout2 = external_exports2.object({
|
|
|
349468
349678
|
pcb_group_id: external_exports2.string().optional(),
|
|
349469
349679
|
subcircuit_id: external_exports2.string().optional(),
|
|
349470
349680
|
center: point9,
|
|
349471
|
-
radius:
|
|
349681
|
+
radius: distance51,
|
|
349472
349682
|
pcb_keepout_id: external_exports2.string(),
|
|
349473
349683
|
layers: external_exports2.array(external_exports2.string()),
|
|
349474
349684
|
description: external_exports2.string().optional(),
|
|
@@ -349644,8 +349854,8 @@ var pcb_breakout_point = external_exports2.object({
|
|
|
349644
349854
|
source_port_id: external_exports2.string().optional(),
|
|
349645
349855
|
source_net_id: external_exports2.string().optional(),
|
|
349646
349856
|
layer: layer_ref2.optional(),
|
|
349647
|
-
x:
|
|
349648
|
-
y:
|
|
349857
|
+
x: distance51,
|
|
349858
|
+
y: distance51
|
|
349649
349859
|
}).describe("Defines a routing target within a pcb_group for a source_trace or source_net");
|
|
349650
349860
|
expectTypesMatch2(true);
|
|
349651
349861
|
var pcb_ground_plane = external_exports2.object({
|
|
@@ -349673,9 +349883,9 @@ var pcb_thermal_spoke = external_exports2.object({
|
|
|
349673
349883
|
pcb_ground_plane_id: external_exports2.string(),
|
|
349674
349884
|
shape: external_exports2.string(),
|
|
349675
349885
|
spoke_count: external_exports2.number(),
|
|
349676
|
-
spoke_thickness:
|
|
349677
|
-
spoke_inner_diameter:
|
|
349678
|
-
spoke_outer_diameter:
|
|
349886
|
+
spoke_thickness: distance51,
|
|
349887
|
+
spoke_inner_diameter: distance51,
|
|
349888
|
+
spoke_outer_diameter: distance51,
|
|
349679
349889
|
pcb_plated_hole_id: external_exports2.string().optional(),
|
|
349680
349890
|
subcircuit_id: external_exports2.string().optional()
|
|
349681
349891
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
@@ -349757,8 +349967,8 @@ var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
|
349757
349967
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
349758
349968
|
error_type: external_exports2.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
349759
349969
|
pcb_via_ids: external_exports2.array(external_exports2.string()).min(2),
|
|
349760
|
-
minimum_clearance:
|
|
349761
|
-
actual_clearance:
|
|
349970
|
+
minimum_clearance: distance51.optional(),
|
|
349971
|
+
actual_clearance: distance51.optional(),
|
|
349762
349972
|
pcb_center: external_exports2.object({
|
|
349763
349973
|
x: external_exports2.number().optional(),
|
|
349764
349974
|
y: external_exports2.number().optional()
|
|
@@ -349772,8 +349982,8 @@ var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
|
349772
349982
|
error_type: external_exports2.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
349773
349983
|
pcb_via_id: external_exports2.string(),
|
|
349774
349984
|
pcb_trace_id: external_exports2.string(),
|
|
349775
|
-
minimum_clearance:
|
|
349776
|
-
actual_clearance:
|
|
349985
|
+
minimum_clearance: distance51.optional(),
|
|
349986
|
+
actual_clearance: distance51.optional(),
|
|
349777
349987
|
center: external_exports2.object({
|
|
349778
349988
|
x: external_exports2.number().optional(),
|
|
349779
349989
|
y: external_exports2.number().optional()
|
|
@@ -349786,8 +349996,8 @@ var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
|
349786
349996
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault("pcb_pad_pad_clearance_error"),
|
|
349787
349997
|
error_type: external_exports2.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
349788
349998
|
pcb_pad_ids: external_exports2.array(external_exports2.string()).min(2),
|
|
349789
|
-
minimum_clearance:
|
|
349790
|
-
actual_clearance:
|
|
349999
|
+
minimum_clearance: distance51.optional(),
|
|
350000
|
+
actual_clearance: distance51.optional(),
|
|
349791
350001
|
center: external_exports2.object({
|
|
349792
350002
|
x: external_exports2.number().optional(),
|
|
349793
350003
|
y: external_exports2.number().optional()
|
|
@@ -349801,8 +350011,8 @@ var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
|
349801
350011
|
error_type: external_exports2.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
349802
350012
|
pcb_pad_id: external_exports2.string(),
|
|
349803
350013
|
pcb_trace_id: external_exports2.string(),
|
|
349804
|
-
minimum_clearance:
|
|
349805
|
-
actual_clearance:
|
|
350014
|
+
minimum_clearance: distance51.optional(),
|
|
350015
|
+
actual_clearance: distance51.optional(),
|
|
349806
350016
|
center: external_exports2.object({
|
|
349807
350017
|
x: external_exports2.number().optional(),
|
|
349808
350018
|
y: external_exports2.number().optional()
|
|
@@ -354008,14 +354218,14 @@ var getEasyEdaCadModelPlacement = async (easyEdaJson, { fetch: fetch2 = globalTh
|
|
|
354008
354218
|
placementCache.set(cacheKey, placementPromise);
|
|
354009
354219
|
return placementPromise;
|
|
354010
354220
|
};
|
|
354011
|
-
var
|
|
354221
|
+
var round3 = (value) => Number(value.toFixed(6));
|
|
354012
354222
|
var EASYEDA_SCHEMATIC_UNIT_TO_TSCIRCUIT_UNIT = 0.02;
|
|
354013
|
-
var toSchematicUnits = (value) =>
|
|
354223
|
+
var toSchematicUnits = (value) => round3(value * EASYEDA_SCHEMATIC_UNIT_TO_TSCIRCUIT_UNIT);
|
|
354014
354224
|
var getPointTransformer = (origin) => (point2) => ({
|
|
354015
354225
|
x: toSchematicUnits(point2.x - origin.x),
|
|
354016
354226
|
y: toSchematicUnits(origin.y - point2.y)
|
|
354017
354227
|
});
|
|
354018
|
-
var formatNumber7 = (value) => String(
|
|
354228
|
+
var formatNumber7 = (value) => String(round3(value));
|
|
354019
354229
|
var SVG_PATH_COMMAND_PARAMETER_COUNTS = {
|
|
354020
354230
|
A: 7,
|
|
354021
354231
|
C: 6,
|
|
@@ -354165,8 +354375,8 @@ var alignPortToDrawing = ({
|
|
|
354165
354375
|
if (!nearestEndpoint)
|
|
354166
354376
|
return position2;
|
|
354167
354377
|
return {
|
|
354168
|
-
x:
|
|
354169
|
-
y:
|
|
354378
|
+
x: round3(nearestEndpoint.x + outwardDirection.x * stemLength),
|
|
354379
|
+
y: round3(nearestEndpoint.y + outwardDirection.y * stemLength)
|
|
354170
354380
|
};
|
|
354171
354381
|
};
|
|
354172
354382
|
var getTextFontSize = (fontSize) => {
|
|
@@ -354284,7 +354494,7 @@ var generateShapeTsx = ({
|
|
|
354284
354494
|
if (shape.visibility !== "1")
|
|
354285
354495
|
return;
|
|
354286
354496
|
const position2 = transformPoint({ x: shape.x, y: shape.y });
|
|
354287
|
-
return `<schematictext schX={${position2.x}} schY={${position2.y}} text=${JSON.stringify(shape.content)} fontSize={${getTextFontSize(shape.fontSize)}} anchor=${JSON.stringify(getTextAnchor(shape.alignment))} color=${JSON.stringify(shape.fontColor)} schRotation={${
|
|
354497
|
+
return `<schematictext schX={${position2.x}} schY={${position2.y}} text=${JSON.stringify(shape.content)} fontSize={${getTextFontSize(shape.fontSize)}} anchor=${JSON.stringify(getTextAnchor(shape.alignment))} color=${JSON.stringify(shape.fontColor)} schRotation={${round3(-shape.rotation)}} />`;
|
|
354288
354498
|
}
|
|
354289
354499
|
if (shape.type === "PIN" && portMetadata) {
|
|
354290
354500
|
if (shape.visibility !== "show")
|
|
@@ -355532,7 +355742,7 @@ __export6(dist_exports2, {
|
|
|
355532
355742
|
capacitance: () => capacitance5,
|
|
355533
355743
|
circuit_json_footprint_load_error: () => circuit_json_footprint_load_error3,
|
|
355534
355744
|
current: () => current3,
|
|
355535
|
-
distance: () =>
|
|
355745
|
+
distance: () => distance53,
|
|
355536
355746
|
duration_ms: () => duration_ms2,
|
|
355537
355747
|
experiment_type: () => experiment_type2,
|
|
355538
355748
|
external_footprint_load_error: () => external_footprint_load_error3,
|
|
@@ -356077,7 +356287,7 @@ var inductance3 = z56.string().or(z56.number()).transform((v) => parseAndConvert
|
|
|
356077
356287
|
var voltage6 = z56.string().or(z56.number()).transform((v) => parseAndConvertSiUnit2(v, "V").value);
|
|
356078
356288
|
var length68 = z56.string().or(z56.number()).transform((v) => parseAndConvertSiUnit2(v).value);
|
|
356079
356289
|
var frequency8 = z56.string().or(z56.number()).transform((v) => parseAndConvertSiUnit2(v, "Hz").value);
|
|
356080
|
-
var
|
|
356290
|
+
var distance53 = length68;
|
|
356081
356291
|
var current3 = z56.string().or(z56.number()).transform((v) => parseAndConvertSiUnit2(v, "A").value);
|
|
356082
356292
|
var duration_ms2 = z56.string().or(z56.number()).transform((v) => parseAndConvertSiUnit2(v).value);
|
|
356083
356293
|
var time2 = duration_ms2;
|
|
@@ -356118,16 +356328,16 @@ expectStringUnionsMatch2('T2 has extra: "c"');
|
|
|
356118
356328
|
expectStringUnionsMatch2('T1 has extra: "d", T2 has extra: "c"');
|
|
356119
356329
|
expectStringUnionsMatch2(true);
|
|
356120
356330
|
var point10 = z211.object({
|
|
356121
|
-
x:
|
|
356122
|
-
y:
|
|
356331
|
+
x: distance53,
|
|
356332
|
+
y: distance53
|
|
356123
356333
|
});
|
|
356124
356334
|
var position2 = point10;
|
|
356125
356335
|
expectTypesMatch3(true);
|
|
356126
356336
|
expectTypesMatch3(true);
|
|
356127
356337
|
var point34 = z311.object({
|
|
356128
|
-
x:
|
|
356129
|
-
y:
|
|
356130
|
-
z:
|
|
356338
|
+
x: distance53,
|
|
356339
|
+
y: distance53,
|
|
356340
|
+
z: distance53
|
|
356131
356341
|
});
|
|
356132
356342
|
var position32 = point34;
|
|
356133
356343
|
expectTypesMatch3(true);
|
|
@@ -356192,7 +356402,7 @@ var kicadAt3 = point10.extend({
|
|
|
356192
356402
|
expectTypesMatch3(true);
|
|
356193
356403
|
var kicadFont3 = z94.object({
|
|
356194
356404
|
size: point10.optional(),
|
|
356195
|
-
thickness:
|
|
356405
|
+
thickness: distance53.optional()
|
|
356196
356406
|
});
|
|
356197
356407
|
expectTypesMatch3(true);
|
|
356198
356408
|
var kicadEffects3 = z94.object({
|
|
@@ -356228,7 +356438,7 @@ var kicadFootprintPad3 = z94.object({
|
|
|
356228
356438
|
shape: z94.string().optional(),
|
|
356229
356439
|
at: kicadAt3.optional(),
|
|
356230
356440
|
size: point10.optional(),
|
|
356231
|
-
drill:
|
|
356441
|
+
drill: distance53.optional(),
|
|
356232
356442
|
layers: z94.array(z94.string()).optional(),
|
|
356233
356443
|
removeUnusedLayers: z94.boolean().optional(),
|
|
356234
356444
|
uuid: z94.string().optional()
|
|
@@ -356259,7 +356469,7 @@ var kicadSymbolPinNumbers3 = z103.object({
|
|
|
356259
356469
|
});
|
|
356260
356470
|
expectTypesMatch3(true);
|
|
356261
356471
|
var kicadSymbolPinNames3 = z103.object({
|
|
356262
|
-
offset:
|
|
356472
|
+
offset: distance53.optional(),
|
|
356263
356473
|
hide: z103.boolean().optional()
|
|
356264
356474
|
});
|
|
356265
356475
|
expectTypesMatch3(true);
|
|
@@ -356333,7 +356543,7 @@ var source_simple_capacitor2 = source_component_base2.extend({
|
|
|
356333
356543
|
capacitance: capacitance5,
|
|
356334
356544
|
max_voltage_rating: voltage6.optional(),
|
|
356335
356545
|
display_capacitance: z143.string().optional(),
|
|
356336
|
-
max_decoupling_trace_length:
|
|
356546
|
+
max_decoupling_trace_length: distance53.optional()
|
|
356337
356547
|
});
|
|
356338
356548
|
expectTypesMatch3(true);
|
|
356339
356549
|
var source_simple_resistor2 = source_component_base2.extend({
|
|
@@ -356891,11 +357101,11 @@ var schematic_box2 = z722.object({
|
|
|
356891
357101
|
schematic_sheet_id: z722.string().optional(),
|
|
356892
357102
|
schematic_component_id: z722.string().optional(),
|
|
356893
357103
|
schematic_symbol_id: z722.string().optional(),
|
|
356894
|
-
width:
|
|
356895
|
-
height:
|
|
357104
|
+
width: distance53,
|
|
357105
|
+
height: distance53,
|
|
356896
357106
|
is_dashed: z722.boolean().default(false),
|
|
356897
|
-
x:
|
|
356898
|
-
y:
|
|
357107
|
+
x: distance53,
|
|
357108
|
+
y: distance53,
|
|
356899
357109
|
subcircuit_id: z722.string().optional()
|
|
356900
357110
|
}).describe("Draws a box on the schematic");
|
|
356901
357111
|
expectTypesMatch3(true);
|
|
@@ -356908,10 +357118,10 @@ var schematic_path2 = z732.object({
|
|
|
356908
357118
|
fill_color: z732.string().optional(),
|
|
356909
357119
|
is_filled: z732.boolean().optional(),
|
|
356910
357120
|
is_dashed: z732.boolean().default(false),
|
|
356911
|
-
stroke_width:
|
|
357121
|
+
stroke_width: distance53.nullable().optional(),
|
|
356912
357122
|
stroke_color: z732.string().optional(),
|
|
356913
|
-
dash_length:
|
|
356914
|
-
dash_gap:
|
|
357123
|
+
dash_length: distance53.optional(),
|
|
357124
|
+
dash_gap: distance53.optional(),
|
|
356915
357125
|
points: z732.array(point10),
|
|
356916
357126
|
subcircuit_id: z732.string().optional()
|
|
356917
357127
|
});
|
|
@@ -356990,15 +357200,15 @@ var schematic_line2 = z76.object({
|
|
|
356990
357200
|
schematic_sheet_id: z76.string().optional(),
|
|
356991
357201
|
schematic_component_id: z76.string().optional(),
|
|
356992
357202
|
schematic_symbol_id: z76.string().optional(),
|
|
356993
|
-
x1:
|
|
356994
|
-
y1:
|
|
356995
|
-
x2:
|
|
356996
|
-
y2:
|
|
356997
|
-
stroke_width:
|
|
357203
|
+
x1: distance53,
|
|
357204
|
+
y1: distance53,
|
|
357205
|
+
x2: distance53,
|
|
357206
|
+
y2: distance53,
|
|
357207
|
+
stroke_width: distance53.nullable().optional(),
|
|
356998
357208
|
color: z76.string().default("#000000"),
|
|
356999
357209
|
is_dashed: z76.boolean().default(false),
|
|
357000
|
-
dash_length:
|
|
357001
|
-
dash_gap:
|
|
357210
|
+
dash_length: distance53.optional(),
|
|
357211
|
+
dash_gap: distance53.optional(),
|
|
357002
357212
|
subcircuit_id: z76.string().optional()
|
|
357003
357213
|
}).describe("Draws a styled line on the schematic");
|
|
357004
357214
|
expectTypesMatch3(true);
|
|
@@ -357009,10 +357219,10 @@ var schematic_rect2 = z77.object({
|
|
|
357009
357219
|
schematic_component_id: z77.string().optional(),
|
|
357010
357220
|
schematic_symbol_id: z77.string().optional(),
|
|
357011
357221
|
center: point10,
|
|
357012
|
-
width:
|
|
357013
|
-
height:
|
|
357222
|
+
width: distance53,
|
|
357223
|
+
height: distance53,
|
|
357014
357224
|
rotation: rotation12.default(0),
|
|
357015
|
-
stroke_width:
|
|
357225
|
+
stroke_width: distance53.nullable().optional(),
|
|
357016
357226
|
color: z77.string().default("#000000"),
|
|
357017
357227
|
is_filled: z77.boolean().default(false),
|
|
357018
357228
|
fill_color: z77.string().optional(),
|
|
@@ -357027,8 +357237,8 @@ var schematic_circle2 = z78.object({
|
|
|
357027
357237
|
schematic_component_id: z78.string().optional(),
|
|
357028
357238
|
schematic_symbol_id: z78.string().optional(),
|
|
357029
357239
|
center: point10,
|
|
357030
|
-
radius:
|
|
357031
|
-
stroke_width:
|
|
357240
|
+
radius: distance53,
|
|
357241
|
+
stroke_width: distance53.nullable().optional(),
|
|
357032
357242
|
color: z78.string().default("#000000"),
|
|
357033
357243
|
is_filled: z78.boolean().default(false),
|
|
357034
357244
|
fill_color: z78.string().optional(),
|
|
@@ -357043,11 +357253,11 @@ var schematic_arc2 = z79.object({
|
|
|
357043
357253
|
schematic_component_id: z79.string().optional(),
|
|
357044
357254
|
schematic_symbol_id: z79.string().optional(),
|
|
357045
357255
|
center: point10,
|
|
357046
|
-
radius:
|
|
357256
|
+
radius: distance53,
|
|
357047
357257
|
start_angle_degrees: rotation12,
|
|
357048
357258
|
end_angle_degrees: rotation12,
|
|
357049
357259
|
direction: z79.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
357050
|
-
stroke_width:
|
|
357260
|
+
stroke_width: distance53.nullable().optional(),
|
|
357051
357261
|
color: z79.string().default("#000000"),
|
|
357052
357262
|
is_dashed: z79.boolean().default(false),
|
|
357053
357263
|
subcircuit_id: z79.string().optional()
|
|
@@ -357097,8 +357307,8 @@ var schematic_text2 = z822.object({
|
|
|
357097
357307
|
text: z822.string(),
|
|
357098
357308
|
font_size: z822.number().default(0.18),
|
|
357099
357309
|
position: z822.object({
|
|
357100
|
-
x:
|
|
357101
|
-
y:
|
|
357310
|
+
x: distance53,
|
|
357311
|
+
y: distance53
|
|
357102
357312
|
}),
|
|
357103
357313
|
rotation: z822.number().default(0),
|
|
357104
357314
|
anchor: z822.union([fivePointAnchor3.describe("legacy"), ninePointAnchor3]).default("center"),
|
|
@@ -357268,10 +357478,10 @@ var schematic_table2 = z942.object({
|
|
|
357268
357478
|
schematic_table_id: getZodPrefixedIdWithDefault2("schematic_table"),
|
|
357269
357479
|
schematic_sheet_id: z942.string().optional(),
|
|
357270
357480
|
anchor_position: point10,
|
|
357271
|
-
column_widths: z942.array(
|
|
357272
|
-
row_heights: z942.array(
|
|
357273
|
-
cell_padding:
|
|
357274
|
-
border_width:
|
|
357481
|
+
column_widths: z942.array(distance53),
|
|
357482
|
+
row_heights: z942.array(distance53),
|
|
357483
|
+
cell_padding: distance53.optional(),
|
|
357484
|
+
border_width: distance53.optional(),
|
|
357275
357485
|
subcircuit_id: z942.string().optional(),
|
|
357276
357486
|
schematic_component_id: z942.string().optional(),
|
|
357277
357487
|
anchor: ninePointAnchor3.optional()
|
|
@@ -357288,11 +357498,11 @@ var schematic_table_cell2 = z95.object({
|
|
|
357288
357498
|
end_column_index: z95.number(),
|
|
357289
357499
|
text: z95.string().optional(),
|
|
357290
357500
|
center: point10,
|
|
357291
|
-
width:
|
|
357292
|
-
height:
|
|
357501
|
+
width: distance53,
|
|
357502
|
+
height: distance53,
|
|
357293
357503
|
horizontal_align: z95.enum(["left", "center", "right"]).optional(),
|
|
357294
357504
|
vertical_align: z95.enum(["top", "middle", "bottom"]).optional(),
|
|
357295
|
-
font_size:
|
|
357505
|
+
font_size: distance53.optional(),
|
|
357296
357506
|
subcircuit_id: z95.string().optional()
|
|
357297
357507
|
}).describe("Defines a cell within a schematic_table");
|
|
357298
357508
|
expectTypesMatch3(true);
|
|
@@ -357306,8 +357516,8 @@ var schematic_sheet2 = z96.object({
|
|
|
357306
357516
|
}).describe("Defines a schematic sheet or page that components can be placed on");
|
|
357307
357517
|
expectTypesMatch3(true);
|
|
357308
357518
|
var point_with_bulge2 = z97.object({
|
|
357309
|
-
x:
|
|
357310
|
-
y:
|
|
357519
|
+
x: distance53,
|
|
357520
|
+
y: distance53,
|
|
357311
357521
|
bulge: z97.number().optional()
|
|
357312
357522
|
});
|
|
357313
357523
|
expectTypesMatch3(true);
|
|
@@ -357398,8 +357608,8 @@ var getRotationBetweenPcbPin1Locations3 = (from, to) => {
|
|
|
357398
357608
|
return null;
|
|
357399
357609
|
};
|
|
357400
357610
|
var pcb_route_hint2 = z100.object({
|
|
357401
|
-
x:
|
|
357402
|
-
y:
|
|
357611
|
+
x: distance53,
|
|
357612
|
+
y: distance53,
|
|
357403
357613
|
via: z100.boolean().optional(),
|
|
357404
357614
|
via_to_layer: layer_ref3.optional()
|
|
357405
357615
|
});
|
|
@@ -357407,11 +357617,11 @@ var pcb_route_hints2 = z100.array(pcb_route_hint2);
|
|
|
357407
357617
|
expectTypesMatch3(true);
|
|
357408
357618
|
expectTypesMatch3(true);
|
|
357409
357619
|
var route_hint_point9 = z101.object({
|
|
357410
|
-
x:
|
|
357411
|
-
y:
|
|
357620
|
+
x: distance53,
|
|
357621
|
+
y: distance53,
|
|
357412
357622
|
via: z101.boolean().optional(),
|
|
357413
357623
|
to_layer: layer_ref3.optional(),
|
|
357414
|
-
trace_width:
|
|
357624
|
+
trace_width: distance53.optional()
|
|
357415
357625
|
});
|
|
357416
357626
|
expectTypesMatch3(true);
|
|
357417
357627
|
var manufacturing_drc_properties2 = z1022.object({
|
|
@@ -357496,8 +357706,8 @@ var pcb_hole_circle2 = z105.object({
|
|
|
357496
357706
|
pcb_component_id: z105.string().optional(),
|
|
357497
357707
|
hole_shape: z105.literal("circle"),
|
|
357498
357708
|
hole_diameter: z105.number(),
|
|
357499
|
-
x:
|
|
357500
|
-
y:
|
|
357709
|
+
x: distance53,
|
|
357710
|
+
y: distance53,
|
|
357501
357711
|
is_covered_with_solder_mask: z105.boolean().optional(),
|
|
357502
357712
|
soldermask_margin: z105.number().optional()
|
|
357503
357713
|
});
|
|
@@ -357512,8 +357722,8 @@ var pcb_hole_rect2 = z105.object({
|
|
|
357512
357722
|
hole_shape: z105.literal("rect"),
|
|
357513
357723
|
hole_width: z105.number(),
|
|
357514
357724
|
hole_height: z105.number(),
|
|
357515
|
-
x:
|
|
357516
|
-
y:
|
|
357725
|
+
x: distance53,
|
|
357726
|
+
y: distance53,
|
|
357517
357727
|
is_covered_with_solder_mask: z105.boolean().optional(),
|
|
357518
357728
|
soldermask_margin: z105.number().optional()
|
|
357519
357729
|
});
|
|
@@ -357527,8 +357737,8 @@ var pcb_hole_circle_or_square2 = z105.object({
|
|
|
357527
357737
|
pcb_component_id: z105.string().optional(),
|
|
357528
357738
|
hole_shape: z105.enum(["circle", "square"]),
|
|
357529
357739
|
hole_diameter: z105.number(),
|
|
357530
|
-
x:
|
|
357531
|
-
y:
|
|
357740
|
+
x: distance53,
|
|
357741
|
+
y: distance53,
|
|
357532
357742
|
is_covered_with_solder_mask: z105.boolean().optional(),
|
|
357533
357743
|
soldermask_margin: z105.number().optional()
|
|
357534
357744
|
});
|
|
@@ -357543,8 +357753,8 @@ var pcb_hole_oval2 = z105.object({
|
|
|
357543
357753
|
hole_shape: z105.literal("oval"),
|
|
357544
357754
|
hole_width: z105.number(),
|
|
357545
357755
|
hole_height: z105.number(),
|
|
357546
|
-
x:
|
|
357547
|
-
y:
|
|
357756
|
+
x: distance53,
|
|
357757
|
+
y: distance53,
|
|
357548
357758
|
is_covered_with_solder_mask: z105.boolean().optional(),
|
|
357549
357759
|
soldermask_margin: z105.number().optional()
|
|
357550
357760
|
});
|
|
@@ -357559,8 +357769,8 @@ var pcb_hole_pill2 = z105.object({
|
|
|
357559
357769
|
hole_shape: z105.literal("pill"),
|
|
357560
357770
|
hole_width: z105.number(),
|
|
357561
357771
|
hole_height: z105.number(),
|
|
357562
|
-
x:
|
|
357563
|
-
y:
|
|
357772
|
+
x: distance53,
|
|
357773
|
+
y: distance53,
|
|
357564
357774
|
is_covered_with_solder_mask: z105.boolean().optional(),
|
|
357565
357775
|
soldermask_margin: z105.number().optional()
|
|
357566
357776
|
});
|
|
@@ -357575,8 +357785,8 @@ var pcb_hole_rotated_pill2 = z105.object({
|
|
|
357575
357785
|
hole_shape: z105.literal("rotated_pill"),
|
|
357576
357786
|
hole_width: z105.number(),
|
|
357577
357787
|
hole_height: z105.number(),
|
|
357578
|
-
x:
|
|
357579
|
-
y:
|
|
357788
|
+
x: distance53,
|
|
357789
|
+
y: distance53,
|
|
357580
357790
|
ccw_rotation: rotation12,
|
|
357581
357791
|
is_covered_with_solder_mask: z105.boolean().optional(),
|
|
357582
357792
|
soldermask_margin: z105.number().optional()
|
|
@@ -357592,8 +357802,8 @@ var pcb_plated_hole_circle2 = z106.object({
|
|
|
357592
357802
|
outer_diameter: z106.number(),
|
|
357593
357803
|
hole_diameter: z106.number(),
|
|
357594
357804
|
is_covered_with_solder_mask: z106.boolean().optional(),
|
|
357595
|
-
x:
|
|
357596
|
-
y:
|
|
357805
|
+
x: distance53,
|
|
357806
|
+
y: distance53,
|
|
357597
357807
|
layers: z106.array(layer_ref3),
|
|
357598
357808
|
port_hints: z106.array(z106.string()).optional(),
|
|
357599
357809
|
pcb_component_id: z106.string().optional(),
|
|
@@ -357611,8 +357821,8 @@ var pcb_plated_hole_oval2 = z106.object({
|
|
|
357611
357821
|
hole_width: z106.number(),
|
|
357612
357822
|
hole_height: z106.number(),
|
|
357613
357823
|
is_covered_with_solder_mask: z106.boolean().optional(),
|
|
357614
|
-
x:
|
|
357615
|
-
y:
|
|
357824
|
+
x: distance53,
|
|
357825
|
+
y: distance53,
|
|
357616
357826
|
ccw_rotation: rotation12,
|
|
357617
357827
|
layers: z106.array(layer_ref3),
|
|
357618
357828
|
port_hints: z106.array(z106.string()).optional(),
|
|
@@ -357632,11 +357842,11 @@ var pcb_circular_hole_with_rect_pad2 = z106.object({
|
|
|
357632
357842
|
rect_pad_width: z106.number(),
|
|
357633
357843
|
rect_pad_height: z106.number(),
|
|
357634
357844
|
rect_border_radius: z106.number().optional(),
|
|
357635
|
-
hole_offset_x:
|
|
357636
|
-
hole_offset_y:
|
|
357845
|
+
hole_offset_x: distance53.default(0),
|
|
357846
|
+
hole_offset_y: distance53.default(0),
|
|
357637
357847
|
is_covered_with_solder_mask: z106.boolean().optional(),
|
|
357638
|
-
x:
|
|
357639
|
-
y:
|
|
357848
|
+
x: distance53,
|
|
357849
|
+
y: distance53,
|
|
357640
357850
|
layers: z106.array(layer_ref3),
|
|
357641
357851
|
port_hints: z106.array(z106.string()).optional(),
|
|
357642
357852
|
pcb_component_id: z106.string().optional(),
|
|
@@ -357657,11 +357867,11 @@ var pcb_pill_hole_with_rect_pad2 = z106.object({
|
|
|
357657
357867
|
rect_pad_width: z106.number(),
|
|
357658
357868
|
rect_pad_height: z106.number(),
|
|
357659
357869
|
rect_border_radius: z106.number().optional(),
|
|
357660
|
-
hole_offset_x:
|
|
357661
|
-
hole_offset_y:
|
|
357870
|
+
hole_offset_x: distance53.default(0),
|
|
357871
|
+
hole_offset_y: distance53.default(0),
|
|
357662
357872
|
is_covered_with_solder_mask: z106.boolean().optional(),
|
|
357663
|
-
x:
|
|
357664
|
-
y:
|
|
357873
|
+
x: distance53,
|
|
357874
|
+
y: distance53,
|
|
357665
357875
|
layers: z106.array(layer_ref3),
|
|
357666
357876
|
port_hints: z106.array(z106.string()).optional(),
|
|
357667
357877
|
pcb_component_id: z106.string().optional(),
|
|
@@ -357683,11 +357893,11 @@ var pcb_rotated_pill_hole_with_rect_pad2 = z106.object({
|
|
|
357683
357893
|
rect_pad_height: z106.number(),
|
|
357684
357894
|
rect_border_radius: z106.number().optional(),
|
|
357685
357895
|
rect_ccw_rotation: rotation12,
|
|
357686
|
-
hole_offset_x:
|
|
357687
|
-
hole_offset_y:
|
|
357896
|
+
hole_offset_x: distance53.default(0),
|
|
357897
|
+
hole_offset_y: distance53.default(0),
|
|
357688
357898
|
is_covered_with_solder_mask: z106.boolean().optional(),
|
|
357689
|
-
x:
|
|
357690
|
-
y:
|
|
357899
|
+
x: distance53,
|
|
357900
|
+
y: distance53,
|
|
357691
357901
|
layers: z106.array(layer_ref3),
|
|
357692
357902
|
port_hints: z106.array(z106.string()).optional(),
|
|
357693
357903
|
pcb_component_id: z106.string().optional(),
|
|
@@ -357705,14 +357915,14 @@ var pcb_hole_with_polygon_pad2 = z106.object({
|
|
|
357705
357915
|
hole_width: z106.number().optional(),
|
|
357706
357916
|
hole_height: z106.number().optional(),
|
|
357707
357917
|
pad_outline: z106.array(z106.object({
|
|
357708
|
-
x:
|
|
357709
|
-
y:
|
|
357918
|
+
x: distance53,
|
|
357919
|
+
y: distance53
|
|
357710
357920
|
})).min(3),
|
|
357711
|
-
hole_offset_x:
|
|
357712
|
-
hole_offset_y:
|
|
357921
|
+
hole_offset_x: distance53.default(0),
|
|
357922
|
+
hole_offset_y: distance53.default(0),
|
|
357713
357923
|
is_covered_with_solder_mask: z106.boolean().optional(),
|
|
357714
|
-
x:
|
|
357715
|
-
y:
|
|
357924
|
+
x: distance53,
|
|
357925
|
+
y: distance53,
|
|
357716
357926
|
layers: z106.array(layer_ref3),
|
|
357717
357927
|
port_hints: z106.array(z106.string()).optional(),
|
|
357718
357928
|
pcb_component_id: z106.string().optional(),
|
|
@@ -357742,8 +357952,8 @@ var pcb_port2 = z107.object({
|
|
|
357742
357952
|
subcircuit_id: z107.string().optional(),
|
|
357743
357953
|
source_port_id: z107.string(),
|
|
357744
357954
|
pcb_component_id: z107.string().optional(),
|
|
357745
|
-
x:
|
|
357746
|
-
y:
|
|
357955
|
+
x: distance53,
|
|
357956
|
+
y: distance53,
|
|
357747
357957
|
layers: z107.array(layer_ref3),
|
|
357748
357958
|
is_board_pinout: z107.boolean().optional()
|
|
357749
357959
|
}).describe("Defines a port on the PCB");
|
|
@@ -357754,8 +357964,8 @@ var pcb_smtpad_circle2 = z108.object({
|
|
|
357754
357964
|
pcb_smtpad_id: getZodPrefixedIdWithDefault2("pcb_smtpad"),
|
|
357755
357965
|
pcb_group_id: z108.string().optional(),
|
|
357756
357966
|
subcircuit_id: z108.string().optional(),
|
|
357757
|
-
x:
|
|
357758
|
-
y:
|
|
357967
|
+
x: distance53,
|
|
357968
|
+
y: distance53,
|
|
357759
357969
|
radius: z108.number(),
|
|
357760
357970
|
layer: layer_ref3,
|
|
357761
357971
|
port_hints: z108.array(z108.string()).optional(),
|
|
@@ -357771,8 +357981,8 @@ var pcb_smtpad_rect2 = z108.object({
|
|
|
357771
357981
|
pcb_smtpad_id: getZodPrefixedIdWithDefault2("pcb_smtpad"),
|
|
357772
357982
|
pcb_group_id: z108.string().optional(),
|
|
357773
357983
|
subcircuit_id: z108.string().optional(),
|
|
357774
|
-
x:
|
|
357775
|
-
y:
|
|
357984
|
+
x: distance53,
|
|
357985
|
+
y: distance53,
|
|
357776
357986
|
width: z108.number(),
|
|
357777
357987
|
height: z108.number(),
|
|
357778
357988
|
rect_border_radius: z108.number().optional(),
|
|
@@ -357795,8 +358005,8 @@ var pcb_smtpad_rotated_rect2 = z108.object({
|
|
|
357795
358005
|
pcb_smtpad_id: getZodPrefixedIdWithDefault2("pcb_smtpad"),
|
|
357796
358006
|
pcb_group_id: z108.string().optional(),
|
|
357797
358007
|
subcircuit_id: z108.string().optional(),
|
|
357798
|
-
x:
|
|
357799
|
-
y:
|
|
358008
|
+
x: distance53,
|
|
358009
|
+
y: distance53,
|
|
357800
358010
|
width: z108.number(),
|
|
357801
358011
|
height: z108.number(),
|
|
357802
358012
|
rect_border_radius: z108.number().optional(),
|
|
@@ -357820,8 +358030,8 @@ var pcb_smtpad_pill2 = z108.object({
|
|
|
357820
358030
|
pcb_smtpad_id: getZodPrefixedIdWithDefault2("pcb_smtpad"),
|
|
357821
358031
|
pcb_group_id: z108.string().optional(),
|
|
357822
358032
|
subcircuit_id: z108.string().optional(),
|
|
357823
|
-
x:
|
|
357824
|
-
y:
|
|
358033
|
+
x: distance53,
|
|
358034
|
+
y: distance53,
|
|
357825
358035
|
width: z108.number(),
|
|
357826
358036
|
height: z108.number(),
|
|
357827
358037
|
radius: z108.number(),
|
|
@@ -357839,8 +358049,8 @@ var pcb_smtpad_rotated_pill2 = z108.object({
|
|
|
357839
358049
|
pcb_smtpad_id: getZodPrefixedIdWithDefault2("pcb_smtpad"),
|
|
357840
358050
|
pcb_group_id: z108.string().optional(),
|
|
357841
358051
|
subcircuit_id: z108.string().optional(),
|
|
357842
|
-
x:
|
|
357843
|
-
y:
|
|
358052
|
+
x: distance53,
|
|
358053
|
+
y: distance53,
|
|
357844
358054
|
width: z108.number(),
|
|
357845
358055
|
height: z108.number(),
|
|
357846
358056
|
radius: z108.number(),
|
|
@@ -357888,8 +358098,8 @@ var pcb_solder_paste_circle2 = z109.object({
|
|
|
357888
358098
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault2("pcb_solder_paste"),
|
|
357889
358099
|
pcb_group_id: z109.string().optional(),
|
|
357890
358100
|
subcircuit_id: z109.string().optional(),
|
|
357891
|
-
x:
|
|
357892
|
-
y:
|
|
358101
|
+
x: distance53,
|
|
358102
|
+
y: distance53,
|
|
357893
358103
|
radius: z109.number(),
|
|
357894
358104
|
layer: layer_ref3,
|
|
357895
358105
|
pcb_component_id: z109.string().optional(),
|
|
@@ -357901,8 +358111,8 @@ var pcb_solder_paste_rect2 = z109.object({
|
|
|
357901
358111
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault2("pcb_solder_paste"),
|
|
357902
358112
|
pcb_group_id: z109.string().optional(),
|
|
357903
358113
|
subcircuit_id: z109.string().optional(),
|
|
357904
|
-
x:
|
|
357905
|
-
y:
|
|
358114
|
+
x: distance53,
|
|
358115
|
+
y: distance53,
|
|
357906
358116
|
width: z109.number(),
|
|
357907
358117
|
height: z109.number(),
|
|
357908
358118
|
layer: layer_ref3,
|
|
@@ -357915,8 +358125,8 @@ var pcb_solder_paste_pill2 = z109.object({
|
|
|
357915
358125
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault2("pcb_solder_paste"),
|
|
357916
358126
|
pcb_group_id: z109.string().optional(),
|
|
357917
358127
|
subcircuit_id: z109.string().optional(),
|
|
357918
|
-
x:
|
|
357919
|
-
y:
|
|
358128
|
+
x: distance53,
|
|
358129
|
+
y: distance53,
|
|
357920
358130
|
width: z109.number(),
|
|
357921
358131
|
height: z109.number(),
|
|
357922
358132
|
radius: z109.number(),
|
|
@@ -357930,11 +358140,11 @@ var pcb_solder_paste_rotated_rect2 = z109.object({
|
|
|
357930
358140
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault2("pcb_solder_paste"),
|
|
357931
358141
|
pcb_group_id: z109.string().optional(),
|
|
357932
358142
|
subcircuit_id: z109.string().optional(),
|
|
357933
|
-
x:
|
|
357934
|
-
y:
|
|
358143
|
+
x: distance53,
|
|
358144
|
+
y: distance53,
|
|
357935
358145
|
width: z109.number(),
|
|
357936
358146
|
height: z109.number(),
|
|
357937
|
-
ccw_rotation:
|
|
358147
|
+
ccw_rotation: distance53,
|
|
357938
358148
|
layer: layer_ref3,
|
|
357939
358149
|
pcb_component_id: z109.string().optional(),
|
|
357940
358150
|
pcb_smtpad_id: z109.string().optional()
|
|
@@ -357945,8 +358155,8 @@ var pcb_solder_paste_rotated_pill2 = z109.object({
|
|
|
357945
358155
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault2("pcb_solder_paste"),
|
|
357946
358156
|
pcb_group_id: z109.string().optional(),
|
|
357947
358157
|
subcircuit_id: z109.string().optional(),
|
|
357948
|
-
x:
|
|
357949
|
-
y:
|
|
358158
|
+
x: distance53,
|
|
358159
|
+
y: distance53,
|
|
357950
358160
|
width: z109.number(),
|
|
357951
358161
|
height: z109.number(),
|
|
357952
358162
|
radius: z109.number(),
|
|
@@ -357961,8 +358171,8 @@ var pcb_solder_paste_oval2 = z109.object({
|
|
|
357961
358171
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault2("pcb_solder_paste"),
|
|
357962
358172
|
pcb_group_id: z109.string().optional(),
|
|
357963
358173
|
subcircuit_id: z109.string().optional(),
|
|
357964
|
-
x:
|
|
357965
|
-
y:
|
|
358174
|
+
x: distance53,
|
|
358175
|
+
y: distance53,
|
|
357966
358176
|
width: z109.number(),
|
|
357967
358177
|
height: z109.number(),
|
|
357968
358178
|
layer: layer_ref3,
|
|
@@ -357999,9 +358209,9 @@ var pcb_text2 = z110.object({
|
|
|
357999
358209
|
expectTypesMatch3(true);
|
|
358000
358210
|
var pcb_trace_route_point_wire2 = z111.object({
|
|
358001
358211
|
route_type: z111.literal("wire"),
|
|
358002
|
-
x:
|
|
358003
|
-
y:
|
|
358004
|
-
width:
|
|
358212
|
+
x: distance53,
|
|
358213
|
+
y: distance53,
|
|
358214
|
+
width: distance53,
|
|
358005
358215
|
copper_pour_id: z111.string().optional(),
|
|
358006
358216
|
is_inside_copper_pour: z111.boolean().optional(),
|
|
358007
358217
|
start_pcb_port_id: z111.string().optional(),
|
|
@@ -358010,12 +358220,12 @@ var pcb_trace_route_point_wire2 = z111.object({
|
|
|
358010
358220
|
});
|
|
358011
358221
|
var pcb_trace_route_point_via2 = z111.object({
|
|
358012
358222
|
route_type: z111.literal("via"),
|
|
358013
|
-
x:
|
|
358014
|
-
y:
|
|
358223
|
+
x: distance53,
|
|
358224
|
+
y: distance53,
|
|
358015
358225
|
copper_pour_id: z111.string().optional(),
|
|
358016
358226
|
is_inside_copper_pour: z111.boolean().optional(),
|
|
358017
|
-
hole_diameter:
|
|
358018
|
-
outer_diameter:
|
|
358227
|
+
hole_diameter: distance53.optional(),
|
|
358228
|
+
outer_diameter: distance53.optional(),
|
|
358019
358229
|
from_layer: layer_ref3,
|
|
358020
358230
|
to_layer: layer_ref3
|
|
358021
358231
|
});
|
|
@@ -358023,7 +358233,7 @@ var pcb_trace_route_point_through_pad2 = z111.object({
|
|
|
358023
358233
|
route_type: z111.literal("through_pad"),
|
|
358024
358234
|
start: point10,
|
|
358025
358235
|
end: point10,
|
|
358026
|
-
width:
|
|
358236
|
+
width: distance53,
|
|
358027
358237
|
start_layer: layer_ref3,
|
|
358028
358238
|
end_layer: layer_ref3,
|
|
358029
358239
|
pcb_smtpad_id: z111.string().optional(),
|
|
@@ -358071,8 +358281,8 @@ var pcb_trace_too_long_warning2 = z1132.object({
|
|
|
358071
358281
|
pcb_trace_id: z1132.string(),
|
|
358072
358282
|
source_net_id: z1132.string().optional(),
|
|
358073
358283
|
source_trace_id: z1132.string().optional(),
|
|
358074
|
-
actual_trace_length:
|
|
358075
|
-
maximum_trace_length:
|
|
358284
|
+
actual_trace_length: distance53,
|
|
358285
|
+
maximum_trace_length: distance53,
|
|
358076
358286
|
subcircuit_id: z1132.string().optional()
|
|
358077
358287
|
}).describe("Warning emitted when a PCB trace is longer than its maximum allowed length");
|
|
358078
358288
|
expectTypesMatch3(true);
|
|
@@ -358142,10 +358352,10 @@ var pcb_via2 = z120.object({
|
|
|
358142
358352
|
pcb_group_id: z120.string().optional(),
|
|
358143
358353
|
subcircuit_id: z120.string().optional(),
|
|
358144
358354
|
subcircuit_connectivity_map_key: z120.string().optional(),
|
|
358145
|
-
x:
|
|
358146
|
-
y:
|
|
358147
|
-
outer_diameter:
|
|
358148
|
-
hole_diameter:
|
|
358355
|
+
x: distance53,
|
|
358356
|
+
y: distance53,
|
|
358357
|
+
outer_diameter: distance53.default("0.6mm"),
|
|
358358
|
+
hole_diameter: distance53.default("0.25mm"),
|
|
358149
358359
|
from_layer: layer_ref3.optional(),
|
|
358150
358360
|
to_layer: layer_ref3.optional(),
|
|
358151
358361
|
layers: z120.array(layer_ref3),
|
|
@@ -358233,11 +358443,11 @@ var pcb_silkscreen_line2 = z127.object({
|
|
|
358233
358443
|
pcb_component_id: z127.string(),
|
|
358234
358444
|
pcb_group_id: z127.string().optional(),
|
|
358235
358445
|
subcircuit_id: z127.string().optional(),
|
|
358236
|
-
stroke_width:
|
|
358237
|
-
x1:
|
|
358238
|
-
y1:
|
|
358239
|
-
x2:
|
|
358240
|
-
y2:
|
|
358446
|
+
stroke_width: distance53.default("0.1mm"),
|
|
358447
|
+
x1: distance53,
|
|
358448
|
+
y1: distance53,
|
|
358449
|
+
x2: distance53,
|
|
358450
|
+
y2: distance53,
|
|
358241
358451
|
layer: visible_layer2
|
|
358242
358452
|
}).describe("Defines a silkscreen line on the PCB");
|
|
358243
358453
|
expectTypesMatch3(true);
|
|
@@ -358258,7 +358468,7 @@ var pcb_silkscreen_text2 = z129.object({
|
|
|
358258
358468
|
pcb_group_id: z129.string().optional(),
|
|
358259
358469
|
subcircuit_id: z129.string().optional(),
|
|
358260
358470
|
font: z129.literal("tscircuit2024").default("tscircuit2024"),
|
|
358261
|
-
font_size:
|
|
358471
|
+
font_size: distance53.default("0.2mm"),
|
|
358262
358472
|
pcb_component_id: z129.string(),
|
|
358263
358473
|
text: z129.string(),
|
|
358264
358474
|
is_knockout: z129.boolean().default(false).optional(),
|
|
@@ -358286,7 +358496,7 @@ var pcb_copper_text2 = z130.object({
|
|
|
358286
358496
|
pcb_group_id: z130.string().optional(),
|
|
358287
358497
|
subcircuit_id: z130.string().optional(),
|
|
358288
358498
|
font: z130.literal("tscircuit2024").default("tscircuit2024"),
|
|
358289
|
-
font_size:
|
|
358499
|
+
font_size: distance53.default("0.2mm"),
|
|
358290
358500
|
pcb_component_id: z130.string(),
|
|
358291
358501
|
text: z130.string(),
|
|
358292
358502
|
is_knockout: z130.boolean().default(false).optional(),
|
|
@@ -358346,8 +358556,8 @@ var pcb_silkscreen_oval2 = z1332.object({
|
|
|
358346
358556
|
pcb_group_id: z1332.string().optional(),
|
|
358347
358557
|
subcircuit_id: z1332.string().optional(),
|
|
358348
358558
|
center: point10,
|
|
358349
|
-
radius_x:
|
|
358350
|
-
radius_y:
|
|
358559
|
+
radius_x: distance53,
|
|
358560
|
+
radius_y: distance53,
|
|
358351
358561
|
layer: visible_layer2,
|
|
358352
358562
|
ccw_rotation: rotation12.optional()
|
|
358353
358563
|
}).describe("Defines a silkscreen oval on the PCB");
|
|
@@ -358387,7 +358597,7 @@ var pcb_fabrication_note_text3 = z136.object({
|
|
|
358387
358597
|
subcircuit_id: z136.string().optional(),
|
|
358388
358598
|
pcb_group_id: z136.string().optional(),
|
|
358389
358599
|
font: z136.literal("tscircuit2024").default("tscircuit2024"),
|
|
358390
|
-
font_size:
|
|
358600
|
+
font_size: distance53.default("1mm"),
|
|
358391
358601
|
pcb_component_id: z136.string(),
|
|
358392
358602
|
text: z136.string(),
|
|
358393
358603
|
ccw_rotation: z136.number().optional(),
|
|
@@ -358457,7 +358667,7 @@ var pcb_note_text3 = z140.object({
|
|
|
358457
358667
|
subcircuit_id: z140.string().optional(),
|
|
358458
358668
|
name: z140.string().optional(),
|
|
358459
358669
|
font: z140.literal("tscircuit2024").default("tscircuit2024"),
|
|
358460
|
-
font_size:
|
|
358670
|
+
font_size: distance53.default("1mm"),
|
|
358461
358671
|
text: z140.string().optional(),
|
|
358462
358672
|
anchor_position: point10.default({ x: 0, y: 0 }),
|
|
358463
358673
|
anchor_alignment: z140.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
@@ -358508,12 +358718,12 @@ var pcb_note_line3 = z1432.object({
|
|
|
358508
358718
|
subcircuit_id: z1432.string().optional(),
|
|
358509
358719
|
name: z1432.string().optional(),
|
|
358510
358720
|
text: z1432.string().optional(),
|
|
358511
|
-
x1:
|
|
358512
|
-
y1:
|
|
358513
|
-
x2:
|
|
358514
|
-
y2:
|
|
358721
|
+
x1: distance53,
|
|
358722
|
+
y1: distance53,
|
|
358723
|
+
x2: distance53,
|
|
358724
|
+
y2: distance53,
|
|
358515
358725
|
layer: visible_layer2.default("top"),
|
|
358516
|
-
stroke_width:
|
|
358726
|
+
stroke_width: distance53.default("0.1mm"),
|
|
358517
358727
|
color: z1432.string().optional(),
|
|
358518
358728
|
is_dashed: z1432.boolean().optional()
|
|
358519
358729
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
@@ -358564,8 +358774,8 @@ var pcb_keepout3 = z147.object({
|
|
|
358564
358774
|
pcb_group_id: z147.string().optional(),
|
|
358565
358775
|
subcircuit_id: z147.string().optional(),
|
|
358566
358776
|
center: point10,
|
|
358567
|
-
width:
|
|
358568
|
-
height:
|
|
358777
|
+
width: distance53,
|
|
358778
|
+
height: distance53,
|
|
358569
358779
|
pcb_keepout_id: z147.string(),
|
|
358570
358780
|
layers: z147.array(z147.string()),
|
|
358571
358781
|
description: z147.string().optional(),
|
|
@@ -358576,7 +358786,7 @@ var pcb_keepout3 = z147.object({
|
|
|
358576
358786
|
pcb_group_id: z147.string().optional(),
|
|
358577
358787
|
subcircuit_id: z147.string().optional(),
|
|
358578
358788
|
center: point10,
|
|
358579
|
-
radius:
|
|
358789
|
+
radius: distance53,
|
|
358580
358790
|
pcb_keepout_id: z147.string(),
|
|
358581
358791
|
layers: z147.array(z147.string()),
|
|
358582
358792
|
description: z147.string().optional(),
|
|
@@ -358752,8 +358962,8 @@ var pcb_breakout_point2 = z158.object({
|
|
|
358752
358962
|
source_port_id: z158.string().optional(),
|
|
358753
358963
|
source_net_id: z158.string().optional(),
|
|
358754
358964
|
layer: layer_ref3.optional(),
|
|
358755
|
-
x:
|
|
358756
|
-
y:
|
|
358965
|
+
x: distance53,
|
|
358966
|
+
y: distance53
|
|
358757
358967
|
}).describe("Defines a routing target within a pcb_group for a source_trace or source_net");
|
|
358758
358968
|
expectTypesMatch3(true);
|
|
358759
358969
|
var pcb_ground_plane2 = z159.object({
|
|
@@ -358781,9 +358991,9 @@ var pcb_thermal_spoke2 = z161.object({
|
|
|
358781
358991
|
pcb_ground_plane_id: z161.string(),
|
|
358782
358992
|
shape: z161.string(),
|
|
358783
358993
|
spoke_count: z161.number(),
|
|
358784
|
-
spoke_thickness:
|
|
358785
|
-
spoke_inner_diameter:
|
|
358786
|
-
spoke_outer_diameter:
|
|
358994
|
+
spoke_thickness: distance53,
|
|
358995
|
+
spoke_inner_diameter: distance53,
|
|
358996
|
+
spoke_outer_diameter: distance53,
|
|
358787
358997
|
pcb_plated_hole_id: z161.string().optional(),
|
|
358788
358998
|
subcircuit_id: z161.string().optional()
|
|
358789
358999
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
@@ -358865,8 +359075,8 @@ var pcb_via_clearance_error2 = base_circuit_json_error2.extend({
|
|
|
358865
359075
|
pcb_error_id: getZodPrefixedIdWithDefault2("pcb_error"),
|
|
358866
359076
|
error_type: z166.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
358867
359077
|
pcb_via_ids: z166.array(z166.string()).min(2),
|
|
358868
|
-
minimum_clearance:
|
|
358869
|
-
actual_clearance:
|
|
359078
|
+
minimum_clearance: distance53.optional(),
|
|
359079
|
+
actual_clearance: distance53.optional(),
|
|
358870
359080
|
pcb_center: z166.object({
|
|
358871
359081
|
x: z166.number().optional(),
|
|
358872
359082
|
y: z166.number().optional()
|
|
@@ -358880,8 +359090,8 @@ var pcb_via_trace_clearance_error2 = base_circuit_json_error2.extend({
|
|
|
358880
359090
|
error_type: z167.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
358881
359091
|
pcb_via_id: z167.string(),
|
|
358882
359092
|
pcb_trace_id: z167.string(),
|
|
358883
|
-
minimum_clearance:
|
|
358884
|
-
actual_clearance:
|
|
359093
|
+
minimum_clearance: distance53.optional(),
|
|
359094
|
+
actual_clearance: distance53.optional(),
|
|
358885
359095
|
center: z167.object({
|
|
358886
359096
|
x: z167.number().optional(),
|
|
358887
359097
|
y: z167.number().optional()
|
|
@@ -358894,8 +359104,8 @@ var pcb_pad_pad_clearance_error2 = base_circuit_json_error2.extend({
|
|
|
358894
359104
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault2("pcb_pad_pad_clearance_error"),
|
|
358895
359105
|
error_type: z168.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
358896
359106
|
pcb_pad_ids: z168.array(z168.string()).min(2),
|
|
358897
|
-
minimum_clearance:
|
|
358898
|
-
actual_clearance:
|
|
359107
|
+
minimum_clearance: distance53.optional(),
|
|
359108
|
+
actual_clearance: distance53.optional(),
|
|
358899
359109
|
center: z168.object({
|
|
358900
359110
|
x: z168.number().optional(),
|
|
358901
359111
|
y: z168.number().optional()
|
|
@@ -358909,8 +359119,8 @@ var pcb_pad_trace_clearance_error2 = base_circuit_json_error2.extend({
|
|
|
358909
359119
|
error_type: z169.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
358910
359120
|
pcb_pad_id: z169.string(),
|
|
358911
359121
|
pcb_trace_id: z169.string(),
|
|
358912
|
-
minimum_clearance:
|
|
358913
|
-
actual_clearance:
|
|
359122
|
+
minimum_clearance: distance53.optional(),
|
|
359123
|
+
actual_clearance: distance53.optional(),
|
|
358914
359124
|
center: z169.object({
|
|
358915
359125
|
x: z169.number().optional(),
|
|
358916
359126
|
y: z169.number().optional()
|