pub fn mount_aligned_to_footprint(
current: Option<&AffineTransform>,
seats: &[AlignSeat],
pads: &[AlignPad],
) -> Result<AlignReport, String>Expand description
Align to footprint: the mount current (identity when None) refitted so
the part’s seats land on their pads, as one rigid move, with the leftover.
- The seating plane. A mount that already tilts the part (a face pick, Y up → Z up) keeps its plane. Otherwise the pins’ wire directions give the tilt, turned to −z; they must agree within 5° or Align refuses and names the pins that do not. The height is then the lowest point of the surface-mount pins (their contact bodies, or their seats), at z = 0; a part with only through-hole pins keeps its height and is told to pick its seating face.
- The fit in the board’s plane, pins matched to pads by number. A pin with one pad drives the fit; a pin with several pads of its number is matched afterwards to the nearest. One driving pin moves the part and keeps its rotation; none is refused. A mirrored fit that would leave a clearly smaller leftover is said, and never applied.