Because the clear height of a building involves many particularities of buildings, structures and equipment, the traditional design mode can only roughly estimate the clear height of a building and cannot fully reflect the distribution of the clear height of the whole building, which is not conducive to designers’ design and optimization of buildings. To solve this problem, the concept of a cloud map of the clear height of buildings was proposed for the first time. Based on Revit software, a BIM-based, automatic building clear height cloud map generation program, which realized the efficient analysis of BIM model clear height and can quickly obtain the building clear height cloud map, was developed, therefore enhancing the clear height analysis function of Revit. Compared with the traditional clear height area analysis color block diagram, the clear height cloud diagram of BIM was more accurate, which provides an effective technical means for designers to comprehensively evaluate the clear heights of buildings.
The building clear height refers to the vertical distance from the floor or ground to the underside of the upper floor or ceiling (Fig. 1). The building clear height is a very important index in architectural design and indicates whether the function of a building meets the use demand, cost  of a project, comfort  of people’s use, and sales positioning  of the building. Therefore, in the design stage, the accurate measurement of the clear height of a building is an important element to be analyzed in every aspect of architectural design. However, determining the clear height of a building involves several professions, including architecture, structure, HVAC, water supply and drainage; each profession is represented by different designers, and it is difficult for these designers to master the design contents  of other professions. In traditional design, the designers of each profession can only roughly measure the clear height of a typical area of a building through discussion and cannot comprehensively measure the clear height  of each point of the building.
The current clear height analysis using BIM technology is manually performed ; that is, the clear height of each functional area of a model is measured by means of elevation, section and other views in Revit software to obtain the clear height of each area. This working mode is not only inefficient but also ill-equipped to intuitively determine which areas of clear height do not meet the specification requirements.
Many researchers worldwide have conducted research on the use of BIM technology for headroom analysis. Fengchang  Jiang et al. optimized the vertical headroom of each functional area of a hospital building based on the elevation section view in Revit software by “combining” the BIM models of several specialties of the hospital building. Jiao  Ren et al. also utilized the BIM model to optimize the vertical headroom of an underground garage by applying BIM technology. The measurement tools in the BIM model were employed to independently measure the areas with possible clear height problems to check whether the measured clear height met the requirements. Wang Peiling  applied BIM technology to optimize the HVAC design of a building project and performed direct measurement of the clear height of each area within the project engineering to optimize the project clear height. Shi Hong  selected the optimization of a university library reading space design as an example, using BIM technology to optimize pipe synthesis and to effectively improve the clear height of the interior. Leite F  combined BIM software for automated collision checking with manual checking of results to supplement and compare. Korman T M , Wang J , and Khaddaj M  employed BIM technology to combine a comprehensive analysis of pipelines with architecture and structure. The combined analysis was carried out to achieve coordination among various disciplines.
However, the above studies use BIM technology to manually generate clear height, and the clear height generated by them is the clear height of each area block. However, the factors affecting clear height, such as pipelines and structural beams in a building, are distributed everywhere, so the form of area blocks cannot comprehensively reflect the state of clear height of the building, and the abovementioned studies have problems such as large workload, high labor repetition rate and low time efficiency.
If the clear height of each point can be obtained similar to the stress cloud  in finite element software, to generate the clear height cloud of a building, it can undoubtedly make the designers quickly grasp the clear height of each part of the building to carry out targeted pipeline synthesis and design modification and to quickly realize the optimal design of the clear height of the building design.
Therefore, this study proposed the concept of a clear height cloud map and developed a BIM building clear height cloud map generation program based on the Revit platform and Revit API secondary development technology, which can generate the clear height of each point and the building clear height cloud map of each floor of a building. The program can automatically perform clear height analysis for each point of the BIM model and used different colors to represent different clear heights to generate clear height clouds, which can accurately and intuitively reflect the clear height of each point of a building, which is important for designers to perform clear height analysis.
As the mainstream software of today’s BIM system, Revit software is one of the most widely employed software programs in China’s construction industry BIM system because of its development features, such as strong interactivity, IFC support, parametric modeling, and work sharing. To meet the differentiated needs of users, Revit provides an application programming interface (API), which is a secondary development interface for developers. Developers can develop corresponding functions according to their own needs through the invocation of the API interface and the reference to the completed classes of the package. Therefore, in this study, based on the building model of Revit software, we adopted the Revit API interface for secondary development to realize the function of building a clear height cloud map.
To realize the intelligent generation of clear height clouds, we need to analyze the clear height of each point of the BIM model and calculate the clear height value of any part of the model through the call of Revit API-related classes to obtain the clear height point cloud dataset (including the location coordinates of points and clear height of points). Second, we processed the data, adopt different colors to mark different clear heights, and combine the data with the positioning of each point. Finally, a cloud map of building clear heights is generated, which can visually reflect the clear heights with different colors. The implementation of the program was based on the effective construction of two modules, namely, a front-end module for parameterization by the user and a back-end module for back-end data processing and data image conversion.
Software and hardware environment
Since the building BIM model was three-dimensional and often large in volume, this program requires the analysis of each point, so the computer GPU and CPU running speed requirements were high, i.e., high-performance image processing capabilities and higher intensity of arithmetic were needed. The recommended minimum hardware configuration is Intel(R) Core(TM) I7-7700 or above for CPU, NVIDIA GeForce GTX 1080 or above for graphics, 32G or above for memory, and 4T or above for hard disk. The BIM software selected for the program was Revit 2018; the programming and development software is Visual Studio 2019; the development language is mainly C#; and the database is SQL Server 2018 version.
Architecture and functional modules of the program
Architecture of the net high cloud map automatic generation program
This program adopts the more typical, three-level architecture in the monolithic architecture, front-end (PC side) + middle (logical application layer) + back-end (database layer), as shown in Fig. 2. The front end displays the BIM model on Revit software and shows the program running results. The logical application layer implements the corresponding functions according to the development requirements and establishes a connection between the model and the data. The back-end database enables the program to collect, store, and extract data.
Program functional modules of the net high cloud map automator
This program had four main modules according to the functional requirements, namely, the user interaction module, clear height analysis module, positioning module, and clear height cloud map output module. The function of the user interaction module is that the program automatically reads all the floor information in the BIM model and displays it in the Windows Presentation Foundation (WPF) form, which is convenient for the user to view and select. Simultaneously, the accuracy size of detection and the minimum clear height value can be set according to user needs. The suitable accuracy was selected for different project models, i.e., it can be adapted to the fineness requirements of different projects for clear height. The function of the clear height analysis module was described as follows: after the user selects the floor, when clicking on the analysis of clear height, the computer will arrange equally spaced measurement points on the floor slab of the floor, and the spacing of the measurement points is controlled by the accuracy entered by the user. The program calculates the clear height at the measurement points, and all the clear heights of the measurement points are stored in the back-end database. The function of the positioning module was to compare the clear height requirements entered by the user with each clear height, obtain the measuring points whose clear height does not meet the requirements, and display them in the WPF window panel. By clicking the measuring points in the panel that do not meet the requirements, one can directly locate the positions in the plan view and 3D view, which is convenient for users to quickly identify these positions when manually modifying the clear height of a structure. The function of the clear height cloud map module is described as follows: based on the point cloud data obtained after clear height analysis, these data were processed and transformed into intuitive color images, which can generate built-in cloud maps in the Revit software model and external cloud maps outside the software model. The whole procedure is shown in Fig. 3.
Acquisition of clear height
According to the definition of clear height, the clear height of a certain part shall be calculated, i.e., the distance from the upper surface of the floor to the bottom of the upper floor, beam, and equipment pipeline. Due to the complexity of the building model, it was impossible to accurately determine whether the upper structure was a ceiling or an equipment pipe, so this study used the ray method to obtain the clear height of a certain part. The specific implementation is shown in Fig. 4; i.e., a measurement point was taken on the floor, and then a ray was sent vertically upward. An intersection point was formed when the ray touches the upper floor, beam, equipment piping and other components, and the distance between this intersection point and the measurement point was calculated as the clear height. Because the actual clear height in the space is measured, the measured length was the distance between the rays emitted upward from the top floor to the lower surface of the first object. Therefore, it was not necessary to consider the thickness of the floor decoration and the thickness of the false ceiling.
In the code, we positioned the center of gravity on the upper surface, distributed the measurement points on the floor, stored the points in the points list, created the filter LogicalAndFilter, which can filter all family instances, and then substituted the coordinates of the measurement points and the filter into the ReferenceIntersector’s FindNearest algorithm. The distance between the measurement point and the intersection point, which was the clear height that we need, was calculated. Refer to Fig. 5 for the specific code.
Selection of measurement points
To perform a clear height analysis for a particular floor of the model, the clear height of each part of the floor needs to be measured. Therefore, measurement points need to be set at each part. This algorithm calculated the clear height at each measurement point by laying equally spaced measurement points on the upper surface of the floor, and the spacing between the measurement points was controlled by the accuracy entered by the user. Therefore, the clear height of the whole floor was obtained. The specific implementation is shown in Fig. 6. When traversing the points of the whole floor, it is difficult to select the edge of the floor as the initial measurement point because the boundary of the floor was often irregular. Therefore, this study adopted the shape center of the upper surface of the floor as the first measurement point, and by changing its coordinate value, the measurement points are set in all directions. When the measurement point was not on the upper surface of the floor, it is an invalid measurement point, which effectively solves the problem of irregularity of the floor boundary. It is only necessary to count all the valid measuring points, and then the clear height can be calculated by the ray method. For details on how to filter invalid measurement points, please review the codes and relevant texts in Fig. 7.
The Revit API does not have a direct method to identify the center of a surface, but it gives a method to identify the center of mass of a geometric form. Therefore, this study adopted a way to obtain the center of the upper surface of the floor slab: first obtain the coordinates of the center of mass of the whole floor slab and then change the Z coordinate of this center of mass so that the value of the Z coordinate of the center of mass was equivalent to the upper surface of the floor slab because the thickness of the floor slab was roughly uniform. Therefore, the center of the upper surface of the floor slab can be obtained. The shape center of the upper surface of the floor slab and its code are shown in Fig. 8.
The center of the upper surface of the floor slab was chosen as the first measurement point to facilitate the setting of a large number of measurement points in all directions. With the first measurement point as the center, other measurement points are set by changing the X coordinate value and Y coordinate value of the measurement point. Since a large number of measurement points have to be set and the size and shape of the floor slabs vary by project, to improve the efficiency of the program execution, it was necessary to choose a suitable laying range for different shapes of floor slabs so that the laying range can cover the whole floor slab without laying in the area outside the floor slab, thus reducing the number of program cycles and improving the program running speed.
When laying measurement points, we need to input three parameters: the face of a floor to be measured, the point on the floor “point0” and the measurement accuracy. The program will extend a limited number of other points “point1” in the X and Y directions based on “point0”. Some of these “point1” are on the floor, and some may exceed the range of the floor, so we connect “point1” with points (0, 0, 1) in turn. Only when “point 1” is within the range of the floor to be measured will this line intersect with “face”, which is the measurement point we need. This intersection is not only the effective measurement point we need, but also the same coordinate as point1.
Acquisition of clear height
After obtaining the clear heights at all measurement points, the coordinates (X, Y, Z) of each valid measurement point and the clear height data of this measurement point were organized and stored in the database for later generation of the clear height cloud map.
Presently, there are generally two kinds of commonly employed databases. The first kind of database is the stand-alone database that can be embedded in the SQLite database. The advantages of the stand-along database are that the file is small, occupies very few resources, and can be embedded in the program to become part of the program. The disadvantage of the stand-alone database is that the storage capacity is small, with a maximum of 100,000 levels of data storage. The second kind of database is the enterprise database, such as the MySQL database, SQL Server database, and Oracle database. The advantage of the enterprise database is that it has a very large storage volume; it can store 50 million levels of data. The disadvantages of the enterprise database are that it cannot be embedded into the software program and requires the use of additional database management tools. In the enterprise database, the SQL Server database developed by Microsoft has the best compatibility with C#. Therefore, this study compared the SQLite database and the SQL Server database. The program was run with these two databases, and their performance was compared, as shown in Table 1. The SQL Server database in this program was obviously attributed to the SQL Lite database because of the large number of database read and write operations involved in this study. Therefore, the SQL Server database was chosen for data storage of this program.
Positioning function implementation
After the program finishes the clear height analysis, the data were stored in the backend database and displayed in a WPF window panel for the user to browse. The window panel will display the location of each measurement point and the clear height information in a table. The information of the measurement points that do not meet the clear height requirements will be highlighted so that users can easily distinguish them. The information displayed in the panel was associated with the BIM model, allowing the user to select a row of measurement points on the panel to quickly locate the measurement points in the BIM model, which enables the user to modify the model at that location.
Plan view positioning and focus function
After the user selects a measurement point, to enable the user to quickly view the location of the point, this study provided the function of automatically switching and focusing the view to the vicinity of the measurement point in Revit. The plan positioning in the Revit model was mainly based on the axis network, which is a network composed of building axes; Ii is a tool for marking the detailed dimensions and positioning positions of components in architectural drawings. After the user selects the information of a measurement point, the program will extract the coordinate value of the measurement point, obtain the distance from the measurement point to the axis network according to the algorithm, and identify the nearest horizontal and vertical axis network to the measurement point so that the position of the measurement point in the plan view can be located. The program will automatically switch to the plan view and focus on this measurement point to realize the plan fast positioning function.
Three-dimensional view positioning function
This study provided the user with the ability to quickly access the 3D view of the selected measurement point, which is achieved by locating the positions of the nearby components. The program quickly locates the floor where the measurement point was located and the upper level components that intersect with the ray so that the user can quickly identify the nearby components and directly modify the model to target the parts where the clear height does not match. After the user selects a line of measurement point information, the program will extract the collision point location of the component ID, and according to the ID value, select the component. The component was temporarily isolated and added to the profile box so that the component will be directly displayed in the middle of the 3D view and directly positioned.
Automatic generation of clear height cloud map
Built-in cloud map implementation method
The advantage of the method is that it can correspond with the real position of the model one by one, which enables users to understand the clear height of a specific position. The disadvantage of the method is that the generation speed is slow, which will increase the size of the BIM model and cause computer lag. The implementation method is described as follows: for each effective measurement point, the volume was generated in the BIM model according to the location of the measurement point. The volume cross-section was the mid-span between two measurement points as the side length, and the filling color of the volume cross-section is controlled according to the clear height of the measurement point.
BIM building clear height cloud map intelligent generation program
In this study, the feasibility of the procedure was verified using a single-story underground garage. The construction area of the underground garage is 3857 m2. The BIM model of each specialty of this underground garage was built, and the electromechanical model was linked to the building model. Figures 9 and 10 show the BIM building model and BIM electromechanical model, respectively, of this case.
User interaction function: realize the interaction between the user and the software, select the floor to analyze through the information set and input by the user, and input the analysis accuracy and minimum clear height requirements (Fig. 11).
Clear height analysis function: analyze the floor selected by the user, set measurement points to measure clear height according to the accuracy input by the user, and store the obtained data in the database in the background. The clear height and the minimum clear height of each measurement are compared, and the information on the information panel that does not fit the clear height is displayed in red, as shown in Fig. 12.
Positioning function: The user selects a line of information on the panel, and the program will extract the coordinate information to feed back to the Revit software to position the components in the plan view and 3D view, as shown in Fig. 13.
Generate clear height cloud map function: The clear height cloud map of the underground garage is shown in Fig. 14.
Results and discussion
This study addressed the problem that the current architectural design cannot fully and accurately reflect the clear height of a building and proposes the concept of building a clear height cloud map for the first time. When using the C# programming language for Revit secondary development, combined with database and WPF technology, the function of automatically analyzing the clear height of BIM model and automatically generating BIM clear height cloud map was developed and realized. The program greatly reduced the time required for clear height analysis of the model and can reflect the clear height of each point of the building in a fine and accurate way, which may aid designers to intuitively understand the clear height of the building and provides an effective technical means for designers to comprehensively consider the clear height during design. The main research results of this study were divided into the following parts.
The concept of a clear height cloud map is proposed. Different colors are chosen to indicate the different clear heights of each point of the building to visually and accurately reflect the clear height of each point of the building and to reflect whether each point meets the building clear height. The traditional building clear height map, on the other hand, is a block map, which can only reflect the lowest clear height of each room and cannot reflect the clear height of each point in the room. The clear height cloud map in this study was more accurate, more comprehensive, and more precise than the traditional zone clear height color block map and therefore can more effectively improve the space utilization rate inside a building.
The BIM-based, clear height automatic analysis function was developed and implemented. Using the automatic clear height cloud generation program of this paper to analyze the clear height of the BIM model, the program will automatically set measurement points by spacing for a layer in the model and carry out clear height measurement and analysis to obtain data that can reflect the clear height of each point of the building.
The program can locate the places in the model where the clear height does not meet the requirements, which enables the user to modify the model and greatly reduces the time required to modify the model.
The program can use the pregenerated clear height data to automatically generate a clear height cloud map, which is more accurate than the traditional area clear height color block map, thus effectively assisting designers in effectively improving the space utilization rate inside a building.
At this stage, due to the limited efficiency of the graphics card, the clear height cloud map had insufficient generation efficiency. It is best to use blocks when analyzing a large area basement or when one wants to generate a clear height cloud map of each floor of a residential building. Therefore, follow-up research can optimize the display strategy of cloud images and improve the demand and generation efficiency of cloud images for graphics cards.
Availability of data and materials
The data used in this research can be found via the corresponding author.
Building information modeling
Structured Query Language
Windows Presentation Foundation
Min D (2007) The influence of building height on cost[J]. China Municipal Eng 14(05):82–83 + 103
Liu Y, Zhong L, Chen RF (2019) Research on Terminal Space Comfort and Green Energy Design[J]. Architectural J 09:18–23
Xiaofei Z, Jiajun L, Kai W, Zhen L (2014) Research on design coordination and management mode of complex project group based on BIM -- Taking the project group of post Shibo area B as an example [J]. Civil Eng Inform Technol 6(05):81–88
Dejiang: presented idea of research and technical editing. Fan: data collection, mathematical analysis, and draft writing. Chang: data collection, mathematical analysis. Youyang: literature review. Jianji: literature review. Yu: literature review. The author(s) read and approved the final manuscript.
The authors declare that they have no competing interests.
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated in a credit line to the data.
Wang, D., Li, F., Liu, C. et al. Development of an autogeneration program for building a clear height cloud map based on BIM.
J. Eng. Appl. Sci.69, 68 (2022). https://doi.org/10.1186/s44147-022-00129-w