# Using Dynamo for Automatic Reconstruction of BIM Elements from Point Clouds
## 3 Case Study
### Topography  
The topographical surface modeling in Revit without plugins or external tools is usually quite laborious due to the great irregularity that a terrain commonly has. This modeling is time-consuming, and obtaining a model with high accuracy is not an easy task. Some commercial tools solve this problem, such as the Scan Terrain [61] plugin for Revit, but this research sought to develop an alternative in which it is not necessary to use third-party paid commercial tools. In addition, the algorithm brings greater flexibility and control over what will be modeled, which will be important when we take advantage of this algorithm to assist in the automatic modeling of floors and roofs.  
The Revit topographic surfaces have a particular behavior; they have a more flexible and organic logic, differentiating them from other elements that work from a Boolean geometric logic with parameters assigned to their dimensions. The topography tool works by building a mesh with three-dimensional Cartesian points distributed along its entire selected area that, in the end, generates a three-dimensional topographic surface. After understanding the tool's working logic, it was possible to develop a strategy to collect the points related to the topography in the point cloud and convert them into a topographical surface in Revit (Figure 5).  
The main point for the whole operation of automatic modeling algorithms is the selection of points. As a topographical surface often has many differences in elevation  
Figure 4: Example of the point selection procedure in the point cloud for using the algorithms.  
Figure 5: Diagram of the solution developed for the topography automation modeling algorithm.  
and irregularities, it is unlikely that the selection will be made properly without any unwanted points being selected. Therefore, only for these cases is it necessary to carry out a classification and selection operation of the terrain points in advance. This research used the CloudCompare software v2 to automatically select the ground points with the Cloth Simulation Filter (CSF Filter) plugin [62], as it is an automatic method and has good performance; the workflow was not compromised as it consumes little time in its execution. Beginning with Autodesk Recap 2023, this automatic terrain point classification can be performed within the software itself, eliminating the need for external tools like CloudCompare, which greatly optimizes the process. As this research was conducted before the release of the 2023 version, this function could not be utilized. After using the plugin, a new segmented point cloud is obtained, and work with Revit and Dynamo can be started (Figure 6). The point cloud is inserted into Revit and it is imported into Dynamo. An operation of point reduction was also developed so that the operator has control over the number of points that will be used in topography creation. A topographical surface does not need a high point density to have good accuracy; besides that, a topo element with fewer points and being faster to create compromises the computational processing less. After the subsample operation, this final point list was used to create the BIM topography in its correct category within Revit (Figures 7 and A1).