# Using Dynamo for Automatic Reconstruction of BIM Elements from Point Clouds
## 3 Case Study  
Following the architectural survey and subsequent processing and registration of the scans, a point cloud file was created to serve as the foundation for the BIM modeling phase. The survey itself utilized 89 scan stations. Statistics from the final C2C registration revealed a mean distance point error of 1.8 mm and a maximum distance point error of 10.2 m. The original point cloud generated comprised a total of 394,228,283 points, while the subsampled point cloud, adjusted to a density of 10 mm, included 42,232,997 points. As well as any task of the BIM workflow, the modeling phase needs to be planned so that the final product will be consistent and used without significant incompatibilities in future work stages. In this research, we identified which the main elements of the building would be, which of them could have their reconstruction automated, and which would be manually modeled in the traditional way in Revit. In addition, the desired level of detail was established, which would be between LOD 200 and LOD 300 [46]. From this point on, the building was analyzed, divided, and classified according to its main elements: walls, floors, columns, beams, doors, windows, stairs, ramps, handrails, and topography. After that, we decided to develop modeling algorithms for the walls, floors, columns, beams, and topography; the other elements, such as doors, windows, stairs, ramps, and handrails, would be modeled using manual approaches because the types of algorithms we were going to develop would not be able to automate the modeling of these elements, at least not at this phase of the research. The automation algorithms were developed using Dynamo, a visual programming language tool for Revit. Dynamo handles point clouds by performing point-to-point readings, but this method is impractical for very large datasets containing millions of points due to processing limitations. To manage this, some preprocessing steps, such as subsampling the point count, cleaning out unwanted points, or dividing the cloud into segments based on construction elements, are typically considered. However, these operations, particularly cleaning and segmenting by construction element, are time-consuming. Given that time efficiency is crucial for validating methodologies, this research opted to bypass these less common office procedures like segmentation and classification by building elements, as the majority of professionals rarely engage in these tasks [19]. Preliminary cleaning to remove unwanted points was not conducted, with the exception of topography, allowing the algorithm to be tested under maximum stress conditions. However, all the algorithms included a noise and artifact reduction operation, which we will discuss in more detail later when detailing the operations. The only preprocessing operation performed before integrating the point cloud into Revit was the reduction of its density to a medium level (10 mm between points), a common practice in scan-to-BIM projects to avoid software performance issues. This density reduction and any necessary classifications were executed using Autodesk Recap prior to importation into Revit. By avoiding segmentation and cleaning, this approach closely aligns with the typical scan-to-BIM workflow, thereby allowing us to assess the effectiveness and efficiency of the algorithms under the most challenging conditions. The point cloud can be used in its entirety, without the need to separate and classify elements individually. However, it is crucial that the elements are clearly visible and free from holes, empty spaces, or occlusions. For example, if an element such as a column embedded in a wall is not visible, it will not be possible to select the points corresponding to the column for the algorithm to identify its dimensions. The more visible the element and the more completely its faces are scanned, the better the performance of the algorithms will be.