pcb_snap_to_grid
Aligns a PCB component to the nearest grid point by rounding its X and Y coordinates to the specified grid size for precise board layout.
Instructions
Snap a component to the nearest grid point.
Rounds the component's X and Y position to the nearest multiple of the specified grid size.
Args: designator: Component reference designator (e.g., "U1", "R5") grid_size: Grid spacing in mils (default 50)
Returns: Dictionary with designator, old and new positions, and grid_size
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grid_size | No | ||
| designator | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||