oasis2gbr web page logo

Repetition Optimization

When converting from GDSII/OASIS to Gerber the output file size can often be reduced if we take advantage of Gerber's SR (step and repeat) command. This allows us to define a number of draw commands and then "step" them in a 1D or 2D array.

However one cannot blindly map GDSII arrays or SREFS into SR commands unless one has checked that there is no "interference" from data drawn in the same location from other levels of the hierarchy.


Command Line

The -nocompress option turns off the function to identify and use SR for repetitive input data. If this argument is not present, the program's default behavior is -compress which attempts to identify repeating data.


Why Turn it Off?

There is a compute cost to searching and checking the input file repetition. If conversion time becomes an issue using the -nocompress flag will result in faster conversion.


Compression Modes

When compress is in effect (and by default it is turned on) there are two distinct modes that are possible: -mode:speed and -mode:compact.

If no mode is specified on the command line then -mode:speed is the default behavior. This mode relies on the hierarchy used in the GDSII file to determine the likely compression for the Gerber output.

If your GDSII file has spatially repeating polygons (i.e. identical polygons that are spaced equally) but that repetition is not achieved by SREF or AREF placements, the you can use the -mode:compact argument to force the program to examine the polygons in detail and look for repeated placements. Note that the compact mode can take a very long time to run; in general, it is better to specify -mode:speed (or nothing at all since speed is the default). In fact, when mode speed is in effect, it will automatically use the compact mode to investigate inside cells to see if additional compaction can be achieved.