LIB-22 3D model file missing or unreadable¶
| Severity | Status | Implementation |
|---|---|---|
| warning | planned | easy, depends on IMP-21, IMP-20 |
Looks at. The footprint and the model files.
What it catches. A footprint's (model ...) entry whose path leads nowhere: a ${VAR} that neither the environment, KiCad's kicad_common.json nor a stock KiCad sets; an expanded path with no file (a .wrl without a .step or .stp beside it either); or a file that is there but cannot be read as STEP.
Why it matters. KiCad shows such a footprint without a body in the 3D viewer and leaves it out of the STEP export without an error, so a mechanical check against the enclosure misses the part. The cause is usually a model library not installed on this PC, a variable set on one PC only, or a model renamed in the library.
Example. A board whose footprints name ${KICAD10_3DMODEL_DIR}/... on a PC where KiCad's 3D model package is not installed: every stock model is missing, and the STEP export of the board has bare pads.
How to check. Resolve the path as KiCad does (erc_kicad::model3d::resolve), then read the file (erc_step::read_file). better_erc: berc fp model, Resolved::UnknownVar / NotFound and read_error.
Fix. Install or point the variable at the model library, or correct the path in the footprint.
References. KiCad documentation, "3D models" in the footprint editor chapter (path variables, .wrl and .step beside each other).