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!
    🔌 Easy Offset | Offset selected faces in SketchUp in positive and negative offsets. Download

    [Plugin] Memory Copy (xformclone.rb)

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

      I support Plot Paris' request. This would indeed be a handy feature.
      Don't know though what the easiest way for implementing a sequence of transformations would be.

      1 條回覆 最後回覆 回覆 引用 0
      • plot-parisP 離線
        plot-paris
        最後由 編輯

        dear Adam,

        I thank you so much for having a go with this script. I truely believe that this could be one of the most used functions throughout my daily modelling.

        what I experienced with a first test:

        http://img256.imageshack.us/img256/517/memorycopyht6.jpg

        I rotated a copy of the component arround axis A and moved it up vertically. when selecting the "Play it Again" function, it currently creates three copies.
        in the first test it applied the vertical movement correctly. rotation however appeared to be applied arround the component's origin and not arround the actually used axis of rotation.

        on other attempts it worked perfectly fine for two times, then reversed the copying direction, so that I suddenly had two components on top of each other.

        but the general idea seems to be working - I am very excited!

        the next step now would be (apart from finding the cause for the random direction of course) to make the "select one instance, then select another to indicate the direction"-process automatic.

        what I mean is: you select a component. when you create a copy of it, the original component is automatically remembered as the first one. after you did some modifications to the copy you press the keyboardshortcut (therefore we need an entry in the "Tools- or Plugins- menue") and a copy is created.
        repeated pressing of the shortcut key creates more copies...
        I think that would be the fastest workflow imaginable.

        another issue at the moment is, that the plugin doesn't seem to regard the order in which the changes have been applied.

        for example, when have a component, 50cm from the origin. I now rotate it arround the origin horizontally (A), then I rotate it vertically arround it's centre (B).
        if I now apply the plugin, it applies the rotation about it's centre (A) first, then does the other rotation (B)arround a pivot point that has been affected by the first alteration (A) as well - meaning that the center of rotation (B) has been rotated vertically arround the centre of the component.
        thus the resulting overall movement is not as intended.

        oh, dear. I hope that was understandable. 😕

        again, thank you so much for this first plugin. it really is a dream becoming true!

        1 條回覆 最後回覆 回覆 引用 0
        • AdamBA 離線
          AdamB
          最後由 編輯

          Yes, clear as mud... 😒

          I should have explained it was just me banging out some code while I finished my after lunch espresso, not some finished thang. More a proof of concept. Mea culpa.

          1. I'd left in a hardcoded '3' for the number of times to do the clone. It should be 1 (or perhaps read the VCB?)
          2. The plugin wrongly relies on an ordering of the SketchUp Selection buffer. ie Selection is an unordered group of stuff you've hilighted, but this v0.000001 of the plugin was presuming the first thing in the Selection was the first thing you selected - which as you've discovered is not true - and nor should it be either I hasten to add.

          So. I think I'll change it so you highlight an Instance, hover over another instance and right click - (ie an implicit second instance).

          But but I've got things to do.. but I'll try to get to it soon.

          Adam

          Developer of LightUp Click for website

          1 條回覆 最後回覆 回覆 引用 0
          • plot-parisP 離線
            plot-paris
            最後由 編輯

            oh, of course I understood it to be just a fist vague idea of the script. all the more reason to be impressed, that you are able to produce something like this during an after lunch expresso!

            and of course, take your time. this plugin is nothing desperately needed (allthough it will be one of the most used ones... 😉 )

            1 條回覆 最後回覆 回覆 引用 0
            • AdamBA 離線
              AdamB
              最後由 編輯

              I decided to get it out the way. Here it is.

              1. Create an instance of component
              2. Duplicate and position a second instance
              3. Right click on first instance and choose "Play it again.."
              4. Now if you hover over any instance that is the same definition as your 'start' instance it will be highlighted.
              5. Left button to create a new instance.
              6. Type string of the form "123x" in the VCB to set the number of instances to create per left button click.
              7. Click away from geometry to exit tool

              Enjoy,
              Adam


              Stick it in your plugins folder

              Developer of LightUp Click for website

              1 條回覆 最後回覆 回覆 引用 0
              • A 離線
                agrazdi
                最後由 編輯

                WOW MARVELOUS

                Thanks

                agrazdi

                1 條回覆 最後回覆 回覆 引用 0
                • R 離線
                  remus
                  最後由 編輯

                  Cheers adam,

                  i have a feeling this is going to become one of those 'how did i ever do that before?' type plugins.

                  http://remusrendering.wordpress.com/

                  1 條回覆 最後回覆 回覆 引用 0
                  • R 離線
                    remus
                    最後由 編輯

                    A quick demo for the non believers.
                    362 segments and about 4 clicks of the mouse 😄

                    http://farm4.static.flickr.com/3053/2850475960_fce2e892d6_o.jpg

                    http://remusrendering.wordpress.com/

                    1 條回覆 最後回覆 回覆 引用 0
                    • plot-parisP 離線
                      plot-paris
                      最後由 編輯

                      this is marvellous! thanks a lot, Adam!

                      however, I don't get the multiply function to work. tried everything; typing in the number with and without an x, before and after left clicking the second component. didn't get it to work 😞
                      (I use Windows Vista)

                      1 條回覆 最後回覆 回覆 引用 0
                      • AdamBA 離線
                        AdamB
                        最後由 編輯

                        Glad you like it.

                        Feel free to slap me here but you did press return after typing the "5x" or whatever, didn't you.

                        Adam

                        Developer of LightUp Click for website

                        1 條回覆 最後回覆 回覆 引用 0
                        • Dave RD 離線
                          Dave R
                          最後由 編輯

                          Wow! Adam, this is another great plugin. Thank you.

                          Etaoin Shrdlu

                          %

                          (THERE'S NO PLACE LIKE)

                          G28 X0.0 Y0.0 Z0.0

                          M30

                          %

                          1 條回覆 最後回覆 回覆 引用 0
                          • M 離線
                            Matt666
                            最後由 編輯

                            Excellent script !!!! Thank you !

                            @unknownuser said:

                            • version_2 has to be applied directly after the copying/transformation process (like the array fuction only works directly after the copying process, because it retrieves it's information from the last action). therefore we need a shortcut for this function (and an entry in one of the menues).
                              Totally agree. That would be awesome !

                            Frenglish at its best !
                            My scripts

                            1 條回覆 最後回覆 回覆 引用 0
                            • M 離線
                              Matt666
                              最後由 編輯

                              A little update, for future improvements noticed above !!
                              😉 😄 😄
                              Good luck AdamB !! 💚 💚 😍

                              PS : And sorry for my incompetence... I don't have enough talent to modify your script 😕

                              Frenglish at its best !
                              My scripts

                              1 條回覆 最後回覆 回覆 引用 0
                              • free agentF 離線
                                free agent
                                最後由 編輯

                                awsome script, i can think of quite a few things to use this for. but i have a suggestion/request

                                1. could we also get a version where we can devide the action? so it fills in the instances between a move and rotation?

                                2. for tree branches this would be awsome if we could taper the size of instances or even have some kind of size randomizer on it.

                                but i think the first request is more important... thanx for the script

                                http:i167.photobucket.comalbumsu143FreeAgent84bug.gif

                                1 條回覆 最後回覆 回覆 引用 0
                                • D 離線
                                  Daniel Bouchard
                                  最後由 編輯

                                  Thanks Adam,

                                  Wonderful script!

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • thomthomT 離線
                                    thomthom
                                    最後由 編輯

                                    Yet another muscle to SU. 😄

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

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • W 離線
                                      watkins
                                      最後由 編輯

                                      Dear Adam,

                                      Trying out your script and enjoying the unexpected results.

                                      Thank you for all your efforts.

                                      Kind regards,
                                      Bob


                                      Move and rotate.skp

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • M 離線
                                        mattjc
                                        最後由 編輯

                                        Hi, this script is excellent.. trouble is i am having some trouble - when i key in the Nx in the VC box nothing happens - I noticed someone else had this trouble... i am running windows XP - can anyone help?!?!

                                        Thanks

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • plot-parisP 離線
                                          plot-paris
                                          最後由 編輯

                                          I understand that you had to ask. 😄
                                          I did indeed (among every other method imaginable) hit enter after typing in Nx. just tried it here in the office (Windows XP) - works like a charm. may be a vista problem then.

                                          some suggestions, observations:
                                          would you mind changing the Nx to N***** to go in line with the native SketchUp input?
                                          and to assimilate the native workflow even more: is it possible to left-click the second component to be copied and then type in N*? because I love the way it works with the array function in SketchUp at the moment (that you can change the number of copies (or divisions for that matter...) repeatedly, simply by retyping 3*, 11*, 15*, 3*...).

                                          an observation I made is that the order of modifications does still make no difference (of course not - that would only be possible if you applied the function directly after the copy-and-transform process).
                                          that means that if you have more than one rotation process applied to the component-copy you may get results different from your intentions:

                                          http://img360.imageshack.us/img360/6206/copymemory2lr8.jpg

                                          in this example I rotated the component arround axis A, then rotated it vertically around the outer corner. to get the desired result, the script had to repeat these steps in exactly the same order (rotate arround A 2x, 3x, 4x... the initial distance, then rotate 2x, 3x, 4x... arrount the outer corner).
                                          the current version of the script however takes the overall changes in position/rotation which in this example results in the first rotation axis B being distorted - merged with the second rotation so to speak

                                          now that I think about it - the result as we get it at the moment may be quite useful as well at some time.
                                          maybe there is the need for two different versions:

                                          • verion_1 works exactly like the current script (with the minor changes I suggested at the top of this post 😉 ). it would make sense to have an entry within the "tools menue" to keep the context menue tidier. you can choose this function at every point of the modelling process, because it is history independent and retrieves every information from the selected geometry

                                          • version_2 has to be applied directly after the copying/transformation process (like the array fuction only works directly after the copying process, because it retrieves it's information from the last action). therefore we need a shortcut for this function (and an entry in one of the menues).

                                          I hope my thoughts are comprehensible.
                                          have to start doing some office work now 😄

                                          1 條回覆 最後回覆 回覆 引用 0
                                          • plot-parisP 離線
                                            plot-paris
                                            最後由 編輯

                                            I just had the need to use this script, but it got lost on the way to the SU7 installation. so I looked for it again and re-read some posts on the way.
                                            and I still think it would be cool to have a second version of the script that works slightly different, as I stated in this post above:

                                            @unknownuser said:

                                            I understand that you had to ask. 😄
                                            I did indeed (among every other method imaginable) hit enter after typing in Nx. just tried it here in the office (Windows XP) - works like a charm. may be a vista problem then.

                                            some suggestions, observations:
                                            would you mind changing the Nx to N***** to go in line with the native SketchUp input?
                                            and to assimilate the native workflow even more: is it possible to left-click the second component to be copied and then type in N*? because I love the way it works with the array function in SketchUp at the moment (that you can change the number of copies (or divisions for that matter...) repeatedly, simply by retyping 3*, 11*, 15*, 3*...).

                                            an observation I made is that the order of modifications does still make no difference (of course not - that would only be possible if you applied the function directly after the copy-and-transform process).
                                            that means that if you have more than one rotation process applied to the component-copy you may get results different from your intentions:

                                            http://img360.imageshack.us/img360/6206/copymemory2lr8.jpg

                                            in this example I rotated the component arround axis A, then rotated it vertically around the outer corner. to get the desired result, the script had to repeat these steps in exactly the same order (rotate arround A 2x, 3x, 4x... the initial distance, then rotate 2x, 3x, 4x... arrount the outer corner).
                                            the current version of the script however takes the overall changes in position/rotation which in this example results in the first rotation axis B being distorted - merged with the second rotation so to speak

                                            now that I think about it - the result as we get it at the moment may be quite useful as well at some time.
                                            maybe there is the need for two different versions:

                                            • verion_1 works exactly like the current script (with the minor changes I suggested at the top of this post 😉 ). it would make sense to have an entry within the "tools menue" to keep the context menue tidier. you can choose this function at every point of the modelling process, because it is history independent and retrieves every information from the selected geometry

                                            • version_2 has to be applied directly after the copying/transformation process (like the array fuction only works directly after the copying process, because it retrieves it's information from the last action). therefore we need a shortcut for this function (and an entry in one of the menues).

                                            I hope my thoughts are comprehensible.
                                            have to start doing some office work now 😄

                                            what do you think? wouldn't that be cool?

                                            1 條回覆 最後回覆 回覆 引用 0
                                            • 1
                                            • 2
                                            • 3
                                            • 3 / 3
                                            • 第一個貼文
                                              最後的貼文
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement