sketchucation logo sketchucation
    • 登入
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🔌 Smart Spline | Fluid way to handle splines for furniture design and complex structures. Download

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

    已排程 已置頂 已鎖定 已移動 Plugins
    22 貼文 9 Posters 18.9k 瀏覽 9 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • B 離線
      BTM
      最後由 BTM 編輯

      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 條回覆 最後回覆 回覆 引用 0
      • Chris FullmerC 離線
        Chris Fullmer
        最後由 編輯

        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 條回覆 最後回覆 回覆 引用 0
        • B 離線
          bianhai
          最後由 編輯

          Thank you very mach! 👍

          1 條回覆 最後回覆 回覆 引用 0
          • B 離線
            BTM
            最後由 編輯

            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 條回覆 最後回覆 回覆 引用 0
            • thomthomT 離線
              thomthom
              最後由 編輯

              @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 條回覆 最後回覆 回覆 引用 0
              • B 離線
                BTM
                最後由 編輯

                @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 條回覆 最後回覆 回覆 引用 0
                • Chris FullmerC 離線
                  Chris Fullmer
                  最後由 編輯

                  ` 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 條回覆 最後回覆 回覆 引用 0
                  • B 離線
                    BTM
                    最後由 編輯

                    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 條回覆 最後回覆 回覆 引用 0
                    • Chris FullmerC 離線
                      Chris Fullmer
                      最後由 編輯

                      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 條回覆 最後回覆 回覆 引用 0
                      • B 離線
                        Ben Ritter
                        最後由 編輯

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

                        1 條回覆 最後回覆 回覆 引用 0
                        • B 離線
                          Ben Ritter
                          最後由 編輯

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

                          Thanks for the script, I guess 😉

                          Ben

                          1 條回覆 最後回覆 回覆 引用 0
                          • B 離線
                            BTM
                            最後由 編輯

                            @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 條回覆 最後回覆 回覆 引用 0
                            • R 離線
                              remus
                              最後由 編輯

                              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 條回覆 最後回覆 回覆 引用 0
                              • B 離線
                                BTM
                                最後由 編輯

                                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 條回覆 最後回覆 回覆 引用 0
                                • J 離線
                                  jcc
                                  最後由 編輯

                                  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 條回覆 最後回覆 回覆 引用 0
                                  • Chris FullmerC 離線
                                    Chris Fullmer
                                    最後由 編輯

                                    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 條回覆 最後回覆 回覆 引用 0
                                    • B 離線
                                      BTM
                                      最後由 編輯

                                      @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 條回覆 最後回覆 回覆 引用 0
                                      • thomthomT 離線
                                        thomthom
                                        最後由 編輯

                                        @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 條回覆 最後回覆 回覆 引用 0
                                        • M 離線
                                          MrPlanet
                                          最後由 編輯

                                          In which menu is the option?

                                          I reject your reality and substitute my own.

                                          1 條回覆 最後回覆 回覆 引用 0
                                          • J 離線
                                            jcc
                                            最後由 編輯

                                            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 條回覆 最後回覆 回覆 引用 0
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • 第一個貼文
                                              最後的貼文
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement