Hi Matthias,
Thank you for creating such an interesting and versatile GDS tool. I have a question. I created a two dimensional layout from a unit hexagon cell into a honeycomb structure. Then I used a Boolean operation between an irregular structure and that honeycomb structure. It resulted in a large number of additional cells of various shapes and sizes. How can one use Boolean operations or Ruby scripts such that such partial cells are removed and only whole cell elements representing the original structures are left.
Best regards,
Iftikhar
Comments
Hallo,
thanks :-)
Regarding your question: I imagine that you are trying to create a honeycomb fill pattern and you subtracted your layout from the fill pattern. Now, the problem is to remove all fill shapes that are partially cut.
If I understand that correctly, there is at least one way to do this with Ruby. For example, you could select the whole shapes by their area. Only the whole ones will have the whole area - all others will have an area less than that.
If that is what you are looking for, the basic idea would be to copy all shapes with the full area (or all shapes with the maximum area) to another layer which then will contain the whole shapes.
However, that solution is probably pretty slow. I think the limit of usability is somewhat in the order of a million shapes. Right now, there is no packaged function which does that more efficiently.
Best regards,
Matthias
Your understanding of my problem is correct. However, I am not a good programmer of Ruby, so if it is not too much to ask and you could provide the necessary code, I would appreciate it. It may be useful utility for other users too to cleanup unwanted shapes after Boolean operations.
Best regards.
Iftikhar
Hi,
the following is a script that adds a new function to the "Tools" menu: "Select Whole Shapes" will select all shapes from the current layer that have an area equal to the maximum area found on the layer.
This script will fail therefore if the layer contains other geometry different from the fill shape polygon. For simplicity, it operates only on the top level of the hierarchy. This script is merely a sketch but may serve your purpose.
Best regards,
Matthias
Thanks a lot. I also managed to solve the problem by purely using Boolean functions. My methodology creates an external envelop of the given structure such that when the external envelop is merged with the partial structures, then they can be simply deleted as a single merged structure.
best regards,
Iftikhar