PLUGIN REQUIRED: LINE GRADIENT QUERY
-
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
-
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__) -
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 -
Excellent request
Excellent reply
-
Updated as new tool set here http://forums.sketchucation.com/viewtopic.php?p=264130#p264130

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better ๐
Register LoginAdvertisement