Boolean of Instances

edited October 4 in General

Hi,

I have many instances (instance A) that form a rectangular array. Nearby are another set of instances (instance B ) that surround the rectangular array...but they aren't exactly touching, i.e., there is space between instance A and instance B. I would like to fill the space in between with a polygon, but it's a very tedious shape. In an ideal world, I can draw a big box that goes through both sets of instances and I can use some boolean operation to remove the portions where this big box overlaps with the instances.

I found this post from 10 years ago, and it seems like a similar problem...has this functionality been added? Thanks in advance.

https://www.klayout.de/forum/discussion/81/boolean-question

Comments

  • If there are not too many instances (~1 million), you can try using the boolean operations from the DRC feature - draw a big box over all instances on layer 1/0 for example and draw a small box inside the instance on layer 2/0 for example. To get the fill mesh on layer 10/0 for example, use the following DRC script:

    (input(1/0) - input(2/0)).output(10, 0)
    

    However, the resulting polygon will be huge. You can try tiling to split it:

    tiles(1000)
    (input(1/0) - input(2/0)).output(10, 0)
    

    where 1000 (µm) is the size of one tile - it should cover some, but not too many instances.

    Another (hierarchical) option is to decorate the instance cell with a small frame such that after building the array, the frames touch. Like this:

    (single cell)

    (array)

    Hence the violet layer forms a fill mesh - although not in a single polygon.

    Matthias

  • Thanks Mattias, I will try this and get back to you.

Sign In or Register to comment.