I am trying to get the orientation of the roofs. For this i need the outward vector of the roof.
I got the feeling i am close… but just trying to trust the biggest surface of the roof isn’t working.
Anybody an idea?
I am trying to get the orientation of the roofs. For this i need the outward vector of the roof.
I got the feeling i am close… but just trying to trust the biggest surface of the roof isn’t working.
Anybody an idea?
From the surfaces get the normal in the middle, and get the z-vector angle?
Hi Arno,
Sorry but would you mind giving some additional info?
When you say orientation, do you mean slope? Or do you want to know if it’s rotated to north? like a pitched house roof? Perhaps a sketch with an arrow would help
The only reason I ask is that the slope might got out of the Roof properties, whereas the rotation is more of a geometric question…
Thanks,
Mark
To piggy back on what @Mark.Ackerley said, a sample Revit file would also help so we’re all looking at the same start point, otherwise we may come up with the a solution that works in most cases but not yours.
It is still my testcase house found here:
It is to get the North south west east orientation…as seen in the last node of the script.
but a Z-vector perpendicular to the surface would solve it, but how to know that the Z is pointing up not down.
Arno
If you have a box and take the top surface, the normal of this surface is pointing up, Z=positive
I you have a box and take the bottom surface, the normal of this surface is pointing down, Z=negative
Just compute the dot product of the surface normals against the global Z-axis. If you create a threshold above 0 you can pick up any sloped surface facing ‘upwards’:
Thomas, thanks for your reply but i am not looking for the sloped roofs, i got those… i want to find the correct normal, but i am getting strange results. I want to know if a roof faces north south east or west.
Roof.dyn (31.4 KB)
strange, my script gives the right values when i test each index one at a time, but when i do them through the list, then i get wrong vectors.
i am clueless at he moment
Sorry i’m not at a pc right now, how about double clicking into the node? Perhaps you can understand how it is working and refine it?
Hope that helps,
Mark
Mark,
in which node…i have no idea where it goes wrong, because one at a time it works perfect but when i run it as a list i get wrong vectors.
Hey,
I meant inside your Roof (Wall) NorthSouthEastWest… I couldn’t quite understand your graph so I made one which I could understand
I presume you want to know the orientation of each roof Face? Which means you will be making each roof Face as a different Roof?
Usually I would make a split line and have 1 roof… But this would obviously give a wierd result…
Here’s my go, I couldn’t get my head around how the x and y components were making the rotation, so I made a dumb method, I’m sure it could be greatly refined if I was more capable…
Hope that’s useful…
Mark
Roof Orientation-5.dyn (24.3 KB)
Roof Orientation-5.dyn (24.3 KB)
i found my problem…but can’t solve it…is this a bug.
i have a list of 8 (in the first input) and i ask to remove the last index… and i get a list of 6 instead of 7
from what package is element.topbasedpolysurface and curve.midpoint can’t find them with google…
setting lacing to longest solved this problem
Hi Arno,
There is a node for removing last index… Landform I think the package is called for the top and bottom surface. Good work!
Cheers,
Mark
I believe that List.Drop with a -1 input would also work.