Revit dynamo - Generate stirrup on a beam with with varying cross-section - example 15
Stirrups will be generated along a selected path with fixed spacing and increased stirrup length at each stirrup along the path with the increasing length of the concrete cross-section.
Few input values! Select the rebar distribution line for the stirrups. decide rebar cover and spacing, and last, select ALL surfaces for the concrete beam.
Use the Rebar cover value we decided in input to Shorten the selected distribution line with Rebar.Shorten. The spacing input is then used to calculate how many stirrups is needed, and Math.Ceiling is rounding the result up to a whole number. Curve.PlaneAtParameter is used to create a plane perpendicular to the curve at each point( each point represent a placement for one stirrup, in this example, we have 18 stirrups that’s just been calculated ). 0..1..#a in the code block means that the whole length(0 to 1) of the curve is to be used to distribute the calculated numbers (a value) evenly along the curve.
3. Stirrup geometry
Here is where the magic happens! I will not explain every node, but the principle.
I create a large rectangle where every stirrup will be placed on the previously established plane. The faces selected in the input section is used to create a solid and with the node Geometry.IntersectAll I can cut out a surface with the exact width and height as the concrete cross-section at that point along the stirrup distribution line(each surface has varying dimensions). Surface.perimeterCurves is used to select all the 4 curves on the surface, then offset them inward the same distance as the rebar cover, join all the 4 curves at each point along the distribution line with PolyCurve.ByJoinedCurves to form one whole curve, to be used in the next step.
The main node in this section is CreateFrom.Curves, and can be found in the package dynamo for rebar. This node transforms the curves that only exist in Dynamo and create actually rebars in Revit, shown in the video.
The input values are pretty straight forward, no more explanation is needed except the vector input. The vector input value is probably best communicated by Dieter Vermeulen at Autodesk
The vector is the direction in which the rebar would get distributed, and represent the normal vector of the plane in which the rebar sketch is created. This can be easily found with the curve.normal node.
The parameter is (partition) set by the node Element.SetParameterByName and linked with the main node, this means that all the rebars created from the main node will have the parameter decided in Rebar.Nr.
We also want the rebars created to be solid in view, this is done by using the node Create.SetSolidInView.
5. Video demonstration