Panelize Kicad Pcbnew Gerbers

May 3, 2018
I recently went to order a board for an Arduino project.  For $15 I could order a 5cm X 5cm but for $25 I could order a 10cm X 10cm board (four times as many).  I really didn't need 4x10=40 Arduino project boards, but I did need another 5cm X 5cm board.  I still had two 5 X 5 areas available so I started making other boards that I might need/want.  In the end, I had a panel of about three boards, two bigger breakout boards and a handful of little SO8 breakout boards.

There are two ways that this can be done.  Import the Pcbnew .brd files into an empty Pcbnew board and then painstakingly arrange them on a 10cm X 10cm board.
Or
Panelize them with GerberTools Panelizer (by This Is Not Rocket Science).  They have developed a suite of tools, but I only explored Viewer (Gerber Viewer) and Panelizer.

Install for Windows
Download zip file from GerbeTools Panelizer website and unzip into a directory on your drive.  There isn't an "Install" program.  Once unzipped, go to the "GerberTools\Panelizer" directory and run "GerberPanelizer.exe"

Package Gerbers from Kicad-Pcbnew
I thought it would be straightforward to export gerbers and then import into Panelizer.  There are several tricks that I learned.
1. Add an origin point
From Pcbnew load your project board file. On the Pcbnew tool panel, there is a symbol that looks like a target on an X-Y graph.
(Don't use the slightly similar target without the X-Y graph).  Use the cursor to move the cross-hatch target to the Upper-Left of the board outline and click.  You will have a Plus sign in a circle on the Pcbnew window.

2. Set Plot Options.
Not Printing options.  Select File->Plot to get the Plot Options Window.  Select Plot Format at Gerber, and an Output directory, we'll call it "mybrd-gerb/".  The minimal layers for a 2-layer board are:
F.Cu
B.Cu
B.SilkS
F.SilkS
B.Mask
F.Mask
Edge.Cust.
Finally set the Options in the center of the page
Click "Plot" button and watch the Messages window to be sure all layers were created.  Now for the Drill Holes select "Generate Drill File" button for a new window called "Drill File Generation". Set the options as below.

Then click "Drill File" Button.

3. Fix the Gerbers Problem.
Find your gerbers in the "mybrd-gerb" directory.  Pcbnew exports edge cuts layer to -Edge.Cuts.gm1.  Do you see that "one" at the end of the filename? It's okay that you didn't because I didn't see it for several hours. But now that you see it, you will always see it as the mistake it is.  Panelizer is looking for .gml (like with the letter el) and nothing will happen without it.  Just rename the .gm1 file extension to .gml.

4. The GerberTools Panelizer tool needs all the Gerber files in one ZIP file.  Do that now.

5. Startup the Panelizer, create a new panel and open your gerbers zip file.  If all the gerbers are correctly named, your board outline will appear within the outline of the panel. If you have more boards, load them in the same way and they will also appear in the panel outline.

6. Adjust the size of your panel with the menu "Panel Properties", leave the 2.00 mm  "Margin between board".  Everything else I didn't change.

7. At this time, you can move and rotate a board with the keys on the right.  Duplicating a board duplicates the Gerber boards.  Duplicate, load and move the boards until you have sufficiently filled the panel, but keep the 2.0 mm space between the boards to add Breaktabs (the panel grid is set for 1.0 mm spacing)

8. Use the Breaktabs -> Insert breaktabs to insert breaktabs between the boards that are placed within the panel.  The breaktabs will connect the boards together until you receive the board.  Duplicate, add and move the breaktabs until all your boards are adequately connected.  I used Delete All Breaktabs from the menu when I needed to clear all the breaktabs and start over.

9. All instances of gerbers boards and breaktabs will appear in the upper-right area under "Boards".

10. Export a new set of gerbers file for the panel with File -> Export Merged Gerbers.

11. Check the exported Gerbers.

12. Check the exported Gerbers again.

13. Check the Gerbres--three times the charm.

I use Dirty PCBS to build the panelized boards and they accepted it without any issues (probably because it is automated).  I had attempted a panelized board with another Chinese board house that heavily advertises $15 boards, but was surprised at checkout when the price was increased to $62. No thank you.


Update 6/6/18: This is what was received from Dirty PCB (after a lost package and an expedited reorder)