Hi,
In the menu are the options "add", "merge", "erase", "mask" and "diff" for polygons.
For "merge" I use:
edge = EdgeProcessor.new
edge.simple_merge_p2p([polygon_1, polygon_2], false, false, 1)
For "diff" I use:
edge.simple_merge_p2p([polygon_1, polygon_2], false, false, 0)
For "mask" I use:
edge.simple_merge_p2p([polygon_1, polygon_2], false, false, 2)
I couldn't figure out how I can get "erase" to work. Is it possible with the same "simple_merge_p2p" or something completely different?
Thanks
Stefan
Comments
Not sure if this is what you want but there is an erase method in Shapes. http://klayout.de/doc/code/class_Shapes.html
So you could do
Hallo,
"erase" in the menu is basically a boolean "not", "mask" is "and" and "diff" is "xor".
Is that comment helpful?
Matthias
Here's one more comment:
The boolean operations are available with EdgeProcessor#boolean_p2p:
It's worth a note that using the boolean operations has some advantages over "simple_merge". The boolean operations will normalize self-overlapping regions of the original polygons automatically for example.
Matthias