kicad panelize

panelize.py is a tool I created to panelize one of my kicad PCBs. Copying all components, moving them to the right place and then duplicating the traces is too cumbersome. With this tool it is very easy. Just specify a source are and then let the tool copy the contents of this area to the destination, optionally rotating or flipping them. The latest version also supports merging files.

Download

Download it from here, or get it directly from the subversion repository:
svn cat http://repos.borg.ch/projects/kicad/trunk/tools/panelize-2.3.py > panelize-2.3.py

The latest version is V2.3 (r488).

Usage

panelize.py inputfile.brd outputfile.brd commands...

Important: panelize.py only supports kicad brd files version 1 and 2. Version 3 files are not supported (yet).

Coordinates

Coordinates can be specified in the following units:

  1/10000 inch     29566/33346
  inch             2.9566/3.3346i
  micrometer       75100/84700um
  nanometer        75100000/84700000nm
  millimeter       75.1/84.7mm

Commands

Important: The source-area has to be specified first. Only parts completely inside this area are copied. The only exception is merge which copies everything from the specified file.

  copy <destination>

      Copy source to destination.

      destination     Coordinate of top-left corner (X/Y).

  fliprot <destination> <source-corner> <angle>

      Copy source to destination, flip side and rotate it.

      destination     Coordinate of destination top-left corner (X/Y).
      source-corner   Corner of source area which maps to destination corner.
                      (top-left|top-right|bottom-left|bottom-right)
      angle           Rotation angle (0|90|180|270).

  flipx <destination>

      Copy source to destination and flip side (mirror at X axis).

      destination     Coordinate of destination top-left corner (X/Y).

  flipy <destination>

      Copy source to destination and flip side (mirror at Y axis).

      destination     Coordinate of destination top-left corner (X/Y).

  help

      Print this help text.

  merge <filename> <source> <destination>

      Merge a file into the current PCB.

      filename        Name of the file to merge.
      source          Coordinate of source top-left corner (X/Y).
      destination     Coordinate of destination top-left corner (X/Y).

  rotate <destination> <source-corner> <angle>

      Copy source to destination and rotate it.

      destination     Coordinate of destination top-left corner (X/Y).
      source-corner   Corner of source area which maps to destination corner.
                      (top-left|top-right|bottom-left|bottom-right)
      angle           Rotation angle (0|90|180|270).

  source-area <top-left> <bottom-right>

      Set the source area to copy.

      top-left        Coordinate of corner (X/Y).
      bottom-right    Coordinate of corner (X/Y).

 
 
 
back