• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

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

Scheduled Pinned Locked Moved Plugins
22 Posts 9 Posters 18.0k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    BTM
    last edited by BTM 11 Jun 2009, 01:30

    Before...
    After... (with softening)
    Before...
    After! (with softening)

    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?


    btm_Model_Scramble.rb

    1 Reply Last reply Reply Quote 0
    • C Offline
      Chris Fullmer
      last edited by 11 Jun 2009, 01:57

      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

      1 Reply Last reply Reply Quote 0
      • B Offline
        bianhai
        last edited by 11 Jun 2009, 04:58

        Thank you very mach! 👍

        1 Reply Last reply Reply Quote 0
        • B Offline
          BTM
          last edited by 11 Jun 2009, 16:53

          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.

          1 Reply Last reply Reply Quote 0
          • T Offline
            thomthom
            last edited by 11 Jun 2009, 17:20

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

            Thomas Thomassen — SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

            1 Reply Last reply Reply Quote 0
            • B Offline
              BTM
              last edited by 11 Jun 2009, 17:23

              @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. 😞

              1 Reply Last reply Reply Quote 0
              • C Offline
                Chris Fullmer
                last edited by 11 Jun 2009, 17:47

                ` 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

                1 Reply Last reply Reply Quote 0
                • B Offline
                  BTM
                  last edited by 11 Jun 2009, 18:16

                  Thanks Chris; I'll try that 👍

                  ... I also (accidentally) found out another use for scattering points 💚
                  It looks like a crumpled can, doesn't it?

                  ... I'm now thinking of maybe putting in the option to either scramble selected objects, as-well as all entities...

                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    Chris Fullmer
                    last edited by 11 Jun 2009, 18:22

                    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

                    1 Reply Last reply Reply Quote 0
                    • B Offline
                      Ben Ritter
                      last edited by 11 Jun 2009, 19:11

                      No offense, but I can't see how and for what purpose would you would use this script? ☀

                      1 Reply Last reply Reply Quote 0
                      • B Offline
                        Ben Ritter
                        last edited by 11 Jun 2009, 19:40

                        Whew! I thought I was missing something in your description. 💭

                        Thanks for the script, I guess 😉

                        Ben

                        1 Reply Last reply Reply Quote 0
                        • B Offline
                          BTM
                          last edited by 11 Jun 2009, 20:13

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

                          1 Reply Last reply Reply Quote 0
                          • R Offline
                            remus
                            last edited by 12 Jun 2009, 16:37

                            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.

                            http://remusrendering.wordpress.com/

                            1 Reply Last reply Reply Quote 0
                            • B Offline
                              BTM
                              last edited by 13 Jun 2009, 00:30

                              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?

                              1 Reply Last reply Reply Quote 0
                              • J Offline
                                jcc
                                last edited by 14 Jun 2009, 09:37

                                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

                                1 Reply Last reply Reply Quote 0
                                • C Offline
                                  Chris Fullmer
                                  last edited by 14 Jun 2009, 16:03

                                  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

                                  1 Reply Last reply Reply Quote 0
                                  • B Offline
                                    BTM
                                    last edited by 14 Jun 2009, 18:41

                                    @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…

                                    1 Reply Last reply Reply Quote 0
                                    • T Offline
                                      thomthom
                                      last edited by 14 Jun 2009, 18:56

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

                                      Thomas Thomassen — SketchUp Monkey & Coding addict
                                      List of my plugins and link to the CookieWare fund

                                      1 Reply Last reply Reply Quote 0
                                      • M Offline
                                        MrPlanet
                                        last edited by 4 Jul 2009, 21:00

                                        In which menu is the option?

                                        I reject your reality and substitute my own.

                                        1 Reply Last reply Reply Quote 0
                                        • J Offline
                                          jcc
                                          last edited by 4 Sept 2009, 04:13

                                          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

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 1 / 2
                                          • First post
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement