wholeboard.kicad.handedit¶
Keep the changes a user makes in KiCad to a finished board.
After a build the board is
- Parts moved by hand become fixed placements in the spec (locked, so the placer leaves them).
- Nets whose copper was changed by hand keep that copper: it goes into the new board as locked tracks and vias, and TraceMaker routes only what is still unconnected. The parts those tracks reach are held in place too.
What has been kept so far lives in the project's state ("kicad_edits"), so the edits survive every later build until the user lets them go. Other changes (the outline, zones, text) are not read back; the build says so.
diff(before, after)
¶
What changed between the board WholeBoard routed and the one saved from KiCad.
Returns {"moved": {ref: placement}, "held": {ref: placement}, "nets": {net: copper}, "cleared": [net], "removed": [ref], "other": [notes]}. Placements and copper are in the spec's board coordinates.
detect(artifacts)
¶
The hand edits in the last finished board, or None when it was not changed since WholeBoard wrote it.
merge(kept, d)
¶
Add newly found edits to the ones already kept: newer placements and copper win.
apply(spec, kept)
¶
Put the kept edits into a spec. Returns the spec and notes on what could not be kept.