Home

Awesome

kicad-panelizer

A simple script to create a v-scored panel of a KiCad board.

To use:

  1. Ensure you have KiCad 8 installed
  2. Clone script to an appropriate location
  3. Open a terminal and cd to the directory of the script
  4. Run it with python3: ./panelizer.py --panelx=100 --panely=100 /path/to/source_board.kicad_pcb
  5. Panelized output will be saved to the same directory as the source board, with the name {sourceboardname}_panelized.kicad_pcb

CLI Arguments

SwitchExplanation
--panelx=100Maximum width of panel in mm to fit as many boards as possible to
--panely=100Maximum height of panel in mm to fit as many boards as possible to
--numx=2Number of boards in the panel horizontally (conflicts with --panelx/panely)
--numy=2Number of boards in the panel vertically (conflicts with --panelx/panely)
--hrail=5Width in mm of left/right edge rails
--vrail=5Width in mm of top/bottom edge rails (not recommended to use with --hrail)
--hrailtext="text on hrail"Text to put on left hrail
--vrailtext="text on vrail"Text to put on top vrail
--htitleOutput title block fields (Title, Company, Revision, Date) on right hrail
--vtitleOutput title block fields (Title, Company, Revision, Date) on bottom vrail
--vscorelayerLayer to put v-score lines on, defaults to Edge.Cuts
--vscoretextlayerLayer to put v-score text on, defaults to User.Comments
--vscoretextText used to indicate v-scores, defaults to V-SCORE
--vscoreextendsHow far past the board in mm to extend the v-scores, defaults to -0.05 (no extension)
--paddingOptional gap between boards, now defaults to 1

Example output

demo.png

panel.jpg

Hints & Tips

If you don't use Edge.Cuts as your V_SCORE_LAYER don't refill zones when exporting the gerbers as Kicad will essentially merge your panel into a single board.

PCBWay, Seeed and JLCPCB like v-scores to be on the Edge.Cuts layer. In this case Kicad seems to cope with zones being refilled, however the 3d viewer can't figure out the board outline. Also it will fail the DRC due to the board outline not being a polygon. I would set V_SCORE_LINE_LENGTH_BEYOND_BOARD to -0.05 in this case, so that the v-scores meet in the middle of the default 0.1mm lines rather than extending past the panel.

Elecrow apparently will accept v-scores in the Edge.Cuts (.GKO) layer or silkscreen layer if you put a comment on the silkscreen layer, so you should call with --vscoretextlayer=F.SilkS --vscoretext=V-CUT

Panelizer will warn you if the panel is under 70x70mm which is the minimum size JLCPCB can v-cut.

JLCPCB offer the facility to specify where to put the order number, for example hidden under an IC instead of somewhere random on your silkscreen. If you call panelizer with --vrailtext=JLCJLCJLCJLC it will put it on the vrail instead.

Please submit feature requests and bug reports via GitHub issues.