Revit Dynamo - Bridge part 1 - example 28

0. Intro

In this bridge blog series, we will take a closer look at how to build bridges using Dynamo. 

In part one I will focus on the bridge superstructure, further, I will add a new layer of complexity for each bridge example I post, this can be like a curved bridge, varying cross-section, adding columns and foundation. etc.

In my very first video, you can see how I used Excel to create the bridge superstructure.

Bridge part 1 content:
-Superstructure (straight centerline)

Picture 0

1. Cross-section

There are several methods you can use to create the cross-section for the bridge. Here, We place points, in Dynamo, at the right side of the superstructure in the XY-plane, and use Geometry.Mirror around the Plane.YZ, to create a similar geometry on the left side.  In the end, combine all the curves into one polycurve using PolyCurve.ByJoinedCurves. 

Picture 1

2.Centerline road

The centerline for our bridge, in our case I have just created a straight line. In later examples, the centerline will be curved.

Usually, get the centerline from the road engineer. 

Picture 2

2. Points along a curve

Creates points along the centerline. For our straight line, it would probably be enough with 2 points, at the start, and at the end, but in later examples where the cross-section is varying or have a slope, it will be more important with several points along the centerline. 

Curve.pointAtParameter is used to place the points along the curve, the parameter we get from a code block with the numbers 0..1..#10, meaning, that 100% of the line(0 to 1) will be used to place x number of points, in this example that is 10.

Picture 3

4. Vector – 90 degrees on the curve

At this point, our Cross-section is just existing in the XY-plane. For the bridge to be created we need the cross-section to be placed at the curve(at each point created in section 2) with the correct rotation. In this section, we are creating the tool so the rotation around the Z-axis is correct.

The final outcome from this section is an angle between two vectors, vector 1 is the vector with a 90-degree angle from the curve on every point created, vector 2 is the X-axis vector. The angle found for every point(10 in our case) is the number of degrees the Cross-section needs to be rotated to have a 90-degree angle to the curve in the XY-plane.  

Picture 4

5. Cross-section placement at points along the curve

Putting it all together. 

The cross-section needs to be rotated in two directions, using the node Geometry.Rotate, then placed it at each point along the curve using Geometry.Translate and finishing up with lofting the cross-section into a solid piece with Solid.ByLoft

The first rotation is 90 degrees around the X-axis, the cross-section has now left the XY-plane and placed itself in the XZ-plane with a 90-degree angle between the points on the curve, since the curve don’t have an elevation(varying Z-value) we don’t need to find an individual vector for each of the points(will look at this later).  

For our second rotation, we need to have an individual rotation for each point so the cross-section is placed with a 90-degree angle at the curve in the XY-plane. We use the angle found in the previous section to rotate every cross-section (10 in our case, since that’s in the number of points along the curve we decided to use in section 3)

The 10 cross-sections are now rotated in two directions and are ready to be placed at each of the 10 points created in section 2.

The last task is to loft all the cross-sections into a solid form. 

Picture 5
Picture 6 - first rotation
Picture 7 - second rotation

6 Revit

The solid superstructure is now created in Dynamo, just need to import it to Revit,  using the costume node /W FamilyInstance.ByGeometry. This node converts the Dynamo solid into a Revit family and places it as an instance in your Revit project.

The input values are a family template, a unique name for the family, and a category, can also set a material and choose if you want it to be a void or not, default is no void.


Picture 9
Picture 7