lib_audit_footprint_vs_package
Audit an existing PcbLib footprint against its package drawing to catch pad, pin-1, pitch, land, hole, paste, mask, origin, courtyard, silkscreen, assembly and height mismatches; read-only.
Instructions
Audit an existing PcbLib footprint against its package drawing.
Where lib_audit_footprint_vs_datasheet compares pads with a land pattern typed in, this takes the PACKAGE (the same PackageSpec as lib_create_footprint_from_package) and checks the footprint is right for it. Reads only.
Checked: pad count, numbering and pin 1 (a mirror-image footprint,
the bottom-view mistake, is named as such); pitch exactly; row
span, land sizes and land centres against the IPC-7351B pattern
within the deviations measured between real vendor patterns and
IPC (a footprint drawn to the vendor's own pattern passes); every
land covering the centre of its terminal; holes against the leads;
paste on an exposed pad (closed opening plus windows covering 50
to 80 %) and on every land; manual solder mask settings; origin at
the package centroid; and, from the footprint's other primitives,
a courtyard that encloses the lands and the body, silkscreen off
the copper, an assembly outline that follows the body, and the
footprint height against the package's maximum. A turned footprint
is compared after turning it back. What could not be read is
listed under not_examined.
Run footprint_check_package on the package first: an audit against a misread package passes a footprint built from the same misread.
Args: footprint_name: the footprint in the library. package: the PackageSpec as an object or JSON text. density: L, N or M, the IPC pattern compared against. library_path: optional .PcbLib path; default the focused one. assembly_layer, courtyard_layer: the mechanical layers for those roles; empty picks them by the library's layer kind ("Assembly Top" / "Courtyard Top"), then by name.
Returns:
{ok, errors, warnings, findings: [{check, severity, message, pad?, expected?, actual?}], examined, not_examined, alignment, metrics, notes, package_check}. ok is true with no
error-severity finding.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| density | No | N | |
| package | Yes | ||
| library_path | No | ||
| assembly_layer | No | ||
| footprint_name | Yes | ||
| courtyard_layer | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||