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…
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
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…
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 …
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:
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…
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…
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…
You need to update the transformation "t" by adding ".to_i" twice:
t = Trans.new((x[i]/dbu).to_i,(y[i]/dbu).to_i)
I had to do this in some very old scripts of mine as well, which worked in the past, but due to one of …
You cannot merge cells, only shapes, so you have to flatten your instances first (Pcells and static cells):
1) Select the instances > Edit > Selection > Flatten instances
2) Select the shapes > Edit > Selection > Merge sha…
I dug a bit deeper in the Qt designer and it works all nicely but I still cannot make the cancel button to work (the rest of the script is still run). See the code below. I also attached the .ui file. Any idea how to get it working?
I just started to look into the QDialog magic. The last script from Laurent is very interesting. I've got two questions though:
1) How to add a "Cancel" button, and how to put it on the same line as the "OK" button?
You should "refuse" such kind of designs, they cause a lot of troubles...
Once you merged the polygons, maybe you could iterate over the points of the new polygons by script: look at ΔX and ΔY of two adjacent points and when i…
The snapping grid is used when drawing new shapes or moving existing shapes. Normally it is the global grid, but you can quickly override it by defining an "Other grid...". Putting the "Other grid..." to 0.001 does n…
In your case, the "v1" cell should contain your via on layer 1/0, and a square on layer 2/0 (boundary layer). The layer 2/0 square defines the via pitch so it should be larger than your via size. The "Fill Cell margin" field…
Thank you for the explanation. I'm probably trying to use the "All net" extraction for something it is not supposed to be used for: check open nets and shorted nets between the probe pads and the devices under test, where the…
1) It works fine in Python, but I can't make it work in Ruby:
Error > private method `menu_symbols' called for #
2) Ok, good to know
Thank you! It works great...
1) How do you use "menu_symbols" to obtain all symbols?
2) If the "call_menu" pops up a window (like "cm_lv_rename_tab" for example), is there a way to fill in the field a…
1) snap to grid: you can set your snapping grid via menu:
Edit > Editor Options > Snapping > Grid "Global grid" (or "Other grid")
I normally define a wide range of default grids (global grid) in the setup, someth…