As a follow up of my previous topic about Archeoastronomy and
Sketchup, I'm wondering if there is a Plug-in for "Face Sun". It would
work like the existing feature "Face Camera", but in this case the
selected plane would face directly straight to the sun in such a
manner that the sun rays fall perpendicular to that plane. Thanks in
advance for any info.
Your plugin would want to use the extended Ruby class "Date" that can
display dates back to 4712 BCE, so the backward range would be 6813
years (counting year 0.)
Sketchup would not use the Date class, so your plugin would need to
track it's own SUN object.
The "Face Sun" plug-in was created here today:
http://forums.sketchucation.com/viewtopic.php?f=323&t=27499
I would like to know your comments of this plug-in in the context of
your mail about Ruby class "Date" and "Time". I have no programming
background but I'm interested about the years you mentioned, specially
because in Sketchup there is no way to feed it with years info, only
day, month, hour and minutes. Is the "Face Sun" plug-in limited to
years? Thanks for any info you can provide.
#-- Ruby
new_time = Time.gm(1981,"jan",1,20,15,1)
model = Sketchup.active_model
shadowinfo = model.shadow_info
shadowinfo['ShadowTime']=new_time
#-- end Ruby
The Time.gm method parameters are:
(YEAR,month,day,hour,min,sec,usec)
The year is required, all others are optional and default to their
minimum values.
Time.gm creates a new time object based on UTC (GMT) time.
http://www.ruby-doc.org/docs/ProgrammingRuby/html/ref_c_time.html
Info on extended Date class:
http://www.ruby-doc.org/docs/ProgrammingRuby/html/lib_standard.html
Below class Complex, scroll down ...