lib_get_pad_geometry
Retrieves full-precision pad geometry in millimetres for a PcbLib footprint, enabling accurate datasheet land-pattern audits and tolerance comparisons without integer-mil rounding errors.
Instructions
Full-precision pad geometry of one PcbLib footprint, in mm.
The measurement half of the datasheet land-pattern audit. Unlike the integer-mil dump behind lib_audit_footprint_policies, every dimension here is a float in millimetres (a 0.65 mm pitch loses 10 um to integer-mil rounding, which a tolerance comparison against the datasheet cannot afford). Coordinates are relative to the footprint's own origin.
Args: footprint_name: the footprint name in the library. library_path: optional .PcbLib path; defaults to the focused library.
Returns: {name, description, library_path, pad_count, pads: [{ name, x_mm, y_mm, copper_x_mm, copper_y_mm, w_mm, h_mm, shape, corner_pct, rotation, hole_rotation, hole_mm, hole_w_mm, hole_type, slot_aligned (slots only), plated, layer, paste_expansion_mm, paste_expansion_source, paste_expansion_state, mask_expansion_mm, mask_bottom_expansion_mm, mask_separate, mask_expansion_source, mask_expansion_state}]}. mask_expansion_mm is the TOP side when mask_separate is true and both sides when it is false; mask_bottom_expansion_mm is the stored bottom value, which takes effect once the sides are unlinked even while it is not in use. x_mm/y_mm are the pad's origin; copper_x_mm/copper_y_mm are the centre of its copper, which differs on a custom pad. hole_rotation is relative to the pad, so a slot lines up when the copper's and the hole's long axes agree in the pad's frame, which slot_aligned reports. *_expansion_source is 'manual' when the pad overrides the design rule, 'rule' otherwise (value 0 in that case: the rule's value lives in the design rules, not on the pad); *_expansion_state is the cache's own manual, valid or invalid.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| library_path | No | ||
| footprint_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||