I think it's not an easy task to calculate finite elements and there's a lot of specialized software out there.
Maybe someday in the future there will be a SU plugin to do such calculations but I didn 't find any tool yet...
Latest posts made by pvbuero
-
RE: Modulus
-
RE: Align the axis to a VIEW
Hi,
with tools|axes you can define your own axes and save them in your scenes ...
I guess that's what your looking for ? -
RE: Inverse Selection - where is it?
@ TIG,
that's just fantastic what you're doing here.
I face a problem an two minutes later it's been solved thanks to your script. Great -
RE: Using an observer to delete a screen note
Hello,
I experimented a little with modules now and I think (hope) I now understand the use of them.
Despite all your great help it took me several hours till I found this:
@unknownuser said:
Like class methods, whenever you define a method in a module, you specify the module name followed by a dot and then the method name.
Before that I used the method name without the module name in front and nothing worked...
Matthias
-
RE: How to input a time ?
@dan rathbun said:
@pvbuero said:
Where to find the variable with the time ?
def get_shadow_time > model = Sketchup.active_model > shadowinfo = model.shadow_info > shadtime = shadowinfo['ShadowTime'] > # shadtime is a Time class object > end >
I didn't mean in SU. I meant "variable with the time" in the javascript file ...
But I think that's to much new stuff at once. -
RE: How to input a time ?
Hi,
had to pause a little with ruby and watch the soccer match
@unknownuser said:
You never were clear on whether it was sliders and spinner controls that you desired, or just a plain ol' entry box. ??
It not necessarily needs to be a slider. I do this little project just for fun and to learn how to use ruby.
As I'm always nosy for new things I wanted to know how user interfaces can be made in SU.
Now I know something about the different approaches and I also know that it takes a lot more effort to understand and use webdialogs than just configuring little predefined parts...For now I'm satisfied with Dan's script. Thank you for that...
Matthias -
RE: How to input a time ?
@thomthom said:
You'd have to make a webdialog. I'd recommend using a framework, like jQuery that make thing much easier. jQuery has UI plugin widgets that let you easily add the UI gadgets you need.
Sigh... I now know how sketchup functions can be called by a webdialog. I played a little with the example in chapter 13 of automatic sketchup...
But now back to my objective: I simply want to input a time with a webdialog. I googled timepicker jquery and found that.
But I've no idea how I can use that tool. Where to find the variable with the time ? where must the "window.location = 'skp:...." command be placed ? ...
Seems to me I have to learn jquery first, but therefore I need to learn javascript first
Well .. I didn't want to learn all languages available, I just want to input a time (and learn ruby for sketchup )Is there a little tutorial or something to make the first step using jquery UI plugins a litte easier ?
As always .. thanks a lot for your help.
Matthias -
RE: Using an observer to delete a screen note
@unknownuser said:
Oh! There I go again.. ranting on Namespaces. For more info from some of my other rants...
that's not ranting. Thats most valuable information for beginners like me, who don't see the wood for the trees...
Great help.
Matthias
-
RE: Using an observer to delete a screen note
it 's just an extract of the script with the part where the notes are added and where the pages are added with the corresponding note unhidden...
My script is far from perfect therefore I'didn't want to post it here.If you keep in mind, that it's the work of a beginner you can see it here complete:
require 'sketchup' Sketchup.send_action "showRubyPanel;" class ShadowInformation @@shadowinfo = Sketchup.active_model.shadow_info def sunrisetxt @sunrisetext = @@shadowinfo["SunRise"].gmtime.strftime("Sonnenaufgang; %H;%M Uhr") end def sunsettxt @sunsettext = @@shadowinfo["SunSet"].gmtime.strftime("Sonnenuntergang; %H;%M Uhr") end def shadowdatetxt @shadowdatetxt = @@shadowinfo["ShadowTime"].gmtime.strftime("Tag des Jahres; %d.%b") end def shadowtimetxt @shadowtimetxt = @@shadowinfo["ShadowTime"].gmtime.strftime("Uhrzeit; %H;%M") end end UI.menu("Plugins").add_item("Shadowanimation"){create_scenes} def create_scenes shadInf = ShadowInformation.new #UI.messagebox shadInf.shadowtimetxt @xpos_shadowtime = 0.1 @ypos_shadowtime = 0.2 shadowinfo = Sketchup.active_model.shadow_info #Stunde des Sonnenauf- und Untergang ermitteln von_Stunde = (shadowinfo["SunRise"].gmtime.hour.to_s) bis_Stunde = ((shadowinfo["SunSet"].gmtime.hour + 1).to_s) # Hier werden die Parameter fΓΌr die Verschattungsanimation abgefragt prompts = ["von-Stunde", "bis-Stunde"] defaults = [von_Stunde,bis_Stunde] list = ["1|2|3|4|5|6|7|8|9|10|11|12|","12|13|14|15|16|17|18|19|20|21|22|23|24"] input = UI.inputbox prompts, defaults, list, "Verschattungsanimation Voreinstellungen" sunrise = input[0].to_i sunset = input[1].to_i minute = 00 day = shadowinfo["ShadowTime"].gmtime.day month = shadowinfo["ShadowTime"].gmtime.month shadowtime_on_screen = [sunrise..sunset] for hour in sunrise..sunset time = Time.gm(2010,month,day,hour,minute,00) shadowinfo["ShadowTime"]= time shadowinfo["DisplayShadows"]= true shadowtime_on_screen[hour] = Sketchup.active_model.add_note (shadInf.shadowtimetxt,0.1,0.2) shadowtime_on_screen[hour].hidden = true end for hour in sunrise..sunset time = Time.gm(2010,month,day,hour,minute,00) shadowinfo["ShadowTime"]= time shadowtime_on_screen[hour].hidden = false page = Sketchup.active_model.pages.add time.strftime("%d %b %H;%M Uhr") shadowtime_on_screen[hour].hidden = true page.delay_time= 0 page.transition_time= 3 end Sketchup.active_model.add_note (shadInf.sunrisetxt,0.1,0.05) Sketchup.active_model.add_note (shadInf.sunsettxt,0.1,0.1) Sketchup.active_model.add_note (shadInf.shadowdatetxt,0.1,0.15) end
The idea is, that you can choose the starting- and the end-hour and that sunrise-hour and sunset-hour are the default values...
The next step would be the input of a start- and a end-time (instead of only the hour) and a that the time between the scenes could be choosen free. (instead of one hour steps).
Matthias
-
RE: How to input a time ?
Hi Dan,
thank's a lot for your help.
@unknownuser said:
Interesting! I just noticed that you have your time set to display the 24 hour clock.
I think that's because I use the german SU Version and we usually use a 24 hour clock here.
I 'll try to understand your code as an exercise but I' ve already begun to read the webdialogs chapter in Automatic SketchUp... I'm curious where that leads me to.
Matthias