After setting up a new python environment and freshly installing KLayout - it works. I assume the problem got patched somewhere along the way, as I was using an older version.
However the second problem, with images showing to many layers still exi…
Hi, @RawrRanger,
thanks a lot for the incredibly extensive answers! :)
So if I understand correctly, the second parameter is only important the GUI and could likely be ignored in headless mode.
However, regading my original question - i'm still un…
Hi RawrRanger,
thanks for the tips. Your code did not execute. I changed it a little bit so it does and runs headless:
import pyaimport pathliblayout: pya.Layout = pya.Layout()layout.dbu = 1cell_index = layout.add_cell(f"box_1")layout.cel…
Wow! It works like a charm when i substitute with prune_cell(cell,-1). Thanks a lot @Matthias for your aid and continuous KLayout support!
You are absolutely right about the copying beforehand. I thought about this as well, but didnt like the idea …
@Matthias, thanks a lot for the wonderful response. I tried it, and it indeed passes my testcase.
However i also try to keep the input layout in its original form, therefore i have to delete (delete_cell_rec) the clipped top cells at the end.
The …
I somwhat solved this issue by creating the layers and shape containers by hand. However, I'm no longer able to reconstruct the original cell tree, because I'm using the Region API. This could be achieved by performing the clipping hierarchically as…
I observed more things.
If we save the layout before inserting the new layer, the shapes do indeed match.
clipped_layout.write("test.gds")clipped_layout = pya.Layout()clipped_layout.read("test.gds")
This is also the case if we…