# Wall Orientation to the Cardinal Points

Hi Forum,

I need your help, I want to sort the walls according to the sky directions. I will then check their distance to the property boundary. I’ve found out the directions of the walls here with the node, Wall.ExteriorDirection,.
Y=North
-Y=South
X=East
-X=West
But now I do not know how can i create a list of walls for each sky direction. any ideas?

Have you tried List.GroupByKey?

Tip: get the angle from true north (or another known vector), and round that to your desired degree of accuracy and use that as a key. Likely you want to use 90 degree chunks around the cardinal directions as your group (so +/-45 degrees off north, +/-45 off east, etc).

1 Like

Hi Forum,

i ve found out how to sort the walls according to the cardinal directions. but i want to check the distance to the property boundary, i Need the distance of each direction .i ve tried it with the Geometry.Distance.To but i get every time the same distance to just one Property line.
any ideas how to go on?

Right click on geometry.distanceto and set the lacing to cross product

Better yet, since you already have the walls sorted by direction just make sure your list of boundary lines are in the same order and check each list of walls against its corresponding boundary line.

Agreed with @Nick_Boyts
In this case that would be done by setting the levels of the Geometry.DistanceTo node to the 2nd level I think

Hi that sounds really good, can i sort the list of boundary lines the same way i did it for the walls? or is there a another way to do it? i ve tried it that way but it didn’t work.

“Geometry Distance To” with the boundary lines and walls.

You can probably just check them by looking for the min/max X and Y coordinates to know which curve is which. Just sort them in the same order as your walls.

Why not make a poly line of the boundaries and get the distance to the poly line along the normal?

which node do I have to use there? i ve tried it with this one, but i think its not right. it didnt work.

PolyCurve.ByJoinedCurves.

How would I round a vector or create a range of values to check against?

Get the angle between the vector in question and a list of acceptable vectors. The smallest angle represents the closest acceptable vector.

2 Likes

And to add tolerance, if that vector is within X degrees, then it’s acceptable.

1 Like