If you are using the built in IDE (Press F5 to get it), then there are two toolbar buttons with tiny short or long green arrows -- to step into or over blocks. Just like pdb. You can also press F10 or F11.
Here's a starting point. Click on the polygon and run this script in the IDE (press F5 to get the IDE). It simply grabs the points of the polygon. The other functions you mention are certainly possible. For (b), I'd make an array of the xy coordinat…
It has always worked for me. Perhaps you have a setting set wrong. For example when you go File > Save As, there is a dropdown "Layers to save", which should be "All". That might be set to "Visible layers only". Or t…
Outputting a text file from Ruby can be done in several ways -- search google for other examples if the below doesn't suit.
I will also note that there is a relatively easy way to just get a hash with all of the variables in it. So, if in your code…
There are a few ways
One way is:
* Right click layer 1 in the layers list, Hide.
* Make sure you are viewing the top cell, and press F2 to see all of it. Also press asterisk to show full hierarchy.
* F3 > Select top level objects only: No (fals…
The GSiP should be able to be made to work. However I'll mention here what I used to do for this issue. Basically: take each component (like a 1x2 MMI) and add waveguides to it, one time, that routes from the inputs/outputs out to a regular grid. Th…
Macros > Macro development (F5)
http://www.klayout.de/doc-qt4/programming/index.html
In KLayout version 0.25.x there is another (slightly more complicated way) to do coding by creating standalone (or dependent) packages
http://www.klayout.de/p…
Thanks Matthias,
Yep I can create issues on the GitHub project in future for things like this. I didn't realize that was the preferred method but it makes sense.
2) Weird -- still doesn't work for me. No big deal, let me poke around some more and …
Another few minor issues:
1) You've added new rulers (Cross, Measure, Ellipse, Box). However rather than appending to my existing list of rulers that I use, it overwrote them. Not a big deal as I can set them up again but worth noting.
2) In Setti…
Fantastic! Starting to play with the package manager now.
I did observe something unusual during installation though. On Windows 10 64 bit, in the past if version 0.x.y was installed (in the default location of C:\Program Files\KLayout) and you wan…
I don't know of a direct answer to your question, but I'll just point out something. This may already be obvious, but in case not --
The same can be achieved with two (or more) overlapping shapes. Let's say you have a rectangle with three large rad…
Paste the code below to new .lym file and choose Run On Startup. The code is really basic and doesn't do anything more than simple 90deg bends, and gets confused if it is fed non-manhattan geometry. You can expand it to do sine bends or whatever, if…
I see. You want to have an arbitrary number of layers. I was thinking you wanted to "bake", say, 3 layers in to the code. If you can bake 3-4 layers in to the code I'd recommend that because it's easier (just a few lines added to my code a…
Here you go. I warn you the code is ugly and definitely not my best work...
I just realized that my code is ruby while you have been using python. Anyway I hope it's helpful.
Also you said you think you can't use PCell to implement an arbitrary nu…
bruxillensis,
Perhaps you know but I'll point out that some of the functionality you require is built-in. Draw a path, then choose Edit > Selection > Convert to PCell > Basic.ROUND_PATH. To modify the path after that, choose the Partial to…
I believe GDS spec doesn't allow a string in the Key field.
If you repeat your steps but put
#3
as the Key, and
lukas
as the Value, it will work. The hash or pound mark in front of the number 3 means treat it as an integer.
Still, perhaps this…
Minor point to add (correct me if I'm wrong Matthias):
One might read Matthias's comment to say that you can't use OAS to create a static library in this manner, but you can. He was just saying that in GDS2 you can define a custom library name inde…
If you installed as administrator, the libraries folder you seek is under C:\Users\username\Klayout. If you didn't install as administrator I think it is somewhere funny like C:\Users\username\Appdata\Local\Klayout..... Or something. You are correct…
Something to help you get started.
The line that makes the image is
img = RBA::Image.new(ncolumns, nrows, data)
Look at the class Image under Public Constructors. The above is using the fourth version of the constructor listed there, because it h…
Your script does work for me, but you have to zoom far in. Because your line is 20 nanometers not 20 microns as I assume you meant. You have to divide by the database unit. Personally I think of all the numbers in microns and do all the calculations…
Wow, thanks Matthias, that seems great!
I can't get it working yet though -- it complains on the line that has RBA::Vector -- and I don't see a "Vector" class in the API. Probably this is some upcoming API feature that you haven't release…
Thanks Matthias,
I do indeed see now that your DXFs do import into other tools, so it is a fault of poorly-documented DXF format and inconsistent interpretation.
Thanks anyway for taking a look.
An SVG exporter would be a nice feature
Thanks,
Da…
Thanks Matthias,
You are right, in this case it's easier to code a circle myself. I was more reporting what I thought was a strange behavior, and unsure of where else (in more complicated scenarios) it would show up.
I see now I was using the wron…