Hi Frank,
Thanks for the reply. I added the reset but it doesn't change a thing.
I also ran the sample code listed in the documentation (https://www.klayout.de/doc-qt5/code/class_RecursiveInstanceIterator.html) on the attached gds file with top ce…
Hello,
@Matthias: since the ".raw" is behind ".extents" overlapping circles are flagged as should be.
The script below flags everything which is not a 2um circle:
layer1 = input(1, 0)
square_bboxes = layer1.extents.raw.squares
…
Hi Matthias,
Thanks for the clarification. "Weird" as in: I expected points with the same coordinates to snap to the same new point...
I'm not really that scared of scripting (anymore ;-), but many colleagues run away as fast as they can…
Hi Matthias,
Thanks for your reply!
I looked a bit deeper in the OAS file and noticed the same thing in the letter "P", where the two shapes are polygons, so still something weird going on with OAS format. So for now I suggest, without s…
Hi,
You could duplicate the cell you want to copy deep and all of its called cells as well. Then, inside these duplicated cells you make all the instances point to these newly duplicated cells... Not sure if there is a method who does this on the f…
Hi Kumaran,
Check out this link:
https://www.klayout.de/forum/discussion/comment/8606#Comment_8606
Note Matthias' comment about the definition of "emptiness"!
You can also use custom queries from the "Search And Replace" tool…
Hi Matthias,
Thanks a lot for the "dark mode" script! Personally, I prefer to use "dark mode" whenever it is available.
I noticed two things:
1) The top bar of the main window (with the menus) and the top bar of the layout pan…
Hi,
The main window instance can be obtained with: Application.instance().main_window()
import pyamw = pya.Application.instance().main_window()mw.create_layout(0)
Cheers,
Tomas
Hi jiunnweiyeh,
The points need to be instances of the Point (DBU units) or DPoint (um) class:
include RBA layout_view = Application.instance.main_window.current_view cell_view = layout_view.active_cellview layout = cell_view.layout viewed_c…
Hi jiunnweiyeh,
A path should have (at least) an array of points and a path width as parameters:
RBA::Path::new([point1, point2, point3, ...], pathwidth)
See also: https://www.klayout.de/doc-qt5/code/class_Path.html
Cheers,
Tomas
Hi,
You can run the script below after specifying the following variables:
instance_region_layer = "2/0"
regional_layer_sizing = 0.01
touching = false
resolve_arrays = true
I've also attached a small gds test case.
I would not use it f…
Hi,
It's quite simple to do using the method "is_empty":
module MyMacro include RBA layout = Application.instance.main_window.current_view.active_cellview.layout empty_cell_count = 1 layout.each_cell do |cell| if cell.is_empty …
Hello hwest,
The enclosing check works as intended...
If you would like the blue layer to be fully inside the red one with a margin you could check for:
blue_layer.outside(red_layer.sized(-sizing_value))
Cheers,
Tomas
Totally agree: there's no match for KLayout's .lyp format and Layer Window features... Take some time to look a bit deeper into it, it's worth it... :smiley:
Hello,
I like this concept and extended it a bit:
1) when there is only 1 lyp file in the layout directory, it will be loaded.
2) when there are multiple lyp files in the layout directory, and one has the same name as the layout file, it will be l…
Hello,
Not sure what is allowed but I would stick to alphanumeric characters and the underscore character "_", the same as for variables in Ruby...
Cheers,
Tomas
Hi Jack,
Here's a workaround that should work. The example below has 3 metal layers and 1 via layer which connects metal3 with both metal2 and metal1. Split the via layer in two layers, vias that stop on metal2 and vias that stop on metal1 using la…
Hello,
Indeed, you cannot draw perfect circles, only polygons with a specific number of vertices. Matthias' BASIC.Circle PCell does that: creating a polygon with a number of points (parameter) to come close to a perfect circle. The higher the numbe…