It looks like you're new here. If you want to get involved, click one of these buttons!
Hi,I am currently learning DRC using Python, but now I have encountered two problems related to DRC.Now I have three layers: layer 1 (red), layer 2 (green), and layer 3 (blue).. As shown in the figure: 1. The outer boundary of the largest polygon in layer 1 (RED) must be at least 10 um away from the outer boundary of the largest polygon in layer 2 (GRN) (that is, a >= 10); if the distance is less than 10 um, a DRC error will be reported; 2. The inner boundary of the largest polygon in layer 2 (GRN) must be 5 um away from the inner boundary of the largest polygon in layer 3 (BLUE) (that is, b = 5 um); if the distance is not equal to 5 um, a DRC error will occur.
Comments
This should be a classic application of the "enclosing" rule (https://www.klayout.de/doc-qt5/about/drc_ref_layer.html#h2-894).
Matthias
Hi Matthias, using encosingmethod, I can indeed solve the condition a >= 10. However, when I check b = 5, the position c will also be judged as violating the rule. I only want to check the position of b and don't want to check the position of c. How can I solve this problem? thank you
l1= input(1,0)
l2 = input(2,0)
l3 = input(3,0)
RED_Max_edge = l1.drc((area>10.um).hulls)
BMG_Max_edge = l3.drc((area>10.um).hulls)
RED_Max_edge.drc(enclosing(BMG_Max_edge,projection) < 5.um).output("BMG is enclosed RED by at least 10um")
I don't understand. Your script does not involve layer 2/0 (l2 is not used). So how can c be flagged in that script?
Plus maybe you should upload your sample file (.zip it before). It's hard to see how the red and blue layers overlap.
Matthias
This DRC script will do the job, but it is DRC script, not a python script :
BRgds,
Laurent