[Plugin] Model Scrambler v1.0 UPDATED: (June 11, 2009)
-
Thank you very mach!
-
I finally figured out how to get the last part working, and now it can scramble your models a whole lot more!
=... I'm still looking for Ideas to add more features, as-well as reports of anyone who's having problems with it.
-
@unknownuser said:
β’To change the part that takes groups and components and rotates them slightly, so that it rotates them around the center of the bounding box, instead of the axes.
http://code.google.com/apis/sketchup/docs/ourdoc/boundingbox.html#center ?
...I hope noone at my office gets hold of this script... smells evil...
-
@thomthom said:
@unknownuser said:
β’To change the part that takes groups and components and rotates them slightly, so that it rotates them around the center of the bounding box, instead of the axes.
http://code.google.com/apis/sketchup/docs/ourdoc/boundingbox.html#center ?
...I hope noone at my office gets hold of this script... smells evil...
I know about the group.bounds.center method, my biggest issue is how to rotate it around the center. I've tried a lot of times, and every time I fail miserably.
-
` group = the group you want to transform
group.transformation.zaxis #this gets the z axis for the group
angle = rand()
point = group.bounds.centert = Geom::Transformation.rotation point, vector, angle
group.transform! t`That should do it more or less. Unless I've got some typos. And use rand90 however you would like. You could even randomize the vector. I just used the blue axis so it will rotate around that.
Chris
-
Thanks Chris; I'll try that
... I also (accidentally) found out another use for scattering points
... I'm now thinking of maybe putting in the option to either scramble selected objects, as-well as all entities...
-
Awesome, looks great! That's the way to do it, just keep adding features and simple scripts quickly can become very powerful.
Chris
-
No offense, but I can't see how and for what purpose would you would use this script?
-
Whew! I thought I was missing something in your description.
Thanks for the script, I guess
Ben
-
@ben ritter said:
No offense, but I can't see how and for what purpose would you would use this script?
... And that's the evil part!
There is (almost) no (constructive) use!One reason would be if you wanted to send a model to someone to see how it looks, without them being able to use it at all; see link.
http://forums.sketchucation.com/viewtopic.php?f=180&t=18227&st... Another could be for fun...
... Or using the scramble effect on objects to make things like water, rocks, clouds, or other randomly shaped objects...
...or using it (minus the reverse faces) to make models appear old/ worn...
-
Browsing through your code: you might want to change
require "Sketchup.rb"
torequire "sketchup.rb"
(no capital letter.)You get a double entry for the ruby console otherwise.
-
I'll make sure to do that in the next version, remus.
... Also, in order for it to work properly for selections, I'd have to find a way to select the entities in a component after exploding it. I've found a way to do it with groups, but not components. Any ideas?
-
This post is almost a year old, but I'm hopeful that BTM is still working on this idea. I'm looking fo ra routine/script that will lock/secure the model from changes, but NOT from being viewed by a client.
Also need to allow clients to: display grade elevations with the "query" tool, and see saved views "scenes/pages".
Any help would be super.
Thanks,
mojo -
Hey Mojo, actually this thread is just a few days old, not a year. So you are right on time for the party.
However, the problem with a script that keeps the client from changing anything - well all they would have to do is uninstall the script. Or more likely, never install it in the first place. There is no way to build that tpye of functionality into a model itself unfortunately.
But this is exactly the type of conversation that spawned the script. Remus wanted something that would just mess up every vertex in the model so nothing would be accurate, thereby making it nearly impossible to build off of or steal.
Chris
PS, I'm just through the tunnel in Berkeley.
-
@chris fullmer said:
the problem with a script that keeps the client from changing anything - well all they would have to do is uninstall the script. Or more likely, never install it in the first place. There is no way to build that tpye of functionality into a model itself unfortunately.
β¦ You sure? I remember once that CPhillips was going to try and embed sound files into skp files, maybe it's possible with ruby scripts. I'd have no Idea myself though, but you never knowβ¦
-
@unknownuser said:
@chris fullmer said:
the problem with a script that keeps the client from changing anything - well all they would have to do is uninstall the script. Or more likely, never install it in the first place. There is no way to build that tpye of functionality into a model itself unfortunately.
β¦ You sure? I remember once that CPhillips was going to try and embed sound files into skp files, maybe it's possible with ruby scripts. I'd have no Idea myself though, but you never knowβ¦
You can store an script in an dictionary attribute, but it'd never trigger unless you have another script that executes it.
-
In which menu is the option?
-
I been off on other projects since June, and thought Id just see the status of the Scrambler. Any news?
Sounds like it may develop into a kind of PGP, where the model is scrambled at the source before sending, and the Un-Scrambler, being embedded in the model, is triggered somehow. But I may be over-reaching -- is there such a thing as an Un-Scrambler?At any rate, what I was looking for originally, was some sort of lock to put on the model, to: 1) prevent changes by others, and 2) therefore to create a sort of brute force copyright.
And another thang, Does anyone have any experience with adobe PDF in 3D? could that be a solution...
Thanks!
john -
Hey John, I had worked on a model scrambler that would also unscramble it afterwards. I think it is around here somewhere on the forum. Turned out to not really be what I wanted. I was also looking for a way to lock a model.
So far, model locking is not possible in plain .skp format.
There has been some work done with 3d pdfs though. I think Al at Renderplus has done some work on this, making a 3d pdf exporter. Check it out here:
http://www.renderplus.com/wk/RPS_3D_PDF_w.htm
Hope that helps,
Chris
-
The PDF exporter by Renderplus is actually a cool plugin.
Advertisement