I can not have a good understanding of the DRC script in klayout. Can you show an example to check the following design rule?
"The width of metal must be greater than or equal to 3 microns except where poly and metal overlap by more than 1 micron, then the metal width must be greater than or equal to 4 microns."
For the overlap method, is it possible to give an option to check at the rule boundary? For example, e1 find the edge of overlapping < 1um, but sometimes I need to find the overlapping <= 1um. And for the 4um rule, I do need to check overlapping < 4um instead of <=4um.
All checks is designed to check "less" not "less or equal", so the overlap check should do what you're expecting: it will check width >= 4.0 and report an error on < 4.0 µm. Doesn't it?
If you really need to check the other way around, you an add or subtract a tiny value, preferably one database unit:
4.um - 1.dbu # a "little less" than 4 µm
1.um + 1.dbu # a "little more" than 1 µm
(one database unit is the smallest distance that can be represented by the design's resolution).
The options are documented with the "width" method. There should be a link from the other methods embedded in the text. At least it's working on the HTML documentation here for example.