1gerbv(1)                             2.9.8                            gerbv(1)
2
3
4

NAME

6       gerbv - Gerber Viewer
7

SYNOPSIS

9       gerbv [OPTIONS] [gerberfile[s]]
10

DESCRIPTION

12       gerbv  is  a  viewer  for  RS274-X,  commonly  known  as Gerber, files.
13       RS274-X files are generated from different PCB  CAD  programs  and  are
14       used  in  the  printed circuit board manufacturing process.  gerbv also
15       supports Excellon/NC drill files as well as XY  (centroid)  files  pro‐
16       duced by the program PCB (http://pcb.geda-project.org/).
17
18

OPTIONS

20       Warning!   On  some platforms, which hasn't long option available, only
21       short options are available.
22
23
24   gerbv General options:
25       -V|--version Print the version number of gerbv and exit.
26
27       -h|--help
28              Print a brief usage guide and exit.
29
30       -b<hex>|--background=<hex>
31              Use background color <hex>. <hex> is specified as an  html-color
32              code, e.g. #FF0000 for Red.
33
34       -f<hex>|--foreground=<hex>
35              Use  foreground color <hex>. <hex> is specified as an html-color
36              code, e.g. #00FF00 for Green. If a user also wants  to  set  the
37              alpha (rendering with Cairo) it can be specified as an #RRGGBBAA
38              code. Use multiple -f flags to set the color for  multiple  lay‐
39              ers.
40
41       -l <filename>|--log=<filename>
42              All error messages etc are stored in a file with filename <file‐
43              name>.
44
45       -t <filename>|--tools=<filename>
46              Read Excellon tools from the file <filename>.
47
48       -p <project filename>|--project=<project filename>
49              Load a stored project. Please note that the project file must be
50              stored in the same directory as the Gerber files.
51
52
53   gerbv Export-specific options:
54       The following commands can be used in combination with the -x flag:
55
56       -B<b>|--border=<b>
57              Set  the  border  around  the image <b> percent of the width and
58              height.  Default <b> is 5%.
59
60       -D<XxY>or<R>|--dpi=<XxY>or<R>
61              Resolution (Dots per inch) for the output bitmap. Use <XxY>  for
62              different  resolutions  for the width and height (only when com‐
63              piled with Cairo as render engine). Use <R>  to  have  the  same
64              resolution  in  both directions.  Defaults to 72 DPI in both di‐
65              rections.
66
67       -T<XxYrR|X;YrR>|--translate=<XxYrR|X;YrR>
68              Translate image by X and Y and rotate by R degree. Use  multiple
69              -T  flags  to  translate  multiple  files.  Distance defaults to
70              inches but may be changed with --units.  Only evaluated when ex‐
71              porting as RS274X or drill.
72
73       -O<XxY|X;Y>|--origin=<XxY|X;Y>
74              Set  the  lower  left corner of the exported image to coordinate
75              <XxY>.  Coordinates defaults to inches but may be  changed  with
76              --units.
77
78       -a|--antialias
79              Use antialiasing for the generated output-bitmap.
80
81       -o <filename>|--output=<filename>
82              Export to <filename>.
83
84       -u<inch/mm/mil>|--units=<inch/mm/mil>
85              Use given unit for coordinates. Default to inches.
86
87       -W<WxH>|--window_inch=<WxH>
88              Window size in inches <WxH> for the exported image.
89
90       -w<WxH>|--window=WxH>
91              Window  size in pixels <WxH> for the  exported image. Autoscales
92              to fit if no resolution is specified (note that the  default  72
93              DPI also changes in that case). If a resolution is specified, it
94              will clip the image to this size.
95
96       -x<png/pdf/ps/svg/rs274x/drill>|--export=<png/pdf/ps/svg/rs274x/drill>
97              Export to a file and set the format for the output file.
98
99
100   GTK Options
101       --gtk-module=MODULE Load an additional GTK module
102
103       --g-fatal-warnings
104              Make all warnings fatal
105
106       --gtk-debug=FLAGS
107              GTK debugging flags to set
108
109       --gtk-no-debug=FLAGS
110              GTK debugging flags to unset
111
112       --gdk-debug=FLAGS
113              GDK debugging flags to set
114
115       --gdk-no-debug=FLAGS
116              GDK debugging flags to unset
117
118       --display=DISPLAY
119              X display to use
120
121       --sync Make X call synchronous
122
123       --no-xshm
124              Don't use X shared memory extension
125
126       --name=NAME
127              Program name as used by the window manager
128
129       --class=CLASS
130              Program class as used by the window manager
131
132

GENERAL

134       When you start gerbv you can give the files to be loaded on the command
135       line, either as each file separated with a space or by using wildcards.
136
137       The  user  interface  is  graphical. Simply press and drag middle mouse
138       button (scroll wheel) and the image will pan as you move the mouse.  To
139       manipulate  a  layer,  right-click  on one of the rightmost list items.
140       That will bring up a pop-up menu where you can select what you want  to
141       do with that layer (reload file, change color, etc).
142
143       If  you  hold the mouse button over one the rightmost button a tooltips
144       will show you the name of the file loaded on that layer.
145
146

ACTIVATION AND DEACTIVATION OF LAYERS

148       You can load several files at one time. You can then turn displaying of
149       the  layers on and off by clicking on one of check boxes near the layer
150       names.
151
152       You can also control this from the keyboard. Press Ctrl, enter the num‐
153       ber  on  the layer you want activate/deactivate on the numerical keypad
154       and then release the Ctrl key.
155
156

ALIGNING OF LAYERS

158       You can align two layers by selected elements. Select  one  element  on
159       each of two layers and click Align layers from context menu.
160
161

ZOOMING

163       Zooming  can  be  handled  by either menu choices, keypressing or mouse
164       scroll wheel. If you press z you will zoom in and if you press  Shift+z
165       (i.e.  Z)  you will zoom out. Scroll wheel works if you enabled that in
166       your X server and mapped it to button 4 and 5. You can make  the  image
167       fit  by pressing f (there is also a menu alternative for this). If Pan,
168       Zoom, or Measure Tool is selected you can press right mouse button  for
169       zoom  in,  and  if you press Shift and right mouse button you will zoom
170       out.
171
172       You can also do zooming by outline. Select Zoom Tool, press mouse  but‐
173       ton,  draw,  release. The dashed line shows how the zooming will be de‐
174       pendent on the resolution of the window. The  non-dashed  outline  will
175       show  what  you actually selected. If you change your mind when started
176       to mark outline, you can always abort by pressing  escape.  By  holding
177       down  the Shift key when you press the mouse button, you will select an
178       area where the point you started at will be the center of  your  selec‐
179       tion.
180
181

MEASUREMENTS

183       You can do measurement on the image displayed. Select Measure Tool, the
184       cursor changes to a plus. By using left mouse button you can  draw  the
185       lines  that  you want to measure. The result of the last measurement is
186       also displayed on the statusbar. All measurements are  in  the  drawing
187       until  you select other Tool.  To measure distance between elements se‐
188       lect two of them and switch to Measure Tool.
189
190       The statusbar shows the current mouse position on the layer in the same
191       coordinates as in the file. I.e. if you have (0,0) in the middle of the
192       image in the Gerber files, the statusbar will show (0,0)  at  the  same
193       place.
194
195

SUPERIMPOSING

197       When  you  load  several  Gerber files, you can display them "on top of
198       each other", i.e. superimposing. The general way to  display  them  are
199       that  upper layers cover the layers beneath, which is called copy (GTK+
200       terms).
201
202       The other ways selectable are and, or, xor and  invert.  They  map  di‐
203       rectly to corresponding functions in GTK. In GTK they are described as:
204       "For colored images, only GDK_COPY, GDK_XOR and GDK_INVERT  are  gener‐
205       ally useful. For bitmaps, GDK_AND and GDK_OR are also useful."
206
207

PROJECTS

209       gerbv  can  also  handle projects. A project consist of bunch of loaded
210       layers with their resp. color and the background color. The easiest way
211       to  create  a  project is to load all files you want into the layer you
212       want, set all the colors etc and do a "Save Project As...".
213
214       You load a project either from the menu bar or by using the commandline
215       switches -p or --project.
216
217       Currently there is a limit in that the project file must be in the same
218       directory as the Gerber files to be loaded.
219
220

SCHEME

222       The project files are simple Scheme programs that is interpreted  by  a
223       built  in  Scheme interpreter. The Scheme interpreter is TinyScheme and
224       needs a Scheme program called init.scm to initialize itself. The search
225       path  for init.scm is (in the following order) /usr/share/gerbv/scheme,
226       the directory with the executable gerbv, the directory  gerbv  was  in‐
227       voked   from   and   finally  according  to  the  environment  variable
228       GERBV_SCHEMEINIT.
229
230

TOOLS FILE

232       Not every Excellon drill file is  self-sufficient.  Some  CADs  produce
233       .drd  files where tools are only referenced, but never defined (such as
234       what diameter of the tool is.) Eagle CAD is one of such CADs, and there
235       are more since many board houses require Tools files.
236
237       A  Tools  file is a plain text file which you create in an editor. Each
238       line of the file describes one tool (the  name  and  the  diameter,  in
239       inches):
240
241            T01 0.024
242            T02 0.040
243            ...
244
245       These are the same tools (T01 etc.) that are used in the Drill file.  A
246       standard practice with Eagle is to create an empty Tools file, run  the
247       CAM processor, and the error report tells you which tools you "forgot".
248       Then you put these tools into the file and rerun the CAM processor.
249
250       You load a tool file by using the commandline switches -t  or  --tools.
251       The file can have any name you wish, but Eagle expects the file type to
252       be ".drl", so it makes sense to keep it this way. Some board houses are
253       still using CAM software from DOS era, so you may want to exercise cau‐
254       tion before going beyond the 8.3 naming convention.
255
256       When gerbv reads the Tools file it also checks that there are no dupli‐
257       cate  definitions  of  tools. This does happen from time to time as you
258       edit the file by hand, especially if you, during design, add or  remove
259       parts  from  the  board  and  then have to add new tools into the Tools
260       file. The duplicate tools are a very  serious  error  which  will  stop
261       (HOLD)  your  board until you fix the Tools file and maybe the Excellon
262       file. gerbv will detect duplicate tools if they are present,  and  will
263       exit  immediately to indicate such a fatal error in a very obvious way.
264       A message will also be printed to standard error.
265
266       If your Excellon file does not contain tool definitions then gerbv will
267       preconfigure  the  tools by deriving the diameter of the drill bit from
268       the tool number. This is probably not what you want, and you  will  see
269       warnings printed on the console.
270
271

PICK&PLACE FILE

273       Supported comma separated file (CSV) with fixed order of data:
274
275            # X,Y in mils.
276            Designator,"Description","Value",X,Y,"Rotation (deg)",top/bottom
277
278            or
279
280            Designator,"Footprint","Mid X","Mid Y","Ref X","Ref Y",
281                      "Pad X","Pad Y",T/B,"Rotation","Comment"
282
283       Units can be specified in format "# X,Y in mils." or as suffix for X/Y-
284       coordinates, i.e ",10mil,". Supported units: in, mil, cmil,  dmil,  km,
285       m, dm, cm, mm, um, nm.
286
287

ENVIRONMENT

289       GERBV_SCHEMEINIT
290              Defines where the init.scm file is stored. Used by scheme inter‐
291              preter, which is used by the project reader.
292
293

AUTHOR

295       Stefan Petersen (spetm at users.sourceforge.net): Overall hacker and project leader
296       Andreas Andersson (e92_aan at e.kth.se): Drill file support and general hacking
297       Anders Eriksson (aenfaldor at users.sourceforge.net): X and GTK+ ideas and hacking
298
299
301       Copyright ©  2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Stefan Petersen
302
303       This document can be freely redistributed according to the terms of the
304       GNU General Public License version 2.0
305
306
307
308Version                          Jule 13, 2013                        gerbv(1)
Impressum