klayout icon indicating copy to clipboard operation
klayout copied to clipboard

Feature request: Extended fill support

Open ralight opened this issue 6 months ago • 5 comments

Hi, thanks for klayout it's a very worthwhile project.

I'm using the fill tool and it works fine, however it would be nice to have some more options for getting a comprehensive fill without needing a small fill cell.

I was thinking that if I provided a list of cells of different sizes, they could all be used in order rather than just the first and second level that is possible now. The inputs are already the same for the first and second level, so I'd hope that extending this to a list format in the UI could be fairly straightforward.

Thank you!

ralight avatar Jul 07 '25 09:07 ralight

For extended support you can use the DRC feature. It allows implementing multiple stages of fill using "fill_with_left".

Right now, there are some issues with performance as fill is not multithreading-enabled and you need to compute expensive boolean NOTs to fill space between features. I am considering enhancing the feature by an "exclude" and "keep distance to exclude" feature.

The general strategy is to focus on DRC features for maximum flexibility. There is never a UI that everybody is happy with. For example, it is not possible to provide multiple fill setups. So if you have different tasks to do requiring different fill cells or pitches, you have to reconfigure the UI. It's just a matter of time until someone asks for multiple fill configurations you can switch between or booleans to compute exclude layers from. The DRC feature offers all of that at the cost of a little coding.

There is also need for some debugging too (see https://github.com/KLayout/klayout/issues/2087). By coincidence I came across this problem today.

Matthias

klayoutmatthias avatar Jul 07 '25 22:07 klayoutmatthias

Thanks for the suggestion, I managed to get a good result using a DRC script. I'm happy for this issue to be closed, it's up to you.

ralight avatar Jul 24 '25 14:07 ralight

@ralight Do you mind sharing what you came up with ?

stefanottili avatar Jul 24 '25 23:07 stefanottili

@stefanottili To be honest I doubt it'd be of much use. My needs are very simple - rather than generating a traditional grid of rectangles with spacing I was looking for a complete fill. I was able to achieve this by inverting my input layer with extent().

ralight avatar Jul 25 '25 16:07 ralight

I’d still be interested in how you solved your issue. And if you consider it closed, please close it.

stefanottili avatar Dec 10 '25 22:12 stefanottili