PCB2GCODE(1) | General Commands Manual | PCB2GCODE(1) |
pcb2gcode - command-line tool for engraving PCBs using CNCs
pcb2gcode [options]
This manual page documents briefly the pcb2gcode command.
pcb2gcode is a program that takes the files typically produced by PCB (printed circuit board) designing tools, in particular Gerber (RS-274X) and Excellon (an RS-274C variant) files as parsed by gerbv, and produces files that can be used to control a CNC (computer numerical control) milling machine. These files are in G code format (RS-274D/NGC) that can be read, for example, by the linuxcnc EMC2 system.
When these files are executed, an engraving bit is used to remove the surface from a copper covered circuit board, thus creating isolated areas. In another step, holes are drilled into the board at the appropriate positions, and it can be cut out in another step. (For each step, a separate output file is created.)
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below.
Instead of passing all options on the command line, nearly all options can be stored in a file named millproject. There, options are given one per line as option=value pairs (without the two dashes), and can be separated by blank lines and commented (everything after a `#` character is treated as a comment). Options that don't take an argument (like --metric) are entered as option=1 there.
Unless configured otherwise, numeric values are in units of inch and inch/minute. When the --metric option is given, they are in mm and mm/minute.
For every option --x that takes a filename, there is an --x-output option that specifies where the resulting G-code is saved, defaulting to x.gbr. Instead of giving each output file name, the --basename option can be used; the base name will be used as a prefix to the default output file names.
The parameters that define engraving are:
If this distance can't be satisfied because copper areas are too close, a warning will be printed and the line will be drawn between the areas. This behavior can be used to get voronoi-style (flood-filling) areas; simply set the offset to a large value (like 1 inch).
For each extra pass, engraving is repeated with the offset width increased by half its original value, creating wider isolation areas.
The parameters that define outline cutting are:
Drilling takes another set of options:
These options govern the general behavior of pcb2gcode:
The only options that can't be used in the millproject file are the common ones:
For further information about pcb2gcode, see the project wiki ⟨URL: http://sourceforge.net/apps/mediawiki/pcb2gcode/ ⟩.
pcb2gcode was written by Patrick Birnzain, loosely based on an earlier program of the same name by Jeff Prothero (Cynbe ru Taren), which in term was based even more loosely on Matthew Sager's gerber_to_gcode.
This manual page was written by chrysn <chrysn@fsfe.org> for the Debian project (and may be used by others).
2010-11-10 |