Parallelograms vertices or edges order

Hello everyone!
I’m trying to create an algorithm with grasshopper but I’m having a few problems: different parallelograms I have show different edges and/or vertices order.
When dealing with one at a time, creating the first version of the algorithm, I had no problem. Now however
is unfortunate because I have to deal with a lot of them… Is there a way to abate that order to a rather unified/standardized order?
I thank you very much for every tip!

nice%20result not%20so%20nice%20result
lots of parallelograms.3dm (148.3 KB) (126.8 KB)

Ok, after some thought I was englightened with this little idea (probably not the smartest or simplest/polished one).

This could work if only I could isolate edges in Y and X directions too…
Any tips? Thank you very much! :slight_smile: (17.0 KB)

I think I may have done it… well I hope so.

If anyone needs the result I have uploaded it right here. (17.0 KB)
If anyone knows about a more sophisticated way to do it please leave a comment.