CN114969586A - BIM (building information modeling) graphic engine loading method and device based on WEB side - Google Patents

BIM (building information modeling) graphic engine loading method and device based on WEB side Download PDF

Info

Publication number
CN114969586A
CN114969586A CN202110192142.2A CN202110192142A CN114969586A CN 114969586 A CN114969586 A CN 114969586A CN 202110192142 A CN202110192142 A CN 202110192142A CN 114969586 A CN114969586 A CN 114969586A
Authority
CN
China
Prior art keywords
bim
file
model
loading
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110192142.2A
Other languages
Chinese (zh)
Inventor
皮凯
康振强
秦庆庆
徐东江
雷凌曦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Bozhilin Software Technology Co ltd
Original Assignee
Guangdong Bozhilin Robot Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Bozhilin Robot Co Ltd filed Critical Guangdong Bozhilin Robot Co Ltd
Priority to CN202110192142.2A priority Critical patent/CN114969586A/en
Publication of CN114969586A publication Critical patent/CN114969586A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Abstract

The application discloses a BIM graphic engine loading method and device based on a WEB side, wherein the method comprises the following steps: exporting an IFC file of the BIM, and analyzing according to the IFC file to obtain attribute data of the BIM; exporting a GLTF file of the BIM, and analyzing according to the GLTF file to obtain geometric data of the BIM; exporting a JSON file of the BIM model, and analyzing according to the JSON file to obtain material information of the BIM model; and associating the attribute data, the geometric data and the material information, and loading the attribute data, the geometric data and the material information so as to load the BIM at the WEB end. The method solves the technical problems that due to the lack of mapping resources and material parameters, Mesh grid material information of a component in a GLTF file loaded by an engine only has vertex colors, and the display effect is mediocre, reduces the association of multiple data formats, and improves the convenience of data analysis, generation and acquisition.

Description

BIM graphic engine loading method and device based on WEB side
Technical Field
The present application relates to the field of Building Information processing technologies, and in particular, to a Building Information Model (BIM) graphics engine loading method and apparatus based on a World Wide WEB (WEB) end.
Background
Generally, the BIM model is loaded and displayed by a BIM graphic engine based on a WEB side, and is converted into a GLTF (GL Transmission Format) Format with a higher compression rate. However, because there are many kinds of BIM design software, the formats of the BIM design software are also different greatly, so that an IFC (Industry Foundation Class) format established by Building Smart organization is generally adopted as an intermediate exchange format, and the geometric data file and the attribute data file of the BIM model are obtained by analyzing and converting the IFC format. The BIM design software Autodesk Revit has the function of exporting IFC format, the IFC format comprises geometric data and attribute data, the geometric data of the component can be stored in GLTF or other 3D file formats such as OBJ (3D model file format) and the like by analyzing the IFC data, the attribute data of the component can be stored in tree JSON data format, and the requirement of a large number of BIM service systems on BIM design models is basically met.
However, in the process of the Revit exported IFC format, each item of material in the material appearance template library in the Revit system is not written into the exported IFC file material resource layer, so that mapping resources and material parameters of each item of material appearance attributes such as basic texture, concave-convex texture, transparent mapping, normal mapping and the like in the appearance template in the material instance of the component in the BIM model are missing, and finally, Mesh grid material information of the component in the GLTF file loaded by the engine is only vertex color, and the display effect is mediocre.
Content of application
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, a first objective of the present invention is to provide a BIM graphics engine loading method based on a WEB side, so as to solve the technical problem in the related art that due to the lack of map resources and material parameters, the Mesh grid material information of a component in a GLTF file loaded by an engine is only vertex color, and the display effect is mediocre, thereby greatly reducing the association of multiple data formats, and effectively improving the convenience of data analysis, generation, and acquisition.
The second purpose of the invention is to provide a BIM graphic engine loading device based on a WEB side.
A third object of the invention is to propose an electronic device.
A fourth object of the invention is to propose a computer-readable storage medium.
To achieve the above object, embodiments of the first aspect of the present application provide a xxxxxx, including the following steps:
exporting an IFC file of a BIM (building information modeling) model, and analyzing according to the IFC file to obtain attribute data of the BIM model;
exporting a GLTF file of the BIM, and analyzing according to the GLTF file to obtain geometric data of the BIM;
exporting a JSON file of the BIM model, and analyzing according to the JSON file to obtain material information of the BIM model; and
and associating the attribute data, the geometric data and the material information, and loading the attribute data, the geometric data and the material information so as to load the BIM at a WEB end.
In addition, the BIM graphic engine loading method based on the WEB side according to the above embodiment of the present invention may further have the following additional technical features:
optionally, the obtaining, according to the IFC file, the attribute data of the BIM model by parsing includes:
and loading the IFC file, and performing IFC analysis to obtain attribute information, type information, structure tree information and material information so as to form the attribute data.
Optionally, the obtaining of the geometric data of the BIM model by parsing according to the GLTF file includes:
and loading the model by using a Revit platform, reading the configuration file to acquire information related to the GLTF file in the model, and generating the geometric data.
Optionally, before the loading a model by using the Revit platform and reading the configuration file, the method further includes:
detecting whether the Revit platform loading model needs to be exported or not;
when the Revit platform loading model is detected to be derived, identifying a current version identification mark of the Revit platform loading model;
and starting the Revit platform loading model according to the starting service corresponding to the current version so as to read the configuration file.
Optionally, the obtaining the material information of the BIM model according to the JSON file analysis includes:
acquiring a material name and a material parameter supported by the GLTF file;
and reading a material information conversion file according to the material name and the material parameter, and calculating a material parameter value according to the material parameter name and the conversion rule in the material information conversion file to obtain all the mapping names and generate the material information.
Optionally, the loading the attribute data, the geometric data, and the material information to load the BIM model on a WEB side includes:
reading a mapping resource required by a material, and enabling the mapping resource and a model file to be under the same working path;
loading a model according to model data generated by the association of the attribute data, the geometric data and the material information, and reading all attribute parameters after the model is loaded successfully so as to set all the attribute parameters at the WEB end;
and setting corresponding parallel light and environment maps in the engine, performing light operation with the material set by each component, and outputting a real-time picture.
Optionally, the method for loading a BIM graphics engine based on a WEB side further includes:
obtaining engineering attributes of each component based on the attribute data;
and displaying the engineering attributes of each component while the WEB side displays the real-time picture.
In order to achieve the above object, an embodiment of a second aspect of the present application provides a BIM graphics engine loading device based on a WEB side, including:
the first analysis module is used for exporting an IFC file of a BIM (building information modeling) model and analyzing according to the IFC file to obtain attribute data of the BIM model;
the second analysis module is used for exporting the GLTF file of the BIM and analyzing according to the GLTF file to obtain the geometric data of the BIM;
the third analysis module is used for exporting the JSON file of the BIM model and analyzing according to the JSON file to obtain the material information of the BIM model; and
and the loading module is used for associating the attribute data, the geometric data and the material information and loading the attribute data, the geometric data and the material information so as to load the BIM at a WEB end.
Optionally, the first parsing module includes:
the first loading unit is used for loading the IFC file and carrying out IFC analysis to obtain attribute information, type information, structure tree information and material information so as to form the attribute data;
the second parsing module includes:
the generating unit is used for loading the model by using the Revit platform, reading the configuration file to acquire information related to the GLTF file in the model and generating the geometric data;
optionally, before loading a model using the Revit platform and reading the configuration file, the generating unit further includes:
detecting whether the Revit platform loading model needs to be exported or not;
when the Revit platform loading model is detected to be derived, identifying a current version identification mark of the Revit platform loading model;
and starting the Revit platform loading model according to the starting service corresponding to the current version so as to read the configuration file.
Optionally, the third parsing module includes:
the obtaining unit is used for obtaining the material name and the material parameter supported by the GLTF file;
and the calculating unit is used for reading a material information conversion file according to the material name and the material parameter, and calculating a material parameter value according to the material parameter name and the conversion rule in the material information conversion file so as to obtain all the mapping names and generate the material information.
Optionally, the loading module includes:
the reading unit is used for reading the mapping resources required by the material and enabling the mapping resources and the model file to be under the same working path;
the setting unit is used for loading a model according to model data generated by the association of the attribute data, the geometric data and the material information, reading all attribute parameters after the model data is loaded successfully, and setting all the attribute parameters at the WEB terminal;
and the output unit is used for setting corresponding parallel light and environment maps in the engine, performing light operation with the material set by each component and outputting a real-time picture.
Optionally, the BIM graphics engine loading apparatus based on the WEB side further includes:
obtaining engineering attributes of each component based on the attribute data;
and displaying the engineering attributes of each component while the WEB side displays the real-time picture.
To achieve the above object, an embodiment of a third aspect of the present application provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being configured to perform a WEB-based BIM graphics engine loading method as described in the above embodiments.
In order to achieve the above object, a fourth aspect of the present application provides a computer-readable storage medium storing computer instructions for causing a computer to execute the method for loading a BIM graphics engine based on a WEB side according to the foregoing embodiment.
Therefore, the IFC file of the BIM model can be exported, the attribute data of the BIM model can be obtained through analysis according to the IFC file, the GLTF file of the BIM model can be exported, the geometric data of the BIM model can be obtained through analysis according to the GLTF file, the JSON file of the BIM model can be exported, the material information of the BIM model can be obtained through analysis according to the JSON file, the attribute data, the geometric data and the material information are correlated, the attribute data, the geometric data and the material information are loaded, the BIM model is loaded at a WEB end, the technical problem that Mesh grid material information of a component in the GLTF file loaded by an engine is only in a vertex color due to the lack of map resources and material parameters in the related technology is solved, the correlation of the multi-data format is greatly reduced, and the convenience in data analysis, generation and acquisition is effectively improved.
Additional aspects and advantages of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the present application.
Drawings
The foregoing and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a flowchart of a BIM graphics engine loading method based on a WEB side according to an embodiment of the present application;
fig. 2 is a flow diagram of Revit-derived IFCs according to one embodiment of the present application.
FIG. 3 is a flow diagram of an IFC parsing according to an embodiment of the present application;
FIG. 4 is a flow diagram of Revit derived glTF according to one embodiment of the present application;
FIG. 5 is a diagram illustrating a relationship between Revit texture parameters and standard mesh texture parameters according to an embodiment of the present application;
FIG. 6 is a flowchart of texture information extraction, according to an embodiment of the present application;
FIG. 7 is a flow diagram of BIM graphics engine loading, according to one embodiment of the present application;
FIG. 8 is a block diagram of a BIM engine loader on the WEB side according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
The BIM graphics engine loading method and apparatus based on the WEB side according to the embodiment of the present invention are described below with reference to the accompanying drawings, and first, the BIM graphics engine loading method based on the WEB side according to the embodiment of the present invention will be described with reference to the accompanying drawings.
Specifically, fig. 1 is a schematic flowchart of a method for loading a BIM graphics engine based on a WEB side according to an embodiment of the present application.
As shown in fig. 1, the BIM graphics engine loading method based on the WEB side includes the following steps:
in step S101, an IFC file of the BIM model is exported, and attribute data of the BIM model is obtained through parsing according to the IFC file.
Optionally, in some embodiments, obtaining attribute data of the BIM model according to the IFC file analysis includes: and loading the IFC file, and carrying out IFC analysis to obtain attribute information, type information, structure tree information and material information so as to form attribute data.
It can be understood that the embodiment of the application can open the BIM model through the Revit software and export the IFC file. The IFC has a friendly data exchange protocol with a mainstream BIM platform Revit as an open data format for describing AEC (Architecture, Engineering, Construction industry), realizes self-defined interactivity of cloud data through an Autodesk.Revit.DB.IFC.IExportIFC interface and an Autodesk.Revit.DB.IFC.IIFCImporterServer interface, and supports the self-defined IFC export of component types.
Specifically, as shown in fig. 2, in the embodiment of the present application, a model (rvt) may be loaded through a Revit platform, specifically, a Revit model (rvt) that needs to derive IFCs under a specific folder is monitored through a File monitoring service (File Listener Server), when it is monitored that a File in the folder needs to be converted, a model (rvt) Version service (Revit Version Server) is started to identify that the model corresponds to a Revit Version, and a matching Version is started to open and load the model File (rvt) by the Revit Start service (Revit Start Server);
secondly, deriving the IFC through a Revit platform model, specifically, registering and deriving an IFC deriving external command (CmdExportIFC) in the Revit starting process, and executing the recorded IFC deriving command through an internal execution external command interface (ExternalCommand helper) of the Revit after the model is loaded. After the IFC export command is started, an IFC export configuration file (containing information such as an export view, a component type, a fineness degree and an IFC version) is automatically read, an IFC export view is created, parameters are set, an export process is executed, and model information such as a shaft network, elevation, walls, beams, plates, columns, rooms and spaces in the model is exported.
And finally, generating IFC formatted file data, specifically, executing export model (rvt) information based on an IExporter IFC interface provided by Revit, covering information such as component types, geometric, attributes and logical relations corresponding to the IFC in the Revit, and ensuring the consistency of data conversion by owning entity types, attribute sets and logical relations corresponding to the IFC in the ReivtAPI export interface implementation.
Further, the embodiment of the application may parse the attribute data of the model through the exported IFC file.
Specifically, the IFC file is written using the object-oriented Express language. The EXPRESS information modeling language (ISO10303-11) is the core of the Product model data Exchange Standard (STandards for the Exchange of Product model data, STEP) ISO 10303. The EXPRESS language provides a neutral mechanism that can interface with various programming environments (e.g., C + +, FORTRAN, etc.), and data in different programming environments can interact through an EXPRESS language data file generated by the interaction.
The JSDAI database is a solution provided by LKSOFT for storing industrial product information as objects in a relational database and making it available through a standard-compliant Application Programming Interface (API), supporting each product object specified by the EXPRESS information model (ISO 10303-11). This includes international standards known as STEP (ISO 10303), parts libraries (ISO 13584PLIB), standard data element types (IEC61360), etc. In addition, a user-specific EXPRESS mode is also supported.
As shown in fig. 3, IFC parsing based on JSDAI may generally include the following steps:
s301, loading the IFC file by the jsDai, and further obtaining the SdaRepostry.
S302, extracting the IFCObject by using the SdaiRepostry.
S303, judging whether the type of the IFCObject is IFCelement, if so, executing step S307, otherwise, executing step S304.
S304, judging whether the type of the IFCObject is IfcSpatialStructure element, if so, executing the step S307, otherwise, executing the step S305.
S305, judging whether the type of the IFCObject is Ifcgarid, if so, executing step S307, otherwise, executing step S306.
S306, judging whether the type of the IFCObject is IfcSystems, if so, executing the step S307, otherwise, executing the step S307.
S307, extract the corresponding attribute ifcpropertySet.
In summary, the IFC may be loaded through initialization of the JSDAI parsing library, specifically, according to loading a configuration file of the open source software JSDAI, the SdaiSesson is obtained, then the sdaisesection loads the IFC model file, after the loading is successful, a sdaisepositry is obtained, and data extraction is performed by using an interface provided by the sdaisepositry.
Then, performing IFC analysis, specifically, performing entity class, space, axis network, area, and port analysis by the sdaipristory, and the IFC class to be analyzed is: IfcElement, IfcSpatialStructure element, Ifcgid, IfcSystem, IfcZone, IfcPort.
Wherein, the attribute extraction: the method mainly extracts attribute information contained in IfcPropertySet and IfcRelDefinesByProperties classes in the IFC, wherein the attribute information also contains custom attributes in the established model.
Type extraction: the attributes in ifcttypeobject are mainly extracted, and part of the attributes in the entity are described in the type.
Extracting a structural tree: the embodiment of the application extracts 6 types of structure trees, namely a project structure tree, a component structure tree, a type structure tree, a layer structure tree, a system structure tree and a space structure tree. For example, the structure of the project structure tree is IfcProject, IfcSite, IfcBuilding, IfcBuildStorey, IfcElemet.
Extracting material information: in the embodiment of the application, the ifcMaterialList attribute found by IFC RelAssociation materials in the IFC is extracted to represent the material of the member, but the information only contains the ID, name and thickness information of the material and does not contain the material information required by visualization.
Therefore, the extracted data is stored in mongoDB according to a certain structure, due to the fact that the number of model components is large, the attribute searching is very slow, the component attributes are stored in the engine Object Query table and stored in a map structure, the retrieval speed is convenient to improve, meanwhile, the judgment of model consistency is enhanced, the judgment rule is that file streams are encrypted, if files are consistent, whether the version numbers of the items are consistent or not is judged, if so, the data are not re-analyzed, and the data are analyzed before being reused.
In step S102, a GLTF file of the BIM model is derived, and geometric data of the BIM model is obtained through analysis according to the GLTF file.
Optionally, in some embodiments, parsing the geometric data of the BIM model according to the GLTF file includes: and loading the model by using a Revit platform, reading the configuration file to acquire information related to the GLTF file in the model, and generating geometric data.
It can be understood that the GLTF file of model geometry data can be derived through the Revit API in the embodiments of the present application, where the GLTF is a delivered content data format independent of the runtime API, which can provide an efficient, extensible, and interoperable way for transmitting and loading 3D content, and can effectively connect a 3D content creation tool with a 3D application.
In the application, the glTF exists as a supplementary data file of the IFC data, and is mainly used for expanding information such as material, texture, mapping, appearance and the like of the IFC, providing more complete model (rvt) analysis data, and providing more vivid display effect for the service and the graphic engine. In view of the efficiency of deriving model (rvt) information, the scheme implements parallel derivation of glTF and IFC without copy models based on the same source file, with information correlation being performed by generating consistent IFCGuid from the same ElmentId in the process of deriving the model.
Optionally, before loading the model using the Revit platform and reading the configuration file, the method further includes: detecting whether a Revit platform loading model needs to be exported or not; when detecting that a Revit platform loading model needs to be exported, identifying a current version identification mark of the Revit platform loading model; and starting a Revit platform loading model according to the starting service corresponding to the current version to read the configuration file.
Specifically, as shown in fig. 4, in the embodiment of the present application, a model (rvt) may be loaded through a Revit platform, specifically, a Revit model (rvt) that needs to derive a glTF under a specific folder is monitored through a file monitoring service (FileListenerServer), when it is monitored that a file in the folder needs to be converted, a model (rvt) version service (RevitVersionServer) is started to identify a model corresponding to the Revit version, and a Revit start service (revitsterver) may use a Product provided by a RevitNET program set to redirect a background to start a corresponding version to open the model file (rvt).
Secondly, exporting the glTF through the Revit platform, specifically, after the Revit background starts the loading model (rvt), reading the configuration file, creating a glTF export view and setting view parameters. The information about the glTF in the model (rvt) is obtained through the glTFExportContext implementing the IExportContext interface using the custorexport command.
The glTFExportContext self-defined export class realized based on RevitAPI relates to extracting information such as Mesh, UV and Normal about Polymesh in Revit, information such as ThumbNailFile, Glossine, Smoothness, Color, Transparency and application about Material, and RPC (Remote Procedure Call) model information about plants, people and automobiles aims to provide a data base with more vivid rendering effect.
Finally, generating glTF formatted file data, specifically, the embodiment of the present application may acquire information of Scenes, Nodes, Buffers, BufferViews, Access, Textures, Materials, Samplers, Images, and the like related to Element and glTF in a model (rvt) based on a glTFExportContext execution process, generate BasToe 64String characters of Index, Vertex, UV, Normal, and the like related to a single object Mesh through a glTF logical structure management class glTFcore to create Buffers, organize BufferViews and Insessors related to Element, add Textures, Materials, Samplers, and Images Nodes, and create a glTF data file through a glTFLoader. The information in the glTF file is associated with the information in the IFC through the IFCGuid generated by the ElemntId in Revit, so that the glTF can supplement the IFC information in an increment mode.
In step S103, a JSON file of the BIM model is exported, and the material information of the BIM model is obtained through analysis according to the JSON file.
Optionally, in some embodiments, the obtaining of the material information of the BIM model according to the JSON file parsing includes: acquiring a material name and a material parameter supported by a GLTF file; and reading the material information conversion file according to the material name and the material parameter, and calculating the material parameter value according to the material parameter name and the conversion rule in the material information conversion file to obtain all the mapping names and generate the material information.
It can be understood that the embodiments of the present application can export the model material information JSON file through the Revit API. Specifically, the Revit platform provides a general material set used for modeling, covers concrete, wood, glass, paint, metal and the like, presets partial built-in material resource templates, can create colorful material graphs and appearances based on the templates, reflects the material characteristics such as colors, images, reflectivity, transparency, concave-convex and the like, and can support custom expansion parameters.
Revit provides a lot of relevant settable information about graphics, appearance, physics, and heat, but not all are needed in the actual rendering by the BIM graphics engine. In view of this, the solution adopts a physical Rendering standard (PBR) Based standard grid material (mesh standard material), extracts material parameters that are not supported temporarily by the glTF model from the Revit material parameter library, and designs a material information conversion file according to the corresponding relationship between the material parameters and the PBR material (as shown in fig. 5), which mainly covers Revit material parameter names and parameter values, and material parameter names and parameter values in the BIM graphic engine. Based on the information file, the material parameters in Revit can be converted into the material parameters corresponding to the BIM graphic engine, and the material parameters are used for rendering and restoring the real scene.
Specifically, as shown in fig. 6, the method for Revit to extract the texture information includes the following steps:
s601, start.
S602, designing a material information conversion file.
S603, the material information in the rvt file is analyzed.
S604, obtaining the mapping texture path information.
S605, removing the space character of the mapping file name.
And S606, converting the material parameters.
S607, the material information is derived.
S608, deriving the texture map.
And S609, ending.
Therefore, the method and the device can analyze the model material information, particularly, Revit is used as a mainstream BIM platform, a secondary deep development functional interface of a user is provided, and development languages such as C + +, C # and VB. The material information mainly covers most contents of appearance resources and resource attributes, AppearanceAssetElement, Asset, AssetProperty and the like are stored in the Revit API in a related mode, each resource attribute possibly comprises a related attribute set, and a tool for extracting related information is developed through RevitAPI in depth to obtain all related material information.
Firstly, the material name and material parameters supported by the glTF file are obtained, such as the information of concrete material covering color, texture mapping, metal material covering transparency, metal degree and the like. And reading the material information conversion file, and calculating corresponding material parameter values according to the material parameter names and the conversion rules. And finally, recording all the acquired map names.
And then exporting the model and the material information file, specifically, exporting the model and the material information file by means of Newtonsoft based on the material information acquired in the last step to form a material information JSON file, wherein the material information JSON file comprises the material name used by the model, the parameter value corresponding to each material after conversion, all the mapping names and other information used in the export model, and the texture mapping used in the glTF model is supported to be automatically copied from the Reivt material library directory to the input directory, so that the export of the model material information by the Revit API is completed.
In step S104, the attribute data, the geometric data and the material information are associated, and the attribute data, the geometric data and the material information are loaded, so as to load the BIM model on the WEB side.
Optionally, in some embodiments, loading attribute data, geometric data, and material information to load the BIM model on the WEB side includes: reading a mapping resource required by the material, and enabling the mapping resource and the model file to be in the same working path; loading a model according to model data generated by correlation of the attribute data, the geometric data and the material information, and reading all attribute parameters after successful loading so as to set all attribute parameters at a WEB terminal; and setting corresponding parallel light and environment maps in the engine, performing light operation with the material set by each component, and outputting a real-time picture.
It can be understood that the embodiment of the present application can perform model project level information association through FileId from information such as IFC files, glTF files, material JSON files, and database contents derived from the model (rvt), so as to provide a basis for loading items by the BIM graphics engine.
On the basis of the same model information, firstly, the Name attribute values of nodes, materials and the like in the glTF are used as the basis of information retrieval association; furthermore, acquiring contents such as material information parameter information, a texture mapping relative path, RPC file information and the like related to the model component in the material JSON file through retrieving the correlation value; and finally, acquiring information such as project parameters, type parameters, instance parameters, custom parameters and the like associated with the model component by means of retrieval of the associated value and Web service, and providing a perfect data basis for rendering and application of the whole model.
Further, the method for loading the BIM graphics engine based on the WEB side further includes: obtaining engineering attributes of each component based on the attribute data; and displaying the engineering attributes of each component while displaying the real-time picture at the WEB end.
Specifically, in the embodiment of the present application, model geometry, material and attribute data may be loaded through a graphic engine or a three-dimensional visualization tool, where as shown in fig. 7, a BIM graphic engine loading process includes the following steps:
and S701, reading the derived material JSON.
S702, introducing a gltfloader component into threejs engineering.
S703, fill in the gltf path loading model.
And S704, traversing the sub nodes of the model Mesh after the loading is successful, wherein each sub node is loaded through the json, appointing various maps and setting related material attributes.
S705, setting a parallel light and environment map.
S706, the IFC analysis database is accessed to obtain engineering data.
And S707, rendering is carried out, and visualization of the model and the attribute data is completed.
That is, the JSON file can be parsed from the associated material JSON, and information related to the map resources required by the material contained in the model can be read, so that the map resources and the model file are ensured to be under the same working path; loading the model by utilizing the glTF loader component of the threejs framework through the associated model data; after the loading of the gltf object is successful, reading the name of the child material through traversing all Mesh sub-nodes in the gltf object, obtaining corresponding attribute parameters in a JSON file of the material through the name, reading the concave-convex texture, the roughness, the metal degree, the transparent chartlet, the transparency and parameter values of the concave-convex texture, the roughness, the metal degree, the transparent chartlet and the transparency except the chartlet texture, and then setting all the parameters in the child material; setting a parallel light and environment map in an engine, performing light operation with the materials set by each component, and finally outputting a picture with strong reality in real time; meanwhile, corresponding engineering attributes of the component can be obtained by accessing the database analyzed by the IFC in the step five, and the data attributes and the geometric model can be displayed in the WEB terminal at the same time.
According to the BIM graphic engine loading method based on the WEB side, which is provided by the embodiment of the application, the IFC file of the BIM model can be exported, and analyzing according to IFC file to obtain attribute data of BIM model, and exporting GLTF file of BIM model, and the geometric data of the BIM model is obtained by analyzing according to the GLTF file, and the JSON file of the BIM model is exported, analyzing the material information of the BIM according to the JSON file, associating the attribute data, the geometric data and the material information, loading the attribute data, the geometric data and the material information, with loading BIM model at the WEB end, solved among the correlation technique because of map resource and material parameter disappearance, lead to the Mesh net material information of the component in the GLTF file of engine loading only the summit colour, technical problem that the bandwagon effect is mediocre, greatly reduced multidata form is relevant, effectively promote data analysis, generation and acquire the convenience.
Next, a BIM graphics engine loading apparatus based on a WEB side according to an embodiment of the present application will be described with reference to the accompanying drawings.
Fig. 8 is a block diagram illustrating a BIM graphics engine loading apparatus based on a WEB side according to an embodiment of the present application.
As shown in fig. 8, the BIM graphics engine loading apparatus 10 based on WEB side includes: a first parsing module 100, a second parsing module 200, a third parsing module 300 and a loading module 400.
The first analysis module 100 is configured to derive an IFC file of the BIM model, and analyze the IFC file to obtain attribute data of the BIM model;
the second analysis module 200 is configured to derive a GLTF file of the BIM model, and analyze the GLTF file to obtain geometric data of the BIM model;
the third parsing module 300 is configured to export a JSON file of the BIM model, and parse the JSON file to obtain material information of the BIM model; and
the loading module 400 is configured to associate the attribute data, the geometric data, and the material information, and load the attribute data, the geometric data, and the material information, so as to load the BIM model on the WEB side.
Optionally, in some embodiments, the first parsing module 100 includes: a first load unit.
The first loading unit is used for loading the IFC file and performing IFC analysis to obtain attribute information, type information, structure tree information and material information so as to form attribute data;
the second parsing module 200 includes: and a generating unit.
The generating unit is used for loading a model by using a Revit platform, reading a configuration file to acquire information related to a GLTF file in the model and generating geometric data;
optionally, in some embodiments, before loading a model using the Revit platform and reading the configuration file, the generating unit further includes:
detecting whether the Revit platform loading model needs to be exported or not;
when the Revit platform loading model is detected to be derived, identifying a current version identification mark of the Revit platform loading model;
and starting the Revit platform loading model according to the starting service corresponding to the current version so as to read the configuration file.
Optionally, in some embodiments, the third parsing module 300 includes: an acquisition unit and a calculation unit.
The device comprises an acquisition unit, a display unit and a processing unit, wherein the acquisition unit is used for acquiring a material name and a material parameter supported by a GLTF file;
and the calculation unit is used for reading the material information conversion file according to the material name and the material parameter, and calculating the material parameter value according to the material parameter name and the conversion rule in the material information conversion file so as to obtain all the mapping names and generate the material information.
Optionally, in some embodiments, the loading module 400 comprises: the device comprises a reading unit, a setting unit and an output unit.
The reading unit is used for reading the mapping resources required by the material and enabling the mapping resources and the model file to be under the same working path;
the setting unit is used for loading the model according to model data generated by the association of the attribute data, the geometric data and the material information, reading all attribute parameters after the model data is loaded successfully, and setting all the attribute parameters at a WEB end;
and the output unit is used for setting corresponding parallel light and environment maps in the engine, performing light operation with the material set by each component and outputting a real-time picture.
Optionally, the BIM graphics engine loading apparatus based on the WEB side further includes:
obtaining engineering attributes of each component based on the attribute data;
and displaying the engineering attributes of each component while displaying the real-time picture at the WEB end.
It should be noted that the foregoing explanation on the embodiment of the BIM graphics engine loading method based on the WEB side is also applicable to the BIM graphics engine loading apparatus based on the WEB side of the embodiment, and is not repeated here.
According to the BIM graphic engine loading device based on the WEB side, which is provided by the embodiment of the application, the IFC file of the BIM model can be exported, analyzing according to IFC file to obtain attribute data of BIM model, exporting GLTF file of BIM model, and the geometric data of the BIM model is obtained by analyzing according to the GLTF file, and the JSON file of the BIM model is exported, analyzing according to JSON file to obtain material information of BIM model, associating attribute data, geometric data and material information, loading attribute data, geometric data and material information, the BIM model is loaded at the WEB end, the technical problems that in the related technology, due to the fact that map resources and material parameters are lost, Mesh grid material information of a component in a GLTF file loaded by an engine is only in vertex color, and the display effect is mediocre are solved, the association of multiple data formats is greatly reduced, and convenience in data analysis, generation and acquisition is effectively improved.
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device may include:
a memory 901, a processor 902 and a computer program stored on the memory 901 and executable on the processor 902.
The processor 902, when executing the program, implements the WEB-based BIM graphics engine loading method provided in the above embodiments.
Further, the electronic device further includes:
a communication interface 903 for communication between the memory 901 and the processor 902.
A memory 901 for storing computer programs executable on the processor 902.
Memory 901 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
If the memory 901, the processor 902, and the communication interface 903 are implemented independently, the communication interface 903, the memory 901, and the processor 902 may be connected to each other through a bus and perform communication with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 9, but this does not indicate only one bus or one type of bus.
Optionally, in a specific implementation, if the memory 901, the processor 902, and the communication interface 903 are integrated on a chip, the memory 901, the processor 902, and the communication interface 903 may complete mutual communication through an internal interface.
The processor 902 may be a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement embodiments of the present Application.
The embodiment also provides a computer readable storage medium, on which a computer program is stored, wherein the program is used for implementing the above BIM graphics engine loading method based on the WEB side when being executed by a processor.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or N embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "N" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more N executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of implementing the embodiments of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or N wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Further, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. While embodiments of the present application have been shown and described above, it will be understood that the above embodiments are exemplary and should not be construed as limiting the present application and that changes, modifications, substitutions and alterations in the above embodiments may be made by those of ordinary skill in the art within the scope of the present application.

Claims (10)

1. A BIM graphic engine loading method based on a WEB side is characterized by comprising the following steps:
exporting an IFC file of a BIM (building information modeling) model, and analyzing according to the IFC file to obtain attribute data of the BIM model;
exporting a GLTF file of the BIM, and analyzing according to the GLTF file to obtain geometric data of the BIM;
exporting a JSON file of the BIM model, and analyzing according to the JSON file to obtain material information of the BIM model; and
and associating the attribute data, the geometric data and the material information, and loading the attribute data, the geometric data and the material information so as to load the BIM at a WEB end.
2. The method according to claim 1, wherein the obtaining the attribute data of the BIM model by parsing according to the IFC file includes:
and loading the IFC file, and carrying out IFC analysis to obtain attribute information, type information, structure tree information and material information so as to form the attribute data.
3. The method according to claim 1, wherein the parsing the geometric data of the BIM model from the GLTF file comprises:
and loading the model by using a Revit platform, reading the configuration file to acquire information related to the GLTF file in the model, and generating the geometric data.
4. The method of claim 3, prior to reading the configuration file using the Revit platform loading model, further comprising:
detecting whether the Revit platform loading model needs to be exported or not;
when the Revit platform loading model is detected to be derived, identifying a current version identification mark of the Revit platform loading model;
and starting the Revit platform loading model according to the starting service corresponding to the current version so as to read the configuration file.
5. The method according to claim 1, wherein the parsing to obtain the material information of the BIM model according to the JSON file comprises:
acquiring a material name and a material parameter supported by the GLTF file;
and reading a material information conversion file according to the material name and the material parameter, and calculating a material parameter value according to the material parameter name and a conversion rule in the material information conversion file to obtain all the mapping names and generate the material information.
6. The method according to claim 1, wherein the loading the attribute data, the geometric data and the material information to load the BIM on a WEB side comprises:
reading a mapping resource required by a material, and enabling the mapping resource and a model file to be under the same working path;
loading a model according to model data generated by the association of the attribute data, the geometric data and the material information, and reading all attribute parameters after the model data is loaded successfully so as to set all the attribute parameters at the WEB end;
and setting corresponding parallel light and environment maps in the engine, performing light operation with the material set by each component, and outputting a real-time picture.
7. The method of claim 1, further comprising:
obtaining engineering attributes of each component based on the attribute data;
and displaying the engineering attributes of each component while the WEB side displays the real-time picture.
8. A BIM graphic engine loading device based on a WEB side is characterized by comprising:
the first analysis module is used for exporting an IFC file of a BIM (building information modeling) model and analyzing according to the IFC file to obtain attribute data of the BIM model;
the second analysis module is used for exporting the GLTF file of the BIM and analyzing according to the GLTF file to obtain the geometric data of the BIM;
the third analysis module is used for exporting the JSON file of the BIM model and analyzing according to the JSON file to obtain the material information of the BIM model; and
and the loading module is used for associating the attribute data, the geometric data and the material information and loading the attribute data, the geometric data and the material information so as to load the BIM at a WEB end.
9. An electronic device, comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the BIM graphics engine loading method based on WEB side according to any one of claims 1 to 5.
10. A computer-readable storage medium having a computer program stored thereon, wherein the program is executed by a processor to implement the BIM graphics engine loading method based on the WEB-side according to any one of claims 1 to 5.
CN202110192142.2A 2021-02-19 2021-02-19 BIM (building information modeling) graphic engine loading method and device based on WEB side Pending CN114969586A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110192142.2A CN114969586A (en) 2021-02-19 2021-02-19 BIM (building information modeling) graphic engine loading method and device based on WEB side

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110192142.2A CN114969586A (en) 2021-02-19 2021-02-19 BIM (building information modeling) graphic engine loading method and device based on WEB side

Publications (1)

Publication Number Publication Date
CN114969586A true CN114969586A (en) 2022-08-30

Family

ID=82954068

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110192142.2A Pending CN114969586A (en) 2021-02-19 2021-02-19 BIM (building information modeling) graphic engine loading method and device based on WEB side

Country Status (1)

Country Link
CN (1) CN114969586A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116226037A (en) * 2023-05-08 2023-06-06 山东同圆数字科技有限公司 IFC format data detail dynamic extraction method and system based on Web

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116226037A (en) * 2023-05-08 2023-06-06 山东同圆数字科技有限公司 IFC format data detail dynamic extraction method and system based on Web

Similar Documents

Publication Publication Date Title
CN110688692B (en) Two-three-dimensional linkage and superposition display method based on structured BIM model
CN110245368B (en) Structured processing and storage method of BIM data
CN107506517B (en) Building model display method, building model display device, building model data processing method, building model data processing device, building model data processing medium, building model data processing equipment and building model data processing system
CN111161390A (en) Rendering method and device based on BIM (building information modeling) model and WebGL (Web graphics library)
CN105550247A (en) SVG standard customizable graphic symbol based power system graphic display method
CN108597032A (en) Building Information Model is imported into display methods and system in Unity3D
US20190371047A1 (en) Method for Generating Three-Dimensional Model, and Terminal Device
WO2023109303A1 (en) Online collaborative editing method and apparatus, electronic device and storage medium
CN112989482A (en) BIM model data generation method and device and building method and device
CN106709985A (en) Generation method and device for virtual three-dimensional sacrifice scene
CN107885840A (en) Urban information model service method and system
CN110188153B (en) WebGIS publishing method based on IFC extended data
CN109858059B (en) Application method of virtual reality technology based on CAD (computer-aided design) super-large model in hydropower station simulation
CN114969586A (en) BIM (building information modeling) graphic engine loading method and device based on WEB side
WO2008026003A2 (en) 3 d pdf document generator and method for generating 3d pdf documents
CN113468626B (en) Drawing generation method and device, electronic equipment and storage medium
CN115359208A (en) BIM data lightweight storage method suitable for operation and maintenance management
KR20010044367A (en) Method for conversion from DXF file to GEOMania Data File
CN102270219B (en) Construction method for Mars detector component-level virtual model machine library
CN115375812A (en) CAD data rendering method and device, electronic equipment and storage medium
CN113610512A (en) Electronic signature generation method, device, equipment and storage medium
CN114092677A (en) 3D model conversion optimization method, device and equipment
CN112489177A (en) Point cloud data rendering and displaying method and system
US10817486B2 (en) Containment of data structures with data objects in data modeling tools
CN113591197B (en) Online editing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230630

Address after: A4-04, Floor 4, Building A1, No. 1, Panpu Road, Country Garden Community, Beijiao Town, Shunde District, Foshan, Guangdong 528311

Applicant after: Guangdong Bozhilin Software Technology Co.,Ltd.

Address before: 528311 a2-05, 2nd floor, building A1, 1 Panpu Road, Biguiyuan community, Beijiao Town, Shunde District, Foshan City, Guangdong Province

Applicant before: GUANGDONG BOZHILIN ROBOT Co.,Ltd.