Sort Surfaces by Normal Orientation

Hello

I have been working with large scale map files. Currently, I am trying to make a drawing of an orthographic projection of all of the houses on my site. I have made already sheared my buildings etc. However, what I would love to do is separate the roof, west facing walls, south facing walls, and all remaining walls into four separate layers. The purpose of this is to export everything into illustrator, and to be able to paint each of these categories different colours to create a shaded effect. The image below should explain what I mean.

Obviously this is simple enough to do by hand. However I have hundreds of buildings like this on my site. I found a grasshopper add-on in Ladybug called “Separate by Normal” which partially works - it will select the roof layer, and the west facing walls. However it will not separate any other oriented walls. Can someone explain a simple process, script, or addition to my grasshopper code to make this work?

ForumPost2.3dm (982.7 KB) ForumPostGH.gh (20.0 KB)

Hello - I think I would do this sorting before any shearing, it will be less ambiguous for the checker - but you’ll want to get the surface normals and check whether they are parallel or antiparallel to the world x/y and z axes. For angled faces, you’ll need to look for vector angles and pick the direction that has the smallest angle to x, y or z.

-Pascal

do you have any recommendation on how to do the latter part? unfortunately my grasshopper knowledge is very limited.

Hello - see if this GH gets you anywhere. (use on pre-sheared surfaces…)

WallsToLayers.gh (14.9 KB)

-Pascal

Wow, thank you so much. I wish I had this level of grasshopper knowledge! This is exactly what I needed.

Hello - it looked like being pretty annoying to figure out, for me anyway, using just GH components, so short-cut with a couple of very small scripts in python components. Otherwise I’d have let you struggle more…

-Pascal

Lmao I appreciate your help