algorithmic modeling for Rhino
Hi All
I have this C# Script from a while back that controls the Sun in Rhino though Grasshopper but not been able to understand how i add a way to automatically set the time zone in the same way as it work if you enter the Longitude or Latitude manually in the sun Panel in Rhino it self
This is the current code
private void RunScript(DateTime date, double lat, double lon, ref object A)
{
Rhino.Render.Sun s = doc.Lights.Sun;
s.SetPosition(date, lat, lon);}
Found Here:
http://www.grasshopper3d.com/profiles/blogs/control-rhino-sun-syste...
Thanks
Matt
PS. If anyone had been able to control the Sun including time zone though python please post this too, as everything i have tried either returns errors or crashes Rhino in GHPython
Tags:
I don't see a way to do this without relying on an external API like google's to look up the time zone, unfortunately.
I've got a working example in C# - got pretty far but not quite all the way to a working translation to python. My knowledge of IronPython fails at generics/ custom classes etc.
Hope this helps you some!
Great I will take a look thanks. I wonder how the Rhino Sun panel controls the timezone.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by