[Plugin] Gradient Tools
-
Here's v1.3 20100814 A 'Relink ALL Tags' menu option has been added.
http://forums.sketchucation.com/viewtopic.php?p=264130#p264130 -
@unknownuser said:
@pixero said:
For a moment I thought you had found a way of making gradient materials...
Would it be possible to make this, TIG?
See the link - it's already been done ? Or am I missing something ??
-
Sorry if I used the wrong word, but I was thinking of a procedural ramp texture.
Something like this: http://www.pixero.com/tutorials_ramp.html -
Hello Tig,
I'm new to this plugin and have just downloaded it and am trying to understand how the ratio is representing the gradient.
Is there a way to represent this ratio in degrees?
-
@frekky12 said:
Hello Tig,
I'm new to this plugin and have just downloaded it and am trying to understand how the ratio is representing the gradient.
Is there a way to represent this ratio in degrees?
It's a rise over run thing. 1:1 would be one unit of rise and one unit of run or 45°.
You can get the angle using the yellow Protractor tool.
-
My Roof tool also has a function to report the angle of a picked roof slope in degrees, A:12 and A:B format...
-
TIG, many thanks for your efforts!
Could there be support for slopes in percent? -
optionally http://www.blocklayer.com/PitchAngle.aspx
-
Thanks TIG for this very handy plugin!
I'm barely Ruby-conversant but I'm trying to apply some modifications to your plugin. I have a few questions. Do refer to the attached image.
-
I've been able to make the tags report the angle in degrees. How do I limit the tag to 1 decimal point?
-
As you might be able to tell from the image, the plugin is reporting the complementary angle (39.6.. degrees) instead of the actual angle of the pitch (50.3 deg, shown in the measurement box at the lower right). how do we rectify this in the script?
Thanks and regards,
HJ -
-
- You can fix the number of decimal points in any float [into a string] thus:
` num = 1.23456
dum = sprintf("%.1f", num)
>> "1.2"`
Here the
.1f
says 1dp and.3f
would do 3dp...
To convert that string back into a float:
dum = sprintf("%.1f", num).to_f
There are many options to this Ruby method...- You seem to have it reporting the angle of the face's normal, you could just subtract it from 90 degrees ?
angle = 90.degrees - angle
then convert the angle from radians to degrees before fixing its dp's...
angle = angle.radians
- You can fix the number of decimal points in any float [into a string] thus:
-
-
it works!
-
the problem seems to have righted itself. will keep your solution for reference in case it acts up again.
#EDIT: it seems the problems crops up when the slope's material is in back face.
Thanks TIG. You're a legend!
-
-
The fix for that is to model properly !
Alternatively check norm=face.normal, then norm.z if it's <0 then norm.reverse!
Advertisement