# Horizontal louvres from given windows

Hi everyone,
I am currently trying to parametrize a series of horizontal louvres that adapt to given window size. My problem is that the window orientation is different and don’t follow any pattern, I have tried to simplify to simple extruded curves but still, the same problem since every curve has a different orientation, some follow a clockwise direction meanwhile others follow counterclockwise. Do you know how to make all curves follow all the same direction, counterclockwise or clockwise?
Thanks!

Horizontal louvres.gh (64.1 KB)

Julioamodia89,
You might try to this… Find the end points of your poly lines. Deconstruct those points, then compare the x values of the start to the x value of the end point. ( or based on the orientation it might be the Y values). Using the expression component …“If(x>y,1,0)” this will give you a pattern to use with the dispatch component. You can then flip the curves that are going the wrong direction.
From a 1000 ft elevation… Compare the start point to the end point. Some of the start points of the polylines will be “left” of the end point and some will be “right” of the end point. Using the expression component you can give a value to each of these conditions. Then based on that value flip the all of the curves that are going in one direction or the other.
For this to work you will have to move your base BREP to align with either the X axis or the Y Axis.
Good luck
Horizontal louvres.gh (64.1 KB)

I forgot the flip component…Sheesh. I think it will work when you get you base BREPs aligned to the correct axis. However it may take a little more noodling it to get it to really work. But i think the idea is sound.
Bill
Horizontal louvres.gh (64.1 KB)

Hi Bill,
First of all thanks for your time.
I am not seeing any change in the grasshopper file that you have attached. Did you actually made any changes?
On the other hand, I am afraid it is not that easy, since some of the breps are curve and in some cases, the orientation is completely different from each other.

Best regards,
Julio

Julioamodia89,
If you will share a GH definition that is just one of those louvers that are troubling you (internalize the geometry) I will take another run at it. This will work, but it is so much easier to start out with a smaller sample size. Once we get the underlying solution it can be expanded to a bigger group.

Bill