footprint_check_package
Check a package description for impossible or unusual numbers before drawing a footprint, flagging impossible dimensions and IPC versus vendor land pattern mismatches as likely transcription errors.
Instructions
Check a package description for numbers that cannot be right.
Run this on every package transcribed from a datasheet, before drawing a footprint from it. Offline.
Sanity checks (each finding names the dimensions, their values and
citations, and why the combination is impossible or unusual):
limits in order; lead width below the pitch; each row of pins fits
the body it comes out of; lead span larger than the body for
leaded parts; the foot shorter than the lead's reach and two
terminals fitting the span; the exposed pad inside the body and
clear of the terminals; ball diameter below the pitch; values 25.4
times off their neighbours (mils typed as mm); pin counts the
family can have; the vendor land pattern consistent with itself.
error is impossible, warning unusual.
Cross-check, when the package carries the datasheet's recommended
land pattern as vendor: the IPC pattern computed from the
package against it, per quantity (pitch, span, land length and
width, tab, exposed pad, grid land), with both numbers, both
citations and the difference. Beyond the tolerance measured
between real vendor patterns and IPC, or a factor of two apart,
the pair is reported as a likely transcription error in one of the
two sources.
Args: package: the PackageSpec as an object or JSON text, the same schema lib_create_footprint_from_package takes.
Returns:
{ok, errors, warnings, findings, cross_check, examined, notes}. ok is true when no sanity finding is an error and
the cross-check (if it ran) agreed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||