HI Newbeer,
Please refer to this post Create a Custom Library
https://www.klayout.de/forum/discussion/comment/10074#Comment_10074
To reuse a gds as Lib:
1. You need to specify a lib name for that particular gds while saving (like image below)
2. Y…
HI 14darcia,
Ruler and annotation currently does not have a shortcut setting avaliable in the customize menu page,
but we can always acess the menu items by macro and bind the macro to a hotkey like my previous comment.
For example we use edit_me…
HI ajaout,
Please format your code example using Markdown functuon, expecially for python code which requires correct indentation to work properly.
You'll need to put all shapes in given layers into a region and merge shapes to get an accurate res…
Hi Newbeer,
This behavior is related to the mode you choose, the drawing mode can be adjust from the toolbar.
Currently you are using erase mode, which removes shapes at the area you draw, click on the drop-down button next to the erase and change…
A de-chamfer process can be applied to avoid the rounding limitation issue from chamfered shapes
de-chamfered result, white dash-lines removes chamfering while preserves step like features.
(Image)
by filter out vertical, horiozontal and slant ed…
Hi jiunnweiyeh
There's a limitation for corner rounding radius, like you mensioned, if the size is smaller then the rounded value, the result will not be matched.
And round_corner cannot recognize chamfered corners, the two coner of this chamfered…
Hi zlnelson,
If traced by path is required, then you can tryout this example.
each_point type functions works like a python generator, you'll need to loop through them and collect all items into a list object before assigning to a DPath.
And each…
Hi jiunnweiyeh,
I've adjust the Min distance code based on Matthias suggestion, the only difference I've made is this section in epDistance.
if edge1.length == 0 or edge2.length == 0 return edge1.p1.distance(edge2.p1)
this length check…
Hi Riox,
If the structure always terminated/clipped at specific height, then you might need to call height(h) function at the beginning to adjust max ceiling height.
* default ceiling height is 2um
Hi jiunnweiyeh
The abs_distance provided from edge returns a minimum distance between point and given line which extends to infinity. Dependes on use case, you will need to add some conditions check to get what you want.
Here's an example of runni…
Hi jiunnweiyeh
cell.begin_instances_rec_overlapping returns a RecursiveInstanceIterator
which contains it's hier info from your current view cell to the end.
Following example provides the hier depth infor counting from current view cell, please n…
Hi jiunnweiyeh
CellView object cannot load files directly, use LayoutView load_layout() function instead.
** LayoutView can be created without the existance of mainwindow
example as below:
filePath = "D:\\bumping\\"fileNameList = D…
Hi jiunnweiyeh
To get information for Inst in deeper hierarchy, you might need to use begin_instances_rec_overlapping instead of each_overlapping_inst, following example should able to provide the info you need.
cellView = RBA::Application::insta…
Hi r_user_ant,
I found there's a cross section tool created by jwbos that provides functions that might suits your need.
Previously it was called 3DProcessViewer, now becomes xView.
Original post by jwbos:
https://www.klayout.de/forum/discussion/…
Hi jiunnweiyeh
Because you request to dump DRC results to a file so the file will be occupied by DRC engine until the script is completed finished, which blocks the readFile_getdis from accessing the contents.
The way to avoid this is actually sim…
Hi anlinus
Further reduce the file grid size should be the way to reduce the occurance iof this issue, however is you are already using the highest resolution possible, than y moving the objects in a interger grid unit should helps.
Another way is…
Hi hieund,
begin_shapes_rec_overlapping is not suitable for filtering shapes with holes,
if shapes with holes is overlapped with the box this function will still returns True,
so additional check is using polygon.touches is required.
rsi.shape().…
Hi hieund,
begin_shapes_rec_overlapping function returns a list of object that overlapped with given box.
def shapeInRange(cell, layerIndex, detectBox): withShape = False for rsi in cell.begin_shapes_rec_overlapping(layerIndex, cut_box): …
Hi Albert,
If the scaled shape is with a size that is 1 dub, than this is a normal behavior.
Following example shows why klayout always gives you a box with 2 unit instead of a 1 unit box when you tried to scale a box to 1 dbu.
(Image)
(B) -->…
Hi Kazzz-S
Thanks for the explanation, matching the output from DXF format is always a guessing game,
Shape filtering with conditions only works for certain layout and often breaks if encounter complex cases.
Hi hieund,
Following script kind of work for this particular layout, due to the soruce data have alot of stacked polygons,
If the source pattern stacking rule changes, this code will not work.
The process is to dump all shapes into region, and us…
Hi hieund,
This version extracts out lines from every shapes and removes the cut lines.
This approach cannot determine which area is Cu traces and which is spacing
so I cannot hight light the Cu spacing region with another color.
another differ…
Hi hieund,
I've revised the example, the majot different is to flatten the top cell before dumpping shape to region.
(Image)
import pyainput_file = r"dxf path"output_img = r"image path"layout_view = pya.LayoutView()layout_vie…
Hi hieund,
Here's an example of how to remove cut lines and only show border lines.
This script is to split the holes in every polygons into separate shape and insert them back into the same layer.
(Image)
import pyainput_file = r"dxf path&…
Hi dick_freebird
macro can be bind to hot key throuth macro properties setting page (wrench icon).
key bind can be set at default key short cut option
(Image)
For change hot key binding using a script that bind to a hot key,
here's an example of…
@nmz787_intel
For split shapes i've create a plugin that can be installed directly from package manager
(Image)
For measurement from shape center, this plugin allows you to snap ruler to shape center without modify the gds