scieee AI-readable full text Open interactive document viewer

Automatic rule verification for digital building permits

Arias Vanegas, Juan Sebastian

Abstract

O sector da construção está a enfrentar grandes mudanças nas exigências do cliente e do mercado, empurrando para a transformação digital e para uma indústria orientada para os dados. Os governos tomaram parte ativa nesta mudança, apoiando a digitalização de processos como o das licenças de construção, introduzindo a utilização de modelos de informação de construção (BIM). A investigação sobre a digitalização do licenciamento municipal de construções mostrou grandes avanços no que diz respeito à extração de regras de forma interpretável e à automatização de verificações; contudo, a conciliação entre as definições semânticas do modelo de construção e os conceitos definidos nos regulamentos está ainda em discussão. Além disso, a validação da acuidade das informações incluídas nos modelos de construção relativamente às definições do regulamento é importante para garantir a qualidade ao longo do processo de licença de construção. Esta dissertação visa propor um fluxo de trabalho híbrido para verificar a informação extraída explicitamente do modelo BIM e a informação implicitamente derivada das relações entre elementos, seguindo as disposições contidas nos regulamentos no contexto de Portugal. Com base em alguma revisão de literatura, foi proposto um novo processo, e foi desenvolvido um código Python utilizando a biblioteca IfcOpenshell para apoiar a automatização do processo de verificação, tradicionalmente realizada por técnicos nos gabinetes de licenciamento municipal. Os elementos desenvolvidos neste documento foram comprovados num estudo de caso, demonstrando que a validação híbrida pode ajudar a detetar erros de modelação e melhorar a acuidade da informação durante a apresentação inicial de modelos para um processo de licença de construção. Os resultados indicam que a inclusão de uma validação automática do modelo contra definições regulamentares pode ser introduzida para melhorar o grau de certeza da qualidade da informação contida no Modelo de Informação, além disso, a proposta de métodos que produzem resultados a partir de informação implícita pode alargar as capacidades do esquema IFC. Contudo, os esquemas desenvolvidos neste trabalho estão ainda em constante revisão e desenvolvimento e têm limitações de aplicabilidade em relação a certas classes do IFC.

Full text

Universidade do Minho Escola de Engenharia Juan Sebastian Arias Vanegas Automatic rule verifications for Digital Building Permits September 2022 UMinho | 2022 Juan Sebastian Arias Vanegas Automatic rule verificationss for Digital Building Permits Co-funded by the Erasmus+ Programme of the European Union The European Master in Building Information Modelling is a joint initiative of: Universidade do Minho Escola de Engenharia Juan Sebastian Arias Vanegas Automatic Rule Verification for Digital Building Permits Master Dissertation European Master in Building Information Modelling Work conducted under supervision of: José Luís Duarte Granja September 2022 Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ ii AUTHORSHIP RIGHTS AND CONDITIONS OF USE OF THE WORK BY THIRD PARTIES This is an academic work that can be used by third parties, as long as internationally accepted rules and good practices are respected, particularly in what concerts to author rights and related matters. Therefore, the present work may be used according to the terms of the license shown below. If the user needs permission to make use if this work in conditions that are not part of the licensing mentioned below, he/she should contact the author through the RepositóriUM platform of the University of Minho. License granted to the users of this work Attribution CC BY https://creativecommons.org/licenses/by/4.0/ Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ iii ACKNOWLEDGEMENTS I would like to express my gratitude to all my colleagues in the BIM A+ Master, that have been my company along this amazing journey, to those whom I met in Italy or Portugal and to whom during some exchange of ideas shared a different perspective or new ways to tackle challenges. Especially to Iuri and Fernanda for their companionship and support during this year. Thanks to my supervisor Professor José Granja, for his guidance in the development of this dissertation and his reassuring words and advice when I felt lost or stuck trying to get results. Thanks to Lucas Vieira, for giving me a broader view of the Building Permit subject and share his time to discuss possible approaches to the research and the live in general. All my gratitude to all the professors, tutors, and monitors during the coursework semester, for their patience and their willingness to share their knowledge. As well as the BIM A+ Coordination: Prof. Miguel Azenha and Rita Oliveira, for their support in this year, their disposition to help and mostly for giving me the opportunity to live this experience. Thanks to my family, sending all their support with messages, calls and just for being there in the good and the though days. I deeply thank Natalia for being there all the time, with all her love pushing me to continue despite the distance and the difficulties that came along with the experience in the other side of the world. Lastly, I would like to thank the European Commission and the Erasmus Mundus Joint Masters Program (EMJMD) for their generous funding granting me a full scholarship to attend to this Master, without that support this would never be possible. Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ iv STATEMENT OF INTEGRITY I hereby declare having conducted this academic work with integrity. I confirm that I have not used plagiarism or any form of undue use of information or falsification of results along the process leading to its elaboration. I further declare that I have fully acknowledged the Code of Ethical Conduct of the University of Minho. Juan Sebastian Arias Vanegas Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ v RESUMO O sector da construção está a enfrentar grandes mudanças nas exigências do cliente e do mercado, empurrando para a transformação digital e para uma indústria orientada para os dados. Os governos tomaram parte ativa nesta mudança, apoiando a digitalização de processos como o das licenças de construção, introduzindo a utilização de modelos de informação de construção (BIM). A investigação sobre a digitalização do licenciamento municipal de construções mostrou grandes avanços no que diz respeito à extração de regras de forma interpretável e à automatização de verificações; contudo, a conciliação entre as definições semânticas do modelo de construção e os conceitos definidos nos regulamentos está ainda em discussão. Além disso, a validação da acuidade das informações incluídas nos modelos de construção relativamente às definições do regulamento é importante para garantir a qualidade ao longo do processo de licença de construção. Esta dissertação visa propor um fluxo de trabalho híbrido para verificar a informação extraída explicitamente do modelo BIM e a informação implicitamente derivada das relações entre elementos, seguindo as disposições contidas nos regulamentos no contexto de Portugal. Com base em alguma revisão de literatura, foi proposto um novo processo, e foi desenvolvido um código Python utilizando a biblioteca IfcOpenshell para apoiar a automatização do processo de verificação, tradicionalmente realizada por técnicos nos gabinetes de licenciamento municipal. Os elementos desenvolvidos neste documento foram comprovados num estudo de caso, demonstrando que a validação híbrida pode ajudar a detetar erros de modelação e melhorar a acuidade da informação durante a apresentação inicial de modelos para um processo de licença de construção. Os resultados indicam que a inclusão de uma validação automática do modelo contra definições regulamentares pode ser introduzida para melhorar o grau de certeza da qualidade da informação contida no Modelo de Informação, além disso, a proposta de métodos que produzem resultados a partir de informação implícita pode alargar as capacidades do esquema IFC. Contudo, os esquemas desenvolvidos neste trabalho estão ainda em constante revisão e desenvolvimento e têm limitações de aplicabilidade em relação a certas classes do IFC. Palavras chave: BIM, Extracção de Dados, Licença de Construção Digital, IfcOpenshell, Verificação de Regras Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ vi ABSTRACT The construction sector is facing major changes in the client and market requirements, pushing towards the digital transformation and a data driven industry. Governments have taken an active part in this change by supporting the digitalization of processes such as the one for building permits by introducing the use of building information models (BIM). The research on the digitalization of the building permit has shown great advancements in regarding the rule extraction in interpretable ways and the automation of the verification; however, the conciliation between the building model semantic definitions and the concepts defined in the regulations is still in discussion. Moreover, the validation of the correctness of the information included in building models regarding the regulation definitions is important to guarantee the quality along the digital building permit process. This dissertation aims to propose a hybrid workflow to check the information extracted explicitly from the BIM model and the information implicitly derived from relationships between elements by following the provisions contained in the regulations in the context of Portugal. Based on some context and literature review, a process reengineering was proposed, and a Python code was developed using the IfcOpenShell library to support the automation of the verification process, traditionally carried out by technicians in the building permit offices. The elements developed in this document were proven in a case-study, demonstrating that the hybrid validation can help to detect modelling errors and improve the certainty of correctness of information during the initial submission of models for a building permit process. The results indicate that the inclusion of an automated validation of the model against regulation definitions can be introduced to improve the degree of certainty of the quality of the information contained in the Building Information Model, moreover the proposal of methods that produce results from implicit information can extend the capabilities of the IFC schema. However, the scripts developed in this work are still under constant review and development and have limitations of applicability in relation to certain IFC classes. Keywords: BIM, Data Extraction, Digital Building Permit, IfcOpenShell, Rule Verification Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ vii TABLE OF CONTENTS  1.INTRODUCTION ............................................................................................................. 11 2.FRAMING THE DIGITAL BUILDING PERMIT .......................................................... 13 2.1.DIGITALIZATION OF CONSTRUCTION INDUSTRY ....................................................13 2.2.OPENSOURCE, INTEROPERABILITY AND IFC .............................................................16 2.3.BUILDING PERMITS ...........................................................................................................18 2.4.DIGITAL BUILDING PERMITS ..........................................................................................20 2.5.DIGITAL BUILDING PERMIT PROCESS .........................................................................21 2.5.1.Rule interpretation and digitization ................................................................................22 2.5.2.BIM Modelling and IFC export......................................................................................23 2.5.3.Application Review (Formal) .........................................................................................24 2.6.STUDY CASES OF IFC BASED AUTOMATED SEMANTIC VERIFICATIONS ...........24 2.7.HYBRID VERIFICATIONS FOR DIGITAL BUILDING PERMIT ....................................25 3.METHODOLOGY ............................................................................................................ 27 4.INFORMATION REQUIREMENTS ............................................................................... 31 4.1.REQUIREMENTS FROM THE MUNICIPALITIES: ..........................................................31 4.1.1.Instituto Nacional de Estatística – INE Requirements ...................................................31 4.1.2.Summary schedule (Quadro Sinóptico) .........................................................................33 4.1.3.Summary of Information requirements from Municipalities .........................................34 4.2.REQUIREMENTS FOR A BIM INTEGRATED WORKFLOW .........................................36 5.VERIFICATION PROCESS PROPOSED ....................................................................... 43 5.1.TRADITIONAL EXTRACTION AND VALIDATION PROCESS (AS-IS PROCESS) .....43 5.2.PROPOSED BIM INTEGRATED WORKFLOW (TO-BE PROCESS) ...............................45 5.2.1.Methods to extract information requirements in relation with IFC ................................47 5.2.2.Algorithm definition for Data extraction and verification of correctness - Implementation 51 5.2.3.Modelling Specification Requirements and Recommendations .....................................70 6.CASE STUDY .................................................................................................................. 75 6.1.RESULTS ..............................................................................................................................78 6.1.1.Extraction of Information ...............................................................................................78 6.1.2.Validation of information ...............................................................................................79 6.2.RESULTS ANALYSIS ..........................................................................................................83 6.3.LIMITATIONS: .....................................................................................................................84 7.CONCLUSIONS ............................................................................................................... 87 8.REFERENCES .................................................................................................................. 89 LIST OF ACRONYMS AND ABBREVIATIONS ................................................................. 92 Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ viii APPENDICES ......................................................................................................................... 93 APPENDIX 1: INE Q3 FORM ......................................................................................................... 93 APPENDIX 2: “QUADRO SINÓPTICO” ........................................................................................ 96 APPENDIX 3: AREA REPRESENTATION DRAWINGS ............................................................. 99 Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 15 example, the traditional process deals with many steps that require manual input either from the applicant or the municipalities to classify the project. New technologies have been introduced into the sector from which the most notorious are Building Information Modelling (BIM) or management, additive manufacturing, robotization, drones, 3D scanning, the use of sensors and Internet of Things (IoT) where the Information management related to digital models act as a link to connect and potentiate the other technologies to also improve these manual and paper based processes. (Etminan et al., 2019; Naumanen, 2019). Building Information Modelling (BIM) is defined in the standard ISO 19650-1:2018 as the “Use of a shared digital representation of a built asset to facilitate design, construction and operation processes to form a reliable basis for decisions”; This definition focuses in the use of a model as a tool to support the decisions along the asset lifecycle but does not relate to the digitalization process in which the workflow to deliver the building is also affected and adapted to the inclusion of the digital model in a two way relationship: The model provides the information necessary to ease the workflow but then the processes also get modified to accommodate to the new inputs and requirements. Other definitions refer to a method to plan and access the information in a single source, lacking of the overall integrative applicability and use of the digital models and relating more to the digitization of the information of the model to a common environment (Schober et al., 2017). According to the definition proposed by the BIM dictionary4, BIM is a term in constant evolution that refers to “A set of technologies, processes and policies enabling multiple stakeholders to collaboratively design, construct and operate a Facility in virtual space” (BIMe Initiative, 2019). This definition focuses on the integration of innovation and the adaptation of business models through the whole lifecycle of the project referring to the digitalization process. And, although the definition is prone to changes over time due to the technological advancements and the mix of different innovations, this is a more holistic approach that relates better to the impacts in the construction market and the industry in general. The information is stored in smart objects that represent real life elements based on a meaningful definition that allows its description in terms of attributes and relationships (i.e, a Wallrelated to the agreed concept of what a wall iswhich is 2 meters high -the attribute-). The BIM models then work as databases including information of sets of objects that are interrelated and enriched with attributes and usually with parametric behavior derived from the manipulation of the attributes by a user. The parametrization and the use of the databases allows to analyze and shape the information for different purposes along the lifecycle of the asset. Several levels of optimization and iterations can be carried out along the different phases with the model anticipating issues and errors in early stages of the project. The aim of the use of these new technologies is to lower the costs of production, increasing the productivity, avoid miscommunications and inaccuracies and generating new business models while also contributing to the sustainability of the sector and the new demands of the clients and the market (Naumanen, 2019). Some of the drivers identified in the ECSO Analytical report also point to the 4 https://bimdictionary.com/en/building-information-modelling/2 Accessed on August 19, 2022 Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 16 involvement of companies following market drivers such as the European and national regulations, the reduction of the administrative burden and even the corporate social responsibility (European Construction Sector Observatory, 2021). However, even when most of the companies acknowledged the importance of these aspects, there are some important challenges for Small and Medium Enterprises (SME) which represent most of the industry. Usually, these companies have limited resources to invest and promote research and development while handling with a very phase specific knowledge in the industry value chain. Some strategies to enable the access to the integration of the new technologies is the creation of hubs and the participation among larger stakeholders and governments in the experimentation, testing and implementation by sharing its expertise and know-how to the ecosystem (Etminan et al., 2019). To allow the integration of different stakeholders through one environment, foment an effective communication, gaining access to most of the information properly, and reducing the industry fragmentation, the standardization of data and the interoperability between different data systems are two important conditions to guarantee. It is also responsibility of the rule-makers and the governmental institutions to promote the use of an agreed, standardized language for regulations across the institutions. The Industry Foundation Classes (IFC) format is one of the most relevant initiatives towards the standardization in the construction sector. 2.2. OpenSource, Interoperability and IFC The Industry Foundation Classes (IFC) is a protocol defined by Building Smart International (bSI) as “A standardized, digital description of the built asset industry”5, the standard defined in the ISO 16739- 1:2018 describes a data schema and an exchange file format for the built environment. It is a holistic approach that aims to enable the description of the building in a machine-interpretable way establishing the concepts and definitions of the elements, codifying its semantics or meaning, their attributes or properties, the way they interact with each other through relationships, including also abstract concepts such as the performance, the process to achieve the final built element and even the stakeholders that intervene or are related to it. The specification of the concepts is represented with the EXPRESS schema6 that enables the representation of a product while linking reference data that describes the element. The use of a standard schema allows the exchange of information in a vendor-neutral format, enhancing the interoperability for different hardware and software systems regardless of the solution chosen. The usage of the format fulfills multiple purposes opposed as the traditional paper method or the computeraided systems which usually serve to only one purpose. The structure of the format enables the storage of valuable information associated to elements, for further analysis and use with computer systems allowing multiple stakeholders to get access to the information contained and reuse it through the time while permitting the integration with other information systems as presented by Noardo et al. (2021b). 5 https://www.buildingsmart.org/standards/bsi-standards/industry-foundation-classes/ Accessed 20 August 2022 6 https://www.en-standard.eu/iso-10303-11-industrial-automation-systems-and-integration-product-data-representation-and-exchange-part- 11-description-methods-the-express-language-reference-manual/ Accessed on 20 August 2022 Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 17 All the concepts defined in the data schema follow a hierarchical semantic structure that forms an ontology. The data schema defines the elements based in a four-layer architecture: A Resource Layer, a Core Layer, an Interoperability Layer and a Domain layer. The resource layer contains supporting data that helps to describe and characterize other definitions, within this layer the definition of units or geometries can be referenced to describe the attributes of other concepts. The Core layer is the most general layer covering definitions of the most abstract concepts in the schema; relates to the concept of products, controls and processes while also establishing the general constructs to understand the semantical meaning: Define Objects, properties and relationships in a general way that can later be used to specify elements by pointing to other elements or adding levels of meaning definition inheriting to narrower and more specialized concepts. The interoperability layer and the Domain layer contain the definition of more specific concepts related to several disciplines or that belongs to the domain of a discipline. The understanding of the structure of the schema helps to understand the relationships between entities to decompose and manipulate the files and extract the information effectively. To define a concept, the layers of the architecture are used from the most general until reaching the level of desired specificity. The most general concepts define the object based on certain attributes and inherit them to more specific and accurate descriptions while moving to higher layers defined in sub domains as shown in Fig. 27. Each of these steps into a more specific layer require new attributes for a better definition of the concept. The object is defined when it fulfills the requirements specified in the schema for its class. A specific subset of information might be necessary to fulfill a specific purpose, the Model View Definition (MVD) serves to this idea by defining the data required in certain workflows during the project’s lifecycle whilst Information Delivery Spacification (IDS) allow to determine the requirements in a machine-readable way. The information requirements are specified by the clients or in standardized processes by the Information Delivery Manuals (IDM) and may vary along the phases of the project, as 7 https://standards.buildingsmart.org/IFC/RELEASE/IFC4/ADD2/HTML/schema/ifcsharedbldgelements/lexical/ifcslab.htm Accessed 20 August 2022 Fig. 2. Inheritance tree diagram of a Slab element in IFC 4 Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 18 well as the entities from the schema required and the extent or specificity of its attributes. The MVD is a standard to be implemented in software to translate the requirements into a computer-interpretable way and extract the necessary information from the IFC-STEP database. The standardization of these requirements and the data sets requested enable the possibility of automation and optimization of processes that require high effort and consume time in the construction industry. One of the milestones in the project’s lifecycle that due its rule-based nature and the possibility of standardization is the building permit process that is established by public authorities and requires big efforts from technicians to verify and approve. 2.3. Building Permits The building permits are authorizations to build a project, they are granted by the authorities once the compliance with certain regulations have been checked and validated. The regulations require the general conditions to be provided in a project to guarantee the quality of the buildings in terms of safety, health, sustainability, and accessibility among others. The process to grant a building permit require the alignment of a control system where technicians get access to the project information and can follow certain criteria to approve or deny its authorization to be built. In the European context, there is no standardization in the type of procedures, the overall regulation, or terms among the state members. As portraited by Pedro et al. (2010), the regulatory provision part of the building permit system may vary from country to country regarding characteristics like the authority in charge of the regulation which can be central, regional or local, the set of documents that establish the regulations which can vary from a set of separated documents to one single document, and the classification of the technical requirements that can vary from prescriptive to performance based to functional requirements. Regarding the procedural part of the building permit system between the EU countries, some disparities are also unveiled. The main differences appear with type of procedures for projects that apply by country; among the most common there are: projects that are exempted from the building permit, projects that require notification of the works and projects with regular requirement of a building permit to start the works; however, there may exist more or less procedures for specific cases. Similarly, for the plan approval and the information that is checked upon submittal, there exist differences between the countries; regarding aesthetics, space standards and technical requirements depending on the complexity of the project (Pedro et al., 2011). The differences described upon a comparison between the building permit procedures in all the countries in the European Union carried out by Pedro et al. (2011), may become barriers against the free circulation of services in the European market, where the stakeholders can be limited by specific regulations or different procedures constraining the service providers to stay in a national market. Even in the national context, differences amongst municipalities and unclear use of terms and ambiguity of rules may cause issues in the interpretation for validation, where the process gets more complex and can take longer times, or due to the ambiguity of the regulations, and the reliability in experts criteria be prompt to subjective opinions and corruption (Sedlenieks, 2004). These risks require more transparent and objective methods in the Building permit process, along the normalization of rules to reduce the Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 19 ambiguity that lead to errors and to improve the efficiency of the municipalities in the management of building projects (Costa et al., 2020). Building Permit in Portugal The regulatory environment for construction standards in Portugal is complex and have undergone major modifications over the last three decades. The regulations defined as “Normas Técnicas de Construção” (NTC), are the minimum requirements for a building to grant safety, comfort, and sustainable conditions for their occupants. Many of the regulations are result of the integration of European directives and the specialization of fields that were part of broader mandates. There are three levels of applicability of the Portuguese regulations: National, Regional and Municipal, being the regional ones only applicable to the autonomic regions of Açores and Madeira. The National regulations are based on the Regulamento Geral das Edificações Urbanas (RGEU) and are complemented by specific regulations appliable for certain sub sectors of the industry. These regulations establish a base line to develop projects and enables the management and a high-level decision-making. In this document, the requirements of information for the statistics institute as a national entity are studied as part of the Building Permit process and required by the Decreto-Lei N. 555/99 that defines the legal regime for urbanization and construction8. On the other hand, the municipal regulations are complementary and apply only on certain jurisdictions of the territory according to the Regulamentos Municipais de Urbanização e Edificação (RMUE) that respond to local conditions and allow certain variations between communities. The Plano Diretor Municipal of Vila Nova de Gaia is an example of this type of regulations defining a guide for the territory development but appliable only to the extent of the municipality; this regulation establishes the rules to be followed and verified for every potential project The responsibilities regarding the definition of the regulations may vary depending on the extents of their applicability but correspond to different governmental entities. As pointed by the building regulations are fragmented because the initiatives for a new regulation come from different ministries that propose them from their area of responsibility, not necessarily consulting other ministries and initiatives, resulting in uncoordinated regulations as pointed by Branco Pedro et al., (2009) in a complete review of the Portuguese building regulation system. In addition, the development of different regulations depending on the municipal scale, generates issues related to the definition and use of terms to refer to different concepts and to the interpretation of the rules. This multiplicity of approaches does not allow the standardization as there is no single source of truth and would require big efforts towards a coordination with the construction’s regulatory system as in the process proposed by Pedro and Campos, (2015) where is suggested a compilation, classification harmonization, compatibilization and reorganization of the existing regulations. The overall procedure in Portugal is described in terms of many characteristics as presented by Pedro et al., (2011): The procedure contemplates only three types of procedures: One for projects that are exempted from the building permit, one for the ones that require building notice or notification to the 8 https://dre.pt/dre/legislacao-consolidada/decreto-lei/1999-34567875 Accessed on August 21, 2022 Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 20 authorities but not explicit permit to start the works and lastly the regular building permit procedure. The pre-consultations to clarify requirements for a project are common but voluntarily opposite to certain countries where it is mandatory. There is only one procedure for planning permit and building permit which combines the requirements in only one set of documents. The criteria checked may include the compliance with some document submittal requirements, zoning requirements, some aesthetic requirements that may vary between municipalities and some technical requirements regarding space standards but with the possibility to be extended to other specialties linked to a liability declaration from the designers. The digitalization of the building permit process and the use of data structures is a good opportunity to be more efficient, and to support the purpose of harmonization mentioned before. All the conditions described before in the qualification of the procedure and regulatory system in Portugal are subject to improvement under principles of standardization, digitization, harmonization brought by the innovations of the digital advancement. The new technologies such as BIM enable the use of common standardized concepts, a common language, a new way of structuring and accessing the information, interpreting the rules, and verifying of its compliance. This approach can potentially respond to the new demands of the market, the more rigorous standards and the accuracy required to guarantee the conditions established in the regulations. 2.4. Digital Building Permits The advancements in technology and the fast-paced environment of construction industry have accelerated and boosted the way in which the building permit process have been carried out. As presented before, the building permits rely in regulations and rules usually interpretated and validated by domainexperts in a time-consuming process. The digitalization of the industry has introduced new workflows to traditional processes to handle the amount of information that is being generated during the building lifecycle with data-rich models in BIM Applications, reducing times, errors and contributing to the quality of design while facing the more demanding requirements in building codes and safety regulations (H. Lee et al., 2016). However, the industry still faces many challenges in the implementation in building permit offices due to the complexity of a new data driven building permit system, the lack of awareness of the new technologies and incompatible organizational culture to an organizational level, and even socioenvironmental factors where a legal frame for these new technologies is not clearly defined but there is big pressure for the digital transformation from the stakeholders (Ullah et al., 2022). With governmental initiatives toward the digitalization and the Directive 2014/24/EU of the European council on public procurement that includes the acceptance of building information electronic models as a mean of communication that might be required for public works, the mobilization towards the digitalization in public workflows and many of the ones regarding BIM were prioritized. One of the potential fields of improvement with the automation and the use of data embedded in 3D digital models is the verification of rules for building permits, that depend on the writing and interpretation of people. The unexpected and varying results due to the inhomogeneity of the regulations lead to research over the logical structure of the rules and its representation in relation with the representation of building Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 21 concepts, through drawings and then upon the development of the Industry Foundation Classes, with the building model (Eastman et al., 2009). The homogenization and normalization of the verifications are motivating the transition to a digital environment, in the case of Portugal for example, the proposal of a common strategic vision that integrates processes, technologies, people and the standards is seen as the way to reduce the complexity of the work for both building permit technician and applicants while having great impacts in the functions of the municipalities (Autarquías) as presented by Costa et al., (2020) even with initiatives for the normalization for BIM objects (CT197-BIM). Many initiatives have been launched worldwide providing great results such as CORENET9 in Singapore, presenting a E-permit platform that allows the submission of BIM models for building permit compliance checking, KBIM in Korea (Kim et al., 2019, 2020) that provides a series of modules for rule translation based on Natural Language Processing logic, and assessment of rule compliance; the HITOS project in Norway based in dRofus or the SMARTCodes in United States.(Eastman et al., 2009) Extensive research has been carried out regarding the ways to digitize the building permit process and reduce the uncertainty and the effects of human error. Initiatives like the European Network for Digital Permits (EUnet4DBP)10 appeared, founded by researchers and different actors with a shared interest in the development of a strategy towards the digitalization of the building permit process. The community is based in three pillars: To improve the process, to formulate criteria and guidelines to define the rules and requirements (including the model preparation and the verification of correctness that is reviewed in this document), and finally to highlight and research the technology necessary to implement the ruling and processes (Noardo et al., 2020a). Understanding the workflow of the building permit process allows the identification of potential improvements while getting a better understanding of the different outcomes expected and leverage points that might add value to the stakeholders. The digitization of the inputs and outputs of the process might be approached from several perspectives as presented next. 2.5. Digital Building Permit Process The building rule checking process is defined by Eastman et al. (2009) in a set of four steps including the interpretation of the rules, then the preparation of the information container, the actual rule checking and then the reporting. This workflow is adequate for automating checking of rules but it misses some important milestones in the overall process of the building permit. Noardo et al., (2022) present a more inclusive workflow that also considers the stakeholders involved as authorities and applicants as shown in the Fig. 3 focusing not only on the rules and its automation but also in the sub processes that may require intervention of different actors or the processing of different sources of data. This paper presents a comprehensive literature review regarding the digital building permit and is used as reference and roadmap throughout the development of this document. Some of the steps presented in the schema require the integration of GIS information and are out of the scope of this dissertation, hence, the 9 https://www.corenet.gov.sg/general/building-information-modeling-(bim)-e-submission.aspx Accessed on 8 September 2022 10 https://3d.bk.tudelft.nl/projects/eunet4dbp/about.html Accessed 23rd August 2022 Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 22 literature review was focused on the rule interpretation from the existing regulations and their digitization (Step 1), The BIM modeling requirements and the guidelines to export IFC files (Step 4) and the application formal review in terms of contents and completeness of the information delivered (Step 5). 2.5.1. Rule interpretation and digitization One of the most studied subjects is the rule interpretation and digitization, the extent of research goes from the classification of rules to the identification of the logic to implement to the formalization of the building codes in a computer interpretable way. The interpretation of the building code and the implicit or explicit requirements contained in it requires methods to classify the provisions. Solihin and Eastman (2015), propose a four-level classification of rules depending on its complexity, from the information being explicitly defined in the BIM models to information derived from complex processing of information and proof of solution. While useful to understand the complexity of building codes, this approach does not include external factors that may vary the complexity of a rule, for example, the work of modelers. It can change the complexity of a rule that can be derived from the model to a rule that is explicitly modelled or the use of the approaches to validate the models. The formulation of the regulations in a computer interpretable way is also reviewed by many authors showcasing advantages and disadvantages from their approaches. Macit İlal and Günaydın, (2017) propose a four level structure to represent the rules from a general structure of the building codes to the domain level, allowing the modification and specification to non-programming expert profiles. (Hjelseth and Nisbet, 2011, 2010) propose the RASE methodology, (Requirements, Applicability, Selection and Exception) to semantically define the rules in a regulation, however, this approach applies mainly to explicit requirements and to 1-to-1 relationships. (Recski et al., 2021) present a system for extracting formal rules using semantic parsing while applying reasoning logic to output a set of machineinterpretable rules; this approach also provides open-source tools to apply to different types of regulations but doesn’t establish a way to pair with the concepts defined in the BIM formats. Regarding this last issue, there have been some approaches that also integrate the IFC definitions with the extracted rules. Beach and Rezgui, (2018) propose an ontology-based approach to determine the regulations using the RASE methodology to define the semantics in the requirements and then a manual mapping into the BIM domain definitions by users that are not expert in programming even using IfcOWL to present the semantics derived from the mapping. Zhang and El-Gohary (2017, 2015) define a methodology for Automated Compliance Checking (ACC), but most importantly they define an Fig. 3. DBP workflow from Noardo et al. 2022 Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 23 approach for each of the steps of the norm, the transcription to Machine Readable Language (Semantic Natural Languages) and then the interpretation of the information of BIM models via EXPRESS language where in an intermediate step is defined using semantic logic reasoning software. There is no absolute nor right approach to the definition of the rules in the building codes, nevertheless, the use of semantic logic and the automation of the rule extraction as well as the compatibilization with the concepts defined in IFC serves as a basis for the automatic verification for Digital Building Permits. The classification of rules and the extraction of data requirements as expressed by Solihin and Eastman (2015) allows a better understanding of the complexities developed later in this document for the extraction of implicit (Derived) information and the semantic definitions will enhance the understanding of integration of the extracted information to the Building Permit System. 2.5.2. BIM Modelling and IFC export The research in this step is focused mostly to the extraction of the information from the BIM model and the modelling practices for certain uses. Since many of the BIM models are developed by using different authoring tools and proprietary software, the approaches regarding the modelling may vary depending on the tool chosen and the purposes of the model. Some free-use initiatives as freeCAD11 and BlenderBIM12 allow the native IFC modelling instead of the translation from a proprietary ontology into the interoperability format. The extraction and assessment of the information contained in the model, is an important step towards the correct verification of rules in a further step. Since the information required is sometimes less than the information extracted, the definition of the right subset of information is necessary to reduce errors caused by the excess of information with definitions and extra concepts not necessary for the validation. Dhillon et al., (2014), for example propose a Java-based parser tool that inputs IFC files and outputs the information in form of tables and includes some methods to extend the information contained in the IFC file through geometric methods. Deng et al., (2020) Proposes a selection set method the Partial Model Extraction based on the Selection Set (PMESS) to extract subsets of information by applying rules integrating types, properties, attributes and even the relationships included in the IFC schema, the definition of three classes of rules in Extensive Markup Language (XML). Lee et al., (2018) and Y. C. Lee et al., (2016) Define an approximation to the conciliation of the requirements specification in the information delivery Manual (IDM) and the Model View Definition (MVD) through an ontological data model with the Web Ontology Language, reducing the gaps and re process to define the exchange of information. The use of logic rules in Semantic Web Rule Language (SWRL) and ontologies (IfcOwl) provides more flexibility with the modularization and maintainability of the model views and enhancing the interoperability between systems and semantic definitions even with inferred concepts not explicitly defined in the IFC schema (Farias et al., 2018). These approaches can be related to the undergoing development of the Information Delivery Specification (IDS) by Building Smart International. Regarding the potentialities and the real use of IFC for verifications, Noardo et al., (2021a) provides a qualification of the interoperability level reached by several BIM tools with the IFC schema, analyzed 11 https://www.freecadweb.org/features.php Accessed August 25, 2022 12 https://blenderbim.org/ Accessed August 25, 2022 Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 24 in the context of the GeoBIM benchmark unveiling possible leverage points for improvement between the implementation in different software solutions, raising awareness of possible issues when exporting. The issues reported may affect the correct workflow of the validations and must be considered for the implementation of new solutions; although the results are heterogeneous and don’t represent a clear trend that could point the most effective way to improve the schema. 2.5.3. Application Review (Formal) The correctness of the model and the quality of the information is important to fulfill the purpose defined for the information exchanges. Current research documents focus on the quality compliance with standards like the IFC schema and the previous validation before the building permit submittal, as well as the description of possible issues and solutions facing the quality of IFC models. Noardo et al., (2022b, 2021b) present some study cases that are carried out to extract the information for building permits with IFC models from the architectural practice. The bottom-up approach identifies the most frequent issues for the verification based on IFC, possible solutions and then proposes the use of a tool (GEO_BIM Tool) for validation of the models in terms of semantics and geometries. Ciribini et al., (2016) present a case study of the use of BIM for the design and construction phases in Italy; in their research they translated the regulations for residential buildings using the RASE methodology and then implemented the validation of compliance in a semi-automated way by using Solibri Model Checker (SMC). Although effective, the approach of Ciribini et al. (2016) relies in a non-open-source tool which would represent a challenge for implementation and would constrain the scalability of the solution to other stakeholders; on the other hand, Noardo et al (2022b), present a modular and structured way to check and validate the building that allows the extension and adaptation to specific contexts while implementable for multiple interested parties and open sourced. From the perspective of the quality verification that could guarantee results with correct information, Solihin et al., (2015) presents an approach to the quality assurance of the IFC models in terms of a multidimensional quality approach (that refers to completeness, correctness, meaningfulness, conformance, and no ambiguity). In their study, the specification of quality rules and a series of tests to be performed are suggested to measure the quality of the model establishing a framework that might include external references to support the assessment and for comparison between the source and the output. This solution refers to a general solution for quality of the IFC files according to the semantic definitions leaving place to further developments for the implementation of the concepts presented. 2.6. Study cases of IFC based automated semantic verifications There have been many developments regarding the validation integrating the concepts mentioned before, in this subchapter, some works related to the verification of rules and meanings is presented. Villaschi et al., (2022) propose a validation of Brazilian regulations in a case study. The implementation is carried out in Autodesk Revit with Dynamo as support programming tool and python coding to extract the information and validate the information according to the requirements. However, this approach is still dependent on the use of proprietary software and even when it has some Python code, it is not fully open-source depending on dynamo and Revit definitions to . Santos, (2021) presents a complete framework that integrates the classification of regulations in definitions and provisions, and then going deeper defining the rules as codifiable, objective, or subjective. Then creates a code for each of the Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 31 4. INFORMATION REQUIREMENTS 4.1. Requirements from the municipalities: The Information required at the initial stage of submittal and file generation is defined by the file forms that must be delivered along the technical documentation. These forms can vary in the number of fields and type of information required depending on the entity requiring the data which can be a local, regional, or national authority (Pedro et al., 2010). As a national authority, the National Institute of Statistics (Instituto Nacional de Estatística -INE in Portuguese) through the form Q3 “INQUÉRITO AOS PROJETOS DE OBRAS DE EDIFICAÇÃO E DEMOLIÇÃO DE EDIFÍCIOS” gathers data relevant for the identification and quantification of the building activity across the country whereas the local permit office, requires information to identify the project, manage its compliance with the regulation codes and keep a record. In this section, the required information is recognized across both stakeholders and the common fields are identified to prioritize ways of automatically extract the data from the BIM model. 4.1.1. Instituto Nacional de Estatística – INE Requirements The National Institute of Statistics has the purpose of “producing in an independent and impartial way, quality official statistical information, relevant for society, promoting the coordination, analysis, innovation, divulgation of the national statistical activity, guaranteeing the integrated data storage” (INE. 2022) understanding the statistical information as a tool for decision making and in the case of building activity, also a tool for urban planning. Following that goal, the INE under the faculties of the law that establish the National Service of Statistics (SEN) demands to the permit offices, information regarding the construction works in the “INQUÉRITO AOS PROJETOS DE OBRAS DE EDIFICAÇÃO E DEMOLIÇÃO DE EDIFÍCIOS” including new construction, modification and demolition works (Annex 1). For identification purposes, the form provided by the INE requires to define the administrative act that will grant the permit, the project promoter or promoting company, the type of regulations that applies to the project, the plot classification, the type of works, any possible observation regarding the building, and the person responsible for the information included in the form. Depending on the type of works some extra data is required in the different annexes identifying, in the case of a new construction: The schedule, then the location of the building including the coordinates according to a reference system, and the building characteristics. Each one of these requirements is related to the internal codification of the INE’s databases. The fields act like a dictionary where each key (field) can be related to one value (content) making easier to store and retrieve and use the data from the databases. The key can either be the INE code or the field name as shown in the Fig. 5. Parts of the INE form fields The identification and characterization of the building works in the section J and K of the form respectively are of high relevance since the data stored in this section feeds the construction activity statistics developed by the INE and serves for the classification of the file as well for future planning purposes. For this reason, the works in this research will be addressed to get this data by extraction Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 32 procedures and then to its verification to check its correctness helping the permit officials on their daily task and to make the overall process more effective. Section J of the form focuses on the identification and location of the building by requesting infromartion regarding the type of work, number of the building, type of street, and overall address of the building including the zip code, city zone in the fields labeled from J.1 through J.14 and the building coordinates in the field J.15. Section K of the form recovers the data for the characterization of the building. The form requires the use of the construction project in K.1 whilst K.2 relates to the building footprint area and the ocupation of built area in the plot including uncovered circulation and parkings. As shown in the Fig. 6, K.3 to K.5 qualify the project in terms of the gross areas by use, the usable area, and rentable area; this information has a high value in terms of quantification of the size of the construction industry. Then more into the volumetric characteristics of the building, K.6 relates to the building volume and K.7 determines if the building is going to be used for housing purposes and then K.8 and K.9 define the height of the structure in floors and measurements respectively. Finally K.10, K..11 and K.12 refers to the number of units in the building, the number of shared units and the number of parkings that compose the project while the points K.13 through K.16 refers to the type of dwellings and its number, the type of infrastructure and the areas per dwelling. Most of the fields required in the form such as the ones from the section J, expect lines of text that can be translated as strings in any programming language, which can be included within the BIM model with the use of custom datasets by defining a parameter and mapping it properly to the output IFC file. Nevertheless, some other fields require information that can explicitly be extracted from an entity within the schema but also can be implicitly included in the model geometries or require performance of certain operations with the available information to get like the areas in the section K that can be extracted from the entity dataset if correctly modelled as suggested by Alattas et al. (2021), or from the boundary geometries (faces or shapes) as described by Lilis et al. (2017a). Further in this document both approaches are assessed and tested to apply to the study case Fig. 5. Parts of the INE form fields Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 33 4.1.2. Summary schedule (Quadro Sinóptico) Besides the data required by the INE, each local authority can request information to the responsible of the submittal to improve the management of the projects and identify them quickly. In the case of the permit office of Vila Nova de Gaia, the “Quadro Sinóptico” is the tool used to gather the data to classify and as a brief to characterize the project file. In a similar way to the Q3 form of INE, this form is separated in sections from A to D, but unlike the previously described form, there is no standard about the information to be filled and it can vary from city to city. The contents of the sections described next show some similarities with the previous form. Section A defines the building works first requesting the information regarding the type of works to be executed, the extents of the works (that may apply to the whole building or just to some zones), the estimated budget, and the works estimated schedule. Section A presented in the Fig. 7 describes some of the physical characteristics of the proposed project including the plot area, the building footprint area, the exterior areas, the exterior built areas, the length of the enclosing plot walls, the setback areas, number of floors above and below the ground floor, the façade height, and the total height of the building, and finally the parking places. There is a second part in section A, which relates to the uses for the proposed building where for each of the possible land uses (residential, tourism, urban equipment, commerce, and services) the number of proposed units must be described, and the areas quantified and reported. Fig. 6. INE Requirements according to uses Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 34 Sections B and C relate to building projects with specific uses and equipment for gas provision for vehicles and car washes also including a subsection in case of demolition works for section C. Section D contains blank fields for additional requirements or relevant data to other legal and code rules that may be applicable to the project. 4.1.3. Summary of Information requirements from Municipalities After the revision of the information requirements provided by the INE and the permit office for submittal stage of an application to a building permit, the common fields are identified in both forms were classified as qualitative information in attribute fields and quantitative fields as follows: The qualitative information define attributes of the project itself and these attributes can be used as label for its classification; examples of these attributes are the project address, the owner’s name, zip code, etc. On the other hand, there are fields that refer to quantitative data and require an underlying logic and algorithms so the information can be composed and then extracted; these fields require specific methods defined in the regulations for its correct measurement that is subject to verification and validation to check its correctness and consistency by the building permit officer. Examples of the latter are the different definitions of areas as specified by both forms such as the Building Footprint Area (Área de implantação do Edifício), the gross building area (Área Bruta de Construção do edificio) among others. Each of this fields refer to a meaning with an underlying procedure for its measurement and that requires the same logic for its verification. From the fields identified in the forms and classified according to the previous criteria, the ones presented next were chosen as a subset of the requirements. Although most of the fields requested by the authorities can be included in a BIM framework for automatic validation of the information, the ones Fig. 7. Section A. Quadro Sinóptico - Vila Nova de Gaia Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 35 presented here work as a sample of how by using Open-source technologies, the data included explicitly by the modeler or implicitly in the models can be extracted for assessment purposes. The fields are presented with the meaning provided in the regulation “Plan Diretor Municipal de Vila Nova de Gaia” defining some semantic concepts to be mapped and reproduced from the BIM files later. The scope of the current work was intentionally reduced considering time constraints. 4.1.3.1. Attribute fields: Although fields like the address, zip code, type of structure and zip zone can be included in the requirements and have its extraction automatized from an IFC file, that information is still being required manually in the form and may cause duplicity when sent to a database. Nevertheless, for testing purposes, within the selected information requirements, some of these attributes have been included as follows:  “Tipo de Obra”: Requires the type of work that will be executed.  “Âmbito de Intervenção”: Defines the scope of works, each municipality must define the list of possible values that this field can store as an enumerators or lists. Any value that is not contained in the list approved by the municipality, should be considered as invalid.  “Estimativa de custo de obra”: Estimated budget of works, according with the average reference per square meter estimated by the Portuguese Federation of the Construction industry and public works (GAIURB EM, 2020).  “Prazo de execução de obra”: Defines the estimated time of works. 4.1.3.2. Quantitative fields Among the fields that require following a set of steps and rules defined by the municipalities or other entities to calculate the values to be included, the following are selected as a formal information requirement with the corresponding definitions extracted from the PDM of Vila Nova de Gaia (Gaiurb,EEM, 2009). The definition in Portuguese is presented along with a translation carried out by the author extracting only key elements; these elements require validation and agreement by experts before the usage in automation workflows:  “Área do Lote”: The overall area of a plot of land related to public space destined to construction as a result of an operation of delimitation of land. Defined as: “Área do prédio confrontante com espaço público, destinado à construção e resultante de uma operação de loteamento”  “Área de implantação”: Is the overall footprint in square meters of the building as the sum of the projection of all the buildings, including residential, not residential, and secondary constructions, excluding balconies, eaves, or accessory elements with low volumetric impact. Defined in the regulation as: “O valor expresso em metros quadrados, do somatório das áreas resultantes da projecção no plano horizontal de todos os edifícios (residenciais e não residenciais), incluindo corpos balançados, anexos e construções secundárias, mas excluindo Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 36 varandas, platibandas, beirais e/ou outros elementos acessórios ou ornamentais, de impacto volumétrico reduzido”.  “Área total de Logradouro”: The remaining area of the plot not containing any construction, serves as garden, patio or courtyard, it’s the difference between the plot area and the buildings footprint area. “Área de terreno livre de um lote ou parcela, adjacente à construção ou construções nele implantada e que funcionalmente se encontra conexa com ele, servindo de jardim, quintal ou pátio. A área de logradouro é o valor da diferença entre a área total do lote ou parcela e a área total de implantação das construções nele ou nela existentes”  “Área de impermeabilização destinada a fins lúdicos: piscinas, tanques, campos de jogos/outros recintos”: Is the sum of the building footprint area and all the slab elements built with impermeable materials including the basements beyond the footprint area. Defined in the PDM as: “Soma da área total de implantação e da área resultante dos solos pavimentados com materiais impermeáveis ou que propiciem o mesmo efeito, incluindo as caves para além da área de implantação”.  “Área bruta de construção (Abc)”: The value in square meters resulting from the sum of the areas of all floors, above or below of the ground floor, measured with the outer face of the exterior walls, excluding the non-habitable basements, parking areas, technical areas, exterior galleries, roads, and other public use free spaces covered by the building, walkable terraces, balconies, and porches. Defined originally as: “Valor expresso em metros quadrados, resultante do somatório das áreas de todos os pavimentos (pisos), acima e abaixo do solo, medida pelo extradorso das paredes exteriores, com exclusão de sótãos não habitáveis, áreas destinadas a estacionamento, áreas técnicas nomeadamente (PT, central térmica, compartimento de recolha de lixo, compartimentos para reservatórios de gás ou outros produtos de petróleo), galerias exteriores, arruamentos e outros espaços livres de uso público cobertos pela edificação, terraços visitáveis, varandas e alpendres”. 4.2. Requirements for a BIM integrated workflow To guarantee that the information requirements are delivered properly, the specification of the data delivery is addressed in terms of form, content, and format. First, according to the directions provided by the standard ISO 19650 series, the information serves to a purpose and needs to be delivered precisely so it can comply with the purpose successfully. Understanding the submittal to the permit office as part of a process to get all the regulatory documents and authorizations for the project allow to define the milestones and information delivery strategy to successfully get the permit. Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 37 The information delivery for building permitting is considered one of the common milestones in the design process, and although it is not possible to define a standard project information requirement (PIR) that applies to all the possible projects, the exchange information requirements (EIR) can be standardized regarding the information requested from the INE forms and the Quadro Sinóptico as part of the overall need of information. The information requirements correspond only to one part of the PIR since the full automated rule compliance verification would require a full understanding of the complexities and regulations appliable to the project and the additional information to be included in the delivery. Following the guidance of the ISO 19650 series of standards and the documents published by the UK BIM Framework13, the conditions to comply with information requested are going to be defined in terms of a subset of information under the concept of Model View Definition (MVD) and Information Delivery Specification (IDS), that define the extents of information necessary to perform the validations. Under the framework of the “Level of Information Need”, the specificities of the requirements are defined, which associate the quantity, quality, and amount of information to the subset extracted in the subsets in terms of geometrical, alphanumerical, and related documentation; all necessary to fulfill the purpose. It is important to understand that the different approaches to define the information requirements have advantages and disadvantages and there is no integrated method objectively better than the others and that the integration of more than one method can be necessary to properly define the requirements (Tomczak et al., 2022). Level of information Need The “Level of information need” as defined in the standard EN 17412-1:2020 provides methods for describing the information to be exchange in certain steps of the project lifecycle along with a broader understanding of the necessity of the required information. The structure to require the information in a standardized form allows comparability between different instances for better understanding of the overall processes and milestones along the asset lifecycle. The information requested is contextualized in terms of purpose, milestones, actors involved, and the data breakdown structure for the project, and then is defined by how the information delivery must take place: The geometry involved, the alphanumeric information associated with a concept or class and the documentation that could support the data provided. The information requirement addressing the purpose of “Obtain the digital building permit” is expressed in the definitions of Level Of Information Need, following the “Guidance Part D-Developing information requirements” from the UK BIM Framework and the Standards ISO 19650-1-2:2018 and the EN 17412-1:2020 as follows: Organizational information requirements (OIR): There is no strategic goals addressed from the client side, considering that these definition vary from company to company, but taking the building permit office as an appointing party, and supporting the change to a digitized process, all the documents and 13 https://www.ukbimalliance.org/information-management-according-to-bs-en-iso-19650/ Accessed on September 05, 2022 Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 38 relevant information to be evaluated shall be delivered in a structured and standardized form for quick identification, access, and standardization for automation. Asset Information Requirements (AIR): The requirement applies to different type of assets the data obtained is required to different actors to apply for a building permit and the specific requirements can be different from one project to the other. From the building permit office, the requirement is to characterize a project precisely and accurately with relevant data from processing the complete information of the project automatically, and populate data bases to be queried later on, along the development of the project. Project Information Requirements (PIR): To comply with the milestone of applying to the building permit, the forms of the INE, and Quadro Sinóptico, shall be delivered along with the documents and models to understand the project and verify its compliance with the regulations. The project must contain the information requested by the statistics authority and to be classified according to its characteristics for further retrieval and analysis. Exchange information Requirements  Purposes: The main purposes of the exchange of information are the registry of the project information with the local authorities and the obtention of the building permit.  The information specifier/receiver is the municipality of Vila Nova de Gaia, whereas the Information provider is the Lead Appointed Party. The information delivery milestones appliable according to the RIBA plan of work 2020, that is used as best practice reference, are the approval of the spatially coordinated design during the phase 3 of the project. Other milestones might be defined depending on the appointing parties. Even if the design of building systems must be delivered for the approval of building permit, in the scope of this work, in the first validation in the submittal of information, it is not necessary the full extent of the information but only a subset. Table 1. EIR and AIR summaries and purposes for Building Permit. OIR or PIR AIR or EIR Information Purpose to support Supporting the change to a digitized process, all the documents and relevant information to be evaluated shall be delivered in a structured and standardized form for quick identification, access, and standardization for automation. Characterize a project precisely and accurately with relevant data from processing the complete information of the project automatically, and populate data bases to be queried later on, along the development of the project Registration of project in municipalities Obtention of Building Permit. Classification of information The project must contain the information requested by the statistics authority and to be classified according to its characteristics for further retrieval and analysis. Fields requested in the INE form and Quadro Sinóptico, The information shall be contained in the IFC model Registration of project in municipalities Obtention of Building Permit. Classification of information Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 39  Specification of detail: Presentation and content: The information must be delivered according to the specifications determined in the PDM of Vila Nova de Gaia. The details for presentation are displayed in the Table 2 For fulfilling the purpose of the information, the contents associated with the relevant IFC classes are detailed next. The detailed requirements are specified in reference to IFC 2x3 schema and the Model View Definition “Coordination View 2.0” or in reference to IFC 4 with the Model View Definition “Design Transfer View”. The specified classes to which these requirements apply are: IfcProject, IfcSite, IfcBuilding, IfcSlab, and IfcWall. The specification of the information requirements in terms of geometrical information, alphanumerical information and required supporting documents are presented in the tables 3 and 4. Based on the specified requirements, some modelling requirements and recommendations are proposed next establishing ways to comply and fulfill the purpose defined. Once the information requirements have been dully specified, the next chapter will focus on its integration to the building permit submital process and the integration of BIM models for the semi-automated verification. Table 2. Presentation Details for Building Permit initial application Item Content Summary (According to PDM) Form Format Information Exchange Date Plain Language Description Content Comments 1Tipo de Obra Report - IfcProject Attribute PDF + IFC Building Permit Information Submittal Type of work The attribute in IFC must be only one of the following: "Alteração", "Ampliação","ConstruçãoNova" or "Reconstrução" 2 Âmbito de intervenção Report - IfcProject Attribute PDF + IFC Building Permit Information Submittal Intervention Scope The attribute in IFC must be only one of the following: "TodoOEdificio", "PartesComuns" or "Fracçoes", in which case the units intervened must have a label associated to the container 3 Estimativa de Custo de Obra Report - IfcProject Attribute PDF + IFC Building Permit Information Submittal Estimative budget n/a 4 Prazo de execução de obra Report - IfcProject Attribute PDF + IFC Building Permit Information Submittal Execution Schedule n/a 5Área do Lote Form Data sheet /Schedule PDF+XLSX Building Permit Information Submittal Plot Area The area shall be the same as defined in the land documentation that should be presented as support documentation. 6 Área de implantação Form Data sheet /Schedule PDF+XLSX Building Permit Information Submittal Building Footprint For measurements of this field, address to the PDM definition 7 Área de Logradouro Form Data sheet /Schedule PDF+XLSX Building Permit Information Submittal Open Areas For measurements of this field, address to the PDM definition 8 Área de impermeabilização Form Data sheet /Schedule PDF+XLSX Building Permit Information Submittal Impermebilized Area For measurements of this field, address to the PDM definition 9 Área Bruta Construida (ABC) Form Data sheet /Schedule PDF+XLSX Building Permit Information Submittal Gross Building Area For measurements of this field, address to the PDM definition Attribute Fields Quantitative Fields Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 40 Information Delivery Milestone Purpose Permit Submittal Actor Lead Appointed Party Project Manager Object Geometrical Information Need Detail Not required Dimensionality 0D - Location Point Location Absolute Appearance Not required Parametric Behaviour Not required Alphanumerical Information Need Identification Reference, Name, LongName Information Content FootPrintArea,(CustomProperty)TypeOfWork,(CustomProperty)InterventionScope, (CustomProperty)EstimatedExecutionTime Documentation Set of Documents Not Required Object Geometrical Information Need Detail Schematic Dimensionality 3D Location Absolute Appearance Not Required Parametric Behaviour Not Required Alphanumerical Information Need Identification Reference, Name, LongName Information Content LandID,LandTitleNumber, SiteAddress, TotalArea, GrossArea Documentation Set of Documents Land Title Object Geometrical Information Need Detail Symbolic Dimensionality 2D Location Relative to IfcBuildingStorey Appearance Not required Parametric Behaviour Not requested Alphanumerical Information Need Identification Reference, Name, LongName Information Content IsExternal, GrossFloorArea, (CustomProperty)AreaType Documentation Set of Documents Area Plan drawings, Area Schedules Object Geometrical Information Need Detail Simplified Dimensionality 3D Location Relative to IfcBuildingStorey Appearance Not required Parametric Behaviour Not Required Alphanumerical Information Need Identification Reference, Name, GuID Information Content IsExternal, (CustomProperty)Room,(CustomProperty)PartitionUnit Documentation Set of Documents Floorplan drawings Object Geometrical Information Need Detail Simplified Dimensionality 3D Location Relative to IfcBuildingStorey Appearance Not required Parametric Behaviour Not Required Alphanumerical Information Need Identification Reference, Name, GlobalID Information Content IsExternal, (CustomProperty)Room,(CustomProperty)Unit Documentation Set of Documents Floorplan drawings IfcWall IfcSlab Client design review before (and) permit information submittal IfcProject IfcSite IfcSpace Table 3. Content breakdown for Building Permit initial submission Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 47 5.2.1. Methods to extract information requirements in relation with IFC According to the Information Requirements stated in the previous sections, this segment’s goal is to find common grounds with the IFC schema definitions, recognizing possible methods to include and map the information in a machine-readable way by associating it with an object subject to be queried in the model. The verification must be broad enough to not only validate the existence of the information but a verification of its correctness according to the expected output. 5.2.1.1. Attribute Fields The Attribute fields, describe a single characteristic of real or abstract elements such as the project (IfcProject), and refer to the semantic definition of the objects corresponding to the element only: Attributes like the address, name, code, among other can help to comprehend and qualify the project, for example. These attributes are subject to the inclusion of its data to the IFC entities to populate the fields defined in the schema or to extend the schema while improving the understanding of the concept. However, an assessment must be carried out from the municipalities end to define which information is worth including in the data containers and which is better handled through forms during the transition process to a fully digitized process. The following are examples of how the information required in these fields can be handled by integrating it to a BIM model.  “Tipo de Obra” (Type of work): The information required refers to the whole project, then the “IfcProject” entity suits to the needs. The requirement can be a simple string as a project parameter stored in a custom dataset in the entity. Although adding the parameter is simple by creating a custom data set that can be provided by the municipalities, a verification is necessary due to the flexibility of the string entity. It could be done by extracting the phase of the elements in the authoring software and including them in the “IfcBuildingElement” entity, then, counting the number of occurrences in the file and returning the most repeated one. Another possible verification is comparing two different IFC models and from there determining the right phase according to the attributes included by comparing the versions of the elements as proposed by Jalyzada et al. (2015). It adds an extra layer of complexity to a simple requirement of information when it is easier to fill through the online form at the submittal step. For the purposes of this dissertation, the attribute is going to be included in the entity, but its correctness is going to be assumed.  “Âmbito de Intervenção” (Scope of intervention): The requirement refers to the entire building or the parts of it that are being intervened, then it might require a way to categorize the parts. The “IfcBuilding” through a relationship entity can be decomposed in several “IfcSpace” object entities. An attribute “Intervenção” as part of a customized dataset with binary content like a Boolean parameter is enough to comply with the requirement where either the building or specific parts are marked as intervened. The verification of the correctness of the information implies that first, none of the “IfcBuilding” nor “IfcSpace” has this attribute null and that all the units of the building have a corresponding “IfcSpace” entity associated. Also, under the logic statement that the whole building cannot be Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 48 intervened if only some units are marked as intervention or that if all the units are marked as intervention, the whole building must have the parameter marked.  “Estimativa de custo de obra” (Estimated budget): The information can be manually stored as a number related with the “IfcProject” entity in a custom dataset. The information can also be extracted from the sum of the “area” attribute in the quantity set of the “IfcSpace” entities. The verification can rely on making sure that the parameter exists and that it is not empty. Furthermore, by extracting the areas from the boundaries of the model geometries and multiplying by the reference values provided in the municipalities, an estimated cost can be extracted and compared with the one provided to check its correctness.  “Prazo de execução de obra” (Execution time): The information of the estimated time of the works can also be included as an “IfcProject” attribute in the date format and guaranteeing that the parameter is not empty. The verification of its correctness is affected by subjectivity since there are no standards for this measurement and although there might be methods to get an estimate of the schedule of the project that can be simulated with specific technologies, for the early phases of the project this might still be inaccurate. 5.2.1.2. Quantitative fields The Quantitative fields on the other hand are dynamic in comparison to the attribute fields and the information requested is either implicitly or explicitly part of the model and of any building project. These fields refer to definitions that are not necessarily included in the IFC schema but to concepts defined in the regulations with specific measurement processes. For these types of attributes, the information is not raw and some extra processing is required for it to be extracted and conciliated with the IFC definitions. The requested information for these types of attributes is not always explicitly defined in the IFC files by the modeler, due to mistakes one hand or the lack of a proper information container definition from the schema. For that reason, the deriving implicit information from different interrelated entities will be preferred for comparison with explicit information when possible and used for the verification of correctness. Also, is important to take in consideration the existence of issues between interpreters implemented in proprietary software to write or read the information to the IFC (Noardo et al., 2021b, 2021a). In that sense, the hybrid verification of the information embodied in the model with two different approaches can help to the quality assurance in the permit submittal process as proposed next:  “Área do Lote” (Plot area): The data requested can be extracted from the BIM models using the right entities, in this case, since the information references the plot, the entity chosen is the “IfcSite” that serves as container of the buildings and the construction elements of the project. The first approach refers to the implicit data since the entity is related to the representation concept of “FootPrint GeomSet Geometry” which contains a curve set with the boundary of the geometry projected to a horizontal plane. From this representation and the vertexes of the curve, it is possible to calculate the area of the shape getting the requested information. A second approach requires the explicit modelling of the data by generating a “IfcSpace” entity that covers the whole extent of the plot, then by querying its quantity sets, where the area can be extracted as suggested by Santos (2021). A tag is required to differentiate this IFC entity from other IfcSpace and Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 49 should be explicitly defined or provided as part of a shared dataset by the authority. This keeps the workload on the applicant side and as a manual process is subject to human error but is straightforward by using a class of objects that, by definition, has the area attribute associated. Regarding the verification of correctness, the entity has definitions such as “LandTitleNumber” that might store information related to the land designation of the plot as a plain text. Once the information is mapped by the applicant, it can be compared with the one in the regional GIS system and public documentation for further verifications. The information may vary depending on how the MVD and the converter are set, some information may be missing (if exported in IFC 2x3 the name of the quantity sets, and the information related may also vary).  “Área de implantação” (Implantation Area): For this type of area, the information can be extracted from a specific “ifcSpace” entity that defines the footprint of every building, hence, a new type of area must be defined. This area is defined as the union of the footprint of all the building(s) stories on the ground floor and would require a modeler to project the building elements manually and creating a boundary that contains all the footprint shapes. The spaces can be typified according to the schema into “IfcSpace.GFA” that is a predefined type for gross floor area, which refers to the case of this field. Finally, the area is extracted from the quantity sets of the entity and is ready to be analyzed by the municipality. As mentioned before, the method to deliver the information requirement is manual and prone to errors, therefore, the validation of the correctness of the model is critical to enhance the value earned from the model. The proposed validation is based on the recognition of the outermost elements to generate a boundary corresponding to the gross floor area, including the wall elements (identifying the exterior loop of walls) as the shell of the story that closed boundaries. Then also the slab footprint must be extracted understanding that not all the spaces of the floor require to be enclosed and there are different architectural typologies such as balconies and verandas. The shape resulting of the merge of both elements would be the final gross floor area. Finally, the union of the projection of all the gross floor areas (GFA) to the ground floor fulfills the requirement of the implantation area. This method would not require the explicit effort of the modeler defining the boundaries but taking it implicitly from the geometries that define the actual project considering also that this approach can handle the appearance of modifications and the updates during the development of the file. Once the correctness of the information is validated, the information is useful to the municipality to determine if the areas comply with the regulations and restrictions appliable. This can be made applying the scripted methods in C# proposed by Santos (2021) or the approach of Temel and Başağa, (2020) validating the information from the IFC file or just by connecting the information as an input of an automated code compliance checker.  “Área total de Logradouro” (Free area): Since is the difference between the plot area and the implantation area can be obtained from a subtraction between the two areas obtained previously, there is no extra procedure needed. Nevertheless, this area can also be included as an ‘ifcSpace’ entity in the model. According to the schema definitions the space entities can be aggregated to create explicit relationships and hierarchies. The container should be Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 50 classified as a COMPLEX area defined by the plot and the contained spaces classified as ELEMENT area which would be the Logrodouro area and the area de implantação. The verification of correctness may apply when the “ifcSpace” entity has been included in the model. The comparison between the explicit modeled areas and the implicit extracted counterpart. Since this value is dependent on the other two, by guaranteeing that the other two are correct, this third one will be correct.  “Área de impermeabilização” (Impermeabilized Area): The logic to get the impermeabilized area is based entirely on the geometries contained in the model. Since the definition provided in the PDM refer explicitly to the floors, the information should be extracted from the slab entities as “IfcSlab” elements and by inquiring its geometry through its “IfcShapeRepresentation” concept which defines the inner and outer boundaries from the project. An extra layer of classification is required to differentiate the type of slabs that should be addressed for this, so it does not count all the slab elements in the whole project nor elements created only to define finishes of the spaces. As the previous entities, this requirement can also be calculated from an ‘IfcSpace’ entity in charge of the modeler. The representation of the area must be explicitly defined and is subject to human error and outdated information depending on the moment when the boundary was generated in relation to the development of the project. It only requires either the ‘ifcSpace’ correctly named and the boundaries correctly defined.  “Área Bruta de Construção (Abc)” (Gross Building Area): The gross floor area (GFA) as defined before is the sum of the area of all the outermost boundaries of all the building elements in each level including vertical bounding elements such as walls and horizontal elements such as slabs. Usually, this area is explicitly defined by the designer within a specific set of drawings as a representation of the concept of area, to support the calculation of municipalities. When using BIM tools, these areas are also often modeled as rooms or by directly inputting the boundaries as lines. The extraction of the explicit information depends then on the Rooms or boundaries modeled as “IfcSpace” entity where, as defined in the schema, the quantity datasets store the area as “GrossFloorArea”, although this may vary depending on the authoring software, and the IFC exporter used. If the area is not contained in the property set, an auxiliary method can be used to get the information by measuring the actual geometry; to do that, the 2D footprint defining the boundaries must be extracted. From there, the coordinates of vertexes of the shape are obtained and by applying a mathematical formula, the area is found from the coordinates. However, the information that was input for the model is not exempt from human error or is outdated, then the requirement of correctness validation is important by analyzing the implicit information. This type of information depends on the entities such as walls and slabs that are tangible and define an abstract concept of “IfcAreaMeasure” as the value of the extent of a surface which derives from the shape Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 51 defined by boundaries that are subject to different types of rules or in this case to the definition in the PDM. Then to get the implicit area, and according to the definition of PDM, the outer face of the exterior walls is one type of boundary used to calculate this area. The balconies and exterior spaces not necessarily enclosed by walls are defined by the extension of the slab, then the slab boundaries also contribute to the definition of the built area. Since the boundaries are not exclusive, the area will be calculated by merging the shapes of both types and creating a new shape out of the union. The methods to extract the outer boundary out of different entities may vary. For the “IfcWall” entities, the exterior face of the representations must be defined, the exterior points are recognized from there every connected wall in a loop and then the boundary lines are created between every start and endpoint of adjacent walls. From there the shape is generated and the area can be calculated from the points and their coordinates. For the “IfcSlab” element representing the slabs of the floor, the procedure also relies on the description of the geometry, getting the shape representation of the object, extracting the vertex points, and then from there calculating the area. If there is any inner void, it must be identified because determines the discontinuity of the surface and must be subtracted from the area. Getting the inner points allows to calculate the area and then subtract it from the bigger polygon, this is performed by applying a Boolean operation between both shapes. Once the boundaries and areas have been calculated, the wall shapes and the slab shapes are merged to get the overall built area of the floor. This requires both shapes to be defined in the same coordinate system, so they overlap correctly. Since the IFC entities work with relative coordinates instead of global ones, an intermediate translation between systems might be necessary. Finally, the sum of all the floor areas will be calculated as the Gross Building Area. The shapes of every floor shall be projected to the same horizontal plane and the merge operation is performed. If there is any exemption, it must be explicitly declared using a tag on the elements to filter them as voids or nonaccountable as building areas. 5.2.2. Algorithm definition for Data extraction and verification of correctness - Implementation As defined in the previous section, the methods to extract the requested information vary depending on being explicit or implicit in the IFC file. In this section it is proposed the algorithm to extract the information requested by using Python as the programming language, using the IfcOpenShell library. The data is visualized using geometrical methods and can be represented either online or on a desktop machine. The main Open-Source libraries to use for representation and operation purposes are described as follows:  IfcOpenShell: As defined on the project website, it is an open-source software library that helps users and software developers to work with the IFC file format (“IfcOpenShell,” 2022). The tool is used to parse the data contained in the file and some modular methods to access and operate it. Allows access to the entity’s attributes and relationships avoiding the effort of interpreting the plain text STEP formatted file.  MatPlotLib: Free Python library that allows representational and graphical methods to layout the information and visualize it. Although used profusely for statistical analysis, for this project Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 52 allows to representation of coordinates and shapes extracted from the IFC file and abstracted through Shapely methods.  Shapely: Is a library for manipulation and analysis of planar geometric objects (Sean Gillies, 2022). The package allows performing operations over shapes and geometrical objects. This is necessary to get to the goal defined in the previous section of extracting implicit information, deriving it into simplified shapes that represent concepts not included in the IFC schema such as “Impermeabilized area” making it explicit and subject to be queried. Among other libraries used for different purposes in the scripts, there is Descartes as a package to represent surfaces, NumPy to perform some mathematical operations, and even MySQL dB in the case of requiring integration or manipulation with databases; this last step as part of the further developments but not handled in this dissertation. All the models used to test the algorithms were created by using Revit 2022 as the authoring tool, then being exported with the IFC Exporter tool version 22.5 for the software. Some other tests were carried out using Graphisoft ArchiCAD 25 also as modeling tool, and regardless of its built-in IFC exporter having extra possibilities of customization and providing more flexibility in its interface, Autodesk Revit was preferred because of its popularity in the market and to prevent a bias in the project due to lack of abilities with the software. Due to differences in the software implementation and support as documented by Noardo et al. (2021a) the IFC file can be subject to some losses of information compared to the original model. Although the proposed scripts are developed to be compatible with IFC files and work properly independently from the authoring tool used to create the information model, even after testing, there might exist some errors because of the way of interpreters deal with the information. The scripts are subject to continuous improvement and to extents of its current capabilities as its covered in the limitations section. The method to extract the data from the file requires to understand the underlying structure of elements built in the schema where the entities are defined by attributes and relationships. The attributes are either inherited from the upper layers in the ontology that relate to broader concepts or by the concepts that define the entity itself. The attributes that are complex are also defined by relationships where the concepts defined in the schema are connected through an abstract entity that works as a link in a subjectrelationship-predicate semantic triple, like the concept of RDF defined by W3C (“RDF - Semantic Web Standards,” 2014). The information and the geometries corresponding to the definition of an object might be defined by entities and relations outside the object itself. Once the IFC file is understood as a web of interrelated concepts, the data extraction method lies in following the path as defined in the instance schema, to get the relevant data and then, store it as a variable as an entry in a Data Base (DB) for future usage. The algorithm proposed then will act like a crawling script that can extract some explicit data and the methods proposed here shall extract the implicit data from the definitions of the object to further operate and analyze to get the requested information as follows: Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 53 5.2.2.1. Área do Lote The first verification addressed is the “Área do Lote”, the goal is to extract the modeled data and compare it with the implicit information. The first step is to extract the information from the IFC file. The IfcOpenShell library contains the “.open” method that allows loading the IFC file by defining the related path. By using one of the methods for the file objects, the “.by_type” method, all the entities corresponding to a certain type can be extracted, so both the IfcSpace and the IfcSite entities are queried and extracted to two list variables. The overall process for validation of this regulatory definition is presented in Fig. 10 with two tracks referring to the data extraction of the information explicitly defined in the IfcSpace entity and to the validation of this information by using the implicit information derived from the geometry of the IfcSite entity. Data Extraction: The IfcSpace class suits the purpose to get the explicit information as modeled by the applicant since the definition in the IFC schema establish a specific IfcQuantitySet: the “Qto_SpaceBaseQuantities” containing the attribute GrossFloorArea defined as a IfcElementQuantity as a measure of the physical properties of the spatial structure element. The base quantities are given by the geometrical representation of the element and in case of missing attributes, the information can be extracted from the shape items which is modeled explicitly by the user defining the boundaries. The IfcOpenShell Library has methods to query the property sets of the elements directly. There are two methods to get to the information that defines an entity by using the library: The first one is to get the information by crawling through the relationships until getting to the corresponding attribute that defines the entity, in the case of the IfcSpace the chain would start by querying the attribute IsDefinedBy that connects to the relationship “IfcRelDefinesByProperties” that connects a specific set of properties that contribute to define the element. The property set is found in the RelatingPropertyDefinition element in the relationship instance as a IfcElementQuantity which contains the Gross Floor Area as an IfcQuantityArea. Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 54 Fig. 10. Verification Method for Plot Area Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 55 The second method to get the information is by using a function built in the library. The Util library of IfcOpenShell contains the get_psets method that can be applied to any element and extracts the property sets as python dictionaries that can be queried. The key is the name of the set of information and the values are embedded dictionaries with the quantities in the form of Name = Quantity (as Key – Value). A query is called to get the” BaseQuantities” property set and the “GrossFloorArea” from the dictionaries found in the former. Finally, the area is stored in a variable for future use and analysis. Due to issues with the exporter, the property set may not be included in the file but understanding that the base quantities are derived from the geometries, the information may be taken directly from the analysis of the geometries. The method then relies on querying the Representation attribute of the entity that stores the different representations associated with the room. The abstract representation of the room is a solid volume as the body of the entity, this is presented as a “IfcExtrudedAreaSolid” which is the only item that defines the representation. The area solid is stored in a FootPrint variable in Python. The area solid entity contains attributes relative to the position of the profile, the direction of the extrusion and the depth of the extrusion, then the boundaries as a profile that can be parametrized which means a standard predefined shape such as rectangular or circular, composite as the addition of different shapes, derived, or arbitrary if the room has a polygonal shape. The information required to get the area is the vertexes of the shape, although knowing the position is also relevant to checking the correspondence of the coordinates with the real world in further developments more related to GIS. For most of the cases, the space class either has a rectangular or an arbitrary shape. Since the IfcSpace class is used in this case for representing the plot, most likely the shape is not going to be a predefined parametric profile such as a pure rectangle or trapezoid. Then, the arbitrary profile is consulted to get the definition of the boundaries. The profile contains attributes of the definition of the inner or outer curves as IfcPolyline classes which is defined by several cartesian points, each one with coordinates in X, Y, and sometimes Z. These cartesian points are the minimum particle that defines the element’s representation and each of the coordinates of the point is relative to the shape position attribute which can, at the same time, be relative to the entity’s placement and the latter relative to the superior element in the spatial structure hierarchy. All the points are stored in a Python variable that is used after to calculate the area. The calculation is performed in a function that multiplies the X coordinate from each point with the Y coordinate of the next and subtracts the product of the X coordinate of the second point and the Y coordinate of the first one. The sum of the operation performed for every pair of points in the polygon is then divided by 2 to get the area value as shown in Equation 1. Shoelace method for calculating the area based on coordinates14: 14 https://www.mathopenref.com/coordpolygonarea.html Accessed on August 15th 2022 󰈅󰇛x 1 𝑦 2  𝑦 1 𝑥 2 󰇜󰇛x 2 𝑦 3  𝑦 2 𝑥 3 󰇜…󰇛x 𝑛 𝑦 1  𝑦 𝑛 𝑥 1 󰇜 2󰈅 Equation 1. Shoelace method for calculating the area based on coordinates Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 56 The formula of the area is implemented as a function in Python for future use calculating the different type of areas requested even when the shapes created by using the shapely library contain a method to get the area15. def Area(corners): n = len(corners) # of corners area = 0.0 for i in range(n): j = (i + 1) % n area += corners[i][0] * corners[j][1] area -= corners[j][0] * corners[i][1] area = abs(area) / 2.0 return area Verification of Correctness: The information extracted from the IfcSpace class is completely dependent on the modeler and the attention to the task during the definition and it’s prone to mistakes. That is why a second process focused on verification takes place. Once the Site elements were collected, the area information must be extracted for the plot, considering that the IfcSite class definition matches to the real-world definition of the site or plot where the project takes place. The list contains all the elements that were identified or mapped as IfcSite which corresponds not only to the topo surfaces generated but also to the construction paths, soil fills and parts of the site modelled separately. To avoid errors due to the calculations based on elements not corresponding to the plot, a filter might be performed using a tag mapped in the models as part of a custom property set assigned to the IfcSite entities. An identifier to the plot such as “Lote” is proposed, and it would be enough to identify the right element to get the data from. In the class attribute definitions, there is no mandatory attribute referring to the area of the element, nor in the parent classes that inherit the IfcSite class. Nevertheless, the Site entity definition contemplates two relatable attributes: The first one in the Pset_SiteCommon called TotalArea and the second one in the quantity set Qto_SiteBaseQuantities for GrossArea and GrossPerimeter that are not included by 15 https://pyquestions.com/calculate-area-of-polygon-given-x-y-coordinates Accessed on August 15th 2022 Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 63 The conversion is tackled in the script by extracting the coordinates of the point and performing a rotation and a translation depending on the information from the attributes of RefDirection and Location.Coordinates from the wall entity respectively. Both operations are performed for every element that needs to be translated to global coordinates and performed for every degree of containment until reaching the positions relative to the IfcSite. These global coordinate points are stored in a list for further processing. Once the points are in the global position, the polygon must be generated to extract the areas. The first approach to generate the shape out of the points, the concept of convex hull as defined by Laurini : “The minimum convex polygon so that any point of Q is either inside this polygon or at its border” (Laurini, 2017). The inconvenience with such approach is that the hull wouldn’t recognize the concave spaces formed by the turning of the walls towards the interior of the project nor the inner corners in the shape that are common in architectural projects as shown in the Fig. 14. The concave hull approach was tested next, again with unsatisfactory results where the surfaces were deformed and would dissolve from the expected output. The next approach is to generate the polygon by the coordinate points using the Shapely library. The Shapely library allows to deal with geometries and shapes and operate them consequently, but according with its methods the polygon must be defined as a sequence of coordinates. To get the points in the correct sequence, the order in which the walls are chained is important. Just collecting the walls with the previous method does not guarantee that the elements in the list are adjacent to each other since the global identifier of each element depends on the order it was modeled in the authoring tool. In consequence, connecting the extracted points in a sequential order with unordered wall instances would result in a self-intersecting polygon with errors in the calculation of the area and a footprint not corresponding to the project. Fig. 14. Convex hull based on the extracted points Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 64 To order the wall entities, the algorithm selects the first element from the list and crawls through its relationships by querying the attribute “ConnectedTo” which is linked to a relationship entity and then linked to the connected element through the “RelatedElement” method. The connected wall is stored in a new list and replaces the first to be queried in a loop that ends when all the connected walls are stored in the list, meaning that the chain is closed. Continuing with the verification of the area defined by the exterior walls, only the exterior points determine the faces that define the overall built area of the floor, so the next step focuses on determining which are interior or exterior points for every wall. To determine either if a point is in the inside space or outside space of the wall, like a topological approximation, the decision is to define the boundaries of the space based on the axis of the walls. The axis divides the wall in halves and every point corresponding to the wall can be evaluated by its position in relation to it. Defining which side of the axis is interior or exterior depends on its relationship with the other walls composing the loop determining subspaces, similarly to the ones referred by Lilis et al. when defining the Binary Space Partitioning (BSP)-tree Representation (Lilis et al., 2017b), but understanding that for the proposed use, there is no need of partitioning and only inside and outside need to be distinguished. The Axis space is determined from the closed surface formed by the points defining the axis of all the walls in the set extracted by querying the representation of the axis. Unfortunately, even when the walls have been ordered and the points are in the right coordinates and the list stored first the points of the first wall enclosing the building, within the two points defining the axis, the starting point and the endpoint require to be identified. In the authoring software, the start point of a wall element usually corresponds to the first input by the modeler, and then subsequently, the end point corresponds to the last input to create the element. Independently of how the elements were modeled or if there might be problems with the exporter, the final shape produced can provide inverted shapes with self-intersections, because of the connection type, where in a pair of walls the connection is not always end to start but can be end to end or start to start as shown in the Fig. 15. Reordering the points of the wall can be achieved by using the IFC schema definitions or by operating with the geometry. The relationship entity that connects two walls through the entity IfcRelConnectsPathElements contains an attribute for typifying the connection between the elements defining if it is at end or start, or even at path if the element is being connected to another wall along its path and not the nodes. These values can be used as evaluation to determine if the order of the points of the wall should be inverted or not before appending to the list. The geometrical approach, which was implemented in the algorithm, evaluate the distances for every set of four points in the point list to reorder them in a new list. Analyzing the points in sets of four, allows to evaluate two connected walls at the time, two axis points for every wall. The distances are measured for each point of the first wall to the points of the second. The minimum distance must be the point of connection between the two walls, so it will determine the end point of the wall number one and the start point of the wall number two. The remaining points are the start point of wall one and the end point of wall two respectively, once identified, the four points are appended in the new order to a Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 65 new list. By using this method for all the points in the list, the inversion risk is mitigated, and the Axis shape is generated. When the inner space has been determined, the points extracted from the footprint of each wall are evaluated: If the point is contained within the shape, it is stored as an interior point and everything that is in the outside space or not contained in the shape is an external point. The evaluation uses one of the methods of the polygons from Shapely and the results are stored in two different lists. The goal to obtain the area derived from all the external points in the floor. The same approach as with the axis couldn’t be taken, since it only accounted for two points per wall and the exterior points could be more than that, especially in corners where the common number was 3. To overcome this, new classes of objects were proposed containing only the geometrical information of the IFC object such as the axis points in global coordinates, the boundary points including the external and the internal, the Global ID and the local ID in the authoring tool for verification purposes, making it easier to inquiry the object afterwards for new verifications. The definition of this object is shown in Fig. 16 . The boundary points are evaluated for every pair of walls in the loop identified as one instance of the class to get the right order using a variable of the last point as support for the operations. Each of the boundary points of the two walls are checked against the list of exterior points, if the point is found in both lists, it is stored in a new list containing only the points to evaluate. For every point in the evaluation list that is also part of the first wall, the distances to the last point are measured, and the point with the minimum distance is appended to a list of exterior ordered points. The process is repeated in loop until all the exterior points have been evaluated, and then the same process is applied to the second wall. At the end of these processes, the output is a list with all the exterior points ordered sequentially ready to be used for the polygon. Fig. 15. Shape generated with End to Start RelatingConnectionType vs Shape generated by reordering points Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 66 The same process is performed to get the interior polygon. All the points are evaluated against the last point and then added to the list depending on the minimum distances. Although this process is not necessarily useful for the “Área de implantação”, it might be useful for automatic calculation of interior and rentable areas, just by identifying the boundaries with a different criterion than external or internal, adding another tag or another attribute to be considered during the filtering process. The result is shown in the Fig. 17. If there is more than one single loop of walls in the same floor (i.e. closed living dwellings separated by an open circulation area), then all the exterior walls are evaluated following the same process. The interior and exterior shapes defined as polygons with the shapely library and displayed using the MatPlotLib functions as described earlier in this chapter. The shape of exterior walls of the building storey is stored and can be used to be projected to the ground floor. The same process is repeated for each floor in the building and then the areas are projected in the same plane. Fig. 17. Interior and Exterior Shapes with ordinated points Fig. 16. Wall Object Definition Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 67  Slab Shape: The next element that needs to be projected to the ground floor is the Slab. By using the geometry methods described before, the vertexes are expected to be extracted from the explicit modeled solid. Even if the representation of the slab element has some common elements with the representation of IfcSpaces and IfcWalls, there are some extra complexities derived from the shapes that are handled such as curves, triangulated meshes when the slabs have different inner slopes. Because of time constraints on this work, the complex shapes such as BREPs and compositeCurve definitions that couldn’t get to a satisfactory processing output, are excluded from the scope. All the slab elements are collected by using the “.by_type()” method of the file as IfcSlab elements, including the roofs that as defined in the schema, are decomposed into slabs for the geometrical representation. The collection of elements is then filtered by the type of representation being a “Brep” or a curved type of representation. Then even with the curve profile a differentiation is made between the elements with a polyline used as profile or a CompositeCurve in the SweptArea definition. The Slabs composed with straight lines are included into a list and stored and then classified by levels using the same method as described for the walls, using a Python dictionary. The exterior boundary of the slab is extracted from the representation attribute following the same methods described before: The points are extracted from the shape definition and different methods can be applied depending on the type of profile, then the points are rotated based on the position of local placement of the element regarding the container (IfcBuildingStorey) and translated according to the relative coordinates of the slab placement point. Differing from the classes described before, the IfcSlab host voids that allow the vertical circulation between levels and that can affect the gross building area of the storey. The voids are addressed by inquiring the attribute defined in the instance voiding as “HasOpenings”. Depending on the Authoring tool, these voids are created in several ways and can contain or omit some information such as a name attribute to identify if the entity (an actual modeled void) is intersecting the slab element or is just a subtraction in the definition of the geometry (profile). If the void is caused by the profile that defines the geometry of the slab, all the points will be relative to the slab placement point and then they must be translated again to the BuildingStorey local placement. If the void is generated by another entity, that is contained directly in the level, then is required one conversion less to get to the global coordinates. From there, all the points are stored in a variable and the shapes are generated based on the coordinates. Since in a single level there can exist multiple slab elements, either the entities are filtered by the enumerated types that define which element should be accounted for the implantation area, or from the automation regard the procedure is carried out for every instance and then all the instances are merged into one. For practical reasons, all the information extracted in the previous steps is used for the definition of a new class that might contain the explicitly, the implicit information acquired using the proposed methods as shown in the Fig. 18. The entity contains attributes to identify the element in the BIM model, The Area of the surface, the bounding points as well as the void defining points, the ID for the authoring Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 68 software, and the Shapely polygons representing the surface and the voids. The shapes representing the holes are not used to extract the “Área de implantação” but will be used when calculating the gross building area by floor. The new entity also allows to easily access the shape representation from shapely stored in each slab entity for operations as union or difference. This approach takes advantage from the methods provided by the Shapely library to join the elements with the “.Union” method of polygons. And reduces the processing time required  Merging the partial shapes and getting the Information required: The final step in the process is to operate with the shapes from the enclosing walls and the ones from the slabs as boundaries. All the shapes generated by floor and stored in different variables are extracted and the union is performed using the Shapely method for polygons. From the resulting shape, the area can be extracted either by checking the area attribute of the shape or by using the shoelace equation from the list of vertexes. 5.2.2.3. Área de Logradouro: Although this type of area can be modelled explicitly in the file, according to its definition, is the subtraction between the plot area and the implantation area obtained in the previous sections. The data extraction and the verification process consist then in the subtraction of the corresponding information. Even if it is not applied in this study, the information can be modelled as an ifcSpace and the requirement obtained by the methods described before. 5.2.2.4. Área de impermeabilização: The impermeable area takes the variable storing the data of the implantation area and adds the slabs and paved roads inside the plot. To get this information, an explicit IfcSpace entity is used for the data extraction and the geometry methods are applied for the verification of correctness, either with the IfcSite class elements or with the IfcSlab entities representing the roads. Once again, a label is used to filter the instances that are used to get the area from, and the vertex information is extracted from the shape definition. 5.2.2.5. Área Bruta de Construção: The next requirement relates to the gross building area of the project. This information requirement can be addressed either by having a proper IfcSpace classification defining the surfaces or by the right Fig. 18. Definition of the Slab class with geometrical information Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 69 grouping format generated so the spaces can be easily identified as accountable for this type of calculation. Considering that the measurement for this area contemplates some exemptions and restrictions, an additional labeling must be addressed to extract only the correct data. Data Extraction: The data required is extracted in the same manner as with the previous requirements, the property sets of the IfcSpace shall be queried to get the QtoSpaceBaseQuantities and subsequently extract the area from the GrossFloorArea attribute. This can be either done by using the (“.get_psets”) method in the library and then looking for the attribute in the base quantities set or by crawling through the linked attributes and relationships. If the information is not explicitly defined, the implicit method based on the geometries is applicable. To make it work properly, the IfcSpaces must contain an identifier that could define them as accountable for gross area measurements or by creating an IfcGroup that contains the relevant sub areas to add to the sum. The algorithm applies the same steps as defined before, getting to the shape profile, and extracting its points for calculation. In case of multiple instances of the class, the procedure takes place for every element and then a sum is performed with the partial areas. Verification of Correctness: Since gross floor area was used as base to generate the shapes to be merged in the measurement of the implantation area, the process of verification will start from there and only some extra steps are required to validate the correctness of the information acquired. The shapes generated by the enclosing walls and the slabs from a level, will be reused. In this case, the usage of the shapely union method again will result in a shape containing the overall footprint of the floor. Only one extra step must be done using the “object.difference()” method in the Shapely library. The holes for ducts, elevator shafts, and vertical circulation must be subtracted to the overall footprint of the shapes. The difference method in the shapely library, returns a shape subtracting the intersection area between the two operators: in one hand the voids stored in the Slab entity described in the Fig. 18 and in the other, the shape element resulting from the merge between the slab geometry and the polygon from the exterior walls. The Gross Floor Area is obtained by performing this operation by level and then, the sum of all the areas will provide the Gross Building Area or “Área Bruta de Construção”. A loop is used in the code to obtain the areas per floor and then the results are stored in a list and the sum is stored to be compared with the data acquired from the extraction of the explicit data. 5.2.2.6. Attribute information extraction: The attributes defined as Information Requests, are included in a “Permitting” custom property set, and the information is extracted by using the method (“element.get_pset()”) in the IfcOpenShell library to query elements. Each of the parameters is extracted by looking up for the corresponding name: “Tipo de Obra”, “Estimativo de custo de Obra”, “Prazo de execução de obra”, “Ámbito de Intervenção” in the IfcProject entity. The information then is stored as a dictionary for management by the technician. Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 70 The verification of correctness of the information extracted is not addressed in this document since it requires the integration of more complex systems of information and concepts to evaluate the fields; a process which is currently conducted by the technician in a latter step. The verification process will require standardising indicators of estimated construction times and average cost depending on complexity and translating these concepts in a machine-readable way with measurable indicators to be evaluated automatically. 5.2.3. Modelling Specification Requirements and Recommendations The efficacy to extract the correct information and to perform the necessary validations depends greatly on the quality of the containers and how these have been specified by a user. To help this purpose, in this section are proposed the templates to extract the right number of entities and concepts from the IFC schema definition, and then the number of steps needed during the modelling process to achieve the desired level. 5.2.3.1. Model View Definitions - MVD The model view definition is a specific set of the IFC schema that is intended to be used in a specific workflow or for a predefined use. Taking advantage of the purpose driven definitions for information requirements established in the standard ISO 19650 and the Level of Information Need described before, the subset of the schema definitions will allow to extract only the necessary information in an automated validation process. The rules defined about the data to be processed and its form along with its existence in an IFC file doesn’t guarantee by any means that the provided information is going to be neither complete nor correct and much of the work still depends on the modeler. By specifying the necessary subset of information, the MVD concept was trying to determine standards across the construction industry and that should be accepted and implemented by different stakeholders including the software vendors, designers, project managers, among others. With the appearance of the ISO 19650 standard and the definitions of dynamic information requirements for every project, a view definition that could cover all the purposes and uses had to be evaluated as the information became more specific. For the validation presented in this work, either the “Coordination 2.0” MVD from the IFC 2x3 or the “Design Review” MVD from the IFC 4 schema could be chosen regarding the way they handle the geometries and the information associated to the elements. Their definition regarding the entities from the schema to export, and the EXPRESS definition of the schema complies with most of the Information Requirements specified before and is the minimum requirement for the validation presented here. Nevertheless, the view definition export excess of information not required for this use case and for the exchange, producing some extra work for the analysis and the processing of the data on the receptor. On the other hand, some additional steps are necessary from the modeler end to extend the predefined attributes defined in the schema and export them to fulfill the requirements for the exchange of information (EIR). Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 71 New tools to define custom made MVD’s, such as IfcDoc were provided by BuildingSmart and other private developers such as BIMQ17. Such tools have permitted to generate specialized MVD’s defined by the user or client and then evaluate and verify compliance with regulations by specifying the exchange requirements in terms of a subset of the IFC schema and then analyze it with tools as Xbim (Abualdenien et al., 2019) or validate the IFC models within the IfcDoc tool(Lee et al., 2018) for specific use-cases. Nevertheless, and regardless the existence of this tools, the agreed specification of the subsets also requires the implementation, harmonization and compatibilization among software developers required high efforts and higher risk of incompatibility between different stakeholders defining the same requirements differently and with a need to extend the definitions of the schema. 5.2.3.2. Information Delivery Specification (IDS) The need for a more flexible way of working that could fit the needs of the industry resulted in a new initiative from Building Smart, known as the Information Delivery Specification (IDS). The ongoing project to be implemented in IFC5 Schema is defined as “A computer interpretable document that defines the Exchange Requirements of model-based exchange. It defines how objects, classifications, properties, and even values and units need to be delivered and exchanged”18. This new specification allows to define the requirements in a computer readable way, by introducing a structure to define the specifications. The specifications define a cardinality, a subject and a predicate in a human readable way but also following the RDF semantics that are subject to be translated to machine readable language and then storing the requirements in a XML (Extensible Markup Language) file that can be processed and used for the validation of the IFC file for the use case selected. Even if IfcOpenShell library for Python contains a module to create and manage IDS, some web solutions have been implemented with user interfaces allowing more user to get access to the translation and validation of requirements. For the specification of this work the IDS tool provided by XBim19 is used to generate the alphanumerical requirements defined in the Table 3. The result is a XML file that can be validated through the web app and the results can be exported as a report or a BCF file. Although the specifications can relate to the existence of information (either geometrical or alphanumerical) within the file, the extent of validation applies only to the alphanumerical information requirements. That is why the need of methods to validate the geometrical information is also relevant and developed in this work. All the requirements are translated using the tool’s interface and then exported to XML format as presented in the Fig. 19. The alphanumerical requirements are defined in terms of prohibitions, when a condition cannot happen in the file, option when it is going to be verified and analyzed but the compliance with the condition is not critical for the requirement and required when the condition needs to happen at least once. For each of the classes identified in the Table 3. 17 https://www.bimq.de/en/bimq-guide/ Accessed on August 12, 2022 18 https://technical.buildingsmart.org/projects/information-delivery-specification-ids/ Accessed on August 12, 2022 19 https://www.xbim.it/xids Accessed on August 12, 2022 Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 72 Each specification is defined with a requirement pairing with its applicability. The requirements are defined with an IFC Property, and the property set where it belongs; for all the custom required properties, the “BIMAPLUS_DBP” Property Set is required. For each property, the possible accepted values can be defined as constraints, so, in the case of the “TypeOfwork” requirement, the possible values are defined as an enumeration of listed values as follows: ["Alteração", "Ampliação", "Construção nova", "Reconstrução"]. The applicability is just defined by specifying the class where it applies, if there is a class type and if there is a property needed associated to the element for the requirement to verify, acting like a filter in a populated set of information. It is expected that with the official publication of IDS by Building Smart, it can be implemented by software developers within their tools, so depending of the specifications defined by the client or the appointing party, the properties will be included in the BIM models automatically and a previous check can be performed before the export, or even the subset of information to export can be defined according to the IDS similarly to how it works with MVD currently. 5.2.3.3. Model Requirements Finally, and once all the specifications have been defined properly, the specific requirement of the model can be set. The model requirements comprise the information defined in the IDS that is required in the BIM model and some recommendations. The mapping of IFC Properties may vary across different BIM authoring tools and the definition of procedures to be taken for a successful export are out of the scope of this dissertation. General requirements: Fig. 19. IDS for established requirements in XML format Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 79 6.1.2. Validation of information The information is validated based on the geometry definitions of the elements. For all the areas a representation for documentation was created. The representation was made with a MatPlotLib graph; in these representations, the axis of the graph represents a coordinate system relative to the global position of the project. The shapes drawn in the graph are a 2D representations derived from one or multiple geometries. In First place, the script asks for the input of the relevant levels to the user, for each level and then runs with the information provided. First, based on the information from the site, the script generates the overall surface of the plot and then calculates the area and stores it in a python dictionary. The representation of the plot is shown in the Fig. 26. Fig. 25. IfcBuilding Property sets Fig. 26. Plot shape representation Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 80 The next step is to identify all the slabs in the each of the selected floors, the shapes of every slab are represented in a single graph and then the shape resulting from the merge of all the shapes is presented in a new graph. The red shape references the solid elements, and the blue shapes represent holes or voids in the slabs. Since there are no technical ducts in the case study that fully goes through the slabs, the voids are not considered. The Fig. 28 shows the result shown to the user for the third level of the project in case of need for visual validation. Once the shapes have been verified, the script generates a merged shape (Fig. 27), that represents the area defined by all the slabs contained in the level. The process continues with the definition of the boundaries of the walls. Once again, the algorithm described before is followed. For each of the loops of external walls a shape is generated by extracting the points, classifying them in internal, external or axis points and then reordering to generate the conceptual shapes. The process is repeated for all the loops in the container, and then the loop shapes are displayed in context for visual validation as presented in the Fig. 29 . The blue shape represents the shape created out of the external points of the loop; the green shape represents the internal area of the loops. The shapes are stored in python dictionaries, then processed altogether. Both the shapes generated from the vertical boundaries (walls) and the horizontal boundaries (Slabs) are shown in one graph. The context graph for the third level of the case study building is shown in the Fig. 31. After the shapes are displayed together, the script merge both types of shapes into one, the resulting shape is the representation of the gross built area (“Área Bruta Construida”) of the current level as shown in the Fig. 30. Although the actual representation of the shape is not necessary for the algorithm, it was useful for troubleshooting and for the development of this study case. The process is repeated for every level that was selected by the user. Each of the resulting shapes is stored in a python dictionary with the level as the key for quick access when querying. According to the measurement methods defined in the PDM de Vila Nova de Gaia and the Information requirements, the areas are extracted. Fig. 28. Slab representations overlapped Fig. 27. Merged Slab Shape Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 81 The measurement of the areas in the information requirements need the processing of different elements and areas calculated by level. For the implantation area, all the shapes from the upper levels including the roof are projected to the ground floor, then merged so the area can be calculated from the points using the shoelace formula or from the shapely method for shapes, the resulting shape is presented in Fig. 33. Implantation Area Shape Representation. Although with subtle differences, the inclusion of the wall boundaries to the overall shape covers little areas that are not accounted in the slab shapes, mostly for façade area. The open areas are calculated as the subtraction between the plot area and the implantation shape. The impermeabilized area also includes the uncovered slabs placed at the ground floor and is derived from the union of the slab shape on the first floor with the implantation shape. The final impermeabilized area is show in Fig. 32. Fig. 31. Shapes in context Fig. 29. Wall Loop Shape representation Fig. 30. Gross Floor Area shape Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 82 Once the areas have surfaces have been derived implicitly from the geometries and relationships in the model, the results are presented in a report file shown in Fig. 35. All the shapes have been stored in variables, and then for the reporting, the shapes are called: By using the area method, the shape areas are measured. In the case of the gross building area, the area of the shapes of the relevant levels is included in a sum. For flexibility and accuracy, the exclusion of levels in the calculations was added to the script; for example, for the implantation area, the uncovered slabs on first floor are excluded by the user just by the input of the level “Térreo N.A.” when the script ask for levels to exclude. However, to assure the precision required, this selection must be done by a professional or a building permit office technician. The process of verification of the areas of the building was improved to around 3 minutes in total for the whole building and the different type of areas. The traditional workflow may take different times depending on the skills of the technician and the power of the hardware used, nevertheless, for a visual validation, it might take around 5 minutes per level just to verify the boundaries and the calculation of the right value for the area might take much longer; the automation verification evaluates all the building stories, saving the information for future use and querying in just a fraction of the time. Fig. 33. Implantation Area Shape Representation Fig. 32. Impermeabilized area shape representation Fig. 35. Derived Area Measurement report Fig. 34. Verification results Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 83 6.2. Results Analysis When comparing the information gathered from the explicit modelling and the ones obtained by deriving the information from the entities in the model, the gross floor areas of level 1 and 2 had some differences in the value. The inspection of the model was carried out once again to validate the miscalculations that a modeler may have during the area boundary definition or the information that was missed by the script. Regarding the modelling errors, two findings in the area boundaries were identified: First, there might be errors on the definition of the boundary that does not correspond to a building element, probably because the edges of the slabs or the wall limits were different in an earlier stage of development of the project, as shown in Fig. 36 (The boundaries of the area in pink are not the same on both sides of the wall, the green shape shows the extra area). The second finding was the omission of relevant elements as shown in the fig with red dotted line. the modeller could have missed some elements not visible in the view that was used for the boundary definitions because are in a different height, but that still accounts for the building area presented as an example in the Fig. 37. On the other hand, for Level 1, the information that is being processed with the script does not count the stairwell, since the stairs are not treated as slabs with profile representation but as boundary Fig. 36. Wrong Boundaries in area definitions Fig. 37. Missing bounding elements Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 84 representations defined by interrelated faces. Since the script does not provide support for BREP, the area occupied by the stair is not recognized as a built area and the resulting gross floor area is less than the expected. The code requires further development to handle this type of geometries. For the purpose of validating the results, the findings are taking care of. The area boundaries are corrected and then the stairs are represented in the BIM model as sloped slabs to be processed with the program. The final results with the updated model are shown below. The validation of correctness of the information provides a second layer of quality assurance when evaluating BIM models. The coincidence of the results between explicitly modelled information and the implicitly derived information provides a higher grade of certainty in the digital building permit process. 6.3. Limitations: Some issues have been found during the development of the code, regarding the way to deal with geometries, processing profiles, the characteristics, and special conditions that the code requires to deliver the information effectively from the code. The code resulting from this research is considered by the author as a work in progress and part of a library in python to be populated and refined over time by different contributors, the issues and limitations presented hereby are expected to be solved as the project grows. The first issue identified is related to the handling of Boundary Representations (BREP). So far, the code can be executed with orthogonal shapes derived from profile extrusions, the profile representation Fig. 38. Adjusted Extraction and Verification Results Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 85 eases the extraction of information by already representing the geometry projected to a horizontal plane. The BREP geometries rely on the use of faces defined by points with x,y,z coordinates. The logic and the algorithm to project the points, clean them and the reordering to get the expected surface to calculate the area, are still under development. Curved profiles are still not supported in the code, since the construction of curved geometry varies from the orthogonal. The geometry built from a center point and the methods for shapely also differ. Workarounds have been proposed by using a faceted shape representations instead of curved representation; however, modifying the representation of the elements do not correspond to the real-life scenarios and new methods are to be included in the library. The automated validation of the requirements included in the Information Delivery Specification (IDS) is still under research in the industry although it will be an industry standard over the next years, particularly with the publication and implementation of IFC5 and the XML definitions for the information requirements. The implementation will guarantee that the information is exported as required from the authoring software. For now, the verifications are checked visually using an IFC viewer software, and are subject to be automatized using code, but this is also not completely addressed in this code. Finally, the requirement of closed loops of walls is still to be overcome. The loop requirement follows the logic of connecting walls (and points) in order by using their relationships to other elements. If there is a wall that defines the area boundary but is not connected to a loop of walls, the points can be extracted but the position of these points in the list of vertexes defining the surface of the area, is uncertain and can lead to unexpected results with self-intersecting shapes. This applies also to curtain walls connecting at path to interior walls that extends to the exterior, in this case the walls have to be divided to change the .ATPATH connection to a .ATSTART or a .ATEND connection. This modification will enable the connection in closed loops and enable the continuity for the area shapes. . Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 86 This page is intentionally left blank Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 87 7. CONCLUSIONS This document showcased a hybrid approach (Explicitly defined information and implicitly derived information) for automatic validation of the information contained in Building Information Models, allowing a greater level of certainty of the correctness of the information used to identify and classify the projects that are submitted to building permit offices. This chapter will focus on the description of the findings and advantages of this approach, discussing risks to be taken in consideration and then some of the further development opportunities are highlighted as ideas for future work. The procedures described in the document allow to save time while extracting, classifying the information, and storing it for further usage. This is a scalable approach that can be adapted to different contexts after translating the measurement requirements of different regulations. However, as commented in the chapter before, the methods are not universal and would require the intervention of a field expert for the correct interpretation. The usage and comparison between the explicitly defined information and the implicit derived information from geometries allows to identify mistakes and issues in the model as result of not ideal modelling practices. The usage of new technologies, a more developed and flexible (modular) IFC schema and the implementation of Information delivery specification standards will potentiate the quality of the results obtained. The results presented in the case study respond to specific conditions of the building. Although the script has been proven with several files coming from different BIM authoring platforms is still not failure proof and more tests are to be taken, pushing the limits of the where the automation of the validation of the information is necessary and bringing extreme cases to prove the usability of the code. The purpose of a fully automated process for building permits might be of risk for the integrity of the information until the regulation translation methods and syntax have been standardized. Relying only in the information extracted with the script might exclude important criteria that is subject to interpretation and derive in misleading results. On the other hand, only trusting the results from explicitly modelled information, might as well be subject to the risk of wrong inputs. The work developed in this dissertation have two purposes in this regard: One, to draw attention to the need of a double validation in the transition time to fully automated, standardized process for digital building permit; and two, the library creation of a series of flexible methods as tools to analyze the information contained in building information models, contributing to standard processes that are traditionally taken care of by specialized technicians. Among others, some examples of functionalities to include in the libraries are listed below:  Get the gross building area (addressed in this dissertation)  Get the footprint of the building (addressed in this dissertation)  Get rentable areas (partially addressed in this document with the generation of interior boundaries)  Get construction ratios.  Define building heights.  Get the building proportion ratios.  Extract the building units by typology Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 88 Upon development these methods can provide information as classes or variables to extend the usability of the IFC-STEP format. The information obtained can be conciliated with the standard definitions to be developed in regulation semantics, easing the process of automated rule verification, contributing to the digitalization of the overall process. Further development As well as the rule extraction being automated with the support of semantic based technologies and natural language processing, the methods to extract the procedures to calculate different measures to also determine the correctness of BIM models should be fully automated. This means, an automatic extraction of the measurement algorithm established in the regulations such as the Plano Director Municipal de Vila Nova de Gaia that provide definitions to abstract concepts to be evaluated during the rule compliance verification. This will lead to the definition of concepts into ontologies that later can be extracted from an IFC file like it was presented in this dissertation. The implementation of the methods applied here as a module of a web platform is also part of a further development. Both the applicants and the technicians should have access to a common environment to provide transparence to the whole process, by sharing a common platform that provides instant feedback, the workflow for both stakeholders can be enhanced. This possibility would also require a deeper understanding and management of relational databases for indexation and query of the BIM models. Although in this work, the information was derived from the entity’s geometry, there is a broad field of research regarding the integration of topology to extract meaningful information from BIM models. This approach can enable more complex analysis for rule verification for space identification, uses, and assessment of higher-level concepts that require indirect relationships between elements. Finally, as mentioned before in the document, the library is still under development and a standard framework to organize the definition of the scripts, as well as the expected concepts is still to be developed. The definition of the functionalities like the ones listed earlier and their development is still open for new contributors and for refinement as the industry moves forward and the scripts are subject to be optimized and improved. The final goal is to integrate the workflow in building permit offices to include the technician and experts work while easing the workload, releasing workforce to more analysis driven tasks. Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 95 Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 96 APPENDIX 2: “QUADRO SINÓPTICO” Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 97 Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 98 Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 99 Appendix 3: Area Representation drawings Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 100 Automatic rule verifications for Digital Building Permits Erasmus Mundus Joint Master Degree Programme – ERASMUS+ European Master in Building Information Modelling BIM A+ 101