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

    [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.
    • charly2008C Offline
      charly2008
      last edited by

      I have all the clf_plugins piece by piece deactivated and found out that the "clf_arc_centerpoint_finder.rb" caused the error. After reinstalling everything works perfectly again. Sorry.

      Charly

      He who makes no mistakes, makes nothing

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

        Oh good, glad you got it working. That makes sense to me. I had accidentally released a bugged version of arc_centerpoint_finder that was live for a few days. Looks like you got a copy of that one - sorry!

        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

          Dear Chris,

          I have now found that you are represented in the "Plugins menu" three times. Is that intentional from you?


          3.jpg


          2.jpg


          1.jpg

          He who makes no mistakes, makes nothing

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

            Hi Charly, that is an unfortunate side-effect of my efforts to clean up my scripts. In your case, from what I can see, anything in the first and third menus are old scripts and should be updated. Unfortunately the updated versions are not yet published anywhere.....so for now you're stuck with the extra menu items - sorry about that! I'll let you know when I get all my updated scripts published. Thanks!

            Chris

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

            1 Reply Last reply Reply Quote 0
            • N Offline
              nesh70
              last edited by

              Hi!

              Thanks for creating so useful SU plugin!

              BTW, is there a way to center a model or component like the image B (not like the original script do - image A)?

              Best regards!


              Original plugin behavior.


              My intention.

              1 Reply Last reply Reply Quote 0
              • N Offline
                nesh70
                last edited by

                @nesh70 said:

                Hi!

                Thanks for creating so useful SU plugin!

                BTW, is there a way to center a model or component like the image B (not like the original script do - image A)?

                Best regards!

                I found out how to achieve it, changing the line

                vector = point.vector_to [0,0,0]

                to

                vector = point.vector_to [0,0,model.bounds.height / 2]

                😄

                1 Reply Last reply Reply Quote 0
                • TIGT Offline
                  TIG Moderator
                  last edited by

                  Why not use something like
                  vector = point.vector_to(model.bounds.center)
                  for the center, or
                  pt=model.bounds.center pt.z=model.bounds.min.z vector = point.vector_to(pt)
                  for the center-bottom

                  TIG

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

                    @nesh70 said:

                    @nesh70 said:

                    Hi!

                    Thanks for creating so useful SU plugin!

                    BTW, is there a way to center a model or component like the image B (not like the original script do - image A)?

                    😄

                    I use this plugin for centering an object while setting it's bounding box bottom at 0 :

                    center_group_bottom.rb

                    You can find it at http://www.fsdeveloper.com/forum/showthread.php?t=71321

                    download link
                    http://www.fsdeveloper.com/forum/attachment.php?attachmentid=10061&d=1310763814

                    1 Reply Last reply Reply Quote 0
                    • N Offline
                      nesh70
                      last edited by

                      @babak said:

                      @nesh70 said:

                      @nesh70 said:

                      Hi!

                      Thanks for creating so useful SU plugin!

                      BTW, is there a way to center a model or component like the image B (not like the original script do - image A)?

                      😄

                      I use this plugin for centering an object while setting it's bounding box bottom at 0 :

                      center_group_bottom.rb

                      You can find it at http://www.fsdeveloper.com/forum/showthread.php?t=71321

                      download link
                      http://www.fsdeveloper.com/forum/attachment.php?attachmentid=10061&d=1310763814

                      Thanks babak! It works perfectly! Just what I wanted!

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        tsurfing
                        last edited by

                        Hi Chris,
                        Tried to enter the patch script at the start of this thread, but the the ruby script is different than what you quoted:

                        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

                        This is it now:
                        sela.each do |e| if e.is_a?(Sketchup::Group) || e.is_a?(Sketchup::ComponentInstance) to_move << e end
                        ...
                        I need to zero out the components rotation/scale
                        What's your thoughts?

                        Terry

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

                        Advertisement