If you open the ruby console it will print performance statistics after each run. If you find a model that is much slower post a link and I'll take a looks.
Posts
-
RE: SketchyPhysics 4?
-
RE: SketchyPhysics 4?
Ah, I think I see the problem with bad scripts "breaking" the model. I'll fix it.
Hitting reset or a bunch of undo's might allow you to get back to start.
-
RE: SketchyPhysics 4?
It will eventually. Right now this is just a work in progress release.
Unless you get into a loop you should be able to reset and get back to the start no matter what errors.
If you do find a piece of script that permanently breaks a model post it here.
-
RE: SketchyPhysics 4?
I think I had the idea before but I am not sure. The hard part was the plumbing around it.
$curEvalGroup isnt used anymore. Instead just use "group".
The code in the old scripting thread is obsolete. Here is almost the same thing:
onstart{ group.hidden=true @unhideAtEnd=true solid=false } ontouch{|toucher,speed,pos| if(toucher.name=="sphere") group.hidden=false solid=true end }I dont know any reason this version would be slower than the last.
-
RE: SketchyPhysics 4?
I havent released it yet because I found that problem and I need to write some release notes.
The "scripted" field is totally different from the other scripted fields. Command that work in there will not work in Controller (for example) and visa-versa.
Try this in the Scripted field
onclick{ destroy }The body will be destroyed when you click it.
-
RE: Working on new scripting system.
Not yet. But I could probably add that without too much trouble.
-
RE: Working on new scripting system.
Sigh, I guess a little pressure is warranted. Its been a while since a release. Ill work on an interim release but no promises.
-
RE: Working on new scripting system.
Almost all of the new stuff is outlined in this thread. Mostly it is the new scripting system which should make a lot of new stuff possible.
Beyond that there is the ability to set object density and maybe adjustments to how stiff some joints are.
-
RE: Joint Variables
Yes.
in servos controller (not tested)
@myPos=0.0 if frame==0;@myPos+=0.1 if(key("up"));@myPos -
RE: Scissors effect - solved
Thats right. The 3rd party slider control I use doesn't correctly show the initial position of the slider. Click somewhere and it will snap to the actual value.
One more reason to get rid of webdialogs.
-
RE: Coded accel and damp
Cant do it with the current version. In the next version you should (I havent actually done it yet) be able to adjust any of the parameters on a joint and then that kind of braking would be possible.
-
RE: Driving joints from external data?
Very cool script. I still dont understand how it actually works.

-
RE: Working on new scripting system.
I am sorry, I really dont know at this point. I am making good progress but so much of it is unfinished and during the summer the amount of time I can spend on it is limited. I might setup a closed beta so that you guys can start testing some of the new scripting features.
Lately I am working on doing the scripting interface in wxSU instead of webdialogs. That should make it a lot simpler to add new features. Also I am going to add some settings to fixed joints to allow them to be "springy". Its hard to explain but kinda fun.
-
RE: "faux" Fluid Stream
Except for the buoyancy plane (which isnt fluid at all) I dont really think fluid is possible with the current version. Maybe lots and lots of spheres.
-
RE: Sketchyphysics Class
Agreed about starting with the basics. That seems to be what trips most users up.
-
RE: Joint Variables
If you mean read the actual rotation of a body connected to a joint, no. Not in this version.
-
RE: Light effects
No lights in SketchyPhysics. Also no color changing and no fluid effects.
-
RE: Driving joints from external data?
It would depend on how complex the model is.
-
RE: Driving joints from external data?
@wacov said:
Basically any ruby can work from within the scripting fields of SP, but I guess if it was very long/complicated you could do it externally. Chris, can you tell the distance with SU's raytest... or anything other than the name of whatever it hits?
Yeah. I havent tested it but it would be something like this.
point=[0,0,0] up=[0,0,1] contact=Sketchup.active_model.raytest(point,up) if(contact!=nil) dist=contact[0].distance(point) end