## Wednesday, October 24, 2007

### TRIG IN REVIT... TAKE 2!

So if you recall from two posts previous, the issue was this: We needed the angle "Theta" to generate the arc length in the trig formulas. Now, for whatever reason (can anyone efficiently articulate what we call the "Revit behavior"?) we are able to constrain the Reference Lines to the springpoint of the arc, and to the intersection of the center reference plane, and the T reference plane. This flexes perfectly... Right up until we assign Parameter Theta to the angle dim between the ref line and the center ref plane. Once we do that, it tries to hold the value, and prompts us to remove the constraints. Boy, would it be nice if we could make the constraints override a value that isn't derived by any other incidental. So, we needed to derive Theta in some fashion other than with the angle dim.

James quickly realized that he could obtain Theta as follows: The sin of "Half Theta" is equal to 1/2 Chord, divided by Radius, if we look at t he triangle produced. (SOH CAH TOA anyone?)hehe). So, having created parameter Half Theta, he used an arcsin function in his formula for Half Theta "=asin((0.5*CHORD) / (RADIUS)) and achieve Half Theta, and obviously he then made Theta = twice Theta. We obviously could have achieved this in one parameter, but Half Theta came about while exploring potential ways around our math problem. Now, we obviously don't need Theta (or Half Theta) to actually be used as a label in the family itself, as I've shown it in the first image, since its being driven by the math, and not by the reference line now.
What a fun refresher about High school Math this has been. Anyone else starting to think they've lost a little bit in our old age? (lol)