pcb_unroute
Remove routed tracks, arcs, and vias from selected nets on a focused PCB while preserving footprints, polygons, keepouts, and locked routing unless explicitly included.
Instructions
Take up the focused board's routing: its tracks, arcs and vias.
Removes the free tracks and arcs on signal layers, and the free
vias, that carry a net. Never removes a footprint's own copper,
polygons or their hatching, dimensions, keepouts, or copper with
no net (an antenna, a logo, a heat spreader): those are drawn,
not routed. Locked routing stays unless include_locked, since
locking is how a designer keeps a route. Polygons are not
repoured; pcb_repour_polygons does that.
Refuses unless the focused board is expect_file. With
checkpoint (default), first snapshots the board's folder as it
is ON DISK, so it can be restored with app_restore_checkpoint;
unsaved edits in the editor are not in it, so save first if there
are any.
For other selections of board copper, obj_delete and
obj_batch_delete take a board type with a filter, e.g.
eTrackObject with Layer=TopLayer|InComponent=false.
Args: expect_file: full path of the board to un-route. nets: take up only these nets' routing. None takes every net's. A name that is not a net on the board refuses the whole call and nothing is removed. include_locked: take locked routing as well (default False). checkpoint: take a checkpoint first (default True).
Returns:
{"tracks", "arcs", "vias", "nets", "kept_locked", "failed", "checkpoint"}: how many of each were removed, how many nets
they were on, and how many locked primitives stayed. Or
{"error": ...}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nets | No | ||
| checkpoint | No | ||
| expect_file | Yes | ||
| include_locked | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||