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
Advertisement