by thomthom » Wed Apr 07, 2010 6:53 pm
In response to: http://forums.sketchucation.com/viewtop ... 23&t=27477- Make selection containing faces
- Plugins -> Face Sun
Positions all the faces in the selection to face the sun's current position. No live update. Update 1.1 (Jim Edition)Thanks to Jim that modded the script so that connected geometry to the selected faces also rotates accordingly. Download
Last edited by thomthom on Sat Jan 18, 2014 1:08 pm, edited 1 time in total.
-

thomthom
- PluginStore Author

-
- Posts: 19334
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by Dan Rathbun » Thu Apr 08, 2010 10:21 am
The astronomer who requested this, replied to the post at GG complaining (about Sketchup, not you ThomThom,) that's it's not easy to change the year in the Shadow info dialog. (Actually he thinks there's no way to change the year; he must have missed those left/right tick buttons.) I replied, with this: The Sun position would be controlled by ShadowInfo class http://code.google.com/apis/sketchup/do ... winfo.html#-- 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/Programmin ... _time.htmlInfo on extended Date class: http://www.ruby-doc.org/docs/Programmin ... ndard.htmlBelow class Complex, scroll down ...
I'm not here much anymore. But a PM will fire email notifications.
-

Dan Rathbun
- PluginStore Author

-
- Posts: 5036
- Joined: Tue Oct 06, 2009 3:06 am
- Location: Florida, USA
- Name: Dan Rathbun
- Operating system: Windows
- SketchUp version: 2015
- License type: Pro
- SketchUp use: education
- Level of SketchUp: Advanced
by Dan Rathbun » Thu Apr 08, 2010 10:27 am
So he has no knowledge on how to use the info I gave him, to write an Inputbox script for setting time, and I'm too busy with home repairs the rest of the week to help him out.
I also have no idea if Sketchup would honor the Date class. The guy is obviously interested in ancient dates because he studies ancient architecture. I just don't know if Sketchup could handle going back 6723 years.
I'm not here much anymore. But a PM will fire email notifications.
-

Dan Rathbun
- PluginStore Author

-
- Posts: 5036
- Joined: Tue Oct 06, 2009 3:06 am
- Location: Florida, USA
- Name: Dan Rathbun
- Operating system: Windows
- SketchUp version: 2015
- License type: Pro
- SketchUp use: education
- Level of SketchUp: Advanced
by thomthom » Thu Apr 08, 2010 10:32 am
hmm.. I don't have much time to work on this. Certainly not this week. And in general I'm atm busy with Vertex Edit. Just put something quickly together when I had a spare 5 mins. Will make it also orient connected geometry to the faces in an update next week. But I really can't promise anything more.
If anyone else want to jump in on this then feel free. Use my code as a base if you want. (not much code really - very simple script.)
-

thomthom
- PluginStore Author

-
- Posts: 19334
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by thomthom » Thu Apr 08, 2010 2:24 pm
Update - Thanks to Jim!
-

thomthom
- PluginStore Author

-
- Posts: 19334
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by construsol » Thu Apr 08, 2010 5:34 pm
Dan, Thom: Dan, you are right, years can be inputed, just seen how to do it, and thanks for the links, altough I don't have the necessary knowledge I will read them and try to be familiar with Ruby at least with this script to see if I can make adaptations to it according to own needs. Thom and Jim, thanks for the uptdate. Dan Rathbun wrote:The astronomer who requested this, replied to the post at GG complaining (about Sketchup, not you ThomThom,) that's it's not easy to change the year in the Shadow info dialog. (Actually he thinks there's no way to change the year; he must have missed those left/right tick buttons.) I replied, with this: The Sun position would be controlled by ShadowInfo class http://code.google.com/apis/sketchup/do ... winfo.html#-- 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/Programmin ... _time.htmlInfo on extended Date class: http://www.ruby-doc.org/docs/Programmin ... ndard.htmlBelow class Complex, scroll down ...
-
construsol
-
- Posts: 39
- Joined: Sat Dec 01, 2007 7:32 pm
by ken » Thu Apr 08, 2010 9:49 pm
This is a good plugin. Now here comes the however, would it be possible to make a selection, such as face "front", "top" or "Sun". This would make it a lot easier to take apart a model and align the faces for export to ACAD file.
Jim, this would make it easier to use your "Make Orthographic Views" plugin.
If not, thanks for the plugin.
Ken
Fight like your the third monkey on Noah's Ark gangway.
-

ken
- Premium Member

-
- Posts: 989
- Joined: Thu Nov 15, 2007 1:38 pm
- Location: Fort Mill, SC
- Name: Ken
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: engineering and mechanical design
- Level of SketchUp: Advanced
by bau.arch » Fri May 13, 2011 10:12 pm
Hi Thom,
I've just stumbled upon this little plugin. I though it would be great as an "Always face sun" option for a component (similar to "Always face camera").
It would be nice for rendering billboard people\trees with accurate shadows (creating a shadow "dummy" that always faces sun).
Is there a way to make this happen?
thnks,
Assaf
-
bau.arch
-
- Posts: 1
- Joined: Thu Nov 06, 2008 2:45 pm
by Gultekinmg » Thu Oct 13, 2011 2:08 pm
I want sun right inside my house at moon. How about that. COuld you also position sun in a room as light source?
-
Gultekinmg
-
- Posts: 20
- Joined: Mon Sep 26, 2011 3:20 am
by Ad Machine » 5 minutes ago
-
Ad Machine
- Robot
-
- Posts: 2012
-
Return to Plugins
|