Visualization of 3D Architectural Models on Apple Ios Platform
Total Page:16
File Type:pdf, Size:1020Kb
Masaryk University Faculty}w¡¢£¤¥¦§¨ of Informatics !"#$%&'()+,-./012345<yA| Visualization of 3D Architectural Models on Apple iOS Platform Bachelor Thesis Martin Škrovina Brno, Autumn 2015 Declaration Hereby I declare, that this paper is my original authorial work, which I have worked out by my own. All sources, references and literature used or excerpted during elaboration of this work are properly cited and listed in complete reference to the due source. Martin Škrovina Advisor: RNDr. Jaroslav Škrabálek ii Acknowledgement I would like to thank my supervisor, RNDr. Jaroslav Škrabálek, for providing me a thesis topic of my interest and his personal attitude to our cooperation. iii Abstract The objective of this thesis is to implement an application for vi- sualization of architecture models. The application implemented targets Apple iOS platform. The thesis deals with possibilities of real time visualization of building information models. The application supports loading and navigating in architectural models in IFC for- mat, which is used in Building Information Modeling — BIM. The thesis studies the data formats of the models and examines existing visualizing applications. The creation of the application, as well as the modifications of the utilized frameworks and components, are further discussed. Finally, the final application is tested for performance. iv Keywords iOS, Objective C++, OpenSceneGraph, OpenGL ES, IfcPlusPlus, IFC, Building Information Modeling, BIM v Contents 1 Introduction ............................1 2 File Format of the Models ....................3 2.1 Generating Applications ...................3 2.2 IFC ..............................3 2.2.1 Information Modeled By IFC...........4 2.2.2 File Structure of IFC-SPF..............5 3 Existing Available Applications and Components ......7 3.1 Architecture Visualizers on iOS ...............7 3.1.1 BIMx.........................7 3.1.2 Tekla Field3D....................8 3.2 IFC Libraries .........................9 3.2.1 IfcOpenShell.....................9 3.2.2 Assimp........................9 3.2.3 IfcPlusPlus...................... 10 4 Implementation of the iOS Viewer .............. 14 4.1 Development environment .................. 14 4.2 Reuse of IfcPlusPlus ..................... 15 4.3 Architecture of the IfcPlusPlusViewer ........... 17 4.3.1 Submodule cmd ................... 17 4.3.2 Submodule viewer ................. 18 4.3.3 Submodule gui ................... 18 4.3.4 Files Unassigned to a Submodule......... 19 4.4 Architecture of the IFCViewer ................ 19 4.5 Changes to the IfcPlusPlusViewer Contained in IFCViewer 22 4.5.1 Removal of the Qt Dependency.......... 22 4.5.2 UI Event Handling................. 23 4.5.3 Open Scene Graph Issues............. 23 4.6 Optimizations of the Imported Scene Graph ......... 24 5 Performance Test ......................... 25 5.1 Test Methods ......................... 25 5.2 Test Data ........................... 25 5.3 Test Results .......................... 26 6 Conclusion ............................. 28 A Test Models ............................ 35 B MultiTouchOrbit3DManipulator Source Code Example .. 37 vi 1 Introduction In the past, architectural design was initially done on paper. The need for a formal definition of the design was fulfilled by providing techni- cal drawings along with the design in the paper form. Physical models of the building were built to help visualize the model and compare it to the intended result as the design and realization progressed. The aforementioned techniques are still used today. However, in the recent years, the building industry, just as many others, has begun to change under the influence of the emerging computer industry. The use of computers in design is often referred to as CAD1 or in the context of architecture as CAAD2.[1] Moreover, tools for definition of the technical formal specification, as well as the visual design, have been developed. Building information modeling, or BIM, is a process of building model creation, which covers physical and functional information of a building. [2] BIM tools are designed to also allow inter-operation between separate parts taking part in the building process. A few of these in- clude architecture, construction, mechanical, electrical and plumbing services, property management, infrastructure and many others. [2] All of these areas incrementally constitute to the BIM model of the project. It is often a requirement to deliver a BIM model along with other forms of documentation to a client such as the government. But in practice, BIM models are frequently created even for projects of much smaller scale, such as apartment houses or even family houses. The aim of this thesis is to implement a mobile application for vi- sualization of architecture models. Specifically, the application should be capable of navigating 3D models of buildings. The application could then be used by architects, builders or anyone involved in the building industry working with BIM models, to get familiar with the appearance of the building model using their mobile devices. The theoretical part of this thesis first deals with the analysis of BIM file formats. Furthermore, the available applications for iOS platform visualizing BIM models are considered. The ideas of these applications 1. Computer aided design 2. Computer aided architectural design 1 1. Introduction are taken for inspiration in the chapter 3.2, which evaluates the usability of the components for a potential reuse in the development of the intended application. The practical part discusses the implementation of the IFCViewer application for both iPad and iPhone devices and points out the greatest challenges of the application development. It discusses the incorporation of the reused 3rd party components and presents solutions to problems that arose. In the end, the performance of the final application is tested. The results and findings of this thesis, as well as suggestions for possible extensions of the application, are summed up in the conclusion. 2 2 File Format of the Models This chapter deals with the choice of the file format supported by the application built in the implementation part of the thesis. A research of applications generating the BIM models was done to ensure that the selected file format is universal. Further, this chapter discusses the selected file format. 2.1 Generating Applications The architectural BIM models are usually generated by BIM modeling applications. Most popular desktop applications for architecture cre- ation and editing include Autodesk Revit [3], Graphisoft ArchiCAD [4], Tekla Structures [5] and VectorWorks [6]. [7] The openBIM initiative led by buildingSMART [8] defines set of standards for BIM. These standards are widely adopted by the building industry. [7] The standards are also implemented in the aforementioned modeling applications. The focus of the application built in this thesis is on the part of the standard that deals with data. Since IFC1 is one of the most popular and widely adopted BIM data modeling language2, it was chosen as the supported input format for the viewer application. The benefit of this decision is that it is highly probable that the users already have the architectural model in this format, so there would be no need for conversion. 2.2 IFC IFC is an open data model designed for building and construction data description. IFC is itself an international official ISO Standard registered as ISO16739. [9] It utilizes several other standards in its specification. IFC models are described in EXPRESS data definition language. The IFC format is defined by an EXPRESS schema. The schema describes possibilities of modeling data and relationships between them. 1. Industry Foundation Classes 2. Depending on the support of popular applications [7] 3 2. File Format of the Models EXPRESS data modeling language is a standard formalized in the ISO Standard for the Exchange of Product model STEP. [10] Moreover, STEP defines file formats recommended for storage and interchange of EXPRESS models. STEP formats adopted by Industry Foundation Classes are STEP- File and STEP-XML, which are used by IFC-SPF and IFC-XML respec- tively. [8] STEP-XML versions of the same file are larger than the STEP-File equivalents due to the XML formatting overhead. Therefore, IFC-SPF is the most ubiquitous data exchange form of IFC. [8] 2.2.1 Information Modeled By IFC IFC defines entity-relationship model, which consists of several hun- dreds of standard entities. The built viewer application gives focus on visualization of the architectural construction data. The architectural data is modeled by following IFC entities: • Products are modeled by the root class IfcProduct, which is the base class for all physical objects. The subclasses thereof can be divided into 2 categories of elements: – Spatial ∗ IfcSite ∗ IfcBuilding ∗ IfcBuildingStorey ∗ IfcSpace – Physical ∗ IfcWall ∗ IfcBeam ∗ IfcDoor ∗ IfcWindow ∗ IfcStair ∗ etc... 4 2. File Format of the Models • Relationships are modeled through the IfcRelationship class. The possible relationships between classes are composition, assignment, connectivity, association and definition. Particularly important relationships for architecture modeling and their examples are: – Composition – IfcBuilding as a composition of IfcBuilding- Storey instances – Connectivity – IfcSlab connected to an IfcBeam – Association – IfcMaterial associated to an IfcProduct – Definition – IfcFurnishingElement to be defined with non- standard