Help! When an Object get touched by a Shadow (sun shade)
-
Hi, I'm newbie here......can anyone help me to solve this algorithm that can applied in sketchup:
Ifa Shadow touching a SolarPanel :
Then, messagebox : Forbidden solar panel position!
Else
doing solar panels energy calculationnote : the Shadow (from sun shade) in range Januari-Desember , 7am-5pm
i'm stuck in the way shadow touch solar panel, can anyone explain?
I attached the screenshot:
-
You can use Model.raytest to know it.
If you are working with solar panels you can use Skelion plugin also.
Best -
Thanks for the advice mr.juantxo, still finding solutions...... need more details
-
You need to know if a panel is in shadow or not using this 2 vectors and using cosine law
panel verctor->
v=Sketchup.active_model.selection[0].normal
sun vector->
s=Sketchup.active_model.shadow_info["SunDirection"]But you need to know also if there is some object projecting shadow over the panel using raytest with sun vector and some points of the panel. You can modify this step and look for other methods if you need more accuracy...
Advertisement