I know that walls are oriented based on whether they were created from a left-to-right or right-to-left direction. However, in a new workflow I’m testing out, I created a script that automatically populates all exterior walls based on the edge of slab. This has greatly expedited creating all the curtain walls for the project but I’ve lost control of which direction the walls were created which is resulting in some exterior faces facing inwards.
I am now trying to create a script that will determine the ‘exterior face’ of a wall, and flip all of those that are oriented in the ‘wrong direction’.
I had a simple version which pulled the y vector from the wall orientation and compared it to a wall that was oriented correctly, then flipped the walls that did not match the correct y-value. The problem with that was that it was flipping some walls that were correct. I now believe I need to first collect all walls of the same X-vector value then match that Y-vector value. This is where my list organization falls apart and I haven’t yet figure it out. attached is an image of where I’m ending up.
You are feeding a Double into the Vector.Y node, it is expecting a Vector.
If you ignore that Node and feed the previous Vector.Y into the Equals Node, what does this do?
That fixed the error but unfortunately it is flipping some walls that do not need to be flipped. It definitely has to do with the direction the wall was originally created in, but due to the shape of the plan, some walls want a -1 y-vector while others do not.
If you extract the Vector of the wall curve, direction it was created, then you should be able to find which walls were drawn in a clockwise direction and which are anit-clockwise.
This would be through comparing the angle between start and finish point of the curves to see if it was +/- of the x or y plane vector normal.
Then you can use the values as a conditional filter for your flipping.
I’m sure there is another way of doing this though