PDA

View Full Version : 2017 How can I neutralise degrees of angle to be able to use trigonometry?



robinhillrhca700396
2019-03-17, 12:27 PM
A/H = Cos (alpha), where A is adjacent side in mm units, H is hypotenuese in mm, and alpha is the angle between them for a right angle triangle.

But Revit doesnt seem able to do this despite having the functions cos(), and acos()
I assume acos() returns a result in angular degrees, whereas the sides are in mm.

No matter how I try to set up this formula in a family parameter, I get an 'inconsistent units' error.
A and H are in units of length, but alpha is in units of degrees.
If I use alpha = acos(A/H) I get a 'Cannot evaluate function' error.

So I assume I have to neutralise the mm/mm which is presumably then unitless by multiplying by degrees.
There seems to be no way of saying that.
I have tried setting up a parameter as an angle of 1 degree and multipling by that, or even dividing by that, but still get 'inconsistent units' error.

Have searched the forums and internet generally...lots of people seem to want an answer to this, but no one seems to have ever answered!

So does anyone know how trigonemetry can be used in Revit to derive the angle between two sides of a right angled triangle as a formula in a family parameter?
Can you give an example?
Does anyone know what unit angle needs to be expressed in , ie like mm or m for length?
Hope someone can tell me how to do this.
Thanks, Robin

robinhillrhca700396
2019-03-17, 07:51 PM
Sorry folks, turns out the values I was feeding it for A and H resulted in a value greater than 1, so this was greater than ACOS can evaluate, so yes that created a math error,
and the 'inconsistent units' was a red herring I wasted time trying to solve.

With Alpha as an angle parameter, and A and H as length parameters, Alpha=acos(A/H) works fine with no need to neutralise the degrees at all!

so when you get an inconsistent units error, it may not be that at all! Just bad values used for the data!
Thanks anyway to anyone who puzzled over this.
Robin