Recognizing Shadows in Dynamo

Hello everyone:

I’m a Master’s student studying how well a set of shading components can prevent unwanted solar radiant heat gain. I’m working on a script for my thesis in which I’m trying to get Dynamo to recognize and report the percentage of a facade’s surface area in shadow. I’m testing how well certain geometries are at blocking solar radiant heat gain, so this is a crucial part of my work.

I’ve modified a bit of code that I discovered on another site which allows me to recognize the shadows cast onto a surface (with a few bugs), but am having trouble figuring out how to report this area as a percentage of total facade area.

This is what the script currently looks like and how it’s performing:
Currently it looks like the family is being projected in front of the facade surface (I don’t understand why this is happening).

And the code starts to break down when I try to determine the perimeter of the shadows.

Could anyone provide assistance with this? It’s somewhat urgent.
Any help would be tremendously appreciated!

Thank you,
Amina

Hello Amina,
Can I ask you how did you create the recognizable shadows?

It appears they never managed to - the graph is error stating all over the place and noone replied to their request.

Shadow detection is very difficult to do precisely. Maybe try dividing a surface into test surfaces and check if the sun hits the facade at their centrepoints. If it does, then you know that point is in shadow and can override it in dynamo with colour.

Generally I would use Ladybug Tools for this as it has a set of tools for getting sun angles and cumulatively handling sun hours and tests. Dynamo has nodes to get sun direction from Revit views and mesh rays however so could achieve a similar outcome with some work put in.

2 Likes

I recall a great discussion where multiple options for shadow geometry was discussed :wink:

The last comment from Jacob can be circumnavigated using axis aligned bounding boxes now :grinning:

3 Likes