DRC intersection of polygons

edited January 2014 in KLayout Support

Hi,

How to code the intersect function, when 2 polygon cross each other OR have a common edge (inside ou outside) ?

I tried , but it does not work (because .and cannot take both edges and polygons at the same time):

layer1.edges.and(layers2)

Thanks, Best regards,

Laurent

Comments

  • edited January 2014

    Hi Laurent,

    That's right - intersection of edges and polygons are not allowed currently.

    But it should be possible to emulate that with

    (layer1.and(layer2)).edges.not(layer2.edges)
    

    This will leave only those edges of layer1 which are inside layer2 polygons because only those are not coincident (hence are not removed by the "not") with layer2 edges.

    But that will not catch the case of layer1 touching layer2. Those touching edges you can detect by

    layer1.edges.and(layer2.edges)
    

    Matthias

Sign In or Register to comment.