sketchucation logo sketchucation
    • Login
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Rotating component

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 5 Posters 1.0k Views 5 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.
    • L Offline
      lolpallo
      last edited by

      Hello!

      Is there any way to rotate my component by writing like this to somewhere

      
      axis; x,y, or z
      amount; 90
      
      

      I hate the rotation tool and its so awfull to rotate model with it. ๐Ÿ˜ก

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

        Hello and welcome! A couple of things, there are probably plugins out there that let you specify an x or y or z axis rotation for a component. Or could learn some Ruby script yourself and type it into the console (might be overkill for what you want though).

        But lastly, I would say spend some time to learn the rotation tool (it won't take long). Its is much more powerful than it seems, and it is more functional and capable than any other modeling software out there. Here is the trick

        It takes a little aligning and 3 clicks to use it. Activate the tool. Then align it to the plane you want to rotate on. If you want to rotate on the z axis, align the tool to the ground and it will turn blue. Hold shift to lock to that axis. Now click on the point you want to use as the rotation point and you can let go. The click on the 2nd point to rotate by. Then click on the point that you want the 2nd point to match to. And done. ok, it sounded long winded. There are videos that show its really simple on youtube. Check those out ๐Ÿ˜„

        Chris

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

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jim
          last edited by

          At the most basic, a rotate method would look like the following. It rotates the selected Group or Instance around a vector by an angle.

          
          def rotate(axis, angle)
              sel = Sketchup.active_model.selection[0]
              o = sel.transformation.origin
              tr = Geom;;Transformation.rotation(o, axis, angle.degrees)
              sel.transform!(tr)
          end
          

          To use, you would create a file with a .rb extension in your Plugins folder, then select a group or instance and type in the Ruby console:

          rotate(Z_AXIS, 45)

          Hi

          1 Reply Last reply Reply Quote 0
          • M Offline
            MartinRinehart
            last edited by

            @lolpallo said:

            I hate the rotation tool

            Try the material starting here:

            http://www.martinrinehart.com/models/tutorial/tutorial_04.html#qrotate

            It's about two pages. Pay a lot of attention to the "six-step" process part. Get that right and you get Qrotate working for you.

            Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

            1 Reply Last reply Reply Quote 0
            • daikuD Offline
              daiku
              last edited by

              I wrote this one a while back:
              http://www.crai.archi.fr/RubylibraryDepot/Ruby/EM/rot90.rb

              Rotates by 90 degrees around your choice of red|green|blue axes with a right click selection (can be mapped to a shortcut key). CB.

              Clark Bremer
              http://www.northernlightstimberframing.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