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

    Rotate Axis About Origin

    Scheduled Pinned Locked Moved Plugins
    4 Posts 3 Posters 305 Views 3 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
      rossthompson
      last edited by

      Hi,

      I am frequently dealing with building where certain parts are on a 45 degree angle. Is it possible to write a script that rotates the axes by a set angle about the origin?

      The ideal behavior would be to press the button once to rotate the axes by 45 degrees, then press it a second time to reset it back to normal.

      Any help would be appreciated.

      Ross

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

        Access to the 'axes' is very scant in the API.
        However, it's easy to redefine the model's axes temporarily.
        Use the Axes tool and pick a new origin and red/green axes.
        If you already have object drawn at 45 degrees use a part of those to snap to, or initially use the Protractor tool to draw a guideline at 45 degrees to a red/green axis and snap to that when resetting the axes.
        To revert to the main axes right-click context-menu over an axis and choose 'reset'...
        Alternatively, because you can have different axes remembered with Scene tabs you can set two tabs up with the different axes and then click between them. If you choose what the tab 'remembers'/'updates' [i.e. only have a check in Axes-Location] then only axes are swapped and the rest of the settings like view, layers, style etc are ignored, then that could be a quick way to flip between axis sets...


        Capture.PNG

        TIG

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

          Hi TIG,

          Cheers for that, I have tried setting up separate scenes and that works perfectly.

          Thanks for your help.

          Ross

          1 Reply Last reply Reply Quote 0
          • thomthomT Offline
            thomthom
            last edited by

            Are you still using SU6 as your profile indicate?

            As of SU8 the model axes updates with your component/group axis.

            Thomas Thomassen β€” SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

            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