Hi Jim,
you can use master or any other branch, but without warranty.
The usual approach (and the one favoured by GitHub) is: features are developed in branches. When they are considered stable enough they are integrated into the master (pull request). Hence the master is kind of "latest greatest", but with a certain risk of being spoiled. There are also forks from other user with their own masters and branches. Don't confuse them with the ones from the KLayout project.
But eventually, when the master is considered to have a sufficient quality, a release is made by creating a release tag (https://github.com/KLayout/klayout/releases). A release is a snapshot which is then turned into Windows binaries, Linux packages, PyPI wheels etc. This this is a lengthy process and I don't want to do this too often.
Matthias
Hi Thomas,
if you don't care about where a cell is selected in the cell tree, you don't need to analyze the fill selected cell path. The last item is sufficient:
lv = RBA::LayoutView::currentcv_index = lv.active_cellview_indexly = lv.cellview(cv_i…
Hi Frank
you can also simple use a block instead of a proc:
mw = RBA::Application.instance.main_windowmw.on_current_view_changed do |last| puts "viewchanged #{last.inspect}"end
But you're right about the nil. The documentation was inco…
Hi Thomas
have you considered the instance browser for this case? Select a cell in the tree and use "Tools/Browse Instances" to get a list of cell placements and walk through that.
The highlight style follows the selection, but if that i…
@tagger5896 Thanks too for sharing this ... although I sense some frustration and I can't see your original post. I hope the issues have not been too severe.
Matthias
@acs Thanks for your nice testcase ... it was pretty simple to debug the issue.
It's actually a stupid bug. The compare algorithm sometimes enters an infinite loop when it encounters a case of two topologically equivalent (i.e. entirely parallel) s…
Here is some code for a plugin that drags a box:
# Register this macro as "autorun" to enable the plugin# This is the plugin implementationclass DragBoxPlugin(pya.Plugin): def __init__(self, view): super(DragBoxPlugin, self).__init__(…
@tiboy
The concept of KLayout does not include a right-click context menu. The mouse buttons are reserved for zoom, select and pan/zoom.
You can basically implement a right-click menu with a plugin, but doing so puts you outside the basic UI conce…
Hi Francesco,
please try with a name that includes the file type, e.g. "MEA60_RoutingCorrected.bmp".
If that does not work, you can also use ".png". It will be monochrome and I have made some good experience exporting really hu…
Hi,
thanks for the test case. I'll take a look.
Regarding your questions:
B. I don't want to maintain two ecosystems. One is already enough effort. And Ruby is better suited for a DSL, so no Python from my side. But the core API is available in P…
Please try "pip install klayout".
You can use "import klayout.db as pya" to get the "pya" namespace. But it will just provide you with the layout manipulation API.
Matthias
Hi,
you're right, the problem is to translate the data into a byte-string in Python. The Qt binding is somewhat aged and was created when there wasn't bytes() and strings have not been so picky about encoding.
Right now, the file save/read way is …
Hi Holger,
thanks for pointing this out. This is a flaw.
I'm afraid there is no workaround. I have created a ticket for this: https://github.com/KLayout/klayout/issues/707
Matthias
Okay.
What is available strongly depends in the Python version your KLayout instance comes with. If you want to have a specific version with specific capabilities, you'll need to build KLayout against it.
Another option is to use the klayout modul…
First: please format your code. This is hard to read. This forum supports Markdown and comes with a nice editor. So please use it (Paragraph Symbol - code).
Second: you cannot just put instances into a region. A region is for polygons. You cannot &…
Hi,
last question first: you can use Markdown here. My way to marking code is to separate code by a single like with three backticks.
Regarding the "_destroy" question: Basically you don't need to destroy objects at all. In Python and Ru…
@tagger5896
if you have GDS, layer names are not available in the layout, so they cannot be retrieved from the layout database. You'll need some translation table which you can derive from the layer table in the layout view:
ly = RBA::CellView.act…
Hi Thomas,
thanks a lot for letting me know and sorry for being somewhat unresponsive. I'm trying to finish the next major release.
You're right about the key/value problem. Maybe there should be a function to manipulate the key-bindings rather th…
@tagger5896 The only way is to create a custom dialog.
You'll need some Qt knowledge for this purpose. A good starting point is the "Qt dialog sample" you can select when you create a new macro in the IDE.
Matthias
Hi,
if you just use
for s in cell.each_shape(layer, pya.STexts): ...
you will get only the texts from this cell, not from the child cells.
You can limit the recursion depth of a RecursiveShapeIterator using "max_depth=...". A zero de…