Expand description
A part’s mount frame: how it sits on its footprint, applied to every
instance (see part_mount.rs).
A part’s MOUNT FRAME: how the part sits on its footprint, kept beside its
features rather than in them.
The part document’s top-level mount block is a rigid pose in the shape an
ACOMP transform takes, {translate (mm), rotateEulerDeg (intrinsic XYZ)}.
It maps the part’s model coordinates to its footprint’s:
p_footprint = M · p_model. The footprint frame is the board’s: top copper at
z = 0, millimetres with y up.
The mount always moves the WHOLE part (every solid, every connection point and its seat). Nothing selects what it applies to. It is applied in ONE place: the ACOMP feature poses an instance’s members, ports and nested poses by M before the instance pose. So a part has one frame wherever it is placed, and the instance’s own pose is still exactly the one it was given. The solver writes that pose back, so it must never carry M.
No block means identity. An identity mount is never written
(mount_block_of says None for it), so a part with no mount and every
KiCad import stay byte-identical.
Structs§
- Align
Pad - One pad for
mount_aligned_to_footprint: its number and centre in the footprint frame (mm, y up), and whether it is surface mount (no drill). - Align
Report - What Align to footprint did: the new mount, the leftover, and what it wants said (a rotation it kept, a height it could not set, a mirror).
- Align
Seat - One seated pcb point for
mount_aligned_to_footprint, in MODEL coordinates as the part builds it.
Constants§
- MOUNT_
BLOCK - The part document’s top-level key for its mount frame.
Functions§
- is_
identity - Whether
transformis the identity, toIDENTITY_TOLERANCE(1e-6). - mount_
aligned_ to_ footprint - Align to footprint: the mount
current(identity whenNone) refitted so the part’s seats land on their pads, as one rigid move, with the leftover. - mount_
block_ of - The
mountblock to store fortransform:Nonefor identity (the key is then removed, never written as a default), otherwise the pose in the shapepart_mountreads back. - mount_
from_ block - Read one
mountblock as the rigid pose it is. - mount_
origin_ to - The mount
current(identity whenNone) moved IN THE FOOTPRINT’S PLANE so thatpoint(model coordinates) lands on the footprint origin. Its height is left alone: that is the seating plane’s to say. - mount_
seated_ on - The mount
current(identity whenNone) turned and lifted so the plane throughoriginwith OUTWARD normalnormal(both model coordinates) is the seating plane: the normal points down (−z) and the plane is at z = 0. - part_
mount - The mount frame
documentdeclares,Nonewhen it has none. - reference_
plane - The plane a picked name stands for, against the scene
prefixbuilds:(origin, outward unit normal). A PLANAR face gives its own plane, its normal pointing out of the material; a datum plane gives its frame’s z. Anything else is refused by name: a seating plane must be a plane.