Hi,
I'm working on code for a pcell, in which I generate an array of rectangles in, for instance M1, and M2. The M1 rectangles are multiple rows and wider than tall, the M2 in multiple columns, and taller than wide.
I have a list for the M1 rectangles (containing the database-IDs of the rectangles) and a separate list for the M2 rectangles (also database-ID's).
I want to sort the M1 list in such a way that the first entry of the list is the M1 rectangle at the top ("northern" most) and the lowest ("southern" most) rectangle as last entry. All other neatly sorted in between of course.
I want to sort the M2 list in such a way that the first entry of the list is the M2 rectangle at the left ("western" most) and the the wan furthes to the right ("eastern" most) rectangle as last entry. All other neatly sorted in between of course.
I think I could come up with a very nice, but elaborate/long/complicated/not-understandable/over-complicated/highly-specific/not-efficient, piece of SKILL code to do this. However, I can imagine that there is a very neat/general piece of code/build-in-procedure that I can use to do this. Does anybody know the existence of this, or has done this before and is willing to share this with me? That would be highly appreciated.
Thanks in advance.
With kind regards,
Sjoerd