Method and system for fast layered parallel extraction of BIM model external contour
Through the GPU parallel processing technology in Revit software, the component geometric relationship is generated and the BIM model outer contour is extracted, which solves the problems of loss of details and degraded user experience when performance is improved, and achieves a high-performance and high-accuracy BIM model outer contour Contour extraction.
Patent Information
- Application Number
- CN202011527594.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-22
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2040-12-22
AI Technical Summary
Traditional BIM model outline extraction algorithms will lose model details or lead to a decline in user experience when improving performance. Commercial rendering engines cannot customize processing logic and cannot effectively handle complex scenarios of large-scale BIM models.
Using GPU parallel processing technology based on Revit software, the geometric relationship algorithm of the components is generated and inter-process communication is used to obtain mapping information from elevation to rooms and components, and the contour generation is generated independently from the Revit platform. The external contour of the BIM model is extracted using GPU parallel computing power. , avoiding the Revit platform's restrictions on multi-threading.
The model contour extraction performance is significantly improved, with performance improvement of 3 to 10 times, and the accuracy remains unchanged, avoiding model details loss and user experience decline, and meeting the needs of fast contour visualization of complex scenarios of BIM models.
Smart Images

Figure CN112559188B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of BIM model processing of building software, and specifically relates to a method and system for layered parallel rapid extraction of external contours of a BIM model. Background Art
[0002] With the development of BIM technology, people have higher and higher requirements for the accuracy of BIM models, and the usage scenarios are becoming more and more complex, which inevitably leads to an increasing amount of data. Traditional model contour extraction algorithms have the following forms to improve performance:
[0003] 1. Simplify the model, such as merging adjacent faces to reduce the number of triangles to improve performance. This method, once the model vertices and triangle meshes need to be extremely reduced, will often fail to maintain the important details of the original model;
[0004] 2. Display certain types of components first, such as columns and walls, see Autodesk Viewer, and then display other components. During use, users will obviously notice that some components will disappear for a few seconds and will only be displayed again when the computer has spare computing power. This does not reduce model details, but will lose some user experience;
[0005] 3. Conventional commercial rendering engines, such as VTK, will actively reduce the resolution when rotating, making the display blurry, and can only display high resolution in static state. In addition, as an engine user, this process cannot be customized. For the same reason, other commercial rendering engines also encapsulate the underlying logic of the algorithm, and users cannot customize this part of the content. Summary of the invention
[0006] In order to solve the above technical problems, the present invention discloses a method for hierarchical parallel rapid extraction of the external contour of a BIM model, which includes taking the BIM model in the Revit software as the data source, completely exporting the geometric data of the BIM model, starting the GPU scheduler and the Revit multi-instance scheduler, firstly, obtaining the mapping information of elevation to room, the mapping information of elevation to component, the room component mapping list and the component adjacent mapping list based on the GPU parallel generation component geometric relationship algorithm; secondly, in the form of inter-process communication, generating the floor outer contour component mapping list based on the elevation based on the Revit local multi-instance algorithm; finally, after obtaining the above two parts of information, independently of Revit, relying on the GPU parallel computing capability, starting from the floor outer contour component through the contour generation algorithm, searching for the geometric components adjacent to it and saving them in the outer contour component list, extracting the outward surface of the outer contour component through extended iteration, and obtaining the BIM model outer contour.
[0007] Furthermore, the GPU parallel processing generates the geometric relationship algorithm of the component including the following steps:
[0008] S1. Record the components in the room list (R list) and other component list (E list) according to the component attributes;
[0009] S2. Read the R list and the E list respectively, create a room elevation list (RE list) and a component elevation list (EE list), sort them from low to high according to the elevation, divide the R list and the E list into N segments according to the total number, and the GPU scheduler first processes the rooms and components in the segment in parallel. According to their elevation information, if they already exist in the list, add the room or component information to the existing item. If they do not exist, create a new item and insert the room or component information. Then merge the elevation information into the RE list or the EE list. After processing, the mapping information from elevation to room and from elevation to component is obtained;
[0010] S3. The room component mapping list includes a room internal component list, a room outline component list and a room external component list. The E list is first divided into N segments, and the GPU processes the segmented internal components in parallel, reads each component, and then finds the room that overlaps with the component elevation from the S1 elevation to the room mapping information. If the component belongs to a room, it is saved in the room internal component list through geometric operations. If it is adjacent, it is saved in the room outline component list, and the others are saved in the room external component list;
[0011] S4. Adjacent component mapping list reads the elevation information of components that are not room components and do not have a geometric space inclusion relationship based on each component, finds the corresponding components with overlapping elevations in S1 elevation to component mapping information for detection, and saves the geometric intersection to the component adjacent list;
[0012] Furthermore, the rooms and components within a segment are processed in parallel in S2 before the elevation information is merged into the RE list to complete the processing of the next segment.
[0013] Furthermore, Revit's local multi-instance algorithm first reads the BIM model floor elevation to generate a height list, which is then distributed to different instances by the GPU scheduler to generate a floor outer contour component mapping table. The information is then fed back to the GPU scheduler to obtain a floor outer contour component list, and the BIM model outer contour is obtained through the contour generation algorithm.
[0014] Furthermore, the contour generation algorithm is to put all the outer contour components into a list (list A), divide list A into N segments according to the total number, and process one segment in parallel each time. In the first step, if the outer contour component to be processed currently has adjacent components and has not been processed, it is saved to the list of contour components to be processed and marked as processed. In the second step, the components marked as processed are removed and the first step is repeated. When there are no unprocessed components, a list of outer contour components is obtained, and the outward faces of the outer contour components are extracted to obtain the outer contour of the BIM model.
[0015] Another technical problem to be solved by the present invention is to provide a BIM model external contour layered parallel extraction system, the system includes an access layer, a control layer and a computing layer, the access layer includes a Revit plug-in entrance, the control layer includes a Revit communication program, a GPU scheduler, a Revit multi-instance scheduler and a data integration program, and the computing layer includes a GPU computing unit parallel operation program and a Revit data export program.
[0016] Furthermore, the Revit communication program is responsible for scheduling the parallel operation program of the GPU computing unit, transmitting data, returning results, and merging the results with the GPU scheduler and the Revit multi-instance scheduler.
[0017] Furthermore, the GPU scheduler is responsible for scheduling the GPU computing unit parallel operation program, and the Revit multi-instance scheduler is responsible for scheduling the Revit data export program.
[0018] Furthermore, the data integration program is responsible for integrating the data obtained by the GPU scheduler and the Revit multi-instance scheduler.
[0019] Furthermore, the Revit data export program includes exporting all component information as raw data for the GPU scheduler, and exporting floor outline components for the Revit multi-instance scheduler to call. The present invention makes full use of the parallel computing power of the GPU. The computing power of the GPU of the same generation is several times that of the CPU; and the model outline extraction does not change the BIM model data, and there is less mutual waiting in parallel computing; and multiple Revit instances are started at the same time to operate the data of the BIM model, making full use of the performance of the CPU multi-core. Compared with exporting BIM data, serial extraction, or relying solely on the form of Revit plug-in production, the performance of model outline extraction is improved by 3 to 10 times, while the accuracy remains unchanged. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is the overall architecture diagram of the parallel processing based on Revit software of the present invention;
[0021] Figure 2 Segment diagram for room list;
[0022] Figure 3 Flowchart for GPU scheduler;
[0023] Figure 4 A schematic diagram of the parallel method of the GPU scheduler;
[0024] Figure 5 Logic diagram of GPU computing unit for component room
[0025] Figure 6 Flowchart of parallel algorithm for component adjacent mapping information;
[0026] Figure 7 This is a diagram showing the component list obtained from the elevation mapping table;
[0027] Figure 8 It is the flowchart of the Revit local multi-instance algorithm;
[0028] Fig. 9 It is the parallel algorithm flow chart of the outer contour component;
[0029] Fig.10 This is the architecture diagram of the BIM model external contour hierarchical parallel extraction system of the present invention. DETAILED DESCRIPTION
[0030] Figure 1 In order to process the overall architecture diagram in parallel based on Revit software, the present invention uses the BIM model in Revit software as the data source, completely exports the geometric data of the BIM model, and obtains the geometric association information between components through GPU parallel processing, including the mapping information from elevation to room, the mapping information from elevation to component, component adjacent information, room and component relationship information, etc.; at the same time, this solution will start multiple Revit instances on the local machine, and in the form of inter-process communication, according to the plane floor of the building, obtain the outer contour component information of each floor in parallel, including the information of the outward-facing surface of the component, and obtain the corresponding relationship between each room and its contour component, and save it in a list. After obtaining the information of these two parts, independent of Revit, relying on the powerful parallel computing capability of GPU, starting from the outward-facing surface of each external component, the project is extended until a complete external contour is formed.
[0031] Example 1 GPU-based parallel generation component relationship algorithm (step 1)
[0032] Based on the GPU parallel generation component relationship algorithm, the mapping information from elevation to room, the mapping information from elevation to component, component adjacency information, room and component relationship information, etc. can be quickly obtained. The specific steps are as follows:
[0033] S101. According to the properties of the components, divide them into a room list RoomList, referred to as R list in this article, and other component lists ElementList, referred to as E list in this article.
[0034] The parallel algorithm used in this step is: first put all components into a list, and the list is divided into several segments according to a fixed size according to the number of local GPU processing units, assuming the size is N=64, and then one segment is transferred to the GPU for parallel processing each time. For each component, it is determined whether it is a room component. N components can be processed at a time, that is, the processing efficiency is N times that of serial processing. Finally, according to the processing structure, they are recorded in the room list RoomList and other component lists ElementList respectively.
[0035] S102: Obtain mapping information from elevation to room and from elevation to component.
[0036] Algorithm from elevation to room: First read the room list RoomList, create an elevation range list RoomElevLists, referred to as RE list in this article, and arrange them from low to high according to elevation; Figure 2 As shown in the figure, the rooms are divided into N segments according to the total number, and one segment is processed in parallel each time: The GPU scheduler is divided into two parts. The first part is to process the rooms in the segment in parallel. According to the elevation information of the room, if it already exists in the list, the room information is added to the existing item. If not, a new item is created and the room information is inserted. The second part is based on the first part. It merges the list obtained in the first part into RoomElevLists. After the first segment ends, the program in the first part does not have to wait for the program in the second part to end, and can continue to execute the next segment, which greatly improves efficiency. Figure 3 Data blocks 1 to N represent the room list divided into N segments, and each data block is a sub-list of the room list; parallel unit A represents the first part of the GPU scheduler, which processes the rooms within the segment in parallel, and its output is the data block result list; parallel unit B represents merging the processing results of parallel unit A into RoomElevLists, and its output is the total result list. Figure 4 The internal structure of parallel unit A on the left side of the merge arrow, the rooms in the data block will be processed in parallel by the GPU core Core to generate the segmented room elevation mapping table; the merge arrow represents the parallel unit B itself, which works by merging the segmented room elevation mapping table into the overall segmented room elevation mapping table in a parallel manner. When all segments are processed, the complete elevation to room mapping information can be obtained.
[0037] The algorithm from elevation to component: 1. Read the component list ElementList, create the elevation range list ElementElevList, hereinafter referred to as the EE list, and arrange them from low to high according to elevation; 2. Divide the components into N segments according to the total number, and process one segment in parallel each time; 3. The GPU scheduler is divided into two parts. The first part is to process the components inside the segment in parallel. According to the elevation information of the component, if it already exists in the list, the component information is added to the existing item. If not, a new item is created and the component information is inserted; the second part is based on the first part. It gets the list from the first part and merges it into ElementElevList. After the first segment ends, the program in the first part does not have to wait for the program in the second part to end, and can continue to execute the next segment, which greatly improves efficiency.
[0038] S103, obtaining mapping information from room to room interior (spatially contained in the room), room to room outline, components outside the room, and adjacent components. By running multiple GPU computing units in parallel, parallel computing can quickly obtain mapping information from room to component, room to room outline, mapping information from components outside the room, and mapping information from adjacent components.
[0039] The algorithm of room to component, room to room outline and components outside the room: First, divide the other component list ElementList into N segments according to the total number, and process one segment in parallel each time; the GPU scheduler is divided into two parts. The first part is to process the components inside the segment in parallel. According to the "component room GPU operation unit logic", the components are saved to the corresponding list; the second part is based on the first part. It merges the lists obtained in the first part into a large list; the result of the merger is both the room to component mapping information, the room to room outline mapping information and the components outside the room. Among them, the "component room GPU operation unit logic" is shown in Figure 5. For each component, read its highest and lowest elevations, and then find the room whose elevation overlaps with the component from the ordered elevation to room mapping table. Through geometric operations, determine whether the component intersects with the room geometry. If the component belongs to a room, that is, it contains or intersects with a room geometry, it is added to the room to component mapping information table. If it is adjacent, it is saved to a component that records the room outline, and the others are saved in the list of components outside the room.
[0040] Algorithm for mapping adjacent components: Figure 6As shown, starting from each component, read the highest and lowest elevation positions of those components that do not belong to the room and do not have a containment relationship. Knowing their elevation information, a mapping table from elevation to component has been established before. Here, through the elevation of the component, find the elevations that overlap with the current component in the corresponding elevation to component mapping table. Only the components corresponding to these elevations are detected. If a geometric intersection is detected, it is saved in the list item where the component is located, that is, the component adjacent list in the figure. After the above algorithms work together, we get Figure 7 The vast majority of content in. Record room outline widgets and room exterior widgets are now in the same list.
[0041] Embodiment 2 Revit local multi-instance algorithm (step 2)
[0042] like Figure 8 As shown, you need to start multiple Revit instances on the local machine. Revit takes up a lot of CPU memory, so it is recommended to use less than 1 / 2 of the number of CPUs.
[0043] Revit local multi-instance algorithm: read the floor elevation of the BIM model to generate a height list, which is assigned to different instances by the Revit multi-instance scheduler; generate a floor outline component mapping table and feed the information back to the Revit multi-instance scheduler; for instances that have completed their work, the scheduler is responsible for passing the unassigned floors to it, and the instance will process the new floors; after all floors have been processed, a list of floor outline components can be obtained.
[0044] BIM model outline generation algorithm: From the above steps, we have obtained the outline list of each floor in Revit. We create a new list and put all the outline components into a list, which is called AllBoudaryElement, referred to as List A in this article. We divide AllBoudaryElement into N segments according to the total number, and process one segment in parallel each time. The GPU scheduler is divided into two parts: the first part is to process the components inside the segment in parallel, such as Fig. 9 As shown, the adjacent components are saved to the list of contour components to be processed, and the current component is marked as processed; the second part is based on the first part, which removes the components marked as processed from the list obtained in the first part, and then repeats the first part; when there are no new components to be processed, the final list of outer contour components can be obtained. For each outer contour component, its outward-facing face is extracted to obtain the outer contour of the BIM model.
[0045] The specific implementation of the algorithm includes the following parts: Revit plug-in and independent GPU-based parallel processing program. The computer configuration recommended for this solution is Intel i9 CPU, or server CPU with computing power not less than i9, and memory not less than 32G.
[0046] Fig.10 The present invention is a system architecture diagram for layered parallel extraction of the external contour of a BIM model. The system includes an access layer, a control layer and a computing layer. The access layer includes a Revit plug-in entry, which is a button added by the plug-in on the Revit panel, through which the program for extracting the external contour of the BIM model can be started; the control layer includes a Revit communication program, which is responsible for communicating with a GPU scheduler and a Revit multi-instance scheduler, transmitting data, and returning results; a GPU scheduler, which is responsible for scheduling a GPU computing unit parallel operation program, transmitting data, returning results, and merging the results; a Revit multi-instance scheduler, which is responsible for scheduling a Revit data export program, transmitting data, returning results, and merging the results and a data integration program, which is responsible for integrating the data obtained by the GPU scheduler and the Revit multi-instance scheduler; the computing layer includes a GPU computing unit parallel operation program responsible for the calculation of the specific GPU-side component relationship establishment; the Revit export program includes two parts, a Revit data export program (all components) exports the information of all components as the original data of the GPU scheduler, and a Revit data export program (floor external contour); for the Revit multi-instance scheduler to call. The method is divided into two stages. In the first stage, the algorithm is carried out with the Revit software platform as the carrier to extract data. After the data extraction is completed, it is freed from the restrictions of the Revit platform and enters the second stage. GPU parallel computing is used to start from the floor outer contour components through the contour generation algorithm, and the outward-facing faces are extended and iterated to obtain the outer contour of the BIM model. This method is fast and effective, avoids the restrictions of the Revit software platform on multi-threading, and the parallel algorithm part is easy to port to other platforms to meet the needs of fast outer contour visualization of BIM models.
[0047] The operating steps of the above system are:
[0048] S101. The user opens the Revit program, opens the Revit model whose contour needs to be extracted, and starts the Revit plug-in;
[0049] S102, Revit communication program starts, Revit data export program runs, and all components are exported;
[0050] S103, the GPU scheduler and the Revit multi-instance scheduler are started, the former runs the GPU computing unit parallel operation program, and the latter runs the Revit data export program to export the floor outer contour components;
[0051] S104, the data integration program integrates the calculation results and returns them to the Revit communication program;
[0052] S105. The Revit communication program tells the user that the export is complete and gives the result file.
[0053] Based on the above system, the hierarchical parallel rapid extraction method of the BIM model outer contour of the present invention extracts BIM model data from Revit, and establishes geometric topological relationships in parallel through GPU, including the relationship between rooms and components, and the relationship between components. The components in this application are defined as entities in the BIM model, such as walls, columns, floor slabs, etc. At the same time, according to the floor information of the model, multiple Revit instances are started on the same machine to obtain the outer contour components of each floor in parallel. Starting from the outer contour components of each floor obtained, the geometric components adjacent to them are searched, and the components connected to them are also added to the outer contour, and through expansion and iteration, a complete model outer contour is formed. Finally, the invisible faces of the outer contour components are hidden to obtain the outer contour of the BIM model.
[0054] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A method for rapid hierarchical parallel extraction of the external contour of a BIM model, characterized by: It includes taking the BIM model in Revit software as the data source, completely exporting the geometric data of the BIM model, starting the GPU scheduler and the Revit multi-instance scheduler, firstly, obtaining the mapping information of elevation to room, the mapping information of elevation to component, the room component mapping list and the component adjacent mapping list based on the GPU parallel generation component geometric relationship algorithm; Second, in the form of inter-process communication, the Revit local multi-instance algorithm is used to generate a floor outer contour component mapping list based on the elevation. Finally, after obtaining the above two pieces of information, independent of Revit and relying on the GPU parallel computing capability, the contour generation algorithm is used to start from the floor outer contour component, find the adjacent geometric components and save them in the outer contour component list, and extract the outward-facing surface of the outer contour component through extended iteration to obtain the outer contour of the BIM model. The GPU parallel processing generates the geometric relationship algorithm of the components, including the following steps: S1. Record the components in the room list and other component lists respectively according to the component attributes; S2. Read the room list and other component lists respectively, create a room elevation list and a component elevation list, arrange them from low to high according to the elevation, divide the room list and other component lists into N segments according to the total number, and the GPU scheduler first processes the rooms and components in the segment in parallel. According to their elevation information, if they already exist in the list, add the room or component information to the existing item. If they do not exist, create a new item and insert the room or component information. Then merge the elevation information into the room elevation list and the component elevation list. After processing, the mapping information from elevation to room and from elevation to component is obtained; S3. The room component mapping list includes a room internal component list, a room outline component list and a room external component list. First, the other component lists are divided into N segments, and the GPU processes the segmented internal components in parallel, reads each component, and then finds the room that overlaps with the component elevation from the S1 elevation to the room mapping information. If the component belongs to a room, it is saved in the room internal component list through geometric operations. If it is adjacent, it is saved in the room outline component list, and the others are saved in the room external component list; S4. The adjacent component mapping list reads the elevation information of non-room components and components that do not have a geometric space inclusion relationship based on each component, and finds the corresponding components with overlapping elevations in the S1 elevation to component mapping information for detection. If the geometry intersects, it is saved in the component adjacent list.
2. The extraction method according to claim 1, characterized in that The rooms and components in the segment are processed in parallel in S2 to complete the next segment before merging the elevation information into the room elevation list.
3. The extraction method according to claim 1, characterized in that The Revit local multi-instance algorithm first reads the BIM model floor elevation to generate a height list, which is then distributed to different instances by the GPU scheduler, and a floor outer contour component mapping table is generated. The information is fed back to the GPU scheduler to obtain a floor outer contour component list, and the BIM model outer contour is obtained through the contour generation algorithm.
4. The extraction method according to claim 1 or 3, characterized in that The outline generation algorithm is to put all the outer contour components into a list, divide the list into N sections according to the total number, and process one section in parallel each time. In the first step, the outer contour component to be processed currently has adjacent components and has not been processed, which are saved in the list of outline components to be processed and marked as processed. In the second step, the components marked as processed are removed and the first step is repeated. When there are no unprocessed components, a list of outer contour components is obtained, and the outward faces of the outer contour components are extracted to obtain the outer contour of the BIM model.
5. A BIM model external contour hierarchical parallel extraction system for implementing the extraction method according to any one of claims 1 to 3, characterized in that: The system includes an access layer, a control layer and a computing layer. The access layer includes a Revit plug-in entrance, the control layer includes a Revit communication program, a GPU scheduler, a Revit multi-instance scheduler and a data integration program, and the computing layer includes a GPU computing unit parallel operation program and a Revit data export program.
6. The extraction system according to claim 5, characterized in that: The Revit communication program is responsible for scheduling the GPU computing unit parallel operation program, transmitting data, returning results, and merging the results with the GPU scheduler and the Revit multi-instance scheduler.
7. The extraction system according to claim 5, characterized in that: The GPU scheduler is responsible for scheduling the GPU computing unit parallel operation program, and the Revit multi-instance scheduler is responsible for scheduling the Revit data export program.
8. The extraction system according to claim 5, characterized in that: The data integration program is responsible for integrating the data obtained by the GPU scheduler and the Revit multi-instance scheduler.
9. The extraction system according to claim 5, characterized in that: The Revit data export program includes exporting all component information as raw data for the GPU scheduler, and exporting floor outer contour components for calling by the Revit multi-instance scheduler.
