PDA

View Full Version : Segment of a Circle Calculation - Units problem.



archjake
2006-07-27, 03:18 PM
I'm trying to lay out some information on property line curves and would like Revit to help calculate the length of a curve for a schedule.

To stay on the same page let use the nomenclature on this web site. http://mathforum.org/dr.math/faq/formulas/faq.circle.html#segment

If I have what Revit will give me. The Radius (R) & Distance (c) I should be able to calculate the Length of the Arc (s).



You know c and r. Then

theta = 2 arcsin(c/[2r]),
s = r theta,
d = r cos(theta/2),
h = r - d,
K = r2[theta-sin(theta)]/2.

So first I'm trying to calculate Theta and get a Units Error. What are my Units and how do I make them consistent?

I may have more questions after we figure this one out and I try to convert Theta to Degrees, min, seconds.

Thanks for the help.

aggockel50321
2006-07-28, 02:05 PM
Arcsin needs an angular parameter for it's argument.

Set up a new angular parameter, say "ang"
then set ang equal to(c/2*r)/3.14
Theta should be a number parameter set equal to

2*asin(ang)

hth

archjake
2006-07-28, 03:08 PM
Thanks for your help Andrew, but I still get the Inconsistent Units error. Ang will calculate, but Theta won't.

aggockel50321
2006-07-28, 03:12 PM
Post your formulas, either by a screenshot of the dialog, or manually, or post the family.

archjake
2006-07-28, 03:24 PM
Okay.
Another Strange Issue. I got Theta to pass the units problem after setting it to be a 'Degree' Parameter, but nothing shows in the schedule.

See attached.

archjake
2006-07-29, 02:42 AM
I took a look at the problem again and have gotten past the initial issue.
This table now works for what I want it to, but if someone - perhaps a math genius could help answer my one question.

The only way I could get Arc Length to calculate is if I made the parameter an angle. So... In reality what should be a Length is Degrees in Revit.

How would I strip Degrees from a number? I cheated and told Revit not to display the degree symbol.

Area is the simple one that I know in Revit. Just divide by 1 SF.

Also. I thought Revit had a Pi constant built into it. If so I couldn't find it for my formula.

david.fannon
2006-08-21, 05:20 PM
Jake,

Not a math genius, or even a Revit one (or else I would have spent way less time figuring this out) but I think I have a slightly better workaround for you.

I had a similar problem in which I needed to calculate the arc lengths of some segments. I used a slightly different method, but the critical piece (the "Inconsistent Units" error) was the same. In the end I realized that Revit, just like my Chemistry teacher, expects me to cancel units in my equations. Even though WE know that the units cancel out (and that Pi is unit-less) Revit is quite literal: Pi is a number, arc length is an angle, radius is a Length and so on. It cannot see how you could possibly relate them with mathematics.

As you realized, you can trick Revit in a couple of ways, I am attaching a screen shot of two examples. In the first (Green Arrow) I added incorrect units to values. You can see this makes the equation "work" but yields an answer in degrees whilst we want feet and inches. The second way, (red Arrow) is to break up your equations so that portions of them yield "unit less" values, and then combine them at will. Of course you could get this functionality in a single equation, so long as your units all cancel to yield whatever parameter type you are supposed to have.

-DJF