Hi Mathias,
I have two layers. Layer one consists of a two dimensional array while layer two is a circle. I want to create a third layer of cells such that the third layer only contains complete cells of layer one within the boundary of layer two circle. How can it be done. Thanks for your help. If it requires a procedure, your help will be appreciated.
Best regards,
Iftikhar
Comments
Hi Iftikhar,
That seems to be a problem similar to that of a former post of yours.
If I understand that correctly, now you would like to select cell instances rather than shapes. However, the boolean operations do not handle cell instances - that is a different kind of functionality.
One possible solution again is to create a mask layer contained in the fill(?) cells with a boundary polygon (these polygons must not touch nor overlap), do a AND between the circle and the mask layer, run the "select whole shapes" script from the previous post and perform a AND between this result and the content of the fill cells. That would render the desired result in a geometric way but not with respect to hierarchy - the fill cells will be flattened by this approach.
It's probably possible to create a script that modifies the instances of the cells. That will be complicated by the fact that one needs to resolve the array into single instances or - better - into sub-arrays. That's why such a script is probably a little more than just a few lines of code.
Best regards,
Matthias
Best regards,
Iftikhar
Hi Iftikhar,
The bad alloc error is probably indicating that the process exceeds the 2 GB process size limit (I guess you are using a 32 bit executable). That large memory allocation is likely a consequence of the flattening of the fill cells.
You could try using a 64 bit version (provided you have a 64 bit system). But that's rather a hack.
I agree that is not really a solution. The boolean operations are not well suited for that kind of operations. What you probably need is tiling operator for polygons (rendering the inner approximation of a polygon with a set of rectangles) and create the array from that tiling "bitmap". You could feed the fill region's polygons (in that case the circle) into that operation and create the fill cell arrays.
Although such a tiling operator is not rocket science I don't have one in stock for RBA currently. Coding that in Ruby is probably somewhat tedious and slow so I don't consider that a feasible option.
I'll try to dig into the code. Maybe there is something one can reuse from other functionality.
Best regards,
Matthias