new_title.gif

How to Offset GDSII Coordinates

revised October 14, 2016
Steve DiBartolomeo

GDSFILT can be used to offset the origin of a GDSII file. We can't do that with a direct command but we can "add" our file to an empty one and place it with the desired offset.

demo5.gds before offset
Figure 1: the extents of demo5.gds before we offset them.


In the example below we use GDSFILT to offset demo5.gds by 3000,3000 microns by adding it to dummy GDSII file called empty.gds, and saving it to an output file called demo5_offset.gds with a top cell called OFFSET_TOP. We're using a command line as shown below:


C:\wcad\Gdsfilt\gdsfilte.exe             gdsfilt engine

    empty.gds                            input file (actually empty but sets our reference)

      demo5_offset.gds                   output file 

       EMPTY                             use top structure of input file. You could use =
                                         here if you don't know the empty.gds top struct name.

        -unixcmdline                     you need this option on Windows/not on Linux

         -add demo5.gds                  now we're adding this file to our empty one

           -combine                      using the "combine" option

            OFFSET_TOP                   this is the top level structure of the output file

             DEMO5TOP                    top cell name of demo5.gds

               -offset 0,0 3000,3000     empty.gds gets no offset
                                         demo5.gds gets 3000,3000 offset

Results

offset.gds inserts demo5.gds at 3000,3000 um
Figure 2: our "new" file's coordinates are offset by 3000, 3000 in X and Y.



Sample Files

We provide both an "empty GDSII file" (in microns and grid of 1000) and a small chip called demo5.gds. The empty file and the file you want to offset must share the same units and grid.

empty.gds 2048 bytes

demo5.gds.zip 227KB zipped


Summary

This "offset" does not actually recompute and change any of the original file's coordinates. Instead, it creates a new top level structure with two cells underneath it -- the empty file and the original file (which we added in combine mode). However the original file is placed with the offset we specified - in this case an additional 3000,3000 um.


   OFFSET_TOP
   |
   +---EMPTY_0   (placement at 0,0)
   |
   +---DEMO5TOP  (placement at 3000,3000)