# Using Dynamo for Automatic Reconstruction of BIM Elements from Point Clouds
## 3 Case Study
### Basic Operation and Structure of the Algorithms  
The algorithms developed, with the exception of those for topography and flooring, which are somewhat simpler, follow a similar operational logic that can be divided into three stages. The process begins with the user selecting the points of the element to be reconstructed. After this selection, the Dynamo scripts analyze the geometry of the element, detecting basic information such as dimensions, positioning, insertion axes, existing rotations, among other aspects. Each element has specific characteristics; therefore, the information extracted from the point cloud varies depending on each case. For this reason, each algorithm has specific and customized operations. The final step involves incorporating the information gathered in the second step into the BIM element, facilitating the creation of appropriate family types for each situation, with the correct dimensions and characteristics and in their proper Revit categories. The basic stages of the algorithms can be divided according to the following structure (Figure 3):  
1. Point cloud selection. In this stage the selection of points and the choice of project parameters necessary for modeling the family will be made. 2. Collecting geometry information. In this stage, the algorithm analyzes the geometry and takes the necessary measurements to integrate them into the BIM model. 3. BIM model creation. In this stage, dimensions and parameters are added to the element, the right family type is created, and it is properly positioned in the Revit environment. Figure 3: Summary of the three basic stages of operation for BIM modeling automation algorithms. In addition to the Dynamo native command blocks called nodes, some external node packages were used to perform specific tasks:  
* Sastrugi [54]: Used in stage one for point selection operation in the point cloud. * Spring Nodes [55]: Used in stage two to group points by proximity for artifact cleanup and to identify existing rectangular profiles and rotations in beams and columns; in stage three, it was used to convert a numeral into a string, for duplicating and renaming the new types of families. It was also used to identify the floor perimeter for creating the topography subregion. * Landform [56]: Used in stage two to collect the Cartesian coordinates of a point and to identify a midpoint on a curve. * Clockwork [57]: Used in stage three to round a dimension according to rounding standards, and to create a new family type with the correct dimensions collected in stage two. It was also used to adjust the surface of the floor points based on the deformations measured in the point cloud. * GeniusLoci [58]: Used in stage three to identify the correct layer of the BIM family for thickness adjustments. * SteamNodes [59]: Used in stage two for conditional operations to choose between rectangular and circular profile columns. * LunchBox [60]: Used in stages two and three to remove null numbers. Users should select points for the element to be modeled in Revit's 3D view environment using the click-and-drag method, where a selection box is created by dragging the mouse cursor across the workspace (Figure 4). To ensure accurate selection, it is recommended to use Revit's section box tool to define your working plane and viewing area, isolating the region containing the element. It is crucial that the selected points accurately reflect the object's geometric shape and cover all its faces comprehensively. Points from unrelated elements should be avoided to maintain focus on the intended model. Each element must be selected one at a time because, in the current version, the algorithms are not capable of modeling multiple elements simultaneously. Although tests have been conducted to enable simultaneous modeling of multiple elements, these adaptations resulted in unsatisfactory performance due to an excessive load on computer processing, significantly slowing down the workflow and requiring more powerful computers.