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

    PLUGIN REQUIRED: LINE GRADIENT QUERY

    Scheduled Pinned Locked Moved Plugins
    5 Posts 3 Posters 430 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.
    • D Offline
      davidlouis
      last edited by

      Please could someone whip up a script that will query the gradient of an inclined line / surface and post the result as a numeric text label when clicking on the line.

      This would really help me in what I'm working on right now... basically analysing the falls across a site for drainage and driveway design purposes.

      If this could be expressed as in the 1: X format, that would be great.
      As a step further if this could remain 'live' as one might alter the vertices of the line and return an updated result, that would be even cooler!
      As always, if there is something already out there, please point me towards the link... I have done a quick search of the forum and can't seem to find anything but there may already be something buried in a string with a cryptic title.

      Thanks

      David

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

        Try this linegradient.rb The file linegradient.rb goes into the Plugins folder.
        Select some stuff including the desired Edges.
        Type 'linegradient' into the Ruby Console.
        Text is added at center of the Edges says something like
        '1:60' or '1:25.125' or 'HORIZONTAL' or 'VERTICAL'
        See below on how to adjust text offset 'vec'...
        If preferred - add a menu item after the 'end' of the main code with this...

        if not file_loaded?(__FILE__)
            UI.menu("Plugins").add_item("Line Gradient"){linegradient()}
        end
        file_loaded(__FILE__)
        
        

        TIG

        1 Reply Last reply Reply Quote 0
        • D Offline
          davidlouis
          last edited by

          Thanks TIG... 👍

          working just fine so far... 😄
          I have added the bit at the end, a menu option is much better for me....

          to take things a little further, it would be good to make the text 'sticky' and live so if the line were rotated or vertices altered, so too would the gradient info change accordingly.

          But that's just me being cheeky...
          I appreciate your help.

          Cheers
          Dave

          1 Reply Last reply Reply Quote 0
          • mitcorbM Offline
            mitcorb
            last edited by

            Excellent request
            Excellent reply 👍

            I take the slow, deliberate approach in my aimless wandering.

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

              Updated as new tool set here http://forums.sketchucation.com/viewtopic.php?p=264130#p264130 🤓

              TIG

              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