fix(board-view): frame get_board_2d_view to the board, not the A4 sheet
kicad-cli's `pcb export svg` defaults to `--page-size-mode 0` (the full drawing sheet), so only the area inside the sheet is plotted -- board geometry past the page edge is left out. Pass `--exclude-drawing-sheet` and `--page-size-mode 2` (board area only) so the output is sized to the board's bounding box and the full board is rendered. Both flags exist since KiCad 7, so KiCad 8/9 are unaffected.
This commit is contained in:
@@ -198,6 +198,14 @@ class BoardViewCommands:
|
||||
output_svg,
|
||||
"--mode-single",
|
||||
"--black-and-white",
|
||||
# Render the board, not the drawing sheet. kicad-cli's
|
||||
# default (page-size-mode 0) plots only the area inside the
|
||||
# sheet, so board geometry past the page edge is left out.
|
||||
# Mode 2 sizes the output to the board's bounding box;
|
||||
# --exclude-drawing-sheet drops the title block.
|
||||
"--exclude-drawing-sheet",
|
||||
"--page-size-mode",
|
||||
"2",
|
||||
]
|
||||
if layers:
|
||||
cmd += ["--layers", ",".join(layers)]
|
||||
|
||||
Reference in New Issue
Block a user