"HB Rooms by Orientation" Calculating Wrong Orientation Value

Hi,

I was testing the "HB Rooms by Orientation’ component on a simple pollination model (8 rooms). For some reason, it is calculating an incorrect average direction for 1 of 8 rooms.

In the image below north is 0 (positive y dir). Room 7 (highlighted) has adjacent rooms on the 90° and 180° dir, but for some reason, the calculated average orientation is 87°?

I have checked using a custom ghpython component and the average_orientation() method, but still the same.

I have also ensured to solve adjacency, validate model and manually check face boundary conditions but nothing fixes it. Any suggestions on what might be going wrong here?


Orientation.3dm (354.4 KB)
Orientation.gh (20.0 KB)

Hey @ssamryt ,

The average_orientation() method is working as it was designed. For that Room 7, part of the orientation is zero (facing north), and the other part of the orientation is 270 (facing west). The weighted average of these two by the area of each face pointing in each direction is 86.7. I know that it seems odd to say that this room is facing east-ish but you can see the source code is pretty simple:

… because the primary goal of this method is just to group those rooms with a similar orientation together, which is what this will do if you have a bunch of corner rooms just like this in your model.

Maybe you want to use something different for your purposes here. Like the azimuth of the largest individual honeybee Face in the room (rather than a kind of averaged orientation of exterior faces for the whole room):

1 Like

Thanks for the explanation @chris, that’s a fun oversight of mine!

1 Like