DRC area of overlapped region

Hey,
I'm writing a DRC script and I want to see if someone can help with this design rule.

I want to try and measure the area of the overlap of layer1, which overlaps layer2. layer1 overlaps layer 2 at different points too. The region highlighted in yellow below is what I'm trying to check the area of. I know how to find the area of the whole overlapping piece but I just want the area of the highlighted sections to check if they are below an area value. I appreciate the help.

Thanks,
Tristian

Comments

  • Hi Tristian,

    layer3 = layer1.and(layer2)

    layer3.area gives the total area

    layer3.with_area(nil, value) selects all polygons with an area below "value"

    Cheers,

    Tomas

  • Hi Tomas,

    That's exactly what I wanted, I appreciate it a lot!

    Thanks,
    Tristian

Sign In or Register to comment.