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

[Plugin] Center on Origin UPDATE May 23, 2013

Scheduled Pinned Locked Moved Plugins
35 Posts 18 Posters 43.3k Views 18 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.
  • C Offline
    Chris Fullmer
    last edited by Chris Fullmer 29 Apr 2009, 17:58

    Center on Origin
    Description: Center a group or component on the model origin.
    Usage: Activate this tool from Plugins>Chris Fullmer Tools>Center on Origin. It only works with groups and components, and you can only center one at a time. It does not rotate or change the scale of the object.
    History
    1.0 - 2009-04-29

    • First release
      1.1.0 2013-23-2013

      • Extension Class Compatibility

    This is a request from this thread. Todd at smustard.com also has a very similar script that moves geometry to the origin, but it works slightly different. It does not center it on the origin. This one works the way it does because it was a special request.

    (no audio on this video. 14 seconds long)
    [flash=640,575:1k3bvtug]http://www.chrisfullmer.com/forums/center_on_origin.swf[/flash:1k3bvtug]

    Chris
    1450


    v1.1.0

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

    1 Reply Last reply Reply Quote 0
    • K Offline
      Khai
      last edited by 29 Apr 2009, 18:25

      ooh I wanted this as well πŸ˜„

      Thanks!

      1 Reply Last reply Reply Quote 0
      • P Offline
        pilou
        last edited by 29 Apr 2009, 23:10

        It was a while that you have not create a new plug πŸ˜‰

        Frenchy Pilou
        Is beautiful that please without concept!
        My Little site :)

        1 Reply Last reply Reply Quote 0
        • L Offline
          lucifer1101
          last edited by 29 Apr 2009, 23:53

          very nice little toy, thanks for the contribution...

          Some of my 3d

          1 Reply Last reply Reply Quote 0
          • B Offline
            Bob James
            last edited by 30 Apr 2009, 00:09

            Very useful, Chris, thanks for taking the time to create it. πŸ‘

            i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60

            1 Reply Last reply Reply Quote 0
            • C Offline
              Chris Fullmer
              last edited by 30 Apr 2009, 00:31

              @unknownuser said:

              It was a while that you have not create a new plug πŸ˜‰

              I have literally been forcing myself to not write any, after the earlier innundation of scripts. I do have some ideas, and even one really cool one started, but I told myself I can't do more until I graduate (in like 2 or 3 weeks now!). Yeah, I need to focus on school for a little bit. Then I'll get back up and running on rubies again probably πŸ˜„

              Thanks for positive feedback.

              Chris

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

              1 Reply Last reply Reply Quote 0
              • C Offline
                Chris Fullmer
                last edited by 30 Apr 2009, 01:35

                And here's another option. If you want it to reset the component rotation and scale, edit the ruby file in a plain text editor (like notepad for example) and after the line:

                if comp.typename == "Group" || comp.typename == "ComponentInstance"

                add the two following lines:

                t = Geom::Transformation.new comp.transformation = t

                Chris

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

                1 Reply Last reply Reply Quote 0
                • M Offline
                  MALAISE
                  last edited by 30 Apr 2009, 07:44

                  @unknownuser said:

                  It was a while that you have not create a new plug πŸ˜‰

                  Strangely , I taught similar 🀣

                  Thanks Chris

                  MALAISE

                  La Connaissance n'a de valeur que partagΓ©e

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    raduteo
                    last edited by 30 Apr 2009, 13:58

                    And this is why SU is the best, works fabulously, thank you!

                    1 Reply Last reply Reply Quote 0
                    • bagateloB Offline
                      bagatelo
                      last edited by 9 Feb 2010, 15:58

                      Is there possible to make change on this script to only move to origin axes X and Y, not Z?

                      While the cat's away, the mice will play

                      1 Reply Last reply Reply Quote 0
                      • TIGT Offline
                        TIG Moderator
                        last edited by 9 Feb 2010, 16:05

                        Edit the script and change the line
                        vector = point.vector_to [0,0,0]
                        to read
                        vector = point.vector_to [0,0,point.z]
                        It will then not change the Z -value of the translation... πŸ€“

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • bagateloB Offline
                          bagatelo
                          last edited by 9 Feb 2010, 17:21

                          Thanks, it works well. But if I want to move base of object to zero on Z axes? Thanks anyway.

                          While the cat's away, the mice will play

                          1 Reply Last reply Reply Quote 0
                          • TIGT Offline
                            TIG Moderator
                            last edited by 9 Feb 2010, 23:01

                            So having now got the idea - Edit the script and change the line
                            vector = point.vector_to [0,0,0]
                            to read
                            vector = point.vector_to [point.x,point.y,0]
                            It will then not change the X/Y values but will set the Z-value of the translation to zero......

                            TIG

                            1 Reply Last reply Reply Quote 0
                            • R Offline
                              rootbender
                              last edited by 30 May 2011, 05:02

                              Hello,

                              The "Center on Origin" script only works correctly when the drawing axes are at (0,0,0).

                              However, it is possible to move the drawing axes with Tool -> Axes to somewhere else
                              that is not (0,0,0).

                              How can center a selection to the currently set origin, which may not be at (0,0,0) ?

                              Thanks.

                              1 Reply Last reply Reply Quote 0
                              • J Offline
                                Jim
                                last edited by 30 May 2011, 10:58

                                Unfortunately, there is no access to the Origin of the moved Axes from Ruby.

                                Hi

                                1 Reply Last reply Reply Quote 0
                                • E Offline
                                  eph
                                  last edited by 31 Aug 2011, 08:39

                                  Very cool!
                                  I know this is old stuff already, but would it be complicated to move everything to center (eventually while keeping Z-height), including hidden geometry, section cuts and most of all the Camera views..?

                                  Would be very grateful πŸ˜„

                                  1 Reply Last reply Reply Quote 0
                                  • H Offline
                                    haimat
                                    last edited by 12 May 2013, 22:17

                                    Thanks for this great plugin, that's exactly what I was looking for πŸ˜„

                                    1 Reply Last reply Reply Quote 0
                                    • genma saotomeG Offline
                                      genma saotome
                                      last edited by 26 May 2013, 04:16

                                      @chris fullmer said:

                                      And here's another option. If you want it to reset the component rotation and scale, edit the ruby file in a plain text editor (like notepad for example) and after the line:

                                      if comp.typename == "Group" || comp.typename == "ComponentInstance"

                                      add the two following lines:

                                      t = Geom::Transformation.new comp.transformation = t

                                      Chris

                                      I'm having some difficulty using this plug in on nested components that were created with a copy/paste/scale = -1. I was hoping to try a few of the edits cited in this thread but the ruby is a .rbz; My editor tells me its been locked up and uneditable... is there another way to get to the source?

                                      1 Reply Last reply Reply Quote 0
                                      • C Offline
                                        Chris Fullmer
                                        last edited by 26 May 2013, 04:18

                                        The .rbz is just a zip file. Rename it to .zip and then unzip it. Inside there are regular .rb files that you can edit for your own personal use.

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

                                        1 Reply Last reply Reply Quote 0
                                        • charly2008C Offline
                                          charly2008
                                          last edited by 26 May 2013, 14:52

                                          Hi Chris,

                                          I installed the new update but now get an error message.

                                          Charly


                                          2.jpg

                                          He who makes no mistakes, makes nothing

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

                                          Advertisement