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…
Hi Dirk,
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 …
Hello,
You can use layers.each:
report("on grid")design_grid = 0.1layers.each { |layer| input(layer).ongrid(design_grid).output("#{layer.to_s}_on_grid", "#{layer.to_s} grid violations")}
Cheers,
Tomas
Hello,
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…
Hello,
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?
Here is…
Hello,
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?
2) H…
Hello,
Please ignore the question above. An old discussion explains this very well: https://www.klayout.de/forum/discussion/334/inputdialog-with-multiple-input-fields
Cheers,
Tomas
lol... For design report purposes, this ground plane might be a bit distracting, that's all... It will be my pleasure to include the watermark in all the screenshots... :blush:
Cheers,
Tomas
Hi Weiling,
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…
Hi Weiling,
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…
Hi,
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…
Hi Matthias,
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…
Hi Matthias,
1) It works fine in Python, but I can't make it work in Ruby:
RBA::Application.instance.main_window.menu_symbols
Error > private method `menu_symbols' called for #
2) Ok, good to know
Thanks again...
Cheers,
Tomas
Hello Matthias,
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…
Hi,
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…
Hi,
You can achieve this by selecting the path and then: Edit > Selection > Round Corners > Outer Corner Radius = half of your path width, Inner Corner Radius = 0. It will indeed be automatically converted to a polygon.
Cheers,
Tomas
Hi Weiling,
You cannot mix Ruby and Python within a script, but it looks quite similar, just drop the ".new":
box = DBox.new(-0.5*(arm_length-taper_l), -0.5*(arm_length-taper_l), +0.5*(arm_length-taper_l),+0.5*(arm_length-taper_l))
Chec…
Hi Weiling,
Why don't you use only DPoint, DBox and DPath??? No need to convert taper_l and arm_length to number of DBU equivalents...
box = DBox.new(-0.5*(arm_length-taper_l), -0.5*(arm_length-taper_l), +0.5*(arm_length-taper_l),+0.5*(arm_length…
Hi,
You just have to make these instances refer to your "DummyDIE" cell...
if instance_distance > wafer_size/2.0 instance.cell=layout.cell("DummyDIE") end
Cheers,
Tomas
Hi Matthias,
I was trying the code at the top of the post above, and I noticed that, if the viewed cell:
1) contains instances and shapes > _duplicate cell is ok, contains both instances and shapes
2) contains only instances > _duplicate ce…
Hi Tristian,
layer3 = layer1.and(layer2)
layer3.area gives the total area
layer3.with_area(nil, value) selects all polygons with an area below "value"
Cheers,
Tomas
Hello,
You can do that easily in the DRC environment (Macro Development > DRC):
https://www.klayout.de/doc-qt5/manual/drc_basic.html
https://www.klayout.de/doc-qt5/about/drc_ref_layer.html#h2-1534
layer.merge([overlap_count])
Cheers,
Tomas
Hi Advait,
You can make the "wafer_size" variable slightly smaller than the exact wafer size to avoid bumps being placed on top of the physical wafer edge... Or add an additional variable "offset_from_wafer_edge" and then use &q…
Hello,
For a circular "wafer" region it is very easy: just check the distance of the "bump" cell instance origins.
The code below only works if the "bump" cell instances are on the top level (if not, you can add some c…
Hi Allon,
I tried some things: dd_45 and ee_45 don't work, but ff_45 seems to work. It looks like the length is rounded to the nearest DBU?
Cheers,
Tomas
active=input(9,0)aa_45= active.edges.with_angle(45.degree) + active.edges.with_angle(135.de…