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

    [REQ]Reset scale multiple components

    Scheduled Pinned Locked Moved Plugins
    9 Posts 2 Posters 774 Views 2 Watching
    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
      baldaman
      last edited by

      If I select only one component, I can reset scale with right click, If I select two components, this option disappear...
      Maybe is it possible to do that with code?

      1 Reply Last reply Reply Quote 0
      • sdmitchS Offline
        sdmitch
        last edited by

        @baldaman said:

        If I select only one component, I can reset scale with right click, If I select two components, this option disappear...
        Maybe is it possible to do that with code?

        Check out my Reset Scale plugin on my blog.

        Nothing is worthless, it can always be used as a bad example.

        http://sdmitch.blogspot.com/

        1 Reply Last reply Reply Quote 0
        • B Offline
          baldaman
          last edited by

          Thank you sdmitch, I downloaded it and installed it but it appears that if the components have been modified by CHris fullmer's plugin "Scale and rotate multiple" it doesn't work.
          It works well if components have been modified with Sketchup's native scale tool...
          ???
          If I use scale_reinit.rb
          http://forums.sketchucation.com/viewtopic.php?t=11552
          it works even with components modified with CHris fullmer's plugin "Scale and rotate multiple"
          but of course the components come back to their original orientation...
          I do not care about orientations issues in today's case, but I just wanted to inform you, thank you again!

          1 Reply Last reply Reply Quote 0
          • B Offline
            baldaman
            last edited by

            UPDATE: with scale_reinit.rb the components go back to their original sclae and orientation but they are moved away from their original poisition...
            even if the component's axes are right in the middle of the object

            1 Reply Last reply Reply Quote 0
            • sdmitchS Offline
              sdmitch
              last edited by

              I think that is because scale_reinit assumes the default lower left component origin.

              Nothing is worthless, it can always be used as a bad example.

              http://sdmitch.blogspot.com/

              1 Reply Last reply Reply Quote 0
              • B Offline
                baldaman
                last edited by

                Ah OK, do you think that it is possible to change the code to assume the bonding box center origin?

                1 Reply Last reply Reply Quote 0
                • sdmitchS Offline
                  sdmitch
                  last edited by

                  I don't see why not but maybe you had better ask Chris about that.

                  Nothing is worthless, it can always be used as a bad example.

                  http://sdmitch.blogspot.com/

                  1 Reply Last reply Reply Quote 0
                  • sdmitchS Offline
                    sdmitch
                    last edited by

                    @baldaman said:

                    Ah OK, do you think that it is possible to change the code to assume the bonding box center origin?

                    With apologies to Chris, you might try changing this line

                    Sketchup.active_model.active_entities.add_instance(ent.definition,ent.bounds.corner(0)) 
                    
                    

                    to this

                    Sketchup.active_model.active_entities.add_instance(ent.definition,ent.bounds.center) 
                    
                    

                    Nothing is worthless, it can always be used as a bad example.

                    http://sdmitch.blogspot.com/

                    1 Reply Last reply Reply Quote 0
                    • B Offline
                      baldaman
                      last edited by

                      Thank you very much!
                      It works now!

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

                      Advertisement