lib_audit_footprint_vs_datasheet
Audit a PCB footprint's real pad geometry against a manufacturer datasheet land-pattern spec to find mismatches in pad position, size, shape, drill, pitch, and thermal pad.
Instructions
Audit a footprint against the manufacturer's land pattern.
Deterministic comparison of the REAL pad geometry (read live from the .PcbLib) against a land-pattern spec transcribed from the manufacturer datasheet: pad count, every pad's position / size / shape / drill, the numbering sequence, pitch (implied by positions), the thermal pad, and its paste policy. Alignment is automatic (centroid + best of the four 90-degree rotations), so library origin and rotation conventions do not produce false errors; a MIRRORED pattern is deliberately not compensated and reports as position/sequence errors.
DATASHEET DISCIPLINE: the spec must be transcribed from the
manufacturer datasheet fetched in this conversation, and
spec.source must cite it (url + figure/page + part number).
Symbol metadata, distributor drawings, or memory of a package
are not acceptable sources. There are no built-in package
tables here, and that is intentional.
The spec (JSON object or string): source: {datasheet_url, reference, part_number} REQUIRED pads: [{name, x, y, w, h, shape?, hole?}] explicit, mm dual_row: {count, pitch, span, pad_w, pad_h, shape?} quad: {count, pitch, span_x, span_y, pad_w, pad_h, shape?} thermal_pad: {name, x, y, w, h, shape?} thermal_paste: 'full' | 'windowed' position_tol / size_tol: mm, default 0.05
dual_row expands with the SOIC/SOP convention (pin 1 top-left,
CCW); quad with the QFP/QFN convention (pin 1 top of left side,
CCW). For any other numbering give explicit pads. pad_w has
two meanings, kept for existing callers: in dual_row it is the
pad's X size, ACROSS the row; in quad it runs ALONG the row.
Returns: {ok, rotation_applied_deg, findings: [{check, severity, message, pad?, expected?, actual?}]} plus the footprint geometry under 'footprint' for reference. ok is true only with zero error-severity findings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec_json | Yes | ||
| library_path | No | ||
| footprint_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||