CLI command design
easyeda-import
Generate Altium schematic-library, PCB-library footprint, and downloaded 3D model assets from EasyEDA/LCSC component data.
Usage
altium-cruncher easyeda-import C2040 --input-json C2040.json -o output/easyeda-import
altium-cruncher easyeda-import C2040 --symbol-onlyArguments
lcsc_id identifies the part. --input-json, --cache-dir, and --no-fetch control data loading. Full output is the default: generated SchLib, generated PcbLib, and downloaded 3D model assets when available. --symbol-only skips footprint and 3D asset output. --no-3d-model-download skips model download. --no-3d-model-placement still downloads model assets but does not attach the STEP model into the generated footprint. easyeda-monkey is a normal runtime dependency of altium-cruncher, so no separate install extra is required.
Output
The command writes generated SchLib, generated PcbLib, JSON mapping reports, optional SVG previews, and 3d_models/ assets plus easyeda-3d-models.json when a model can be downloaded. The downloaded EasyEDA STEP model is embedded into the generated PcbLib and attached to the footprint as a 3D body at the transformed EasyEDA placement. After the attach, the placed model bounds' drift from the footprint origin is measured and the binary verdict (ok or needs_checking; checked: false with a reason when STEP bounds cannot be inferred) is written to the footprint report and to easyeda-3d-models.json as placement_verdict plus placement_check metrics; a needs_checking model logs a warning because its geometry may be imported wrong. Detection only — the placement is never auto-corrected.
Tests
EasyEDA tests validate symbol import, default footprint import, reports, previews, saved fixture inputs, mocked 3D model asset download, 3D body attachment, and the binary placement check (ok, needs_checking, unchecked) without requiring live API access. L0 verifies the command is registered as a first-class public command.