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

    Center Object

    Scheduled Pinned Locked Moved Newbie Forum
    sketchup
    15 Posts 4 Posters 3.5k 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.
    • R Offline
      raduteo
      last edited by

      Is there a way to center an object to the axis origin?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • L Offline
        lucifer1101
        last edited by

        the object is placed based on its local axis so if they are centered then try typing

        [0,0,0]
        

        into the measurements box when moving an object....

        if the local axis arent centered then you will need to either center or find another way....

        Some of my 3d

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

          There is also a ruby script that moves an object to the origin. Found here, on smustard.com.

          Chris

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

          1 Reply Last reply Reply Quote 0
          • R Offline
            raduteo
            last edited by

            If I try typing that it gives me invalid length entered.

            Edit: I guess it depends what measuring units you're using, typed 0.0.0 and it worked, thanks!
            Edit2: Seems like the last place I typed 0.0.0 gets memorated and whenever I type that again it moves it to where it was, but not in the center of the axis(origin)

            1 Reply Last reply Reply Quote 0
            • R Offline
              raduteo
              last edited by

              The plugin doesn't center the object to the axis, the center of the model needs to be on the "origin", the plugin just moves it next to the origin.

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

                I don't quite understand, but if it doesn't work for you thats fine. I thought it would move the selection to the origin, as the name implies. But apparently not?

                Chris

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

                1 Reply Last reply Reply Quote 0
                • R Offline
                  raduteo
                  last edited by

                  http://img152.imageshack.us/img152/7311/57878112.jpg

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

                    oh I see. Yes, it moves the object to the origin, but not exactly centered on the origin.

                    Do you still need that functionality? You might ask over in the ruby forum, and mention you've seen this script and it is close, but it doesn't quite do what you need. Perhaps someone will have a few minutes to write it.

                    Chris

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

                    1 Reply Last reply Reply Quote 0
                    • R Offline
                      raduteo
                      last edited by

                      I don't think it's worth making a script just for this, I thought there was a way to center the object to the origin some way with what's available in sketchup as I do not know all the functions since I'm pretty new, obviously. It's crucial for me to export the model exactly on the origin. So unless a plugin is made just for this it's pretty much impossible..?

                      Thanks!

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

                        Its a seriously easy plugin to write. I'll see if I get some time to write it today.

                        Chris

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

                        1 Reply Last reply Reply Quote 0
                        • R Offline
                          raduteo
                          last edited by

                          Ok, If you deem my request achievable then I'm grateful, thanks.

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

                            ok, a few questions.

                            Will this script only get run on components? (on second thought, I can probably make it work for anything selected just to be more globally appealing)

                            If the selected component/group is rotated, should the script re-orient it to the world axis, or leave it how it is?

                            Where should the plugin install itself? To the right click menu? or the plugins menu? I prefer the plugins menu only, but some people really like their right click menu to be full.

                            Its almost done,

                            Chris

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

                            1 Reply Last reply Reply Quote 0
                            • R Offline
                              raduteo
                              last edited by

                              You work fast, that's for sure.
                              I'm not the most experienced person to answer these questions but I'll give it a go.

                              From my perspective it's fine to run on groups/components only, but if you say it adds that much more appeal to work on on bjects too then go for it, if it's no trouble.

                              @unknownuser said:

                              If the selected component/group is rotated, should the script re-orient it to the world axis, or leave it how it is?

                              I think it's more useful if the script centers it but doesnt rotate it back. Adds a bit more flexibility, I think.

                              @unknownuser said:

                              Where should the plugin install itself? To the right click menu? or the plugins menu? I prefer the plugins menu only, but some people really like their right click menu to be full.

                              I would say/prefer in the Plugins Menu, since my right click menu got a bit too big, but it's up to you, whichever works.

                              @unknownuser said:

                              Its almost done

                              Cheers to you, then!

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

                                ok, its done and I started a thread here:

                                301 Moved Permanently

                                favicon

                                (www.sketchucation.com)

                                Download the file and save it to your plugins folder. Watch the video to see how it works. And run sketchup and test it to see if it does what you expect. It does not work on loose geometry at this point, only groups and components. And it will only work on one component/group at a time. Hope it helps, let me know (in the other thread preferably) if needs to be tweaked still,

                                Chris

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

                                1 Reply Last reply Reply Quote 0
                                • Jean LemireJ Offline
                                  Jean Lemire
                                  last edited by

                                  Hi folks.

                                  I would simply draw a line that goes from one end of the object to the opposite end and centered on the two ends. To avoid messing with the model, I would group it if not done already.

                                  Then, after going in X-Ray Mode, I would select both the object and the line and I would grab the selection by the midpoint of the line and move it in order to snap the grabbed midpoint to the origin.

                                  Finally I would delete the added line and deactivate X-Ray mode.

                                  Just ideas.

                                  Jean (Johnny) Lemire from Repentigny, Quebec, Canada.

                                  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