File: pcb2gcode.1

package info (click to toggle)
pcb2gcode 1.1.4-git20120902-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,400 kB
  • ctags: 358
  • sloc: sh: 10,116; cpp: 2,335; python: 53; makefile: 43
file content (181 lines) | stat: -rw-r--r-- 6,608 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
.TH PCB2GCODE 1 "2010-11-10"
.\" Please adjust this date whenever revising the manpage.
.SH NAME
pcb2gcode \- command-line tool for engraving PCBs using CNCs
.SH SYNOPSIS
.B pcb2gcode
.RI [ options ]
.SH DESCRIPTION
This manual page documents briefly the \fBpcb2gcode\fP command.
.PP
\fBpcb2gcode\fP 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 \fBgerbv\fP, 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.)
.SH OPTIONS
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 \fImillproject\fP. There, options are given one per line
as \fIoption\fP=\fIvalue\fP 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
\fB\-\-metric\fP) are entered as \fIoption\fP=1 there.

Unless configured otherwise, numeric values are in units of inch and
inch/minute. When the \fB\-\-metric\fP option is given, they are in mm and
mm/minute.

.TP
\fB\-\-front\fP \fIfilename.gbr\fP
Engrave the front side according to the given file (typically used in two-sided
boards).
.TP
\fB\-\-back\fP \fIfilename.gbr\fP
Engrave the back side according to the given file.
.TP
\fB\-\-outline\fP \fIfilename.gbr\fP
Cut out the board to the shape exposed in the given file. Typically, there is
only a polygon in this gerber file. Alternatively, this file can contain a
closed line chain (see \fB\-\-fill-outline\fP).
.TP
\fB\-\-drill\fP \fIfilename.cnc\fP
Convert the given file (containing drill sizes and positions) to G-code.

.PP
For every option \fB\-\-x\fP that takes a filename, there is an
\fB\-\-x\-output\fP option that specifies where the resulting G-code is saved,
defaulting to \fIx.gbr\fP. Instead of giving each output file name, the
\fB\-\-basename\fP option can be used; the base name will be used as a prefix
to the default output file names.

.PP
The parameters that define engraving are:
.TP
\fB\-\-zwork\fP \fIunit\fP
Z-coordinate at which engraving happens
.TP
\fB\-\-zsafe\fP \fIunit\fP
Z-coordinate for movements between engraving steps
.TP
\fB\-\-mill-feed\fP \fIunit/minute\fP
feed rate at which engraving takes place (horizontal speed)
.TP
\fB\-\-mill-speed\fP \fIrpm\fP
spindle speed during engraving (rounds per minute)
.TP
\fB\-\-offset\fP \fIunit\fP
distance by which the tool movement will be outset from the contours in the
gerber file to be engraved

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).
.TP
\fB\-\-extra-passes\fP \fInumber\fP
number of additional isolation passes

For each extra pass, engraving is repeated with the offset width increased by
half its original value, creating wider isolation areas.
.PP
The parameters that define outline cutting are:
.TP
\fB\-\-cutter-diameter\fP \fIunit\fP
amount by half of which the tool path is outset from the shape in the outline
file
.TP
\fB\-\-zcut\fP \fIunit\fP
Z-coordinate indicating where the outline cutting ends
.TP
\fB\-\-cut-feed\fP \fIunit/minute\fP
feed rate at which outline cutting takes place (horizontal speed)
.TP
\fB\-\-cut-speed\fP \fIrpm\fP
spindle speed during outline cutting (rounds per minute)
.TP
\fB\-\-cut-infeed\fP \fIunit\fP
maximum Z distance that is cut away in a single pass (positive value; if less
then zcut's value, there will be more than one pass)
.TP
\fB\-\-fill-outline\fP
If \fB\-\-fill-outline\fP is given, it is assumed that the outline file
contains not a polygon but a closed chain of lines. The board will be cut along
the centres of these lines.
.TP
\fB\-\-outline-width \fIunit\fP\fP
thickness of the lines that form the outline (if \fB\-\-fill-outline\fP is given)
.PP
Drilling takes another set of options:
.TP
\fB\-\-zdrill\fP \fIunit\fP
Z value down to which will be drilled
.TP
\fB\-\-zchange\fP \fIunit\fP
Z-coordinate for movements with the drill head
.TP
\fB\-\-drill-feed\fP \fIunit/minute\fP
feed rate for drilling (vertical speed)
.TP
\fB\-\-drill-speed\fP \fIrpm\fP
spindle speed during drilling (rounds per minute)
.TP
\fB\-\-milldrill\fP
If \fB\-\-milldrill\fP is given, the milling head will be used to drill the
holes in the PCB. Holes up to the size of the milling head will be drilled
regularly (possibly creating a bigger hole than intended), the other holes are
created by moving the head in circles using the feed and infeed parameters used
in cutting.
.TP
\fB\-\-drill\-front\fP
use the coordinates of the front side for drilling instead of the coordinates
of the back side
.PP
These options govern the general behavior of \fBpcb2gcode\fP:
.TP
\fB\-\-dpi\fP \fIdpi\fP
resolution used internally (defaults to 1000)
.TP
\fB\-\-mirror-absolute\fP
mirror operations on the back side along the Y axis instead of the board
center, which is the default
.TP
\fB\-\-svg\fP \fIfilename\fP
export the resulting contours to an SVG (scalable vector graphics) file
.PP
The only options that can't be used in the \fImillproject\fP file are the
common ones:
.TP
.B \-?, \-\-help
Show summary of options.
.TP
.B \-v, \-\-version
Show version of program.
.SH SEE ALSO
.BR gerbv (1),
.BR pcb (1).
.br
.\" from man(7)
.de URL
\\$2 \(laURL: \\$1 \(ra\\$3
..
.if \n[.g] .mso www.tmac

For further information about \fBpcb2gcode\fP, see the
.URL "http://sourceforge.net/apps/mediawiki/pcb2gcode/" "project wiki" "."
.SH AUTHOR
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.
.PP
This manual page was written by chrysn <chrysn@fsfe.org> for the Debian project
(and may be used by others).