@tscircuit/cli 0.1.2049 → 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 +794 -379
- package/dist/lib/index.js +3 -3
- package/package.json +3 -3
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,
|
|
@@ -153260,9 +153260,9 @@ var package_default = {
|
|
|
153260
153260
|
"@babel/standalone": "^7.26.9",
|
|
153261
153261
|
"@biomejs/biome": "^1.9.4",
|
|
153262
153262
|
"@tscircuit/check-shorts": "https://jscdn.tscircuit.com/@tscircuit/check-shorts/0.0.19.tgz",
|
|
153263
|
-
"@tscircuit/circuit-json-placement-analysis": "^0.0.
|
|
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",
|
|
@@ -172599,17 +172599,50 @@ var analyzeComponentPlacement = (circuitJson, componentName) => {
|
|
|
172599
172599
|
`)
|
|
172600
172600
|
};
|
|
172601
172601
|
};
|
|
172602
|
+
var isPcbPort = (circuitElement) => {
|
|
172603
|
+
if (circuitElement.type !== "pcb_port")
|
|
172604
|
+
return false;
|
|
172605
|
+
if (typeof circuitElement.pcb_port_id !== "string")
|
|
172606
|
+
return false;
|
|
172607
|
+
if (typeof circuitElement.source_port_id !== "string")
|
|
172608
|
+
return false;
|
|
172609
|
+
if (typeof circuitElement.x !== "number")
|
|
172610
|
+
return false;
|
|
172611
|
+
if (!Number.isFinite(circuitElement.x))
|
|
172612
|
+
return false;
|
|
172613
|
+
if (typeof circuitElement.y !== "number")
|
|
172614
|
+
return false;
|
|
172615
|
+
if (!Number.isFinite(circuitElement.y))
|
|
172616
|
+
return false;
|
|
172617
|
+
if (!Array.isArray(circuitElement.layers))
|
|
172618
|
+
return false;
|
|
172619
|
+
for (const layer of circuitElement.layers) {
|
|
172620
|
+
if (typeof layer !== "string")
|
|
172621
|
+
return false;
|
|
172622
|
+
}
|
|
172623
|
+
return true;
|
|
172624
|
+
};
|
|
172602
172625
|
var TOP_ISSUE_LIMIT = 5;
|
|
172603
172626
|
var CENTER_ANCHOR2 = "center";
|
|
172604
172627
|
var LARGE_EMPTY_SPACE_THRESHOLD_RATIO = 0.05;
|
|
172605
172628
|
var EMPTY_SPACE_SAMPLE_STEP_MM = 5;
|
|
172606
172629
|
var GEOMETRY_EPSILON = 0.000001;
|
|
172630
|
+
var SUBOPTIMAL_ORIENTATION_SEVERITY = 100;
|
|
172631
|
+
var ORIENTATION_ANALYSIS_COMPONENT_TYPES = /* @__PURE__ */ new Set([
|
|
172632
|
+
"simple_resistor",
|
|
172633
|
+
"simple_capacitor",
|
|
172634
|
+
"simple_inductor",
|
|
172635
|
+
"simple_crystal",
|
|
172636
|
+
"simple_diode",
|
|
172637
|
+
"simple_chip"
|
|
172638
|
+
]);
|
|
172607
172639
|
var ISSUE_TYPE_ORDER = [
|
|
172608
172640
|
"pad_overlap",
|
|
172609
172641
|
"off_board",
|
|
172610
172642
|
"courtyard_collision",
|
|
172611
172643
|
"connector_body_intrusion",
|
|
172612
|
-
"footprint_intrusion"
|
|
172644
|
+
"footprint_intrusion",
|
|
172645
|
+
"suboptimal_orientation"
|
|
172613
172646
|
];
|
|
172614
172647
|
var toNumber22 = (value) => typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
172615
172648
|
var getLayer = (value) => typeof value === "string" ? value : null;
|
|
@@ -172734,6 +172767,10 @@ var getSummaryLabel = (type, count) => {
|
|
|
172734
172767
|
return `${count} connector-body intrusion${count === 1 ? "" : "s"}`;
|
|
172735
172768
|
case "footprint_intrusion":
|
|
172736
172769
|
return `${count} footprint intrusion${count === 1 ? "" : "s"}`;
|
|
172770
|
+
case "suboptimal_orientation":
|
|
172771
|
+
if (count === 1)
|
|
172772
|
+
return "1 suboptimal orientation";
|
|
172773
|
+
return `${count} suboptimal orientations`;
|
|
172737
172774
|
}
|
|
172738
172775
|
};
|
|
172739
172776
|
var getMoveDirectionForEdge = (edge) => {
|
|
@@ -173303,7 +173340,174 @@ var buildBoardTopLayerReport = (components, boardBounds) => {
|
|
|
173303
173340
|
largeEmptySpaces
|
|
173304
173341
|
};
|
|
173305
173342
|
};
|
|
173306
|
-
var
|
|
173343
|
+
var buildConnectedSourcePortIdsBySourcePortId = (circuitJson) => {
|
|
173344
|
+
const connectionGroupById = /* @__PURE__ */ new Map;
|
|
173345
|
+
const sourcePortIds = /* @__PURE__ */ new Set;
|
|
173346
|
+
for (const element of circuitJson) {
|
|
173347
|
+
if (element.type !== "source_trace")
|
|
173348
|
+
continue;
|
|
173349
|
+
if (!Array.isArray(element.connected_source_port_ids))
|
|
173350
|
+
continue;
|
|
173351
|
+
const portIds = element.connected_source_port_ids.filter((id) => typeof id === "string");
|
|
173352
|
+
for (const id of portIds)
|
|
173353
|
+
sourcePortIds.add(id);
|
|
173354
|
+
const netIds = Array.isArray(element.connected_source_net_ids) ? element.connected_source_net_ids.filter((id) => typeof id === "string") : [];
|
|
173355
|
+
const connectionIds = [...portIds, ...netIds];
|
|
173356
|
+
const group = new Set(connectionIds);
|
|
173357
|
+
for (const id of connectionIds) {
|
|
173358
|
+
const existingGroup = connectionGroupById.get(id);
|
|
173359
|
+
if (!existingGroup)
|
|
173360
|
+
continue;
|
|
173361
|
+
for (const connectedId of existingGroup)
|
|
173362
|
+
group.add(connectedId);
|
|
173363
|
+
}
|
|
173364
|
+
for (const id of group)
|
|
173365
|
+
connectionGroupById.set(id, group);
|
|
173366
|
+
}
|
|
173367
|
+
const connectedPortIdsByPortId = /* @__PURE__ */ new Map;
|
|
173368
|
+
for (const group of new Set(connectionGroupById.values())) {
|
|
173369
|
+
const portIds = new Set([...group].filter((id) => sourcePortIds.has(id)));
|
|
173370
|
+
for (const id of portIds)
|
|
173371
|
+
connectedPortIdsByPortId.set(id, portIds);
|
|
173372
|
+
}
|
|
173373
|
+
return connectedPortIdsByPortId;
|
|
173374
|
+
};
|
|
173375
|
+
var buildPcbPortIndexes = (circuitJson) => {
|
|
173376
|
+
const sourceComponentIdBySourcePortId = /* @__PURE__ */ new Map;
|
|
173377
|
+
const pcbPortBySourcePortId = /* @__PURE__ */ new Map;
|
|
173378
|
+
const pcbPortsBySourceComponentId = /* @__PURE__ */ new Map;
|
|
173379
|
+
for (const element of circuitJson) {
|
|
173380
|
+
if (element.type === "source_port" && typeof element.source_port_id === "string" && typeof element.source_component_id === "string") {
|
|
173381
|
+
sourceComponentIdBySourcePortId.set(element.source_port_id, element.source_component_id);
|
|
173382
|
+
}
|
|
173383
|
+
}
|
|
173384
|
+
for (const element of circuitJson) {
|
|
173385
|
+
if (!isPcbPort(element))
|
|
173386
|
+
continue;
|
|
173387
|
+
const pcbPort = element;
|
|
173388
|
+
const sourceComponentId = sourceComponentIdBySourcePortId.get(pcbPort.source_port_id);
|
|
173389
|
+
if (!sourceComponentId)
|
|
173390
|
+
continue;
|
|
173391
|
+
pcbPortBySourcePortId.set(pcbPort.source_port_id, pcbPort);
|
|
173392
|
+
let componentPcbPorts = pcbPortsBySourceComponentId.get(sourceComponentId);
|
|
173393
|
+
if (!componentPcbPorts) {
|
|
173394
|
+
componentPcbPorts = [];
|
|
173395
|
+
pcbPortsBySourceComponentId.set(sourceComponentId, componentPcbPorts);
|
|
173396
|
+
}
|
|
173397
|
+
componentPcbPorts.push(pcbPort);
|
|
173398
|
+
}
|
|
173399
|
+
return {
|
|
173400
|
+
pcbPortBySourcePortId,
|
|
173401
|
+
pcbPortsBySourceComponentId,
|
|
173402
|
+
sourceComponentIdBySourcePortId
|
|
173403
|
+
};
|
|
173404
|
+
};
|
|
173405
|
+
var doesConnectionCrossPadCenterline = ({
|
|
173406
|
+
pcbPort,
|
|
173407
|
+
connectedPcbPort,
|
|
173408
|
+
firstComponentPcbPort,
|
|
173409
|
+
secondComponentPcbPort
|
|
173410
|
+
}) => {
|
|
173411
|
+
const padCenterlineX = (firstComponentPcbPort.x + secondComponentPcbPort.x) / 2;
|
|
173412
|
+
const padCenterlineY = (firstComponentPcbPort.y + secondComponentPcbPort.y) / 2;
|
|
173413
|
+
const padAxisX = secondComponentPcbPort.x - firstComponentPcbPort.x;
|
|
173414
|
+
const padAxisY = secondComponentPcbPort.y - firstComponentPcbPort.y;
|
|
173415
|
+
const pcbPortSide = (pcbPort.x - padCenterlineX) * padAxisX + (pcbPort.y - padCenterlineY) * padAxisY;
|
|
173416
|
+
const connectedPcbPortSide = (connectedPcbPort.x - padCenterlineX) * padAxisX + (connectedPcbPort.y - padCenterlineY) * padAxisY;
|
|
173417
|
+
if (pcbPortSide > GEOMETRY_EPSILON) {
|
|
173418
|
+
return connectedPcbPortSide <= GEOMETRY_EPSILON;
|
|
173419
|
+
}
|
|
173420
|
+
if (pcbPortSide < -GEOMETRY_EPSILON) {
|
|
173421
|
+
return connectedPcbPortSide >= -GEOMETRY_EPSILON;
|
|
173422
|
+
}
|
|
173423
|
+
return false;
|
|
173424
|
+
};
|
|
173425
|
+
var buildSuboptimalOrientationIssues = (circuitJson, components) => {
|
|
173426
|
+
const issues = [];
|
|
173427
|
+
const pcbPortIndexes = buildPcbPortIndexes(circuitJson);
|
|
173428
|
+
const connectedSourcePortIdsBySourcePortId = buildConnectedSourcePortIdsBySourcePortId(circuitJson);
|
|
173429
|
+
for (const component of components) {
|
|
173430
|
+
if (!ORIENTATION_ANALYSIS_COMPONENT_TYPES.has(String(component.sourceComponent.ftype))) {
|
|
173431
|
+
continue;
|
|
173432
|
+
}
|
|
173433
|
+
if (component.centerX === null || component.centerY === null)
|
|
173434
|
+
continue;
|
|
173435
|
+
const componentPcbPorts = pcbPortIndexes.pcbPortsBySourceComponentId.get(component.sourceComponentId);
|
|
173436
|
+
if (!componentPcbPorts || componentPcbPorts.length < 2)
|
|
173437
|
+
continue;
|
|
173438
|
+
const [firstComponentPcbPort, secondComponentPcbPort] = componentPcbPorts;
|
|
173439
|
+
if (!firstComponentPcbPort || !secondComponentPcbPort)
|
|
173440
|
+
continue;
|
|
173441
|
+
const hasMultiplePins = componentPcbPorts.length > 2;
|
|
173442
|
+
const centerX = component.centerX;
|
|
173443
|
+
const centerY = component.centerY;
|
|
173444
|
+
const movingPcbPorts = componentPcbPorts.filter((port) => !hasMultiplePins || Math.hypot(port.x - centerX, port.y - centerY) > GEOMETRY_EPSILON);
|
|
173445
|
+
if (movingPcbPorts.length < 2)
|
|
173446
|
+
continue;
|
|
173447
|
+
let crossingConnectionCount = 0;
|
|
173448
|
+
for (const pcbPort of movingPcbPorts) {
|
|
173449
|
+
const connectedSourcePortIds = connectedSourcePortIdsBySourcePortId.get(pcbPort.source_port_id);
|
|
173450
|
+
if (!connectedSourcePortIds)
|
|
173451
|
+
break;
|
|
173452
|
+
if (componentPcbPorts.every((port) => connectedSourcePortIds.has(port.source_port_id))) {
|
|
173453
|
+
break;
|
|
173454
|
+
}
|
|
173455
|
+
const rotatedPosition = {
|
|
173456
|
+
x: 2 * component.centerX - pcbPort.x,
|
|
173457
|
+
y: 2 * component.centerY - pcbPort.y
|
|
173458
|
+
};
|
|
173459
|
+
let connectedPcbPort;
|
|
173460
|
+
let nearestDistance = Infinity;
|
|
173461
|
+
let rotatedNearestDistance = Infinity;
|
|
173462
|
+
for (const connectedSourcePortId of connectedSourcePortIds) {
|
|
173463
|
+
const candidate = pcbPortIndexes.pcbPortBySourcePortId.get(connectedSourcePortId);
|
|
173464
|
+
if (!candidate)
|
|
173465
|
+
continue;
|
|
173466
|
+
if (pcbPortIndexes.sourceComponentIdBySourcePortId.get(connectedSourcePortId) === component.sourceComponentId) {
|
|
173467
|
+
continue;
|
|
173468
|
+
}
|
|
173469
|
+
if (!pcbPort.layers.some((layer) => candidate.layers.includes(layer))) {
|
|
173470
|
+
continue;
|
|
173471
|
+
}
|
|
173472
|
+
const distance = Math.hypot(candidate.x - pcbPort.x, candidate.y - pcbPort.y);
|
|
173473
|
+
if (distance < nearestDistance) {
|
|
173474
|
+
connectedPcbPort = candidate;
|
|
173475
|
+
nearestDistance = distance;
|
|
173476
|
+
}
|
|
173477
|
+
rotatedNearestDistance = Math.min(rotatedNearestDistance, Math.hypot(candidate.x - rotatedPosition.x, candidate.y - rotatedPosition.y));
|
|
173478
|
+
}
|
|
173479
|
+
if (!connectedPcbPort)
|
|
173480
|
+
break;
|
|
173481
|
+
if (rotatedNearestDistance >= nearestDistance - GEOMETRY_EPSILON)
|
|
173482
|
+
break;
|
|
173483
|
+
const crossesPadCenterline = doesConnectionCrossPadCenterline({
|
|
173484
|
+
pcbPort,
|
|
173485
|
+
connectedPcbPort,
|
|
173486
|
+
firstComponentPcbPort: hasMultiplePins ? pcbPort : firstComponentPcbPort,
|
|
173487
|
+
secondComponentPcbPort: hasMultiplePins ? rotatedPosition : secondComponentPcbPort
|
|
173488
|
+
});
|
|
173489
|
+
if (!crossesPadCenterline)
|
|
173490
|
+
break;
|
|
173491
|
+
crossingConnectionCount += 1;
|
|
173492
|
+
}
|
|
173493
|
+
if (crossingConnectionCount !== movingPcbPorts.length)
|
|
173494
|
+
continue;
|
|
173495
|
+
issues.push(createIssue({
|
|
173496
|
+
type: "suboptimal_orientation",
|
|
173497
|
+
componentA: component.name,
|
|
173498
|
+
clearance: 0,
|
|
173499
|
+
severity: SUBOPTIMAL_ORIENTATION_SEVERITY,
|
|
173500
|
+
summary: hasMultiplePins ? `${component.name} connections favor the opposite orientation` : `${component.name} connections cross the routing path between its pads`,
|
|
173501
|
+
suggested_move: `rotate ${component.name} 180 degrees`
|
|
173502
|
+
}));
|
|
173503
|
+
}
|
|
173504
|
+
return issues;
|
|
173505
|
+
};
|
|
173506
|
+
var buildIssues = ({
|
|
173507
|
+
circuitJson,
|
|
173508
|
+
components,
|
|
173509
|
+
boardBounds
|
|
173510
|
+
}) => {
|
|
173307
173511
|
const issues = [];
|
|
173308
173512
|
for (const component of components) {
|
|
173309
173513
|
const boardEdgeStatus = getBoardEdgeStatus(component.bounds, boardBounds, component.name);
|
|
@@ -173414,6 +173618,7 @@ var buildIssues = (components, boardBounds) => {
|
|
|
173414
173618
|
}
|
|
173415
173619
|
}
|
|
173416
173620
|
}
|
|
173621
|
+
issues.push(...buildSuboptimalOrientationIssues(circuitJson, components));
|
|
173417
173622
|
return issues.sort((a, b) => b.severity - a.severity);
|
|
173418
173623
|
};
|
|
173419
173624
|
var buildClusters = (components, issues) => {
|
|
@@ -173606,7 +173811,7 @@ var formatPlacementAnalysisReport = (report) => {
|
|
|
173606
173811
|
};
|
|
173607
173812
|
var buildPlacementAnalysisReport = (circuitJson) => {
|
|
173608
173813
|
const { components, boardBounds } = buildComponentContexts(circuitJson);
|
|
173609
|
-
const issues = buildIssues(components, boardBounds);
|
|
173814
|
+
const issues = buildIssues({ circuitJson, components, boardBounds });
|
|
173610
173815
|
const clusters = buildClusters(components, issues);
|
|
173611
173816
|
const countsByType = buildCountsByType(issues);
|
|
173612
173817
|
const boardTopLayer = buildBoardTopLayerReport(components, boardBounds);
|
|
@@ -319198,7 +319403,7 @@ var registerCheckRoutingDifficulty = (program) => {
|
|
|
319198
319403
|
});
|
|
319199
319404
|
};
|
|
319200
319405
|
|
|
319201
|
-
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/
|
|
319406
|
+
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/ConnectorPlacementSolver/ConnectorPlacementSolver.ts
|
|
319202
319407
|
import { BaseSolver as BaseSolver5 } from "@tscircuit/solver-utils";
|
|
319203
319408
|
|
|
319204
319409
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/utils/format.ts
|
|
@@ -319219,6 +319424,21 @@ var addAttr = (attrs, key, value, options) => {
|
|
|
319219
319424
|
attrs.push(`${key}="${stringValue}"`);
|
|
319220
319425
|
};
|
|
319221
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
|
+
|
|
319222
319442
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/utils/source-connectivity.ts
|
|
319223
319443
|
function getSourceConnectivity(circuitJson) {
|
|
319224
319444
|
const parent = new Map;
|
|
@@ -319363,6 +319583,207 @@ function append2(map, key, value) {
|
|
|
319363
319583
|
map.set(key, [value]);
|
|
319364
319584
|
}
|
|
319365
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
|
+
|
|
319366
319787
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/utils/graphics.ts
|
|
319367
319788
|
import { mergeGraphics as mergeGraphics2 } from "graphics-debug";
|
|
319368
319789
|
function mergeGraphicsObjects2(objects) {
|
|
@@ -319396,7 +319817,7 @@ function visualizeCircuitJson(circuitJson) {
|
|
|
319396
319817
|
}
|
|
319397
319818
|
|
|
319398
319819
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/CapacitorOrientationSolver/CapacitorOrientationSolver.ts
|
|
319399
|
-
class CapacitorOrientationSolver extends
|
|
319820
|
+
class CapacitorOrientationSolver extends BaseSolver6 {
|
|
319400
319821
|
static ORIENTATION_MESSAGE = 'Use schOrientation="vertical" on this capacitor to fix the symbol orientation';
|
|
319401
319822
|
ctx;
|
|
319402
319823
|
out;
|
|
@@ -319520,8 +319941,8 @@ class CapacitorOrientationSolver extends BaseSolver5 {
|
|
|
319520
319941
|
}
|
|
319521
319942
|
|
|
319522
319943
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/DecouplingCapacitorGroupingSolver/DecouplingCapacitorGroupingSolver.ts
|
|
319523
|
-
import { BaseSolver as
|
|
319524
|
-
class DecouplingCapacitorGroupingSolver extends
|
|
319944
|
+
import { BaseSolver as BaseSolver7 } from "@tscircuit/solver-utils";
|
|
319945
|
+
class DecouplingCapacitorGroupingSolver extends BaseSolver7 {
|
|
319525
319946
|
params;
|
|
319526
319947
|
static MIN_BODY_GAP = 4;
|
|
319527
319948
|
banks = [];
|
|
@@ -319618,25 +320039,8 @@ class DecouplingCapacitorGroupingSolver extends BaseSolver6 {
|
|
|
319618
320039
|
}
|
|
319619
320040
|
|
|
319620
320041
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/ComponentNetLabelCollisionSolver/ComponentNetLabelCollisionSolver.ts
|
|
319621
|
-
import { BaseSolver as
|
|
319622
|
-
|
|
319623
|
-
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/utils/geometry.ts
|
|
319624
|
-
function centeredRect(cx, cy, w, h) {
|
|
319625
|
-
return {
|
|
319626
|
-
left: cx - w / 2,
|
|
319627
|
-
right: cx + w / 2,
|
|
319628
|
-
top: cy + h / 2,
|
|
319629
|
-
bottom: cy - h / 2
|
|
319630
|
-
};
|
|
319631
|
-
}
|
|
319632
|
-
function rectOverlap(a, b) {
|
|
319633
|
-
const ow = Math.min(a.right, b.right) - Math.max(a.left, b.left);
|
|
319634
|
-
const oh = Math.min(a.top, b.top) - Math.max(a.bottom, b.bottom);
|
|
319635
|
-
return ow > 0 && oh > 0 ? { ow, oh } : null;
|
|
319636
|
-
}
|
|
319637
|
-
|
|
319638
|
-
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/ComponentNetLabelCollisionSolver/ComponentNetLabelCollisionSolver.ts
|
|
319639
|
-
class ComponentNetLabelCollisionSolver extends BaseSolver7 {
|
|
320042
|
+
import { BaseSolver as BaseSolver8 } from "@tscircuit/solver-utils";
|
|
320043
|
+
class ComponentNetLabelCollisionSolver extends BaseSolver8 {
|
|
319640
320044
|
params;
|
|
319641
320045
|
LABEL_HALF_HEIGHT = 0.1;
|
|
319642
320046
|
LABEL_BOUNDS_SLACK = 0.1;
|
|
@@ -319996,8 +320400,8 @@ class ComponentNetLabelCollisionSolver extends BaseSolver7 {
|
|
|
319996
320400
|
}
|
|
319997
320401
|
|
|
319998
320402
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/ComponentPinAlignmentSolver/ComponentPinAlignmentSolver.ts
|
|
319999
|
-
import { BaseSolver as
|
|
320000
|
-
class ComponentPinAlignmentSolver extends
|
|
320403
|
+
import { BaseSolver as BaseSolver9 } from "@tscircuit/solver-utils";
|
|
320404
|
+
class ComponentPinAlignmentSolver extends BaseSolver9 {
|
|
320001
320405
|
static ALIGNMENT_EPSILON = 0.01;
|
|
320002
320406
|
ctx;
|
|
320003
320407
|
out;
|
|
@@ -320131,8 +320535,8 @@ class ComponentPinAlignmentSolver extends BaseSolver8 {
|
|
|
320131
320535
|
}
|
|
320132
320536
|
|
|
320133
320537
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/CrystalLoadCapacitorPlacementSolver/CrystalLoadCapacitorPlacementSolver.ts
|
|
320134
|
-
import { BaseSolver as
|
|
320135
|
-
class CrystalLoadCapacitorPlacementSolver extends
|
|
320538
|
+
import { BaseSolver as BaseSolver10 } from "@tscircuit/solver-utils";
|
|
320539
|
+
class CrystalLoadCapacitorPlacementSolver extends BaseSolver10 {
|
|
320136
320540
|
static ALIGNMENT_TOLERANCE = 0.1;
|
|
320137
320541
|
issues;
|
|
320138
320542
|
networks;
|
|
@@ -320154,8 +320558,8 @@ class CrystalLoadCapacitorPlacementSolver extends BaseSolver9 {
|
|
|
320154
320558
|
}
|
|
320155
320559
|
this.currentNetworkIndex += 1;
|
|
320156
320560
|
this.solved = this.currentNetworkIndex >= this.networks.length;
|
|
320157
|
-
const deltaSchX =
|
|
320158
|
-
const deltaSchY =
|
|
320561
|
+
const deltaSchX = round2(network.newSchX - network.crystal.schX);
|
|
320562
|
+
const deltaSchY = round2(network.newSchY - network.crystal.schY);
|
|
320159
320563
|
if (Math.abs(deltaSchX) <= CrystalLoadCapacitorPlacementSolver.ALIGNMENT_TOLERANCE && Math.abs(deltaSchY) <= CrystalLoadCapacitorPlacementSolver.ALIGNMENT_TOLERANCE) {
|
|
320160
320564
|
return;
|
|
320161
320565
|
}
|
|
@@ -320268,8 +320672,8 @@ class CrystalLoadCapacitorPlacementSolver extends BaseSolver9 {
|
|
|
320268
320672
|
crystal: crystalPlacement,
|
|
320269
320673
|
firstLoadCapacitor: capacitors[0],
|
|
320270
320674
|
secondLoadCapacitor: capacitors[1],
|
|
320271
|
-
newSchX:
|
|
320272
|
-
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)
|
|
320273
320677
|
});
|
|
320274
320678
|
}
|
|
320275
320679
|
return networks;
|
|
@@ -320287,13 +320691,13 @@ class CrystalLoadCapacitorPlacementSolver extends BaseSolver9 {
|
|
|
320287
320691
|
return `<CrystalNotCenteredOverLoadCapacitors ${attrs.join(" ")} />`;
|
|
320288
320692
|
}
|
|
320289
320693
|
}
|
|
320290
|
-
var pairDistance = (pair, crystal) =>
|
|
320291
|
-
var
|
|
320292
|
-
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;
|
|
320293
320697
|
|
|
320294
320698
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/DiodeResistorAlignmentSolver/DiodeResistorAlignmentSolver.ts
|
|
320295
|
-
import { BaseSolver as
|
|
320296
|
-
class DiodeResistorAlignmentSolver extends
|
|
320699
|
+
import { BaseSolver as BaseSolver11 } from "@tscircuit/solver-utils";
|
|
320700
|
+
class DiodeResistorAlignmentSolver extends BaseSolver11 {
|
|
320297
320701
|
static DIODE_FTYPES = new Set(["simple_led", "simple_diode"]);
|
|
320298
320702
|
ctx;
|
|
320299
320703
|
out;
|
|
@@ -320455,8 +320859,8 @@ class DiodeResistorAlignmentSolver extends BaseSolver10 {
|
|
|
320455
320859
|
}
|
|
320456
320860
|
|
|
320457
320861
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/FeedbackNetworkPlacementSolver/FeedbackNetworkPlacementSolver.ts
|
|
320458
|
-
import { BaseSolver as
|
|
320459
|
-
class FeedbackNetworkPlacementSolver extends
|
|
320862
|
+
import { BaseSolver as BaseSolver12 } from "@tscircuit/solver-utils";
|
|
320863
|
+
class FeedbackNetworkPlacementSolver extends BaseSolver12 {
|
|
320460
320864
|
static MIN_BODY_GAP = 4;
|
|
320461
320865
|
index;
|
|
320462
320866
|
amplifierIds;
|
|
@@ -320541,8 +320945,8 @@ function distanceBetweenBoxes(a, b) {
|
|
|
320541
320945
|
}
|
|
320542
320946
|
|
|
320543
320947
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/PullResistorPlacementSolver/PullResistorPlacementSolver.ts
|
|
320544
|
-
import { BaseSolver as
|
|
320545
|
-
class PullResistorPlacementSolver extends
|
|
320948
|
+
import { BaseSolver as BaseSolver13 } from "@tscircuit/solver-utils";
|
|
320949
|
+
class PullResistorPlacementSolver extends BaseSolver13 {
|
|
320546
320950
|
static MIN_WRONG_SIDE_GAP = 1.5;
|
|
320547
320951
|
index;
|
|
320548
320952
|
resistorIds;
|
|
@@ -320638,8 +321042,8 @@ class PullResistorPlacementSolver extends BaseSolver12 {
|
|
|
320638
321042
|
}
|
|
320639
321043
|
|
|
320640
321044
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/TwoPinComponentRailOrientationSolver/TwoPinComponentRailOrientationSolver.ts
|
|
320641
|
-
import { BaseSolver as
|
|
320642
|
-
class TwoPinComponentRailOrientationSolver extends
|
|
321045
|
+
import { BaseSolver as BaseSolver14 } from "@tscircuit/solver-utils";
|
|
321046
|
+
class TwoPinComponentRailOrientationSolver extends BaseSolver14 {
|
|
320643
321047
|
static EPSILON = 0.01;
|
|
320644
321048
|
index;
|
|
320645
321049
|
powerNets;
|
|
@@ -320723,8 +321127,8 @@ class TwoPinComponentRailOrientationSolver extends BaseSolver13 {
|
|
|
320723
321127
|
}
|
|
320724
321128
|
|
|
320725
321129
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/SchematicBoxInnerLabelCollisionSolver/SchematicBoxInnerLabelCollisionSolver.ts
|
|
320726
|
-
import { BaseSolver as
|
|
320727
|
-
class SchematicBoxInnerLabelCollisionSolver extends
|
|
321130
|
+
import { BaseSolver as BaseSolver15 } from "@tscircuit/solver-utils";
|
|
321131
|
+
class SchematicBoxInnerLabelCollisionSolver extends BaseSolver15 {
|
|
320728
321132
|
params;
|
|
320729
321133
|
MESSAGE = "Inner labels are colliding. Increase the schWidth or schHeight.";
|
|
320730
321134
|
PIN_LABEL_EDGE_PADDING = 0.1;
|
|
@@ -320922,8 +321326,8 @@ class SchematicBoxInnerLabelCollisionSolver extends BaseSolver14 {
|
|
|
320922
321326
|
}
|
|
320923
321327
|
|
|
320924
321328
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/SchematicBoxOverlapSolver/SchematicBoxOverlapSolver.ts
|
|
320925
|
-
import { BaseSolver as
|
|
320926
|
-
class SchematicBoxOverlapSolver extends
|
|
321329
|
+
import { BaseSolver as BaseSolver16 } from "@tscircuit/solver-utils";
|
|
321330
|
+
class SchematicBoxOverlapSolver extends BaseSolver16 {
|
|
320927
321331
|
params;
|
|
320928
321332
|
placements;
|
|
320929
321333
|
firstIndex = 0;
|
|
@@ -321042,8 +321446,8 @@ class SchematicBoxOverlapSolver extends BaseSolver15 {
|
|
|
321042
321446
|
}
|
|
321043
321447
|
|
|
321044
321448
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/SchematicBoxTooWideSolver/SchematicBoxTooWideSolver.ts
|
|
321045
|
-
import { BaseSolver as
|
|
321046
|
-
class SchematicBoxTooWideSolver extends
|
|
321449
|
+
import { BaseSolver as BaseSolver17 } from "@tscircuit/solver-utils";
|
|
321450
|
+
class SchematicBoxTooWideSolver extends BaseSolver17 {
|
|
321047
321451
|
params;
|
|
321048
321452
|
SCHEMATIC_BOX_TOO_WIDE_MESSAGE = "Shrink schematic box width";
|
|
321049
321453
|
PIN_HEADER_MAX_ALLOWED_GAP = 0.1;
|
|
@@ -321218,8 +321622,8 @@ class SchematicBoxTooWideSolver extends BaseSolver16 {
|
|
|
321218
321622
|
}
|
|
321219
321623
|
|
|
321220
321624
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/SchematicPinPaddingToEdgeSolver/SchematicPinPaddingToEdgeSolver.ts
|
|
321221
|
-
import { BaseSolver as
|
|
321222
|
-
class SchematicPinPaddingToEdgeSolver extends
|
|
321625
|
+
import { BaseSolver as BaseSolver18 } from "@tscircuit/solver-utils";
|
|
321626
|
+
class SchematicPinPaddingToEdgeSolver extends BaseSolver18 {
|
|
321223
321627
|
params;
|
|
321224
321628
|
MESSAGE = "Move schematic pins closer to the box edge or change the schematic box";
|
|
321225
321629
|
PIN_NAME_CHARACTER_WIDTH = 0.095;
|
|
@@ -321557,8 +321961,8 @@ var buildSolverContext = (circuitJson) => {
|
|
|
321557
321961
|
};
|
|
321558
321962
|
|
|
321559
321963
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/TraceSimplificationSolver/TraceSimplificationSolver.ts
|
|
321560
|
-
import { BaseSolver as
|
|
321561
|
-
class TraceSimplificationSolver extends
|
|
321964
|
+
import { BaseSolver as BaseSolver19 } from "@tscircuit/solver-utils";
|
|
321965
|
+
class TraceSimplificationSolver extends BaseSolver19 {
|
|
321562
321966
|
static EPSILON = 0.01;
|
|
321563
321967
|
ctx;
|
|
321564
321968
|
out;
|
|
@@ -321788,7 +322192,7 @@ class TraceSimplificationSolver extends BaseSolver18 {
|
|
|
321788
322192
|
}
|
|
321789
322193
|
|
|
321790
322194
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/TwoPinComponentOrientationSolver/TwoPinComponentOrientationSolver.ts
|
|
321791
|
-
import { BaseSolver as
|
|
322195
|
+
import { BaseSolver as BaseSolver20 } from "@tscircuit/solver-utils";
|
|
321792
322196
|
|
|
321793
322197
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/TwoPinComponentOrientationSolver/getPowerOrGroundConnectionIds.ts
|
|
321794
322198
|
import {
|
|
@@ -321827,7 +322231,7 @@ function getPowerOrGroundConnectionIds(circuitJson) {
|
|
|
321827
322231
|
}
|
|
321828
322232
|
|
|
321829
322233
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/TwoPinComponentOrientationSolver/TwoPinComponentOrientationSolver.ts
|
|
321830
|
-
class TwoPinComponentOrientationSolver extends
|
|
322234
|
+
class TwoPinComponentOrientationSolver extends BaseSolver20 {
|
|
321831
322235
|
static EPSILON = 0.01;
|
|
321832
322236
|
ctx;
|
|
321833
322237
|
out;
|
|
@@ -322072,8 +322476,8 @@ class TwoPinComponentOrientationSolver extends BaseSolver19 {
|
|
|
322072
322476
|
}
|
|
322073
322477
|
|
|
322074
322478
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/VerboseNetLabelSolver/VerboseNetLabelSolver.ts
|
|
322075
|
-
import { BaseSolver as
|
|
322076
|
-
class VerboseNetLabelSolver extends
|
|
322479
|
+
import { BaseSolver as BaseSolver21 } from "@tscircuit/solver-utils";
|
|
322480
|
+
class VerboseNetLabelSolver extends BaseSolver21 {
|
|
322077
322481
|
params;
|
|
322078
322482
|
VERBOSE_NET_LABEL_MESSAGE = "Create trace with schDisplayLabel";
|
|
322079
322483
|
netLabels;
|
|
@@ -322182,7 +322586,7 @@ class VerboseNetLabelSolver extends BaseSolver20 {
|
|
|
322182
322586
|
}
|
|
322183
322587
|
|
|
322184
322588
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/SchematicTextClearanceSolver/SchematicTextClearanceSolver.ts
|
|
322185
|
-
import { BaseSolver as
|
|
322589
|
+
import { BaseSolver as BaseSolver22 } from "@tscircuit/solver-utils";
|
|
322186
322590
|
|
|
322187
322591
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/utils/schematic-text-geometry.ts
|
|
322188
322592
|
var rectPolygon = (bounds) => [
|
|
@@ -322305,7 +322709,7 @@ var polygonBounds = (polygons) => {
|
|
|
322305
322709
|
};
|
|
322306
322710
|
|
|
322307
322711
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/SchematicTextClearanceSolver/SchematicTextClearanceSolver.ts
|
|
322308
|
-
class SchematicTextClearanceSolver extends
|
|
322712
|
+
class SchematicTextClearanceSolver extends BaseSolver22 {
|
|
322309
322713
|
params;
|
|
322310
322714
|
texts;
|
|
322311
322715
|
obstacles;
|
|
@@ -322456,8 +322860,8 @@ class SchematicTextClearanceSolver extends BaseSolver21 {
|
|
|
322456
322860
|
}
|
|
322457
322861
|
|
|
322458
322862
|
// node_modules/@tscircuit/circuit-json-schematic-placement-analysis/lib/solvers/ResetNetworkGroupingSolver/ResetNetworkGroupingSolver.ts
|
|
322459
|
-
import { BaseSolver as
|
|
322460
|
-
class ResetNetworkGroupingSolver extends
|
|
322863
|
+
import { BaseSolver as BaseSolver23 } from "@tscircuit/solver-utils";
|
|
322864
|
+
class ResetNetworkGroupingSolver extends BaseSolver23 {
|
|
322461
322865
|
params;
|
|
322462
322866
|
static MIN_DISTANCE = 6;
|
|
322463
322867
|
networks;
|
|
@@ -322668,6 +323072,9 @@ class SchematicPlacementPipeline extends BasePipelineSolver2 {
|
|
|
322668
323072
|
]),
|
|
322669
323073
|
definePipelineStep3("DecouplingCapacitorGroupingSolver", DecouplingCapacitorGroupingSolver, (p) => [
|
|
322670
323074
|
{ ctx: p.ctx, issues: p.issues }
|
|
323075
|
+
]),
|
|
323076
|
+
definePipelineStep3("ConnectorPlacementSolver", ConnectorPlacementSolver, (p) => [
|
|
323077
|
+
{ ctx: p.ctx, issues: p.issues }
|
|
322671
323078
|
])
|
|
322672
323079
|
];
|
|
322673
323080
|
_setup() {
|
|
@@ -322723,6 +323130,11 @@ var getRelevantPlacementsForIssues = ({
|
|
|
322723
323130
|
for (const placement of issue.capacitorSchematicBoxes)
|
|
322724
323131
|
addPlacement(placement);
|
|
322725
323132
|
break;
|
|
323133
|
+
case "ConnectorPositionCausesTraceDetours":
|
|
323134
|
+
addPlacement(issue.connectorSchematicBox);
|
|
323135
|
+
for (const placement of issue.connectedComponents)
|
|
323136
|
+
addPlacement(placement);
|
|
323137
|
+
break;
|
|
322726
323138
|
case "ResetNetworkNotGrouped":
|
|
322727
323139
|
addPlacement(issue.hostSchematicBox);
|
|
322728
323140
|
for (const placement of issue.supportNetworkComponents)
|
|
@@ -322901,7 +323313,8 @@ class SchematicPlacementAnalysis {
|
|
|
322901
323313
|
ResetNetworkNotGrouped: 0,
|
|
322902
323314
|
TwoPinComponentCouldBeFlipped: 0,
|
|
322903
323315
|
TwoPinComponentShouldBeVertical: 0,
|
|
322904
|
-
DecouplingCapacitorsNotCloseTogether: 0
|
|
323316
|
+
DecouplingCapacitorsNotCloseTogether: 0,
|
|
323317
|
+
ConnectorPositionCausesTraceDetours: 0
|
|
322905
323318
|
};
|
|
322906
323319
|
for (const issue of this.getIssues(filter))
|
|
322907
323320
|
counts[issue.lineItemType]++;
|
|
@@ -322959,6 +323372,8 @@ class SchematicPlacementAnalysis {
|
|
|
322959
323372
|
return SchematicTextClearanceSolver.issueToString(issue);
|
|
322960
323373
|
case "ResetNetworkNotGrouped":
|
|
322961
323374
|
return ResetNetworkGroupingSolver.issueToString(issue);
|
|
323375
|
+
case "ConnectorPositionCausesTraceDetours":
|
|
323376
|
+
return ConnectorPlacementSolver.issueToString(issue);
|
|
322962
323377
|
default:
|
|
322963
323378
|
return "";
|
|
322964
323379
|
}
|
|
@@ -342297,7 +342712,7 @@ __export5(dist_exports, {
|
|
|
342297
342712
|
capacitance: () => capacitance4,
|
|
342298
342713
|
circuit_json_footprint_load_error: () => circuit_json_footprint_load_error2,
|
|
342299
342714
|
current: () => current2,
|
|
342300
|
-
distance: () =>
|
|
342715
|
+
distance: () => distance51,
|
|
342301
342716
|
duration_ms: () => duration_ms,
|
|
342302
342717
|
experiment_type: () => experiment_type,
|
|
342303
342718
|
external_footprint_load_error: () => external_footprint_load_error2,
|
|
@@ -346764,7 +347179,7 @@ var inductance2 = external_exports2.string().or(external_exports2.number()).tran
|
|
|
346764
347179
|
var voltage5 = external_exports2.string().or(external_exports2.number()).transform((v) => parseAndConvertSiUnit(v, "V").value);
|
|
346765
347180
|
var length67 = external_exports2.string().or(external_exports2.number()).transform((v) => parseAndConvertSiUnit(v).value);
|
|
346766
347181
|
var frequency7 = external_exports2.string().or(external_exports2.number()).transform((v) => parseAndConvertSiUnit(v, "Hz").value);
|
|
346767
|
-
var
|
|
347182
|
+
var distance51 = length67;
|
|
346768
347183
|
var current2 = external_exports2.string().or(external_exports2.number()).transform((v) => parseAndConvertSiUnit(v, "A").value);
|
|
346769
347184
|
var duration_ms = external_exports2.string().or(external_exports2.number()).transform((v) => parseAndConvertSiUnit(v).value);
|
|
346770
347185
|
var time = duration_ms;
|
|
@@ -346805,16 +347220,16 @@ expectStringUnionsMatch('T2 has extra: "c"');
|
|
|
346805
347220
|
expectStringUnionsMatch('T1 has extra: "d", T2 has extra: "c"');
|
|
346806
347221
|
expectStringUnionsMatch(true);
|
|
346807
347222
|
var point9 = external_exports2.object({
|
|
346808
|
-
x:
|
|
346809
|
-
y:
|
|
347223
|
+
x: distance51,
|
|
347224
|
+
y: distance51
|
|
346810
347225
|
});
|
|
346811
347226
|
var position = point9;
|
|
346812
347227
|
expectTypesMatch2(true);
|
|
346813
347228
|
expectTypesMatch2(true);
|
|
346814
347229
|
var point33 = external_exports2.object({
|
|
346815
|
-
x:
|
|
346816
|
-
y:
|
|
346817
|
-
z:
|
|
347230
|
+
x: distance51,
|
|
347231
|
+
y: distance51,
|
|
347232
|
+
z: distance51
|
|
346818
347233
|
});
|
|
346819
347234
|
var position3 = point33;
|
|
346820
347235
|
expectTypesMatch2(true);
|
|
@@ -346879,7 +347294,7 @@ var kicadAt2 = point9.extend({
|
|
|
346879
347294
|
expectTypesMatch2(true);
|
|
346880
347295
|
var kicadFont2 = external_exports2.object({
|
|
346881
347296
|
size: point9.optional(),
|
|
346882
|
-
thickness:
|
|
347297
|
+
thickness: distance51.optional()
|
|
346883
347298
|
});
|
|
346884
347299
|
expectTypesMatch2(true);
|
|
346885
347300
|
var kicadEffects2 = external_exports2.object({
|
|
@@ -346915,7 +347330,7 @@ var kicadFootprintPad2 = external_exports2.object({
|
|
|
346915
347330
|
shape: external_exports2.string().optional(),
|
|
346916
347331
|
at: kicadAt2.optional(),
|
|
346917
347332
|
size: point9.optional(),
|
|
346918
|
-
drill:
|
|
347333
|
+
drill: distance51.optional(),
|
|
346919
347334
|
layers: external_exports2.array(external_exports2.string()).optional(),
|
|
346920
347335
|
removeUnusedLayers: external_exports2.boolean().optional(),
|
|
346921
347336
|
uuid: external_exports2.string().optional()
|
|
@@ -346946,7 +347361,7 @@ var kicadSymbolPinNumbers2 = external_exports2.object({
|
|
|
346946
347361
|
});
|
|
346947
347362
|
expectTypesMatch2(true);
|
|
346948
347363
|
var kicadSymbolPinNames2 = external_exports2.object({
|
|
346949
|
-
offset:
|
|
347364
|
+
offset: distance51.optional(),
|
|
346950
347365
|
hide: external_exports2.boolean().optional()
|
|
346951
347366
|
});
|
|
346952
347367
|
expectTypesMatch2(true);
|
|
@@ -347020,7 +347435,7 @@ var source_simple_capacitor = source_component_base.extend({
|
|
|
347020
347435
|
capacitance: capacitance4,
|
|
347021
347436
|
max_voltage_rating: voltage5.optional(),
|
|
347022
347437
|
display_capacitance: external_exports2.string().optional(),
|
|
347023
|
-
max_decoupling_trace_length:
|
|
347438
|
+
max_decoupling_trace_length: distance51.optional()
|
|
347024
347439
|
});
|
|
347025
347440
|
expectTypesMatch2(true);
|
|
347026
347441
|
var source_simple_resistor = source_component_base.extend({
|
|
@@ -347578,11 +347993,11 @@ var schematic_box = external_exports2.object({
|
|
|
347578
347993
|
schematic_sheet_id: external_exports2.string().optional(),
|
|
347579
347994
|
schematic_component_id: external_exports2.string().optional(),
|
|
347580
347995
|
schematic_symbol_id: external_exports2.string().optional(),
|
|
347581
|
-
width:
|
|
347582
|
-
height:
|
|
347996
|
+
width: distance51,
|
|
347997
|
+
height: distance51,
|
|
347583
347998
|
is_dashed: external_exports2.boolean().default(false),
|
|
347584
|
-
x:
|
|
347585
|
-
y:
|
|
347999
|
+
x: distance51,
|
|
348000
|
+
y: distance51,
|
|
347586
348001
|
subcircuit_id: external_exports2.string().optional()
|
|
347587
348002
|
}).describe("Draws a box on the schematic");
|
|
347588
348003
|
expectTypesMatch2(true);
|
|
@@ -347595,10 +348010,10 @@ var schematic_path = external_exports2.object({
|
|
|
347595
348010
|
fill_color: external_exports2.string().optional(),
|
|
347596
348011
|
is_filled: external_exports2.boolean().optional(),
|
|
347597
348012
|
is_dashed: external_exports2.boolean().default(false),
|
|
347598
|
-
stroke_width:
|
|
348013
|
+
stroke_width: distance51.nullable().optional(),
|
|
347599
348014
|
stroke_color: external_exports2.string().optional(),
|
|
347600
|
-
dash_length:
|
|
347601
|
-
dash_gap:
|
|
348015
|
+
dash_length: distance51.optional(),
|
|
348016
|
+
dash_gap: distance51.optional(),
|
|
347602
348017
|
points: external_exports2.array(point9),
|
|
347603
348018
|
subcircuit_id: external_exports2.string().optional()
|
|
347604
348019
|
});
|
|
@@ -347677,15 +348092,15 @@ var schematic_line = external_exports2.object({
|
|
|
347677
348092
|
schematic_sheet_id: external_exports2.string().optional(),
|
|
347678
348093
|
schematic_component_id: external_exports2.string().optional(),
|
|
347679
348094
|
schematic_symbol_id: external_exports2.string().optional(),
|
|
347680
|
-
x1:
|
|
347681
|
-
y1:
|
|
347682
|
-
x2:
|
|
347683
|
-
y2:
|
|
347684
|
-
stroke_width:
|
|
348095
|
+
x1: distance51,
|
|
348096
|
+
y1: distance51,
|
|
348097
|
+
x2: distance51,
|
|
348098
|
+
y2: distance51,
|
|
348099
|
+
stroke_width: distance51.nullable().optional(),
|
|
347685
348100
|
color: external_exports2.string().default("#000000"),
|
|
347686
348101
|
is_dashed: external_exports2.boolean().default(false),
|
|
347687
|
-
dash_length:
|
|
347688
|
-
dash_gap:
|
|
348102
|
+
dash_length: distance51.optional(),
|
|
348103
|
+
dash_gap: distance51.optional(),
|
|
347689
348104
|
subcircuit_id: external_exports2.string().optional()
|
|
347690
348105
|
}).describe("Draws a styled line on the schematic");
|
|
347691
348106
|
expectTypesMatch2(true);
|
|
@@ -347696,10 +348111,10 @@ var schematic_rect = external_exports2.object({
|
|
|
347696
348111
|
schematic_component_id: external_exports2.string().optional(),
|
|
347697
348112
|
schematic_symbol_id: external_exports2.string().optional(),
|
|
347698
348113
|
center: point9,
|
|
347699
|
-
width:
|
|
347700
|
-
height:
|
|
348114
|
+
width: distance51,
|
|
348115
|
+
height: distance51,
|
|
347701
348116
|
rotation: rotation11.default(0),
|
|
347702
|
-
stroke_width:
|
|
348117
|
+
stroke_width: distance51.nullable().optional(),
|
|
347703
348118
|
color: external_exports2.string().default("#000000"),
|
|
347704
348119
|
is_filled: external_exports2.boolean().default(false),
|
|
347705
348120
|
fill_color: external_exports2.string().optional(),
|
|
@@ -347714,8 +348129,8 @@ var schematic_circle = external_exports2.object({
|
|
|
347714
348129
|
schematic_component_id: external_exports2.string().optional(),
|
|
347715
348130
|
schematic_symbol_id: external_exports2.string().optional(),
|
|
347716
348131
|
center: point9,
|
|
347717
|
-
radius:
|
|
347718
|
-
stroke_width:
|
|
348132
|
+
radius: distance51,
|
|
348133
|
+
stroke_width: distance51.nullable().optional(),
|
|
347719
348134
|
color: external_exports2.string().default("#000000"),
|
|
347720
348135
|
is_filled: external_exports2.boolean().default(false),
|
|
347721
348136
|
fill_color: external_exports2.string().optional(),
|
|
@@ -347730,11 +348145,11 @@ var schematic_arc = external_exports2.object({
|
|
|
347730
348145
|
schematic_component_id: external_exports2.string().optional(),
|
|
347731
348146
|
schematic_symbol_id: external_exports2.string().optional(),
|
|
347732
348147
|
center: point9,
|
|
347733
|
-
radius:
|
|
348148
|
+
radius: distance51,
|
|
347734
348149
|
start_angle_degrees: rotation11,
|
|
347735
348150
|
end_angle_degrees: rotation11,
|
|
347736
348151
|
direction: external_exports2.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
347737
|
-
stroke_width:
|
|
348152
|
+
stroke_width: distance51.nullable().optional(),
|
|
347738
348153
|
color: external_exports2.string().default("#000000"),
|
|
347739
348154
|
is_dashed: external_exports2.boolean().default(false),
|
|
347740
348155
|
subcircuit_id: external_exports2.string().optional()
|
|
@@ -347784,8 +348199,8 @@ var schematic_text = external_exports2.object({
|
|
|
347784
348199
|
text: external_exports2.string(),
|
|
347785
348200
|
font_size: external_exports2.number().default(0.18),
|
|
347786
348201
|
position: external_exports2.object({
|
|
347787
|
-
x:
|
|
347788
|
-
y:
|
|
348202
|
+
x: distance51,
|
|
348203
|
+
y: distance51
|
|
347789
348204
|
}),
|
|
347790
348205
|
rotation: external_exports2.number().default(0),
|
|
347791
348206
|
anchor: external_exports2.union([fivePointAnchor2.describe("legacy"), ninePointAnchor2]).default("center"),
|
|
@@ -347955,10 +348370,10 @@ var schematic_table = external_exports2.object({
|
|
|
347955
348370
|
schematic_table_id: getZodPrefixedIdWithDefault("schematic_table"),
|
|
347956
348371
|
schematic_sheet_id: external_exports2.string().optional(),
|
|
347957
348372
|
anchor_position: point9,
|
|
347958
|
-
column_widths: external_exports2.array(
|
|
347959
|
-
row_heights: external_exports2.array(
|
|
347960
|
-
cell_padding:
|
|
347961
|
-
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(),
|
|
347962
348377
|
subcircuit_id: external_exports2.string().optional(),
|
|
347963
348378
|
schematic_component_id: external_exports2.string().optional(),
|
|
347964
348379
|
anchor: ninePointAnchor2.optional()
|
|
@@ -347975,11 +348390,11 @@ var schematic_table_cell = external_exports2.object({
|
|
|
347975
348390
|
end_column_index: external_exports2.number(),
|
|
347976
348391
|
text: external_exports2.string().optional(),
|
|
347977
348392
|
center: point9,
|
|
347978
|
-
width:
|
|
347979
|
-
height:
|
|
348393
|
+
width: distance51,
|
|
348394
|
+
height: distance51,
|
|
347980
348395
|
horizontal_align: external_exports2.enum(["left", "center", "right"]).optional(),
|
|
347981
348396
|
vertical_align: external_exports2.enum(["top", "middle", "bottom"]).optional(),
|
|
347982
|
-
font_size:
|
|
348397
|
+
font_size: distance51.optional(),
|
|
347983
348398
|
subcircuit_id: external_exports2.string().optional()
|
|
347984
348399
|
}).describe("Defines a cell within a schematic_table");
|
|
347985
348400
|
expectTypesMatch2(true);
|
|
@@ -347993,8 +348408,8 @@ var schematic_sheet = external_exports2.object({
|
|
|
347993
348408
|
}).describe("Defines a schematic sheet or page that components can be placed on");
|
|
347994
348409
|
expectTypesMatch2(true);
|
|
347995
348410
|
var point_with_bulge = external_exports2.object({
|
|
347996
|
-
x:
|
|
347997
|
-
y:
|
|
348411
|
+
x: distance51,
|
|
348412
|
+
y: distance51,
|
|
347998
348413
|
bulge: external_exports2.number().optional()
|
|
347999
348414
|
});
|
|
348000
348415
|
expectTypesMatch2(true);
|
|
@@ -348085,8 +348500,8 @@ var getRotationBetweenPcbPin1Locations2 = (from, to) => {
|
|
|
348085
348500
|
return null;
|
|
348086
348501
|
};
|
|
348087
348502
|
var pcb_route_hint = external_exports2.object({
|
|
348088
|
-
x:
|
|
348089
|
-
y:
|
|
348503
|
+
x: distance51,
|
|
348504
|
+
y: distance51,
|
|
348090
348505
|
via: external_exports2.boolean().optional(),
|
|
348091
348506
|
via_to_layer: layer_ref2.optional()
|
|
348092
348507
|
});
|
|
@@ -348094,11 +348509,11 @@ var pcb_route_hints = external_exports2.array(pcb_route_hint);
|
|
|
348094
348509
|
expectTypesMatch2(true);
|
|
348095
348510
|
expectTypesMatch2(true);
|
|
348096
348511
|
var route_hint_point8 = external_exports2.object({
|
|
348097
|
-
x:
|
|
348098
|
-
y:
|
|
348512
|
+
x: distance51,
|
|
348513
|
+
y: distance51,
|
|
348099
348514
|
via: external_exports2.boolean().optional(),
|
|
348100
348515
|
to_layer: layer_ref2.optional(),
|
|
348101
|
-
trace_width:
|
|
348516
|
+
trace_width: distance51.optional()
|
|
348102
348517
|
});
|
|
348103
348518
|
expectTypesMatch2(true);
|
|
348104
348519
|
var manufacturing_drc_properties = external_exports2.object({
|
|
@@ -348183,8 +348598,8 @@ var pcb_hole_circle = external_exports2.object({
|
|
|
348183
348598
|
pcb_component_id: external_exports2.string().optional(),
|
|
348184
348599
|
hole_shape: external_exports2.literal("circle"),
|
|
348185
348600
|
hole_diameter: external_exports2.number(),
|
|
348186
|
-
x:
|
|
348187
|
-
y:
|
|
348601
|
+
x: distance51,
|
|
348602
|
+
y: distance51,
|
|
348188
348603
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348189
348604
|
soldermask_margin: external_exports2.number().optional()
|
|
348190
348605
|
});
|
|
@@ -348199,8 +348614,8 @@ var pcb_hole_rect = external_exports2.object({
|
|
|
348199
348614
|
hole_shape: external_exports2.literal("rect"),
|
|
348200
348615
|
hole_width: external_exports2.number(),
|
|
348201
348616
|
hole_height: external_exports2.number(),
|
|
348202
|
-
x:
|
|
348203
|
-
y:
|
|
348617
|
+
x: distance51,
|
|
348618
|
+
y: distance51,
|
|
348204
348619
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348205
348620
|
soldermask_margin: external_exports2.number().optional()
|
|
348206
348621
|
});
|
|
@@ -348214,8 +348629,8 @@ var pcb_hole_circle_or_square = external_exports2.object({
|
|
|
348214
348629
|
pcb_component_id: external_exports2.string().optional(),
|
|
348215
348630
|
hole_shape: external_exports2.enum(["circle", "square"]),
|
|
348216
348631
|
hole_diameter: external_exports2.number(),
|
|
348217
|
-
x:
|
|
348218
|
-
y:
|
|
348632
|
+
x: distance51,
|
|
348633
|
+
y: distance51,
|
|
348219
348634
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348220
348635
|
soldermask_margin: external_exports2.number().optional()
|
|
348221
348636
|
});
|
|
@@ -348230,8 +348645,8 @@ var pcb_hole_oval = external_exports2.object({
|
|
|
348230
348645
|
hole_shape: external_exports2.literal("oval"),
|
|
348231
348646
|
hole_width: external_exports2.number(),
|
|
348232
348647
|
hole_height: external_exports2.number(),
|
|
348233
|
-
x:
|
|
348234
|
-
y:
|
|
348648
|
+
x: distance51,
|
|
348649
|
+
y: distance51,
|
|
348235
348650
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348236
348651
|
soldermask_margin: external_exports2.number().optional()
|
|
348237
348652
|
});
|
|
@@ -348246,8 +348661,8 @@ var pcb_hole_pill = external_exports2.object({
|
|
|
348246
348661
|
hole_shape: external_exports2.literal("pill"),
|
|
348247
348662
|
hole_width: external_exports2.number(),
|
|
348248
348663
|
hole_height: external_exports2.number(),
|
|
348249
|
-
x:
|
|
348250
|
-
y:
|
|
348664
|
+
x: distance51,
|
|
348665
|
+
y: distance51,
|
|
348251
348666
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348252
348667
|
soldermask_margin: external_exports2.number().optional()
|
|
348253
348668
|
});
|
|
@@ -348262,8 +348677,8 @@ var pcb_hole_rotated_pill = external_exports2.object({
|
|
|
348262
348677
|
hole_shape: external_exports2.literal("rotated_pill"),
|
|
348263
348678
|
hole_width: external_exports2.number(),
|
|
348264
348679
|
hole_height: external_exports2.number(),
|
|
348265
|
-
x:
|
|
348266
|
-
y:
|
|
348680
|
+
x: distance51,
|
|
348681
|
+
y: distance51,
|
|
348267
348682
|
ccw_rotation: rotation11,
|
|
348268
348683
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348269
348684
|
soldermask_margin: external_exports2.number().optional()
|
|
@@ -348279,8 +348694,8 @@ var pcb_plated_hole_circle = external_exports2.object({
|
|
|
348279
348694
|
outer_diameter: external_exports2.number(),
|
|
348280
348695
|
hole_diameter: external_exports2.number(),
|
|
348281
348696
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348282
|
-
x:
|
|
348283
|
-
y:
|
|
348697
|
+
x: distance51,
|
|
348698
|
+
y: distance51,
|
|
348284
348699
|
layers: external_exports2.array(layer_ref2),
|
|
348285
348700
|
port_hints: external_exports2.array(external_exports2.string()).optional(),
|
|
348286
348701
|
pcb_component_id: external_exports2.string().optional(),
|
|
@@ -348298,8 +348713,8 @@ var pcb_plated_hole_oval = external_exports2.object({
|
|
|
348298
348713
|
hole_width: external_exports2.number(),
|
|
348299
348714
|
hole_height: external_exports2.number(),
|
|
348300
348715
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348301
|
-
x:
|
|
348302
|
-
y:
|
|
348716
|
+
x: distance51,
|
|
348717
|
+
y: distance51,
|
|
348303
348718
|
ccw_rotation: rotation11,
|
|
348304
348719
|
layers: external_exports2.array(layer_ref2),
|
|
348305
348720
|
port_hints: external_exports2.array(external_exports2.string()).optional(),
|
|
@@ -348319,11 +348734,11 @@ var pcb_circular_hole_with_rect_pad = external_exports2.object({
|
|
|
348319
348734
|
rect_pad_width: external_exports2.number(),
|
|
348320
348735
|
rect_pad_height: external_exports2.number(),
|
|
348321
348736
|
rect_border_radius: external_exports2.number().optional(),
|
|
348322
|
-
hole_offset_x:
|
|
348323
|
-
hole_offset_y:
|
|
348737
|
+
hole_offset_x: distance51.default(0),
|
|
348738
|
+
hole_offset_y: distance51.default(0),
|
|
348324
348739
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348325
|
-
x:
|
|
348326
|
-
y:
|
|
348740
|
+
x: distance51,
|
|
348741
|
+
y: distance51,
|
|
348327
348742
|
layers: external_exports2.array(layer_ref2),
|
|
348328
348743
|
port_hints: external_exports2.array(external_exports2.string()).optional(),
|
|
348329
348744
|
pcb_component_id: external_exports2.string().optional(),
|
|
@@ -348344,11 +348759,11 @@ var pcb_pill_hole_with_rect_pad = external_exports2.object({
|
|
|
348344
348759
|
rect_pad_width: external_exports2.number(),
|
|
348345
348760
|
rect_pad_height: external_exports2.number(),
|
|
348346
348761
|
rect_border_radius: external_exports2.number().optional(),
|
|
348347
|
-
hole_offset_x:
|
|
348348
|
-
hole_offset_y:
|
|
348762
|
+
hole_offset_x: distance51.default(0),
|
|
348763
|
+
hole_offset_y: distance51.default(0),
|
|
348349
348764
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348350
|
-
x:
|
|
348351
|
-
y:
|
|
348765
|
+
x: distance51,
|
|
348766
|
+
y: distance51,
|
|
348352
348767
|
layers: external_exports2.array(layer_ref2),
|
|
348353
348768
|
port_hints: external_exports2.array(external_exports2.string()).optional(),
|
|
348354
348769
|
pcb_component_id: external_exports2.string().optional(),
|
|
@@ -348370,11 +348785,11 @@ var pcb_rotated_pill_hole_with_rect_pad = external_exports2.object({
|
|
|
348370
348785
|
rect_pad_height: external_exports2.number(),
|
|
348371
348786
|
rect_border_radius: external_exports2.number().optional(),
|
|
348372
348787
|
rect_ccw_rotation: rotation11,
|
|
348373
|
-
hole_offset_x:
|
|
348374
|
-
hole_offset_y:
|
|
348788
|
+
hole_offset_x: distance51.default(0),
|
|
348789
|
+
hole_offset_y: distance51.default(0),
|
|
348375
348790
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348376
|
-
x:
|
|
348377
|
-
y:
|
|
348791
|
+
x: distance51,
|
|
348792
|
+
y: distance51,
|
|
348378
348793
|
layers: external_exports2.array(layer_ref2),
|
|
348379
348794
|
port_hints: external_exports2.array(external_exports2.string()).optional(),
|
|
348380
348795
|
pcb_component_id: external_exports2.string().optional(),
|
|
@@ -348392,14 +348807,14 @@ var pcb_hole_with_polygon_pad = external_exports2.object({
|
|
|
348392
348807
|
hole_width: external_exports2.number().optional(),
|
|
348393
348808
|
hole_height: external_exports2.number().optional(),
|
|
348394
348809
|
pad_outline: external_exports2.array(external_exports2.object({
|
|
348395
|
-
x:
|
|
348396
|
-
y:
|
|
348810
|
+
x: distance51,
|
|
348811
|
+
y: distance51
|
|
348397
348812
|
})).min(3),
|
|
348398
|
-
hole_offset_x:
|
|
348399
|
-
hole_offset_y:
|
|
348813
|
+
hole_offset_x: distance51.default(0),
|
|
348814
|
+
hole_offset_y: distance51.default(0),
|
|
348400
348815
|
is_covered_with_solder_mask: external_exports2.boolean().optional(),
|
|
348401
|
-
x:
|
|
348402
|
-
y:
|
|
348816
|
+
x: distance51,
|
|
348817
|
+
y: distance51,
|
|
348403
348818
|
layers: external_exports2.array(layer_ref2),
|
|
348404
348819
|
port_hints: external_exports2.array(external_exports2.string()).optional(),
|
|
348405
348820
|
pcb_component_id: external_exports2.string().optional(),
|
|
@@ -348429,8 +348844,8 @@ var pcb_port = external_exports2.object({
|
|
|
348429
348844
|
subcircuit_id: external_exports2.string().optional(),
|
|
348430
348845
|
source_port_id: external_exports2.string(),
|
|
348431
348846
|
pcb_component_id: external_exports2.string().optional(),
|
|
348432
|
-
x:
|
|
348433
|
-
y:
|
|
348847
|
+
x: distance51,
|
|
348848
|
+
y: distance51,
|
|
348434
348849
|
layers: external_exports2.array(layer_ref2),
|
|
348435
348850
|
is_board_pinout: external_exports2.boolean().optional()
|
|
348436
348851
|
}).describe("Defines a port on the PCB");
|
|
@@ -348441,8 +348856,8 @@ var pcb_smtpad_circle = external_exports2.object({
|
|
|
348441
348856
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
348442
348857
|
pcb_group_id: external_exports2.string().optional(),
|
|
348443
348858
|
subcircuit_id: external_exports2.string().optional(),
|
|
348444
|
-
x:
|
|
348445
|
-
y:
|
|
348859
|
+
x: distance51,
|
|
348860
|
+
y: distance51,
|
|
348446
348861
|
radius: external_exports2.number(),
|
|
348447
348862
|
layer: layer_ref2,
|
|
348448
348863
|
port_hints: external_exports2.array(external_exports2.string()).optional(),
|
|
@@ -348458,8 +348873,8 @@ var pcb_smtpad_rect = external_exports2.object({
|
|
|
348458
348873
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
348459
348874
|
pcb_group_id: external_exports2.string().optional(),
|
|
348460
348875
|
subcircuit_id: external_exports2.string().optional(),
|
|
348461
|
-
x:
|
|
348462
|
-
y:
|
|
348876
|
+
x: distance51,
|
|
348877
|
+
y: distance51,
|
|
348463
348878
|
width: external_exports2.number(),
|
|
348464
348879
|
height: external_exports2.number(),
|
|
348465
348880
|
rect_border_radius: external_exports2.number().optional(),
|
|
@@ -348482,8 +348897,8 @@ var pcb_smtpad_rotated_rect = external_exports2.object({
|
|
|
348482
348897
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
348483
348898
|
pcb_group_id: external_exports2.string().optional(),
|
|
348484
348899
|
subcircuit_id: external_exports2.string().optional(),
|
|
348485
|
-
x:
|
|
348486
|
-
y:
|
|
348900
|
+
x: distance51,
|
|
348901
|
+
y: distance51,
|
|
348487
348902
|
width: external_exports2.number(),
|
|
348488
348903
|
height: external_exports2.number(),
|
|
348489
348904
|
rect_border_radius: external_exports2.number().optional(),
|
|
@@ -348507,8 +348922,8 @@ var pcb_smtpad_pill = external_exports2.object({
|
|
|
348507
348922
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
348508
348923
|
pcb_group_id: external_exports2.string().optional(),
|
|
348509
348924
|
subcircuit_id: external_exports2.string().optional(),
|
|
348510
|
-
x:
|
|
348511
|
-
y:
|
|
348925
|
+
x: distance51,
|
|
348926
|
+
y: distance51,
|
|
348512
348927
|
width: external_exports2.number(),
|
|
348513
348928
|
height: external_exports2.number(),
|
|
348514
348929
|
radius: external_exports2.number(),
|
|
@@ -348526,8 +348941,8 @@ var pcb_smtpad_rotated_pill = external_exports2.object({
|
|
|
348526
348941
|
pcb_smtpad_id: getZodPrefixedIdWithDefault("pcb_smtpad"),
|
|
348527
348942
|
pcb_group_id: external_exports2.string().optional(),
|
|
348528
348943
|
subcircuit_id: external_exports2.string().optional(),
|
|
348529
|
-
x:
|
|
348530
|
-
y:
|
|
348944
|
+
x: distance51,
|
|
348945
|
+
y: distance51,
|
|
348531
348946
|
width: external_exports2.number(),
|
|
348532
348947
|
height: external_exports2.number(),
|
|
348533
348948
|
radius: external_exports2.number(),
|
|
@@ -348575,8 +348990,8 @@ var pcb_solder_paste_circle = external_exports2.object({
|
|
|
348575
348990
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
348576
348991
|
pcb_group_id: external_exports2.string().optional(),
|
|
348577
348992
|
subcircuit_id: external_exports2.string().optional(),
|
|
348578
|
-
x:
|
|
348579
|
-
y:
|
|
348993
|
+
x: distance51,
|
|
348994
|
+
y: distance51,
|
|
348580
348995
|
radius: external_exports2.number(),
|
|
348581
348996
|
layer: layer_ref2,
|
|
348582
348997
|
pcb_component_id: external_exports2.string().optional(),
|
|
@@ -348588,8 +349003,8 @@ var pcb_solder_paste_rect = external_exports2.object({
|
|
|
348588
349003
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
348589
349004
|
pcb_group_id: external_exports2.string().optional(),
|
|
348590
349005
|
subcircuit_id: external_exports2.string().optional(),
|
|
348591
|
-
x:
|
|
348592
|
-
y:
|
|
349006
|
+
x: distance51,
|
|
349007
|
+
y: distance51,
|
|
348593
349008
|
width: external_exports2.number(),
|
|
348594
349009
|
height: external_exports2.number(),
|
|
348595
349010
|
layer: layer_ref2,
|
|
@@ -348602,8 +349017,8 @@ var pcb_solder_paste_pill = external_exports2.object({
|
|
|
348602
349017
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
348603
349018
|
pcb_group_id: external_exports2.string().optional(),
|
|
348604
349019
|
subcircuit_id: external_exports2.string().optional(),
|
|
348605
|
-
x:
|
|
348606
|
-
y:
|
|
349020
|
+
x: distance51,
|
|
349021
|
+
y: distance51,
|
|
348607
349022
|
width: external_exports2.number(),
|
|
348608
349023
|
height: external_exports2.number(),
|
|
348609
349024
|
radius: external_exports2.number(),
|
|
@@ -348617,11 +349032,11 @@ var pcb_solder_paste_rotated_rect = external_exports2.object({
|
|
|
348617
349032
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
348618
349033
|
pcb_group_id: external_exports2.string().optional(),
|
|
348619
349034
|
subcircuit_id: external_exports2.string().optional(),
|
|
348620
|
-
x:
|
|
348621
|
-
y:
|
|
349035
|
+
x: distance51,
|
|
349036
|
+
y: distance51,
|
|
348622
349037
|
width: external_exports2.number(),
|
|
348623
349038
|
height: external_exports2.number(),
|
|
348624
|
-
ccw_rotation:
|
|
349039
|
+
ccw_rotation: distance51,
|
|
348625
349040
|
layer: layer_ref2,
|
|
348626
349041
|
pcb_component_id: external_exports2.string().optional(),
|
|
348627
349042
|
pcb_smtpad_id: external_exports2.string().optional()
|
|
@@ -348632,8 +349047,8 @@ var pcb_solder_paste_rotated_pill = external_exports2.object({
|
|
|
348632
349047
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
348633
349048
|
pcb_group_id: external_exports2.string().optional(),
|
|
348634
349049
|
subcircuit_id: external_exports2.string().optional(),
|
|
348635
|
-
x:
|
|
348636
|
-
y:
|
|
349050
|
+
x: distance51,
|
|
349051
|
+
y: distance51,
|
|
348637
349052
|
width: external_exports2.number(),
|
|
348638
349053
|
height: external_exports2.number(),
|
|
348639
349054
|
radius: external_exports2.number(),
|
|
@@ -348648,8 +349063,8 @@ var pcb_solder_paste_oval = external_exports2.object({
|
|
|
348648
349063
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault("pcb_solder_paste"),
|
|
348649
349064
|
pcb_group_id: external_exports2.string().optional(),
|
|
348650
349065
|
subcircuit_id: external_exports2.string().optional(),
|
|
348651
|
-
x:
|
|
348652
|
-
y:
|
|
349066
|
+
x: distance51,
|
|
349067
|
+
y: distance51,
|
|
348653
349068
|
width: external_exports2.number(),
|
|
348654
349069
|
height: external_exports2.number(),
|
|
348655
349070
|
layer: layer_ref2,
|
|
@@ -348686,9 +349101,9 @@ var pcb_text = external_exports2.object({
|
|
|
348686
349101
|
expectTypesMatch2(true);
|
|
348687
349102
|
var pcb_trace_route_point_wire = external_exports2.object({
|
|
348688
349103
|
route_type: external_exports2.literal("wire"),
|
|
348689
|
-
x:
|
|
348690
|
-
y:
|
|
348691
|
-
width:
|
|
349104
|
+
x: distance51,
|
|
349105
|
+
y: distance51,
|
|
349106
|
+
width: distance51,
|
|
348692
349107
|
copper_pour_id: external_exports2.string().optional(),
|
|
348693
349108
|
is_inside_copper_pour: external_exports2.boolean().optional(),
|
|
348694
349109
|
start_pcb_port_id: external_exports2.string().optional(),
|
|
@@ -348697,12 +349112,12 @@ var pcb_trace_route_point_wire = external_exports2.object({
|
|
|
348697
349112
|
});
|
|
348698
349113
|
var pcb_trace_route_point_via = external_exports2.object({
|
|
348699
349114
|
route_type: external_exports2.literal("via"),
|
|
348700
|
-
x:
|
|
348701
|
-
y:
|
|
349115
|
+
x: distance51,
|
|
349116
|
+
y: distance51,
|
|
348702
349117
|
copper_pour_id: external_exports2.string().optional(),
|
|
348703
349118
|
is_inside_copper_pour: external_exports2.boolean().optional(),
|
|
348704
|
-
hole_diameter:
|
|
348705
|
-
outer_diameter:
|
|
349119
|
+
hole_diameter: distance51.optional(),
|
|
349120
|
+
outer_diameter: distance51.optional(),
|
|
348706
349121
|
from_layer: layer_ref2,
|
|
348707
349122
|
to_layer: layer_ref2
|
|
348708
349123
|
});
|
|
@@ -348710,7 +349125,7 @@ var pcb_trace_route_point_through_pad = external_exports2.object({
|
|
|
348710
349125
|
route_type: external_exports2.literal("through_pad"),
|
|
348711
349126
|
start: point9,
|
|
348712
349127
|
end: point9,
|
|
348713
|
-
width:
|
|
349128
|
+
width: distance51,
|
|
348714
349129
|
start_layer: layer_ref2,
|
|
348715
349130
|
end_layer: layer_ref2,
|
|
348716
349131
|
pcb_smtpad_id: external_exports2.string().optional(),
|
|
@@ -348758,8 +349173,8 @@ var pcb_trace_too_long_warning = external_exports2.object({
|
|
|
348758
349173
|
pcb_trace_id: external_exports2.string(),
|
|
348759
349174
|
source_net_id: external_exports2.string().optional(),
|
|
348760
349175
|
source_trace_id: external_exports2.string().optional(),
|
|
348761
|
-
actual_trace_length:
|
|
348762
|
-
maximum_trace_length:
|
|
349176
|
+
actual_trace_length: distance51,
|
|
349177
|
+
maximum_trace_length: distance51,
|
|
348763
349178
|
subcircuit_id: external_exports2.string().optional()
|
|
348764
349179
|
}).describe("Warning emitted when a PCB trace is longer than its maximum allowed length");
|
|
348765
349180
|
expectTypesMatch2(true);
|
|
@@ -348829,10 +349244,10 @@ var pcb_via = external_exports2.object({
|
|
|
348829
349244
|
pcb_group_id: external_exports2.string().optional(),
|
|
348830
349245
|
subcircuit_id: external_exports2.string().optional(),
|
|
348831
349246
|
subcircuit_connectivity_map_key: external_exports2.string().optional(),
|
|
348832
|
-
x:
|
|
348833
|
-
y:
|
|
348834
|
-
outer_diameter:
|
|
348835
|
-
hole_diameter:
|
|
349247
|
+
x: distance51,
|
|
349248
|
+
y: distance51,
|
|
349249
|
+
outer_diameter: distance51.default("0.6mm"),
|
|
349250
|
+
hole_diameter: distance51.default("0.25mm"),
|
|
348836
349251
|
from_layer: layer_ref2.optional(),
|
|
348837
349252
|
to_layer: layer_ref2.optional(),
|
|
348838
349253
|
layers: external_exports2.array(layer_ref2),
|
|
@@ -348920,11 +349335,11 @@ var pcb_silkscreen_line = external_exports2.object({
|
|
|
348920
349335
|
pcb_component_id: external_exports2.string(),
|
|
348921
349336
|
pcb_group_id: external_exports2.string().optional(),
|
|
348922
349337
|
subcircuit_id: external_exports2.string().optional(),
|
|
348923
|
-
stroke_width:
|
|
348924
|
-
x1:
|
|
348925
|
-
y1:
|
|
348926
|
-
x2:
|
|
348927
|
-
y2:
|
|
349338
|
+
stroke_width: distance51.default("0.1mm"),
|
|
349339
|
+
x1: distance51,
|
|
349340
|
+
y1: distance51,
|
|
349341
|
+
x2: distance51,
|
|
349342
|
+
y2: distance51,
|
|
348928
349343
|
layer: visible_layer
|
|
348929
349344
|
}).describe("Defines a silkscreen line on the PCB");
|
|
348930
349345
|
expectTypesMatch2(true);
|
|
@@ -348945,7 +349360,7 @@ var pcb_silkscreen_text = external_exports2.object({
|
|
|
348945
349360
|
pcb_group_id: external_exports2.string().optional(),
|
|
348946
349361
|
subcircuit_id: external_exports2.string().optional(),
|
|
348947
349362
|
font: external_exports2.literal("tscircuit2024").default("tscircuit2024"),
|
|
348948
|
-
font_size:
|
|
349363
|
+
font_size: distance51.default("0.2mm"),
|
|
348949
349364
|
pcb_component_id: external_exports2.string(),
|
|
348950
349365
|
text: external_exports2.string(),
|
|
348951
349366
|
is_knockout: external_exports2.boolean().default(false).optional(),
|
|
@@ -348973,7 +349388,7 @@ var pcb_copper_text = external_exports2.object({
|
|
|
348973
349388
|
pcb_group_id: external_exports2.string().optional(),
|
|
348974
349389
|
subcircuit_id: external_exports2.string().optional(),
|
|
348975
349390
|
font: external_exports2.literal("tscircuit2024").default("tscircuit2024"),
|
|
348976
|
-
font_size:
|
|
349391
|
+
font_size: distance51.default("0.2mm"),
|
|
348977
349392
|
pcb_component_id: external_exports2.string(),
|
|
348978
349393
|
text: external_exports2.string(),
|
|
348979
349394
|
is_knockout: external_exports2.boolean().default(false).optional(),
|
|
@@ -349033,8 +349448,8 @@ var pcb_silkscreen_oval = external_exports2.object({
|
|
|
349033
349448
|
pcb_group_id: external_exports2.string().optional(),
|
|
349034
349449
|
subcircuit_id: external_exports2.string().optional(),
|
|
349035
349450
|
center: point9,
|
|
349036
|
-
radius_x:
|
|
349037
|
-
radius_y:
|
|
349451
|
+
radius_x: distance51,
|
|
349452
|
+
radius_y: distance51,
|
|
349038
349453
|
layer: visible_layer,
|
|
349039
349454
|
ccw_rotation: rotation11.optional()
|
|
349040
349455
|
}).describe("Defines a silkscreen oval on the PCB");
|
|
@@ -349074,7 +349489,7 @@ var pcb_fabrication_note_text2 = external_exports2.object({
|
|
|
349074
349489
|
subcircuit_id: external_exports2.string().optional(),
|
|
349075
349490
|
pcb_group_id: external_exports2.string().optional(),
|
|
349076
349491
|
font: external_exports2.literal("tscircuit2024").default("tscircuit2024"),
|
|
349077
|
-
font_size:
|
|
349492
|
+
font_size: distance51.default("1mm"),
|
|
349078
349493
|
pcb_component_id: external_exports2.string(),
|
|
349079
349494
|
text: external_exports2.string(),
|
|
349080
349495
|
ccw_rotation: external_exports2.number().optional(),
|
|
@@ -349144,7 +349559,7 @@ var pcb_note_text2 = external_exports2.object({
|
|
|
349144
349559
|
subcircuit_id: external_exports2.string().optional(),
|
|
349145
349560
|
name: external_exports2.string().optional(),
|
|
349146
349561
|
font: external_exports2.literal("tscircuit2024").default("tscircuit2024"),
|
|
349147
|
-
font_size:
|
|
349562
|
+
font_size: distance51.default("1mm"),
|
|
349148
349563
|
text: external_exports2.string().optional(),
|
|
349149
349564
|
anchor_position: point9.default({ x: 0, y: 0 }),
|
|
349150
349565
|
anchor_alignment: external_exports2.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
@@ -349195,12 +349610,12 @@ var pcb_note_line2 = external_exports2.object({
|
|
|
349195
349610
|
subcircuit_id: external_exports2.string().optional(),
|
|
349196
349611
|
name: external_exports2.string().optional(),
|
|
349197
349612
|
text: external_exports2.string().optional(),
|
|
349198
|
-
x1:
|
|
349199
|
-
y1:
|
|
349200
|
-
x2:
|
|
349201
|
-
y2:
|
|
349613
|
+
x1: distance51,
|
|
349614
|
+
y1: distance51,
|
|
349615
|
+
x2: distance51,
|
|
349616
|
+
y2: distance51,
|
|
349202
349617
|
layer: visible_layer.default("top"),
|
|
349203
|
-
stroke_width:
|
|
349618
|
+
stroke_width: distance51.default("0.1mm"),
|
|
349204
349619
|
color: external_exports2.string().optional(),
|
|
349205
349620
|
is_dashed: external_exports2.boolean().optional()
|
|
349206
349621
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
@@ -349251,8 +349666,8 @@ var pcb_keepout2 = external_exports2.object({
|
|
|
349251
349666
|
pcb_group_id: external_exports2.string().optional(),
|
|
349252
349667
|
subcircuit_id: external_exports2.string().optional(),
|
|
349253
349668
|
center: point9,
|
|
349254
|
-
width:
|
|
349255
|
-
height:
|
|
349669
|
+
width: distance51,
|
|
349670
|
+
height: distance51,
|
|
349256
349671
|
pcb_keepout_id: external_exports2.string(),
|
|
349257
349672
|
layers: external_exports2.array(external_exports2.string()),
|
|
349258
349673
|
description: external_exports2.string().optional(),
|
|
@@ -349263,7 +349678,7 @@ var pcb_keepout2 = external_exports2.object({
|
|
|
349263
349678
|
pcb_group_id: external_exports2.string().optional(),
|
|
349264
349679
|
subcircuit_id: external_exports2.string().optional(),
|
|
349265
349680
|
center: point9,
|
|
349266
|
-
radius:
|
|
349681
|
+
radius: distance51,
|
|
349267
349682
|
pcb_keepout_id: external_exports2.string(),
|
|
349268
349683
|
layers: external_exports2.array(external_exports2.string()),
|
|
349269
349684
|
description: external_exports2.string().optional(),
|
|
@@ -349439,8 +349854,8 @@ var pcb_breakout_point = external_exports2.object({
|
|
|
349439
349854
|
source_port_id: external_exports2.string().optional(),
|
|
349440
349855
|
source_net_id: external_exports2.string().optional(),
|
|
349441
349856
|
layer: layer_ref2.optional(),
|
|
349442
|
-
x:
|
|
349443
|
-
y:
|
|
349857
|
+
x: distance51,
|
|
349858
|
+
y: distance51
|
|
349444
349859
|
}).describe("Defines a routing target within a pcb_group for a source_trace or source_net");
|
|
349445
349860
|
expectTypesMatch2(true);
|
|
349446
349861
|
var pcb_ground_plane = external_exports2.object({
|
|
@@ -349468,9 +349883,9 @@ var pcb_thermal_spoke = external_exports2.object({
|
|
|
349468
349883
|
pcb_ground_plane_id: external_exports2.string(),
|
|
349469
349884
|
shape: external_exports2.string(),
|
|
349470
349885
|
spoke_count: external_exports2.number(),
|
|
349471
|
-
spoke_thickness:
|
|
349472
|
-
spoke_inner_diameter:
|
|
349473
|
-
spoke_outer_diameter:
|
|
349886
|
+
spoke_thickness: distance51,
|
|
349887
|
+
spoke_inner_diameter: distance51,
|
|
349888
|
+
spoke_outer_diameter: distance51,
|
|
349474
349889
|
pcb_plated_hole_id: external_exports2.string().optional(),
|
|
349475
349890
|
subcircuit_id: external_exports2.string().optional()
|
|
349476
349891
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
@@ -349552,8 +349967,8 @@ var pcb_via_clearance_error = base_circuit_json_error.extend({
|
|
|
349552
349967
|
pcb_error_id: getZodPrefixedIdWithDefault("pcb_error"),
|
|
349553
349968
|
error_type: external_exports2.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
349554
349969
|
pcb_via_ids: external_exports2.array(external_exports2.string()).min(2),
|
|
349555
|
-
minimum_clearance:
|
|
349556
|
-
actual_clearance:
|
|
349970
|
+
minimum_clearance: distance51.optional(),
|
|
349971
|
+
actual_clearance: distance51.optional(),
|
|
349557
349972
|
pcb_center: external_exports2.object({
|
|
349558
349973
|
x: external_exports2.number().optional(),
|
|
349559
349974
|
y: external_exports2.number().optional()
|
|
@@ -349567,8 +349982,8 @@ var pcb_via_trace_clearance_error = base_circuit_json_error.extend({
|
|
|
349567
349982
|
error_type: external_exports2.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
349568
349983
|
pcb_via_id: external_exports2.string(),
|
|
349569
349984
|
pcb_trace_id: external_exports2.string(),
|
|
349570
|
-
minimum_clearance:
|
|
349571
|
-
actual_clearance:
|
|
349985
|
+
minimum_clearance: distance51.optional(),
|
|
349986
|
+
actual_clearance: distance51.optional(),
|
|
349572
349987
|
center: external_exports2.object({
|
|
349573
349988
|
x: external_exports2.number().optional(),
|
|
349574
349989
|
y: external_exports2.number().optional()
|
|
@@ -349581,8 +349996,8 @@ var pcb_pad_pad_clearance_error = base_circuit_json_error.extend({
|
|
|
349581
349996
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault("pcb_pad_pad_clearance_error"),
|
|
349582
349997
|
error_type: external_exports2.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
349583
349998
|
pcb_pad_ids: external_exports2.array(external_exports2.string()).min(2),
|
|
349584
|
-
minimum_clearance:
|
|
349585
|
-
actual_clearance:
|
|
349999
|
+
minimum_clearance: distance51.optional(),
|
|
350000
|
+
actual_clearance: distance51.optional(),
|
|
349586
350001
|
center: external_exports2.object({
|
|
349587
350002
|
x: external_exports2.number().optional(),
|
|
349588
350003
|
y: external_exports2.number().optional()
|
|
@@ -349596,8 +350011,8 @@ var pcb_pad_trace_clearance_error = base_circuit_json_error.extend({
|
|
|
349596
350011
|
error_type: external_exports2.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
349597
350012
|
pcb_pad_id: external_exports2.string(),
|
|
349598
350013
|
pcb_trace_id: external_exports2.string(),
|
|
349599
|
-
minimum_clearance:
|
|
349600
|
-
actual_clearance:
|
|
350014
|
+
minimum_clearance: distance51.optional(),
|
|
350015
|
+
actual_clearance: distance51.optional(),
|
|
349601
350016
|
center: external_exports2.object({
|
|
349602
350017
|
x: external_exports2.number().optional(),
|
|
349603
350018
|
y: external_exports2.number().optional()
|
|
@@ -353803,14 +354218,14 @@ var getEasyEdaCadModelPlacement = async (easyEdaJson, { fetch: fetch2 = globalTh
|
|
|
353803
354218
|
placementCache.set(cacheKey, placementPromise);
|
|
353804
354219
|
return placementPromise;
|
|
353805
354220
|
};
|
|
353806
|
-
var
|
|
354221
|
+
var round3 = (value) => Number(value.toFixed(6));
|
|
353807
354222
|
var EASYEDA_SCHEMATIC_UNIT_TO_TSCIRCUIT_UNIT = 0.02;
|
|
353808
|
-
var toSchematicUnits = (value) =>
|
|
354223
|
+
var toSchematicUnits = (value) => round3(value * EASYEDA_SCHEMATIC_UNIT_TO_TSCIRCUIT_UNIT);
|
|
353809
354224
|
var getPointTransformer = (origin) => (point2) => ({
|
|
353810
354225
|
x: toSchematicUnits(point2.x - origin.x),
|
|
353811
354226
|
y: toSchematicUnits(origin.y - point2.y)
|
|
353812
354227
|
});
|
|
353813
|
-
var formatNumber7 = (value) => String(
|
|
354228
|
+
var formatNumber7 = (value) => String(round3(value));
|
|
353814
354229
|
var SVG_PATH_COMMAND_PARAMETER_COUNTS = {
|
|
353815
354230
|
A: 7,
|
|
353816
354231
|
C: 6,
|
|
@@ -353960,8 +354375,8 @@ var alignPortToDrawing = ({
|
|
|
353960
354375
|
if (!nearestEndpoint)
|
|
353961
354376
|
return position2;
|
|
353962
354377
|
return {
|
|
353963
|
-
x:
|
|
353964
|
-
y:
|
|
354378
|
+
x: round3(nearestEndpoint.x + outwardDirection.x * stemLength),
|
|
354379
|
+
y: round3(nearestEndpoint.y + outwardDirection.y * stemLength)
|
|
353965
354380
|
};
|
|
353966
354381
|
};
|
|
353967
354382
|
var getTextFontSize = (fontSize) => {
|
|
@@ -354079,7 +354494,7 @@ var generateShapeTsx = ({
|
|
|
354079
354494
|
if (shape.visibility !== "1")
|
|
354080
354495
|
return;
|
|
354081
354496
|
const position2 = transformPoint({ x: shape.x, y: shape.y });
|
|
354082
|
-
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)}} />`;
|
|
354083
354498
|
}
|
|
354084
354499
|
if (shape.type === "PIN" && portMetadata) {
|
|
354085
354500
|
if (shape.visibility !== "show")
|
|
@@ -355327,7 +355742,7 @@ __export6(dist_exports2, {
|
|
|
355327
355742
|
capacitance: () => capacitance5,
|
|
355328
355743
|
circuit_json_footprint_load_error: () => circuit_json_footprint_load_error3,
|
|
355329
355744
|
current: () => current3,
|
|
355330
|
-
distance: () =>
|
|
355745
|
+
distance: () => distance53,
|
|
355331
355746
|
duration_ms: () => duration_ms2,
|
|
355332
355747
|
experiment_type: () => experiment_type2,
|
|
355333
355748
|
external_footprint_load_error: () => external_footprint_load_error3,
|
|
@@ -355872,7 +356287,7 @@ var inductance3 = z56.string().or(z56.number()).transform((v) => parseAndConvert
|
|
|
355872
356287
|
var voltage6 = z56.string().or(z56.number()).transform((v) => parseAndConvertSiUnit2(v, "V").value);
|
|
355873
356288
|
var length68 = z56.string().or(z56.number()).transform((v) => parseAndConvertSiUnit2(v).value);
|
|
355874
356289
|
var frequency8 = z56.string().or(z56.number()).transform((v) => parseAndConvertSiUnit2(v, "Hz").value);
|
|
355875
|
-
var
|
|
356290
|
+
var distance53 = length68;
|
|
355876
356291
|
var current3 = z56.string().or(z56.number()).transform((v) => parseAndConvertSiUnit2(v, "A").value);
|
|
355877
356292
|
var duration_ms2 = z56.string().or(z56.number()).transform((v) => parseAndConvertSiUnit2(v).value);
|
|
355878
356293
|
var time2 = duration_ms2;
|
|
@@ -355913,16 +356328,16 @@ expectStringUnionsMatch2('T2 has extra: "c"');
|
|
|
355913
356328
|
expectStringUnionsMatch2('T1 has extra: "d", T2 has extra: "c"');
|
|
355914
356329
|
expectStringUnionsMatch2(true);
|
|
355915
356330
|
var point10 = z211.object({
|
|
355916
|
-
x:
|
|
355917
|
-
y:
|
|
356331
|
+
x: distance53,
|
|
356332
|
+
y: distance53
|
|
355918
356333
|
});
|
|
355919
356334
|
var position2 = point10;
|
|
355920
356335
|
expectTypesMatch3(true);
|
|
355921
356336
|
expectTypesMatch3(true);
|
|
355922
356337
|
var point34 = z311.object({
|
|
355923
|
-
x:
|
|
355924
|
-
y:
|
|
355925
|
-
z:
|
|
356338
|
+
x: distance53,
|
|
356339
|
+
y: distance53,
|
|
356340
|
+
z: distance53
|
|
355926
356341
|
});
|
|
355927
356342
|
var position32 = point34;
|
|
355928
356343
|
expectTypesMatch3(true);
|
|
@@ -355987,7 +356402,7 @@ var kicadAt3 = point10.extend({
|
|
|
355987
356402
|
expectTypesMatch3(true);
|
|
355988
356403
|
var kicadFont3 = z94.object({
|
|
355989
356404
|
size: point10.optional(),
|
|
355990
|
-
thickness:
|
|
356405
|
+
thickness: distance53.optional()
|
|
355991
356406
|
});
|
|
355992
356407
|
expectTypesMatch3(true);
|
|
355993
356408
|
var kicadEffects3 = z94.object({
|
|
@@ -356023,7 +356438,7 @@ var kicadFootprintPad3 = z94.object({
|
|
|
356023
356438
|
shape: z94.string().optional(),
|
|
356024
356439
|
at: kicadAt3.optional(),
|
|
356025
356440
|
size: point10.optional(),
|
|
356026
|
-
drill:
|
|
356441
|
+
drill: distance53.optional(),
|
|
356027
356442
|
layers: z94.array(z94.string()).optional(),
|
|
356028
356443
|
removeUnusedLayers: z94.boolean().optional(),
|
|
356029
356444
|
uuid: z94.string().optional()
|
|
@@ -356054,7 +356469,7 @@ var kicadSymbolPinNumbers3 = z103.object({
|
|
|
356054
356469
|
});
|
|
356055
356470
|
expectTypesMatch3(true);
|
|
356056
356471
|
var kicadSymbolPinNames3 = z103.object({
|
|
356057
|
-
offset:
|
|
356472
|
+
offset: distance53.optional(),
|
|
356058
356473
|
hide: z103.boolean().optional()
|
|
356059
356474
|
});
|
|
356060
356475
|
expectTypesMatch3(true);
|
|
@@ -356128,7 +356543,7 @@ var source_simple_capacitor2 = source_component_base2.extend({
|
|
|
356128
356543
|
capacitance: capacitance5,
|
|
356129
356544
|
max_voltage_rating: voltage6.optional(),
|
|
356130
356545
|
display_capacitance: z143.string().optional(),
|
|
356131
|
-
max_decoupling_trace_length:
|
|
356546
|
+
max_decoupling_trace_length: distance53.optional()
|
|
356132
356547
|
});
|
|
356133
356548
|
expectTypesMatch3(true);
|
|
356134
356549
|
var source_simple_resistor2 = source_component_base2.extend({
|
|
@@ -356686,11 +357101,11 @@ var schematic_box2 = z722.object({
|
|
|
356686
357101
|
schematic_sheet_id: z722.string().optional(),
|
|
356687
357102
|
schematic_component_id: z722.string().optional(),
|
|
356688
357103
|
schematic_symbol_id: z722.string().optional(),
|
|
356689
|
-
width:
|
|
356690
|
-
height:
|
|
357104
|
+
width: distance53,
|
|
357105
|
+
height: distance53,
|
|
356691
357106
|
is_dashed: z722.boolean().default(false),
|
|
356692
|
-
x:
|
|
356693
|
-
y:
|
|
357107
|
+
x: distance53,
|
|
357108
|
+
y: distance53,
|
|
356694
357109
|
subcircuit_id: z722.string().optional()
|
|
356695
357110
|
}).describe("Draws a box on the schematic");
|
|
356696
357111
|
expectTypesMatch3(true);
|
|
@@ -356703,10 +357118,10 @@ var schematic_path2 = z732.object({
|
|
|
356703
357118
|
fill_color: z732.string().optional(),
|
|
356704
357119
|
is_filled: z732.boolean().optional(),
|
|
356705
357120
|
is_dashed: z732.boolean().default(false),
|
|
356706
|
-
stroke_width:
|
|
357121
|
+
stroke_width: distance53.nullable().optional(),
|
|
356707
357122
|
stroke_color: z732.string().optional(),
|
|
356708
|
-
dash_length:
|
|
356709
|
-
dash_gap:
|
|
357123
|
+
dash_length: distance53.optional(),
|
|
357124
|
+
dash_gap: distance53.optional(),
|
|
356710
357125
|
points: z732.array(point10),
|
|
356711
357126
|
subcircuit_id: z732.string().optional()
|
|
356712
357127
|
});
|
|
@@ -356785,15 +357200,15 @@ var schematic_line2 = z76.object({
|
|
|
356785
357200
|
schematic_sheet_id: z76.string().optional(),
|
|
356786
357201
|
schematic_component_id: z76.string().optional(),
|
|
356787
357202
|
schematic_symbol_id: z76.string().optional(),
|
|
356788
|
-
x1:
|
|
356789
|
-
y1:
|
|
356790
|
-
x2:
|
|
356791
|
-
y2:
|
|
356792
|
-
stroke_width:
|
|
357203
|
+
x1: distance53,
|
|
357204
|
+
y1: distance53,
|
|
357205
|
+
x2: distance53,
|
|
357206
|
+
y2: distance53,
|
|
357207
|
+
stroke_width: distance53.nullable().optional(),
|
|
356793
357208
|
color: z76.string().default("#000000"),
|
|
356794
357209
|
is_dashed: z76.boolean().default(false),
|
|
356795
|
-
dash_length:
|
|
356796
|
-
dash_gap:
|
|
357210
|
+
dash_length: distance53.optional(),
|
|
357211
|
+
dash_gap: distance53.optional(),
|
|
356797
357212
|
subcircuit_id: z76.string().optional()
|
|
356798
357213
|
}).describe("Draws a styled line on the schematic");
|
|
356799
357214
|
expectTypesMatch3(true);
|
|
@@ -356804,10 +357219,10 @@ var schematic_rect2 = z77.object({
|
|
|
356804
357219
|
schematic_component_id: z77.string().optional(),
|
|
356805
357220
|
schematic_symbol_id: z77.string().optional(),
|
|
356806
357221
|
center: point10,
|
|
356807
|
-
width:
|
|
356808
|
-
height:
|
|
357222
|
+
width: distance53,
|
|
357223
|
+
height: distance53,
|
|
356809
357224
|
rotation: rotation12.default(0),
|
|
356810
|
-
stroke_width:
|
|
357225
|
+
stroke_width: distance53.nullable().optional(),
|
|
356811
357226
|
color: z77.string().default("#000000"),
|
|
356812
357227
|
is_filled: z77.boolean().default(false),
|
|
356813
357228
|
fill_color: z77.string().optional(),
|
|
@@ -356822,8 +357237,8 @@ var schematic_circle2 = z78.object({
|
|
|
356822
357237
|
schematic_component_id: z78.string().optional(),
|
|
356823
357238
|
schematic_symbol_id: z78.string().optional(),
|
|
356824
357239
|
center: point10,
|
|
356825
|
-
radius:
|
|
356826
|
-
stroke_width:
|
|
357240
|
+
radius: distance53,
|
|
357241
|
+
stroke_width: distance53.nullable().optional(),
|
|
356827
357242
|
color: z78.string().default("#000000"),
|
|
356828
357243
|
is_filled: z78.boolean().default(false),
|
|
356829
357244
|
fill_color: z78.string().optional(),
|
|
@@ -356838,11 +357253,11 @@ var schematic_arc2 = z79.object({
|
|
|
356838
357253
|
schematic_component_id: z79.string().optional(),
|
|
356839
357254
|
schematic_symbol_id: z79.string().optional(),
|
|
356840
357255
|
center: point10,
|
|
356841
|
-
radius:
|
|
357256
|
+
radius: distance53,
|
|
356842
357257
|
start_angle_degrees: rotation12,
|
|
356843
357258
|
end_angle_degrees: rotation12,
|
|
356844
357259
|
direction: z79.enum(["clockwise", "counterclockwise"]).default("counterclockwise"),
|
|
356845
|
-
stroke_width:
|
|
357260
|
+
stroke_width: distance53.nullable().optional(),
|
|
356846
357261
|
color: z79.string().default("#000000"),
|
|
356847
357262
|
is_dashed: z79.boolean().default(false),
|
|
356848
357263
|
subcircuit_id: z79.string().optional()
|
|
@@ -356892,8 +357307,8 @@ var schematic_text2 = z822.object({
|
|
|
356892
357307
|
text: z822.string(),
|
|
356893
357308
|
font_size: z822.number().default(0.18),
|
|
356894
357309
|
position: z822.object({
|
|
356895
|
-
x:
|
|
356896
|
-
y:
|
|
357310
|
+
x: distance53,
|
|
357311
|
+
y: distance53
|
|
356897
357312
|
}),
|
|
356898
357313
|
rotation: z822.number().default(0),
|
|
356899
357314
|
anchor: z822.union([fivePointAnchor3.describe("legacy"), ninePointAnchor3]).default("center"),
|
|
@@ -357063,10 +357478,10 @@ var schematic_table2 = z942.object({
|
|
|
357063
357478
|
schematic_table_id: getZodPrefixedIdWithDefault2("schematic_table"),
|
|
357064
357479
|
schematic_sheet_id: z942.string().optional(),
|
|
357065
357480
|
anchor_position: point10,
|
|
357066
|
-
column_widths: z942.array(
|
|
357067
|
-
row_heights: z942.array(
|
|
357068
|
-
cell_padding:
|
|
357069
|
-
border_width:
|
|
357481
|
+
column_widths: z942.array(distance53),
|
|
357482
|
+
row_heights: z942.array(distance53),
|
|
357483
|
+
cell_padding: distance53.optional(),
|
|
357484
|
+
border_width: distance53.optional(),
|
|
357070
357485
|
subcircuit_id: z942.string().optional(),
|
|
357071
357486
|
schematic_component_id: z942.string().optional(),
|
|
357072
357487
|
anchor: ninePointAnchor3.optional()
|
|
@@ -357083,11 +357498,11 @@ var schematic_table_cell2 = z95.object({
|
|
|
357083
357498
|
end_column_index: z95.number(),
|
|
357084
357499
|
text: z95.string().optional(),
|
|
357085
357500
|
center: point10,
|
|
357086
|
-
width:
|
|
357087
|
-
height:
|
|
357501
|
+
width: distance53,
|
|
357502
|
+
height: distance53,
|
|
357088
357503
|
horizontal_align: z95.enum(["left", "center", "right"]).optional(),
|
|
357089
357504
|
vertical_align: z95.enum(["top", "middle", "bottom"]).optional(),
|
|
357090
|
-
font_size:
|
|
357505
|
+
font_size: distance53.optional(),
|
|
357091
357506
|
subcircuit_id: z95.string().optional()
|
|
357092
357507
|
}).describe("Defines a cell within a schematic_table");
|
|
357093
357508
|
expectTypesMatch3(true);
|
|
@@ -357101,8 +357516,8 @@ var schematic_sheet2 = z96.object({
|
|
|
357101
357516
|
}).describe("Defines a schematic sheet or page that components can be placed on");
|
|
357102
357517
|
expectTypesMatch3(true);
|
|
357103
357518
|
var point_with_bulge2 = z97.object({
|
|
357104
|
-
x:
|
|
357105
|
-
y:
|
|
357519
|
+
x: distance53,
|
|
357520
|
+
y: distance53,
|
|
357106
357521
|
bulge: z97.number().optional()
|
|
357107
357522
|
});
|
|
357108
357523
|
expectTypesMatch3(true);
|
|
@@ -357193,8 +357608,8 @@ var getRotationBetweenPcbPin1Locations3 = (from, to) => {
|
|
|
357193
357608
|
return null;
|
|
357194
357609
|
};
|
|
357195
357610
|
var pcb_route_hint2 = z100.object({
|
|
357196
|
-
x:
|
|
357197
|
-
y:
|
|
357611
|
+
x: distance53,
|
|
357612
|
+
y: distance53,
|
|
357198
357613
|
via: z100.boolean().optional(),
|
|
357199
357614
|
via_to_layer: layer_ref3.optional()
|
|
357200
357615
|
});
|
|
@@ -357202,11 +357617,11 @@ var pcb_route_hints2 = z100.array(pcb_route_hint2);
|
|
|
357202
357617
|
expectTypesMatch3(true);
|
|
357203
357618
|
expectTypesMatch3(true);
|
|
357204
357619
|
var route_hint_point9 = z101.object({
|
|
357205
|
-
x:
|
|
357206
|
-
y:
|
|
357620
|
+
x: distance53,
|
|
357621
|
+
y: distance53,
|
|
357207
357622
|
via: z101.boolean().optional(),
|
|
357208
357623
|
to_layer: layer_ref3.optional(),
|
|
357209
|
-
trace_width:
|
|
357624
|
+
trace_width: distance53.optional()
|
|
357210
357625
|
});
|
|
357211
357626
|
expectTypesMatch3(true);
|
|
357212
357627
|
var manufacturing_drc_properties2 = z1022.object({
|
|
@@ -357291,8 +357706,8 @@ var pcb_hole_circle2 = z105.object({
|
|
|
357291
357706
|
pcb_component_id: z105.string().optional(),
|
|
357292
357707
|
hole_shape: z105.literal("circle"),
|
|
357293
357708
|
hole_diameter: z105.number(),
|
|
357294
|
-
x:
|
|
357295
|
-
y:
|
|
357709
|
+
x: distance53,
|
|
357710
|
+
y: distance53,
|
|
357296
357711
|
is_covered_with_solder_mask: z105.boolean().optional(),
|
|
357297
357712
|
soldermask_margin: z105.number().optional()
|
|
357298
357713
|
});
|
|
@@ -357307,8 +357722,8 @@ var pcb_hole_rect2 = z105.object({
|
|
|
357307
357722
|
hole_shape: z105.literal("rect"),
|
|
357308
357723
|
hole_width: z105.number(),
|
|
357309
357724
|
hole_height: z105.number(),
|
|
357310
|
-
x:
|
|
357311
|
-
y:
|
|
357725
|
+
x: distance53,
|
|
357726
|
+
y: distance53,
|
|
357312
357727
|
is_covered_with_solder_mask: z105.boolean().optional(),
|
|
357313
357728
|
soldermask_margin: z105.number().optional()
|
|
357314
357729
|
});
|
|
@@ -357322,8 +357737,8 @@ var pcb_hole_circle_or_square2 = z105.object({
|
|
|
357322
357737
|
pcb_component_id: z105.string().optional(),
|
|
357323
357738
|
hole_shape: z105.enum(["circle", "square"]),
|
|
357324
357739
|
hole_diameter: z105.number(),
|
|
357325
|
-
x:
|
|
357326
|
-
y:
|
|
357740
|
+
x: distance53,
|
|
357741
|
+
y: distance53,
|
|
357327
357742
|
is_covered_with_solder_mask: z105.boolean().optional(),
|
|
357328
357743
|
soldermask_margin: z105.number().optional()
|
|
357329
357744
|
});
|
|
@@ -357338,8 +357753,8 @@ var pcb_hole_oval2 = z105.object({
|
|
|
357338
357753
|
hole_shape: z105.literal("oval"),
|
|
357339
357754
|
hole_width: z105.number(),
|
|
357340
357755
|
hole_height: z105.number(),
|
|
357341
|
-
x:
|
|
357342
|
-
y:
|
|
357756
|
+
x: distance53,
|
|
357757
|
+
y: distance53,
|
|
357343
357758
|
is_covered_with_solder_mask: z105.boolean().optional(),
|
|
357344
357759
|
soldermask_margin: z105.number().optional()
|
|
357345
357760
|
});
|
|
@@ -357354,8 +357769,8 @@ var pcb_hole_pill2 = z105.object({
|
|
|
357354
357769
|
hole_shape: z105.literal("pill"),
|
|
357355
357770
|
hole_width: z105.number(),
|
|
357356
357771
|
hole_height: z105.number(),
|
|
357357
|
-
x:
|
|
357358
|
-
y:
|
|
357772
|
+
x: distance53,
|
|
357773
|
+
y: distance53,
|
|
357359
357774
|
is_covered_with_solder_mask: z105.boolean().optional(),
|
|
357360
357775
|
soldermask_margin: z105.number().optional()
|
|
357361
357776
|
});
|
|
@@ -357370,8 +357785,8 @@ var pcb_hole_rotated_pill2 = z105.object({
|
|
|
357370
357785
|
hole_shape: z105.literal("rotated_pill"),
|
|
357371
357786
|
hole_width: z105.number(),
|
|
357372
357787
|
hole_height: z105.number(),
|
|
357373
|
-
x:
|
|
357374
|
-
y:
|
|
357788
|
+
x: distance53,
|
|
357789
|
+
y: distance53,
|
|
357375
357790
|
ccw_rotation: rotation12,
|
|
357376
357791
|
is_covered_with_solder_mask: z105.boolean().optional(),
|
|
357377
357792
|
soldermask_margin: z105.number().optional()
|
|
@@ -357387,8 +357802,8 @@ var pcb_plated_hole_circle2 = z106.object({
|
|
|
357387
357802
|
outer_diameter: z106.number(),
|
|
357388
357803
|
hole_diameter: z106.number(),
|
|
357389
357804
|
is_covered_with_solder_mask: z106.boolean().optional(),
|
|
357390
|
-
x:
|
|
357391
|
-
y:
|
|
357805
|
+
x: distance53,
|
|
357806
|
+
y: distance53,
|
|
357392
357807
|
layers: z106.array(layer_ref3),
|
|
357393
357808
|
port_hints: z106.array(z106.string()).optional(),
|
|
357394
357809
|
pcb_component_id: z106.string().optional(),
|
|
@@ -357406,8 +357821,8 @@ var pcb_plated_hole_oval2 = z106.object({
|
|
|
357406
357821
|
hole_width: z106.number(),
|
|
357407
357822
|
hole_height: z106.number(),
|
|
357408
357823
|
is_covered_with_solder_mask: z106.boolean().optional(),
|
|
357409
|
-
x:
|
|
357410
|
-
y:
|
|
357824
|
+
x: distance53,
|
|
357825
|
+
y: distance53,
|
|
357411
357826
|
ccw_rotation: rotation12,
|
|
357412
357827
|
layers: z106.array(layer_ref3),
|
|
357413
357828
|
port_hints: z106.array(z106.string()).optional(),
|
|
@@ -357427,11 +357842,11 @@ var pcb_circular_hole_with_rect_pad2 = z106.object({
|
|
|
357427
357842
|
rect_pad_width: z106.number(),
|
|
357428
357843
|
rect_pad_height: z106.number(),
|
|
357429
357844
|
rect_border_radius: z106.number().optional(),
|
|
357430
|
-
hole_offset_x:
|
|
357431
|
-
hole_offset_y:
|
|
357845
|
+
hole_offset_x: distance53.default(0),
|
|
357846
|
+
hole_offset_y: distance53.default(0),
|
|
357432
357847
|
is_covered_with_solder_mask: z106.boolean().optional(),
|
|
357433
|
-
x:
|
|
357434
|
-
y:
|
|
357848
|
+
x: distance53,
|
|
357849
|
+
y: distance53,
|
|
357435
357850
|
layers: z106.array(layer_ref3),
|
|
357436
357851
|
port_hints: z106.array(z106.string()).optional(),
|
|
357437
357852
|
pcb_component_id: z106.string().optional(),
|
|
@@ -357452,11 +357867,11 @@ var pcb_pill_hole_with_rect_pad2 = z106.object({
|
|
|
357452
357867
|
rect_pad_width: z106.number(),
|
|
357453
357868
|
rect_pad_height: z106.number(),
|
|
357454
357869
|
rect_border_radius: z106.number().optional(),
|
|
357455
|
-
hole_offset_x:
|
|
357456
|
-
hole_offset_y:
|
|
357870
|
+
hole_offset_x: distance53.default(0),
|
|
357871
|
+
hole_offset_y: distance53.default(0),
|
|
357457
357872
|
is_covered_with_solder_mask: z106.boolean().optional(),
|
|
357458
|
-
x:
|
|
357459
|
-
y:
|
|
357873
|
+
x: distance53,
|
|
357874
|
+
y: distance53,
|
|
357460
357875
|
layers: z106.array(layer_ref3),
|
|
357461
357876
|
port_hints: z106.array(z106.string()).optional(),
|
|
357462
357877
|
pcb_component_id: z106.string().optional(),
|
|
@@ -357478,11 +357893,11 @@ var pcb_rotated_pill_hole_with_rect_pad2 = z106.object({
|
|
|
357478
357893
|
rect_pad_height: z106.number(),
|
|
357479
357894
|
rect_border_radius: z106.number().optional(),
|
|
357480
357895
|
rect_ccw_rotation: rotation12,
|
|
357481
|
-
hole_offset_x:
|
|
357482
|
-
hole_offset_y:
|
|
357896
|
+
hole_offset_x: distance53.default(0),
|
|
357897
|
+
hole_offset_y: distance53.default(0),
|
|
357483
357898
|
is_covered_with_solder_mask: z106.boolean().optional(),
|
|
357484
|
-
x:
|
|
357485
|
-
y:
|
|
357899
|
+
x: distance53,
|
|
357900
|
+
y: distance53,
|
|
357486
357901
|
layers: z106.array(layer_ref3),
|
|
357487
357902
|
port_hints: z106.array(z106.string()).optional(),
|
|
357488
357903
|
pcb_component_id: z106.string().optional(),
|
|
@@ -357500,14 +357915,14 @@ var pcb_hole_with_polygon_pad2 = z106.object({
|
|
|
357500
357915
|
hole_width: z106.number().optional(),
|
|
357501
357916
|
hole_height: z106.number().optional(),
|
|
357502
357917
|
pad_outline: z106.array(z106.object({
|
|
357503
|
-
x:
|
|
357504
|
-
y:
|
|
357918
|
+
x: distance53,
|
|
357919
|
+
y: distance53
|
|
357505
357920
|
})).min(3),
|
|
357506
|
-
hole_offset_x:
|
|
357507
|
-
hole_offset_y:
|
|
357921
|
+
hole_offset_x: distance53.default(0),
|
|
357922
|
+
hole_offset_y: distance53.default(0),
|
|
357508
357923
|
is_covered_with_solder_mask: z106.boolean().optional(),
|
|
357509
|
-
x:
|
|
357510
|
-
y:
|
|
357924
|
+
x: distance53,
|
|
357925
|
+
y: distance53,
|
|
357511
357926
|
layers: z106.array(layer_ref3),
|
|
357512
357927
|
port_hints: z106.array(z106.string()).optional(),
|
|
357513
357928
|
pcb_component_id: z106.string().optional(),
|
|
@@ -357537,8 +357952,8 @@ var pcb_port2 = z107.object({
|
|
|
357537
357952
|
subcircuit_id: z107.string().optional(),
|
|
357538
357953
|
source_port_id: z107.string(),
|
|
357539
357954
|
pcb_component_id: z107.string().optional(),
|
|
357540
|
-
x:
|
|
357541
|
-
y:
|
|
357955
|
+
x: distance53,
|
|
357956
|
+
y: distance53,
|
|
357542
357957
|
layers: z107.array(layer_ref3),
|
|
357543
357958
|
is_board_pinout: z107.boolean().optional()
|
|
357544
357959
|
}).describe("Defines a port on the PCB");
|
|
@@ -357549,8 +357964,8 @@ var pcb_smtpad_circle2 = z108.object({
|
|
|
357549
357964
|
pcb_smtpad_id: getZodPrefixedIdWithDefault2("pcb_smtpad"),
|
|
357550
357965
|
pcb_group_id: z108.string().optional(),
|
|
357551
357966
|
subcircuit_id: z108.string().optional(),
|
|
357552
|
-
x:
|
|
357553
|
-
y:
|
|
357967
|
+
x: distance53,
|
|
357968
|
+
y: distance53,
|
|
357554
357969
|
radius: z108.number(),
|
|
357555
357970
|
layer: layer_ref3,
|
|
357556
357971
|
port_hints: z108.array(z108.string()).optional(),
|
|
@@ -357566,8 +357981,8 @@ var pcb_smtpad_rect2 = z108.object({
|
|
|
357566
357981
|
pcb_smtpad_id: getZodPrefixedIdWithDefault2("pcb_smtpad"),
|
|
357567
357982
|
pcb_group_id: z108.string().optional(),
|
|
357568
357983
|
subcircuit_id: z108.string().optional(),
|
|
357569
|
-
x:
|
|
357570
|
-
y:
|
|
357984
|
+
x: distance53,
|
|
357985
|
+
y: distance53,
|
|
357571
357986
|
width: z108.number(),
|
|
357572
357987
|
height: z108.number(),
|
|
357573
357988
|
rect_border_radius: z108.number().optional(),
|
|
@@ -357590,8 +358005,8 @@ var pcb_smtpad_rotated_rect2 = z108.object({
|
|
|
357590
358005
|
pcb_smtpad_id: getZodPrefixedIdWithDefault2("pcb_smtpad"),
|
|
357591
358006
|
pcb_group_id: z108.string().optional(),
|
|
357592
358007
|
subcircuit_id: z108.string().optional(),
|
|
357593
|
-
x:
|
|
357594
|
-
y:
|
|
358008
|
+
x: distance53,
|
|
358009
|
+
y: distance53,
|
|
357595
358010
|
width: z108.number(),
|
|
357596
358011
|
height: z108.number(),
|
|
357597
358012
|
rect_border_radius: z108.number().optional(),
|
|
@@ -357615,8 +358030,8 @@ var pcb_smtpad_pill2 = z108.object({
|
|
|
357615
358030
|
pcb_smtpad_id: getZodPrefixedIdWithDefault2("pcb_smtpad"),
|
|
357616
358031
|
pcb_group_id: z108.string().optional(),
|
|
357617
358032
|
subcircuit_id: z108.string().optional(),
|
|
357618
|
-
x:
|
|
357619
|
-
y:
|
|
358033
|
+
x: distance53,
|
|
358034
|
+
y: distance53,
|
|
357620
358035
|
width: z108.number(),
|
|
357621
358036
|
height: z108.number(),
|
|
357622
358037
|
radius: z108.number(),
|
|
@@ -357634,8 +358049,8 @@ var pcb_smtpad_rotated_pill2 = z108.object({
|
|
|
357634
358049
|
pcb_smtpad_id: getZodPrefixedIdWithDefault2("pcb_smtpad"),
|
|
357635
358050
|
pcb_group_id: z108.string().optional(),
|
|
357636
358051
|
subcircuit_id: z108.string().optional(),
|
|
357637
|
-
x:
|
|
357638
|
-
y:
|
|
358052
|
+
x: distance53,
|
|
358053
|
+
y: distance53,
|
|
357639
358054
|
width: z108.number(),
|
|
357640
358055
|
height: z108.number(),
|
|
357641
358056
|
radius: z108.number(),
|
|
@@ -357683,8 +358098,8 @@ var pcb_solder_paste_circle2 = z109.object({
|
|
|
357683
358098
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault2("pcb_solder_paste"),
|
|
357684
358099
|
pcb_group_id: z109.string().optional(),
|
|
357685
358100
|
subcircuit_id: z109.string().optional(),
|
|
357686
|
-
x:
|
|
357687
|
-
y:
|
|
358101
|
+
x: distance53,
|
|
358102
|
+
y: distance53,
|
|
357688
358103
|
radius: z109.number(),
|
|
357689
358104
|
layer: layer_ref3,
|
|
357690
358105
|
pcb_component_id: z109.string().optional(),
|
|
@@ -357696,8 +358111,8 @@ var pcb_solder_paste_rect2 = z109.object({
|
|
|
357696
358111
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault2("pcb_solder_paste"),
|
|
357697
358112
|
pcb_group_id: z109.string().optional(),
|
|
357698
358113
|
subcircuit_id: z109.string().optional(),
|
|
357699
|
-
x:
|
|
357700
|
-
y:
|
|
358114
|
+
x: distance53,
|
|
358115
|
+
y: distance53,
|
|
357701
358116
|
width: z109.number(),
|
|
357702
358117
|
height: z109.number(),
|
|
357703
358118
|
layer: layer_ref3,
|
|
@@ -357710,8 +358125,8 @@ var pcb_solder_paste_pill2 = z109.object({
|
|
|
357710
358125
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault2("pcb_solder_paste"),
|
|
357711
358126
|
pcb_group_id: z109.string().optional(),
|
|
357712
358127
|
subcircuit_id: z109.string().optional(),
|
|
357713
|
-
x:
|
|
357714
|
-
y:
|
|
358128
|
+
x: distance53,
|
|
358129
|
+
y: distance53,
|
|
357715
358130
|
width: z109.number(),
|
|
357716
358131
|
height: z109.number(),
|
|
357717
358132
|
radius: z109.number(),
|
|
@@ -357725,11 +358140,11 @@ var pcb_solder_paste_rotated_rect2 = z109.object({
|
|
|
357725
358140
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault2("pcb_solder_paste"),
|
|
357726
358141
|
pcb_group_id: z109.string().optional(),
|
|
357727
358142
|
subcircuit_id: z109.string().optional(),
|
|
357728
|
-
x:
|
|
357729
|
-
y:
|
|
358143
|
+
x: distance53,
|
|
358144
|
+
y: distance53,
|
|
357730
358145
|
width: z109.number(),
|
|
357731
358146
|
height: z109.number(),
|
|
357732
|
-
ccw_rotation:
|
|
358147
|
+
ccw_rotation: distance53,
|
|
357733
358148
|
layer: layer_ref3,
|
|
357734
358149
|
pcb_component_id: z109.string().optional(),
|
|
357735
358150
|
pcb_smtpad_id: z109.string().optional()
|
|
@@ -357740,8 +358155,8 @@ var pcb_solder_paste_rotated_pill2 = z109.object({
|
|
|
357740
358155
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault2("pcb_solder_paste"),
|
|
357741
358156
|
pcb_group_id: z109.string().optional(),
|
|
357742
358157
|
subcircuit_id: z109.string().optional(),
|
|
357743
|
-
x:
|
|
357744
|
-
y:
|
|
358158
|
+
x: distance53,
|
|
358159
|
+
y: distance53,
|
|
357745
358160
|
width: z109.number(),
|
|
357746
358161
|
height: z109.number(),
|
|
357747
358162
|
radius: z109.number(),
|
|
@@ -357756,8 +358171,8 @@ var pcb_solder_paste_oval2 = z109.object({
|
|
|
357756
358171
|
pcb_solder_paste_id: getZodPrefixedIdWithDefault2("pcb_solder_paste"),
|
|
357757
358172
|
pcb_group_id: z109.string().optional(),
|
|
357758
358173
|
subcircuit_id: z109.string().optional(),
|
|
357759
|
-
x:
|
|
357760
|
-
y:
|
|
358174
|
+
x: distance53,
|
|
358175
|
+
y: distance53,
|
|
357761
358176
|
width: z109.number(),
|
|
357762
358177
|
height: z109.number(),
|
|
357763
358178
|
layer: layer_ref3,
|
|
@@ -357794,9 +358209,9 @@ var pcb_text2 = z110.object({
|
|
|
357794
358209
|
expectTypesMatch3(true);
|
|
357795
358210
|
var pcb_trace_route_point_wire2 = z111.object({
|
|
357796
358211
|
route_type: z111.literal("wire"),
|
|
357797
|
-
x:
|
|
357798
|
-
y:
|
|
357799
|
-
width:
|
|
358212
|
+
x: distance53,
|
|
358213
|
+
y: distance53,
|
|
358214
|
+
width: distance53,
|
|
357800
358215
|
copper_pour_id: z111.string().optional(),
|
|
357801
358216
|
is_inside_copper_pour: z111.boolean().optional(),
|
|
357802
358217
|
start_pcb_port_id: z111.string().optional(),
|
|
@@ -357805,12 +358220,12 @@ var pcb_trace_route_point_wire2 = z111.object({
|
|
|
357805
358220
|
});
|
|
357806
358221
|
var pcb_trace_route_point_via2 = z111.object({
|
|
357807
358222
|
route_type: z111.literal("via"),
|
|
357808
|
-
x:
|
|
357809
|
-
y:
|
|
358223
|
+
x: distance53,
|
|
358224
|
+
y: distance53,
|
|
357810
358225
|
copper_pour_id: z111.string().optional(),
|
|
357811
358226
|
is_inside_copper_pour: z111.boolean().optional(),
|
|
357812
|
-
hole_diameter:
|
|
357813
|
-
outer_diameter:
|
|
358227
|
+
hole_diameter: distance53.optional(),
|
|
358228
|
+
outer_diameter: distance53.optional(),
|
|
357814
358229
|
from_layer: layer_ref3,
|
|
357815
358230
|
to_layer: layer_ref3
|
|
357816
358231
|
});
|
|
@@ -357818,7 +358233,7 @@ var pcb_trace_route_point_through_pad2 = z111.object({
|
|
|
357818
358233
|
route_type: z111.literal("through_pad"),
|
|
357819
358234
|
start: point10,
|
|
357820
358235
|
end: point10,
|
|
357821
|
-
width:
|
|
358236
|
+
width: distance53,
|
|
357822
358237
|
start_layer: layer_ref3,
|
|
357823
358238
|
end_layer: layer_ref3,
|
|
357824
358239
|
pcb_smtpad_id: z111.string().optional(),
|
|
@@ -357866,8 +358281,8 @@ var pcb_trace_too_long_warning2 = z1132.object({
|
|
|
357866
358281
|
pcb_trace_id: z1132.string(),
|
|
357867
358282
|
source_net_id: z1132.string().optional(),
|
|
357868
358283
|
source_trace_id: z1132.string().optional(),
|
|
357869
|
-
actual_trace_length:
|
|
357870
|
-
maximum_trace_length:
|
|
358284
|
+
actual_trace_length: distance53,
|
|
358285
|
+
maximum_trace_length: distance53,
|
|
357871
358286
|
subcircuit_id: z1132.string().optional()
|
|
357872
358287
|
}).describe("Warning emitted when a PCB trace is longer than its maximum allowed length");
|
|
357873
358288
|
expectTypesMatch3(true);
|
|
@@ -357937,10 +358352,10 @@ var pcb_via2 = z120.object({
|
|
|
357937
358352
|
pcb_group_id: z120.string().optional(),
|
|
357938
358353
|
subcircuit_id: z120.string().optional(),
|
|
357939
358354
|
subcircuit_connectivity_map_key: z120.string().optional(),
|
|
357940
|
-
x:
|
|
357941
|
-
y:
|
|
357942
|
-
outer_diameter:
|
|
357943
|
-
hole_diameter:
|
|
358355
|
+
x: distance53,
|
|
358356
|
+
y: distance53,
|
|
358357
|
+
outer_diameter: distance53.default("0.6mm"),
|
|
358358
|
+
hole_diameter: distance53.default("0.25mm"),
|
|
357944
358359
|
from_layer: layer_ref3.optional(),
|
|
357945
358360
|
to_layer: layer_ref3.optional(),
|
|
357946
358361
|
layers: z120.array(layer_ref3),
|
|
@@ -358028,11 +358443,11 @@ var pcb_silkscreen_line2 = z127.object({
|
|
|
358028
358443
|
pcb_component_id: z127.string(),
|
|
358029
358444
|
pcb_group_id: z127.string().optional(),
|
|
358030
358445
|
subcircuit_id: z127.string().optional(),
|
|
358031
|
-
stroke_width:
|
|
358032
|
-
x1:
|
|
358033
|
-
y1:
|
|
358034
|
-
x2:
|
|
358035
|
-
y2:
|
|
358446
|
+
stroke_width: distance53.default("0.1mm"),
|
|
358447
|
+
x1: distance53,
|
|
358448
|
+
y1: distance53,
|
|
358449
|
+
x2: distance53,
|
|
358450
|
+
y2: distance53,
|
|
358036
358451
|
layer: visible_layer2
|
|
358037
358452
|
}).describe("Defines a silkscreen line on the PCB");
|
|
358038
358453
|
expectTypesMatch3(true);
|
|
@@ -358053,7 +358468,7 @@ var pcb_silkscreen_text2 = z129.object({
|
|
|
358053
358468
|
pcb_group_id: z129.string().optional(),
|
|
358054
358469
|
subcircuit_id: z129.string().optional(),
|
|
358055
358470
|
font: z129.literal("tscircuit2024").default("tscircuit2024"),
|
|
358056
|
-
font_size:
|
|
358471
|
+
font_size: distance53.default("0.2mm"),
|
|
358057
358472
|
pcb_component_id: z129.string(),
|
|
358058
358473
|
text: z129.string(),
|
|
358059
358474
|
is_knockout: z129.boolean().default(false).optional(),
|
|
@@ -358081,7 +358496,7 @@ var pcb_copper_text2 = z130.object({
|
|
|
358081
358496
|
pcb_group_id: z130.string().optional(),
|
|
358082
358497
|
subcircuit_id: z130.string().optional(),
|
|
358083
358498
|
font: z130.literal("tscircuit2024").default("tscircuit2024"),
|
|
358084
|
-
font_size:
|
|
358499
|
+
font_size: distance53.default("0.2mm"),
|
|
358085
358500
|
pcb_component_id: z130.string(),
|
|
358086
358501
|
text: z130.string(),
|
|
358087
358502
|
is_knockout: z130.boolean().default(false).optional(),
|
|
@@ -358141,8 +358556,8 @@ var pcb_silkscreen_oval2 = z1332.object({
|
|
|
358141
358556
|
pcb_group_id: z1332.string().optional(),
|
|
358142
358557
|
subcircuit_id: z1332.string().optional(),
|
|
358143
358558
|
center: point10,
|
|
358144
|
-
radius_x:
|
|
358145
|
-
radius_y:
|
|
358559
|
+
radius_x: distance53,
|
|
358560
|
+
radius_y: distance53,
|
|
358146
358561
|
layer: visible_layer2,
|
|
358147
358562
|
ccw_rotation: rotation12.optional()
|
|
358148
358563
|
}).describe("Defines a silkscreen oval on the PCB");
|
|
@@ -358182,7 +358597,7 @@ var pcb_fabrication_note_text3 = z136.object({
|
|
|
358182
358597
|
subcircuit_id: z136.string().optional(),
|
|
358183
358598
|
pcb_group_id: z136.string().optional(),
|
|
358184
358599
|
font: z136.literal("tscircuit2024").default("tscircuit2024"),
|
|
358185
|
-
font_size:
|
|
358600
|
+
font_size: distance53.default("1mm"),
|
|
358186
358601
|
pcb_component_id: z136.string(),
|
|
358187
358602
|
text: z136.string(),
|
|
358188
358603
|
ccw_rotation: z136.number().optional(),
|
|
@@ -358252,7 +358667,7 @@ var pcb_note_text3 = z140.object({
|
|
|
358252
358667
|
subcircuit_id: z140.string().optional(),
|
|
358253
358668
|
name: z140.string().optional(),
|
|
358254
358669
|
font: z140.literal("tscircuit2024").default("tscircuit2024"),
|
|
358255
|
-
font_size:
|
|
358670
|
+
font_size: distance53.default("1mm"),
|
|
358256
358671
|
text: z140.string().optional(),
|
|
358257
358672
|
anchor_position: point10.default({ x: 0, y: 0 }),
|
|
358258
358673
|
anchor_alignment: z140.enum(["center", "top_left", "top_right", "bottom_left", "bottom_right"]).default("center"),
|
|
@@ -358303,12 +358718,12 @@ var pcb_note_line3 = z1432.object({
|
|
|
358303
358718
|
subcircuit_id: z1432.string().optional(),
|
|
358304
358719
|
name: z1432.string().optional(),
|
|
358305
358720
|
text: z1432.string().optional(),
|
|
358306
|
-
x1:
|
|
358307
|
-
y1:
|
|
358308
|
-
x2:
|
|
358309
|
-
y2:
|
|
358721
|
+
x1: distance53,
|
|
358722
|
+
y1: distance53,
|
|
358723
|
+
x2: distance53,
|
|
358724
|
+
y2: distance53,
|
|
358310
358725
|
layer: visible_layer2.default("top"),
|
|
358311
|
-
stroke_width:
|
|
358726
|
+
stroke_width: distance53.default("0.1mm"),
|
|
358312
358727
|
color: z1432.string().optional(),
|
|
358313
358728
|
is_dashed: z1432.boolean().optional()
|
|
358314
358729
|
}).describe("Defines a straight documentation note line on the PCB");
|
|
@@ -358359,8 +358774,8 @@ var pcb_keepout3 = z147.object({
|
|
|
358359
358774
|
pcb_group_id: z147.string().optional(),
|
|
358360
358775
|
subcircuit_id: z147.string().optional(),
|
|
358361
358776
|
center: point10,
|
|
358362
|
-
width:
|
|
358363
|
-
height:
|
|
358777
|
+
width: distance53,
|
|
358778
|
+
height: distance53,
|
|
358364
358779
|
pcb_keepout_id: z147.string(),
|
|
358365
358780
|
layers: z147.array(z147.string()),
|
|
358366
358781
|
description: z147.string().optional(),
|
|
@@ -358371,7 +358786,7 @@ var pcb_keepout3 = z147.object({
|
|
|
358371
358786
|
pcb_group_id: z147.string().optional(),
|
|
358372
358787
|
subcircuit_id: z147.string().optional(),
|
|
358373
358788
|
center: point10,
|
|
358374
|
-
radius:
|
|
358789
|
+
radius: distance53,
|
|
358375
358790
|
pcb_keepout_id: z147.string(),
|
|
358376
358791
|
layers: z147.array(z147.string()),
|
|
358377
358792
|
description: z147.string().optional(),
|
|
@@ -358547,8 +358962,8 @@ var pcb_breakout_point2 = z158.object({
|
|
|
358547
358962
|
source_port_id: z158.string().optional(),
|
|
358548
358963
|
source_net_id: z158.string().optional(),
|
|
358549
358964
|
layer: layer_ref3.optional(),
|
|
358550
|
-
x:
|
|
358551
|
-
y:
|
|
358965
|
+
x: distance53,
|
|
358966
|
+
y: distance53
|
|
358552
358967
|
}).describe("Defines a routing target within a pcb_group for a source_trace or source_net");
|
|
358553
358968
|
expectTypesMatch3(true);
|
|
358554
358969
|
var pcb_ground_plane2 = z159.object({
|
|
@@ -358576,9 +358991,9 @@ var pcb_thermal_spoke2 = z161.object({
|
|
|
358576
358991
|
pcb_ground_plane_id: z161.string(),
|
|
358577
358992
|
shape: z161.string(),
|
|
358578
358993
|
spoke_count: z161.number(),
|
|
358579
|
-
spoke_thickness:
|
|
358580
|
-
spoke_inner_diameter:
|
|
358581
|
-
spoke_outer_diameter:
|
|
358994
|
+
spoke_thickness: distance53,
|
|
358995
|
+
spoke_inner_diameter: distance53,
|
|
358996
|
+
spoke_outer_diameter: distance53,
|
|
358582
358997
|
pcb_plated_hole_id: z161.string().optional(),
|
|
358583
358998
|
subcircuit_id: z161.string().optional()
|
|
358584
358999
|
}).describe("Pattern for connecting a ground plane to a plated hole");
|
|
@@ -358660,8 +359075,8 @@ var pcb_via_clearance_error2 = base_circuit_json_error2.extend({
|
|
|
358660
359075
|
pcb_error_id: getZodPrefixedIdWithDefault2("pcb_error"),
|
|
358661
359076
|
error_type: z166.literal("pcb_via_clearance_error").default("pcb_via_clearance_error"),
|
|
358662
359077
|
pcb_via_ids: z166.array(z166.string()).min(2),
|
|
358663
|
-
minimum_clearance:
|
|
358664
|
-
actual_clearance:
|
|
359078
|
+
minimum_clearance: distance53.optional(),
|
|
359079
|
+
actual_clearance: distance53.optional(),
|
|
358665
359080
|
pcb_center: z166.object({
|
|
358666
359081
|
x: z166.number().optional(),
|
|
358667
359082
|
y: z166.number().optional()
|
|
@@ -358675,8 +359090,8 @@ var pcb_via_trace_clearance_error2 = base_circuit_json_error2.extend({
|
|
|
358675
359090
|
error_type: z167.literal("pcb_via_trace_clearance_error").default("pcb_via_trace_clearance_error"),
|
|
358676
359091
|
pcb_via_id: z167.string(),
|
|
358677
359092
|
pcb_trace_id: z167.string(),
|
|
358678
|
-
minimum_clearance:
|
|
358679
|
-
actual_clearance:
|
|
359093
|
+
minimum_clearance: distance53.optional(),
|
|
359094
|
+
actual_clearance: distance53.optional(),
|
|
358680
359095
|
center: z167.object({
|
|
358681
359096
|
x: z167.number().optional(),
|
|
358682
359097
|
y: z167.number().optional()
|
|
@@ -358689,8 +359104,8 @@ var pcb_pad_pad_clearance_error2 = base_circuit_json_error2.extend({
|
|
|
358689
359104
|
pcb_pad_pad_clearance_error_id: getZodPrefixedIdWithDefault2("pcb_pad_pad_clearance_error"),
|
|
358690
359105
|
error_type: z168.literal("pcb_pad_pad_clearance_error").default("pcb_pad_pad_clearance_error"),
|
|
358691
359106
|
pcb_pad_ids: z168.array(z168.string()).min(2),
|
|
358692
|
-
minimum_clearance:
|
|
358693
|
-
actual_clearance:
|
|
359107
|
+
minimum_clearance: distance53.optional(),
|
|
359108
|
+
actual_clearance: distance53.optional(),
|
|
358694
359109
|
center: z168.object({
|
|
358695
359110
|
x: z168.number().optional(),
|
|
358696
359111
|
y: z168.number().optional()
|
|
@@ -358704,8 +359119,8 @@ var pcb_pad_trace_clearance_error2 = base_circuit_json_error2.extend({
|
|
|
358704
359119
|
error_type: z169.literal("pcb_pad_trace_clearance_error").default("pcb_pad_trace_clearance_error"),
|
|
358705
359120
|
pcb_pad_id: z169.string(),
|
|
358706
359121
|
pcb_trace_id: z169.string(),
|
|
358707
|
-
minimum_clearance:
|
|
358708
|
-
actual_clearance:
|
|
359122
|
+
minimum_clearance: distance53.optional(),
|
|
359123
|
+
actual_clearance: distance53.optional(),
|
|
358709
359124
|
center: z169.object({
|
|
358710
359125
|
x: z169.number().optional(),
|
|
358711
359126
|
y: z169.number().optional()
|