checking exact enclosing

I'm trying to check "exact" enclosing of layer1 in layer2. This is often the case in PAD layout rule.
We can check minimum enclosing by "layer2.enclosing(layer1, value)".
Is there any way to check the exact enclosing values?

Comments

  • Hello,

    I tried to make one for rectilinear layers a while ago:

    report("DRC RULE ENCLOSURE_L1_L2_FIXED")
    
    Layer01 = input(1,0)
    Layer02 = input(2,0)
    
    Enclosure_L1_L2_Fixed = 1.0.um
    
    Layer01A = Layer01.enclosing(Layer02, Enclosure_L1_L2_Fixed,projection).polygons
    Layer01B = Layer01.enclosing(Layer02, Enclosure_L1_L2_Fixed+1.dbu,projection).polygons
    
    Layer01C = Layer01B - Layer01A
    Layer01D = Layer01 - Layer02 - Layer01C
    
    Layer01E = Layer01D.with_area(2.0*Enclosure_L1_L2_Fixed**2)
    Layer01F = Layer01D.with_area(Enclosure_L1_L2_Fixed**2, 2.0*Enclosure_L1_L2_Fixed**2)
    Layer01G =( Layer01D - Layer01E - Layer01F + Layer01A).merged
    
    Layer01G.output("ENCLOSURE L1 L2 FIXED", "Fixed Enclosure L1 L2 = #{Enclosure_L1_L2_Fixed}um")
    

    Cheers,

    Tomas

  • @tomas2004 Hi, thanks for your advise!

Sign In or Register to comment.