It looks like you're new here. If you want to get involved, click one of these buttons!
Dear Matthias,
I am using python in Klayout. I am creating scripts to check width of polygons in my design.
I use:
l1 = pya.Region(cell.begin_shapes_rec(layer1)).merged()
l11 = l1.width_check(value * Dbu).polygons( 0 )
cell.shapes(olo).insert(l11)
If the poligons are inclined insteadt of horizontal or vertical, I get a error marker in the form of a triangle at such corner :
Is any way to mask or avoid that the corners are returned as width errors?
Thank you in advance
Best regards
Giovannni
Comments
Hi Giovanni,
I assume (without being able to measure that) that the angle at this corner is a little less than 90 degree and the edges are counted as "opposite". The "ignore_angle" option (forth argument) can fix this, i.e.
With KLayout >=0.29.2, you can use the keyword argument:
Matthias
Dear Matthias,
Thank you very much for your prompt response: You are really a great person. Thank you
Btw:
The angle is 78 deg.
I have used your suggestion and added "min_projection" to the code (with this I was able to remove the triangle):
l1.width_check(value * Dbu, False, pya.Region.Euclidian, 89.0, min_projection = 22 * Dbu).polygons( 0 )
The problem is that now only polygons longer than 22um are checked. Small polygons are totally skipped.
Is this the right way to do it ?
Thank you again
Best regards
Giovanni
Okay ... but the 89 was just an example. If your angle is 78 degree, you may want to use
(so a little less than you minimum angle).
"min_projection" is something else.
Matthias