Extraction of the 3D Free Space from Building Model for Indoor Navigation

: For several decades, indoor navigation has been exclusively investigated in a 2D perspective, based on ﬂoor plans, projection and other 2D representations of buildings. Nevertheless, 3D representations are closer to our reality and offer a more intuitive description of the space conﬁguration. Thanks to recent advances in 3D modelling, 3D navigation is timidly but increasingly gaining in interest through the indoor applications. But, because the structure of indoor environment is often more complex than outdoor, very simpliﬁed models are used and obstacles are not considered for indoor navigation leading to limited possibilities in complex buildings. In this paper we consider the entire conﬁguration of the indoor environment in 3D and introduce a method to extract from it the actual navigable space as a network of connected 3D spaces (volumes). We describe how to construct such 3D free spaces from semantically rich and furnished IFC models. The approach combines the geometric, the topological and the semantic information available in a 3D model to isolate the free space from the rest of the components. Furthermore, the extraction of such navigable spaces in building models lacking of semantic information is also considered. A data structure named combinatorial maps is used to support the operations required by the process while preserving the topological and semantic information of the input models.


INTRODUCTION
3D modelling of buildings and cities have been occupying a central position in BIM and GIS research for more than a decade. The construction industry as well as the municipalities quickly understood the huge potential behind such 3D models and contributed to boost the researches in the topic. Indeed, 3D models open wide access to several useful applications such as building analysis, planning, management and several simulation processes (energy consumption, light exposure, network coverage, natural disaster estimation, etc.). It has been already proven that 3D models are the future of building and cities representation.
Few standards arise along from both BIM and GIS fields in order to offer a convenient structuring of the 3D representations of buildings. The most renown ones on both sides are semanticoriented and are the Industry Foundation Classes (IFC) from (Building SMART International, 2013) for BIM and the City Geography Markup Language (CityGML) from (Open Geospatial Consortium, 2012) for GIS. Research fields such as indoor navigation and localization have a clear interest in such 3D representations and standards to support critical tasks like emergency response or simply efficient facility management (Isikdag et al., 2013, Costin andTeizer, 2014). A dedicated standard named In-doorGML (OGC et al., 2015) has been even introduced to support and promote indoor navigation using 3D models.
Thereby, semantically rich models can now make the difference for indoor navigation. However, while the benefit of the topological and semantic information provided by such models is clearly recognized, there is still a huge lack in exploiting the geometric data for the spatial description of the environment to navigate through. This can be explained by many reasons. First of all, most of the research regarding indoor navigation is applicationspecific and mostly dedicated to rolling robots and pedestrians . Thus, focus on walkable areas is made in such studies and 2D floor plans or 2.5D representations connecting several 2D floor levels (via the stairs or elevators) are often * Corresponding author sufficient. Secondly, in most of the cases, the elements populating the indoor environment such as furnitures and other objects are neglected in favor of the structural elements such as walls, floors and openings. So the final models are highly simplified and represent the buildings as simple sets of rooms, corridors and halls. Finally, the complexity involved in a full 3D representation of the navigation space is an important daunting factor. Indeed, that complexity makes it tempting to keep on projecting 3D data into 2D spaces to simply rely on the well known 2D approaches for navigation.
In this paper, we face the previously described restrictions and discuss a new paradigm, that consists of performing the indoor navigation in a full 3D model. For that purpose, we introduce an approach allowing to extract the free space that should be dedicated to navigation, starting from a BIM model with a furnished indoor environment. Thanks to its precise spatial and semantic description, our system can support pedestrians (disabled or not) and robots, as well as flying objects like drones, that encountered a huge popularity in the few recent years. A simplified representation, corresponding to a minimal bounding box is provided to the furnitures and others indoor objects, allowing to considerably reduce their geometric complexity. We illustrate the great advantages of full 3D indoor navigation and provide a motivation why such a system should take over traditional approaches.
In Section 2, we discuss the researches related to 3D spatial representation for indoor navigation. The details of our approach are presented in Section 3, while Section 4 illustrates the results of the tests on several IFC and 3D CAD models and discusses their future improvement, before we conclude the paper.

RELATED WORK
As specified in , to be able to perform correct navigation several components have to be available: (3D) indoor localisation, a (3D) model that represents the space subdivision, (3D) algorithms for path computation (on a topological model or a grid), guidance (Points of Interest, Landmarks), guidance (visualisation) of the path and finally tracking/correction (if the path is not followed). While precise indoor positioning is still an extensive research topic (Liu et al., 2007, Adler et al., 2015, the research regarding 3D indoor navigation focusses mainly on the path computation (Musliman et al., 2008) or tries to conceptually address the requirements for such way of navigating. Therefore, only few addresses the modelling aspect. We organize the study of the close works following those three categories (concepts, graph extraction and modelling).
Several concepts have been investigated to support indoor navigation in 3D. The main research question they address is the organization of the indoor environment, known to be very complex. (Meijers et al., 2005) discussed the structuring of the interior and introduced a semantic model to assist evacuation task on 3D models. The issue of subdividing the indoor space into functional spaces to allow advanced navigation is developed in  and (Krūminaitė and Zlatanova, 2014). The authors emphasize the importance of a 3D description of the space and the necessity to rely on semantic information for efficient systems. (Becker et al., 2009) introduced a conceptual framework aiming to bridge the gap between representation models for route planning and indoor localization, as the two have different points of interest. The authors proposed a multilayered space-event model to allow both to be performed on a same 3D model. The model can be used to define subdivision of building space according to user profile (walking, driving), security or property regulations.
Semantically rich BIM and GIS models provide suitable information to automatically extract navigation graphs. Since the latter requires an organization of the indoor space in several space units (rooms) and the spatial relationships between them, those information are offered by the models and can be directly exploited. Thus several works study this extraction on IFC models (Lin et al., 2013, Boysen et al., 2014, or CityGML LoD4 models  for deriving paths for multi locomotion type (Khan et al., 2014) or support emergency response (Boguslawski et al., 2015). Even though the 3D models were considered in those works, they were used at a very simplified level, considering the indoor spaces as empty boxes and ignoring the furnitures and other obstacles.
Recognizing the complexity of how the indoor space can be organized, very few researches investigated possibilities to model it in 3D while considering accessible areas for a moving subject. Thereby, (Yuan and Schneider, 2010) introduced a LEGO-based 3D representation allowing to consider users widths, heights and particular tasks like avoiding stairs for example. Their model approximates the obstacles and provides a connectivity graph to ease the navigation extraction.
Closer work can be also found in the computer vision field, where few approaches addressed the issue of recovering the indoor free space available for navigation from single images (Hedau et al., 2009, Gupta et al., 2011, Hedau et al., 2012. The goal is to geometrically estimate the objects populating the indoor scenes and recover their spatial layout to determine the space that is really accessible for navigating robots for example. Therefore, despite the consensus in recognizing the necessity to move toward 3D representation of the indoor space, there is, to our knowledge, no approach considering the navigable space as it really is in semantically rich 3D models for indoor navigation purpose. We present in the following section our method allowing to consider the indoor 3D space and its furnitures, and to extract the actual free navigable space it contains, while preserving the topological and semantic information of the original models.

FRAMEWORK AND PRELIMINARY NOTIONS
More and more buildings have highly detailed 3D model of their entire structure, as well as their facilities. We present in this section the workflows leading to the extraction of the navigable space in a building model, depending on its input type, either IFC or 3D CAD. We also briefly present the combinatorial maps data structure that is used all along the process.

Workflows based on the input models
We present here two approaches. The first one considers IFC models of furnished buildings and automatically extracts the spaces of interest to support elaborated indoor navigation. On the other hand, several buildings do not possess semantically rich models, but just geometric description in form of 3D CAD models of their interior. Thus the second approach allows to extract the free spaces in such type of geometric models. In the case of an IFC input model, the four steps leading to the extraction of the free space are the following: • Parsing of the spaces described by the IfcSpace objects in the model; • Detection and simplification of the furnitures inside the Ifc-Spaces, described by the IfcFurnishingElements; • Boolean operations between each IfcSpace and its contained (and simplified) IfcFurnishingElements; • Detection of the openings (IfcDoors and IfcWindows) surrounding the original IfcSpaces and topologically linking them to the extracted free space volumes.
On 3D CAD models, we assume that the model has only geometric information available, thus correspond to a set of unstructured polygons. The approach to extract the free navigable space from such models rely on the method described by (Diakité et al., 2014a) and is summarized by the four following steps: • Reconstruction of the spatial relationships between the polygons to obtain closed volumes; • Recovering of the spatial relationships between the reconstructed volumes; • Extraction of the air volumes contained inside the model (that correspond to the free space); • Automatic semantic labelling of the volumes based on heuristic rules combining the geometric and recovered topological information.
Indeed, in the case of the 3D CAD, even though the volumes corresponding to the free spaces are extracted at the third step, they are not yet semantically identified. Thus, the last step is essential for the output volumes. More details on both processes for IFC and 3D CAD are presented in the following sections.

Combinatorial Maps as Supporting Data Structure
An nD combinatorial map (n-map) is an edge-centred data structure allowing to describe any quasi-manifold object regardless its dimension, thanks to a cellular subdivision (Lienhardt, 1994, Diakité et al., 2014b, Damiand and Lienhardt, 2014. It is composed by a set of darts (the basic element composing the cells) and the relationships between them. A dart corresponds to a part of an oriented edge, plus a part of all the incident cells. An (i + 1)cell is constructed by i-sewing the darts of a set of i-cell with the βi link through their proper (i − 1)-cells. For example, a 2-cell (or face) is built by 1-sewing a set of 1-cells (or edges), to link them by β1 through their common 0-cells (vertices). The darts and the β relations allow a n-map to represent the relationships between all the cells it contains. In addition to this, a n-map allows to associate attributes (that can be any type of information) to any cell. This property is used in a 3-map to associate to each 0-cells the given 3D coordinates of a point in R 3 to produce a so-called linear cell complex (LCC). But this can also be used to store information such as semantic.
Thanks to all those properties, a 3-map has been used in several works as a suitable data structure to represent 3D building models (Horna et al., 2015). Indeed, the subdivision of objects in volumes (3-cells), faces, edges and vertices that it provides fits well to the description of a building model. On the other hand, it allows to perform operations on models while preserving their topological and semantic information, which is a helpful skill. Furthermore, the ability of the data structure to gather geometry, semantic and topology, with the possibility to derive the dual space, makes our approach fit to the IndoorGML standard.
To be able to perform the free space extraction operations on the building model, the interesting volumes are then first reconstructed as 3-cells of a LCC. For simplicity, we will refer to the model in built as a Free Space LCC (FS-LCC). We detail in the following section the entire process for BIM and CAD models.

FREE SPACE EXTRACTION ON IFC MODELS
IFC is a well suited standard for applications like indoor navigation. It provides the description of the indoor spaces thanks to its IfCSpace class. An IfcSpace intuitively corresponds to a volume bounding a space contained in the building. The common practice to build it is following the layout of the indoor structural elements (e.g. walls, floors, ceilings and openings). Nevertheless, there are clearly some ambiguities in the way IfcSpaces are built in a model, since depending on the bounding construction elements, they can span over multiple physical spaces for example. But this is not a limitation in this work and we assume that the input IFC model already contains the information of the Ifc-Spaces.  Figure 1 illustrates the structural elements of a storey of a building model (from (Amor, 2012)) and the IfcSpaces available in the model for that storey. It can be seen on Fig. 1(b) that they correspond to the rooms of the storey. Having this information, in addition to the link between the spaces and the openings or the other neighbouring spaces, one can directly derive a navigation graph by considering each IfcSpace as a single node. But in reality, not all the space bounded by an IfcSpace is navigable, because of the presence of furnitures and other objects that stand as obstacles (Fig.2). Thus, extracting the real navigable space in such model amounts to exclude the space occupied by the obstacles inside the rooms. For this purpose, we proceed to the construction of the FS-LCC for which the first 3-cells correspond to the IfcSpaces of the input model. This is done by collecting all the polygons of a given Ifc-Space, recreating them as 2-cells of the FS-LCC and then linking them by β2, through their common edges. Figure 2(b) illustrates a 3-map representation of the spaces and furnitures of Fig.2(a). The semantic information of those elements can be directly transferred to their corresponding 3-cells that will keep them for the rest of the process. Now that we have the spaces, let's consider the furnitures inside.

Simplification of the Objects inside the IfcSpaces
Furnitures in the IFC standard are described by the IfcFurnishin-gElement class. They can independently be simple objects with relatively simple geometries or they can be complex objects composed of several components with complex geometries. Such complex representations are very useful in the context of realistic visualization but since generally only their visual aspect matters, they often embed several topological errors (open volumes, floating components, degenerate geometries, etc). Such errors would lead to invalid cells in the FS-LCC. We therefore perform a simplification of the furnitures to avoid geometrical issues and at the same time to reduce the complexity of the output navigable space. It is not a necessary task in the process, but it is used here to test the approach.  Figure 3 illustrates some types of furnitures that can be found in an IFC model. Our goal here is to replace the original geometries of the objects interfering with a given IfcSpace by simpler geometries, while optimizing the space they occupy. In other words, we are seeking for simplified representations so that there is the less free space possible in the resulting geometries while keeping their shape simple, to reduce the complexity of the resulting free spaces.
An intuitive solution to the simplification problem is the usage of the minimal bounding box method. It is widely used in computer graphics, mainly for ray-tracing, intersection checking, but also in robotics (Bergen, 1997, Huebner et al., 2008. Several different approaches can lead to a minimal bounding box depending on the constraints considered. In this paper we used the aligned axis bounding box (AABB) approach as the furnitures of our model test set are mostly axis aligned 1 . Nevertheless, an oriented bounding box approach is more suitable to obtain minimal boxes independently of the orientations of the objects to simplify.    Fig.4(b)). But considering the entire space around the furnitures comes back to rely on their original geometry, that would considerably complicate the resulting extracted free space. Thus, for all the detected furnitures in the IFC, their equivalent bounding boxes 3-cells are created in the FS-LCC to replace them (see Fig.5).

Subtraction of the Furnitures from the IfcSpaces
Once the furnitures are simplified, the following step consists in removing the space occupied by the furnitures from the 3-cells of the IfcSpaces containing them. As specified previously, the IFC file must contain the geometric description of the IfcSpaces in addition to the spatial relationships that describe the link between the spaces and their surrounding elements. Figure 6: Relationships between IfcSpace and the elements contained in it.
The IFC class IfcRelContainedInSpatialStructure allows to make the link between the container and the contained elements (Fig.6).
Indeed, the ContainsElements attribute of a given IfcSpace allows to retrieve which furnitures are contained in it. The latter are described by the IfcProduct class, and are not the only elements that can be contained by the spaces (IfcCovering, ...). Inversely, the IfcSpace containing a given IfcProduct can be retrieved through the RelatedElements attribute of the latter.

Linking the Spaces and the Openings
The Openings, that correspond to IfcDoors and IfcWindows, are crucial features that should necessarily be considered in our process. They constitute critical elements in any navigation process because they are the links between different spaces of the indoor environment. Therefore, they have to be integrated to the FS-LCC. Similarly to IfcFurnitures, the IfcDoors and IfcWindows are often composed by multiple geometry objects, as illustrated by Fig.8. Nevetheless, one particularity of the IFC standard is the definition of the void space where the doors or windows should be placed in other structural elements (e.g. walls). Thus, while dealing with an IFC model, one may need to cut the space required for a door or a window out of the receiving element before placing it in there. Such void spaces are represented by the class IfcOpeningElement, and can be reached from an IfcDoor or IfcWindow through their FillsVoid attribute.
We therefore use the void volumes directly as simplified version of the openings for their integration in the FS-LCC (see Fig.9(a)).
As the spatial relationships between the openings and the free spaces volumes are important, the β3 relations between them are built to preserve the links. This explains the contact surfaces depicted on Fig.9(b) and symbolizing that the 3-cell of the free space is topologically connected to the 3-cells of the opening through those particular 2-cells. In some particular cases, a wall separating two spaces can be designed with a hole but without an IfcOpeningElement. In that case it should be checked if the IfcSpaces from both sides touch each other. If not, the link between the spaces can still be found through the wall, at the level of the IFC model.

FREE SPACE EXTRACTION ON 3D CAD MODELS
By 3D CAD models, we refer in this section to 3D Models of building that contains only geometric information and cannot be considered as BIM models due to their lack of topological and semantic information. Such type of model are quite numerous in the market as they are basically convenient for visualization purpose, thereby the most produced type of 3D models before the event of the BIM in the past decade.
In (Diakité et al., 2014a), a method allowing to enrich such geometric models with topology and semantic is introduced. The approach relies on the formalism of the 3-maps to recover the topological relationships between the set of unstructured polygons of the input data, leading to the shape reconstruction of the building components. Furthermore, the geometric and reconstructed topological relationships between the components are combined and used to define a set of heuristic rules and perform the semantic labelling of the structural components in a propagation scheme.
During the information enrichment process, the air volumes inside the rooms of the building are automatically generated as 3cells and are the first semantically identified components. Those air volumes exactly correspond to the free navigable space. Figure 10 illustrates the process on a simple room example projected on 2D for simplification purpose. Despite the fact that furnished building models are not discussed in the paper, the approach can independently produce the 3-cells of the free spaces (see Fig.10(c)). Furthermore it is possible to semantically consider the furnitures by adding simple heuristic rules (e.g. any 3-cell mainly surrounded by an air volume and other structural elements such as walls and/or floors can be considered as a furniture).
Nevertheless, due to the lack of information on the input models, more constraints has to be considered for this second approach. A first one is regarding the doors and windows of the input models. They should be closed otherwise the spatial subdivision on which the topological reconstruction is based will not distinguish the outdoor from the indoor of a room or of the whole building (see Fig.10(d)). Such configuration will then lead to an infinite volume or a shell enveloping the entire model. A second constraint concerns the complexity of the geometries of the furnitures and the openings. Indeed since complex objects often contain topological errors, the volume reconstruction cannot be properly performed, leading to generation of open volumes for example.

RESULTS AND DISCUSSION
The entire framework presented in the previous sections have been implemented and tested. We present in this section the output results of few test models of type IFC obtained from the Open IFC repository (Amor, 2012) and self produced CAD model. The algorithms have been implemented in the C++11 language and is supported by several libraries: • the Computational Geometry Algorithms Library (The CGAL Project, 2016) that provided several geometric algorithms as well as the implementation of the n-map data structure; it was also used to perform the boolean operations (difference and union) using the Nef Polyhedron package; • the Open Asset Import Library (Assimp Project, 2015) that provided readers/writers of several 3D model formats; • and finally the IfcPlusPlus library (IfcPlusPlus, 2016) that provided a complete parser for IFC2x3 and IFC4 formats.
Also the BIMVision viewer (Datacomp, 2016) has been used for visualization and snapshots of the IFC models used in this paper.
6.1 Results of the free space extraction Figure 11 illustrates the results of the process on four test models for which the specificities are detailed in Table 1. House, Duplex and Office are IFC models, and CAD-house was made using SketchUp Make (Trimble, 2016).
Different types of construction were considered during the test. Complex furnitures were only present in House and Duplex, while they were already simply represented in the rest. The simplicity Figure 11: Extraction of the free space in the models of Table 1. From left to right, the first column shows the original models, the second shows the spaces ignoring the furnitures, the third illustrates the real free spaces considering the furnitures and the final column exposes the opening linked to the spaces (doors in green and windows in yellow). Only results on one floor is shown for some models, for clarity purpose. and efficiency of the approach allow to reach satisfying performances. As it can be seen in Table 1, the number of spaces/rooms directly affects the computation time of the process, although the latter stays low for all the models. The computation time was estimated on a Intel Core i7-2760QM laptop, with 2.40GHz x 4 CPU and 8Go of RAM. The middle columns of Fig.11 point out the difference between considering the space units as provided by the original models and considering the furnitures and other objects that they contain. It clearly appears that the navigable space can be drastically reduced depending on the configuration of the objects inside the building. On the other hand, the results also emphasize how complex the indoor environment can be and how challenging it can be to perform navigation, not only for pedestrian but for all possible type of movable subjects such as drones, robots, disabled people, etc, in indoor models. Figure 12 gives another perspective confirming this.

Discussion
An efficient indoor navigation system needs to be flexible, precise and to offer a coherent description of the space in which the subject is supposed to circulate. It is only possible by considering the real free space in 3D that a system can perform navigation independently from the moving subject, so that, e.g. the facility management service of a building and the fire brigade can rely on a same model for different purposes. The spatial representation of the indoor navigable space proposed in this paper clearly makes it possible to go for a deeper exploitation of the space for finer navigation purpose.
The proposed algorithms are stable and can be robustly implemented with freely available libraries. The exact predicates kernel of CGAL allows to perform robust boolean operations and 3-map guarantees topologically valid 3-cells outputs. Thanks to that, the produced 3-cells of the free space are always watertight volumes.
Nevertheless, the results highly depend on the quality of the input model on which the process relies. Stability and topological validity cannot be insured for example in the case of floating objects that has no contact with the surface boundary of the spaces containing them. Similarly, the topological relationships cannot be maintained in the FS-LCC if there is no contact between the spaces and their surrounding elements.
Finally the simplification of the furnitures is making the volume intersections less complex, helping to the stability of the approach. But for a finer recovering of the free space, the space surrounding the furnitures needs to be considered as well. Indeed the bounding box approach involve losses of spaces like below the tables or beds, that can be navigable area for domestic robots for example. Thus better approaches to simplify them need to be investigated.

CONCLUSION
We introduced a novel point of view that consists of representing the indoor building environment completely in 3D vector model for indoor navigation purpose. While the existing approaches use simplified representations of the space and ignore the objects inside, we propose a method to extract the navigable space in such complex configuration to exactly know where a subject can navigate properly inside the building, considering his/its constraints. Starting from a semantically rich model, the general spaces are first extracted and then the furnitures, replaced by simplified representations, are extracted from the global space thanks to boolean operations. A method to deal with geometric models like CAD is also proposed, and we performed several tests to validate the global workflow.
Several questions still need to be investigated and solved. The first one concerns the automatic extraction of a navigation graph on such a model. Navigation graphs rely on nodes representing the accessible spaces and edges that stand for their adjacency links. To extract the nodes, convex cells are needed to ensure a position inside each cell. While this can still be solved by finding a random point in the 3-cell of the free space, this brings out the question of the structuring of the indoor free space. A smart subdivision of the navigable space should be investigated so that navigation to point of interest inside the rooms can be possible .
Another aspect that needs to be considered in future work is the dynamic changes that can occur in the scenes. Indeed, the furnitures represented in the models have different movability, that can affect the precision of the extracted free spaces. For example a chair is most likely to be moved than a cupboard or a desk. Thus our approach gets stronger in a less dynamic environment. But to be able to consider such aspect, more information on the semantic of the furnitures and moving objects will be required in the input models (e.g. dynamic weight on the furnitures).