## 5 System Implementation  
### IFC Information Extraction and Storage  
IFC information extraction is the basis of BIM system development and model visualization interaction. A reasonable data storage structure can improve system efficiency. Taking the exported IFC file from Tekla software as an example, the _IfcRelAggregates_ class defines the inclusion relationship of buildings, floors, components, and other instances. The _IfcRelDefinesByProperties_ class defines the inclusion relationship between components and their property set. The _IfcElementAssembly_ class defines beams, columns, gussels, and other internal parts. In this paper, the trees of component relationships and attributes were established by using the _IfcOpenShell_[69] plugin first. Then, the tree was decoupled by the depth-first search algorithm. Finally, the reference relationship between the component type and attribute set was recorded.  
With respect to data storage, the GUIDs of instances were saved in a MongoDB database as the primary key. Based on the component information saved in the MongoDB database, the integrate node.js and three.js visualization framework was applied to build server and to develop the interface of data interaction. The instance information saved in the database is shown in Figure 8. In this figure, as a child of the _IfcBuildingStorey_ node, _IfcElementAssembly_ represents the basic unit of a component, and it contains _IfcBeams_, _IfcColumns_, and other elements. The child attribute refers to the inclusion relationship between _IfcBuildingStorey_ and _IfcElementAssembly_. In addition, the relationship between the instance and the property set was expressed by _PropertyId_, and the content of the property set was consistent with the predefined data structure. The designed data structure can deal with the semantic information and relationships in IFC files, which can be directly referenced by specific BIM system modules.  
Figure 8: Example of instances and properties stored in the database.  
Since the geometry data of instances is usually large, if it is simply stored in the database, the input and output of a vast amount of data will have a significant impact on the performance of the database. To solve this problem, the geometry information of the model was stored in files, which the browser can call. In addition, the GL transmission format [70] is a file format specially designed for 3D model network transmission. The binary code saved in the gITF file can be directly transferred to the graphics card, which provides high display efficiency. [PERSON] et al. [16] used _IfcOpenShell_ and the _obj2 glff_ plugin to convert geometric information into obj and gITF formats. However, the geometric calculation functions provided by _IfcOpenShell_ take plenty of time and space to extract. Moreover, format conversion requires multiple disk inputs and outputs, which may not meet the needs of the quasi-real-time display of the BIM model. Therefore, in order to speed up the extraction of geometric data and reduce hardware overhead, this study employed the IfcEngine [71] plugin to extract the geometric information and utilized the gITF-SDK plugin to output the geometry files.