结构配合尺寸链与键盘矩阵布局
尺寸链传播求解(带符号偏移、环检测、收敛复测)、KLE 键盘布局换算(750mil/U、锚点对齐)、开关矩阵总线坐标生成;输出移动指令 CSV 与布局 SVG。
Badges only claim the demo-run passed on that host; cross-host installation is handled by the adapter layer.
Preview gallery
Solve component moves for these size constraints and re-measure, then convert the KLE layout to key coordinates and generate 2x2 matrix bus coordinates.
Content matches the files inside the package; extracted by the publish pipeline.
LCEDA mechanical fit check bundle
Offline re-implementation of the pure-computation cores of three Apache-2.0 LCEDA extensions (how-big-is-it, smart-size, keyboard-layout-helper); see references/PROVENANCE.md. The itldg-shell enclosure cutout generator needs remote assets and is documented as a procedure only.
What the script computes
scripts/demo.mjs (Node >= 20, no dependencies):
- Display calibration: corrected zoom = (segmentMm / measuredMm) *
zoomPct so a reference segment renders at true physical size; the
reference segment goes on temp net
h0wB!g!$!t(defaults 8 mm / 10 mm / 1000%). - Dimension-driven placement: each size constraint names src/dst parts and edges (left/right/top/bottom) plus a target distance in mm. offset = target - (dstEdge - srcEdge); applied to the dst part when |offset| > 0.01 mm; iterated to convergence (<= 50 passes). Distances are signed (dstEdge - srcEdge): a hole 5 mm inside the right outline edge is right->right with target -5. Same-axis chains only; cycles are refused (SIZE_CYCLE), mixed axes rejected (SIZE_AXIS_MIX), unknown refs reported (SIZE_REF_MISSING). Final achieved distances are re-measured and reported per constraint.
- KLE keyboard layout: raw keyboard-layout-editor JSON rows -> key centers on a 1 u = 750 mil grid (row-head x/y/w/h rules, y only on the row head). Anchor designator must end with the first key label; its prefix is applied to all keys. Placement: baseX = anchor.x - first.gX750, baseY = anchor.y + first.gY750; key y flips the row axis. Missing key components are listed (KLE_MISSING).
- Schematic key matrix: {matrix, xNet, yNet} JSON -> switch copies at (x0 + colgap, y0 - rowgap), gap default 100, empty cells skipped, (0,0) reuses the selected part. Row buses at y0 - rowgap - gap/2 starting x0 - 0.2gap; column buses at x0 + col*gap +/- gap/2 (pinMode x/y swaps pin roles); net name only on the first segment of each bus. Offline pin assumption: 2-pin switch, pins at x +/- 20.
- Artifacts: moves.csv + layout.svg (original -> final with move arrows), keyboard.csv, matrix.csv.
Run
node scripts/demo.mjs --out-dir <dir> [--input <json>]
Default input: scripts/fixtures/input.json. stdout is an
edaskills.report.v1 report.
Input shape: { "calibration"?: {segmentMm?, measuredMm?, zoomPct?}, "parts"?: [{ref,x,y,w,h}], "sizes"?: [{src,srcEdge,dst,dstEdge,valueMm}], "keyboard"?: {layout, anchor:{ref,x,y}, existingRefs?}, "matrix"?: {spec:{prefix,matrix,xNet,yNet,gap?}, origin:{x,y}, pinMode?} } (parts mm, keyboard mil, matrix sch units).
When to use
- Check mounting-hole / connector distances against the board outline before mechanical review, and get the exact moves to fix them.
- Place a keyboard switch matrix from a KLE layout without manual counting, or generate the schematic switch matrix with row/column nets.
- Calibrate the editor zoom for a true 1:1 physical-size check.
Not for: enclosure cutout generation (itldg-shell needs remote assets, see procedures), 3D collision checking, or flex/rigid-flex stackups.
Dependencies
Demo run
node v24.19.0 · 2026/11/19
- [info] ZOOM_CALIBRATED (h0wB!g!$!t): set editor zoom to 800.0% for 1:1 physical size (segment 8 mm measured 10 mm); draw the reference segment on temp net h0wB!g!$!t
- [info] SIZE_OK (BOARD.left->H1.left): target 5 mm, achieved 5.0000 mm
- [info] SIZE_OK (BOARD.right->H2.right): target -5 mm, achieved -5.0000 mm
- [info] SIZE_OK (BOARD.top->U1.top): target 8 mm, achieved 8.0000 mm
- [info] SIZE_OK (U1.right->J1.left): target 15 mm, achieved 15.0000 mm
FAQ
Ratings & reviews
Not rated0 ratings
Sign in to rate this skill.
Sign inVersions
- v1.0.0Latest485.6 KB
首发种子版本。