A Method, System and Device for Multi-Source Heterogeneous Fusion Display of BIM Model Data
Through the establishment of format conversion and mapping relationships, the problem of inconsistent BIM model data is solved, and multi-source heterogeneous fusion display is realized, improving user viewing convenience and production efficiency.
Patent Information
- Application Number
- CN202410487093.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-22
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2044-04-22
AI Technical Summary
The data format of the existing BIM model is inconsistent, resulting in data incompatibility, inconvenience of user viewing, and increasing production costs.
By obtaining BIM model data, extracting and formatting the spatial data and attribute data of the primitives, establishing the mapping relationship between the spatial data file and the attribute data file, and optimizing the display.
It realizes the rapid visual display of multiple BIM model data, reduces file size, improves transmission efficiency, and supports cross-platform and cross-device viewing.
Smart Images

Figure CN118427256B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of BIM model data display, and in particular, to a method, system and device for multi-source heterogeneous fusion display of BIM model data. Background Art
[0002] With the development of social economy and the improvement of people's living standards, the country has increased its investment in infrastructure construction. In the construction engineering industry, for a large part of the engineering drawing model data in the past, most of them were communicated and transmitted in paper form. With the introduction of foreign BIM (Building Information Modeling) technology, the domestic traditional construction industry has also started to carry out digital transformation, replacing it with a digital, information-based, three-dimensional, visual, interactive, and extensible way to communicate and transmit building industry information data, greatly improving the construction efficiency and promoting the pace of informatization reform in the construction industry, thus giving birth to various building informatization services. Each manufacturer has launched its own building informatization solution services, such as well-known foreign companies like Autodesk, Bentley, Dassault, etc., and domestic companies like Glodon, Pinming Technology, Swell, etc. Among them, there are various formats of building two-dimensional and three-dimensional model formats, such as dwg, rvt, ifc, dgn, skp, etc.
[0003] As is well known, to view these building information models, users must install specific professional software on their computers to open these three-dimensional models. For example, to view dwg drawings and rvt models, users need to install AutoCAD and Revit software. To view ifc models, users must install a professional ifc file viewer. To view dgn format, users need to install Bentley's microstation software, and some software is still charged. These various types of model data, some of them are open-source with clear codes and can be directly opened with a text editor, while some are compiled and closed-source. And now many BIM design companies use inconsistent model formats, and there is no unity in formulating model standards between upstream and downstream. For example, if Company A wants to view the BIM model of Company B, it needs to install the software of Company B or develop its own conversion tool to be compatible with the model of Company B. If Company B wants to view the BIM model of Company C, it also needs to install the software of Company C or develop a conversion tool to be compatible with the model of Company C. There is a problem that the transfer and conversion between model data of different sources and different formats will inevitably lead to the loss or asymmetry of model information, increasing the production cost invisibly and thus affecting the overall production efficiency.
[0004] Therefore, the existing technology still needs to be improved and developed. Summary of the Invention
[0005] The technical problem to be solved by the present invention is that the existing BMI model data formats are not unified, the data is not compatible, and it is inconvenient for users to view. In view of the above defects of the prior art, a method, system and device for multi-source heterogeneous fusion display of BIM model data are provided, aiming to solve the problem of non-uniform BIM model data in the prior art.
[0006] The technical solution adopted by the present invention to solve the problem is as follows:
[0007] In a first aspect, an embodiment of the present invention provides a method for multi-source heterogeneous fusion display of BIM model data, wherein the method includes:
[0008] Obtain BIM model data;
[0009] Extract the primitive spatial data from the BIM model data, perform format conversion and storage on the primitive spatial data to obtain a spatial data file;
[0010] Extract the primitive attribute data from the BIM model data, perform format conversion and storage on the primitive attribute data to obtain an attribute data file;
[0011] Establish a mapping relationship between the spatial data file and the attribute data file;
[0012] Optimize the spatial data file and the attribute data file after establishing the mapping relationship, and perform visual display on the optimized spatial data file and attribute data file.
[0013] In one implementation, the extracting the primitive spatial data from the BIM model data, performing format conversion and storage on the primitive spatial data to obtain a spatial data file includes:
[0014] Extract the primitive vertex coordinates, primitive vertex normals, and primitive texture coordinates from the primitive spatial data;
[0015] Perform format conversion on the primitive vertex coordinates, primitive vertex normals, and primitive texture coordinates based on a first target storage format;
[0016] Write the format-converted primitive vertex coordinates, primitive vertex normals, and primitive texture coordinates into a gltf file for storage to obtain a spatial data file.
[0017] In one implementation, the performing format conversion and storage on the primitive attribute data to obtain an attribute data file includes:
[0018] Perform format conversion on the primitive attribute data based on a second target storage format;
[0019] Write the converted graphic primitive attribute data into a JSON file for storage to obtain an attribute data file.
[0020] In one implementation, the method further includes:
[0021] Establish a mapping relationship between the spatial data file and the attribute data file through the guid field.
[0022] In one implementation, the optimization of the spatial data file and the attribute data file after establishing the mapping relationship includes:
[0023] Split the spatial data file based on a preset standard size to obtain a number of spatial data sub-files;
[0024] Split the attribute data file based on the preset standard size to obtain attribute data sub-files.
[0025] In one implementation, the optimization of the spatial data file and the attribute data file after establishing the mapping relationship further includes:
[0026] Perform vertex deduplication or material optimization on the spatial data sub-files.
[0027] In one implementation, the method further includes:
[0028] Extract the model information from the BIM model data and store the model information in a JSON file.
[0029] In a second aspect, an embodiment of the present invention further provides a BIM model data multi-source heterogeneous fusion display system, where the system includes:
[0030] A data acquisition module for acquiring BIM model data;
[0031] A spatial data processing module for extracting the graphic primitive spatial data from the BIM model data, performing format conversion and storage on the graphic primitive spatial data to obtain a spatial data file;
[0032] A non-spatial data processing module for extracting the graphic primitive attribute data from the BIM model data, performing format conversion and storage on the graphic primitive attribute data to obtain an attribute data file;
[0033] A mapping relationship establishment module for establishing a mapping relationship between the spatial data file and the attribute data file;
[0034] A visualization expression module for optimizing the spatial data file and the attribute data file after establishing the mapping relationship, and performing visual display on the optimized spatial data file and attribute data file.
[0035] In one implementation, the spatial data processing module includes:
[0036] A spatial data extraction unit for extracting the primitive vertex coordinates, primitive vertex normals, and primitive texture coordinates from the primitive spatial data;
[0037] A first format conversion unit for performing format conversion on the primitive vertex coordinates, primitive vertex normals, and primitive texture coordinates based on a first target storage format;
[0038] A spatial data storage unit for writing the format-converted primitive vertex coordinates, primitive vertex normals, and primitive texture coordinates into a gltf file for storage to obtain a spatial data file.
[0039] In one implementation, the non-spatial data processing module includes:
[0040] A second format conversion unit for performing format conversion on the primitive attribute data based on a second target storage format;
[0041] An attribute data storage unit for writing the format-converted primitive attribute data into a json file for storage to obtain an attribute data file.
[0042] In one implementation, the visualization expression module includes:
[0043] A first splitting unit for splitting the spatial data file based on a preset standard size to obtain a number of spatial data sub-files;
[0044] A second splitting unit for splitting the attribute data file based on the preset standard size to obtain attribute data sub-files.
[0045] In one implementation, the visualization expression module further includes:
[0046] A data optimization unit for performing vertex deduplication or material optimization on the spatial data sub-files.
[0047] In one implementation, the system further includes:
[0048] A model information extraction module for extracting model information from the BIM model data and storing the model information in a json file.
[0049] Establish a mapping relationship between the spatial data file and the attribute data file through the guid field.
[0050] In a third aspect, the present invention also provides a terminal device, including a memory and one or more programs, where the one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs include instructions for executing the BIM model data multi-source heterogeneous fusion display method described in any one of the above.
[0051] In a fourth aspect, the present invention also provides a non-transitory computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the BIM model data multi-source heterogeneous fusion display method described in any one of the above.
[0052] Advantages of the present invention: Compared with the prior art, the present invention provides a BIM model data multi-source heterogeneous fusion display method, system and device. The present invention first obtains BIM model data; then extracts the primitive spatial data in the BIM model data, performs format conversion and storage on the primitive spatial data to obtain a spatial data file; further extracts the primitive attribute data in the BIM model data, performs format conversion and storage on the primitive attribute data to obtain an attribute data file; then establishes a mapping relationship between the spatial data file and the attribute data file; finally, optimizes the spatial data file and the attribute data file after establishing the mapping relationship, and performs visual display on the optimized spatial data file and attribute data file. By uniformly performing format conversion and storage on the primitive spatial data and primitive attribute data in multiple BIM models, and establishing a mapping relationship between the primitive spatial data and the primitive attribute data, the present invention facilitates the direct visual display of multiple BIM model data. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments described in the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0054] Figure 1 FIG. is a schematic diagram of the BIM model data multi-source heterogeneous fusion display process provided by an embodiment of the present invention.
[0055] Figure 2 FIG. is a schematic diagram of the BRep data description of the BIM model data multi-source heterogeneous fusion display provided by an embodiment of the present invention.
[0056] Figure 3It is a schematic diagram of the mapping relationship for the multi-source heterogeneous fusion display of BIM model data provided by an embodiment of the present invention.
[0057] Figure 4 It is a schematic diagram of the desktop browsing model for the multi-source heterogeneous fusion display of BIM model data provided by an embodiment of the present invention.
[0058] Figure 5 It is a schematic diagram of the web browsing model for the multi-source heterogeneous fusion display of BIM model data provided by an embodiment of the present invention.
[0059] Figure 6 It is a web application browsing model for the multi-source heterogeneous fusion display of BIM model data provided by an embodiment of the present invention.
[0060] Figure 7 It is a model framework diagram for the multi-source heterogeneous fusion display of BIM model data provided by an embodiment of the present invention.
[0061] Figure 8 It is a principle block diagram of the multi-source heterogeneous fusion display system of BIM model data provided by an embodiment of the present invention.
[0062] Figure 9 It is a principle block diagram of the internal structure of the terminal device provided by an embodiment of the present invention. Detailed implementation manners
[0063] To make the objectives, technical solutions and advantages of the present invention clearer and more definite, the following further elaborates on the present invention with reference to the accompanying drawings and by way of examples. It should be understood that the specific examples described herein are only used to explain the present invention and are not used to limit the present invention.
[0064] It should be noted that if there are directional indications (such as up, down, left, right, front, back...) involved in the embodiments of the present invention, such directional indications are only used to explain the relative positional relationship and movement conditions between components in a specific posture (as shown in the drawings). If the specific posture changes, the directional indications will also change accordingly.
[0065] In the prior art, the data formats of BMI models are not unified and the data is not compatible, which is inconvenient for users to view.
[0066] To solve the problems of the prior art, this embodiment provides a method for multi-source heterogeneous fusion display of BIM model data, which can achieve fast visual display of BIM model data. Specifically, in implementation, first, BIM model data is obtained; then the primitive spatial data in the BIM model data is extracted, and the format of the primitive spatial data is converted and stored to obtain a spatial data file; further, the primitive attribute data in the BIM model data is extracted, and the format of the primitive attribute data is converted and stored to obtain an attribute data file; then a mapping relationship is established between the spatial data file and the attribute data file; finally, the spatial data file and the attribute data file after the mapping relationship is established are optimized, and the optimized spatial data file and attribute data file are visually displayed. By uniformly converting and storing the primitive spatial data and primitive attribute data in multiple BIM models and establishing a mapping relationship between the primitive spatial data and the primitive attribute data, the present invention facilitates the direct visual display of multiple BIM model data.
[0067] For example, first, BIM model data is obtained by downloading from each BIM official website; then the primitive spatial data in the BIM model data is extracted, and the format of the primitive spatial data is converted and stored to obtain a spatial data file; further, the primitive attribute data in the BIM model data is extracted, and the format of the primitive attribute data is converted and stored to obtain an attribute data file; next, a mapping relationship is established between the spatial data file and the attribute data file; finally, the spatial data file and the attribute data file after the mapping relationship is established are optimized, and the optimized spatial data file and attribute data file are visually displayed. By uniformly converting and storing the primitive spatial data and primitive attribute data in multiple BIM models and establishing a mapping relationship between the primitive spatial data and the primitive attribute data, the present invention facilitates the direct visual display of multiple BIM model data.
[0068] Exemplary method
[0069] This embodiment of the present invention provides a method for multi-source heterogeneous fusion display of BIM model data, and this method can be applied to a terminal device. Specifically as Figure 1 shown, the method includes:
[0070] Step S100, obtain BIM model data.
[0071] In specific implementation, since different models are designed by different BIM manufacturers, such as dwg and rvt of Autodesk, dgn of Bentley, and the ifc format formulated by the international alliance OpenBIM. Some of these data are in plain code and open source. As long as they are read in text format and then according to the model database design standard, the desired data can be obtained from them. In actual operation, because these model design manufacturers or some third-party institutions on the Internet have already encapsulated the reading libraries, these reading libraries generally have a C++ version that supports cross-platform, and there is also a C# version that only supports the Windows platform, such as the OpenNURBS library for the 3dm format, the Assiamp library for the obj format, etc. By referencing these libraries, these models can be directly adapted, and then the desired data can be obtained from them. For some closed-source model formats, such as dwg and rvt, some commercial libraries can be used to read them, such as Open Design Alliance or HOOPS exchange. After the adaptation of model data in different formats is achieved, the subsequent data fusion processing can be started.
[0072] In specific implementation, by referencing different third-party libraries, the reading of data in different formats is achieved. First, according to different BIM models, the corresponding parsing libraries are downloaded and installed from the relevant official websites, as shown in Table 1 below.
[0073] Library Name Supported Formats Download / Reference Link Open Design Alliance dwg, rvt, ifc, dgn https: / / www.opendesign.com / SketchUp API skp https: / / github.com / moethu / SketchUpNET OpenNURBS 3dm https: / / developer.rhino3d.com Assimp Obj https: / / www.assimp.org /
[0074] Table 1
[0075] Then, through the parameter configuration file, when configuring, the model input path, output path, output setting parameters, etc. can be specified. The code example is as follows:
[0076]
[0077] Finally, for project construction, a new C++ solution is created, and a new model adaptation project is created. The available header files of each model are included in the project include path. The partial code example of project construction is as follows.
[0078]
[0079] Step S200: Extract the primitive spatial data in the BIM model data, perform format conversion and storage on the primitive spatial data, and obtain a spatial data file.
[0080] After the model is successfully read, the spatial data of each primitive can be started to be read, and the following process is followed to read them in sequence: a. Read the vertex coordinates of the primitive, b. Read the vertex normal of the primitive, c. Read the vertex texture of the primitive, d. Unit conversion.
[0081] In one implementation, the primitive vertex coordinates, primitive vertex normals, and primitive texture coordinates in the primitive space data are extracted; the format conversion of the primitive vertex coordinates, primitive vertex normals, and primitive texture coordinates is performed based on the first target storage format; the format-converted primitive vertex coordinates, primitive vertex normals, and primitive texture coordinates are written into a gltf file for storage to obtain a space data file.
[0082] In specific implementation, first, the primitive vertex coordinates are read. For example, for data in the BRep structure, traversing from the outermost to the innermost layer according to the BRep structure to obtain each face, triangulating each face to obtain the triangles of each face of the primitive, and finally obtaining the three vertex coordinates and indices of each triangle. As Figure 2 shown in the schematic diagram of BRep data description, the code example for obtaining the 3 vertices of a certain triangle in BRep:
[0083]
[0084] The example data of the obtained triangle coordinates is:
[0085]
[0086] Then, the primitive vertex normals are read. To meet the requirements of lighting rendering, in addition to extracting the primitive coordinates, the normals corresponding to each triangle vertex also need to be extracted, and the normals are decimals within the range of -1.0 to 1.0. The primitive vertex normals can be directly obtained through the interface of a third-party library or calculated manually. The calculation method is to calculate the cross product of two adjacent vectors. The code example for obtaining the normals of the three vertices of a triangle is as follows:
[0087]
[0088] Furthermore, the primitive vertex textures are read. To enhance the visual rendering effect, for the primitives with textures in the game, the texture coordinates (UV) will be exported together. The texture coordinates are a set of two-dimensional point sets, represented by U and V for a set of points, and the value range is -1 to 1. If it is less than -1 or greater than 1, it indicates that there is texture tiling. The code example for obtaining the UV coordinates of the three vertices of a triangle is as follows:
[0089]
[0090] The example data of the extracted triangle vertex UV is:
[0091] 0.82021, -0.36909
[0092] 6.00000, -6.36909
[0093] 6.00000, 0.00000,
[0094] 0.82021, 6.00000
[0095] 0.82021, -0.36909
[0096] 6.90900, 9.69906
[0097] -6.82921, -6.36909
[0098] -6.82021, 9.00006
[0099] 0.00000, 6.00000
[0100] 0.90000, -0.36909
[0101] -0.82021, -0.36909
[0102] 0.90900, 6.00000
[0103] -0.00000, 0.11893
[0104] 0.82021, 0.11893
[0105] 0.82021, -0.11893
[0106] ……
[0107] Finally, unit conversion is performed on the obtained primitive vertex coordinates, primitive vertex normals, and primitive texture coordinates. Since the units of different models may be different, for example, in the rvt model, its internal coordinates are in feet, and if it is ifc, it will be saved in different units according to the settings exported by the user. According to business requirements, this application specifies 5 common units: millimeters, centimeters, meters, feet, and inches. After obtaining the coordinates, unit conversion is performed on these coordinate values. The following is a code example for partial unit conversion:
[0108] / / Convert feet to millimeters
[0109] OdBmUnitUtils::convert(pt, OdBmUnitTypeId::kFeet, OdBmUnitTypeId::kMillimeters);
[0110] / / Convert feet to centimeters
[0111] OdBmUnitUtils::convert(pt, OdBmUnitTypeId::kFeet, OdBmUnitTypeId::kCentimeters);
[0112] / Feet to Meters
[0113] OdBmUnitUtils::convert(pt, OdBmUnitTypeId::kFeet, OdBmUnitTypeId::kMeters);
[0114] / / Feet to Inches
[0115] OdBmUnitUtils::convert(pt, OdBmUnitTypeId::kFeet, OdBmUnitTypeId::kInches);
[0116] In specific implementation, generally speaking, there are mainly two ways to express the shape and position of a primitive in three-dimensional space. One is parametric expression. For example, a cylinder consists of a circle at the bottom and a stretching direction, and the circle at the bottom is composed of a center and a radius. The other is triangular face method expression. For example, in the obj format, a cube consists of 6 faces, and each face is composed of two triangles, and each triangle is composed of the three-dimensional coordinates (x, y, z) of 3 vertices. At the same time, each vertex also has a corresponding vertex index, and each index is represented by an unsigned integer. In the era of rapid development of graphics rendering, in order to meet the requirements of front-end and mobile model rendering and combine the current development trend of GPUs, the glTF standard formulated by a very famous foreign organization Khronos is selected as the format for storing model space data. The glTF standard supports model formats with suffixes gltf and glb respectively. The former is a plain text format, and the latter is the format after binary conversion of the data. For some parametrically described space data, after triangulating each primitive (trianglate), unit conversion is performed on these triangulated data, such as converting to millimeters, feet, meters, etc. Finally, these data are uniformly written into the gltf file. If some primitives are transformed by instances, the transformation matrices (including rotation, translation, and scaling parameters) of these instances are also written into the gltf file. In addition, some primitives contain texture maps. Similarly, the UV coordinates of these texture maps are read, converted, and then written into the gltf file. In order to meet the requirements of front-end light rendering, the vertex normals of each triangle need to be read and then written into the gltf file. <{
[0117] Step S300, extract the primitive attribute data in the BIM model data, perform format conversion and storage on the primitive attribute data to obtain an attribute data file.
[0118] The storage and organization methods of the graphic element attributes of different models are different. To achieve the purpose of heterogeneous integration, a unified data structure needs to be defined to store the attributes of different graphic elements, including the required attributes: graphic element ID, graphic element name, and optional graphic element attributes. Some examples of the defined graphic element attributes are as follows:
[0119]
[0120] Then, by calling a third-party library, traverse each graphic element. If the graphic element has an attribute group, first traverse the attribute group, and then traverse the attributes under each attribute group. Code example for reading graphic element attribute data:
[0121]
[0122] The finally output json structure is:
[0123]
[0124] In one implementation, perform format conversion on the graphic element attribute data based on the second target storage format; write the format-converted graphic element attribute data into a json file for storage to obtain an attribute data file.
[0125] In specific implementation, for example, in the dwg format, each graphic element (point, line, block reference) generally includes a layer, color, line style. If it is text, it also includes text content (conntent), text style. If it is a block reference, it also includes the scaling ratios in the x, y, and z directions. For the rvt format, each component contains the attribute information of the component, such as component name, elevation, category, type, material, remarks, etc. The material information includes material name, color, texture, metallicity, roughness, etc. In addition, for models in different formats, to distinguish the uniqueness of different graphic elements, generally a unique identifier is recorded for each graphic element, such as the handle in the dwg format, the element id in the rvt format, the guid in the ifc format. Take the string-type guid among them as the unique identifier of the unified data format, write it into the json file, and at the same time associate it with the extended storage recorded in the spatial data of the gltf format.
[0126] In one implementation, the graphic element attribute data includes graphic element characteristics, graphic element text content, graphic element attribute name, graphic element attribute value, graphic element attribute grouping, and graphic element attribute unit.
[0127] In one implementation, extract the model information from the BIM model data and store the model information in a json file.
[0128] In specific implementation, the model information in the BIM model data is read. The model information generally includes the model creation time, author, project information, shared site information, view list, elevation, etc. All this information can be directly obtained from the model database. The following is the model information class of the rvt model, and the basic information of the model can be obtained through each function in the class.
[0129] class TB_DB_EXPORT OdBmBasicFileInfo : public OdBmObject {
[0130] ODBM_DECLARE_CUSTOM_CLASS_MEMBERS(OdBmBasicFileInfo);
[0131] public:
[0132] FileVersion getFileVersion() const;
[0133] OdString getUserName() const;
[0134] OdString getCentralModelPath() const;
[0135] OdString getFormat() const;
[0136] OdString getSavedInVersion() const;
[0137] OdString getLastSavePath() const;
[0138] bool getIsProjectSparkFile() const;
[0139] OdGUID getCentralModelIdentity() const;
[0140] OdString getLanguageWhenSaved() const;
[0141] OdGUID getUniqueDocumentGuid() const;
[0142] OdInt32 getUniqueDocumentIncrements() const;
[0143] OdString getAuthor() const;
[0144] bool getIsSavedInCurrentVersion() const;
[0145] OdInt32 getBasicFileInfoStreamRevision() const;
[0146] OdString getClientAppName() const;
[0147] / /
[0148] / / Main functionality
[0149] / /
[0150] Code example for obtaining basic model information:
[0151]
[0152] Code example for the output json structure:
[0153]
[0154] Step S400: Establish a mapping relationship between the spatial data file and the attribute data file.
[0155] In one implementation, a mapping relationship between the spatial data file and the attribute data file is established through the guid field.
[0156] In specific implementation, the mapping is established through the guid field to associate each spatial graphic element with its corresponding attribute information. The spatial graphic element can find the corresponding attribute record through the guid field, and the attribute data can also find the corresponding spatial graphic element through the guid. As Figure 3 shown.
[0157] Step S500: Optimize the spatial data file and the attribute data file after establishing the mapping relationship, and perform visual display on the optimized spatial data file and attribute data file.
[0158] To make the final data organization more standardized, reduce the size of the final data volume, speed up data transmission, and improve rendering performance, it is necessary to optimize the acquired data. First, split the json file according to the specified file size, for example, split and name it according to 16MB size. For the gltf file, also split and name it according to 16MB size. To improve the model rendering performance, compress the spatial data, that is, optimize the model spatial data in the gltf file, such as removing duplicates from the repeated vertex data, merging the faces with the same material, and optimizing the triangle storage method, etc.
[0159] In one implementation, split the spatial data file based on a preset standard size to obtain a number of spatial data sub-files; split the attribute data file based on the preset standard size to obtain attribute data sub-files.
[0160] In one implementation, perform vertex duplicate removal or material optimization on the spatial data sub-files.
[0161] In specific implementation, first split the spatial data file of each model according to the preset standard size, and name it according to the number from small to large, making the model loose, which is beneficial to database storage and network transmission. The results of spatial data splitting are 0.gltf, 1.gltf, 2.gltf... Since each primitive is finally saved in the form of triangular face description, there will be some common vertices when saving. At this time, these common vertices can be removed duplicates to reduce the data volume. For example, for a cube component (i.e., primitive), the most primitive data has 6 faces, 12 triangles, and 36 vertices. After vertex duplicate removal, it will be reduced to 8 vertices of the cube. For material merging, some primitives may have the same material. The rendering performance of the model can be improved by merging the primitives with the same material into a single unit. For example: there are 4 cubes, 2 of which are red and 2 are green, a total of 4 units. Then the 2 red ones can be merged into a single unit, and the 2 green ones can be merged into a single unit. Split the non-spatial data, that is, split the primitive attribute data. The results of non-spatial data splitting are 0.json, 1.json, 2.json..., and the preset standard size for splitting can be set to 16MB.
[0162] In one implementation, for some primitives transformed by repeating a primitive, data optimization can be performed through the way of entity recognition. For example, if a model has 10 chairs, and these 10 chairs are all transformed from the same 1 chair, then only the coordinates of one chair can be saved at this time, and the 10 chairs can be transformed through a transformation matrix including translation, rotation, and scaling, thus greatly reducing the data volume.
[0163] In one implementation, the data after multi-source heterogeneous processing, because it is in the mainstream plain-code open-source format, can be directly loaded and viewed on various platforms, software, and systems. For example, the model can be directly browsed on the desktop, as shown in Figure 4 ; the model can be browsed on the web, as shown in Figure 5 ; web application programs can also be developed to browse the model and view the primitive attributes, as shown in Figure 6 .
[0164] Because the finally generated data is in the standard gltf and json structure files and is in plain code and can be directly edited and read, it can be directly read by some mainstream tools on the Internet. Such as the online browsing website editor of three.js, or the 3DViewer built into Windows 10, can directly read the gltf data, view its rendering performance, and can also adjust the rendering style, style, material, etc. in real time. Through text editing tools such as Notepad++ or Microsoft's visual code, the Json file can be directly opened and formatted in a structured manner, which is very convenient for users to browse and view.
[0165] In one implementation, the multiple functional modules set in this application include a multi-source adaptation module, a spatial data processing module, a non-spatial data processing module, a data optimization module, and a visualization expression module, as shown in Figure 7 .
[0166] Technical effects brought by the present invention:
[0167] Compared with the current situation where different specialized software is required to open and view building models from different sources, the data after multi-source heterogeneous fusion processing firstly reduces the file size by discarding some data that users are not concerned about and then optimizing the data that users care about, thus facilitating transmission and storage; then, compared with some encrypted or encoded and non-editable model formats, the data processed in this application is in plain code and can be edited. Users can directly open and browse it with a conventional text editor, and add the information they want or remove the data that users are not concerned about according to different application scenarios and requirements, which has very strong scalability; finally, the data processed in this application supports cross-platform and cross-device. Users can read it on Linux, Windows, and can also read it on the desktop, browser, and mobile (mobile phone, tablet) terminals, with a very wide range of applicable scenarios.
[0168] Exemplary system
[0169] Based on the above embodiments, the present invention further provides a BIM model data multi-source heterogeneous fusion display system, as Figure 8 shown. The system in this embodiment includes a data acquisition module 10, a spatial data processing module 20, a non-spatial data processing module 30, a mapping relationship establishment module 40, and a visualization expression module 50. The data acquisition module 10 is used to acquire BIM model data; the spatial data processing module 20 is used to extract the primitive spatial data in the BIM model data, perform format conversion and storage on the primitive spatial data, and obtain a spatial data file; the non-spatial data processing module 30 is used to extract the primitive attribute data in the BIM model data, perform format conversion and storage on the primitive attribute data, and obtain an attribute data file; the mapping relationship establishment module 40 is used to establish a mapping relationship between the spatial data file and the attribute data file; the visualization expression module 50 is used to optimize the spatial data file and the attribute data file after establishing the mapping relationship, and perform visual display on the optimized spatial data file and attribute data file.
[0170] In one implementation, the spatial data processing module includes:
[0171] A spatial data extraction unit, used to extract the primitive vertex coordinates, primitive vertex normals, and primitive texture coordinates in the primitive spatial data;
[0172] A first format conversion unit, used to perform format conversion on the primitive vertex coordinates, primitive vertex normals, and primitive texture coordinates based on a first target storage format;
[0173] A spatial data storage unit, used to write the format-converted primitive vertex coordinates, primitive vertex normals, and primitive texture coordinates into a gltf file for storage, and obtain a spatial data file.
[0174] In one implementation, the non-spatial data processing module includes:
[0175] A second format conversion unit, used to perform format conversion on the primitive attribute data based on a second target storage format;
[0176] An attribute data storage unit, used to write the format-converted primitive attribute data into a json file for storage, and obtain an attribute data file.
[0177] In one implementation, the visualization expression module includes:
[0178] A first splitting unit, used to perform splitting processing on the spatial data file based on a preset standard size, and obtain a number of spatial data sub-files;
[0179] A second splitting unit, configured to split the attribute data file based on the preset standard size to obtain attribute data sub-files.
[0180] In one implementation, the visualization expression module further includes:
[0181] A data optimization unit, configured to perform vertex deduplication or material optimization on the spatial data sub-files.
[0182] In one implementation, the system further includes:
[0183] A model information extraction module, configured to extract model information from the BIM model data and store the model information in a json file.
[0184] Establish a mapping relationship between the spatial data file and the attribute data file through the guid field.
[0185] Based on the above embodiments, the present invention further provides a terminal device, and the principle block diagram of the terminal device can be as Figure 9 shown. The terminal device is the host computer in the above embodiments. The terminal device may include one or more processors 100 ( Figure 9 only one is shown in the figure), a memory 101, and a computer program 102 stored in the memory 101 and executable on one or more processors 100, for example, a program for the multi-source heterogeneous fusion display method of BIM model data. When the one or more processors 100 execute the computer program 102, each step in the embodiment of the multi-source heterogeneous fusion display method of BIM model data can be implemented. Alternatively, when the one or more processors 100 execute the computer program 102, the functions of each template / unit in the embodiment of the multi-source heterogeneous fusion display system of BIM model data can be implemented, which is not limited here.
[0186] In one embodiment, the so-called processor 100 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0187] In one embodiment, the memory 101 may be an internal storage unit of an electronic device, such as a hard disk or memory of the electronic device. The memory 101 may also be an external storage device of the electronic device, such as a plug-in hard disk equipped on the electronic device, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory 101 may also include both an internal storage unit and an external storage device of the electronic device. The memory 101 is used to store computer programs and other programs and data required by the terminal device. The memory 101 may also be used to temporarily store data that has been output or will be output.
[0188] Those skilled in the art can understand that Figure 9 the principle block diagram shown is only a block diagram of some structures related to the solution of the present invention, and does not constitute a limitation on the terminal device to which the solution of the present invention is applied. The specific terminal device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0189] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it may include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, operational database, or other medium used in the embodiments provided by the present invention may include non-volatile and / or volatile memories. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.
[0190] In summary, the present invention discloses a method, system and device for multi-source heterogeneous fusion display of BIM model data. The method includes: obtaining BIM model data; extracting the graphic element spatial data in the BIM model data, performing format conversion and storage on the graphic element spatial data to obtain a spatial data file; extracting the graphic element attribute data in the BIM model data, performing format conversion and storage on the graphic element attribute data to obtain an attribute data file; establishing a mapping relationship between the spatial data file and the attribute data file; optimizing the spatial data file and the attribute data file after establishing the mapping relationship, and performing visual display on the optimized spatial data file and attribute data file. By uniformly performing format conversion and storage on the graphic element spatial data and attribute data in multiple BIM models, and establishing a mapping relationship between the spatial data and the attribute data, the present invention facilitates the direct visual display of multiple BIM model data.
[0191] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for multi-source heterogeneous fusion display of BIM model data, characterized in that, The method includes: Obtaining BIM model data; the BIM model data includes dwg and rvt of Autodesk, dgn of Bentley, and ifc in the format defined by OpenBIM; Extracting the primitive spatial data from the BIM model data, performing format conversion and storage on the primitive spatial data, and obtaining a spatial data file; Extracting the primitive attribute data from the BIM model data, performing format conversion and storage on the primitive attribute data, and obtaining an attribute data file; Establishing a mapping relationship between the spatial data file and the attribute data file; Optimizing the spatial data file and the attribute data file after establishing the mapping relationship, and visually displaying the optimized spatial data file and attribute data file; The extracting the primitive spatial data from the BIM model data, performing format conversion and storage on the primitive spatial data, and obtaining a spatial data file includes: Extracting the primitive vertex coordinates, primitive vertex normals, and primitive texture coordinates from the primitive spatial data; Performing format conversion on the primitive vertex coordinates, primitive vertex normals, and primitive texture coordinates based on a first target storage format; Writing the format-converted primitive vertex coordinates, primitive vertex normals, and primitive texture coordinates into a gltf file for storage, and obtaining a spatial data file; The optimizing the spatial data file and the attribute data file after establishing the mapping relationship includes: Performing a splitting process on the spatial data file based on a preset standard size to obtain a number of spatial data sub-files; Performing a splitting process on the attribute data file based on the preset standard size to obtain attribute data sub-files.
2. The BIM model data multi-source heterogeneous fusion display method according to claim 1, wherein The performing format conversion and storage on the primitive attribute data to obtain an attribute data file includes: Performing format conversion on the primitive attribute data based on a second target storage format; Writing the format-converted primitive attribute data into a json file for storage, and obtaining an attribute data file.
3. The BIM model data multi-source heterogeneous fusion display method according to claim 1, characterized in that The method further includes: Establishing a mapping relationship between the spatial data file and the attribute data file through a guid field.
4. The BIM model data multi-source heterogeneous fusion display method according to claim 1, wherein The optimizing the spatial data file and the attribute data file after establishing the mapping relationship further includes: Performing vertex deduplication or material optimization on the spatial data sub-files.
5. The BIM model data multi-source heterogeneous fusion display method according to claim 2, wherein The method further includes: Extracting the model information from the BIM model data and storing the model information in a json file.
6. A BIM model data multi-source heterogeneous fusion display system, characterized in that, The system includes: A data acquisition module for obtaining BIM model data; A spatial data processing module for extracting the primitive spatial data from the BIM model data, performing format conversion and storage on the primitive spatial data, and obtaining a spatial data file; A non-spatial data processing module for extracting the primitive attribute data from the BIM model data, performing format conversion and storage on the primitive attribute data, and obtaining an attribute data file; A mapping relationship establishment module for establishing a mapping relationship between the spatial data file and the attribute data file; A visualization expression module, which is used to optimize the spatial data file and the attribute data file after establishing the mapping relationship, and visually display the optimized spatial data file and attribute data file; The BIM model data includes dwg and rvt of Autodesk, dgn of Bentley, and ifc in the format specified by OpenBIM; The spatial data processing module is further used for: extracting the primitive vertex coordinates, primitive vertex normals, and primitive texture coordinates in the primitive spatial data; performing format conversion on the primitive vertex coordinates, primitive vertex normals, and primitive texture coordinates based on a first target storage format; writing the format-converted primitive vertex coordinates, primitive vertex normals, and primitive texture coordinates into a gltf file for storage to obtain a spatial data file; The visualization expression module is further used for: performing splitting processing on the spatial data file based on a preset standard size to obtain a number of spatial data sub-files; performing splitting processing on the attribute data file based on the preset standard size to obtain attribute data sub-files.
7. A terminal device, characterized in that, The terminal device includes a memory, a processor, and a program of the multi-source heterogeneous fusion display method of BIM model data stored in the memory and executable on the processor. When the processor executes the program of the multi-source heterogeneous fusion display method of BIM model data, the steps of the multi-source heterogeneous fusion display method of BIM model data described in any one of claims 1-5 are implemented.
8. A computer-readable storage medium, characterized in that, A program of the multi-source heterogeneous fusion display method of BIM model data is stored on the computer-readable storage medium. When the program of the multi-source heterogeneous fusion display method of BIM model data is executed by the processor, the steps of the multi-source heterogeneous fusion display method of BIM model data described in any one of claims 1-5 are implemented.
Citation Information
Patent Citations
Digital twin BIM model conversion and lightweight method and device
CN113870437A
Three-dimensional model merging processing method and device and medium
CN115294312A