Change Index order based on surface orientation

Hi everyone,

I try to solve a general problem. I have a Surface Population Definition, which works fine with smooth horizontal surfaces. As soon as I try to feed an vertical, more cylindrical surface the order of the oriented geometry on this surface starts to become random and therefore some 4PtSurface Components start to become intertwined etc.

I guess, I need to find a way to change the index order of the Points I am using for the 4PtSurface Component based on the orientation along the surface or the coordinates?
Maybe it also would work with a smarter way to orient the initial geometry on the surface patches.
I am a teacher for Digital Processes for 2nd Year Architecture Students and would appreciate any comments on the problem, since I am using it as an assignment, claiming that one could use it on different surfaces, which is obviously not the case :slight_smile:

Best, Kath

Populate Surface_Index Order.gh (35.6 KB)

Index order based on surface orientation_OK

Index order based on surface orientation_Error

The problem is you’re using the Orient Direction component, which has an unpredictable rotation around the target direction vector. You’ll have to use an orient component which unambiguously defines the transformation of your rectangles. For example the regular Orient component takes Planes rather than just points+normals and is therefore unambiguous.

Dear David,

Thank you very much for the quick and profound respond. It is exactly, what I was looking for. I used Orient before, but somehow I forgot to use it in this case. So you solved it with a fresh eye. Thank you!

Best wishes,
Katharina