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
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"designator": "<designator>"
},
"name": "pcb_snap_to_grid"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grid_size | No | ||
| designator | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||