Check one proposed footprint position
check_placementCheck if placing or moving a footprint to proposed x, y coordinates violates board placement constraints before committing.
Instructions
Check if placing/moving a footprint to (x, y) would violate constraints.
Both checks are on the footprint's origin point, not its courtyard, so a
footprint whose body overlaps a keep-out while its origin does not still
reports ok. That is also why there is no rotation parameter: rotating about
the origin cannot move the origin, so an angle could not change either
answer.
Keep-outs are read as KiCad reads them: a footprint's own keep-outs in board
coordinates, as the file stores them; a layer set such as *.Cu or F&B.Cu as
the layers it names; the footprint on its side, B.Cu or else F.Cu, as KiCad
reads any other footprint layer; and the footprint's own keep-outs never
count against it (intersectsArea skips an area whose parent is the item,
pcbnew/pcbexpr_functions.cpp:697 at 9.0.8).
Args:
reference: Footprint reference designator
x: Proposed X position
y: Proposed Y position
pcb_path: Path to .kicad_pcb file. Optional; omit to use the configured default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| pcb_path | No | ||
| reference | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | Yes | ||
| board_edge_checked | Yes | ||
| keepout_violations | Yes | ||
| outside_board_edge | Yes |