HELP - selecting surfaces based on orientation degree

Hi there, I’m doing a study of a fully glazed observation tower, and I need to calculate the % of glazing that is within each orientation zone. I have a very simple script on grasshopper that renders the surfaces in a rhino model in a colour relating to its orientation. Can anyone help with improving the script so that, for example, I can choose to select surfaces that are in the NE-NW quadrants (45-315 degrees). So far, I have just been judging the colours by eye, which is good enough for now but not as accurate as I’d like it to be.

Azimuth Colour Face.gh (406.9 KB)

Attach you .gh file so community can help

The input in your file is missing.

For Honeybee and Ladybug related problems please use the Ladybug forum.

Ladybug Tools | Forum

Hi @alicerhian24,

what about something like this?

Without having access to your geometry, I would say that you can obtain what you want by obtaining the normal vectors of all your meshes, and then removing the Z value from them, as you only care about the orientation on the XY plane. This is what I am doing in my case, but all my surfaces are vertical.

With this, you define the lower value and the upper value of your domain of angles to select only the surfaces inside that domain of angles (45 to 315 in your case).

I hope it works in your case.

Select surfaces orientation.gh (23.3 KB)

Many thanks, you’re a superstar :glowing_star:

Yeah, Ladybug/Honeybee actually has tools for this…

Hi Fernando,
Just wanted to check with you - the legend that comes out of the ColourFaceAttr component doesn’t match up with the colour of surfaces that are shown for a specified domain range (for example this is set at 45-270 degrees). Is this an error somewhere that you can think of ?

Tower Glazing Only.3dm (3.2 MB)

The problem is because the “Angle“ component in Grasshopper works counterclockwise, and you want to do it clockwise.

Just change this in your script.

With this you start measuring from vector 0,1,0 (Unit Y) and then you go clockwise.

This is from 45 to 270 degrees. Hope this helps.