Hi,
I have scripts to input .CIF and other formats, and stream to .GDS.
Now between the input and output, I'd like to do a boolean operation on layers in the file.
Perhaps more clearly:
1) I have a file named filename.CIF or filename.GDS. It has a single cell named cellname. This cell has a rectangle on layer 1 and an overlapping circle on layer 2.
2) I open it using a ruby script
3) Now I want to do Add, Subtract, And, Or, Xor, etc to the two layers 1 and 2 on cellname. Knowing how to do Grow/Shrink would be nice too.
4) Finally, I stream to GDS.
It's step 3 I'm asking about -- how to write ruby script to do this in batch mode.
Thanks
David
Comments
Hi David,
this is a job for the layer processing framework http://www.klayout.de/useful_scripts.html#layer_proc.rbm. The ruby module itself contains some documentation about how to write processing scripts.
Although it is intended as an interactive functionality, you can use it in batch mode with some additional scripting.
Once you have installed the layer_proc.rbm file (i.e. by copying it to the installation path of your klayout executable), you can use the layer processing framework in batch mode using this batch script:
Please note, that you cannot use the "report" statement in your layer processing script.
Regards,
Matthias