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

    Ruby Console

    Scheduled Pinned Locked Moved Developers' Forum
    7 Posts 4 Posters 351 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.
    • K Offline
      kayjay
      last edited by

      I'd like to use the "Angle Between" ruby that I've found, but it computes and outputs in the ruby console and I have no idea how to use it. I looked at the file and have absolutely no clue so, once again, I turn to you kind folks.... 💚

      KJ

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

        Hi KayJay, where did you find the script at? Could you post a link to it so we can see what it does?

        Chris

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

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

          angle = vector1.angle_between(vector2)

          'angle' is a float that's in radians (note that .radians and .degrees changes between the two formats...)

          Use 'angle' as you want...

          TIG

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

            If you open the ruby (.rb) file it'll most likely have instructions on how to use it at the start. (An .rb file is just a text file in disguise, so if windows/os x asks you what to open it with, pick notepad or the os x equivalent.)

            If it doesnt, just try installing it and have a look for a menu item afterwards.

            If your still not having any luck post it up here and im sure someone would be willing to have a look over it to see how it works.

            http://remusrendering.wordpress.com/

            1 Reply Last reply Reply Quote 0
            • K Offline
              kayjay
              last edited by

              Here's the link to the ruby in question:
              http://www.crai.archi.fr/RubyLibraryDepot/Ruby/em_geo_page.htm

              I have checked the file's text repeatedly as well as all drop-down menus, context menus, and Extension Preference settings and never saw anything I could recognize as instructions. I have the Ruby Console toolbar plugin and have used it to reload the angle between script several times. It tells me it's reloaded but nothing comes up on the colsole when I select the edges that make up the angle I'm trying to measure.

              KJ

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

                Yes, that is quite an old script, and rather poorly written (in some ways). But if you want to use it, open the Ruby Console (not the "Ruby Web Console" plugin). So go to Window>Ruby Console.

                Select your edges and type this in:

                ang_betwen_lines

                That will start the ruby method on your selected lines and it will output a bunch of stuff tot he ruby console.

                Chris

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

                1 Reply Last reply Reply Quote 0
                • K Offline
                  kayjay
                  last edited by

                  Thank you!!!!

                  KJ

                  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