sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Small question about rescaling components

    Scheduled Pinned Locked Moved Plugins
    10 Posts 4 Posters 546 Views 4 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.
    • liquid98L Offline
      liquid98
      last edited by liquid98

      Hello fellow scripters,

      I found this script called: 'scale_reinit.rb'.
      The script reinitializes the scale of scaled components.

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

      Discussion: http://forums.sketchucation.com/viewtopic.php?f=323&t=11552&hilit=reset+scale,

      edit : picture updated

      https://lh3.googleusercontent.com/-_YeyOZiymHs/Tt5E8NRoQcI/AAAAAAAABVw/N2NSH3Cyh1Y/s1440/testscalecomp1.jpg

      I'm not sure how the script works, but the components are placed in the wrong manner (see image)..
      I suppose it's a small effort to correct this..

      Any help is appreciated.. 😄

      Things that flourish fall into decay. This is not-Tao, And what is not-Tao soon ends ~ Lao tse

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

        liquid, You might give my Resize and Rename plugin a try.

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

        http://sdmitch.blogspot.com/

        1 Reply Last reply Reply Quote 0
        • liquid98L Offline
          liquid98
          last edited by

          Yes it works! Thanks, Sam.

          The only thing is that I have to adapt the plugin to work with more components at once!

          Things that flourish fall into decay. This is not-Tao, And what is not-Tao soon ends ~ Lao tse

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

            What are you trying to do. Scale up all component definitions in a model? if so

            mod = Sketchup.active_model
            ent = mod.entities
            sel = mod.selection
            defs = mod.definitions
            defs.each{|d|
              tr=Geom;;Transformation.scaling(2.0)#2X scale factor
              d.entities.transform_entities(tr,d.entities.to_a)
            }
            
            

            Of course scaling any one instance scales all instances of the the same component.

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

            http://sdmitch.blogspot.com/

            1 Reply Last reply Reply Quote 0
            • liquid98L Offline
              liquid98
              last edited by

              Sam,

              Yeah that's also a nice solution to my problem.

              But then I have to work with certain scale-factors...

              'scale_reinit.rb' is more hassle free. I updated the image above to make my question more clear. Hope you understand .

              Things that flourish fall into decay. This is not-Tao, And what is not-Tao soon ends ~ Lao tse

              1 Reply Last reply Reply Quote 0
              • Chris FullmerC Offline
                Chris Fullmer
                last edited by

                You just want the native "Reset Scale" feature to work with more than one component at a time, right?

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

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

                  That seems to be goal Chris as I understand the problem. I have been looking at scale_reinit and there are two problems with it as I see. First, you have to have all the components selected before loading the script other wise it is not added to the context menu. Second, the scaled components aren't rescaled, they are replaced with an insertion point of corner(0) or lower left of the bounding box which is exactly where the demo model shows it.

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

                  http://sdmitch.blogspot.com/

                  1 Reply Last reply Reply Quote 0
                  • liquid98L Offline
                    liquid98
                    last edited by

                    @ Chris,

                    @chris fullmer said:

                    You just want the native "Reset Scale" feature to work with more than one component at a time, right?

                    Yep that's right!

                    edit
                    So is it possible to call the native "Reset Scale" command from a script, and apply it to component_1.. component_i in the model?

                    Things that flourish fall into decay. This is not-Tao, And what is not-Tao soon ends ~ Lao tse

                    1 Reply Last reply Reply Quote 0
                    • G Offline
                      guntis.rat
                      last edited by

                      did this ever got resolved?

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

                        @guntis.rat said:

                        did this ever got resolved?

                        Apparently not, at least as far as the free version of Sketchup is concerned. The Reset Scale option is available in the context menu if only one component is selected.

                        You are welcome to try my plugin, Scale Reset, which seems to have been the solution for the problem liquid98 had.

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

                        http://sdmitch.blogspot.com/

                        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