Hello,
I want to write a program to make some boolean operations on multiple cells (helping "Ruby example for Layer Boolean Operations" Old Post) but when I run this (loop BoolProcessor instance on each cell), operations are applied on layers of the current cell and destroy layer data's of others cells.
How to apply recursive operations on each cell and create unique layer set?
Thank You
Comments
Hi romaxx,
you mean "EdgeProcessor", right?
I think it's the way the edge processor is used. Could you give some sample code?
Matthias
I use simple method in klayout-0.22.19 (old version).
First, you could download the layer_proc.rbm into klayout directory on the layer process framework: http://www.klayout.de/useful_scripts.html
Then, apply layer_proc.rbm script on klayout by command line:
klayout -rm layer_proc.rbm
Second, write a simple script names as booled.rbm in your subdirectory by text editor:
#----- start here ------------------------------
ac = input("1/0")
po = input("2/0")
nw = input("3/0")
pac = ac.and(nw).output("pac(1001/1)") #output for new layer
pac = nil # manual release memory to reduce RUBY resource comsuption in >1e7 polygons/layer design.
nac = ac.not(nw).output("nac(1001/2)")
nac = nil
gate = po.and(ac)
gateXtrim = gate.size(-0.1,0).size(0.1,0).size(0.1,0).size(-0.1,0)
gate = nil
gateXtrim.output("trimed gate(2000/0)") #output for new layer
gateXtrim = nil
# save to OASIS file
ly = BA::Application::instance.main_window.current_view.active_cellview.layout
fn = "trial"+".OAS.gz" # filename is trial.OAS.gz
opt = RBA::SaveLayoutOptions::new
opt.format="OASIS"
opt.oasis_compression_level=9
ly.write(fn, true, opt)
# Last, release all memories occpupation for next operation.
ac = nil
po = nil
nw = nil
# --------- end here ---------------
Third, go to menubar to select:
tools->process script->process script
Select the "booled.rbm" in your subdirectory to excute the RUBY macro Boolean operation and wait.
Final, system will show the dialog box to store the database. I don't know how to choice, I just press OK to close this dialog box.
The flat mode Boolean process speed is near 200-500 polygons per second per Boolean operations (and, or, not, size) in one core 2.9GHz CPU.
Hi arided,
thank you for mentioning this :-)
Matthias