## Revit Dynamo - Bridge part 2 - example 29

0. Intro

In this bridge blog series, we will take a closer look at how to build bridges using Dynamo, and add a new layer of complexity for each bridge example I post.

Bridge part 2 content:
-Superstructure (straight centerline) – varying cross-section height
– Placement of column
– Placement of foundation

1-9

The section from 1-9 is very similar to the bridge 1 sections, so I will not go into detail on the 1-9 chapters. Will instead make a few comments on what’s different.

1-2 Cross-sections are exactly the same as in the bridge 1 example, just compromised into one code block using the node to code option.

The major difference is the varying height, we, therefore, need two different cross-sections located at the desired place along the curve. In picture 8, the placement is at the start and end of the curve, and in picture 7, the placement of the thicker cross-section is placed where we choose to place as picture 6 shows, in our case, we choose to place it at 0.5 along the curve, meaning in the center of the curve.

When all the cross-sections are placed, they are gathered in a list, shown in picture 9. The order is important, and then loft it to a solid.

10 Column

Since the bridge is a bit longer it needs a column to support it.

The placement in the X and Y coordinates of the column is the same as the cross-section with thicker height, decided in 6.One point.

For the Z-value, some calculation is needed: Z height from the Z-coordinated extracted from section 6.One point, subtract the total height of the column and subtract the total height of the cross-section.

Line.ByStartPointDirectionLength is used to create a line that shows where the column should stand and how long it should be.

The line created is then used as input in the node StructuralFraming-ColumnByCurve, together with levels and what kind of column it is.

11.Foundation

The column created in 10 needs a foundation.

The foundation perimeter is created with Rectangle.ByWidthLength, rotate it with the same XY-rotation as the cross-section and then use the same XY coordinates as the column.

Floor.ByOutlineTypeAndLevel will create the actual slab with the desired floor type and create it at the chosen level.

The slab is created but it is placed at the wrong elevation.  The next operation is to find the correct Z-value.

Since the slab is created at level K, we need to find the Z-value(elevation) for this level, Element.GetParameterValueByName will get us there. This node read the element (in our case the element is the level K) parameter and the parameter value we want to find in the element is named Elevation and is a number.

Further, some simple calculations are needed to find the exact distance from level K to top Z value for our foundation, placed just benight our column placed in section 10.

Our last operation is to change the parameter value Height Offset From Level in the Revit foundation element with Element.SetParameterByName (at this point the foundation does exist in Revit as an element), it’s now placed correctly.