A lightweight conversion method and device for IFC format data

By lightweight processing and format conversion of IFC format data and converting it into glTF format, the problem that cloud platforms cannot parse and visualize the IFC format BIM model, and the visual adaptation and efficiency improvement of the IFC model on the cloud platform is achieved.

CN116934964BActive Publication Date: 2025-02-14GUANGZHOU YUEJIAN SANHE SOFTWARE
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310834222.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-07
Publication Date
2025-02-14
Estimated Expiration
2043-07-07

AI Technical Summary

Technical Problem

Existing cloud platforms cannot parse and visualize the BIM model in IFC format, resulting in compatibility issues. In addition, the IFC format files are large in size, which takes time to transmit and parse, affecting the user experience.

Method used

A lightweight conversion method for IFC format data is proposed. By extracting entity data of model component entity class, lightweight processing and format conversion, IFC format data is converted into glTF format, and the cloud platform is compatible with IFC format models.

Benefits of technology

The visual adaptation of the IFC model on the cloud platform is realized, reducing the amount of data transmitted and parsed, improving transmission efficiency and processing efficiency, and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116934964B_ABST
    Figure CN116934964B_ABST
Patent Text Reader

Abstract

The present invention discloses a lightweight conversion method, device, electronic device and computer-readable storage medium for IFC format data, the method comprising: after obtaining BIM model data in IFC format, performing lightweight processing on the BIM model data to obtain lightweight data; converting the lightweight data into conversion data in a simplified format for three-dimensional visualization on a cloud platform. After obtaining BIM model data in IFC format, the present invention can sequentially perform lightweight processing and format conversion processing on the BIM model data, and finally use the processed data for visualization, thereby realizing visualization adaptation of the IFC model on the cloud platform, while reducing the effect of the amount of data transmitted and analyzed, thereby improving transmission efficiency and processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] IFC format is an open standard format for building building information models. IFC format data (e.g., Building Information Model BIM) can be used to describe the geometry, spatial relationships, materials and components of a building, as well as the function and performance of a building. It can generally only be parsed and applied by desktop BIM professional software.

[0003] A cloud platform refers to a cloud platform that runs on a web page and supports parsing and visualization of common 3D model formats. It usually supports parsing and 3D visualization of models in formats such as obj, stl, glTF, etc. on the web page, but cannot parse and visualize BIM models in IFC format. Common cloud platforms include Sanhe BIM Basic Platform, Glodon's BIMFACE, etc.

[0004] The data files in IFC format contain a large amount of cross-domain and cross-professional data, as well as geometric data and non-geometric data of buildings. These data can be parsed and identified by BIM professional software to extract the geometric data of the building, and then visualize the geometry for users to view. However, IFC format data can only be read and identified by desktop BIM professional software, and conventional cloud platforms can only recognize common 3D model data formats, such as obj, stl, glTF, etc., and cannot directly parse and visualize IFC data. Therefore, the compatibility of cloud platforms with BIM models in IFC format needs to be solved urgently; at the same time, IFC format data contains a lot of redundant data that is not necessary for visualization, and the data file occupies a large storage space. If the IFC format data is directly used for visualization, it will result in the inclusion of a lot of unnecessary parsed data in the parsing process, such as personnel, tasks, progress information, etc., and because the IFC format file is large in size, the time consumed for transmission and parsing will increase significantly, resulting in slow loading rate, low processing efficiency, and affecting user experience. Summary of the invention

[0005] The present invention proposes a lightweight conversion method and device for IFC format data. After acquiring BIM model data in IFC format, the method can sequentially perform lightweight processing and format conversion processing on the BIM model data, thereby reducing the amount of data transmitted and analyzed, thereby improving transmission efficiency and processing efficiency, and converting IFC format files into three-dimensional models in glTF format, thereby achieving compatibility of cloud platforms with IFC format models.

[0006] A first aspect of an embodiment of the present invention provides a lightweight conversion method for IFC format data, the method comprising:

[0007] After obtaining the BIM model data in IFC format, the BIM model data is lightweight processed to obtain lightweight data; wherein, the lightweight processing of the BIM model data to obtain lightweight data includes: extracting entity data about the model component entity class from the BIM model data, and traversing each model component entity class in the entity data to obtain component information; when it is determined that the component information is parseable and the component information is not repeated in the corresponding array, extracting data from the BIM model data according to the component information and importing it into a temporary storage array to obtain lightweight data;

[0008] The lightweight data is converted into conversion data in a simplified format for three-dimensional visualization on a cloud platform; the simplified format is a glTF format; wherein the lightweight data is converted into conversion data in a simplified format, including: creating definition parameters according to a data structure framework in a glTF format, each definition parameter corresponding to a model component entity class; extracting lightweight data corresponding to each model component entity class from the temporary array; adding the value of the lightweight data to the corresponding definition parameter and exporting it to a file in a glTF format to obtain conversion data.

[0009] In a possible implementation manner of the first aspect, extracting data from the BIM model data according to the component information and importing the data into a temporary storage array to obtain lightweight data includes:

[0010] Parsing the component information of the model component entity class being the material class to obtain material feature information;

[0011] Generate an IFC material information index list using the material feature information;

[0012] Material data is extracted from the BIM model data according to the IFC material information index list and imported into a corresponding temporary storage array to obtain lightweight data.

[0013] In a possible implementation manner of the first aspect, extracting data from the BIM model data according to the component information and importing the data into a temporary storage array to obtain lightweight data includes:

[0014] Writing the component information whose entity class of the model component is a geometry class into a preset byte array, and obtaining the length of the preset byte array;

[0015] Extracting face and vertex data from the preset byte array, and calculating face and vertex parameters according to the face and vertex data, wherein the face and vertex parameters include the maximum value of the face and vertex, the minimum value of the face and vertex, and the offset value of the vertex;

[0016] The byte array length and face and vertex parameters are imported into a temporary storage array corresponding to the component information to obtain lightweight data.

[0017] In a possible implementation manner of the first aspect, extracting data from the BIM model data according to the component information and importing the data into a temporary storage array to obtain lightweight data includes:

[0018] Parsing the component information of the model component entity class as an attribute class to obtain attribute feature information, wherein the attribute feature information includes: simple attribute information and complex attribute information;

[0019] Acquire corresponding attribute parameters from the BIM model data through the attribute set name of the attribute feature information, and associate the attribute value with the component information;

[0020] The attribute parameters are imported into a temporary storage array corresponding to the component information to obtain lightweight data.

[0021] In a possible implementation manner of the first aspect, after the step of adding the value of the lightweight data to the corresponding definition parameter and exporting it as a file in glTF format to obtain conversion data, the method further includes:

[0022] The point and surface byte arrays about the physical component are extracted from the BIM model data and converted into a resource file in BIN format, and the file in glTF format and the resource file are merged into a file in GLB format, and the file in GLB format is used for visual display.

[0023] A second aspect of an embodiment of the present invention provides a lightweight conversion device for IFC format data, the device comprising:

[0024] A lightweight processing module is used to perform lightweight processing on the BIM model data to obtain lightweight data after acquiring the BIM model data in IFC format; wherein, the lightweight processing on the BIM model data to obtain lightweight data includes: extracting entity data about the model component entity class from the BIM model data, and traversing each model component entity class in the entity data to obtain component information; when it is determined that the component information is parseable and the component information is not repeated in the corresponding array, extracting data from the BIM model data according to the component information and importing it into a temporary storage array to obtain lightweight data;

[0025] The format conversion module is used to convert the lightweight data into converted data in a simplified format for three-dimensional visualization on a cloud platform.

[0026] Compared with the prior art, the lightweight conversion method and device of IFC format data provided by the embodiment of the present invention have the beneficial effect that: after obtaining BIM model data in IFC format, the present invention can perform lightweight processing and format conversion processing on the BIM model data in sequence, and finally use the processed data for visual display, thereby realizing the visual adaptation of the IFC model on the cloud platform, and at the same time achieving the effect of reducing the amount of data transmitted and parsed, thereby improving the transmission efficiency and processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 It is a flowchart of a lightweight conversion method of IFC format data provided by an embodiment of the present invention;

[0028] Figure 2 is an operational flow chart of data lightweight processing provided by an embodiment of the present invention;

[0029] Figure 3 This is a data structure framework diagram of the glTF format provided by an embodiment of the present invention;

[0030] Figure 4 is an operational flow chart of format conversion provided by an embodiment of the present invention;

[0031] Figure 5 is a three-dimensional visualization operation flow chart provided by an embodiment of the present invention;

[0032] Figure 6 This is an operation flow chart of a lightweight conversion method for IFC format data provided by an embodiment of the present invention;

[0033] Figure 7 It is a structural schematic diagram of a lightweight conversion device for IFC format data provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] In order to solve the above problems, a lightweight conversion method for IFC format data provided by an embodiment of the present application will be introduced and explained in detail through the following specific embodiments.

[0036] Reference Figure 1 , shows a flow chart of a lightweight conversion method for IFC format data provided by an embodiment of the present invention.

[0037] In one embodiment, the method is applicable to a cloud platform that is compatible with common 3D model formats (such as obj, stl, glTF, etc.) and supports 3D visualization of models.

[0038] In one embodiment, the cloud platform has the graphics rendering capability of the web page and the parsing capability of common three-dimensional format models. Most of these platforms can parse glTF and perform three-dimensional visualization, but usually cannot parse and visualize IFC format models. The cloud platform of the present invention is a three-dimensional graphics engine using ThreeJS as the underlying framework, and the supported three-dimensional model format is glTF / GLB. The lightweight conversion method of IFC format data of the present invention can enable the cloud platform to parse and visualize the IFC format data model, and the basic principle is to convert the IFC format data into glTF / GLB format data in a lightweight manner.

[0039] As an example, the lightweight conversion method of IFC format data may include:

[0040] S11. After acquiring the BIM model data in the IFC format, lightweight processing is performed on the BIM model data to obtain lightweight data.

[0041] In one embodiment, the user can upload BIM model data in IFC format on the cloud platform. Specifically, after the user uses BIM professional modeling software to build a BIM model, the user can export the BIM model in IFC format through the BIM professional modeling software and upload it to the cloud platform for processing.

[0042] Usually, some professional software such as Revit, Bently, Catia, etc. can export BIM models in IFC format.

[0043] After obtaining the BIM model data in IFC format, the BIM model data is lightweight processed to obtain lightweight data. The lightweight processing can be data extraction processing, which extracts some data required for visualization from the BIM model data and removes many data that are not related to the three-dimensional visualization display (for example, a large amount of cross-domain and cross-professional data, etc.), thereby greatly reducing the amount of data transmitted subsequently, and also reducing the time spent on parsing during visualization processing, thereby improving processing efficiency.

[0044] Reference Figure 2 , shows an operational flow chart of data lightweight processing provided by an embodiment of the present invention.

[0045] Since the BIM model data includes data of different model components, in order to perform lightweight processing on the data of each model component, in an optional embodiment, step S11 may include the following sub-steps:

[0046] S111. Extracting entity data about a model component entity class from the BIM model data, and traversing each model component entity class in the entity data to obtain component information.

[0047] In one embodiment, some fixed model parameters in the BIM model data may be initialized first. The method needs to first initialize some fixed model necessary parameters (such as Asset, Scene) required by the glTF open source library. Among them, some fixed model parameters may be fixed model necessary parameters, such as model.asset = Asset (version = '2.0'), model.scene = 0 and other basically unchanged parameters.

[0048] Next, all component entity classes of the model in the BIM model data can be obtained to obtain the entity data.

[0049] In the specific implementation, the open source IfcOpenShell library in Python language can be used, and the ifc_file.by_type method can be used to obtain the corresponding component entity class of the BIM model data.

[0050] In one embodiment, the model component entity class included in the entity data may include three types of objects, namely: material class (IfcMaterial), geometry class (IfcProduct) and property class (IfcProperty). The operation method of extracting entity data is as follows: For example, to extract the geometry class (IfcProduct), the ifc_file.by_type('IfcProduct') method may be used to obtain spatial elements and physical construction elements. Among them, spatial elements include IfcSite, IfcBuilding, IfcBuildingStorey, IfcSpace, etc.; physical construction elements include IfcWall, IfcBeam, IfcDoor, IfcWindow, IfcStair, etc.

[0051] Since each model component entity class contains multiple elements and data, it can be traversed to obtain the component information corresponding to each model component entity class, so as to realize the lightweight extraction of the entity class data of the IFC component.

[0052] Specifically, the data contained in the model component entity class can be parsed first. During the parsing process, it is necessary to recursively traverse each entity object of the IFC file. For example, for the extraction of the spatial element IfcBuilding of the geometry class (IfcProduct), IfcBuilding contains verts information, faces information, etc., and the subsequent geometric information extracted is these contents. It should be noted that each element inside the object of each model component entity class is traversed to extract the corresponding component information.

[0053] S112: When it is determined that the component information is parseable and the component information is not repeated in the corresponding array, data is extracted from the BIM model data according to the component information and imported into a temporary array to obtain lightweight data.

[0054] To ensure lightweight, in this embodiment, it can be determined whether the component information of each model component entity class can be parsed. If it can be parsed, each loaded component information and its subclass elements and other data can be imported into an array, and it can be detected whether the currently traversed subclass has duplicates in its current array.

[0055] Because during the traversal, there may be a subclass that also contains a subset, so it is necessary to use a recursive method to repeatedly call and traverse the subclass of the subclass. When it is determined that the component information can be parsed and the elements or subsets of the component information and its subclasses are not repeated in their corresponding arrays, the traversal is determined to be complete, and the corresponding data can be extracted from the BIM model data according to the elements contained in the component information and imported into the temporary array, thereby obtaining lightweight data.

[0056] Reference Figure 2 , shows an operation flow chart of data lightweight processing provided by an embodiment of the present invention. In an embodiment, the model component entity class includes: material class (IfcMaterial), geometry class (IfcProduct) and property class (IfcProperty).

[0057] As an example, the lightweight extraction of material class (IfcMaterial) data may include the following sub-steps:

[0058] S21, parsing the component information of the model component entity class being the material class to obtain material feature information.

[0059] S22: Generate an IFC material information index list using the material feature information.

[0060] S23. Extracting material data from the BIM model data according to the IFC material information index list and importing the material data into a corresponding temporary storage array to obtain lightweight data.

[0061] Specifically, in order to extract lightweight data of the material class (IfcMaterial), it is necessary to obtain the index list of all material information in the current IFC format BIM model file (hereinafter referred to as IFC file). The ifc_file.by_type method can be used to obtain the index list of all material information in the current IFC format BIM model file. This method is the parsing method of Ifcopenshell for IFC files, and the command ifc_file.by_type('IfcMaterial') is used specifically. This method can be a conventional means of extracting IFC files in this field.

[0062] This method can traverse all IfcMaterial objects in the IFC file and return a list containing these objects. Then, the index of each material object is extracted from the list and stored in an index list, which is the materials node in the glTF file data structure, in the form of a dictionary array with key names such as name and pbrMetallicRoughness.

[0063] When extracting geometric component information, the cloud platform can use the obtained material index number to find the material information of the current component corresponding to the materials node. The cloud platform can record the material information of the current component as its material style. In this way, in subsequent operations, it can be processed accordingly according to the component's material style.

[0064] As an example, the lightweight extraction operation for geometric class (IfcProduct) data may include the following sub-steps:

[0065] S31, writing the component information of the model component entity class being the geometry class into a preset byte array, and obtaining the length of the preset byte array.

[0066] S32, extracting face and vertex data from the preset byte array, and calculating face and vertex parameters according to the face and vertex data, wherein the face and vertex parameters include the maximum value of the face and vertex, the minimum value of the face and vertex, and the offset value of the vertex.

[0067] S33, importing the byte array length and face and vertex parameters into a temporary storage array corresponding to the component information to obtain lightweight data.

[0068] Specifically, in order to extract lightweight data of the geometry class, it is necessary to generate the triangular mesh data of the components in the BIM model file in IFC format (hereinafter referred to as IFC file), and the geom.create_shape method in the IfcOpenShell library can be used. Specifically, the geometric data of all IfcProduct objects in the IFC file can be preliminarily extracted by calling this method. Since the geometric information of different components may be composed of multiple subclasses, it is necessary to call the geom.create_shape method for each subclass separately, extract the vertex and triangular face information of the relevant components, calculate the maximum and minimum values ​​of the triangular faces and vertices, and generate the offset value of the current point and the length of the byte array size. These parameters are the parameters required by the Accessor inside the model class in the glTF data structure, which are used to describe the geometric information of the model. At the same time, the corresponding material index number needs to be extracted, and the number needs to be matched with the material information list one by one to obtain the material information of the current component.

[0069] It should be noted that, although material information has been extracted in the previous step, the extracted material information is the entire material information of the current component, and has not been linked to any single geometric material of the model; the single geometric information obtained here includes the corresponding material number, which can be used to establish a link with the entire material information of the current component that has been extracted in the previous step and the current single geometric information.

[0070] Specifically, you can set the attributes (internal key names such as TEXCOORD_0, which sets texture coordinates) and material attributes (directly set attribute values, i.e., material information index numbers) under the primitives key value of the Mesh node in the glTF data structure.

[0071] To achieve this, the ifc_file.by_type method has been used in the previous step to obtain the index list of all material information in the IFC file. This index list can also be used to find the material information of the current component and record it as the material style of the current component. This material information is the parameter required by the material inside the Mesh class in the glTF data structure, which is used to describe the material information of the model.

[0072] As an example, the operation of lightweight extraction of property class (IfcProperty) data may include the following sub-steps:

[0073] S41, parsing the component information whose model component entity class is an attribute class to obtain attribute feature information, wherein the attribute feature information includes simple attribute information and complex attribute information.

[0074] S42: Acquire corresponding attribute parameters from the BIM model data through the attribute set name of the attribute feature information, and associate the attribute value with the component information.

[0075] S43, the attribute parameters are imported into a temporary storage array corresponding to the component information to obtain lightweight data.

[0076] Specifically, in order to extract lightweight data of attribute data. To extract attribute information from the IFC file, you need to use the command ifc_file.by_type('IfcProduct') and traverse each element inside the IfcProductIFC file to obtain all entities in the ifc file. Use the ifc_entity.is_a() command to determine whether the entity is a component class of the specified type. You can filter out component classes such as IfcRailing, IfcSpace, IfcStairFlight, IfcWall, etc., and filter out entities that meet the conditions.

[0077] Then, use the ifc_file.by_type command again for each filtered component class, assign the return value to elements, traverse each element in elements, use ifc_entity.get_info() to obtain the various attributes of each entity component id of the component class, and find the corresponding attribute value according to the attribute set name and attribute type.

[0078] The way to obtain the attribute set name and attribute type is as follows: Specifically, you can use the command ifc_file.by_type('IfcProduct'), traverse each element inside, use the is_a() command to filter out component classes such as IfcRailing, IfcSpace, IfcStairFlight, IfcWall, etc., and use the ifc_file.by_type command for each component class again, and assign the return value to elements. Traverse each element inside elements, and use get_info() to obtain various attribute information of each component id of the component class. Here, simple attribute information is obtained. Then check whether elements has the IsDefinedBy attribute. If so, traverse each IsDefinedBy attribute. Check whether it is an IfcRelDefinesByProperties or IfcRelDefinesByType instance. If not, get the RelatingType property. Check whether it is an IfcTypeObject instance. If so, get the HasPropertySets property. Iterate through each IfcPropertySet instance, iterate through the IfcPropertySingleValue in it, get the Name and NominalValue properties, that is, the complex properties of the component are obtained here. In the previous check, check whether it is an IfcRelDefinesByProperties or IfcRelDefinesByType instance. If so, get the RelatingPropertyDefinition property, get the HasProperties property, and finally get the Name and NominalValue properties in the same steps. The complex properties of the component are also obtained here. After executing the above traversal and obtaining all the attribute information in the IFC file, the program finally establishes a connection between these attribute information and the corresponding components, and records them according to the component class assignment as the corresponding component of the Nodenodes node Extras class in the glTF data structure.

[0079] In this embodiment, after performing the above-mentioned lightweight operation, various required lightweight parameters can be obtained. In order to store different types of lightweight data separately, a dictionary array with key names such as name, mesh, extras, etc. can be used as a preset temporary array, and then saved in the form of a dictionary array (for example, name is used as a component attribute name, mesh locates the corresponding component, and extras stores more attribute information). These attribute information can facilitate subsequent processing and application.

[0080] Finally, the above related information can be stored in an array, and the array can be returned as the lightweight extraction result of IFC data after the subsequent traversal is completed.

[0081] S12: converting the lightweight data into converted data in a simplified format for three-dimensional visualization on a cloud platform.

[0082] After lightweight extraction is completed, in order to facilitate subsequent transmission and simplify the procedures for subsequent parsing operations, the current IFC format lightweight data can be converted to form converted data. The simplified format can be glTF format or GLB format, which can be adjusted according to actual needs.

[0083] Reference Figure 3-4 , respectively showing a data structure framework diagram of the glTF format provided by an embodiment of the present invention and an operation flow chart of format conversion provided by an embodiment of the present invention.

[0084] In one embodiment, the simplified format is a glTF format. After obtaining the lightweight extraction result of the IFC data, the lightweight extraction result needs to be filled into a glTF file. In order to fill the lightweight extraction result of the IFC data into the glTF file so as to convert the lightweight data into the converted data in the glTF format, as an example, step S13 may include the following sub-steps:

[0085] S131. Create definition parameters according to the data structure framework in glTF format, each definition parameter corresponding to a model component entity class.

[0086] S122. Extracting lightweight data corresponding to each model component entity class from the temporary storage array.

[0087] S123, adding the value of the lightweight data to the corresponding definition parameter and exporting it into a file in glTF format to obtain conversion data.

[0088] like Figure 3As shown in the figure, the glTF data structure includes Asset (containing version information of the glTF file, generation tools and other metadata), Scene (containing one or more nodes, defining the hierarchical structure in the scene), Node (representing an object in the scene, which can contain components such as geometry, materials, cameras, lights, etc., and can also contain other nodes to form a hierarchical structure), Mesh (representing a geometric body, composed of one or more Primitives), Primitive (representing a single primitive of a geometric body, which can be a triangle, line segment or point, etc., containing data such as vertices, normals, texture coordinates, etc.), Material (representing a material, containing properties such as shader, texture, color, etc.), Texture (representing a texture image, which can be 2D or 3D), Animation (representing animation, containing keyframes, interpolation methods, animation targets, etc.), etc.

[0089] The data structure of glTF is relatively simple, easy to process and transmit, and it is a very convenient 3D data exchange format.

[0090] Specifically, the format conversion operation of the present invention is as follows:

[0091] First, extract the corresponding data from the lightweight data in IFC format. Specifically, the program can extract the corresponding stored data from the lightweight extraction result of IFC data according to the current component data.

[0092] Second, dynamically create glTF parameters. According to the IFC file structure, create the corresponding glTF parameters. The following are the specific settings of these parameters:

[0093] Create material parameters. Create Mesh parameters, which can be filled with corresponding values ​​such as material, texture, image, etc. These parameters can describe the model's color, texture and other visual effects.

[0094] Create geometric parameters. Create Accessor and fill it with corresponding values ​​such as BufferView, byteOffset, componentType, count, min, max, etc. Accessor can describe the model's vertex data, normal data and other geometric information. Next, you need to create BufferView and fill it with corresponding values ​​such as byteLength and target. BufferView can describe the model's data storage method, data type and other information. Finally, use Primitive corresponding values ​​to fill in the Mesh parameters. Primitive can describe the model's drawing method, vertex index and other information.

[0095] Create attribute parameters. In addition to material and geometry parameters, you also need to set attribute parameters. You can use Extras parameters to import other attribute values ​​of the model. Extras can store the architectural digital information of the model for subsequent management and use.

[0096] Third, write out the resource file. The program uses the byte array vertex_bytearray and the FileResource method to write out the resource file and generate the vertices.bin file, which contains all the detailed data of the glTF file, thereby obtaining the converted data in the glTF format.

[0097] In one embodiment, in order to further reduce the steps of subsequent format processing, the lightweight data in IFC format may be converted to obtain data or files in GLB format. As an example, step S13 may include the following sub-steps:

[0098] S124. Extract the point and surface byte arrays about the physical component from the BIM model data and convert them into a resource file in BIN format, merge the glTF format file and the resource file into a GLB format file, and use the GLB format file for visual display.

[0099] In the step of converting into a resource file, the cloud platform can use the byte array vertex_bytearray and the FileResource method to write out the resource file and generate a vertices.bin file, which contains all the detailed data of the glTF file, thereby obtaining a file in the glTF format to obtain the converted data.

[0100] It should be noted that the BIN file and the glTF file are placed together, the former is a data file, and the latter is a structure file; both must be imported into the cloud platform together to successfully load the model.

[0101] The GLB file is a binary file generated by merging the BIN file and the glTF file. It is a complete model file. This file can be successfully loaded by importing it into the cloud platform alone.

[0102] In one embodiment, step S124 may be performed based on step S123.

[0103] Specifically, the binary file output by merging the glTF file with the configuration file BIN is smaller in size and more in line with the computer's underlying parsing requirements, so it can be easily used to transmit models on cloud platforms.

[0104] After completing the data processing of the glTF file, you can use the glTF.export method to export the glTF format file and the GLB format file respectively.

[0105] In one embodiment, the operation of three-dimensional visualization display may use conversion data in glTF format or conversion data in GLB format to perform three-dimensional visualization display processing, and which format to use may be selected according to actual needs.

[0106] Reference Figure 5 , showing an operation flow chart of three-dimensional visualization provided by an embodiment of the present invention.

[0107] Specifically, the glTF file or GLB file generated by the server after filling can be transmitted to the cloud platform. After the user loads it through the client network, the corresponding glTF model file will be parsed and rendered by the 3D graphics engine of the cloud platform, and finally the online visual browsing of the BIM model in IFC format on the cloud platform will be realized.

[0108] Reference Figure 6 , shows an operation flow chart of a lightweight conversion method for IFC format data provided by an embodiment of the present invention.

[0109] Specifically, the lightweight conversion method of IFC format data may include the following steps:

[0110] Step 1: Upload the BIM model in IFC format.

[0111] Step 2: Lightweight extraction of IFC format data.

[0112] The third step is to extract data and fill it into glTF file.

[0113] Step 4: 3D visualization rendering.

[0114] The present invention can solve the problem that common cloud platforms cannot parse and visualize IFC format BIM models. By converting IFC to glTF format models, common cloud platforms can realize 3D visualization of IFC format BIM models on the web by parsing the converted glTF models, thus solving the compatibility problem.

[0115] The present invention can reduce the size of the three-dimensional model. In view of the problem that the IFC format file is large in size, this patent performs lightweight processing on the IFC model and fills it into the glTF file, effectively optimizing the problem of large volume of the three-dimensional model.

[0116] The present invention can improve the efficiency of 3D model rendering. Visual rendering in IFC format requires additional compilation, which reduces the efficiency of cloud platform rendering 3D models. This patent converts IFC into glTF format, which not only solves the problem of large 3D model volume, but also can more effectively improve the efficiency of cloud platform rendering 3D models. glTF format is a standard format that is more suitable for the visualization of 3D models. Visual rendering does not require additional compilation and natively supports display rendering.

[0117] The present invention can improve the loading speed of the cloud platform. By converting IFC to glTF format, 3D models can be stored and transmitted more efficiently. The cloud platform is mainly transmitted through the network. The model size has a great impact on the cloud platform download data, and the rendering efficiency has a great impact on the loading speed of the cloud platform. This patent optimizes the size and rendering efficiency of the three-dimensional model and improves the loading speed of the cloud platform by converting the IFC format into glTF format after lightweight processing.

[0118] In this embodiment, an embodiment of the present invention provides a lightweight conversion method for IFC format data, and its beneficial effect is that: after obtaining BIM model data in IFC format, the present invention can perform lightweight processing and format conversion processing on the BIM model data in sequence, and finally use the processed data for visual display, thereby realizing the visual adaptation of the IFC model on the cloud platform, and at the same time can reduce the effect of the amount of data transmitted and parsed, thereby improving transmission efficiency and processing efficiency.

[0119] The embodiment of the present invention also provides a lightweight conversion device for IFC format data, see Figure 7 , showing a schematic structural diagram of a lightweight conversion device for IFC format data provided by an embodiment of the present invention.

[0120] Wherein, as an example, the lightweight conversion device of the IFC format data may include:

[0121] A lightweight processing module 701 is used to perform lightweight processing on the BIM model data to obtain lightweight data after acquiring the BIM model data in the IFC format;

[0122] The format conversion module 702 is used to convert the lightweight data into converted data in a simplified format for three-dimensional visualization on the cloud platform.

[0123] Optionally, performing lightweight processing on the BIM model data to obtain lightweight data includes:

[0124] Extracting entity data about a model component entity class from the BIM model data, and traversing each model component entity class in the entity data to obtain component information;

[0125] When it is determined that the component information is parseable and the component information is not repeated in the corresponding array, data is extracted from the BIM model data according to the component information and imported into a temporary array to obtain lightweight data.

[0126] Optionally, extracting data from the BIM model data according to the component information and importing the data into a temporary storage array to obtain lightweight data includes:

[0127] Parsing the component information of the model component entity class being the material class to obtain material feature information;

[0128] Generate an IFC material information index list using the material feature information;

[0129] Material data is extracted from the BIM model data according to the IFC material information index list and imported into a corresponding temporary storage array to obtain lightweight data.

[0130] Optionally, extracting data from the BIM model data according to the component information and importing the data into a temporary storage array to obtain lightweight data includes:

[0131] Writing the component information whose entity class of the model component is a geometry class into a preset byte array, and obtaining the length of the preset byte array;

[0132] Extracting face and vertex data from the preset byte array, and calculating face and vertex parameters according to the face and vertex data, wherein the face and vertex parameters include the maximum value of the face and vertex, the minimum value of the face and vertex, and the offset value of the vertex;

[0133] The byte array length and face and vertex parameters are imported into a temporary storage array corresponding to the component information to obtain lightweight data.

[0134] Optionally, extracting data from the BIM model data according to the component information and importing the data into a temporary storage array to obtain lightweight data includes:

[0135] Parsing the component information of the model component entity class as an attribute class to obtain attribute feature information, wherein the attribute feature information includes: simple attribute information and complex attribute information;

[0136] Acquire corresponding attribute parameters from the BIM model data through the attribute set name of the attribute feature information, and associate the attribute value with the component information;

[0137] The attribute parameters are imported into a temporary storage array corresponding to the component information to obtain lightweight data.

[0138] Optionally, the simplified format is a glTF format, and the step of converting the lightweight data into the converted data in the simplified format includes:

[0139] Create definition parameters according to the data structure framework in glTF format, each definition parameter corresponding to a model component entity class;

[0140] Extracting lightweight data corresponding to each model component entity class from the temporary storage array;

[0141] The value of the lightweight data is added to the corresponding definition parameter and exported as a file in glTF format to obtain conversion data.

[0142] Optionally, after the step of adding the value of the lightweight data to the corresponding definition parameter and exporting it to a file in glTF format to obtain conversion data, the method further includes:

[0143] The point and surface byte arrays about the physical component are extracted from the BIM model data and converted into a resource file in BIN format, and the file in glTF format and the resource file are merged into a file in GLB format, and the file in GLB format is used for visual display.

[0144] Those skilled in the art can clearly understand that, for the sake of convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0145] Furthermore, an embodiment of the present application also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the lightweight conversion method for IFC format data as described in the above embodiment is implemented.

[0146] Furthermore, an embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer-executable program, and the computer-executable program is used to enable a computer to execute the lightweight conversion method of IFC format data as described in the above embodiment.

[0147] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A lightweight conversion method for IFC format data, characterized in that: The method comprises: After obtaining the BIM model data in IFC format, the BIM model data is lightweight processed to obtain lightweight data; wherein, the lightweight processing of the BIM model data to obtain lightweight data includes: extracting entity data about the model component entity class from the BIM model data, and traversing each model component entity class in the entity data to obtain component information; when it is determined that the component information is parseable and the component information is not repeated in the corresponding array, extracting data from the BIM model data according to the component information and importing it into a temporary storage array to obtain lightweight data; The method comprises: extracting entity data about a model component entity class from the BIM model data, and traversing each model component entity class in the entity data to obtain component information, including: using the ifc_file.by_type method in IfcOpenShell to obtain a corresponding component entity class of the BIM model data; the model component entity class includes: a material class, a geometry class, and an attribute class; The lightweight data is converted into conversion data in a simplified format for three-dimensional visualization on a cloud platform, wherein the simplified format is a glTF format; wherein the lightweight data is converted into conversion data in a simplified format, including: creating definition parameters according to a data structure framework in a glTF format, each definition parameter corresponding to a model component entity class; extracting lightweight data corresponding to each model component entity class from the temporary array; adding the value of the lightweight data to the corresponding definition parameter and exporting it to a file in a glTF format to obtain conversion data; Among them, the three-dimensional visualization display for the cloud platform includes: extracting the point and surface byte arrays about the physical components from the BIM model data and converting them into resource files in BIN format, and merging the glTF format file and the resource file into a GLB format file, and using the GLB format file for visualization display.

2. The lightweight conversion method of IFC format data according to claim 1, characterized in that: The step of extracting data from the BIM model data according to the component information and importing the data into a temporary storage array to obtain lightweight data includes: Parsing the component information of the model component entity class being the material class to obtain material feature information; Generate an IFC material information index list using the material feature information; Material data is extracted from the BIM model data according to the IFC material information index list and imported into a corresponding temporary storage array to obtain lightweight data.

3. The lightweight conversion method of IFC format data according to claim 1, characterized in that: The step of extracting data from the BIM model data according to the component information and importing the data into a temporary storage array to obtain lightweight data includes: Writing the component information whose entity class of the model component is a geometry class into a preset byte array, and obtaining the length of the preset byte array; Extracting face and vertex data from the preset byte array, and calculating face and vertex parameters according to the face and vertex data, wherein the face and vertex parameters include the maximum value of the face and vertex, the minimum value of the face and vertex, and the offset value of the vertex; The byte array length and face and vertex parameters are imported into a temporary storage array corresponding to the component information to obtain lightweight data.

4. The lightweight conversion method of IFC format data according to claim 1, characterized in that: The step of extracting data from the BIM model data according to the component information and importing the data into a temporary storage array to obtain lightweight data includes: Parsing the component information of the model component entity class as an attribute class to obtain attribute feature information, wherein the attribute feature information includes: simple attribute information and complex attribute information; Acquire corresponding attribute parameters from the BIM model data through the attribute set name of the attribute feature information, and associate the attribute parameters with the component information; The attribute parameters are imported into a temporary storage array corresponding to the component information to obtain lightweight data.

5. A lightweight conversion device for IFC format data, characterized in that: The device comprises: A lightweight processing module is used to perform lightweight processing on the BIM model data to obtain lightweight data after acquiring the BIM model data in IFC format; wherein, the lightweight processing on the BIM model data to obtain lightweight data includes: extracting entity data about the model component entity class from the BIM model data, and traversing each model component entity class in the entity data to obtain component information; when it is determined that the component information is parseable and the component information is not repeated in the corresponding array, extracting data from the BIM model data according to the component information and importing it into a temporary storage array to obtain lightweight data; The method comprises: extracting entity data about a model component entity class from the BIM model data, and traversing each model component entity class in the entity data to obtain component information, including: using the ifc_file.by_type method in IfcOpenShell to obtain a corresponding component entity class of the BIM model data; the model component entity class includes: a material class, a geometry class, and an attribute class; A format conversion module, used for converting the lightweight data into conversion data in a simplified format for three-dimensional visualization on a cloud platform; wherein the conversion of the lightweight data into conversion data in a simplified format comprises: creating definition parameters according to a data structure framework in glTF format, each definition parameter corresponding to a model component entity class; extracting lightweight data corresponding to each model component entity class from the temporary array; adding the value of the lightweight data to the corresponding definition parameter and exporting it as a file in glTF format to obtain conversion data; Among them, the three-dimensional visualization display for the cloud platform includes: extracting the point and surface byte arrays about the physical components from the BIM model data and converting them into resource files in BIN format, and merging the glTF format file and the resource file into a GLB format file, and using the GLB format file for visualization display.

6. An electronic device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the lightweight conversion method for IFC format data as described in any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer-executable program, and the computer-executable program is used to enable a computer to execute the lightweight conversion method for IFC format data according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • An IFC model storage mode based on Redis and Mongodb

    CN109783442A

  • Implementation method and system for component-level operation based on WebGL instantiation technology

    CN110489692A

  • BIM model lightweight method based on scene customization

    CN114707215A