SketchUcation Plugin Store

 

 

[Plugin] Model Scrambler v1.0 UPDATED: (June 11, 2009)

[Plugin] Model Scrambler v1.0 UPDATED: (June 11, 2009)

Postby •BTM » Thu Jun 11, 2009 2:30 am

before.png

after.png

before monochrome.png

after monochrome.png


Version: 1.0

Use: Rotates groups and Components slightly, explodes them, purges unused components, then takes all faces and reverses random ones, painting them as they were. each event can be turned on/off when the script is selected.

UPDATE June 11, 2009:
It is now able to explode all curves, and moves random points or all points by random vectors, based on a value input by the user, which dictates maximum distance in all directions ( I use 0.0001m).

Description: It's meant as a way to scramble a model, to make it harder to edit. There are other uses too though.


Things I'm trying to fix are:

•To get all the text to appear in the inputbox.

•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.

•To soften all new lines made by the point scattering part.

•... Suggestions?
Please, register (free) to access all the attachments on the forums.
Last edited by •BTM on Sat Jun 13, 2009 1:31 am, edited 10 times in total.
•BTM
 
Posts: 717
Joined: Wed Jul 23, 2008 12:59 am

Re: [Plugin] Model Scrambler v0.1 ( June 10, 2009)

Postby Chris Fullmer » Thu Jun 11, 2009 2:57 am

Ha, that's great! Glad you got it working, and that's a great first plugin release, congratulations!

Chris
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6680
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] Model Scrambler v0.1 ( June 10, 2009)

Postby bianhai » Thu Jun 11, 2009 5:58 am

Thank you very mach! :thumb:
bianhai
Banned
 
Posts: 191
Joined: Fri Nov 30, 2007 3:05 pm
Location: Shanghai China
Name: Brian

Re: [Plugin] Model Scrambler v1.0 UPDATED: June 11, 2009

Postby •BTM » Thu Jun 11, 2009 5:53 pm

I finally figured out how to get the last part working, and now it can scramble your models a whole lot more!
:mrgreen: = :twisted:

... I'm still looking for Ideas to add more features, as-well as reports of anyone who's having problems with it.
•BTM
 
Posts: 717
Joined: Wed Jul 23, 2008 12:59 am

Re: [Plugin] Model Scrambler v1.0 UPDATED: June 11, 2009

Postby thomthom » Thu Jun 11, 2009 6:20 pm

•BTM wrote:•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/do ... tml#center ?


...I hope noone at my office gets hold of this script... smells evil...
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17545
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Model Scrambler v1.0 UPDATED: June 11, 2009

Postby •BTM » Thu Jun 11, 2009 6:23 pm

thomthom wrote:
•BTM wrote:•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/do ... tml#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. :(
•BTM
 
Posts: 717
Joined: Wed Jul 23, 2008 12:59 am

Re: [Plugin] Model Scrambler v1.0 UPDATED: June 11, 2009

Postby Chris Fullmer » Thu Jun 11, 2009 6:47 pm

group = the group you want to transform
group.transformation.zaxis #this gets the z axis for the group
angle = rand()
point = group.bounds.center

t = 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
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6680
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] Model Scrambler v1.0 UPDATED: June 11, 2009

Postby •BTM » Thu Jun 11, 2009 7:16 pm

Thanks Chris; I'll try that :thumb:

... I also (accidentally) found out another use for scattering points :mrgreen:
scatter.png


... I'm now thinking of maybe putting in the option to either scramble selected objects, as-well as all entities...
Please, register (free) to access all the attachments on the forums.
•BTM
 
Posts: 717
Joined: Wed Jul 23, 2008 12:59 am

Re: [Plugin] Model Scrambler v1.0 UPDATED: June 11, 2009

Postby Chris Fullmer » Thu Jun 11, 2009 7:22 pm

Awesome, looks great! That's the way to do it, just keep adding features and simple scripts quickly can become very powerful.

Chris
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6680
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] Model Scrambler v1.0 UPDATED: June 11, 2009

Postby Ben Ritter » Thu Jun 11, 2009 8:11 pm

No offense, but I can't see how and for what purpose would you would use this script? :enlight:
Ben Ritter
 
Posts: 351
Joined: Wed Nov 14, 2007 4:55 pm
Location: Malta, Illinois

Re: [Plugin] Model Scrambler v1.0 UPDATED: June 11, 2009

Postby •BTM » Thu Jun 11, 2009 8:25 pm

Ben Ritter wrote:No offense, but I can't see how and for what purpose would you would use this script? :enlight:

... And that's the evil part! :twisted:
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.
viewtopic.php?f=180&t=18227&st

... Another could be for fun... :twisted:

... 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...
Last edited by •BTM on Thu Jun 11, 2009 9:13 pm, edited 1 time in total.
•BTM
 
Posts: 717
Joined: Wed Jul 23, 2008 12:59 am

Re: [Plugin] Model Scrambler v1.0 UPDATED: June 11, 2009

Postby Ben Ritter » Thu Jun 11, 2009 8:40 pm

Whew! I thought I was missing something in your description. :idea:

Thanks for the script, I guess ;)

Ben
Ben Ritter
 
Posts: 351
Joined: Wed Nov 14, 2007 4:55 pm
Location: Malta, Illinois

Re: [Plugin] Model Scrambler v1.0 UPDATED: June 11, 2009

Postby remus » Fri Jun 12, 2009 5:37 pm

Browsing through your code: you might want to change require "Sketchup.rb" to require "sketchup.rb" (no capital letter.)

You get a double entry for the ruby console otherwise.
remus
 
Posts: 8055
Joined: Fri Nov 30, 2007 8:48 am
Location: UK
Name: remus

Re: [Plugin] Model Scrambler v1.0 UPDATED: June 11, 2009

Postby •BTM » Sat Jun 13, 2009 1:30 am

I'll make sure to do that in the next version, remus. :thumb:


... 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?
•BTM
 
Posts: 717
Joined: Wed Jul 23, 2008 12:59 am

Re: [Plugin] Model Scrambler v1.0 UPDATED: (June 11, 2009)

Postby jcc » Sun Jun 14, 2009 10:37 am

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
jcc
 
Posts: 2
Joined: Wed Sep 17, 2008 4:37 am
Location: Walnut Creek, CA

Re: [Plugin] Model Scrambler v1.0 UPDATED: (June 11, 2009)

Postby Chris Fullmer » Sun Jun 14, 2009 5:03 pm

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.
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6680
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] Model Scrambler v1.0 UPDATED: (June 11, 2009)

Postby •BTM » Sun Jun 14, 2009 7:41 pm

Chris Fullmer wrote: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…
•BTM
 
Posts: 717
Joined: Wed Jul 23, 2008 12:59 am

Re: [Plugin] Model Scrambler v1.0 UPDATED: (June 11, 2009)

Postby thomthom » Sun Jun 14, 2009 7:56 pm

•BTM wrote:
Chris Fullmer wrote: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.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17545
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] Model Scrambler v1.0 UPDATED: (June 11, 2009)

Postby =Mr Planet= » Sat Jul 04, 2009 10:00 pm

In which menu is the option?
I reject your reality and substitute my own.
=Mr Planet=
 
Posts: 235
Joined: Thu Jul 17, 2008 5:33 pm
Location: A three-story cardboard box
Name: Shreeyam Kacker

Re: [Plugin] Model Scrambler v1.0 UPDATED: (June 11, 2009)

Postby jcc » Fri Sep 04, 2009 5:13 am

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
jcc
 
Posts: 2
Joined: Wed Sep 17, 2008 4:37 am
Location: Walnut Creek, CA

Re: [Plugin] Model Scrambler v1.0 UPDATED: (June 11, 2009)

Postby Chris Fullmer » Fri Sep 04, 2009 5:20 am

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
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6680
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: [Plugin] Model Scrambler v1.0 UPDATED: (June 11, 2009)

Postby Gaieus » Fri Sep 04, 2009 2:07 pm

The PDF exporter by Renderplus is actually a cool plugin.
Gai...
User avatar
Gaieus
Administrator
 
Posts: 27602
Joined: Sat Oct 20, 2007 8:24 am
Location: Pécs, Hungary
Name: Csaba Pozsárkó
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: historical reconstruction
Level of SketchUp: Advanced

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Need SketchUp Books, Models, Styles or Textures? Check out our One Stop Shop for SketchUp.

Premium Members get 20% discount!

Ad Machine
Robot
 
Posts: 2012


Return to Plugins

Who is online

Users browsing this forum: kaan75a, lefollp, pizon and 8 guests