How awesome would it be to have an easy to use, rebar drafting drawing tool in revit, getting minimum bend radii for any type of rebar? For some reason Autodesk has never released one of these and you would think it would be easy low hanging fruit for them to tackle. They have awesome tools to model actual rebar in concrete, why not make detail component to help us structural engineers out.
The Revit Family - An Adaptive Component
I set out to tackle this problem and unfortunately had to settle on the adaptive component family in revit. Revit uses the term family for classification of elements in revit. They have structural framing families, stair families, etc, the list goes on. The nice thing about adaptive component family is that it prompts the user for points to place and then creates a generic model in the revit file that you working.
The major drawback to this family type is that it creates an actual element in your revit model. If you used a lot of these elements your revit file would be cluttered with these annoying elements. Ideally this piece of rebar would only exist in a draft view and nothing would be created in the 3d world.
With this con being a major con, this project turned into more of a fun, can I make a dynamic rebar bending tool in revit. Let's dig into the family creation.
The family functions by having (3) given points, see blue points below:
From these (3) adaptive points, you can setup dimensions to report length 1-2, length 2-3, and length 3-1.
For some unknown reason, autodesk has not given us the ability for angle values to used as reporting parameters in families. For awhile, this made me feel like this family was never going to work, I need to know the internal angle created by points 1,2 and 3. After doing some research though, the good old law of cosines came to me. I knew the (3) lengths of the triangle and with that, I could calculate all the internal angles of the triangle.
I now had access to the internal angle created by the points.
After doing some trig and touching up on ACI minimum bend radii, I was able to calculate the location of the point to begin the bend radius of the rebar.
Big thanks to my friend and fellow engineer Robert for helping me with this geometry. He ended up doing a nice geometric proof, while I ended up making a whole bunch of triangles with differing internal angles, reporting the values and plotting the results. From the results, I was able to curve fit to match the results and we ended up with the same answer, but different look (works out to be the same after some more trig identities). His result - b = r *cot(theta/2)
my result - b = r * tan((theta-pi)/2).
With this value and some more revit family rigging, the family was created. One hard lesson I learned in this process is to always enable 3d snapping in the adaptive component family environment. Merely placing points on a reference plane is not enough to constrain the family.
Below you can see the family in action, it dynamically updates and changes, all while keeping minimum bend radius for the type of rebar you have selected.
This family only works if the rebar is drawn in a way that the points are picked in a clockwise manner. If revit allowed for more robust reporting paramters such as angles, or negative lengths, I could have made this family work with clockwise or counter-clockwise point picks. Hey autodesk, throw us a bone in the family creation realm, give us negative length parameters!
If you would like to try out the family, let me know and I will send it your way!
I have wanted to access Revit's API for awhile now and I think this would be a fun project to try to formalize and make better. There maybe a way to make an addin for revit that will allow for dynamically created rebar that could forgo some of the shortcomings noted above. I must admit though, C# scares me a bit, but I think it is time I start to learn.
Edit: 06/27/2022, see this post for C# add-in work