Component space topological relation construction method based on BIM model, computer equipment and storage medium
By constructing a space tree in the BIM model and judging the topological relationship of non-spatial components, the problem of lack of topological relationship between spatial components and non-spatial components in the BIM model is solved, and effective management of building space information is achieved.
Patent Information
- Application Number
- CN202411948548.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-25
AI Technical Summary
The BIM model usually does not describe the topological relationship between the complete spatial component and the non-spatial component, which makes it inconvenient to organize and manage spatial data in various business scenarios.
By obtaining the spatial geometric information of the BIM model, dividing the spatial region into a space tree, traversing the non-spatial component entity, determining whether it is completely within the scope of the target spatial node, and finding the set of non-spatial component entities through the spatial tree node index list to determine whether it belongs to a spatial object.
A complete topological relationship between spatial components and non-spatial components has been established to meet the information management needs of building space in various business scenarios.
Smart Images

Figure CN119885371A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of BIM data management, and in particular to a component space topological relationship construction method based on a BIM model, a computer device and a storage medium. Background Art
[0002] In the past, traditional work, architects needed to use CAD to draw two-dimensional drawings of the design scheme, which was inefficient. With the development of science and technology, BIM (Building Information Model) technology has been widely popularized and developed at home and abroad. BIM is a technology that uses computer technology to digitally express various information in the building and then converts it into an information model for display.
[0003] The core of BIM is three-dimensional digital technology, which forms a three-dimensional information model by digitizing various information in project construction. Among them, spatial information such as building areas and rooms is usually expressed using spatial components, which usually include spatial types, basic spatial information, spatial business information, etc. However, the data content of the BIM model usually does not describe the complete topological relationship between spatial components and non-spatial components, which makes it inconvenient to organize and manage spatial data in various business scenarios. Summary of the invention
[0004] Therefore, it is necessary to provide a component space topological relationship construction method, computer equipment and storage medium based on the BIM model to establish a complete topological relationship between spatial components and non-spatial components to meet the information management needs of building space in various business scenarios.
[0005] Specifically, the present invention provides a method for constructing a component space topological relationship based on a BIM model, the method comprising:
[0006] Obtain the spatial geometry information of the BIM model and divide the spatial area to obtain a spatial tree;
[0007] Traversing the non-spatial component entities and obtaining the spatial geometric information of the non-spatial component entities;
[0008] Determine whether the non-spatial component entity is completely within the range of the target spatial node;
[0009] If the non-spatial component entity is not completely within the target spatial node range, the non-spatial component entity is recorded in the parent node index;
[0010] If the non-spatial component entity is completely within the scope of the target spatial node, then continue to determine whether the non-spatial component entity is completely within the scope of the sub-nodes of the target spatial node, and so on until all non-spatial component entities are loaded on the smallest spatial node that completely contains it;
[0011] Get the minimum spatial node of the spatial object in the spatial tree;
[0012] Find all non-spatial component entity sets contained in the minimum spatial node through the spatial tree node index list;
[0013] Whether the non-spatial component belongs to the spatial object is determined based on whether the spatial object completely contains the non-spatial component, and the spatial calculation result is recorded.
[0014] Further, determining whether the non-spatial component belongs to the spatial object based on whether the spatial object completely contains the non-spatial component includes:
[0015] Calculating the directed bounding box of the non-spatial component using principal component analysis;
[0016] If the intersection of the non-spatial component and the spatial object in the vertical interval is less than a predetermined threshold, the topological relationship between the non-spatial component and the spatial object is not considered;
[0017] If the intersection of the non-spatial component and the spatial object in the vertical interval is not less than a predetermined threshold, determining whether there is a complete containment relationship between the spatial object and the directed bounding box;
[0018] If there is a complete containment relationship, the horizontal contours of the spatial object and the non-spatial component are obtained by using a plane projection method;
[0019] If the horizontal contour of the spatial object completely includes the horizontal contour of the non-spatial component, it is determined that the non-spatial component belongs to the spatial object.
[0020] Further, determining whether the non-spatial component belongs to the spatial object based on whether the spatial object completely contains the non-spatial component includes:
[0021] Calculating the directed bounding box of the non-spatial component using principal component analysis;
[0022] If there is a complete containment relationship between the spatial object and the directed bounding box, then using a plane projection method to obtain the horizontal contours of the spatial object and the non-spatial component;
[0023] If the horizontal contour of the spatial object completely includes the horizontal contour of the non-spatial component, it is determined that the non-spatial component belongs to the spatial object.
[0024] Further, determining whether the non-spatial component belongs to the spatial object based on whether the spatial object completely contains the non-spatial component includes:
[0025] Using the AABB bounding box method to determine whether the spatial object completely contains the non-spatial component;
[0026] If so, determining that the non-spatial component belongs to the spatial object;
[0027] If not, determine whether there is a spatial overlap area between the spatial object and the non-spatial component in the three main axis directions of XYZ;
[0028] If so, using the ray intersection method to determine whether there is an overlapping area between the spatial object and the non-spatial component;
[0029] If there is an overlapping area, it is determined that the non-spatial component belongs to the spatial object.
[0030] Furthermore, the method further comprises:
[0031] The spatial calculation results are stored in a predetermined structural form, wherein the predetermined structural form is in a tree-like organization form and takes the object space as a root node and the associated components as leaf nodes.
[0032] Furthermore, the method further comprises:
[0033] The index relationship between the spatial nodes and the component nodes is described by the index relationship of the node ID.
[0034] Furthermore, the task ID is used to mark single write data, and the node ID is used to equivalently represent the spatial component node and the non-spatial component node. The node ID is taken from one or more of the model ID, name, and object ID hash calculation results of the object model.
[0035] The present invention provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the computer program can be executed by the processor to implement the component space topological relationship construction method based on the BIM model.
[0036] The present invention provides a computer storage medium, wherein the computer storage medium stores a computer program, and the computer program can be executed by a processor to implement the component space topological relationship construction method based on the BIM model.
[0037] The present invention provides a method for constructing a component space topological relationship based on a BIM model, comprising: obtaining the spatial geometric information of a BIM model and performing spatial area division to obtain a spatial tree; traversing non-spatial component entities and obtaining spatial geometric information of non-spatial component entities; judging whether the non-spatial component entity is completely within the scope of a target spatial node; if the non-spatial component entity is not completely within the scope of the target spatial node, recording the non-spatial component entity in a parent node index; if the non-spatial component entity is completely within the scope of the target spatial node, continuing to judge whether the non-spatial component entity is completely within the scope of a child node of the target spatial node, and so on until all non-spatial component entities are loaded on the minimum spatial node that completely contains it; obtaining the minimum spatial node of a spatial object in a spatial tree; finding all non-spatial component entity sets contained in the minimum spatial node through a spatial tree node index list; determining whether the non-spatial component belongs to the spatial object based on whether the spatial object completely contains the non-spatial component and recording the spatial calculation results. The present invention can establish a complete topological relationship between spatial components and non-spatial components, thereby meeting the needs of information management of building spaces in various business scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, drawings of other embodiments can be obtained based on these drawings without paying creative work.
[0039] Figure 1 The present invention is a method flow chart of a specific embodiment of the present invention.
[0040] Figure 2 This is a specific method flow chart of step S120.
[0041] Figure 3 A flowchart of a first specific method for determining whether a spatial object completely contains non-spatial components.
[0042] Figure 4 A flowchart of a second specific method for determining whether a spatial object completely contains non-spatial components.
[0043] Figure 5 A flowchart of a third specific method for determining whether a spatial object completely contains non-spatial components.
[0044] Figure 6 It is a schematic diagram of the specific structure of the computer device of the present invention. DETAILED DESCRIPTION
[0045] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by non-space technicians in this field without creative work are within the scope of protection of the present invention. It can be understood that the drawings are only provided for reference and explanation, and are not used to limit the present invention.
[0046] It should also be noted that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" or "second" may explicitly or implicitly include one or more features.
[0047] See also Figure 1 As shown, a specific embodiment of the present invention provides a method for decoupling graph data, which may include the following steps:
[0048] S110: Spatial area division.
[0049] This step S110 specifically includes: acquiring the spatial geometric information of the BIM model and performing spatial area division to obtain a spatial tree.
[0050] Before this, the BIM model is loaded in advance. Because there are many data formats of BIM models, the loaded BIM model is a custom model generated after platform parsing, which is compatible with common BIM file formats such as AutodeskRevit, BentleyMicroStation, IFC, etc., and is platform-independent. In addition, this file contains geometric information and semantic information, and basic component type judgment can be performed through the object types defined in it.
[0051] After the BIM model is loaded, the spatial geometry information of the entire model is obtained. Then the octree structure can be used to divide the spatial area. The octree is a tree data structure used to describe three-dimensional space. Each node of the octree represents a volume element of a cube. Each node has eight child nodes. The volume elements represented by the eight child nodes are added together to equal the volume of the parent node.
[0052] When dividing the space area, it can be set so that the minimum space unit diameter is not less than 3000mm and the maximum depth of the space tree does not exceed 7 layers to ensure data assembly efficiency.
[0053] S120: Load non-spatial components into the spatial tree.
[0054] See also Figure 2 As shown, this step S230 specifically includes:
[0055] All non-spatial component entity objects are acquired in advance, the non-spatial component entities are traversed, and the spatial tree of the non-spatial component entities is filled one by one.
[0056] When a single non-spatial component entity is loaded, the spatial geometric information of the current non-spatial component entity is obtained in advance, and then it can be determined from the root node of the spatial tree whether the non-spatial component entity is completely within the range of the target spatial node.
[0057] If the non-spatial component entity is not completely within the target spatial node range, the non-spatial component entity is recorded in the parent node index.
[0058] If the non-spatial component entity is completely within the range of the target spatial node, it can be further determined in sequence whether the non-spatial component entity is completely within the range of the sub-nodes of the target spatial node.
[0059] If the non-spatial component entity is not completely within the child node range of the target spatial node, the non-spatial component entity is recorded in the parent node index of the target spatial node.
[0060] If the non-spatial component entity is completely within the range of a child node of the target spatial node, the non-spatial component entity is recorded in the parent node index of the child node of the target spatial node.
[0061] And so on, until all non-spatial component entities are loaded on the smallest spatial node that completely contains it.
[0062] This completes the process of loading all non-spatial components into the spatial tree.
[0063] It should be noted that the above-mentioned "not completely within the range of the spatial node" refers to the situation where the non-spatial component entity and the spatial node intersect. If the non-spatial component entity and the spatial node do not intersect at all, it is deemed that the non-spatial component entity is irrelevant to the space and there is no topological relationship.
[0064] S130: Creating a spatial relationship.
[0065] When creating a spatial relationship, first obtain the spatial geometry information set of all spatial objects in the BIM model, and then create a spatial component relationship for each spatial component. Use the spatial index feature to obtain the minimum spatial node of the current spatial object in the spatial tree. The specific method can refer to step S120. Then find the set of all non-spatial component objects contained in this minimum spatial node through the index list of the spatial tree node, and quickly find the non-spatial component that has a topological relationship with the spatial component through the spatial tree. Then, based on whether the spatial object completely contains the non-spatial component, determine whether the non-spatial component belongs to the spatial object and record the spatial calculation results.
[0066] When judging whether the spatial object completely contains the non-spatial component, four specific methods can be used according to the characteristics of the BIM model and the classification of components.
[0067] The first specific method can be used for components that are commonly used to divide horizontal spatial areas, such as walls, curtain walls, doors, windows, columns, beams, etc., which can ensure execution efficiency while meeting accuracy requirements. Figure 3 As shown, the first specific method may specifically include:
[0068] The directed bounding box of the non-spatial component is calculated using the principal component analysis method.
[0069] It is determined whether the intersection of the non-spatial component and the spatial object in the vertical interval is less than a predetermined threshold.
[0070] If the intersection of the non-spatial component and the spatial object in the vertical interval is less than a predetermined threshold, the topological relationship between the non-spatial component and the spatial object is not considered and is irrelevant to the space.
[0071] If the intersection of the non-spatial component and the spatial object in the vertical interval is not less than a predetermined threshold, it is further determined whether there is a complete containment relationship between the spatial object and the directed bounding box.
[0072] If the spatial object and the directed bounding box have a complete containment relationship, the plane projection method is used to obtain the horizontal contours of the spatial object and the non-spatial component, and when the horizontal contour of the spatial object completely contains the horizontal contour of the non-spatial component, it is determined that the non-spatial component belongs to the spatial object, otherwise the topological relationship between the non-spatial component and the spatial object is not considered.
[0073] If the spatial object and the directed bounding box are in an incomplete containment relationship, the topological relationship between the non-spatial component and the spatial object is not considered.
[0074] The second specific method can be used for components that are commonly used to divide vertical space areas, such as floors, flat panels, etc., which have large horizontal projection surface areas and small vertical heights. The second specific method can ensure execution efficiency while meeting accuracy requirements. Figure 4 As shown, the second specific method may specifically include:
[0075] The directed bounding box of the non-spatial component is calculated using the principal component analysis method.
[0076] If there is a complete containment relationship between the spatial object and the directed bounding box, the plane projection method is used to obtain the horizontal contours of the spatial object and the non-spatial component, and it is determined whether the horizontal contour of the spatial object completely contains the horizontal contour of the non-spatial component; if there is no complete containment relationship between the spatial object and the directed bounding box, the topological relationship between the non-spatial component and the spatial object is not considered.
[0077] If the horizontal contour of the spatial object completely includes the horizontal contour of the non-spatial component, it is determined that the non-spatial component belongs to the spatial object, otherwise the topological relationship between the non-spatial component and the spatial object is not considered.
[0078] The third specific method can be used for components that penetrate the space area, such as pipe components and other objects. Figure 5 As shown, the third specific method may specifically include:
[0079] The AABB bounding box method is used to determine whether the spatial object completely contains the non-spatial component.
[0080] If the spatial object completely contains the non-spatial component, it is determined that the non-spatial component belongs to the spatial object.
[0081] If the spatial object does not completely include the non-spatial component, it is determined whether there is a spatial overlapping area between the spatial object and the non-spatial component in the three main axis directions of X, Y, and Z.
[0082] If there is a spatial overlapping area, the ray intersection method is used to determine whether there is an overlapping area between the spatial object and the non-spatial component; if there is no spatial overlapping area, the topological relationship between the non-spatial component and the spatial object is not considered.
[0083] If the ray intersection method is used to determine whether there is an overlapping area between the spatial object and the non-spatial component, it is determined that the non-spatial component belongs to the spatial object, otherwise the topological relationship between the non-spatial component and the spatial object is not considered.
[0084] The fourth specific method can be applied to other components except the above three cases, and adopts a simple spatial relationship (AABB bounding box) to perform spatial relationship judgment.
[0085] S140: Calculation results are stored.
[0086] The persistent storage of spatial computing results uses a combination of file storage and MongoDB storage.
[0087] To facilitate front-end display, the calculation results are stored in the form of Json files, and the spatial calculation results are stored in a predetermined structure. The predetermined structure is organized in a tree form with the object space as the root node and the associated components as leaf nodes.
[0088] To facilitate backend data retrieval, the calculation results are stored in MongoDB at the same time.
[0089] In order to achieve fast retrieval, a flat structure is used to store the calculation results, and the index relationship between the spatial nodes and the component nodes is described by the index relationship of the node ID.
[0090] In order to describe the spatial component relationship organization across models, the task ID is used to mark single-time write data, and the node ID is used to equivalently represent the spatial component nodes and non-spatial component nodes. The node ID is taken from one or more of the model ID, name, and object ID hash calculation results of the object model, thereby ensuring the uniqueness of the node ID of the same model object in multiple tasks.
[0091] Figure 6 The present invention provides a structural diagram of an embodiment of a computer device 100, wherein the computer device 100 may include a processor 10, a memory 20, and a computer program stored in the memory 20 and executable on the processor 10, wherein the computer program can be executed by the processor to implement the specific steps of the above method.
[0092] The processor 10 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer device 100, and uses various interfaces and lines to connect various parts of the entire computer device 100.
[0093] The memory 20 can be used to store the computer programs and / or modules. The processor 10 realizes various functions of the vehicle by running or executing the computer programs and / or modules stored in the memory 20 and calling the data stored in the memory 20. The memory 20 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, a program required for at least one function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory 20 can include a high-speed random access storage device, and can also include a non-volatile storage device, such as a hard disk, a memory, a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
[0094] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for constructing component space topological relationships based on a BIM model, characterized in that: The method comprises: Obtain the spatial geometry information of the BIM model and divide the spatial area to obtain a spatial tree; Traversing the non-spatial component entities and obtaining the spatial geometric information of the non-spatial component entities; Determine whether the non-spatial component entity is completely within the range of the target spatial node; If the non-spatial component entity is not completely within the target spatial node range, the non-spatial component entity is recorded in the parent node index; If the non-spatial component entity is completely within the scope of the target spatial node, then continue to determine whether the non-spatial component entity is completely within the scope of the sub-nodes of the target spatial node, and so on until all non-spatial component entities are loaded on the smallest spatial node that completely contains it; Get the minimum spatial node of the spatial object in the spatial tree; Find all non-spatial component entity sets contained in the minimum spatial node through the spatial tree node index list; Whether the non-spatial component belongs to the spatial object is determined based on whether the spatial object completely contains the non-spatial component, and the spatial calculation result is recorded.
2. The component space topological relationship construction method based on the BIM model according to claim 1 is characterized in that: The determining whether the non-spatial component belongs to the spatial object according to whether the spatial object completely contains the non-spatial component comprises: Calculating the directed bounding box of the non-spatial component using principal component analysis; If the intersection of the non-spatial component and the spatial object in the vertical interval is less than a predetermined threshold, the topological relationship between the non-spatial component and the spatial object is not considered; If the intersection of the non-spatial component and the spatial object in the vertical interval is not less than a predetermined threshold, determining whether there is a complete containment relationship between the spatial object and the directed bounding box; If there is a complete containment relationship, the horizontal contours of the spatial object and the non-spatial component are obtained by using a plane projection method; If the horizontal contour of the spatial object completely includes the horizontal contour of the non-spatial component, it is determined that the non-spatial component belongs to the spatial object.
3. The component space topological relationship construction method based on the BIM model according to claim 1 is characterized in that: The determining whether the non-spatial component belongs to the spatial object according to whether the spatial object completely contains the non-spatial component comprises: Calculating the directed bounding box of the non-spatial component using principal component analysis; If there is a complete containment relationship between the spatial object and the directed bounding box, then using a plane projection method to obtain the horizontal contours of the spatial object and the non-spatial component; If the horizontal contour of the spatial object completely includes the horizontal contour of the non-spatial component, it is determined that the non-spatial component belongs to the spatial object.
4. The component space topological relationship construction method based on the BIM model according to claim 1, characterized in that: The determining whether the non-spatial component belongs to the spatial object according to whether the spatial object completely contains the non-spatial component comprises: Using the AABB bounding box method to determine whether the spatial object completely contains the non-spatial component; If so, determining that the non-spatial component belongs to the spatial object; If not, determine whether there is a spatial overlap area between the spatial object and the non-spatial component in the three main axis directions of XYZ; If so, using the ray intersection method to determine whether there is an overlapping area between the spatial object and the non-spatial component; If there is an overlapping area, it is determined that the non-spatial component belongs to the spatial object.
5. The method for constructing component space topological relationships based on a BIM model according to claim 1, characterized in that: The method further comprises: The spatial calculation results are stored in a predetermined structural form, wherein the predetermined structural form is in a tree-like organization form and takes the object space as a root node and the associated components as leaf nodes.
6. The method for constructing component space topological relationships based on a BIM model according to claim 5, characterized in that: The method further comprises: The index relationship between the spatial nodes and the component nodes is described by the index relationship of the node ID.
7. The method for constructing component space topological relationships based on a BIM model according to claim 6, characterized in that: The task ID is used to mark single write data, and the node ID is used to equivalently represent the spatial component node and the non-spatial component node. The node ID is taken from one or more of the model ID, name, and object ID hash calculation results of the object model.
8. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the computer program can be executed by the processor to implement the component space topological relationship construction method based on the BIM model as described in any one of claims 1-7.
9. A computer storage medium, characterized in that: The computer storage medium stores a computer program, and the computer program can be executed by a processor to implement the component space topological relationship construction method based on the BIM model as described in any one of claims 1 to 7.
Citation Information
Cited By
Spatial relation completion method and system based on BIM model
CN122020821A