Orient elements

good morning,
i am trying to orient some geometries in order to have the side faces facing down (XY plane). i tried the first time with the old shapes and it worked but when i added a few details everithing went wild. I know that the extracting method i used is quite unorthodox but im quite a newbie in the software.
thanks for the help
ORIENT_ELEMENTS.gh (17.8 KB)

You file does not contain any geometry.

ORIENT_ELEMENTS.gh (6.2 MB)
should be good like this?

I think you can sort the surfaces according their area and then extract the largest for the orient plane input.

I know this does not yet solve which side is up or down.

ORIENT_ELEMENTS (1).gh (2.7 MB)

checking for planarity first makes sense to me.
using the surface normal of such a planar surface to orient the part…
orient_byNormal.gh (2.7 MB)

1 Like

this one actually is really close to what i need, do you think is it possible to have an output like this? (it’s the old one i was talking about)

yes i think so
:wink:

first : check weather two breps are in the same plane, group them. orient the groups.

orient_byNormal_2.gh (2.7 MB)

1 Like

I was trying a few ways struggling to achieve it but this is perfect. Now I just need to take my time and understand the script :joy:
thank you so much for the help