It looks like you're new here. If you want to get involved, click one of these buttons!
Hi guys,
I have a polygon like a trapezoid+ a rectangle, and the length of one egde in rectangle is 1um, I want to check if th angle between the edges of this edge is 90 degree . So I wrote this DRC script:
report("w")
layer1 = input(2,2).flatten
test1 = layer1.drc(length==0.1.um).with_angle(89.degree,91.degree)
test1.output("start/end","90deg")
but the script didn't recognize the edge I want, Anyone could help me ? Thanks a lot!
The gds file of this polygon is attached
Comments
Hi @Default,
thanks for the test case.
So to rephrase the problem: you want to find edges connected to an edge with length 1.0µm and forming angles other than 90 degree with that edge.
So like these corners:
Right?
In order to find that, you will need to first detect corners with an angle of != 90 degree and then find the ones that are connected to an edge with length 1.0µm:
This renders the three corners (error markers are red):
Matthias
Hi Matthias,
Thanks for your reply. Actully I need to find edges connected to an edge with length 1.0µm and forming angles = 90 degree with that edge. So I change your DRC code.
I applied this code to the GDS I upload, but it still can't find the corner i want.
My klayout version is 0.29.0@MacOS
Could you help me with this question? Thanks a lot.
Hi @Default ,
I hope this is the output you want.

to be continued...
cont.
Why


-90 degree
?cont.
Regards,
Kazzz-S
Wow ... with cars!
I actually consider adding an option to "corners" so that you can say "take angle left or right", i.e. "corners(90.degree, both)". That may make thing easier. Right now, you need to check both 90 and -90 degree.
Best regards,
Matthias
@sekigawa
@Matthias
I see! Thanks for your generous help!