The gdscomp Boolean Engine

The gdscomp program is designed to perform boolean operations on polygon data in certain type of GDSII files. It can perform the basic boolean commands: union, and, XOR, minus.

gdscomp assumes that the GDSII file contains a structure, which is replicated many times in such a way that each polygon in the file belongs to some instance of the structure. This is true for XOR, And, minus - union operations will work on all type of files.

The output file will keep the hierarchy which will result in a small GDSII file. This is unlike the standard qckbool engine which flattens the data and may create GB'S of flat data.



Examples

Suppose your input file is input.gds and the output file is output.gds. 
If you wish to run intersection (and) of layers 21 and 60 such that the 
result should be displayed on layer 80 then the command line is...

gdscomp input.gds output.gds +21+60 -a:80

Here -a:80 means that the result of intersection (and) should be on layer 80. 



If you wish to run xor of layers 21 and 60 such that the result should be 
on layer 80 then the command line is...

gdscomp input.gds output.gds +21+60 -x:80



If you wish to run difference (minus) of layers 21 and 60 such that the
result should be displayed on layer 80 then the command line is...

gdscomp input.gds output.gds +21+60 -m:80



The operations xor and intersection (and) are symmetric with respect to the
first and second operands, i.e. the result of

gdscomp input.gds output.gds +21+60 -a:80

and

gdscomp input.gds output.gds +60+21 -a:80

should be the same for xor. 
However, the difference is not symmetric with respect to the operands.


gdscomp input.gds output.gds +21+60 -m:80

means that you subtract 60 from 21 while

gdscomp input.gds output.gds +60+21 -m:80

means that you subtract 21 from 60. In general the results are of course
different.