Anneal a dense placement
anneal_placeDense placement by simulated annealing: wirelength inside the real outline (Edge.Cuts with its corners, notches and cutouts; a separate piece no held part stands on is left out) with courtyard gaps, edge connectors held on their edge, fixed and locked parts held, and, unless refs is given, the mounting holes, connectors and switches already on the board held too (held_mechanical). Kept clear: keepout rectangles (routing corridors) and the board's and held footprints' rule areas that forbid pads or footprints, on their own faces. A per-pad price for the bottom side (flip_cost, mm of wirelength; each bottom-side pad whose net has top-side pins costs a via). Starts from the current positions unless from_scratch. The result is legalised: no part on another, in a keep-out or off the board; a part with no legal spot that started off the board stays there (unplaced), and a result worse than the board had is not saved (the op fails, the board unchanged). Iterations scale with the parts moved within a 150 s budget: leave iterations unset.
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": {
"design_id": "<design_id>"
},
"name": "anneal_place"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| t0 | No | Start temperature (default 15). ~0.5 keeps the current placement and only tidies it (refine, or squeeze into a smaller outline). | |
| edge | No | Connector ref to the edge it sits on, optionally @mm: where along that edge its centre goes, from the outline's top-left corner (x on top/bottom, y on left/right) — the same meaning as in auto_place and a board plan. A fixed or locked ref keeps its pin. | |
| halo | No | Routing room per ref, mm (a number all round, or footprint-local [left, top, right, bottom]). | |
| near | No | Keep ref at its anchor (a decoupling capacitor at its IC, a crystal at its MCU): the board plan's near constraint, as a strong pull in the anneal. | |
| refs | No | The footprints that may move (default: every unlocked one). | |
| seed | No | ||
| fixed | No | Parts held at these origin positions; they are moved there on the board first. | |
| shove | No | Legaliser: a part may take a spot held only by movable parts under this fraction of its area (default 0.3, 0 off). | |
| gap_mm | No | ||
| wait_s | No | Seconds to wait (default 55); a job still running comes back "running" for get_board_job. | |
| grid_mm | No | Placement grid for free parts (0.254 = 10 mil, the designer habit); default off. | |
| keepouts | No | Rectangles no part may cover, e.g. a bus corridor. | |
| bottom_ok | No | Footprint-id substrings allowed on the bottom side (e.g. "0402"). | |
| design_id | Yes | The design id returned by import_kicad_project or list_designs. | |
| flip_cost | No | ||
| rotations | No | ||
| bottom_any | No | Any SMD-only part may go to the back (priced by flip_cost); LEDs, switches, displays and test points stay on top unless bottom_exclude says otherwise. | |
| ic_halo_mm | No | Room kept around ICs with 48+ pads and fine-pitch ICs (default 1.5; other 16+ pad ICs get two thirds). | |
| iterations | No | Leave unset: 6000 per moving part (0.3-6 M) within a 150 s budget. Fewer only for a quick look. | |
| net_weight | No | ||
| refit_from | No | Outline the current placement was drawn in; it is scaled affinely into the new outline before annealing (with t0 ~0.5: shrink a placement that closed). | |
| split_cost | No | Price (mm of wirelength) of an SMD net with pads on both sides, i.e. a via. | |
| from_scratch | No | ||
| hole_room_mm | No | Room kept around mounting holes on both sides for the screw head and standoff (default 1). | |
| bottom_exclude | No | Regex of refs or footprint ids that stay on top regardless. | |
| overlap_weight | No | Overlap price per mm2 at the end of the anneal (default 400; 4000 halves what a dense draw leaves). | |
| edge_overhang_mm | No | Per edge ref, how far its body sits past the edge: default 0.5 for a USB/barrel/jack connector (at most its 1.2 mm lip), 0 (flush) for anything else, which may not overhang. | |
| connector_room_mm | No | Room kept on the board side of every edge connector (default 2.5). | |
| connector_flank_mm | No | Room kept on the flanks of every edge connector (default 1.0). | |
| bottom_max_height_mm | No | Tallest part allowed on the back (3D-model height, default 1.0): the assembly box grows by the tallest back-side part. |