• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Plugin] Point Merger tools v1.2 UPDATED@ 23/06/09

Scheduled Pinned Locked Moved Plugins
68 Posts 20 Posters 41.8k 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 16 Jun 2009, 10:14

    @chris fullmer said:

    Hi John, I think you just need to copy those 2 .rb files into your plugins folder. They don't need to be in the subfolder - unless I'm missing something. I'll edit that out if its wrong.

    Chris, you're right, they both go into the plugins folder.

    @chris fullmer said:

    @BTM - The reason that the class variables are not working correctly (meaning they are not keeping their value during the entire SU session) is because you are declaring the variable in your activate method. So everytime the activate the tool gets activated, it resets the @@max_weld_distance variable back to 0.0.to_l.

    I know that the variable needs to be outside of a method, but with things like
    @@max_weld_distance=1.to_l if not @@max_weld_distance
    it would call it an uninitialized variable, and give an error message.

    @chris fullmer said:

    So what you want to do is declare that variable inside the class, outside of the methods. Like this:

    class MergePoints @@max_weld_distance=0.0.to_l

    β˜€ It does work! I've been trying if functions, (so that if @@max_wld_distance doesn't have a value, it gets set to 0.0.to_l), but I kept getting error messages, and I guess that an if function isn't necessary. πŸ˜„

    1 Reply Last reply Reply Quote 0
    • J Offline
      JClements
      last edited by 16 Jun 2009, 13:30

      OK,

      I guess my original download of the two .rb's DID work. It was the UI that threw me off.

      When I selected the Merge Points submenu option, I expected the Dialog box to appear, but none did.

      1)
      Only by accident did I discover I had to hit the [Enter] key to display it.

      Question, shouldn't the dialog appear as soon as you select Merge Points from the submenu?

      Also, if that dialog or the Taskbar could include a message to "press [Enter] to change value" that would be helpful (if you don't use the script frequently, then it may take a bit of experimentation to use it properly πŸ˜„ )

      2)
      Regarding Merge Points to Line, it seems to do just the opposite. The dialog box appears when you first select it from the submenu, but you can't recall the dialog by pressing [Enter], you have to go back to the submenu. Can [Enter] be used to recall the appropriate dialog too?

      3)
      Once used Undo doesn't work well. Is there a way to undo all changes performed between mouse-clicks at once?

      John | Illustrator | Beaverton, Oregon

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

        @jclements said:

        OK,

        I guess my original download of the two .rb's DID work. It was the UI that threw me off.

        When I selected the Merge Points submenu option, I expected the Dialog box to appear, but none did.

        1)
        Only by accident did I discover I had to hit the [Enter] key to display it.

        Question, shouldn't the dialog appear as soon as you select Merge Points from the submenu?

        Also, if that dialog or the Taskbar could include a message to "press [Enter] to change value" that would be helpful (if you don't use the script frequently, then it may take a bit of experimentation to use it properly πŸ˜„ )

        2)
        Regarding Merge Points to Line, it seems to do just the opposite. The dialog box appears when you first select it from the submenu, but you can't recall the dialog by pressing [Enter], you have to go back to the submenu. Can [Enter] be used to recall the appropriate dialog too?

        3)
        Once used Undo doesn't work well. Is there a way to undo all changes performed between mouse-clicks at once?

        OK, I'll address some of these issues soon. I'm adding "Press Enter/ Return to set radius" in the status box for the Merge Points tool in the next release. As for the dialogue appearing as soon as you select the tool, I find it easier to use it like a normal tool with a radius, such as the smoove tool does. I want to get the VCB working later too, then it would save a lot of confusion, but that seems a bit tricky to do.

        As for the 'Merge Points to Lines' tool, it affects the model upon activation, so I don't see why you'd need to open it again.

        …Lastly, I think there's a method I could find somewheres that would make all the transformations into one action for undo, but I'm not sure. I'll look into it.

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

          Here's a little video of me trying to use the 'Merge Points to Lines' tool to do some stitching with GE terrains.
          http://www.screencast.com/t/s1SkJiUjH
          It's 3 minutes long, because I kept changing styles, softening, etc., and I couldn't use my toolbar due to the size of the window. πŸ˜†

          steps:

          β€’ explode, unhide and unsoften 2 snapshots from google earth.

          β€’ figure out what the max range for the tool should be. (I use line tool to see how much things would have to move, then make the max about 25% bigger than that, just in case.)

          β€’ completely select one of the meshes.

          β€’ use the 'Merge Points to Lines' tool.

          β€’ Select both meshes (because sketchup doesn't connect the points together automatically for some reason), and use intersect. Select the mesh, soften it, and fix any problem areas(there shouldn't be too many)

          β€’ Repeat these steps to add other snapshots to the previous mesh.

          1 Reply Last reply Reply Quote 0
          • C Offline
            CameronVan
            last edited by 17 Jun 2009, 20:49

            Thanks for this script. It will prove very handy.

            1 Reply Last reply Reply Quote 0
            • C Offline
              chango70
              last edited by 17 Jun 2009, 23:14

              Great script!

              I just tested it and 2 things came up.

              1. I noticed that when I press undo after a point Merge operation it does not undo the entire procedure, rather breaks it down to individual line moves.
              2. I cannot get it to work if the geometry is in side a group.

              If those 2 issue can be addressed this would one of the most useful scripts out there! Well deserve a custom button I think, hint hint CADFather 😎

              1 Reply Last reply Reply Quote 0
              • C Offline
                chango70
                last edited by 17 Jun 2009, 23:21

                Oh yes one more thing. Would be great if you can add a CTLR modifier to make the new mesh smooth. Oh I am just been greedy now. Great job πŸ‘ !

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

                  @chango70 said:

                  1. I noticed that when I press undo after a point Merge operation it does not undo the entire procedure, rather breaks it down to individual line moves.

                  I've got this working properly now, and it will be fixed in the next release for the tools.

                  @chango70 said:

                  1. I cannot get it to work if the geometry is inside a group.

                  I'll try to get that fixed too, but maybe not for the next release.

                  @chango70 said:

                  Would be great if you can add a CTLR modifier to make the new mesh smooth.

                  …I probably won't add this, but if I do decided to, it won't be anytime soon.

                  Also as a side note, I'm planning on adding a toolbar for them, and am trying to figure out how to add a subfolder and a loader script. I've got the toolbar working, but not with a subfolder or loader, and having the files just sitting in the plugins folder is a bit annoying.

                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    CadFather
                    last edited by 18 Jun 2009, 09:49

                    πŸ˜’ πŸ˜„

                    pmerge_16.pngpmerge_24.png

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

                      @cadfather said:

                      πŸ˜’ πŸ˜„

                      http://forums.sketchucation.com/download/file.php?id=29190

                      http://forums.sketchucation.com/download/file.php?id=29191

                      πŸ˜„ Nice!
                      I'll see if I can make one almost as good for Merge Points to Lines πŸ˜‰

                      1 Reply Last reply Reply Quote 0
                      • C Offline
                        chango70
                        last edited by 18 Jun 2009, 15:27

                        @cadfather said:

                        :roll: πŸ˜„

                        [attachment=1:cjv1mmue]<!-- ia1 -->pmerge_16.png<!-- ia1 -->[/attachment:cjv1mmue][attachment=0:cjv1mmue]<!-- ia0 -->pmerge_24.png<!-- ia0 -->[/attachment:cjv1mmue]

                        You da man!

                        1 Reply Last reply Reply Quote 0
                        • C Offline
                          chango70
                          last edited by 18 Jun 2009, 15:28

                          @unknownuser said:

                          @chris fullmer said:

                          Hi John, I think you just need to copy those 2 .rb files into your plugins folder. They don't need to be in the subfolder - unless I'm missing something. I'll edit that out if its wrong.

                          Chris, you're right, they both go into the plugins folder.

                          @chris fullmer said:

                          @BTM - The reason that the class variables are not working correctly (meaning they are not keeping their value during the entire SU session) is because you are declaring the variable in your activate method. So everytime the activate the tool gets activated, it resets the @@max_weld_distance variable back to 0.0.to_l.

                          I know that the variable needs to be outside of a method, but with things like
                          @@max_weld_distance=1.to_l if not @@max_weld_distance
                          it would call it an uninitialized variable, and give an error message.

                          @chris fullmer said:

                          So what you want to do is declare that variable inside the class, outside of the methods. Like this:

                          class MergePoints @@max_weld_distance=0.0.to_l

                          β˜€ It does work! I've been trying if functions, (so that if @@max_wld_distance doesn't have a value, it gets set to 0.0.to_l), but I kept getting error messages, and I guess that an if function isn't necessary. πŸ˜„

                          Hey wow that would be great! πŸ‘

                          1 Reply Last reply Reply Quote 0
                          • C Offline
                            chango70
                            last edited by 18 Jun 2009, 15:30

                            @unknownuser said:

                            @chango70 said:

                            1. I noticed that when I press undo after a point Merge operation it does not undo the entire procedure, rather breaks it down to individual line moves.

                            I've got this working properly now, and it will be fixed in the next release for the tools.

                            @chango70 said:

                            1. I cannot get it to work if the geometry is inside a group.

                            I'll try to get that fixed too, but maybe not for the next release.

                            @chango70 said:

                            Would be great if you can add a CTLR modifier to make the new mesh smooth.

                            …I probably won't add this, but if I do decided to, it won't be anytime soon.

                            Also as a side note, I'm planning on adding a toolbar for them, and am trying to figure out how to add a subfolder and a loader script. I've got the toolbar working, but not with a subfolder or loader, and having the files just sitting in the plugins folder is a bit annoying.

                            Fantastic! I can't wait for the new version. Great work! 😎

                            1 Reply Last reply Reply Quote 0
                            • C Offline
                              CadFather
                              last edited by 18 Jun 2009, 15:52

                              ..haven't tried the script yet so didn't notice there's two... coming soon....

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

                                ptl_24.png
                                ptl_16.png
                                …these are the icons it has right now, I'll wait to see how yours turn out πŸ‘

                                1 Reply Last reply Reply Quote 0
                                • C Offline
                                  CadFather
                                  last edited by 18 Jun 2009, 21:08

                                  i think these are very good BTM - no need of others.. πŸ‘

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

                                    …I also have these ones though…
                                    ptl_24.png
                                    ptl_16.png

                                    …I'll go with your icons for 'Merge Points', but now for Merge Points to Selection (I changed the name, because it works when selecting faces now aswell), I don't know which one to pick πŸ˜„

                                    Oh, by the way, they work in groups and components now too. I should have put @model.active_entities instead of @model.entities 😳

                                    …I've also included a cursor for 'Merge Points'. It's ugly though, so I'm changing it, and I don't know what the new one should look like. 😐

                                    1 Reply Last reply Reply Quote 0
                                    • C Offline
                                      CadFather
                                      last edited by 19 Jun 2009, 00:25

                                      looking good..

                                      1 Reply Last reply Reply Quote 0
                                      • Chris FullmerC Offline
                                        Chris Fullmer
                                        last edited by 19 Jun 2009, 02:15

                                        Keep up the good work! I am repeatedly impressed with your scripting. You've picked up quickly, and seem to keep going. Now you've got toolbars and cursors. Well done!

                                        Chris

                                        Lately you've been tan, suspicious for the winter.
                                        All my Plugins I've written

                                        1 Reply Last reply Reply Quote 0
                                        • J Offline
                                          JClements
                                          last edited by 19 Jun 2009, 02:50

                                          Thanks for considering my suggestions. I think these two scripts could prove to be "can't do withouts" for people working with terrans/TINs.

                                          John

                                          John | Illustrator | Beaverton, Oregon

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

                                          Advertisement