Propose a change
Name Last commit message Last updated
adom-component-fit Migrate asset from Helium wiki 1mo ago
install.sh Add adompkg installer files 1mo ago
package.json Add adompkg installer files 1mo ago
page.json Remove internal identifiers from page.json 11d ago
Ray_Library_1__TerminalBlock_WAGO_2601-3105_1x05_P3.50mm_Vertical.glb Migrate asset from Helium wiki 1mo ago
README.md Initial commit: app/adom-component-fit 1mo ago
SKILL.md Add adompkg installer files 1mo ago
uninstall.sh Add adompkg installer files 1mo ago

adom-component-fit

CLI shim that returns the rotation + offset transform needed to fit a given LCSC 3D model onto a given KiCad footprint. Distributed to the InstaPCB consumer's render pipeline so each component lands with pin-1 in the right corner regardless of EasyEDA-vs-KiCad pin-1 convention drift.

Usage

adom-component-fit <Library>/<Footprint> <LCSC-code>

Two positional args. Same <Library>/<Footprint> shape consumers already pass to step2glb from-library / adom-pin1-truth.

Output (stdout, single JSON line):

{"rot_deg":180.0,"offset_mm":[0.0,0.0,0.0]}
  • rot_deg — rotation around the GLB's local Y axis (world up once placed on the PCB plane). Positive = CCW looking down at the board.
  • offset_mm[x, y, z] translation in the footprint's local frame, applied after the rotation.

Unknown entry: exit non-zero, one-line stderr message, no stdout. Caller falls back to identity (no transform).

Exit codes

Code Meaning
0 Real answer printed
1 (Library/Footprint, LCSC) not in the dataset
2 Bad CLI input

Backed by

  • One CSV per library at data/component-fit/<Library>.csv, baked into the binary at compile time.
  • New rows arrive via task files in component-fit-tasks/; the listener (scripts/fit-listener.sh, run from cron) processes them and republishes this binary.
  • Source: github.com/adom-inc/adom-pin1-truth