About PCB milling
One of the most practical and popular ways of producing printed circuit boards (PCBs) at home is to machine them on a small CNC mill such as those sold by sherline.com, or a scratch-built equivalent. Essentially one just engraves the desired traces onto cheaply available copper-clad PCB blanks.
For more information, check out the Wikipedia article on PCB Milling.
pcb2gcode is a command-line program that calculates machine toolpaths from given PCB layouts.
Despite it's name, it does NOT accept unix "pcb" files, but standard gerber RS274-X and Excellon files, and creates fully EMC2-compatible RS274-NGC files.
pcb2gcode (up to 0.4.5) is rooted in gerber2gcode, which was almost entirely rewritten by Jeff Prothero aka Cynbe ru Taren in late 2008.
In spring 2009, the project was moved to SourceForge by Patrick Birnzain, who rewrote the program entirely in C++ in 2010 and released it as pcb2gcode-1.0.
There are a few pictures of stuff made using pcb2gcode on our Pictures page.
- comprehensive, but simple and easy to use command-line interface
- full support for milling and drilling single- and double-sided boards
- generates code for cutting out boards of arbitrary shape
- automatically resolves clearance issues
- can calculate voronoi regions from regular PCBs
- supports machines with and without spring loaded end mills or depth stops
- output can be adjusted for automated height probing, see http://www.cnczone.com/forums/showthread.php?t=82628
Downloading & Installing
pcb2gcode requires libgerbv, a part of the gerbv gerber file viewer.
Since gerbv doesn't run on Windows at this point, pcb2gcode doesn't either.
The pcb2gcode source is available via git and as a tarball.
Command to clone the git repo: git clone git://pcb2gcode.git.sourceforge.net/gitroot/pcb2gcode/pcb2gcode
The source from the file download can be compiled and installed via the usual "./configure && make && make install" routine, while the source from the git repo requires autotools, as it does not contain many autogenerated files.
Please report any issues to the mailing list.
run "pcb2gcode --help" for a complete list of all parameters.
If you place a file named "millproject" in the directory you run pcb2gcode from (probably where you have the gerber files you want to process), parameters are read from that file too. Command-Line options override those in the config file.
An example millproject file is provided with the source code.
How to help
As always, pcb2gcode needs a lot of testing.
If you find any bugs, please report them to email@example.com or add them to our Bug Tracker.
The wiki still needs some work, and a short tutorial would be very nice to have.
Contributions of all sorts are most welcome.
How to get help