Constraints for Improving Information Integrity in Information Conversion From CAD Building Drawings to BIM Model

Computer Aided Design (CAD) systems play an important role in the production of building designs that are used to assist building constructions. Thus, CAD building drawings contain a large amount of building data important for indoor navigation and other related analysis which are often done in BIM (Building Information Modeling). Therefore, the conversion of CAD-based building data to BIM is necessary to make the data in CAD useful for these applications. However, when mapping to the BIM model, there are semantic ambiguities which will have an important impact on the subsequent analysis of the information converted from CAD. This paper addresses these ambiguity problems by first examining the building information represented in CAD drawings and the mapping relationships between the building information in CAD drawings and that in BIM. Once these relationships are established, the semantic ambiguities existed in the mapping were identified and then corresponding constraints were developed to address these ambiguities. The experiment results show that the approach described in this paper can effectively eliminate the semantic ambiguity of the mapping from CAD to BIM and the converted BIM model can effectively support subsequent analysis.


I. INTRODUCTION
Before the emergence of BIM (Building Information Modeling), the traditional construction industry lacked a unified standard for information exchange. The various building information was difficult to share, forming a large number of information islands. Gallaher et al. claimed that the lack of building information exchange caused the U.S. to lose $15.8 billion annually [1]. The emergence of BIM provides an interexchange platform for building information, and its core standard IFC (Industry Foundation Classes) [2] provides a unified interaction standard for building information. Correspondingly, the conversion of building information produced by traditional non-BIM means to the BIM model has become a new research field [3]- [6]. As an important design The associate editor coordinating the review of this manuscript and approving it for publication was Maode Ma . tool, Computer Aided Design (CAD) plays an important role in the construction of traditional non-BIM buildings, and a large amount of data about these buildings is stored as CAD drawings. Therefore, the research on the accurate conversion method of CAD-based building information to BIM model has become an important issue [7]- [10].
To realize the accurate conversion of CAD-based building information to BIM model, the key issue is how to recognize the ''structural'' information (such as profile and depth) of building objects from the numerous ''wireframes'' included in the CAD drawings to match the parameters of the geometric model (such as IfcSolidModel, IfcSurface, etc.) in BIM. Aimed at this problem, the existing methods can be divided into two categories, one is based on geometric feature matching, and the other is topology recognition.
The methods based on geometric feature matching appear in the early stages of the research. The method realizes object recognition by the matching the geometric features of building elements. The basic idea is to analyze the ''structural'' characteristic of geometric primitives (such as straight segments, arcs, circles, rectangles, etc.) contained in each building element, and then find the corresponding ''structure'' of geometric primitives from the CAD drawings of the building [11]- [19]. The method can be further divided into the methods based on sub-graph isomorphism [13], [14], network of constraints [17], [18] and deformable templates [19]. The overall objective of these methods is to assemble building elements such as doors, windows from the geometric primitives such as lines. For example, Ah-Soon analyzed the geometric ''structure'' of various building elements, found the constraint information between the geometric primitives contained in the ''structure'', and thus constructed the primitive constraint network. Based on the constraint network, the matching of building elements was realized [18]. However, the above method only focuses on the extraction of single building elements such as doors, windows, walls, columns, beams, etc., without creating the relationship between them. Therefore, it is difficult to integrate them into a whole, such as rooms. The BIM model is an object oriented model that integrates building objects such as building elements and building spaces into a whole. The building elements extracted by the above methods are independent of each other and cannot meet the requirements of the BIM model.
Aimed at the problem faced by the methods described above, the topology recognition methods, from a holistic perspective, implement object recognition according to the topological relationship of the building elements (such as walls, columns). This method considers the planar projection of the contour of a building space such as a room as a closed loop, and uses a closed loop extraction method to realize the recognition of the building spaces [20]- [25]. For example, Lewis et al. performed topological reconstruction based on the extracted door and window objects, and then extracted closed loops [22]. On this basis, the problem of closed loop extraction also be converted into a graph theory problem, and achieve the extraction of closed loop [23], [24].
With the development of the topological methods, the object recognition problem based on CAD drawings has been solved to a certain extent. It is now possible to use the important building elements such as doors and windows to infer the spatial relationship between the building objects [10], [26], which lays a good foundation for mapping CAD-based building information to BIM model.
From the above analysis, we can conclude that after more than 20 years of research, there are mature methods and tools to extract building objects and relationships from CAD drawings. However, there are still problems in realizing the conversion of CAD-based building information to the BIM model. Currently, the widely accepted standard in the BIM field is the IFC standard. It contains the detailed definition of building objects and the building relationships between them, which allows the model to support a variety of building-related analyses. However, due to the lack of necessary constraints, there is still semantic ambiguity in the transforming process from CAD to IFC. That is, certain building information in building CAD drawings can be mapped in multiple ways to IFC according to different understandings. These different mapping methods may result in changes in semantic information originally exist in building CAD drawings. Therefore, the original building information in building CAD drawings may be lost or changed after being converted to BIM, which will affect the future analyses based on IFC model. For example, for the building shown in Fig. 1a, the hierarchical relationship of its building spaces can be expressed as Fig. 1b, Fig. 1c, or Fig. 1d which are all legal in IFC. However, some of the expressions do not match the original information contained in building CAD drawings. If the hierarchical relationship of the building shown in Fig. 1a is expressed by the data structure shown in Fig. 1c, it will cause the loss of story information. If the hierarchical relationship is expressed by the data structure shown in Fig. 1d, it will cause the relationship between stories and their corresponding rooms to change. These changes alter what the drawings in CAD really represent and are certainly not acceptable.
This paper analyzes the semantic ambiguity that exist in the conversion of building CAD drawings to IFC, and then develops methods to solve this problem. Section 2 will explore the solutions to the problem of semantic ambiguity in the conversion process. Section 3 will validate the method proposed and discuss the results through a case study. Section 4 is a summary of this paper.

II. METHODOLOGY
A. BASIC IDEA At present, the extraction of the building objects and relationships from CAD drawings have been well solved [10]- [26]. Based on this, this paper will solve the problem of semantic ambiguity in the conversion process. IFC is a common standard in the field of BIM. Most BIM software such as Revit and ArchiCAD support the import and export of IFC data format. Therefore, this paper will use IFC as the target model to achieve the conversion from CAD to BIM.
The core problem to be solved is the semantic ambiguity in the conversion of the building information from building CAD drawings to IFC model. The reason for this problem lies in the fact that there are multiple realizations of the same building information in building CAD drawings when transforming to IFC due to multiple possible mappings. Therefore, it is necessary to control the mapping process using additional constraints. Different from the modeling methods based on laser scanning and orthographic image, the CAD-based modeling method is mainly oriented to the interior of the building. The extracted building information includes not only various building elements, building space but also the interrelationship between them. Therefore, building information extracted from building CAD drawings is very complicated. It is necessary to firstly examine the representation of the  building objects and relationships captured in building CAD drawings, then sort out the existing mapping of these objects and relationships in CAD drawings to IFC. Based on the current mapping, the semantic ambiguity in the mapping process can be identified and then the corresponding constraints can be developed and used to eliminate the ambiguity (Fig. 2). It should be noted that the constraints proposed in this paper is to limit the conversion of the building information from building CAD drawings to IFC model, so as to solve the problem of semantic ambiguity. The IFC schema and IFC constraints will not be changed during conversion. Therefore, the converted result must comply with the IFC schema.
Considering that the information involved in building CAD drawings are quite complex, this paper sets the following restrictions on the research content: The building CAD drawings involved in this paper are mainly the construction and  design drawings of the main body of the building. The utilities and the construction process information are not within the scope of this paper. The smallest object (granularity) involved in the study is the building elements. The steel, concrete, brick and other materials used in construction are not included in the research scope of this paper.

B. BUILDING OBJECTS AND RELATIONSHIPS IN CAD DRAWINGS 1) BUILDING OBJECTS IN CAD DRAWINGS
According to the researches carried out by relevant research institutions, the building objects captured in CAD building drawings mainly consists of two parts (see examples in Table 1): the building elements and the building spaces. The building elements are the basic units when combined with other building elements to realize the basic functions of the building. The building spaces are the places enclosed by the building elements or contained in the interior of the building for people to work and live in (Table 1).

2) BUILDING RELATIONSHIPS IN CAD DRAWINGS
In order to enable the created building model to support the corresponding analysis, the research institute represented by Nanjing Normal University has analyzed and modeled the internal spatial relationship of the building. Researchers unified the building relationships existing in building CAD drawings and realized the extraction of building relationships [9], [10], [26]. The building relationships involved can be divided into the following three categories (Fig. 3): (1) The relationship between building elements • Element Aggregation, the relationship between the whole and the part of the building elements, such as the relationship between stairs, stair flights and rails.
• Element Connection, the relationship between connected building elements, such as the relationship between connected walls.
• Hole and Element, the relationship between the building element and the hole excavated on it, such as the relationship between the wall and a hole on it. • Opening and Hole, the relationship between the hole and related openings installed on it, such as the relationship between the hole and a door on it.
(2) The relationship between building spaces • Space Aggregation, the aggregation of building spaces between different levels, such as story-to-room aggregation.
• Space Adjacency, the adjacent relationship of the same level of spaces, such as the adjacent relationship between two rooms in the upper and lower stories.
• Space Connection, the connect relationship of the same level of space, such as the connection between two stories through the stairs, the connection between a room and a corridor, etc.
(3) The Relationship between Building Elements and Building Spaces • Space Containing, the inclusion relationship of the building space to the building elements, such as the inclusion relationship of the elevator room to the elevator.
• Space Boundary, the relationship between the space and the building elements surrounding it, such as the relationship between a certain room and the walls, columns and floors surrounding it.

C. CURRENT MAPPING FROM CAD DRAWINGS TO IFC MODEL
IFC is an object-oriented model that defines a large number of entities and relationship objects. The building objects and their relationships extracted from CAD drawings are actually a subset of the objects contained in the IFC. Therefore, based on the building information that can be extracted from building CAD drawings, it is necessary to establish an initial mapping from CAD to IFC by screening the building objects and relationships from CAD based on the object definition in IFC. This initial mapping can be used for finding the semantic ambiguity during conversion.

1) MAPPING THE BUILDING OBJECTS
IFC defines most of the building elements involved in building lifecycle management, including walls, columns, beams, doors, windows, and stairs, etc. which correspond to most of the building elements mentioned in the CAD drawings. According to this, the mapping relationship of building elements between CAD and IFC can be preliminarily established (Fig. 4).
For the building spaces, generally three types of objects can be extracted from the building CAD, namely buildings, stories, rooms. The building spaces in the IFC can also be well mapped to the building spaces mentioned above, as shown in Fig. 5.

2) MAPPING THE RELATIONSHIPS
IFC has extensively defined the building relationships that exist in the life cycle management of buildings. IfcRelation-Ship is the root class of all relationships, based on which it derives six categories of relationships such as IFCRelAssociates, IfcRelConnects, IfcRelDefines, IfcRelDecomposes, IfcRelDeclares and IfcRelAssigns (shown in Fig. 6). Among the relationships in IFC, the closest to the relationships involved in building CAD drawings are IfcRelConnects and IfcRelDecomposes.
IfcRelConnects is the most important type of relationship in IFC, covering most of the relationships related to connections within a building. On the basis of it, a large number of subclasses are defined according to different categories (Fig. 7). Since this paper does not consider utilities and the construction process information this time, the related relationships are not considered.   The other important relationships are the aggregationrelated relationships in IFC, which has four subclasses (shown in Fig. 8). Among the four relationships, IFCRe-lAggregates and IFCRelNests represent the aggregation of objects, respectively, the difference being that the former represents a tangible aggregation and the latter represents an intangible aggregation (generally used for aggregation of utility networks, construction processes, etc.). IfcRelVoidsElement can be used primarily for holes in building elements, while another relationship, IfcRelProjectsElement, has little to do with the building relationships involved in building CAD drawings.
In summary, for the nine relationships involved in building CAD drawings mentioned above, in addition to the relationships of space connectivity and space adjacency, the other seven types of relationships have a corresponding relationship to the relationships in IFC and can be mapped (Fig. 9). For spatial adjacency and spatial connection, although there are not relevant relationships defined in IFC, it can actually be derived through other relationships in IFC [30].

D. ANALYSIS OF SEMANTIC AMBIGUITY
Section 2.3 initially constructed the mapping of building objects, building relationships involved in building CAD drawings to the related objects in IFC (Fig. 4, Fig. 5, and Fig. 9). Based on the above mapping, the semantic ambiguity in the mapping can be analyzed from two aspects: building objects and building relationships.

1) SEMANTIC AMBIGUITY OF BUILDING OBJECTS a: REDUNDANT DEFINITION OF BUILDING OBJECTS
For the mapping of building objects, the main reason for semantic ambiguity is the redundancy definitions that exist in IFC. It is embodied in: (a) building objects related to the class of IFCCovering. IFC defines an IFCCovering class for building elements with coverage function, which can be roofs, floors, ceilings, etc. But these objects have other objects that can be mapped in the IFC object system. For example, the roof has another class of IfcRoof corresponding to it, and the ceiling and floor are essentially a type of slab, with the class of IfcSlab corresponding to them, which produces a one-to-many mapping from CAD to IFC. (b) The accessory building elements. In CAD, there are some accessory building elements (such as door leaves and window sashes) can be extracted, which are part of the parent building elements. In IFC, there are two types of possible classes can be mapped to such building elements, namely IfcDiscreteAccessory and IfcBuildingElementPart. This also produces a one-to-many mapping from CAD to IFC.
In this case, the above building elements in building CAD drawings will not be able to map to IFC in a unique way. When using the IFC models with this kind of semantic ambiguity, it is difficult to parse them using a unified way and may have an impact on subsequent analysis using the converted information. For example, in the analysis of airflow inside a building, it is necessary to acquire the inner boundary of the VOLUME 8, 2020  building space and construct a discrete grid to simulate the airflow with this boundary (shown in Fig. 10). As an integral part of the boundary of the building space, the ceilings and floors determine the upper and lower boundaries of the space, which play an important role in the inner boundary. However, they can be either mapped to the class of IfcSlab or IfcCovering. In this case, the user of the model does not know whether to extract the floor and ceiling from IfcSlab or IfcCovering.

b: LOSS OF THE RELATIONSHIP BETWEEN COMPOSITE BUILDING ELEMENTS AND THEIR SUB-ELEMENTS
In IFC, there is no explicit definition of the hierarchical relationships among building elements, which causes certain problems in geometric information conversion of composite building elements. For example, the stair (Fig. 11a) is a combination of the stair flight, platform, and railing. It is a typical composite building element. However, during conversion, the geometric object of the stairs may be merged as a whole. In this case, the stair is not associated with sub-elements such as stair flights, platforms, and railings. This will result in the loss of sub-element information and may affect the subsequent analysis based on the converted information. For example, an evacuation analysis may require path information for a stair that needs to be calculated directly from the geometric information of the sub-element of the stair fights. If the geometric information of the stairs is stored without the relation to its sub-elements, it is difficult to extract stair fights separately. For another example, in evacuation analysis, the passing ability of the door and window is a parameter that needs to be considered frequently. This parameter is determined by the effective width of the door and window [30]. As shown in Fig. 11b, the effective width of the door is determined by the width X of its door panel. If the information of the door panel is lost during the mapping, the width Y of the entire door will be erroneously used as a calculation factor of the passing ability, which will inaccurately enlarged passing ability of this door.

2) SEMANTIC AMBIGUITY OF BUILDING RELATIONSHIPS
When mapping the building relationships involved in building CAD drawings to IFC, there are many semantic ambiguities. It mainly includes the hierarchical relationship of building spaces, the affiliation of special building spaces, and the connection relationships to building elements. It is necessary to analyze the above relationships and formulate corresponding constraints to eliminate the semantic ambiguity.
(1) Multiple understanding of building spaces' hierarchical relationship In order for a building model to support a variety of analyses, it is necessary to organize the building spaces in a hierarchical structure (relationship). For example, in analysis such as airflow analysis and path analysis inside a building, it is necessary to generate a connected network of various spaces inside the building. This connected network is based on hierarchical relationships between buildings, building stories and their interior spaces. If such a hierarchical relationship is not established in advance, the building story will have difficulty establishing an association with the space to which it belongs, thereby having a significantly impact on the generation of the connected network.
As mentioned in previous section, there is a relational class for aggregation in IFC, namely IfcRelAggregates, which can be used for aggregation of various objects. From the definition, IFC does not strictly limit the types of objects involved in IfcRelAggregates. The two main attributes related to IfcRelAggregate, RelativeObject and RelatedObjects, are of type IfcObjectDefination, which is the parent class of IfcObject and can be used for various types of objects in IFC. Although suggestions for the aggregation relationships are given in the definition of related building space, the case where IfcBuilding directly aggregates IFCSpace is not illegal in IFC (in fact, some semi-open spaces also require such direct aggregation). This may lead to some unreasonable aggregations, which leads to the lack of the aggregation relationship between certain stories and their subordinate spaces. Therefore, it is necessary to impose stricter constraints on the relationship.
(2) Uncertainty of special building space' affiliation After the hierarchical relationship of the conventional building spaces is basically established, the affiliation of some special building spaces also needs to be considered, mainly including the following aspects: (a) Affiliation of indoor through space There may be some through space in a building, such as the atrium of the mall (Fig. 12a), the stage of the theater, etc., which runs through several stories at the same time. The through space has direct connectivity to bottom story. But for the upper story, they do not have direct connectivity to the through space but is adjacent to it.
This raises the question of which way shall be used to describe its affiliation with each story to ensure its connectivity to the bottom story and its association with the upper story. If the above situation is not distinguished, it will directly affect the correctness of the conversion to the relevant analysis. For example, in the analysis of building airflow, the through space may be associated with multiple stories at the same time. As the airflow can flow freely in this space, the through space should be seen as a whole. But in the case of evacuation analysis, this space is essentially only connected to the bottom story, and the upper story is disconnected (people in the upper space cannot jump directly into the through space to escape). If the two scenarios are simply mixed up, the generated analysis will inevitably be erroneous.
(2) Affiliation of semi-open space A building may have some semi-open spaces, which are spaces that are associated with the building's inner and external areas, such as a patio (Fig. 12b), a roof garden (Fig. 12c), and a corridor (Fig. 12d). These spaces are important parts of the building, but the relationship with the story is difficult to establish. For example, a patio, which essentially belongs to an outdoor through space, may span multiple stories while a roof garden is only a semi-open space on the roof, making it difficult to establish relationships with conventional stories. It is therefore necessary to constrain their affiliation for different types of semi-open spaces, rather than simply associating them directly with buildings or building stories. Otherwise, it will greatly affect the hierarchical relationship of the building.
(3) Semantic ambiguity of building elements' connection relationships In IFC, the connection relationship between building elements is one of the most important relationships. It is the basis of structure analysis, and it is also the basis for the derivation of space adjacency and space connection relationships.
In IFC, the connection relationship of building elements is defined as follows. An important attribute of this relationship is ConnectionGeometry. This entity reflects the geometry of the joint between connected building elements and may affect VOLUME 8, 2020 the conversion results of IFC model which may be further converted for building structure analysis.

SUBTYPE OF (IfcRelConntects)
ConnectionGeometry : IfcConnectionGeometry RelatingElement : IfcElement; RelatedElement : IfcElement; END_ENTITY; When mapping from CAD to IFC, the main problem of semantic ambiguity arises in connection between beam, column and the connection between walls.
(a) Connection between column and beam In building design, the basic rule is that the column supports the beam, and the force of the beam is transmitted to the column. Then it is generally believed that the intersection of them should be in the manner of Fig. 13b. However, in some cases beams and columns may be reinforced concrete cast-inplace structures, and their way of intersection is very different from that of prefabricated beams and columns. Different connection methods will also affect the ConnectionGeometry domain. Therefore, the way the beam and the column are connected needs to be discussed for the specific situation.
(b) Connection between Walls Generally in building CAD drawings, walls are represented by means of centerline as well as left and right widths (Fig. 14a), which can cause problems when mapped to IFC. Specifically, if the relationship between walls is not considered, the section of the wall is constructed directly according to the left and right width of the wall and the center line which will result in a gap at the corner. (Fig. 14c). Therefore, it is necessary to comprehensively consider the actual situation of the wall to handle the exception. The specific processing method will directly affect the way of intersection between walls and affect the attribute of ConnectionGeometry in the IfcRelConnectsElements relationship.

E. ELIMINATION OF SEMANTIC AMBIGUITY 1) CONSTRAINTS ON BUILDING OBJECTS
(1) Constraints on redundancy definition of building elements From the above analysis, the redundancy definition in IFC is one of the important reasons for the semantic ambiguity in the mapping process of building objects. The solution to this kind of problem is relatively straightforward. That is, selecting a specific class from the redundant classes of IFC to construct a one-to-one mapping relationship with the building objects extracted from building CAD drawings. The problem here is that which of these redundant classes should be chosen to be mapped?
(a)Objects related to IfcCovering For the covering objects, the following rules can be formulated based on the principle of constructing a one-to-one mapping: if the object other than IfcCovering has a one-toone correspondence with the object to be mapped in building CAD drawings, the object in CAD shall be directly mapped to it. Otherwise it should be mapped to IfcCovering. In this case, IfcRoof has a clear one-to-one correspondence with the roof in building CAD drawings, so the roof should be mapped to it. IfcSlab is a general term for the slab, which can be ceilings, floors, sidings and even platform for stairs. Therefore, it does not have a one-to-one relationship with the ceilings or floors. In this case, it is not suitable to map the ceilings or floors to it. On the other hand, the IfcCovering object has an attribute named IfcCoveringTypeEnum, which is an enumeration value that identifies the covering object. With this enumeration value, it is possible to determine whether the covering belongs to a floor, a ceiling, or a siding, then map it accordingly.
(b) The accessory building elements For accessory building elements such as door panel and window sash, we need to choose a class from IfcBuildingEle-mentPart and IfcDiscreteAccessory for mapping. Considering that it is a part of the parent building elements, rather than an accessory, the meaning of ''BuildingElementPart'' is closer. So mapping these objects to IfcBuildingElementPart is more appropriate.
In summary, the constraints defined in this paper for building object mapping are as follows: Constraint 1, for the covering objects, handle it as follows: For the roof, map it to IfcRoof during the mapping; for the ceiling, map it to IfcCovering and set its type enumeration value according to its type. For building parts such as door panel and window sash, they should be uniformly mapped to IfcBuildingElementPart.
(2) Constraint on the relationship between composite building elements and their sub-elements For composite building elements, the reasons for the semantic ambiguity generated in the mapping process mainly have two aspects: First, there is no hierarchical relationship between building elements in IFC, therefore, there is no clear constraint on the aggregation relationship between building elements. Secondly, for the composite building elements that can aggregate other building elements, how to coordinate the association of the geometric information with its subelements is not clearly defined. Therefore, we need to solve this problem from the following two steps: first, screen these composite elements as well as the hierarchical relationship with their sub-elements. Second, constrain the way in which they and their sub-elements are associated with geometric entities.
After combing the building elements in Table 1, it can be concluded that among the building elements extracting from CAD, the stairs, steps, doors, windows, etc., can be composed of sub-elements and they can be classified to composite building elements (Fig. 15). The remaining building elements can be classified as a single element.
Next, the rules for the association of composite building elements and their geometry objects can be defined as follows: Constraint 2, for composite building elements, there are two cases to consider. If there are conditions to extract their sub-elements separately, the geometric information of each  sub-element should be extracted separately. At this time, the composite element itself no longer stores the geometric entity, and its geometric information is aggregated from the geometric entities of the sub-elements. If the geometric information of the sub-elements cannot be extracted, the composite element directly stores its own geometric entities.

2) ELIMINATION OF SEMANTIC AMBIGUITY IN BUILDING RELATIONSHIPS
(1) Constraint on hierarchical relationship of building spaces Most buildings in reality are organized by stories. For general building application analysis, building stories are their basic organizational unit. In addition to the outdoor semiopen spaces, most of the inner spaces can find the story to which it belongs. Therefore, the hierarchical relationship that IfcBuilding aggregates IfcBuildingStorey and IfcBuild-ingStorey aggregates IfcSpace is a constraint that can be applied to most buildings. Therefore, we impose the following constraints: Constraint 3, the general buildings that can apply the hierarchical relationship of IfcBuilding/IfcStorey/IfcSpace always use the way of Table 2 to construct the hierarchical relationship of building spaces. In this case, IfcBuildingStorey can only be aggregated to IfcBuilding, and IfcSpace can only be aggregated to IfcBuildingStorey.
(2) Constrain on the affiliation of special building spaces (a) Constraint on indoor through spaces For the indoor through spaces, each story has an association relationship with it, so it is impossible to clearly define which story it belongs to. If you force it to belong to the bottom story, it will cut off the association with other spaces; if you divide it horizontally by story and force it to belong to each story, it will destroy the integrity of the space. Therefore, a single association cannot be used to solve the problem.
A special building relationship is defined in IFC -IfcRelReferencedInSpatialStructure. It is defined as follows: ''IfcRelReferencedInSpatialStructure is used to assign elements in addition to those levels of the project spatial structure, in which they are referenced, but not primarily contained.'' By definition the relationship mainly describes an indirect relationship which can well describe the relationship between the through space and the space above the bottom story. Based on the above analysis, we apply the two relationships of IfcRelReferencedInSpatialStructure and IfcRelAggrgates together in IFC to solve this problem: Constraint 4, the through space should directly attached to the bottom story associated with it, and they are associated with IfcRelAggrgates. For other stories associated with the through space, using IfcRelReferencedInSpatialStructure to relate it.
In this way, the integrity of the space is not compromised, but it can also be associated with the stories above the bottom story in an appropriate manner. (

3) Constraint on semi-open spaces
For a semi-open space, it needs to be discussed based on different conditions. The first category, such as a roof garden, it is not clear that which story it should belong to. So it is more like a direct space of a building. To determine the affiliation of this type of space, it is necessary to break the conventional hierarchical relationship of building-story-space, and directly subordinate this kind of space to the building. The second category, such as the outer corridor, it clearly belongs to a certain story. This semi-open space should be placed on the story associated with it. The third type, such as a patio, (

4) Constraint on the connection relationship of building elements (a) Constraint of the connection relationship between beams and columns
For the prefabrication of beams and columns, it is generally considered that the columns support the beams. In this case, the intersection should be set to the load bearing surface of the column (Fig. 13b). For the reinforced concrete cast-inplace structure, since the beams and columns are uniformly poured together in the final stage, they do not actually contain obvious boundaries, and the intersection part should be an overlapping area (Fig. 13c). Constraint 6, for the general prefabricated beam and column. The intersection should be expressed as shown in Fig. 13b. The corresponding interface is determined by the bearing surface of the column. For the cast-in beams and columns of reinforced concrete, the intersection should be expressed as shown in Fig. 13c. Since the two are mixed, the blue-color part of Fig. 13c is set as the common intersection.
(b) Constraint on the connection relationship of walls From the perspective of microscopic scale, the masonry of the wall is related to its function, therefore, the actual construction method should be considered. Non-bearing walls are typically constructed of brick while load-bearing walls (such as shear walls) are typically constructed of reinforced concrete. For the former, it is necessary to refer to the corresponding masonry specifications for analysis. Some construction rules such as the ''Code for Construction Quality Acceptance of Masonry Structures'' [31] clearly states that the corners and junctions of brick masonry should be built at the same time. The reason why the masonry is required at the same time is that the corner of a wall is an important structural stress point of a building, and the walls of the two ends must be closely matched to ensure stability. In the actual masonry process, no matter which masonry method is used for brick walls, the upper and lower bricks must overlap no less than 1/4 of the brick length. For example, in the masonry form of the following figure, the odd and even blocks of the bricks are alternately arranged, and the two walls overlap each other. Therefore, brick masonry walls are also difficult to distinguish between distinct segmentation boundaries (Fig. 16).
Since the granularity of the building elements studied in this paper has not been refined to the level of bricks, it is difficult to support the finer grained description by existing CAD data. Therefore, the junction of the connected brick walls cannot be clearly determined.
For the connected wall of reinforced concrete, it is also difficult to distinguish the obvious division boundaries due to the adoption of unified pouring mode when generating the wall. The junction of the connected reinforced concrete walls also cannot be clearly determined.
Considering the above problems and combining with the practice of masonry construction, this paper uniformly adopts following constraints on the problem of wall segmentation of connected walls to limit the relationship of connected walls (Fig. 17): Constrain 7, the following method is used to determine the connection geometry in the connection relationship of wall (i) First, calculate the original section of each wall independently based on the centerline and left and right width information; (ii) Second, extending the wall as a whole at the intersection of connected walls; (iii) Third, obtaining a common intersection of the extended wall and it can be regarded as the connection geometry; (iv) Finally, merging the common intersection portion into the original sections of the connected walls to form new sections of them.
The method proposed does not directly divide the basic relationship between the connected walls but forms an overlapping relationship between the connected walls by combining the common intersections. This method not only removes the geometric exception of the connected walls, but more importantly, maintains a high degree of consistency with the wall construction practice, and can better reproduce the complex overlapping relationship between connected walls. VOLUME 8, 2020

A. EXPERIMENT DATA
The experimental data selected in this paper is the CAD data of Zhongbei Music Building of Nanjing Normal University. The Zhongbei Musical Building is a building with a concert hall through multi-stories which is surrounded by ordinary rooms. The real scene and CAD data of the building are shown in Fig. 18. The CAD data is mainly based on the plane drawing, supplemented by the elevation and section drawings.
The original data of CAD is an important factor for the conversion result. Currently, all the methods for extracting building information from CAD data have requirements on the accuracy of the original data. If we happen to encounter CAD data that contains missing data, we need some manual interaction. Manual data preprocessing is required to ensure the quality of the original data.

B. EXPERIMENT PROCEDURE AND RESULTS
In this paper, the following experiment procedure is designed (Fig. 19): Starting from the CAD data, the method of [10] is first used to extract the building elements and building spaces (Fig. 20). Using the method described in [10], we extracted the profile and depth of the building object and they were stored as SoildModel (IfcSolidModel). The method described by [26] is then used to derive the relationships inside the building (Fig. 21). On this basis, the mapping method described in this paper is used to initially map the CAD drawings to the IFC model. The resultant initial model was processed again using the semantic ambiguity elimination constraints developed in this paper to create a final IFC model (constrained IFC model) (Fig.22).

C. DISCUSSION
As a typical 3D model of buildings, support for analysis is a basic function of IFC. Among the mainstream analysis models, the network model is a typical abstraction of the building model [30], [32], [33], which is the basis for many applications such as navigation, evacuation, and airflow simulation inside the building. As an evaluation of the constraints described above, in this discussion we use the analysis of macroscopic network model for evacuation (MNME) [34] to examine if the constraints allow the building information in CAD drawings correctly converted to IFC.   According to the method described by [30], the core of the MNME is the network structure and the associated attributes attached to the network. Therefore, the nodes, arcs, and their associated attributes contained in the network structure are the key for the analysis. The function of the constraints in constructing the MNME will be discussed below.

1) FUNCTION OF CONSTRAINTS WHEN GENERATING NODES
The generation of the nodes of MNME depends on strict hierarchical relationship of building spaces. This is because the MNME maps a single space to a node. To achieve its mapping to nodes, the key is to extract the spaces in each story. If there is no strict hierarchical relationship of building spaces to enforce the relationships among these elements it will be possible to produce incorrect network. Constraint 3 of this paper realizes the limitation of hierarchical relationship of building spaces. According to this constraint, in a conventional building, each building directly aggregate stories, and each story directly aggregates spaces. According to this constraint, the hierarchical relationship of buildings is more distinct, which eliminates the possibility that buildings directly aggregate a single space under normal circumstances, forming a hierarchical relationship of IfcBuilding-IfcStory-IfcSpace.
With this constraint, the hierarchical relationship in the building CAD drawings can be better mapped to the IFC model. In the subsequent generated IFC model, the extraction methods of each single space in the building become more explicit. For example, to extract a single space in the Zhongbei Music Building (Fig. 23), it only needs to firstly extract the story where the room is located according to the IfcRelAggregates relationship. After the story is extracted, the single space can be further extracted according to the IfcRelAggregates relationship with the story. Once the single space is extracted, it can be mapped to a node.

2) FUNCTION OF CONSTRAINTS WHEN GENERATING ARCS
The generation of arcs of the MNME needs to fully consider the affiliation of the through space. For an arc, it is the embodiment of the connection between the building spaces and the problem of through space affiliation cannot be ignored. The constraint 4 described in this paper solves this problem very well. In constrain 4, the through space should be associated with the bottom story using IfcRelAggregates and for the upper story, it should be associated using IfcRelReferencedInSpatialStructure. This distinguishes the relationship between the through space and the building story according to the different conditions of the bottom story and the upper story.
In this way, the generation of the connected network is deterministic. As shown in the figure below, when the node is initially creating, based on the constraint 4 described in this paper, the affiliation of the through space existing in the Zhongbei Music Building is limited (Fig. 24). The relationship between the space and the 1st story is IfcRelAggregates while the relationship between the space and the above stories is IfcRelReferencedInSpatialStructure. It means that the through space connects to the 1st story and does not have a connection relationship with other spaces of the above stories. Then, when the connected network is generated, the two cases can be treated differently. Since the bottom story is associated with the concert hall using IfcRelAggregates, the concert hall will join the generation of the connected network of the bottom story. As the upper stories are associated with the concert hall using IfcRelReferencedInSpatialStructure, the concert hall is excluded from the connected network of these stories. It can be seen from the finally generated network (taking the 1st and 2nd stories as an example) that the concert hall participates in the generation of the network of the bottom story but does not participates in the generation of the network of the upper story (Fig. 25).This avoids the erroneous spatial connectivity between the through space and the spaces in the upper stories.

3) FUNCTION OF CONSTRAINTS WHEN GENERATING ATTRIBUTES
In addition to the network structure itself, the attributes attached to the nodes and arcs are also an important part of the MNME. Attributes such as the area of the nodes,  the passing force and the passing time of the arcs all significantly impact the evacuation results [30]. For example, stairs are passages for connecting stories and are important in evacuation networks. When the stair is mapped to an arc, the passing force and passing time of the arc are actually determined by the width and length of the stair flights of it. In this case, the key issue is how to accurately extract the stair flight from the stair.
In the example of this article, the stair of the Zhongbei Music Building is made up of three sub-elements (Fig. 26). Then, under the limitation of the constraint 2 proposed above, the current way of the stair associating with the geometric information is through the aggregation of the sub-elements. In this case, the IfcRelAggregates relationship is used by the stair to aggregate the stair flights, platforms, and handrails. In this way, the geometric information of the stair flights can be extracted easily. Then, the network of connections between the interior stories of the building can be constructed directly from the geometric information of the stair flights and form a connected network between the stories. Fig. 27 shows the extracted stair flights between different stories of the Zhongbei Music Building. As the width and length can be easily  obtained, the corresponding passing force and passing time can also be calculated from them.
During evacuation, the evacuees, who should move from affected areas to safe zones, need to select the optimal evacuation route that meets various constraints according to updated risks [32]. Therefore, when a fire occurs, evacuees need to dynamically select the escape route based on the spread of the fire.
When simulating the spread of the fire in a certain room of Zhongbei Music Building (marked with a red frame in Fig. 28), it requires to extract the room's physical boundaries. In this case, the ceiling and floor determines the upper and lower surfaces of its physical boundary which play an important role. The constraint 1 of this paper limits the mapping of ceiling and floor to IfcCovering and further sets its type by type enumeration. This clarifies the way of mapping and avoids confusion with IfcSlab, which provides a deterministic way of extracting physical boundaries of nodes.
In addition to Constraint 1, the constraint 7 also contributes to the correctness of the extracted boundary of building spaces. As mentioned above, in the building CAD drawings, the walls are expressed by the center line and the width. This causes a gap exception that generates the wrong boundary. Under the limitation of constraint 7, the connection of the walls no longer contain gaps (in Fig. 28, the positions marked by a red circles are the intersection of the walls without gaps, the position marked by green circle is the position of the column). This also provides the correct model basis for the subsequent analysis of the IFC model.

4) LIMITATIONS OF THE RESEARCH
(1) The method described in this paper is mainly applicable to conversion of CAD construction and design drawings produced by CAD products of AutoDesk to BIM, including plane drawings, elevation drawings, section drawings, and combinations of them based on CAD. In addition, the current research is also applicable to building information extraction of floor plan. Such modeling results can also use the constraint method of this paper when converting to BIM.
(2) This paper mainly focuses on the modeling of the main body of the building. The modeling of utilities and construction processes is not included in the scope of the research.
(3) The minimum granularity studied in this paper is building element. Materials such as bricks, steel bars, concrete, etc. are not involved.
(4) In this research, we adopt the methods in [10] and [26] to realize the data extraction from CAD. If we encounter the CAD data with errors, we need to manually process it first to ensure the correctness of the original data. As the current converting methods of building objects [10]- [26] are relatively mature, in the absence of errors in the CAD data, the correctness of the geometric information of the extracted building objects can be ensured.
(5) Most building elements in a building are regular, and their geometric information are determined by profile and depth. There are also a few irregular building elements that require more special extraction methods. We will study this issue in future works.
(6) At present, there are no relevant metrics to help us automatically detect the quality and accuracy of the converted model. Therefore, the manual comparison method is currently used. Further research will be conducted on this issue in the future.

IV. CONCLUSION
In view of the semantic ambiguity in the conversion from CAD to IFC, based on the analysis of building elements, building spaces, building relationships that can be extracted from building CAD drawings, this paper discussed the semantic ambiguity problem during conversion and presented a set of constraints which can be used to solve the semantic ambiguity.
The conclusions are as follows: (1) During the conversion from CAD to IFC, there is a corresponding semantic ambiguity in the mapping of building objects and building relationships. Failure to resolve it may cause problems in subsequent analysis based on the converted IFC model.
(2) The constraints described in this paper effectively solves the semantic ambiguity during mapping, making the model conversion more certain, and increase the integrity of the original CAD information.
(3) When converting the IFC model to an analysis model, the proposed constraints can make the conversion more accurate and lay a good foundation for subsequent analyses.
CHI ZHANG received the Ph.D. degree in cartography and geography information system from Nanjing Normal University, in 2014. His current research interests on 3D City, BIM, and image processing.
A-XING ZHU received the Ph.D. degree in geography from the University of Toronto, in 1994. His current research interests include spatial prediction and the third law of geography LIANGCHEN ZHOU received the Ph.D. degree in cartography and geography information system from Nanjing Normal University, in 2009. His current research interests on BIM, global discrete grid, and computer vision.
MINGLIANG CHE received the Ph.D. degree in cartography and geography information system from the University of Chinese Academy of Sciences, in 2016. His current research interests on intelligent transportation systems, image processing, and depth learning.
TIAN QIU received the master's degree in cartography and geography information system from Nanjing Normal University, in 2014. His current research interests on CAD and photogrammetry.