# Orient face normal of windows away from floor

Hello Rhino Community.

I’m doing some analysis through Ladybug tools. Is there anyway that i’m able to orient face normals, så ALL the face nromals on my windows are pointing AWAY from the floor (red). Right now the are pointing in every other direction, and i can only run my analysis if the face is oriented outwards.

I would like to do this through a grasshopper script, this way i don’t need to manualy do this every time i need to make this analysis.

maybe this is a bit overcomplicated… I can’t figure out a logic that is not geometry dependant and just relies on vectors ._____.

(A) takes your input Breps and separates horizontal surfaces (floors) from non-horizontal ones (windows)

then for each window finds the closest floor (B) and measures the closest point to the window center on that floor

then moves the window center in the direction of its normal, and measure the distance to the closest point of the floor again (C)

for those windows where that distance decreased, it means the window is facing the floor, so it gets flipped (D)

I think there are cases where this approach might fail

anyway, what are these windows doing here?

1 Like

Thank you Inno!

I’ll test it out.

The interior “windows” are walls and glass doors.