GDS II Viewer Documentation

This is a simple viewer for the ``Stream Format'' for CALMA GDSII CAD
libraries (``GDS II'', ``.gds'' or ``.sf'') with a couple of
limitations (see the Bugs section). The main
functionality is viewing the library layers with different colors
and to export the view to different image formats.

Some settings can be changed by editing ~/simplegdsview.cfg,
which is self-explanatory ;-). The first time you start the
program, you can choose to create it from the default settings. You
can also change the settings by saving the changes you make during use
of the program with the Save Settings
button.

Save Image lets you choose a graphics file format and a
file to store the currently viewed image in.

Print (Alt+p) is a (not so flexible) way to send the
image directly to a printer. You should almost certainly save your
image in your favourite format and use a graphics image tool for this
instead. Or, even better, use the ``Postscript
Export''

Postscript Export
lets you export the library to postscript for printing in vector
format with controlled scale. The polygons are filled/ outlined with
the colour from the layer settings. Only the layers currently ``On''
are exported. (These things are good to know in advance if you plan to
make a cheap-ass photo-mask with your printer on OH-foil.) In other
words, you can manipulate which layers are exported (through the
``Layers'' dialogue) and the ``filling'' of
polygons but not the ``filling'' of paths.

Settings (Alt+s)
starts the ``Viewer Settings'' dialogue with
the current settings (below). If the dialogue is open (visible) the
settings in the dialogue are discarded and the current viewer settings
are loaded instead.

Help
sends a command to start up a browser to view this file. You can
change the command with ``Help Browser'' in the
``Settings'' dialogue.

The Control Pad window:

In the Current Structure ``list-box'' you can select the
current structure to view from the library.

Direction buttons move the window 1/4 of the currently viewed area in
their respective direction (over the CAD -- think of it as a camera
over a map).

The Home button moves the window to the center of the current
structure and re-scales to fit it within the window.

The Magnification slider shows/ changes the magnification. In
addition to using the ``pointing device'', the magnification can also
be changed in tiny steps with the arrow keys. PgUp/
PgDn changes it in larger steps. (You might need to press
``tab'' to ``focus'' the slider before using the keys, though.)

Instant Redraws toggles whether a change in the
settings should cause a redraw (see (Redraw).

Draw Layers Ordered toggles whether drawing
should be done in the order specified in ``Layers''
Dialogue (below) or structure-by-structure (which is at
least 20-30% faster). Initiates a redraw (see
Redraw above).

Redraw causes the image to be updated using the current
settings. Executing this is a complete waste of time if
``Instant Redraws'' is on.

The Settings dialogue:

The Save Settings button saves the current state to
~/simplegdsview.cfg.

The Load Settings button loads settings from
~/simplegdsview.cfg. This can be handy if you want to change
settings by editing that text-file instead of using the GUI. It might
be that some settings can only be changed there too...

The Background button lets you change the color of the
background.

The Help Browser button is for changing the command to start
a browser to view this file (by pressing
``Help'' (above). Usually it's enough to just
state the name of the executable (e.g. 'netscape'), but some browsers
might work (better) if some switches are specified.

The OK button applies the settings from the dialogue and
hides it.

The Apply button applies the settings from the dialogue but
leaves it visible.

The Cancel button discards the setings in the dialogue and
hides it.

The Layers dialogue:

The All Layers On button turns on drawing for all layers that
have ``elements'' in the currently viewed ``structure'' (or possibly
the whole library -- not entirely sure).

The All Layers Off button turns off drawing for all layers.

The GDS II Layer list-box shoes the current settings for each
layer. The order in the list is used when ``Draw Layers
Ordered'' drawing layers from bottom to top of the
list.

The Layer On button turns drawing of the current layer on.

The Layer Off button turns drawing of the current layer off.

The Fill/ Outline-toggle decides whether polygons
(BOUNDARY-elements) in the current layer should be filled or outlined
when drawing. (Wires (PATH-elements) are always ``filled''.)

Too slow! But this is (afaik) the penalty for using Qt's windowing
widgets for X rather naively. I believe they are intended for
GUI-graphics and not this type of demanding graphics
applications. There may be some stupid things in the code
too. ;-) The use of virtual methods...

Paths are always filled (even when ``Fill
Polygons'' is off for the layer). The penalty for
using
Qt::QPainter::drawPolyline() instead of converting it to a
polygon (which can be a bit of a hassle)...

There is a lot of stuff in the GDS II-format that isn't
implemented. Some examples are:

Drawing of TEXT elements and all that comes with it.

Absolute magnification, absolute rotation and absolute reflection
(i.e. everything in STRANS except reflection). Negative value
of WIDTH as absolute width. I really don't see the
point of these anyway - Don't use them!

Rounded PATH-ends will not influence PATH-corners. I don't
know if this is according to the standard or not. I have seen both
implementations in other software and can't find any decisive answer
in the spec. I have.

REFLIBS.

Structures with coordinates far apart compared to the viewing window
may be misrepresented due to coarse rounding for X's 16bit
coordinates.

Zooming and measuring lacks those nice help-lines other programs
have. It is especially a drawback for the ``measure'' functionality,
because a click is not registered if the mouse moves (ever so
slightly) when clicking and there is no feedback of this (not
happening) to the user until the next click, when the user expects the
second measurement point but is actually only registering the first.