pcb_autoplace
Places a PCB's parts with an in-house engine as a background job, returning a job ID and previewable moves, wirelength changes, overlaps, and DRC verdict before applying.
Instructions
Place the focused board's parts with the in-house placer, as a job.
Reads the board exactly (pcb.get_layout_model), then places it in
the background and returns a job id at once. Poll
design_job_status; design_job_result gives the moves, the
wirelength before and after, any overlaps, and the exact DRC's
verdict on the placed board (unrouted). Nothing is moved on the board
until pcb_autoplace_apply.
Two strategies. "blocks" plans the board by sub-circuit first: each IC with its decoupling, pull-ups and filters in columns round it, connectors with the parts on their lines, passives in rows, repeated channels as identical tiles in a grid, the blocks placed in signal-flow order from the connectors; its result also lists the blocks (name, rectangle in mils, members) and every part the legaliser had to move, with the moves over 80 mil flagged as floorplan problems. "analytic" places by wirelength alone (quadratic placement, spreading, legalising, refinement).
Parts keep their side. Locked parts, and parts whose designator
starts like a connector, mounting hole, fiducial, test point, switch
or battery, stay where they are unless named in parts: they sit
where they do for mechanical reasons. The board's own routing does
not move with its parts: place before routing, or take the routing up
first with pcb_unroute.
This is the in-house engine: no Altium auto-placer, no external program.
Args:
expect_file: full path of the board to place. The read refuses on
the first reply if the focused board is another one.
parts: designators to move; every other part stays. None moves
every part that is not locked or mechanical (see above).
compact: spread the parts over only as much room as they need,
round where their connections pull them, instead of over the
whole board. For a small circuit on a large board; over the
benchmark boards it routes slightly worse, so it is off by
default. Analytic strategy only.
strategy: "blocks" or "analytic"; None takes the placer's
default, "blocks". A board where the floorplan has to push
more than a quarter of its parts out of place is placed by
"analytic" instead, and the result says so under
fallback.
Returns:
{"job_id", "board", "strategy", "read": {...}}, or
{"error": ...} when the strategy is unknown, or the read
failed or found another board.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| parts | No | ||
| compact | No | ||
| strategy | No | ||
| expect_file | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||