# Using Dynamo for Automatic Reconstruction of BIM Elements from Point Clouds
## 3 Case Study
### Structural Beams  
The building contains structural beams in concrete with rectangular profiles that support the structural slabs, and which are supported by the structural columns both on the lower and upper levels. In addition, there are also beams at the ground level connected to  
Figure 11: (**a**) Photo of the column built into the wall. (**b**) The floor plan showing the embedded column and the distance inside the wall is controlled by the user with defined parameters when using the algorithm.  
Figure 10: (**a**) Algorithm developed with Dynamo for automatic detection and modeling of structural columns. (**b**) Point cloud used. (**c**) The BIM elements created in Revit using the Dynamo algorithm.  
the columns to stabilize the structure, and beams that support the building access ramp. As with the columns, the beams have deviations in their horizontal axis, but they have a minimal deviation in their rotation axis; for this reason, these deviations in the axis of rotation were ignored. They also have many points of deterioration and oxidation, especially those located close to the ground and consequently in contact with water (Figure 12). The automation code needed to take these issues into account to develop solutions to circumvent this problem. As the algorithm works based on the captured geometry, deformities in the structure could compromise the detection of the real beam profile.  
The strategy of the solution for the detection and reconstruction of the beams is similar to that adopted for the columns, with the difference that now the worked element is arranged on the horizontal axis while the first is on the vertical axis. However, the same principle was used to the new element after some modifications such as adjustments to the work planes, different ways of grouping points, and rotation and transposition of elements to meet the requirement of working with the horizontal axis.  
The beginning of the code is the same as the previous one, starting with the insertion of the point cloud in Revit and then with the selection of the points related to the beam to be rebuilt. Just like with the columns, although the algorithm includes an artifact cleanup feature, it is important for performance reasons to avoid selecting points that are not related to the beam. In the next step, the algorithm automatically selects points in two different positions, one at the beginning of the beam and another at the end; this distance can be adjusted by the operator. This action is crucial because it is from the position of these points that the two beam baselines will be created, one at its center and the other at its top. With these baselines, it is possible to extract the existing deviations in the beam placement. For this operation to succeed without errors or distortions, it is necessary for an inspection made by the operator in the element beforehand; this avoids selecting points from places where the beam is very degraded and without its original shape, as this could create distortions, compromise the baselines placement, and cause an error in the detection of the actual dimensions of the beam profile. After defining the center and top baselines, the algorithm measures the dimensions of the beam section and calculates the existing deviations. Finally, the BIM element is automatically positioned in place from the top  
Figure 12: (**a**) Image of the structural beams of the building and their conservation conditions. (**b**) Illustrative image of the existing deviations in the structural beams.  
baseline with its correct dimensions, deviations, and rotations, and is exported to the Revit environment as a family in its correct type and category (Figures 13, 14 and A5-A7).