Close
About
FAQ
Home
Collections
Login
USC Login
Register
0
Selected
Invert selection
Deselect all
Deselect all
Click here to refresh results
Click here to refresh results
USC
/
Digital Library
/
University of Southern California Dissertations and Theses
/
A BIM-based tool for accessible design standard plan check: an automated plan review plug-in for Revit focusing on accessible design
(USC Thesis Other)
A BIM-based tool for accessible design standard plan check: an automated plan review plug-in for Revit focusing on accessible design
PDF
Download
Share
Open document
Flip pages
Contact Us
Contact Us
Copy asset link
Request this asset
Transcript (if available)
Content
A BIM-BASED TOOL FOR ACCESSIBLE DESIGN STANDARD PLAN CHECK AN AUTOMATED PLAN REVIEW PLUG-IN FOR REVIT FOCUSING ON ACCESSIBLE DESIGN by Zhiying Liu A Thesis Presented to the FACULTY OF THE USC SCHOOL OF ARCHITECTURE UNIVERSITY OF SOUTHERN CALIFORNIA In Partial Fulfillment of the Requirements of Degree MASTER OF BUILDING SCIENCE May 2020 Copyright 2020 Zhiying Liu ii ACKNOWLEDGEMENTS I would like to express my deep gratitude to my parents for their continued support, which gave me the opportunity to conduct this research at the University of Southern California. I am very grateful to professor Karen Kensek for her invaluable help in this subject, and for helping me solve various problems and provide various opportunities to improve my abilities during the two years of study and research. I would also like to thank professor Marc Schiler and professor Victor Albert Regnier for their advice in different areas of expertise, especially Prof. Victor Albert Regnier for providing me with many views on accessible design outside of building science. I also want to especially thank all the members of the MBS family, especially my colleague and friend Wang Zhihe for her support and help since the start of the graduate program I would also like to thank Michael Ellars from DLR Groups for his detailed work on the certified access specialist and for sharing his insights in the field of accessible design. I also thank Mr. Winston Kahn of ARUP for meeting with me, and his suggestions made me decide what method to take. iii Table of Contents ACKNOWLEDGEMENTS ....................................................................................................... ii LIST OF TABLES .................................................................................................................... vi LIST OF FIGURES ................................................................................................................. vii ABSTRACT .............................................................................................................................. ix Chapter1: Introduction ............................................................................................................... 1 1.1 Accessible Design Regulations ..................................................................................1 1.1.1 Americans with Disabilities Act (ADA) ....................................................................2 1.1.2 California Building Code (CBC): 11B Accessibility Standards ................................2 1.1.3 Universal Design ........................................................................................................3 1.1.4 Summary ....................................................................................................................5 1.2 Plan check ..................................................................................................................6 1.3 Accessible Design code compliance in the design process .......................................9 1.4 Building Information Modeling ...............................................................................10 1.4.1 BIM application in the building life-cycle ...............................................................10 1.5 Revit Family.............................................................................................................13 1.5.1 Revit Family Relationship .......................................................................................13 1.5.2 Customize Revit Family ..........................................................................................14 1.6 Revit Programming ..................................................................................................16 1.6.1 Revit Plug-in ............................................................................................................16 1.6.2 Dynamo ....................................................................................................................17 1.6.3 Visual Studio ............................................................................................................19 1.7 Existing automated plan review tools ......................................................................20 1.8 Summary ..................................................................................................................22 Chapter 2: Background and literature review .......................................................................... 23 2.1 The history of accessible design code standards in the US .....................................23 2.1.1 Pre-2010 ...................................................................................................................23 2.1.2 Current federal law ..................................................................................................26 2.1.3 Critique of current standards ....................................................................................27 2.1.4 Codes in other parts of the world .............................................................................28 2.2 The role of accessible design ...................................................................................29 2.3 Universal design.......................................................................................................29 2.4 Accessible bathroom design ....................................................................................34 2.5 Current code check tools ..........................................................................................42 2.5.1 SMARTreview .........................................................................................................43 2.5.2 Upcode AI ................................................................................................................44 2.5.3 Daima .......................................................................................................................46 2.6 Summary ..................................................................................................................47 Chapter 3: Methodology .......................................................................................................... 48 iv 3.1 Overall methodology diagram .................................................................................48 3.2 Restroom and bathroom accessible design code collection .....................................49 3.2.1 Restroom and bathing facilities requirements from ADA standard and CBC .........49 3.2.2 Universal design solution related to restroom and bathroom ..................................52 3.2.3 Opinion from the certified accessible specialist ......................................................52 3.2.4 Categorized the standard ..........................................................................................53 3.3 Platform set up .........................................................................................................56 3.4 Model preparation ....................................................................................................57 3.5 ADC Plug-in development .......................................................................................58 3.5.1 Identify the element .................................................................................................58 3.5.2 Customize code-compliant Revit families ...............................................................59 3.5.3 Read parameter method ...........................................................................................62 3.5.4 Get element location ................................................................................................63 3.5.5 Results visualization ................................................................................................64 3.6 Test ...........................................................................................................................66 3.7 Summary ..................................................................................................................66 Chapter 4: Tool development................................................................................................... 68 4.1 Platform and model preparation...............................................................................68 4.1.1 Add Revit API reference ..........................................................................................68 4.1.2 Add Manifest file .....................................................................................................69 4.1.3 Family name conversion ..........................................................................................71 4.2 Buildup customized code-compliant families ..........................................................72 4.2.1 Build code restriction into family ............................................................................73 4.3 Add-in development.................................................................................................74 4.3.1 Filter family .............................................................................................................74 4.3.2 Get family location ..................................................................................................76 4.3.2.1 Get family parallel to the project coordinate system location .................................78 4.3.2.2 Get family not parallel to the project coordinate system location ...........................82 4.3.2.3 Showing family location ..........................................................................................83 4.3.3 Load and place customized code-compliant families ..............................................84 4.3.4 Collision detection ...................................................................................................88 4.4 Result visualization ..................................................................................................92 4.4.1 Highlight related element .........................................................................................93 4.4.2 Pop-up reminder.......................................................................................................93 4.5 Summary ..................................................................................................................94 Chapter 5: Test cases and plug-in validation ........................................................................... 95 5.1 Plug-in Installation and model preparation ..............................................................95 5.1.1 Preparation for running the program ........................................................................95 5.1.2 Load ADC into Revit ...............................................................................................96 5.1.3 Model Preparation ....................................................................................................97 5.2 Test case setup .........................................................................................................97 5.2.1 Test case 2 detail ....................................................................................................101 5.3 Plug-in validation ...................................................................................................103 5.3.1 Test case 1 result ....................................................................................................104 v 5.3.2 Test case 2 result ....................................................................................................107 5.3.3 Test case 3 result ....................................................................................................115 5.4 Summary ................................................................................................................117 Chapter 6: Conclusion, Discussion, and Future Work ........................................................... 118 6.1 Discussion ..............................................................................................................118 6.1.1 Evaluation of the current workflow .......................................................................119 6.1.2 Limitations of the current version ..........................................................................120 6.1.2.1 Scale and program version .....................................................................................120 6.1.2.2 The impact of ACD plug-in used on the original model .......................................121 6.1.2.3 Code and user interface development ....................................................................121 6.1.3 Plug-in limitation ...................................................................................................122 6.2 Future work ............................................................................................................123 6.3 Conclusion .............................................................................................................124 REFERENCES ...................................................................................................................... 125 APPENDIX A ........................................................................................................................ 128 vi LIST OF TABLES Table 1. 1 7 Principles of Universal Design(Steinfeld and Maisel, 2012) ............................................. 3 Table 1. 2 Difference between developing a Revit Plug-in directly and writing Dynamo Script ......... 18 Table 1. 3 Automated plan review software (Solibri, CORENET, UpCode, Daima, 2019)................. 20 Table 2. 1 American accessible design law process 23 Table 2. 2 Universal Design: 7 principles and design guidelines (Steinfeld and Maisel, 2012) ........... 30 Table 2. 3 Accessibility standard for restroom design (U.S. Department of Justice ,Texas Department of Licensing and Regulation ,International Code Council ,LADBS ) ................................................. 35 Table 2. 4 UpCode ADA code check (UpCode, 2019) ......................................................................... 44 Table 3. 1 Accessible code for single-user restroom comparison (Kent, 2017) 50 Table 3. 2 Accessible code for multi-user restroom comparison(Kent, 2017) ..................................... 51 Table 3. 3 Certified access specialist survey ......................................................................................... 53 Table 3. 4 Restroom related family ....................................................................................................... 58 Table 3. 5 ADC covered element and related accessible design code (International Code Council, 2016) .............................................................................................................................................................. 60 Table 4. 1 Family name keywords 71 Table 4. 2 Filter and collect relative element ........................................................................................ 76 Table 4. 3 Family bounding box could be affected by annotation mark ............................................... 77 Table 4. 4 ADC code-compliant family place location......................................................................... 79 Table 4. 5 C# code showing how to place the code-compliant family ................................................. 85 Table 4. 6 ADC code-compliant family collision detection ................................................................. 89 Table 4. 7 Result visualization .............................................................................................................. 93 Table 5. 1 keyword requirement for restroom-related families 97 Table 5. 2 Tested families and detail information............................................................................... 100 Table 5. 3 Test case 2 detail (International Code Council, 2016) ....................................................... 101 Table 5. 4 Test 1 result - All passed the code check .......................................................................... 104 Table 5. 5 Compare Test case 1 and 2 ................................................................................................ 107 Table 5. 6 Test 2 Result – some not pass the code check ................................................................... 108 Table 5. 7 Comparison of Test cases 1 and 3 ...................................................................................... 115 vii LIST OF FIGURES Figure 1. 1 isUD design solution toilet example (isUD, 2019) ............................................................... 5 Figure 1. 2 ADA Standard, local building codes, universal design suggestions, and professional advice all acting on building design ........................................................................................................................ 6 Figure 1. 3 How to get a construction permit (LADBS, 2016) ............................................................... 7 Figure 1. 4 Traditional plan review process that involves accessible design. All the blue words are the elements that different departments will check based on accessible code. ............................................. 9 Figure 1. 5 A component example shows all related parameters (Autodesk Revit, 2019) ................... 11 Figure 1. 6 Revit family relationship .................................................................................................... 14 Figure 1. 7 Revit family template library (Autodesk, 2020) ................................................................. 15 Figure 1. 8 Revit family create command (Autodesk, 2020) ................................................................ 15 Figure 1. 9 Customize family parameter set up example ...................................................................... 15 Figure 1. 10 Revit Lookup example showing all classes related to the selected component ................ 17 Figure 1. 11 Example Dynamo interface and nodes ............................................................................. 18 Figure 1. 12 Example Revit plug-in develop in Visual Studio (Dan, 2018) ......................................... 19 Figure 2. 1 Difference between ADA Standard (red text) and CBC (blue text) on door latch approach28 Figure 2. 2 isUD certification system (isUD, 2019) ............................................................................. 34 Figure 2. 3 Standard ADA code compliance single-user restroom (U.S. Department of Justice, 2010)35 Figure 2. 4 SMARTreview™ APR™ interface (SMARTreview, 2018) .............................................. 43 Figure 2. 5 Upcode AI ADA code compliance example (Upcode AI, 2019) ....................................... 45 Figure 2. 6 Upcode AI missing instruction can cause a wrong design to pass the code check ............. 46 Figure 2. 7 Daima model check example (Daima, 2019) ..................................................................... 47 Figure 3. 1 Overall methodology diagram ............................................................................................ 48 Figure 3. 2 ADA Complained accessible restroom (left) and Universal Design solution example (right) comparison (isUD, 2019) ...................................................................................................................... 52 Figure 3. 3 Customized accessible family parameter example ............................................................. 55 Figure 3. 4 Customized code-compliant families showing the side clearance of a toilet ..................... 56 Figure 3. 5 Visual Studio installer(Microsoft, 2019) ............................................................................ 57 Figure 3. 6 Revit Add-in Manager and Revit Lookup .......................................................................... 57 Figure 3. 7 ADC Plug-in development workflow ................................................................................. 58 Figure 3. 8 How to get all plumbing fixtures through Revit API ......................................................... 59 Figure 3. 9 Revit built-in slow filter example (Autodesk help, 2015) .................................................. 59 Figure 3. 10 Example shows the customize family code check ............................................................ 60 Figure 3. 11 Parameter example of an element in Revit ....................................................................... 63 Figure 3. 12 ADC code complained sink origins. ................................................................................. 64 Figure 3. 13 Pop up reminder showing the checking process ............................................................... 65 Figure 3. 14 Failed code checking result showing the relative building code ...................................... 65 Figure 3. 15 passed code check result with design advice .................................................................... 65 Figure 3. 16 ADC Test cases set up ...................................................................................................... 66 Figure 3. 17 Overall methodology diagram .......................................................................................... 66 Figure 4. 1 Chapter 4 Diagram.............................................................................................................. 68 Figure 4. 2 Add necessary references to Visual Studio ........................................................................ 69 viii Figure 4. 3 Add Manifest file ................................................................................................................ 70 Figure 4. 4 Create Add-in ID ................................................................................................................ 70 Figure 4. 5 Change suffix name of the manifest file ............................................................................. 70 Figure 4. 6 Load ADC plug-in when start Revit ................................................................................... 70 Figure 4. 7 Family name conversion example ...................................................................................... 71 Figure 4. 8 Programing how to get all families that name contains “toilet” ......................................... 72 Figure 4. 9 Code – compliant family example ...................................................................................... 73 Figure 4. 10 Toilet front clearance example ......................................................................................... 73 Figure 4. 11 ADC plug-in development diagram ................................................................................. 74 Figure 4. 12 Element filter example...................................................................................................... 75 Figure 4. 13 possible bounding box expression .................................................................................... 77 Figure 4. 14 how to calculate family center use C# .............................................................................. 78 Figure 4. 15 How to get the relative point ............................................................................................ 79 Figure 4. 16 Points used in ADC of a family ........................................................................................ 79 Figure 4. 17 Get family not parallel to the project coordinate system location diagram ...................... 82 Figure 4. 18 Rotate the family to 0 degree ............................................................................................ 82 Figure 4. 19 Two-dimensional plane rotation formula ......................................................................... 83 Figure 4. 20 Calculate the rotated bounding box max and min point ................................................... 83 Figure 4. 21 rotate the family back to the original location .................................................................. 83 Figure 4. 22 Display existing family information ................................................................................. 84 Figure 4. 23 Load ADC code-compliant family ................................................................................... 84 Figure 4. 24 Revit response to the loading command ........................................................................... 85 Figure 4. 25 C# code shows check the toilet side clearance ................................................................. 88 Figure 4. 26 Collision detection and result ........................................................................................... 89 Figure 4. 27 Final Summary showing all failed elements ..................................................................... 92 Figure 4. 28 Highlight all error elements after code check ................................................................... 93 Figure 4. 29 Chapter 4 Diagram............................................................................................................ 94 Figure 5. 1 Chapter 5 Diagram.............................................................................................................. 95 Figure 5. 2 Load ADC into the Revit addins default folder .................................................................. 96 Figure 5. 3 ADC Plug-in contents ......................................................................................................... 96 Figure 5. 4 Load ADC plug-in when start Revit ................................................................................... 97 Figure 5. 5 Where to find ADC............................................................................................................. 97 Figure 5. 6 3D views of three Test cases .............................................................................................. 98 Figure 5. 7 Detailed plan of three test cases ......................................................................................... 99 Figure 5. 8 Plug-in validation - Test cases ......................................................................................... 103 Figure 5. 9 Run ADC Plug-in ............................................................................................................. 103 Figure 5. 10 Test 3 process ................................................................................................................. 116 Figure 5. 11 Test 3 process ................................................................................................................. 116 Figure 5. 12 ADC validation ............................................................................................................... 117 Figure 6. 1 ADC Development Diagram ............................................................................................ 118 Figure 6. 2 ADC Plug-in result example ............................................................................................. 119 Figure 6.3 ADC plug-in could not run under Revit 2019 or earlier version ....................................... 120 Figure 6. 4 Wall mount toilet example ............................................................................................... 122 Figure 6. 5 Element with a huge bounding box .................................................................................. 123 ix ABSTRACT Accessible design uses modern ideas about barrier-free architecture to transform the existing environment, providing a safe living and working spaces for aging people and people with disabilities and creating conditions for such people to integrate into society equally. As the trend is towards an aging population, accessible design is increasingly important in architecture design and construction. Since the adoption of the Americans with Disabilities Act in 1990, the accessible design has become a law and not just a design option. However, the traditional planning check process is relatively ineffective and expensive; sometimes, the project reviews backload in the project schedule. Especially for accessible design standard plan check is a part that is easily forgotten. Architects do not pay enough attention to this aspect. Few projects will hire a certified access specialist to do inspections. However, the legal prosecution triggered by accessible design standard compliance is severe. An accessible design standard code check tool could provide useful information and feedback to the architect about their design and its compliance with ADA regulations before the submittal and save time and money for the plan review. Moreover, the tool can provide advice on accessible design for existing and new buildings to help create better solutions based on universal design solutions and recommendations from certified access specialists. The Accessible Design Consultant (ADC) plug-in uses a Revit model and the Revit Application Programming Interface (API), which is the most widely used software in the industry. It extracts the model geometry and dimension information then determines whether the design meets the requirements of the accessible design standard. The example prototype tool was developed for restroom design. And the check result generates the report with revised advice and provides the user with relevant specifications for reference. KEYWORDS: BIM, Accessible design, Universal Design, Revit API RESEARCH OBJECTIVES • Study and determine the existing ADA Standard and CBC access design flexibility. • Determine the possibility to incorporate BIM in the plan review process and provide a plug-in of using BIM as a solution. • Identify the barriers to implementation and opportunities to be interviewing professionals. 1 Chapter1: Introduction This chapter explains the different accessible design regulations, such as the Americans with Disabilities Act and the California Building Code: 11B Accessibility Standards and describes the concept of Universal Design. The plan check process provides the background of the architectural drawing review process and the need for a better solution related to code compliance in the architectural, engineering, and construction (AEC) industry. In addition, Building Information Modeling (BIM) and Revit programming are also introduced to show the potential capabilities to apply BIM in the building code check process. 1.1 Accessible Design Regulations Accessibility regulations establish minimum requirements that protect people with disabilities from discrimination in the built environment. All public spaces, planning, and design of various types of public buildings and facilities such as schools, hospitals, public housing. And equipment should consider the needs of those with different levels of disabilities (ADA National Network, 2019). These public buildings (residential buildings are not covered by the ADA standard) also need to be equipped with devices that can respond to and meet different peoples’ needs to create a modern living environment that is convenient, safe, and comfortable. The target audience of the barrier-free environment is mainly disabled people and older people, but pregnant women, people carrying groceries, and temporarily infirm people might benefit from the designs that take accessible design issues into account. Therefore, the design method of the accessible environment should be corresponding to the problems disabled and aged have in order to ensure the accessibility, operation, and safety of the disabled people to the environment (ADA National Network, 2019). The existence of the disabled population and the trend of population aging have made the spread of the barrier-free environment even more urgent (The World Bank, 2019). The United States has advanced barrier-free design regulations in the world, and its regulations have a long history (WBDG, 2019). The country's accessibility laws, regulations, and standards systems have been improved, and they have all been developed to the information accessibility and general design stage, covering a wide range of protection targets (United States Department of Justice Civil Rights Division, 2010). Relevant, accessible design and 2 research have been carried out earlier, and there is more public participation. 1.1.1 Americans with Disabilities Act (ADA) ADA is an abbreviation that stands for the Americans with Disabilities Act. It is a law that prohibits discrimination against individuals with disabilities in all areas of public life. That includes jobs, schools, transportation, and all public and private places that are available to the public. The ADA standard provides equal access right for all without undermining the needs of people with disabilities. The Department of Justice published the first ADA in the federal register in 1990. The revised regulation is called the 2010 ADA Standards for Accessible Design. This 2010 ADA Standard is what all buildings currently must comply with in the US (United States Department of Justice Civil Rights Division, 2010). Furthermore, federal ADA regulation has a continuing obligation to make sure the building has a barrier-free environment. Unlike most building codes that are activated in the event of a new construction or major upgrades, ADA is always in effect even the owner did not upgrade the building (United States Department of Justice Civil Rights Division, 2010). This means the building elements must always meet the newest regulations. 1.1.2 California Building Code (CBC): 11B Accessibility Standards In addition to federal law, some states have developed their own local building code that adopts the ADA standard and adds more requirements based on state conditions. For example, the State of California has the California Building Code, and for the accessible design regulation part in Chapter 11b Accessibility to Public Buildings, Public Accommodations, Commercial Buildings, And Public Housing, it fully adopted the ADA standard, modified, and add more detailed regulations. For example, "clearance around a water closet shall be 60 inches (1524 mm) minimum measured perpendicular from the sidewall and 56 inches (1422 mm) minimum measured perpendicular from the rear wall. A minimum of 60 inches (1524 mm) wide and 48 inches (1219 mm) deep maneuvering space shall be provided in front of the water closet”( International Code Council, 2016). The California Department of Building and Safety requires accessibility for places of public accommodation, required all the buildings need to meet the requirements of the ADA standard, and also meet the requirements of local jurisdictions, whether city, country or state 3 (Kent, 2017). The accessibility section of CBC requires that the business owner of a new building or those that are making any improvements for an existing facility meet the accessibility standards in the State of California. Moreover, it also requires the building owner to upgrade related parking, entrance, routes to the renovated area, and any bathroom, drinking fountains, or signs serving the area of remodeling accessible (LADBS, 2012). 1.1.3 Universal Design According to the definition by the National Disability Authority, “Universal Design is the design and composition of a product or environment so that it can be accessed, understood and used to the greatest extent possible by all people regardless of their age, size, ability or disability” (NDA, 2014). Universal design is not a law or regulation; it is a design process beyond the standard that can assist the architect in designing their building from a new perspective, “an innovative way of thinking about the built environment” (Steinfeld & Maisel, 2012). In 1987, American architect Ronald L. Mace began to use the term "universal design." He said that universal design means that the building and facilities are designed not only for the disabled but for all people with added functionality at no additional cost or at the lowest cost. This approach not only breaks the product and design made for people with mobility difficulties but also makes the current ADA standards are no longer applicable to many groups of people (Mace, 1987). In 1989, Mace established the Accessible Housing Center at North Carolina State University, the predecessor of today's Center for Universal Design, to conduct more systematic research and practice on universal design. Mace and his colleagues put forward seven principles of universal design based on practical research in 1990 (Table 1. 1). Table 1. 1 7 Principles of Universal Design(Steinfeld and Maisel, 2012) 7 Principles of Universal Design Principle 1 Equitable Use Principle 2 Flexibility in Use Principle 3 Simple and Intuitive Use 4 Principle 4 Perceptible Information Principle 5 Tolerance for Error Principle 6 Low Physical Effort Principle 7 Size and Space for Approach and Use Besides the seven principles that assist the designer’s design decision making, the innovative solution of Universal Design (isUD) was also developed and funded by the National Institute on Disability, Independent Living, and Rehabilitation Research (NIDILRR, 90RE5022-01-00). NIDILRR is a Center with the Administration for Community Living (ACL), Department of Health and Human Services (HHS) in 2017. isUD is a voluntary certification program based on extensive evidence of research and practice, providing designers, facility managers and owners with tools to implement universal design in their build environment, policies, and business practices. isUD consists of a set of universal design solutions designed to create an inclusive and healthy environment (isUD, 2019). The certification program provides over 500 voluntary solutions covered into the design process, space clearances, circulation, environment quality, site, rooms and spaces, furnishings and equipment, services and polices 9 chapters. These solutions provide a more personalized design approach beyond the regulations. For example, one solution to the aspect of the toilet is to equip at least one height-adjustable toilet, which is contrary to the regulations on the height of the toilet mat, but it provides a personalized solution based on different body types (Figure 1.1). This is one way that isUD is different from the ADA Standard. 5 Figure 1. 1 isUD design solution toilet example (isUD, 2019) 1.1.4 Summary Laws, specifications, and design solutions play a role in the design or the renovation process. In addition to the somewhat limited coverage of the laws and regulations, the opinions of some certified access specialist (CAPs) will also provide accessible design guidance. A CAPs is an experienced people who have been examed and certified by the government that the architecture firm, construction firm, or the building owner can voluntarily hire them to inspect their building to ensure compliance with accessibility regulations and obtain a report (CASI, 2015). The building code and ADA standard in the four aspects of the contents are mandatory, and all designs need to meet the building code requirements. The other two are not required but can provide better barrier-free design (Figure 1. 2). 6 Figure 1. 2 ADA Standard, local building codes, universal design suggestions, and professional advice all acting on building design 1.2 Plan check Plan check is the review process that the city building department plan checker will check whether a specific design meets the building code. This is usually done with a stack of drawings. The current plan check process relies heavily on city plan checker interpretations that are inconsistent across jurisdictions, and manual inspections are prone to errors (Nawari, 2013). According to the Los Angeles Department of Building and Safety, all of the new construction, renovation or addition/demolition of the building need to submit the relevant drawings to the building department for plan check before obtaining the building permit (LADBS, 2016). Depending on the type of building, sometimes it is not just a permit from the building department that is required but also permits from the fire and health departments. Moreover, based on the scale of the project size, some city building department offers a counter check or express check; the contractor goes directly to the building department and fills out the plan check application. In this case, the plan check takes a couple of hours, and the contractor can get the permit in one day (LADBS, 2016). However, most of the cities in California do not have that service. Also, the counter check is only offered to small projects. Some of the cities offer an express plan check that requires an additional plan check fee. The regular plan check usually takes a couple of weeks (LADBS, 2016 ) (Figure 1. 3). 7 Figure 1. 3 How to get a construction permit (LADBS, 2016) A licensed or certified plan checker performs the traditional plan review process. They are either employed by the building planning department of a city or county or hired by a third-party inspector of a private company. The building official performs a conformance assessment of the applicable code and then issues a building permit when all the drawing detail and support documents met the requirement. Unfortunately, due to the complexity of the code and regulation, this process is usually iterative and time-consuming. In California, the process of review has become more complicated by the fact that California adopts the California Building Code instead of the International Building Code (LADBS, 2016). For example, when there is a new project submitted to the city, the contractor needs to submit to the planning zoning department first. The planning department will check the large-scale requirement based on state building code, such as the zoning information, size of the building, or related parking. For a commercial project, the contractor may also need to submit to the health department and fire department. The health department is under county supervision but not the city. The health department checks everything relates to public health at a very detailed level, such as whether the equipment used by the owner is FDA-approved, is the equipment complies with the accessible regulations. The fire department checks fire relates elements such as fire alarm and sprinkler system. Some cities required the contractor to get the permits health department and fire department before the plan submits to the building safety department. 8 Moreover, both the health and fire department plan checks take at least a week. After the contractor gets three permits from planning, health, and fire departments, the plan can submit to the building department. For some small cities, in the absence of plan checkers, all applications need to be submitted to a third-party agency for review. Alternatively, an inspector will have a fixed time each week to do the plan check, and all projects will submit the application on that day which is very inconvenient. And the plan correction and resubmit are time-consuming. If there is any major revision, the city may require the contractor to resubmit to the fire and health department again. Throughout the whole application process, accessible design is distributed in different parts. The relevant contents checked by each department is different. For example, the planning department checks accessible parking based on the building size and occupant number. The building department checks all the details, such as the access route, water closet distance from the wall. Fire and health department are mainly focused on the equipment when they are considering accessibility, such as the fire alarm location, sink accessibility. (Figure 1. 4). 9 Figure 1. 4 Traditional plan review process that involves accessible design. All the blue words are the elements that different departments will check based on accessible code. In addition, building code expressed in natural language versions often contain ambiguities that lead to a different understanding. Due to manual checking procedures based on code and standard text versions, some requirements are easy to be ignored. These problems cause delays in the licensing process and can sometimes lead to security risks. In order to solve this problem, a lot of research and development implemented in the creation and use of building codes through a computer-based method (Akin, 2012). However, there is no practical solution to solve this issue yet. 1.3 Accessible Design code compliance in the design process There are many legal cases related to the accessible design code violation, for example, on the official ADA website, the Department of Justice Civil Right published many related code-violated cases. The government will hold the architect responsible. During the design phase, the architect will apply different methods to check whether the design meets the specifications according to the type and size of the project. For some 10 new large projects, the design company will communicate with the client to hire experts to check the design based on 2D Drawing, or there will be in house designers to go through the whole design. it could be based on the digital 3D model or 2D drawing. For example, there are many certified access specialists participate in the LAX Automated People Mover project, these certified access specialists were hired by different professions and focus on a different aspect such as parking, public works of the accessible design (Ellars, 2019). For renovations or existing projects, the architect usually uses the current accessible design code or ADA checklist to help the homeowner or designer check the design. When it comes to different professions such as the design of a bathroom, usually interior designers will check whether they meet the specifications during the design process, but the architect usually does the final inspection before the submission. 1.4 Building Information Modeling The concept of building information modeling (BIM) has existed for almost 40 years. BIM is different from the computer-aided design, and it is not just a simple 3D model of the building, but an accurate virtual model that contains precise geometry and relevant information that support the construction, fabrication, and procurement activities needed to realize the building (Eastman, 2008). Generally, BIM is a tool supported by digital technology that changing the architecture, engineering, and construction industries by collecting and sharing all information and data related to the building life-cycle (Liu, 2018). 1.4.1 BIM application in the building life-cycle In the whole life cycle of the project, BIM can realize the integration of all project-related information through the parametric model. In the project planning, operation, and maintenance of the whole life cycle of sharing and transfer. That makes the architect, engineer, and other consultants have a correct understanding and effective response to a variety of building information. It can significantly improve the entire process efficiency, reducing a large number of risks. In the architectural design process, BIM not only includes the building information but also can record the corresponding feedback to the change of information, so it brings a new design method – parametric design. 11 Parametric design is a digital modeling process based on a series of pre-programmed rules or algorithms known as 'parameters' (BIM Wiki, 2019). The involvement of BIM technology can make the design more diversified. For some complex designs, BIM plays a very proper role in guiding, by changing the parameters can change the architectural morphology. The BIM can list different forms of performance analysis and comparison of designs that provide the choices to the designer to select the best option. Also, the software program can help the architect deal with complex and repetitive tasks. So the architect can spend more time on developing a design to improve the quality (Liu, 2016). Revit is a commonly used building information modeling software. A precise BIM contains all the components and elements that not only 3D geometry and texture but the whole digital equivalents of the actual building part. These components contain all physical and logical parameters that basically covered all the required information when it goes to construction. For example, from the property window, it shows all the related information about the bathtub, which covered constraints, material, plumbing, structural, and mechanical aspects (Figure 1. 5). Figure 1. 5 A component example shows all related parameters (Autodesk Revit, 2019) Coordination is the most extensive application of BIM in the pre-construction and construction process. The owner, architect, engineer, and contractor need to work together. Once the implementation of the project has encountered a problem, they will get together and find the reason and solution. In the design 12 process, often because of the lack of communication between different disciplines, the collision problem occurs between the different parts, such as the HVAC pipeline layout (Zhang, 2015). During the real construction process, there may be a structural component that is standing in the way of pipeline layout. Coordination services for this are often encountered in the construction of the collision problem. BIM can help deal with this kind of problem; BIM can simulate the actual construction to facilitate a variety of problems in the early design stage instead of in the late stage of real construction (Meadati. 2008). It not only can be practical guidance for the later period of construction but also to serve as a guide for the feasibility, to provide a reasonable construction plan and allocation of people and materials, and to achieve the maximum rational use of the resource (Bouazza, Udeaja & Greenwood, 2015). The building information model contains data, including 3D geometry and non-geometric information, such as material, weight, cost, and schedule integrated with all information related to the project. During the design process, the model can run different simulation experiments, such as energy simulation and sunlight simulation. In the bidding and construction phase, 4D BIM simulation can denote the BIM 3D model extended with one extra variable - time. Tedious scheduling is replaced by parametric modeling, in which every element is assigned in a sequence of assembly (Meadati. 2008). BIM 4D creates new opportunities for information modeling: the division of the project into phases, visualization of phases, simulation of the schedule of works, accurate planning for the delivery time of products and materials (reference). Furthermore, there is a 5D BIM simulation that integrates engineering quantity, project schedule, project cost, and it can be a dynamic simulation of the construction process, the implementation of process control, and monitoring the project cost (Smith, 2014). For example, a lot of engineering companies use BIM models contained information for energy simulation and use the simulation result for LEED certification. Through these applications, it can be seen that BIM has great potential in the application of building code compliance. The information contained in each element of the model can be used for code check, and the advantage of using BIM technology is that the parameter in each element can be extracted and compare with the building code. 13 1.5 Revit Family A Revit family is an element containing a common parameter set and related graphical representations. Some or all parameters of different elements belonging to a family may have different values, but the set of parameters (its name and meaning) is the same. These group of elements in the Revit family is called family type or type. All elements used by users in the Revit project are families. Even the level that comes with the standard template is a family. Certain families, such as walls or annotation marks, are included in the standard model environment. Other families, such as a sink or plumbing fixtures, need to be loaded into the model from external libraries. Without families, users cannot create any objects in Revit (Autodesk, 2016). The family also contains non-graphical information in element attributes. When an element is selected, instance attributes are displayed on the properties palette. Instance attributes contain information related to that particular family instance in the model. The type attributes of the family are applied to all families of the same type in the model. Users can create a new family type by copying an existing type and changing the attributes. 1.5.1 Revit Family Relationship It is important to understand the relationship of the Revit family. All elements in a Revit project are families. Families can be divided into different categories, for example, a door is a category and a window is another category. Under the category is the family, for example, the swing door and sliding door are two different families. Family type is another level, the 30” by 80” door and the 36” by 84” door are two different family types. The family instance is the actual element in the project, it has a specific location and ID in the model, such as sinks in different restrooms on different floors (Figure 1. 6). 14 Figure 1. 6 Revit family relationship 1.5.2 Customize Revit Family In addition to a large number of families in the library that comes with Revit, users can also customize families, Revit provides templates for custom families. Users can choose the corresponding template to design their own family according to their needs (Figure 1. 7). When designing the customized family, users can use command such as extrusion, blend and void to setup component geometry (Figure 1. 8). After editing family geometry, users can add dimensions according to requirements, and can also add parameters to custom families. For example, the length and distance from the grab bar to the floor can be set up as parameters, users can change it if they need (Figure 1. 9). 15 Figure 1. 7 Revit family template library (Autodesk, 2020) Figure 1. 8 Revit family create command (Autodesk, 2020) Figure 1. 9 Customize family parameter set up example 16 1.6 Revit Programming Similar to many other 3D software programs, Revit also provides an application programming interface (API). Users can integrate other applications through API or use API to manipulate and access Revit data (Autodesk, 2019). can create models and read BIM model information. Realize batch operation and intelligent operation, integrating or link the functions of other software to the Revit through the API, perform various analyses, and complete the user's needs on one platform (Autodesk, 2019). Currently, the development tools used in the industry are usually through Dynamo or Visual Studio using C#. 1.6.1 Revit Plug-in A Revit plug-in is a program written according to a particular specification of the Revit API. It can only run under the Revit platform specified by the program. (may support multiple Revit projects at the same time) Furthermore, a Revit plug-in cannot run separately from Revit because the plugin needs to call the function library or data provided by the Revit model. Revit API gives the user access to the Revit database application, document, element, and parameter. RevitAPIUI.dll includes all the operations and custom Revit UI interfaces, including IExternalCommand, IExternalApplication, Selection, menu RibbonPanel, RibbonItem, and its subclasses. To access or extend Revit through the API, users need to implement special interfaces in their plugins, namely IExternalCommand, IExternalApplication, and IExternalDBApplication (Autodesk, 2019). One of the benefits of using Revit API to create a Revit plug-in is that it allows some simple and repetitive tasks to be done by the computer for us, thereby significantly reducing the workload of the designers. Furthermore, users can customize their plug-ins according to their own needs. For example, many design firms and engineering companies have their plug-ins. These plug-ins will complete some specific tasks according to the company's drawing and modeling standards. Because the development of the Revit plug-in requires users to have a certain understanding of Revit and programming, Autodesk has also released the Revit Software Design Kit (SDK). It provides a series of 17 useful documents, sample code, and projects that users need in the plug-in development to help users better understand the Revit API and the classes that can be used for each namespace. At the same time, two essential official plug-ins play an important role in developing Revit plug-ins. One is AddInManager, an official plug-in of Autodesk for loading the plug-in in Revit. The advantage is that the user can modify the plug-in code and load and run it again without restarting Revit. It is included in RevitSDK. The other one Revit LookUp. The user can check some hidden properties before programming. Many class names and methods in C # can be found through LookUp. This saves a lot of time for people who do not have experience. and the result is accurate (Figure 1. 10) Figure 1. 10 Revit Lookup example showing all classes related to the selected component 1.6.2 Dynamo Dynamo is a programming environment built using a Visual Programming Language (VPL) used within Revit. It was initially designed to allow people without a programming background to visualize and parameterize Revit API by manipulating and combining Dynamo nodes (Autodesk, 2019) (Figure 1.7) 18 Figure 1. 11 Example Dynamo interface and nodes Dynamo gives users the ability to extend BIM with data and logic through the visual programming editor, and it is also an open-source tool that every user could put their question on the Dynamo forum and get help. In addition to the nodes that Dynamo comes with, Dynamo also encourages users to use existing nodes to combine and write other nodes. Dynamo can use the Python language to customize nodes, and this is another benefit of Dynamo. There are many useful packages written by other people in the dynamo package library, and most of them are free. It is a great tool to automate the tedious task to make the team more productive. Although using Visual Studio to develop plug-in and Dynamo are both based on Revit API, there are still significant differences between these two methods (Table 1. 2). Dynamo is more user-friendly to the beginner who does not have programming experience. However, using Dynamo is not an ideal choice for advanced tasks. Table 1. 2 Difference between developing a Revit Plug-in directly and writing Dynamo Script Develop a Revit Plug-in Dynamo Script Traditional text-based programming, user need to have C# and .Net programming experience Program elements are graphical, and the results can be displayed in real-time on the screen of Dynamo or Revit when manipulating geometric information. Implementation efficiency and quick It takes time to analyze the contents and connection 19 response. relationship of the nodes; the execution efficiency will be worse than writing Revit plug-in directly. Customizable Revit interface. Unable to customize Revit user interface More flexible and the most direct way to call the Revit API. Limited by the number of nodes included in the Dynamo Revit project, users cannot use all the APIs of Revit. When necessary, the user must write the Python code through the Python node to call the Revit API Autodesk provided a set of examples online Has a large number of node libraries, If the built-in nodes cannot meet users needs, user can download Dynamo nodes provided by third parties from the node library to add new functions 1.6.3 Visual Studio Visual Studio is Microsoft's self-made complete development toolset. It is an integrated development environment (IDE) that provides most of the tools needed for programming, such as debugging tools, building tools, code controllers, etc. It supports all platforms from Microsoft, including Windows, .NET Framework, etc. Users can reference RevitAPI and RevitUIAPI libraries in Visual Studio to call Revit APIs in Revit-supported programming languages such as C#, Visual Basic, and C++/CLI, and create their Revit extensions to access Revit data storage, parametric modeling, and views (Autodesk, 2019). Create or customize the Revit API to support the work supported by the Revit API (Figure 1.8). Currently, most of the Revit API is written by C#. Figure 1. 12 Example Revit plug-in develop in Visual Studio (Dan, 2018) 20 1.7 Existing automated plan review tools Several industry initiatives are underway to automate code inspection procedures, including some external software and projects based on BIM. Developing fully automated programs is an essential goal of the BIM community, but should not be achieved in the short term (Martins & Abrantes 2010). Currently, many different software technologies have been developed to support the plan review process. They are different in their ability to automate code check processes, the flexibility to model design information, the breadth of building specifications involved, the ability to provide friendly reporting systems and 3D visualization, and the ability to integrate with other applications (Table 1. 3). Table 1. 3 Automated plan review software (Solibri, CORENET, UpCode, Daima, 2019) Automated plan review software Name Model Requireme nt Accessible Design code check Example Jotne EDModel Checker IFC Model - SmartCod es BIM with necessary information - Solibri Model Checker IFC Model Space clearance Singapore governme nt Constructi on and Real State Network (COREN ET) 2D and BIM Access route; clearance space; audience seating accessibility; parking accessibility SMARTR Revit - 21 eview Model UpCode AI Revit Model Bathrooms 1.1 Mirror Bottom Edge Height 1.2 Mirror Top Edge Height 1.3 Required Ambulatory Stall 1.4 Turning Space in Bathroom Doors 2.1 Deep Frame Door Opening 2.2 Minimum Door Width 2.3 Push-Pull Clearance Grab Bar 3.1 Grab Bar Spacing Above 3.2 Grab Bar Spacing Below 3.3 Grab Bar Wall Spacing 3.4 Grab Bar Orientation 3.5 Grab Bar Height 3.6 Rear Grab Positioning 3.7 Side Grab Bar Positioning 3.8 Required Grab Bars Ramps 4.1 Ramp Handrails on both side 4.2 Ramp Handrails height 4.3 Ramp Handrails Extension 4.4 Ramp Clear Width 4.5 Ramp Landing Size 4.6 Ramp Landing Slope 4.7 Ramp Turning Landing 22 Size 4.8 Ramp Max Rise 4.9 Ramp Slope Daima Revit Model Daima scans the majority of 2010 ADAAG guidelines. Specifically, sections 3, 4, 5, and 6. Plan Analyst Autodesk Design Review Optasoft - Commerci al Building Inspector 1.8 Summary By introducing the background of the accessible design and architectural design plan review process, this chapter shows the neglect displayed in this area in the industry. In addition, how to apply BIM technology into the code check process and relevant plan review software are also introduced to give a brief background of the study. Specific details and related research will be introduced in Chapter 2. 23 Chapter 2: Background and literature review This chapter provides an overview of the history of the accessible design regulation and existing applications of BIM for code compliance. A BIM code compliance tool requires to integrate and compare the data between BIM models and accessible design code requirements. Different existing code compliance tools are introduced in this chapter to understand how to solve the problem of design check efficiency. 2.1 The history of accessible design code standards in the US The United States is the first country in the world to formulate accessibility standards (WBDG,2019). Its barrier-free environment construction has formed a multi-level legislative guarantee, bringing great security and convenience to special groups such as the disabled and the elderly. Since the United States National Standards Institute established the first accessible design standard in 1961, the United States has also adopted various accessibility regulations (Table 2.1). Table 2. 1 American accessible design law process American accessible design law process 1961 ANSI 117.1 Accessible and Usable Buildings and Facilities 1968 Architectural Barriers Act 1973 Rehabilitation Act / United States Access Board established 1988 Fair Housing Act 1990 The Americans with Disabilities Act 1996 Telecommunications Act 2010 2010 ADA Standards for Accessible Design 2.1.1 Pre-2010 In 1961, the United States issued the world's first accessibility standard - ANSI 117.1 "Accessible and Usable Buildings and Facilities," which only covers physical disabilities and building standards (Rhoads, 2013). The standard became a private sector model for the technical standards of accessible features, and it has been updated regularly, the newest version published in 2017 (WBDG, 2019). In 1968, the US Congress passed the Architectural Barriers Act (ABA), which became the fundamental law 24 for the barrier-free design of public buildings and facilities (U.S. Access Board, 2004). People began to understand "accessible design." The ABA stipulates that all new and rebuilt buildings built by the US government or financed by the federal government must meet the requirements for accessible design. Some examples from the act said that at least one entrance and exit should be convenient for people with disabilities to enter and exit; public wheelchairs must ensure wheelchair rotation space; the parking lot is marked with a blue sign to indicate the parking space for disabled persons; and 4 to 5 electric wheelchairs for disabled persons must be equipped at the entrance of a large shopping mall (Rhoads, 2013). In 1973, the United States published the Rehabilitation Act and set up the United States Access Board to oversee the implementation of the ABA in the same year. The Rehabilitation Aat clearly defines the elderly as equivalent to the disabled and expands the disability. The standard of recognition of people increased the type of disability, under Section 504, it defined the disability include physiological disorders such as hearing and vision impairments, neurological disorders such as muscular dystrophy and psychological disorders such as learning disability (ICC, 1973). The Rehabilitation Act gives more people with disabilities the opportunity to find employment (Rhoads, 2013). The Americans with Disabilities Act (ADA), passed by the US Congress in 1990, replaced the core position of the ABA, plus the 1991 ADA Accessibility Guidelines (ADAAG). Public buildings, transportation facilities, and general business facilities must meet the accessibility standards, and the scope of the communication system was expanded to the visual and hearing system impairment for hearing and vision impairments people. More than 50% of the main entrances and exits were required to facilitate access by people. It was required that at least one barrier-free route exists from the entrance to the public space such as public library and hospital. The number of accessible parking spaces, conference rooms, restaurants, and library reading rooms and the number of low-level counters in commercial facilities, the number of medical facilities wards, the number of accessible hotel rooms are also specified (Rhoads, 2013). In 1996, the US government passed the "Telecommunications Act," which aimed to promote accessible design in the field of information communication accessibility (Rhoads, 2013). It required all manufacturers 25 of the telecommunications industry to ensure that all equipment and services are accessible and usable by persons with disabilities. For example, two new clauses, SEC 225 Telecommunications services for hearing and speaking disabled persons and SEC255 Telecommunications services for persons with disabilities added to the Act. All software, hardware, and service providers that provide telecommunications and terminal services in the United States need accessibility, including common mobile phones, routers, fax machines, etc., which are mainly targeted at telecommunications products and service providers. These requirements ensure that people with disabilities would have chance access to a wide range of products and services such as telephones shopping, paging service, call-waiting, and operator services, which were often difficult for a person with a disability (U.S. Department of Justice, 2017). The development of the barrier-free environment in the United States has been gradually developed through legislation. The legislative process for accessible design in the United States is gradual and progressive. With the development of science and technology, the Architectural Barriers Act and the Rehabilitation Law cannot meet the needs of disabled people. For example, the common barrier-free facilities in reality: sidewalk for the blind on the road, barrier-free toilets in the airport, etc. In the virtual internet world, it also needs to pave the blind road for the blind, provide subtitles for the deaf and mute, and facilitate the operation for the physically disabled. In the display room of the Maryland Center for Developmental Disabilities, there are various types of assistive devices for the disabled, such as computer voice prompt software and text magnification software that allow blind and visually impaired people to use computers and access information easily; even people with severe physical disabilities can also use assistive tools to operate the computer with elbow, head, chin, or even slight movements of tongue and eyebrows (Zhu, 2012). Information accessibility ensures that all people have equal, convenient and barrier-free access to and use of information at any time, place and device. Information accessibility is actually a symbol of equality and freedom. Therefore, the Telecommunications Act of 1996 and the ADA Standard were promulgated. Persons with disabilities not only need more social participation, religious participation, and barrier-free housing, transportation, employment, education, but also the right to participate in political life (WBDG, 26 2019). 2.1.2 Current federal law In 2010, the original ADA Accessibility Guideline was revised to the 2010 ADA Standards for Accessible Design. It is still mainly aimed at public accommodation and commercial facilities. The main revised provisions are the following: at least 60% of the entrances and exits should be convenient for disabled people; all routes from the entrance to the public space must be designed for barrier-free; the set requirements for accessible toilets are reduced from 100% to 50%, but barrier-free signs must be provided; accessibility design requirements were added to the standard for courts, trial courts, residential units, yachts and fishing piers, fitness equipment, golf, swimming pools, shooting ranges, laundry facilities, saunas and detention centers (Rhoads, 2013). 2010 ADA Standards for Accessible Design include 2010 Standards for State and Local Government Facilities Title II and 2010 Standards for Public Accommodations and Commercial Facilities Title III (U.S. Department of Justice, 2017). The U.S. Department of Justice enforces ADA regulations governing state and local government services (Title II) and public accommodations (Title III). The U.S. Department of Health and Human Services (HHS) enforces Title II of the ADA relating to access to HHS federal programs, services, and activities, such as people who are deaf have access to sign language interpreters or other auxiliary aids in hospitals for effective communication (U.S. Department of Labor, 2019). All states in the United States need to comply with ADA regulations, but some states have adopted A117.1 compliance, such as Nevada and Arizona. A117.1 design regulation is only adopted if the state government approves it. Currently, most of the States which adopt A117.1 still use the 2009 version, the new version of 2017 is slowly adopted by the state and could be done by 2021 (Gettelmanm, 2019). In addition, the US state governments have mostly developed local accessibility regulations based on nationally unified standards and state conditions such as the CBC 2019 11B Accessibility Standards and the Texas Accessibility Standards published in 2012. The Americans with Disabilities Act recognizes and protects equal access rights of persons with disabilities. 27 The Act includes many types of disabilities, from physical conditions to vision, hearing, language disabilities, to mental and learning disabilities (United States Department of Justice Civil Rights Division, 2010). The Act provides for accessibility in the workplace (Chapter 1), accessibility to state and local government services (Chapter 2) and accessibility to public facilities and commercial facilities (Chapter 3). The Act also requires telephone companies to provide accessibility services for people with hearing or speaking disabilities (Chapter 4) and various accessibility requirements for federal agencies (Chapter 5). Because the ADA plays a fundamental role in the construction of barrier-free environments, the revised 2010 ADA Standard of Access Design contains accessibility scoping and technical requirements implementing the ADA of 1990 for all ADA covered facilities except transportation facilities. Its main specifications include the following aspects: application and administration, scoping requirements, building blocks, accessible routes, general site, and building elements, plumbing elements and facilities, communication elements and features, special rooms, spaces and elements, built-in elements and recreation facilities. This covers almost everything related to accessible design (United States Department of Justice Civil Rights Division, 2010). 2.1.3 Critique of current standards Although ADA Standard covers many design specifications, an interview with the certified access specialist Michael Ellars concluded that current standards should go deeper (Ellars, 2019). The ADA standard target was the disabled veterans from the Vietnam War (Ellars, 2019). However, his expert opinion was that current regulations should be considered and targeted at the current adaptation population. Another issue is that most architects are not very familiar with the detailed standard. There are not many certified access specialists, according to the government register data shows to the September 2019, there are only 770 registered certified access specialists in California. Most of the projects do not currently hire experts to do the check (Peng, 2019). The most important thing is that when applying for a permit, the building department plan checker does not check according to the ADA standard but according to local regulations. In California, architects need to follow the CBC standard. CBC's specification for accessible design is to 28 fully adopt the ADA standard and add some new detail to better match the local condition. For example, ADA Standard requires the door latch approach on the pull side is 48”, and on the push side is 48”. However, the CBC requires the door latch approach on the pull side is at least 60” and 44” for the push side (Figure 2. 1). Figure 2. 1 Difference between ADA Standard (red text) and CBC (blue text) on door latch approach 2.1.4 Codes in other parts of the world European countries have emphasized the accessibility of residential housing in terms of accessibility design (Zhu. 2012). Some countries have designed and built accessible housing since 1960, and have considered the safety performance of facilities and communication with others very carefully. Provide a truly accessible, safe and convenient living environment for the disabled and the elderly. The national building code of the United Kingdom is based on practical requirements. It requires the convenience of evacuation channels for ventilation equipment, fires, drainage facilities, toilet equipment, and the appropriateness and rationality of the height of the sink (Zhu, 2012). In England and Wales, the contents of Part M of the Building Code is to facilitate the use and access of persons with disabilities to public and residential buildings. The facility standards in Part M of the Building Code adopted in 1999 are not only standards for architectural design, but also criteria for evaluating whether an accessible design building meets requirements (Zhu, 2012). 29 In July 1986, the Ministry of Construction, the Ministry of Civil Affairs and the China Foundation for Disabled Persons jointly compiled Chinese first "Design Guidelines for Urban Roads and Buildings for the Disabled" trial version, which was promulgated on April 1, 1989. On June 13, 2012, the 208th executive meeting of the State Council of China passed the Regulations on the Construction of Barrier-Free Environments, which was promulgated on June 28, 2012 by the State Council Decree No. 622, and implemented from August 1, 2012. On September 1, 2012, GB 50763-2012, the latest version of the "Accessibility Design Code" jointly issued by the Ministry of Construction, the Ministry of Civil Affairs, and the China Disabled Persons' Federation, was implemented. The original "Code for Barrier-free Design of Urban Roads and Buildings" JGJ50-2001 was repealed at the same time (Zhu, 2012). 2.2 The role of accessible design The construction of a barrier-free environment in modern cities, especially the improvement of accessible design regulations, is an institutional guarantee for the participation of vulnerable groups in social life and the sharing of economic development results and also benefits ordinary people. According to the World Bank statistic, “One billion people, or 15% of the world’s population, experience some form of disability, and disability prevalence is higher for developing countries. One-fifth of the estimated global total, or between 110 million and 190 million people, experience significant disabilities” (The World Bank, 2019). Based on United Nations (UN) data, by 2050, one in six people in the world will be over age 65 (16%), up from one in 11 in 2019 (9%) (UN, 2019). As the world's aging trend intensifies and disasters affecting the abilities of people occur frequently, the quality of the living environment of the elderly and the disabled with a large population has become a social problem that cannot be ignored. Accessible design regulations are an indispensable link to improve the living environment of the disadvantaged groups and improve the quality of life. At the same time, accessible regulations also provide convenience for children, pregnant women, and even ordinary people. 2.3 Universal design In 1990, Ronald L. Mace and a group of architects, engineers, and product design worked together to 30 collaborate and establish the Principles of Universal Design (Table 2.2). Table 2. 2 Universal Design: 7 principles and design guidelines (Steinfeld and Maisel, 2012) Universal Design: 7 principles and design guidelines PRINCIPLE ONE: “Equitable Use The design is useful and marketable to people with diverse abilities.” Guidelines: “1a. Provide the same means of use for all users: identical whenever possible; equivalent when not. 1b. Avoid segregating or stigmatizing any users. 1c. Provisions for privacy, security, and safety should be equally available to all users. 1d. Make the design appealing to all users.” Example: All toilet stalls have a clear floor space on at least one side of all toilets. PRINCIPLE TWO: “Flexibility in Use The design accommodates a wide range of individual preferences and abilities” Guidelines: “2a. Provide choice in methods of use. 2b. Accommodate right- or left- handed access and use. 2c. Facilitate the user's accuracy and precision. 2d. Provide adaptability to the user's pace.” Example: Provide at least one height adjustable lavatory or more than one different height lavatories in the restroom where provide more than one lavatory 31 PRINCIPLE THREE: “Simple and Intuitive Use Use of the design is easy to understand, regardless of the user's experience, knowledge, language skills, or current concentration level”. Guidelines: “3a. Eliminate unnecessary complexity. 3b. Be consistent with user expectations and intuition. 3c. Accommodate a wide range of literacy and language skills. 3d. Arrange information consistent with its importance. 3e. Provide effective prompting and feedback during and after task completion.” Example: All lavatory faucets are either automatic or are operated following a common conceptual model. PRINCIPLE FOUR: “Perceptible Information The design communicates necessary information effectively to the user, regardless of ambient conditions or the user's sensory abilities”. Guidelines: “4a. Use different modes (pictorial, verbal, tactile) for redundant presentation of essential information. 4b. Provide adequate contrast between essential information and its surroundings. 4c. Maximize the "legibility" of essential information. 4d. Differentiate elements in ways that can be described (i.e., make it easy to give instructions or directions). 4e. Provide Example: Provided a sign outside the toilet and bathing facilities are gender-neutral with text and pictograms representing the toilet and/or bathing fixtures in the room, in lieu of conventional representations of a man and woman. 32 compatibility with a variety of techniques or devices used by people with sensory limitations.” PRINCIPLE FIVE: “Tolerance for Error The design minimizes hazards and the adverse consequences of accidental or unintended actions”. Guidelines: “5a. Arrange elements to minimize hazards and errors: most used elements, most accessible; hazardous elements eliminated, isolated, or shielded. 5b. Provide warnings of hazards and errors. 5c. Provide fail safe features. 5d. Discourage unconscious action in tasks that require vigilance.” PRINCIPLE SIX: “Low Physical Effort The design can be used efficiently and comfortably and with a minimum of fatigue”. Guidelines: “6a. Allow user to maintain a neutral body position. 6b. Use reasonable operating forces. 6c. Minimize repetitive actions. 6d. Minimize sustained physical effort.” Example: All toilets have touchless flush controls (automatic or non- automatic). 33 PRINCIPLE SEVEN: “Size and Space for Approach and Use Appropriate size and space is provided for approach, reach, manipulation, and use regardless of user's body size, posture, or mobility”. Guidelines: “7a. Provide a clear line of sight to important elements for any seated or standing user. 7b. Make reach to all components comfortable for any seated or standing user. 7c. Accommodate variations in hand and grip size. 7d. Provide adequate space for the use of assistive devices or personal assistance.” Example: All toilet and bathing facility fixtures, equipment, and trash receptacles do not cause pinch points in circulation space. Professor Edward Steinfeld from the University of Buffalo established the Center for Inclusive Design and Environmental Access (IDeA) in the 1980s. He has been working to extend the conceptual framework of universal design beyond accessibility. The IDeA also established a certification system called the innovative solutions for Universal Design (isUD) that is a voluntary program based on extensive evidence of research and practice, providing designers, facility managers and owner with tools to implement universal design in their build environment, policies, and business practices. isUD consists of a set of universal design solutions designed to create an inclusive and healthy environment (isUD, 2019). There are about 500 solutions that cover design process, space clearances, circulation, environmental quality, site, rooms and spaces, furnishings and equipment, services, and policies 9 different aspects (Figure 2. 2). All of these solutions can be used as an additional resource to help architects in accessible design. 34 Figure 2. 2 isUD certification system (isUD, 2019) 2.4 Accessible bathroom design In airports, stations, hospitals, parks, nursing homes, and other public places, accessible restrooms are specially set up in the restroom area. The single-user accessible restroom regardless of gender and barrier- free stalls set up in men's and women's bathrooms. Equipped with special barrier-free facilities, including wheelchair-accessible doors and space for people who need assistance, safety grab bars for water closet, etc., to facilitate the disabled, the elderly or the women and children. ADA compliance applies a lot of components of the building, but the restroom can be especially tricky to get past the code. The restroom is a relatively small space that involves many different elements and in addition to the requirements for each element, the relationship between the elements and the elements also have corresponding requirements, for example, “the seat height of a water closet above the finish floor shall be 17 inches (432 mm) minimum and 19 inches (483 mm) maximum measured to the top of the seat. Seats shall not be sprung to return to a lifted position. Seats shall be 2 inches (51 mm) high maximum”( International Code Council, 2016). Any small mistakes may cause legal lawsuits. According to the 2010 ADA, standards for a single-user restroom are: • “30-inch by 48-inch access to the sink (the door can’t swing into this rectangle). The measurement starts from the point where a person has 9-inch vertical clearance for their feet and 27-inch vertical 35 clearance for their knees” ( U.S. Department of Justice, 2010). • “The centerline of the toilet must be between 16 and 18 inches from the sidewall”. • “A clear circle of at least 60 inches around the sidewall and 56 inches from the rear wall to allow a wheelchair to turn (the door cannot swing into the minimum required area for wheelchair-accessible toilet components)” ( U.S. Department of Justice, 2010). • “A toilet seat height of 17-19 inches”( U.S. Department of Justice, 2010)(Figure 2. 3). Figure 2. 3 Standard ADA code compliance single-user restroom (U.S. Department of Justice, 2010) Different codes have different requirements for the design of accessible toilets. The following table summarizes the five design specifications currently implemented for certain requirements that affect public restroom design and specification (Table 2.3). Table 2. 3 Accessibility standard for restroom design (U.S. Department of Justice ,Texas Department of Licensing and Regulation ,International Code Council ,LADBS ) Technical Requirement 2010 ADA Standard 2012 TAS A117.1-2009 A117.1-2017 2019 CBC Title 24 Part 2, Chapter 11B Clear floor space (front approach) 30” wide x 48” length min 30” wide x 48” length min 30” wide x 48” length min Existing building: 30” wide x 48” length min New building: 30” wide x 48” length min 36 30” wide x 52” length min. Operable part Operable part other than toilet tissue dispensers 15” min./48” max 15” min./48” max 48” max 48” max 40” max Toilet tissue dispensers 15” min./48” max 15” min./48” max 18” min./48” max 18” min./48” max 19” min./48” max Mounting Height over counters > 20” deep 48” max 48” max 48” max 48” max 40” max Mounting Height over counters < 20” deep 44” max 44” max 44” max 44” max 40” max Wheelchair turning space circular 60” min. dia 60” min. dia 60” min. dia Existing building: 60” min. dia New building: 67” min. dia 60” min. dia Wheelchair turning space T-Shaped 60” min. square; 36” wide min arms and base 60” min. square; 36” wide min arms and base 60” min. square; 36” wide min arms and base Existing building: 60” min. square; 36” wide min arms and base New building: 68” wide; 60” deep rectangle; 36” wide min. arms and base, or two 64” wide by 60” min. deep rectangular options with two arms 38” min. wide 60” min. square; 36” wide min arms and base 37 based 42” min. wide, two arms, base 40” min. width. Accessible Lavatory Height 34” max. 34” max. 34” max. 34” max. 34” max. Knee Clearance 27” min. extend 8” min. under the front edge 27” min. extend 8” min. under the front edge 27” min. extend 8” min. under the front edge 27” min. extend 8” min. under the front edge 27” min. extend 8” min. under the front edge Toe Clearance 9” min. extend 17” min. to 25” max. under lavatory 9” min. extend 17” min. to 25” max. under lavatory 9” min. extend 17” min. to 25” max. under lavatory 9” min. extend 17” min. to 25” max. under lavatory 9” min. extend 17” min. to 25” max. under lavatory Controls Operable one hand, less than 5 lbs force. Without tight grasping, pinching of the fingers, or twisting of the wrist. Operable one hand, less than 5 lbs force. Without tight grasping, pinching of the fingers, or twisting of the wrist. Operable one hand, less than 5 lbs force. Without tight grasping, pinching of the fingers, or twisting of the wrist. Operable one hand, less than 5 lbs force. Without tight grasping, pinching of the fingers, or twisting of the wrist. Operable one hand, less than 5 lbs force. Without tight grasping, pinching of the fingers, or twisting of the wrist. Protruding Object At or below 27” project any amount. Between 27” and 80” above the finish floor, protrude 4” max. maintain required min. clear width of the adjacent access aisle At or below 27” project any amount. Between 27” and 80” above the finish floor, protrude 4” max. maintain required min. clear width of the adjacent access aisle At or below 27” project any amount. Between 27” and 80” above the finish floor, protrude 4” max. maintain required min. clear width of the adjacent access aisle At or below 27” project any amount. Between 27” and 80” above the finish floor, protrude 4” max. maintain required min. clear width of the adjacent access aisle At or below 27” project any amount. Between 27” and 80” above the finish floor, protrude 4” max. maintain required min. clear width of the adjacent access aisle Mirror Above lavatories or countertops Reflecting surface bottom 40” max. above the finish floor. Reflecting surface bottom 40” max. above the finish floor. Reflecting surface bottom 40” max. above the finish floor. Reflecting surface bottom 40” max. above the finish floor. Reflecting surface bottom 40” max. above the finish floor. 38 Not above lavatories or countertops Reflecting surface bottom 35” max. above the finish floor. Reflecting surface bottom 35” max. above the finish floor. Reflecting surface bottom 35” max. above the finish floor. Reflecting surface bottom 35” max. above the finish floor. Reflecting surface bottom 35” max. above the finish floor. Toilet Compartment Wheelchair accessible 60” min. width 60” min. width 60” min. width 60” min. width 60” min. width Front or side entrance 56” min. depth wall-mounted toilet. 59” min. depth floor-mounted toilet. Toilet centerline 16” – 18” sidewall/panel. Toilet diagonally across from the door 56” min. depth wall-mounted toilet. 59” min. depth floor-mounted toilet. Toilet centerline 16” – 18” sidewall/panel. Toilet diagonally across from the door 56” min. depth wall-mounted toilet. 59” min. depth floor-mounted toilet. Toilet centerline 16” – 18” sidewall/panel. Toilet diagonally across from the door 56” min. depth wall-mounted toilet. 59” min. depth floor-mounted toilet. Toilet centerline 16” – 18” sidewall/panel. Toilet diagonally across from the door Add detail on the longer compartment. 84” long min. Min 60” wide x 36” min. deep maneuvering space in front of toilet on compartment with side opening door; min 60” wide x 48” deep maneuvering space in front of toilet on compartment with end opening door. Toilet centerline 16” – 18” sidewall/panel. Toilet diagonally across from the door. Requires 92” - 95” long components, with inswinging door Large wheelchair accessible, side door, end of room alcove 60” min. wide 90” min. length. Ins-swing door does not overlap 56” x 60” min. wide 90” min. length. Ins-swing door does not overlap 56” x 60” min. wide 90” min. length. Ins-swing door does not overlap 56” x 60” min. wide 90” min. length. Ins-swing door does not overlap 56” x 60” min. wide 90” min. length. Ins-swing door does not overlap 56” x 39 60” clear floor space at the toilet 60” clear floor space at the toilet 60” clear floor space at the toilet 60” clear floor space at the toilet 60” clear floor space at the toilet Ambulatory accessible 60” min. depth. 35” min. to 37 max. width. Outswing, self-closing door 6 or more plumbing fixtures ( toilets and urinals) in restroom require ambulatory accessible toilet compartment in addition to wheelchair- accessible toilet compartment 60” min. depth. 35” min. to 37 max. width. Outswing, self-closing door 6 or more plumbing fixtures ( toilets and urinals) in restroom require ambulatory accessible toilet compartment in addition to wheelchair- accessible toilet compartment 60” min. depth. 36” width. Outswing, self-closing door 6 or more plumbing fixtures ( toilets and urinals) in restroom require ambulatory accessible toilet compartment in addition to wheelchair- accessible toilet compartment 60” min. depth. 35” min. to 37 max. width. Outswing, self-closing door 6 or more plumbing fixtures ( toilets and urinals) in restroom require ambulatory accessible toilet compartment in addition to wheelchair- accessible toilet compartment 60” min. depth. 35” min. to 37 max. width. Outswing, self-closing door 6 or more plumbing fixtures ( toilets and urinals) in restroom require ambulatory accessible toilet compartment in addition to wheelchair- accessible toilet compartment Partition toe clearance 9” high min. above the finish floor for adults. Above the finish floor for children front and one side wheelchair accessible toilet compartment exclusive of partition stile. Toe clearance must extend 6” min. beyond the panel door. Toe clearance not required in compartment greater than 66” wide depth greater than 9” high min. above the finish floor for adults. Above the finish floor for children front and one side wheelchair accessible toilet compartment exclusive of partition stile. Toe clearance must extend 6” min. beyond the panel door. Toe clearance not required in compartment greater than 66” wide depth greater than 9” high min. above the finish floor for adults. Above the finish floor for children front and one side wheelchair accessible toilet compartment exclusive of partition stile. Toe clearance must extend 6” min. beyond the panel door. Toe clearance not required in compartment greater than 66” wide depth greater than 12” high min. above the finish floor for adults. Above the finish floor for children front and one side wheelchair accessible toilet compartment exclusive of partition stile. Toe clearance must extend 8” min. beyond the panel door. Toe clearance not required in compartment greater than 68” wide depth greater than 9” high min. above the finish floor for adults. Above the finish floor for children front and one side wheelchair accessible toilet compartment exclusive of partition stile. Toe clearance must extend 6” min. beyond the panel door. Toe clearance not required in compartment greater than 66” wide depth greater than 40 62” deep with wall- mounted toilet or 65” deep with a floor-mounted toilet 62” deep with wall- mounted toilet or 65” deep with a floor-mounted toilet 62” deep with wall- mounted toilet or 65” deep with a floor-mounted toilet 64” deep with wall- mounted toilet or 67” deep with a floor-mounted toilet 62” deep with wall- mounted toilet or 65” deep with a floor-mounted toilet Door opening 32” min. clear width with door open 90 degree 32” min. clear width with door open 90 degree 32” min. clear width with door open 90 degree 32” min. clear width with door open 90 degree 32” min. clear width with door open 90 degree Toilet seat height to top of the seat 17” min. 19” max 17” min. 19” max 17” min. 19” max 17” min. 19” max 17” min. 19” max Grab bar Diameter 1 1/4” min. 2” max ovals, rounded rectangles allowed. Measure mounting height to top of the gripping surface 1 1/4” min. 2” max ovals, rounded rectangles allowed. Measure mounting height to top of the gripping surface 1 1/4” min. 2” max ovals, rounded rectangles allowed. Measure mounting height to top of the gripping surface 1 1/4” min. 2” max ovals, rounded rectangles allowed. Measure mounting height to top of the gripping surface 1 1/4” min. 2” max ovals, rounded rectangles allowed. Measure mounting height to top of the gripping surface Side wall 42” min. length located 12” max from the rear wall, extends 54” min. from the rear wall 42” min. length located 12” max from the rear wall, extends 54” min. from the rear wall 42” min. length located 12” max from the rear wall, extends 54” min. from the rear wall 42” min. length located 12” max from the rear wall, extends 54” min. from the rear wall 42” min. length located 12” max from the rear wall, extends 54” min. from the rear wall The rear wall ( nor required in accessible ambulatory compartment) 36” min. length. 24” min. the length required on the open side of toilet centerline 36” min. length. 24” min. the length required on the open side of toilet centerline 36” min. length. 24” min. the length required on open side of toilet centerline 36” min. length. 24” min. the length required on the open side of the toilet centerline. Installed a max of 6” from the corner and extending a minimum of 42” from corner 36” min. length. 24” min. the length required on the open side of toilet centerline 41 Mounting height 33” min. to 36” max above the finish floor 33” min. to 36” max above the finish floor 33” min. to 36” max above the finish floor 33” min. to 36” max above the finish floor 33” min. to 36” max above the finish floor Vertical Grab bar N/A N/A 18” long min. vertical grab bar located 39” to 41” off the rear wall and beginning 39 – 41” above the finish floor 18” long min. vertical grab bar located 39” to 41” off the rear wall and beginning 39 – 41” above the finish floor N/A Accessible adjacent to grab bar Above grab bar No protruding accessory closer than 12” to top of the grab bar No protruding accessory closer than 12” to top of the grab bar No protruding accessory closer than 12” to top of the grab bar No protruding accessory closer than 12” to top of the grab bar No protruding accessory closer than 12” to top of the grab bar Below grab bar Space between the grab bar and protruding accessory below shall be 1 1/2” min. Space between the grab bar and protruding accessory below shall be 1 1/2” min. Space between the grab bar and protruding accessory below shall be 1 1/2” min. Space between the grab bar and protruding accessory below shall be 1 1/2” min. Space between the grab bar and protruding accessory below shall be 1 1/2” min. Behind Grab bar Must have 1 1/2” clear space between the inside of grab bar and panel, wall surface Must have 1 1/2” clear space between the inside of grab bar and panel, wall surface Recessed accessory permitted behind grab bar. Max. protrusion into 1 1/2” clear space behind grab bar is 1/4” Recessed accessory permitted behind grab bar. Max. protrusion into 1 1/2” clear space behind grab bar is 1/4” Must have 1 1/2” clear space between the inside of grab bar and panel, wall surface Roll toilet tissue location Locate dispenser centerline 7” min. 9” max. in front of the leading edge of toilet Locate dispenser centerline 7” min. 9”max. in front of the leading edge of toilet Locate 24” min. and 42” max. from the rear wall of the toilet compartment Locate 24” min. and 42” max. from the rear wall of toilet compartment dispenser of two rolls not more than 5” dia. allowed. centerline 7” min. 9” max. Locate dispenser centerline 7” min. 9” max. in front of the leading edge of the toilet 42 in front of the leading edge of the toilet Height bottom of lowest toilet tissue dispenser outlet 15” min above the finish floor 15” min above the finish floor 18” min above the finish floor 18” min above the finish floor 19” min above the finish floor Height toilet tissue dispenser outlet 48” max above the finish floor 48” max above the finish floor 48” max above the finish floor 48” max above the finish floor 40” max above the finish floor Toilet seat cover dispenser Opening mounting 48” max 48” max 48” max 48” max 40” max lowest mounting height 15” min. above the finish floor 15” min. above the finish floor 18” min. above the finish floor 18” min. above the finish floor 19” min. above the finish floor Urinals Urinals location At least one with rim 17” max. above the finish floor, 13 1/2” min. depth At least one with rim 17” max. above the finish floor, 13 1/2” min. depth At least one with rim 17” max. above the finish floor, 13 1/2” min. depth At least one with rim 17” max. above the finish floor, 13 1/2” min. depth At least one with rim 17” max. above the finish floor, 13 1/2” min. depth Flush value 48” max. height above the finish floor. If reach for flush value > 20” 44” max. height 48” max. height above the finish floor. If reach for flush value > 20” 44” max. height 48” max. height above the finish floor. If reach for flush value > 20” 44” max. height 48” max. height above the finish floor. If reach for flush value > 20” 44” max. height 40” max. height above the finish floor. 2.5 Current code check tools Since the emergence of BIM technology, the industry has seen the development of several great tools that are being used today, such as SMARTreview™ APR, UpCodes AI, and Daima, etc. These tools can all run on the Revit model, and the specifications for each software check are different. 43 2.5.1 SMARTreview The SMARTreview™ APR™ is an automated plan review software developed by Professor Mark J. Clayton from Texas A&M University (https://smartreview.biz/home). SMARTreview is written in C# and works as a plug-in to Autodesk Revit. It adopts the International Building Code and mainly focuses on building occupancy, size of the building, construction type, and fire rating (Clayton, 2014). The plug-in did not cover any accessible design code. There is no other software that has been focusing on the fire rating part. The software requires that the user input type of construction, property location, and allowable floor area to calculate the occupancy requirement. Also, it also requires many parameters to be set up and their values defined, which is a little bit inconvenient. The highlight of this program is that for some settings that are not familiar to users, after running the plugin, a set of views specific to the code comparison will be generated, and also will set some parameters in the model element. The software will generate a text report after running the plug-in. All the failed code checks will be highlighted in the report. However, from a user perspective, if the user is not very familiar with the building code, it may confuse the user (Figure 2. 4) Figure 2. 4 SMARTreview™ APR™ interface (SMARTreview, 2018) 44 2.5.2 Upcode AI Upcode is an online web-based building code search engine (https://up.codes/?s). It collects most of the building code currently used in the industry. It is a very convenient tool for the architect and engineer. In 2019, the company published a new product called Upcode AI (https://up.codes/features/ai). It is a Revit plug-in that can do part of the ADA standard check and some part of the building code check. For the ADA standard, the software focuses on four major elements and check the dimensional standards (Table 2. 4). This software has done a great job in data visualization. All the failed parts can be displayed in the 2d or 3d section, and all the corresponding detailed regulation terms are visible to the user and can also generate reports. It is very clear to the users (Figure 2. 5). Table 2. 4 UpCode ADA code check (UpCode, 2019) Bathrooms Mirror Bottom Edge Height Mirror Top Edge Height Required Ambulatory Stall Turning Space in Bathroom Doors Deep Frame Door Opening Minimum Door Width Push-Pull Clearance Grab Bar Grab Bar Spacing Above Grab Bar Spacing Below Grab Bar Wall Spacing Grab Bar Orientation Grab Bar Height Rear Grab Positioning Side Grab Bar Positioning Required Grab Bars Ramps Ramp Handrails on both side Ramp Handrails height Ramp Handrails Extension Ramp Clear Width 45 Ramp Landing Size Ramp Landing Slope Ramp Turning Landing Size Ramp Max Rise Ramp Slope Figure 2. 5 Upcode AI ADA code compliance example (Upcode AI, 2019) However, some problems were found in a test case. Firstly, the software did not provide detailed instructions to the user. It only provided project type input and code selection of the project. In the running window or setting window, the software did not explain the model set up before running the check. During the test phase, it was found that if no boundaries were set for the room or if there was no floor, the check would automatically skip some of the specification checks and pass the check by default (Figure 2. 6). This leads to some erroneous designs passing the specification check without the user's knowledge. In addition, the software claims can be run on Revit 2019 and 2020 platforms, but when there are two versions of Revit on a single computer, it can only be run in version 2020. 46 Figure 2. 6 Upcode AI missing instruction can cause a wrong design to pass the code check 2.5.3 Daima Daima is an ADA code compliance plug-in that runs on 2017, 2018 and 2019 versions of Revit that are also in beta test. According to the official website, this plugin can check the 3, 4, 5, and 6 sections of the ADA standard. The demo shows that the plugin is able to scan the model and highlight some elements that have not passed the check-in in the 3d model (Figure 2. 7). However, this plugin has not been released publicly, and only some internal test places are provided (Daima, 2019). 47 Figure 2. 7 Daima model check example (Daima, 2019) 2.6 Summary Through a brief history of accessible design regulations and the study on universal design, this chapter established a standard foundation for the ADC plug-in development. On the other hand, from the research of existing code compliance tools, it is important to link the regulations to the model elements and their parameters. How to convert the contents required in the specification into the relationship between the elements in the model will be an important point in the research and development specification inspection tool. 48 Chapter 3: Methodology This chapter introduces the overall workflow from the accessible design code collection, platform (Visual Studio) and model (Revit) preparation, plug-in development to test validation. In addition, how the text- based standard and the digital modeling software were connected to develop ADC plug-in is also discussed. The details about each section are explained in the tool development chapter, Chapter 4. 3.1 Overall methodology diagram There are four steps in the workflow (Fig. 3.1). The first part is the collection and classification of specifications (restroom/bathroom accessible design codes collection); the specification of this part will become the inspection standard for tools. The second part is the construction of the platform (platform set up), which mainly involves what platform to use, add related reference packages before writing the program and how to establish the relationship with the Revit model. The third part is the process of specific tool design (ADC plug-in development), and the final step is testing of three alternatives using the ADC plug- in (test). Figure 3. 1 Overall methodology diagram 49 3.2 Restroom and bathroom accessible design code collection Based on a large number of accessibility specifications, a prototype plugin called ADC (Accessible Design Consultant) plug-in was developed that focuses on restroom-related building code. A restroom was chosen as the study target because a restroom contains a lot of elements and relevant specifications are also integrated. The relationship between these elements works well as a prototype to develop the ADC plug-in. In order to achieve the code check conditions related to restrooms, the first step is to collect and sort out existing building codes for accessible restroom design, reference design solutions for the accessible restroom in the universal design and interview experienced experts for advice on existing restroom designs. All of the collected information serves as a reference standard for the ADC plug-in. It is mandatory to follow the local building code accessible design requirements of a specific city. Some states have added and modified some requirements on the premise of fully inheriting the ADA requirements, such as California. The idea of universal design is also worthy of reference outside the building code. Because the ADA Standard has been developed for many years, some standards are not able to adapt well to the needs of current users. The purpose of universal design is based on the needs of all people. Therefore, the ADC plug- in gives some additional design advice to the qualified design based on the universal design solution. The universal design solution and the experts’ opinions are intended to promote people's attention to design accessibility. 3.2.1 Restroom and bathing facilities requirements from ADA standard and CBC ADA Standard and CBC accessible design guidelines are divided into ten chapters according to the area and function of the building. The main part related to the restrooms is in chapter 6 – Plumbing Elements and Facilities. Most of it involves clearance in different types of restrooms for the height and location of the sink, water closet, and urinal, and the position of the grab bars. There are also requirements for the size and position of the bathtub in a bathroom. The size of the door also has specific requirements for the direction of opening and the door swing space. The requirements of CBC will be mainly adopted as the 50 checking standard of the tool. For some part that CBC does not cover or has the same requirement as the ADA Standard, the ADC plug-in will follow the ADA Standard. According to the requirements of the CBC, a standard single restroom must have at least 30 inches by 48 inches of clear floor space in front of the sink, and the sink locates at 18 inches minimum from the sidewall to its centerline. The toilet needs to have a 17 to 18 inches space from the sidewall to its centerline. In addition, the restroom must have enough space to allow the wheelchair to rotate 180 degrees. This can be achieved by retaining a net floor space of 60 inches in diameter or by creating a 36-inch wide T-space to allow the wheelchair to make a three-point turn. Up to 19 inches of clean floor space can be located under the sink or other fixtures. A horizontal grab bar should be installed on the wall closest to the toilet and behind the toilet at the height between 33 to 36 inches. All dispenser type accessories have a 40 inches max tp highest operable part, such as the paper towel, waste receptacle, and hand dryer. The specific specifications and the differences between the ADA Standard and CBC are shown in the table below (Highlight codes are covered by prototype ADC plug-in) (Table 3. 1). Table 3. 1 Accessible code for single-user restroom comparison (Kent, 2017) 2010 ADA Standard 2019 CBC Title 24 Part 2, Chapter 11B Sink Lavatory clean space 30”x48” clean space in front of the lavatory for a forward approach - Clean space goes underneath the sink Minimum depth of 17” to 25” maximum Minimum depth of 17” to 19” maximum Knee clearance below the sink From 9” to 27” is 11” min deep tapering to 8” min deep at the top Tapers from 29” to 27” at 8” back Toe clearance below the sink From 0 to 9” extends 6” maximum beyond the knee clearance 17” minimum to 19” maximum clean floor space below the sink. Sink height 34” maximum - Sink location - 18” minimum from the sidewall Toilet fixture Toilet location 16” to 18” maximum from the sidewall 17” to 18” maximum from the sidewall Clean space 60” wide measured along the plumbing wall by a minimum of 56” deep in a single Additional 36” clear in front of the toilet clear space for in-swinging doors. 51 restroom. A 59” deep required for a toilet stall in multi-user restroom. A turning space of a 60” diameter or a 60” x60” T- shaped space with two 12” x24” notches removed 60” wide by 48” deep clean space in front of the toilet Toilet height 17” to 19” from the floor to top of the seat 2” max seat height urinal Clean space 30” x 48” clear floor space in front of the urinal - Urinal location 13 ½” minimum deep from the back wall to the outer face of the urinal and 17” maximum from the floor to the urinal - Grab bar Grab bar location 33” to 36” from the floor to the top 12” maximum from the back wall and extends 54” minimum from the back wall located 12” maximum from the back wall and 24” minimum in front of the toilet Grab bar clearance 12” clearance above the grab bar, 1 ½” clearance below the grab bar 1 ½” minimum clear to the wall and 6” clearance on both ends Mirror Mirror location 40” maximum from the floor to the bottom and recommend 74” minimum from the floor to the top For the full-length mirror, it requires 20” maximum from the floor to the top clearance 30” by 48” minimum clear floor space at each accessible accessory - Mirror size - Full-length mirror size 18” by 54” Door Door size 32” minimum clean opening Door clearance The door can swing in the turning space 12” max overlap of door swing with maneuvering space For multi-user restrooms, a 5% minimum need to be accessible. There are more requirements for the toilet compartment in the multi-user restroom (Table 3.2). Table 3. 2 Accessible code for multi-user restroom comparison(Kent, 2017) ADA Standard CBC accessible design Clean space 1. The room outside of the stall requires a 60” diameter or a 60” by 60” T-shaped space with two 12” x24” notches 1. Install door has a 48” clearance on the push side and 60” clearance for the pull side 52 2. The stall door has a 42” clearance for the latch side 2. Compartment with end opening door has a 60” wide by 48” deep clear space in front of the toilet 3. Compartment with side opening doors has a 60” by 60” clear space in front of the toilet 4. All stalls with an in-swing door have an additional 60” wide by 36” deep clean floor space in front of the toilet Path of travel 36” wide 44” wide Door size 32” clean minimum opening 34” clean minimum opening 3.2.2 Universal design solution related to restroom and bathroom Many solutions from universal design for the restroom are designed to provide greater convenience to everyone, although some solutions require more space. For example, the isUD solution requires all toilet and bathing facilities have a clear floor space on at least on the side of all toilets (Figure 3.3). However, most of the solutions are in the design development or operation phase -- for example, all toilets and bathing facilities need to have a full-length mirror. All the toilets need to have a touchless flush control, and there need to be at least one of the toilet has an adjustable seat. These solutions are not included in any building code or mandatory, but can bring a lot of benefits, which is why the tool chooses to provide some solutions of the universal design as suggestions to some designs that pass the code check. Figure 3. 2 ADA Complained accessible restroom (left) and Universal Design solution example (right) comparison (isUD, 2019) 3.2.3 Opinion from the certified accessible specialist In addition to the ADA Standard and building code, interviews with experienced access specialists are also included in the standard settings for the ADC plug-in. Due to the complexity of the regulations, it involves 53 many details. When architects are in the process of designing, some code violations might be missed. In addition, due to the early setting of regulations, the update in the section of the accessibility specification is not very frequent. The experienced experts in this area can provide many useful opinions to help architects avoid some easy mistakes in the design process and provide them with some opinions outside the regulations. A questionnaire was set up to collect expert advice on the design of accessible restrooms and the most frequently found problems when they were reviewing the restroom plan. In order to get a sufficient answer, a total of five open-ended writing questions were designed, and no private information was involved (Table 3.3). The questionnaire will be sent to qualified experts (there is a list published by the government.) All solicitation suggestions will be collated and presented as additional design comments to the user. Table 3. 3 Certified access specialist survey 1. How long have you been working as a certified access specialist? 2. Do you use any software assist you when you do plan check or inspection? 3. When you do the plan check or inspection, what are the common mistakes the designer usually made? 4. From your expert perspective, what do you think of the existing ADA standard and CBC accessible design code? What is the advantage? What is the limitation? 5. Do you have any opinion regarding accessible restroom design (besides standard) 3.2.4 Categorized the standard Due to the complexity of design standards and in order to simplify checking time and increase efficiency, the prototype ADC plug-in will only check for some code requirements. The design code is divided into digitizable standards or non-digitizable standards. At this stage, ADC is mainly aimed at digitizable design standards. All of the digitizable standards can be divided into parameter category, existential category, quantitive category, and interaction category. A parameter category is focusing on a specification with a specific value. An existential category refers to whether an element exists. A quantitive category is the number of elements in a specific area. An interaction category shows the relationship between different 54 elements. examples can be further subdivided into the following based on their data characteristics pointing to BIM model objects: • Element parameter category, such as “the toilet height need to be 17” to 19” from the floor to top of the seat”( International Code Council, 2016). • Element existential category, such as “all accessible restroom need to have a full-length mirror” (International Code Council, 2016). • Element quantitive category, such as “for all toilets in the public restroom, there need to be 5% toilets are accessible”( International Code Council, 2016). • Elements interaction category, such as “the restroom sink need to be 18” minimum from the sidewall”(International Code Council, 2016). This subdivision sorts out a variety of inspection paradigms from various complicated inspection problems, and the basic ideas and key functions of the algorithms used in each code check paradigm are similar. Therefore, with this strategy, as long as one of the problems of one type of code check can be completed, then such clauses can be solved. The ADC plug-in prototype only focuses on the parameter, existential and interaction categories. After segmenting the specification, the next step is to judge whether it can be implanted in the family as a parameter when creating a custom family based on the type of the specification. For example, the mirror reflecting surface bottom should be 35” max. above the finish floor (International Code Council, 2016). if the mirror is not above lavatories or countertops, this code can be implanted in the mirror family as a parameter called “default elevation” (Figure 3. 3). It represents the distance from the finish floor to the mirror. This step is very complicated. Although some specifications are numeric, it may be more convenient to create void or extrusion in a custom family and check for collisions. For example, the distance between the centerline of the toilet and the sidewall needs to be 17 to 18 inches. Such a specification cannot directly establish a parameter to indicate that the specification requires a range rather than a specific value. For example, the CBC code requires “the water closet shall be positioned with a wall or partition to the rear and 55 to one side. The center-line of the water closet shall be 17 inches (432 mm) minimum to 18 inches (457 mm) maximum from the side wall or partition”( International Code Council, 2016). In this case, The Revit API cannot determine the direction of the wall closest to the toilet, and the specification does not require a certain value. ADC plug-in uses the minimum value to build a customized toilet family with the 17 inches clearance inside of the family, and build another customized family with the maximum value 18 inches clearance. When users run the ADC plug-in, it will check the minimum value first. If the distance from the centerline of the toilet to the sidewall less than 17 inches, it failed the code check. Otherwise, it will run the maximum value toilet family to check if the distance from the sidewall to the centerline is less than 18 inches (Figure 3. 4). Figure 3. 3 Customized accessible family parameter example 56 Figure 3. 4 Customized code-compliant families showing the side clearance of a toilet 3.3 Platform set up Microsoft Visual Studio is an integrated development environment for creating applications. It was chosen to call the Revit API to write the ADC plug-in. One reason to use Visual Studio is that the Revit API execution of Visual Studio programs is efficient. Users can reference RevitAPI and RevitUIAPI libraries in Visual Studio to call Revit APIs in Revit-supported programming languages such as C#, Visual Basic, and C/CLI to create Revit plug-in to access Revit model parameter, parametric modeling, create a view, or custom Revit uses interfaces. C# is one of the most widely used programming languages for developing the ADC tool's interface and underlying logic. Before starting to write the C# code, it is important to set up the platform. Visual Studio 2017 was downloaded and various .NET frameworks, as well as .Net Core is installed. According to the Revit official website, Revit 2019 corresponds to the .NET Framework 4.7 (Figure 3.4). It is also important to download the Revit SDK 2019. It contains the Revit SDK file and AddInManager, which is used to allow external secondary development. The AddInManager is the official plugin for Autodesk. It is a plugin for loading Revit, which allows Revit to modify the plugin code and load and run it again without rebooting (Figure 3.5). 57 Figure 3. 5 Visual Studio installer(Microsoft, 2019) Figure 3. 6 Revit Add-in Manager and Revit Lookup 3.4 Model preparation ADC is a plug-in for Revit and only runs on the Revit platform. Therefore the code check only works on Revit models. And because the standard inspection involves three-dimensional data, all families need to be set to 3D, such as sinks and toilets. There are two types of sinks and toilets, 2D and 3D in the library that comes with Revit. ADC only works on the 3D model. Before running the ADC, the user needs to ensure that the elements involved are all 3D, and ADC has certain requirements for the names of the elements. After studying the accessible design code, the restroom related fixtures include sinks, toilets, grab bars, urinals, mirrors, and doors. In the setting of Revit, these fixtures other than doors belong to the two categories of plumbing fixtures and special equipment, and doors belong to the door category (Table 3. 4). The ADC plug-in will determine whether an element belongs to the family covered by the specification 58 according to the name of the family when filtering the elements. All related elements in the project should contain the corresponding family name. Specific requirements are explained in detail in Chapter 4. Table 3. 4 Restroom related family Categories Included family Plumbing Fixtures Sink, Toilet, Urinals Special Equipment Mirror, Grab Bar Door Door 3.5 ADC Plug-in development The development of the ADC plug-in is divided into two sections: the programming section and the modeling section. The programing section includes mainly three steps. The first step is to identify and filter the model element, and then depending on the type of standard, two methods are used to finish the code check process. The final step in the programming section is the results visualization. The modeling section is to create custom families that conform to the specifications according to the previously distinguished design code. These created families will be loaded into the project when running the ADC plugin. Figure 3. 7 ADC Plug-in development workflow 3.5.1 Identify the element Revit API provides a way of filtering and iterating through all the elements in a Revit file (similar to a loop in a computer program). This is a good way to select a set of related elements, such as all the toilets or sinks in the file. For example, for a multi-level project with multiple user restrooms, manually selecting each element is annoying and could be subject to error. Filters can also be used to find a specific set of elements, such as a type of door of a particular size. The steps to get the primitive by setting up the filter are as follows: 59 1. Create a new FilteredElementCollector. 2. Apply one or more filters to it. 3. Get the filtered elements. The example shows how to filter and get all the plumbing fixtures in a project (Figure 3. 8). Figure 3. 8 How to get all plumbing fixtures through Revit API The Revit API has several element filters built-in: quick filters, slow filters, and logic filters. ElementFilter is a class that filters whether an element meets certain criteria. The ElementQuickFilter only read a limited amount of element information. This information does not need to load all the element information into memory, so it is faster. For example, ElementCategoryFilter could get all elements of a specific category. The ElementSlowFilter requires more information and will require all information of the element to be read into memory. Such as the ElementLevelFilter, which can get all elements from a certain level. And the ElementLogicalFilter combines multiple filters. There are more subdivided filters for users to choose from under these different filter types (Autodesk, 2016) (Figure 3. 9). Figure 3. 9 Revit built-in slow filter example (Autodesk help, 2015) 3.5.2 Customize code-compliant Revit families The method adopted by the ADC plug-in development is to convert the values required by the design specifications into constraints in the custom family, and then place these custom families in the position of the corresponding type of elements in the project to determine whether there is a collision to check compliance with design specifications. For example, the figure below shows the toilet does not meet the code requirement “the toilet location should be 17 to 18 inches from the centerline to the sidewall” 60 (International Code Council, 2016) (Figure 3. 10). All porotype ADC covered elements and related building code is shown in table 3.5. Figure 3. 10 Example shows the customize family code check Table 3. 5 ADC covered element and related accessible design code (International Code Council, 2016) Family type Related building code Customized code-complaint family example ADC Checking Method Toilet “The water closet shall be positioned with a wall or partition to the rear and to one side. The center-line of the water closet shall be 17 inches (432 mm) minimum to 18 inches (457 mm) maximum from the side wall or partition.” Placing customized family “Clearance around a water closet shall be 60 inches (1524 mm) minimum measured perpendicular from the side wall and 56 inches (1422 mm) minimum measured perpendicular from the rear wall. A minimum 60 inches (1524 mm) wide and 48 inches (1219 mm) deep maneuvering space shall Placing customized family 61 be provided in front of the water closet.” “11B-304.3.1 Circular space The turning space shall be a space of 60 inches (1524 mm) diameter minimum. Space shall be permitted to include knee and toe clearance complying with Section 11B-306.” Placing customized family Sink “11B-606.6 Adjacent side wall or partition Lavatories, when located adjacent to a side wall or partition, shall be a minimum of 18 inches (457 mm) to the centerline of the fixture.” Placing customized family “The clear floor or ground space shall be 30 inches (762 mm) minimum by 48 inches (1219 mm) minimum.” Placing customized family Knee Clearance: 27” min. height extend 8” min. under the front edge Toe Clearance: 9” min. in height extend 17” min. to 25” max. under lavatory Placing customized family Mirror “Mirrors located above lavatories or countertops shall be installed with the bottom edge of the reflecting surface 40 inches (1016 mm) maximum above the finish floor or ground. Mirrors not located above lavatories or countertops shall be installed with the Reading parameter 62 bottom edge of the reflecting surface 35 inches (889 mm) maximum above the finish floor or ground”. Grab Bar “Grab bars shall be installed in a horizontal position, 33 inches (838 mm) minimum and 36 inches (914 mm) maximum above the finish floor measured to the top of the gripping surface, except that at water closets for children’s use complying with Section 11B-604.9”. Placing customized family 3.5.3 Read parameter method The first method adopted in the programming process is to read the parameters directly. This type of method is suitable for those specifications that can be established as parameters with certain specific values. For example, the toilet height needs to be 17” to 19” from the floor to the top of the seat. For this specification, the toilet in the Revit library has a parameter called mounting height (Figure 3. 11). In this case, ADC can directly read the value of the parameter to compare with the value required by the specification. 63 Figure 3. 11 Parameter example of an element in Revit 3.5.4 Get element location The second method used by the ADC development is to obtain the position of the element in the project, and then place the custom family that meets the specification's requirement in the same location. Because the custom family made the extrusion of the clearance limited by the specification. After placing the custom family, the next step is to determine whether there is a collision with other elements to see if it meets the specifications. There are two ways to obtain the XYZ coordinates of the element. One is to read the location point of the family instance. This method obtains the relative position of the element origin point in the project. For example, the toilet family in the project was built from the upper left corner, then when the user loads this family into a project, and read the location point of this toilet family, it will show the left corner XYZ coordination. Then it brings up a problem. In users model, it is impossible to determine the origin of each element they use is the same start point of the customized family used in ADC plug-in. Therefore, ADC uses the method of the bounding box. The bounding box is an invisible 3D rectangular space containing all model elements, annotation elements, and datum elements defined in the elements of the corresponding family (Autodesk, 2019). By reading the two corner points of the bounding box (the max and min), the position of the center point of the family can be calculated, and then projecting this point to the XZ plane 64 can get the XYZ coordinates of the family relative to the horizontal level. The creation of custom families in the ADC plugin is started from the lowest point of the center point. For example, when building the code- compliant custom sink in ADC, it started from the red dot show in the picture (Figure 3.8). Using the bounding box can avoid the problem of uncertain user-defined family origins. Figure 3. 12 ADC code complained sink origins. 3.5.5 Results visualization Different visualization schemes will be set according to different inspection terms to show the results. A pop-up reminder shows the process of each step when running ADC (Figure 3. 13). For an element that has not passed the code check, the element will be highlighted on the 3D model or 2d drawing to facilitate user positioning, while providing applicable specifications (Figure 3. 14). Design that passes the required specifications will be based on the design itself to provide universal design solutions or access specialist opinion as to the additional suggestion (Figure 3. 15). 65 Figure 3. 13 Pop up reminder showing the checking process Figure 3. 14 Failed code checking result showing the relative building code Figure 3. 15 passed code check result with design advice 66 3.6 Test Three case studies will be created to exam the ADC plug-in usability. The first one will give a compliant restroom design to test whether the tool can provide the correct response. The second test will select a non- compliant restroom to test whether the tool can detect the corresponding design error. The third example will use a code-compliant restroom that not parallel to the project coordinate system to test whether ADC can run the rotation function and provide the correct response (Figure 3. 16). See Chapter 5. Figure 3. 16 ADC Test cases set up 3.7 Summary Figure 3. 17 Overall methodology diagram 67 This chapter covers the entire workflow from restroom related accessible design specification collection, platform setup and model preparation, tool development to usability verification (Figure 3. 16). Understanding the text-based building code and transform the code restriction into the project building information model is the critical feature in ADC plug-in. As an automated code checking tool based on the BIM model, it plays an important role in translating text specifications into digital conditions and using the Revit API to perform the code check process. ADC can help with integrating text-based building code into building information model, and the automated checking helps the designer to find design limitation before the submittal. The tool adopts reading parameters in the Revit element method and placing customized family method to achieve the accessible code check. ADC covered elements, and accessible building code showed in table 3.5. It provides both visual results and related building codes to help the user locate and understand the error. Program development of the ADC function will be analyzed in detail in Chapter 4. 68 Chapter 4: Tool development This chapter explains how the ADC plug-in was developed in C# using Visual Studio. The development of this tool consists of coding in multiple steps. There are three parts: before programming, programming, and user preparation. The first part is further subdivided into platform setup and building the code- compliant family. The second part has five sub-sections: filter existing family, get family location, load and place code-compliant family, collision detection, and result visualization. These functions are assembled together to complete the whole ADC plug-in (Figure 4. 1). The entire code is in appendix A. Test cases using the plug-in are explained in Chapter 5. Figure 4. 1 Chapter 4 Diagram 4.1 Platform and model preparation Before starting the plug-in programming, the code platform must be set. The necessary references need to be loaded. At the same time, users have to pre-process the model before using the ADC. 4.1.1 Add Revit API reference One of the critical steps when coding a new Revit plug-in in Visual Studio is to add the necessary references. "RevitAPI" and "RevitAPIUI" are important; both files are in DLL format. DLL is an abbreviation for a 69 "dynamic-link library," and it contains the information needed to run a specific program. Both files are included in the Revit SDK. The purpose of adding references to Visual Studio is to declare these namespaces related to the Revit API and to ensure that all classes and methods under these namespaces are available for plug-in development (Figure 4. 2). Figure 4. 2 Add necessary references to Visual Studio 4.1.2 Add Manifest file Developer have to register their External commands and applications via a “.addin” manifest file (Figure 4. 3). The manifest file contains developer information, the path of the plug-in assembly file, the name of the plugin, and the description of the plugin. In this file, users need to create a unique ID for the plug-in. All plug-ins have their unique ID and it can be automated generated by Visual Studio – Create GUID (Figure 4. 4). Autodesk provides a series of manifest templates on the API user guide to the user for help. The default suffix name of the manifest file is .manifest. However, Revit only recognizes the “.addin” manifest file (Figure 4. 5). The manifest files are used to invoke plugins when Revit starts, and each assembly file is only valid for one plugin (Figure 4. 6). 70 Figure 4. 3 Add Manifest file Figure 4. 4 Create Add-in ID Figure 4. 5 Change suffix name of the manifest file Figure 4. 6 Load ADC plug-in when start Revit 71 4.1.3 Family name conversion The user might have used different Revit families in their bathroom project files. Because in many cases, the families used in the user's project are not included in the Revit library, for example, they might come from a bathroom fixture supplier or are created by the user, they do not use standard names. This will cause a problem on how to determine which family type these families are. Because ADC filters the elements according to the name of the family, under the premise that the user is not required to select each restroom related family manually, the user is required to pre-process their models for each restroom related family, The name of the family must contain the word of the corresponding family type. For example, the name of the toilet family must contain at least a "toilet" or “water closet” keyword (Figure 4. 7). Users can edit and change the name of the family through the rename command in Revit in the type properties. Figure 4. 7 Family name conversion example The keywords required for the toilet-related families must follow specific guidelines (Table 4. 1). Table 4. 1 Family name keywords Family type Must contain keyword (Not case sensitive) Toilet Toilet, water closet Sink Sink, lavatory Mirror Mirror 72 Grab Bar Grab bar Urinals Urinal Door Restroom door, bathroom door, toilet door A user is required to check the model before running ADC. Most of the families covered by the accessible design code belong to the plumbing fixture and special equipment in the Revit setting. After filtering all the plumbing fixtures in the 3D model, the program reads the family whose name contains specific characters (keyword) to determine which type it belongs to. For example, FilteredElementCollector.OfCategory.OST_PlumbingFixtures method can return a whole set of elements belong to the plumbing fixture category. ADC can determine each element in this category whether their name contains the keyword "toilet." Then this part of the code filters out the contained elements (Figure 4. 8). Figure 4. 8 Programing how to get all families that name contains “toilet” 4.2 Buildup customized code-compliant families When customizing the code-compliant Revit family, the family is composed of various geometries, and each geometry has its corresponding ID. However, Revit API does not have a class or command that can read part of extrusion or void inside of a family from a Revit project. Therefore, with the programming method used for clash detection, is was not possible to build all code restriction of one type of element into one customized family. For example, code restrictions of a toilet include side clearance and front clearance 73 (Figure 4.9, part 1). When the user implements this family into a project, Revit API treats this family as a whole geometry, and ADC cannot get the clearance geometry ID separately. So these restricted families have to be built separately (Figure 4. 9). Figure 4. 9 Code – compliant family example 4.2.1 Build code restriction into family Some restrictions are created together according to the requirements of the accessible design code, and some restrictions are established separately according to the requirements. For example, the toilet front clearance required that “The water closet shall be positioned with a wall or partition to the rear and to one side. The center-line of the water closet shall be 17 inches (432 mm) minimum to 18 inches (457 mm) maximum from the sidewall or partition” (International Code Council, 2016). When running the ADC, the plug-in cannot determine the direction of the sidewall. Therefore, it is necessary to establish restrictions on both the left and right sides (Figure 4. 10). According to the requirements, if the 17-inch clearance hits the wall, either the left or the right is not in compliance with the specification. But if neither side hits the wall, then the 18-inch clearance will run. According to the specification, the limit is between 17 and 18 inches, so the 18-inch limit will inevitably hit the wall to determine whether the user's design meets the toilet side clearance requirements. Figure 4. 10 Toilet front clearance example However, as the example shows in figure 4.5, these families correspond to the front clearance requirements of the toilet: “Clearance around a water closet shall be 60 inches (1524 mm) minimum measured perpendicular from the sidewall and 56 inches (1422 mm) minimum measured perpendicular from the rear wall. A minimum 60 inches (1524 mm) wide and 48 inches (1219 mm) deep maneuvering space shall be 74 provided in front of the water closet” (International Code Council, 2016). In the case of uncertain sidewalls of the toilet, if two clearances are established on both sides as the first example in figure 4.5, it does not meet the specifications of the side clearance, so the strategy adopted here is to first place the clearance on the right side to determine whether there is a collision with other objects, and then place the clearance on the other side and do the clash detection again. There must be a collision on either side. If both sides collide with some objects or there is no collision, it does not meet the requirements of the front clearance. 4.3 Add-in development Figure 4. 11 ADC plug-in development diagram The Add-in development section focuses on how to develop ADC plug-in with source code. It explains reading the user’' project to filter the existing related element, get these element locations to check collision, and show the result visualization. Each section explains the method used in detail and attaches the corresponding code. 4.3.1 Filter family The FilteredElementCollector class must be used when searching for filtered elements through the Revit API. Using this class can significantly improve the efficiency of processing the model (Autodesk, 2015). First, most of Revit objects are inherited from the Element class, so in Revit series files (. rvt, .rfa, etc.), element objects account for more than 90%. Secondly, in order to improve the efficiency of the element search during Revit storage, the contents of element storage is divided into two parts: Element Head and Element Contents. Among them, the element head contains only a small amount of information. For 75 example, Id, name, category Id, type Id, but element geometry, parameters, etc. are all in the element contents. When the user tries to obtain the information of an element, if the information is already contained in the element head, Revit will not process the contents of the element, saving memory consumption and improving access speed. Only when the element information is not in the element head, Revit loads the contents of the element body into memory for processing. Therefore, there are two principles for filtering Revit elements: 1. Unless necessary, try to filter the search by element head; 2, If there are multiple conditions to search, first use the information condition of the element head to filter. The FilteredElementCollector class can find elements in the entire Revit document, in a certain view, or in an existing element set. When using, user can choose according to their needs. The FilterElementCollector class itself has integrated several Filters, such as OfCategory, OfCategoryId, WhereElementIsNotElementType, and so on. The filters used by ADC plug-in are mainly OfCategory filters and logical filters that combined by category filter and family symbol filter (Figure 4. 12). Figure 4. 12 Element filter example The strategy adopted by ADC has filtered out the elements related to the code check from the current project. For example, in figure 4.7, the category filter can only filter out all the elements of the plumbing fixture category. The next step is to get the right family from all plumbing fixtures elements. ADC currently covers the sink and toilet two types of elements under the plumbing fixtures category and grab bar and mirror under the special equipment category (Table 4. 2). Under the Category/Filter section 76 shows how ADC filters the corresponding category elements from the current Revit project and the right section shows how ADC gets all elements with a certain keyword. Table 4. 2 Filter and collect relative element Category/Filter Get all elements with a certain keyword Plumbing Fixtures Sink Toilet Special Equipment Grab Bar Mirror 4.3.2 Get family location Positioning is a difficult issue encountered during ADC plug-in development. ADC uses the existing family’s center point, front center, and back center to place the code restriction clearance. The first problem is that the location point of a family only depends on how the family is modeled. However, it is impossible to know whether the origin point of the user’s family is the same as the ADC’s code compliant family. The second issue is that the bounding box is parallel to the cardinal coordinate axes in the project setting, and it has no relationship to the element coordinate system. Because the bounding box of a family includes all model elements, annotation elements, and datum elements of a family, it is not necessarily the smallest 77 possible circumscribing box. As the example shows below, a bounding box of a family could have several possible expressions (Figure 4. 13). Figure 4. 13 possible bounding box expression If an element is not parallel with the project coordination system, then using the minimum and maximum point of the bounding box to get the family center is not actually the real center of the family. On the other hand, even for the same family, if there is an annotation element such as a flip control mark outside the family model geometry, the bounding box will include the flip control mark (Table 4. 3). This is a major problem. It is not accurate to only use the bounding box to locate the center of a family. Therefore, before users run ADC plug-in, they need to check their family to see if it has an annotation mark outside the family geometry and cause the bounding box is larger than the family's smallest possible circumscribing box. Currently, ADC can only cover Type 1 to Type 6 of the possible bounding box situation (Figure 4. 13) Table 4. 3 Family bounding box could be affected by annotation mark Family Family bounding box 78 4.3.2.1 Get family parallel to the project coordinate system location Since it is difficult to determine whether the direction of the restroom in the user's project is parallel to the project coordinates, the ADC should deal with two different situations: the restroom is parallel to the project coordinate system, or the related fixtures are rotated at a specific angle. For fixtures that are parallel to the project coordinate system, the center point can be calculated by using the minimum and maximum two points from Get_BoundingBox function in Revit API (Figure 4. 14), the Get_BoundingBox.Max and Get_BoundingBox.Min can provide the XYZ coordinates of the upper-right-front corner of the box and the XYZ coordinates of the lower-left-rear corner. The formula to get the center point is Figure 4. 14 how to calculate family center use C# BoundingBox.Max (X 1,Y 1,Z 1) BoundingBox.Min (X 2,Y 2,Z 2) Center XYZ = ( X 1 +X 2 2 , Y 1 +Y 2 2 , Z 1 +Z 2 2 ) The point that the center point is projected to the level where this family is located can also be calculated (Figure 4. 15). Projected Center Point XYZ = ( X1+X2 2 , Y1+Y2 2 ,Z 2) 79 Front Center Point XYZ = = ( X1+X2 2 ,Y 2 ,Z 2) Back Center Point XYZ = = ( X1+X2 2 ,Y 1 ,Z 2) Figure 4. 15 How to get the relative point The code-compliant families created by the ADC plug-in are all related to the center point of this projection. Some of the code-compliant families place on the front center point to check front clearance, some place on the projected center point to check side clearance (Figure 4. 16). The detailed place location for each ADC code-compliant family is listed in table 4.4. Figure 4. 16 Points used in ADC of a family Table 4. 4 ADC code-compliant family place location Family type Customized code-compliant clearance example Place Location 80 Toilet Toilet Front Center Point Toilet Front Center Point Toilet Front Center Point Place by user Sink Sink Center Point Sink Front Center Point 81 Sink Back Center Point Mirror Read Parameter Grab Bar Toilet Front Center Point Toilet Front Center Point 82 Toilet Back Center Point 4.3.2.2 Get family not parallel to the project coordinate system location For families that are not parallel to the project coordinate system, calculating the smallest bounding box of this family is more complex. The ADC approach to this problem has four steps (Figure 4. 17). Figure 4. 17 Get family not parallel to the project coordinate system location diagram The first step is to get the rotation degree of the user’s family in the project; this step can be achieved by the Revit API function (Element.Location as LocationPoint).Rotation. In the Revit API setting, this function return as a double between 0 to 2π increases counterclockwise as element rotate. This rotation degree uses to rotate the element in the project back to 0 (like the first step from the red highlighted 1 toilet to the number 2 black toilet, in the real project, there only one element is the user’s family, the figure just for understanding reference) (Figure 4. 18). Figure 4. 18 Rotate the family to 0 degree The next step is to create the bounding box for the rotated toilet. Step 3 this the most complicated step. After getting the bounding box, ADC uses the same function to get the max and min point. These two points combined with the origin of the family and the original rotation angle of the family can calculate the position 83 of the new bounding box. Since the families involved will only rotate along the y-axis, a two-dimensional plane rotation formula is used to solve this problem (Figure 4. 19). Figure 4. 19 Two-dimensional plane rotation formula Figure 4. 20 Calculate the rotated bounding box max and min point The last step is to rotate the family back to its original location (Figure 4. 21). With this method, it is possible to conduct the accessible design code check on designs whether they are parallel or not parallel to the project coordinate system. Detailed Example will show in Chapter 5. Figure 4. 21 rotate the family back to the original location 4.3.2.3 Showing family location In order to show each step of the specification check more clearly, ADC will first go through the existing related elements in the project and read their related information. In this step, the element name, ID, location (element location point) and rotation information are used. The result will be displayed in a popup task dialog (Figure 4. 22). 84 Figure 4. 22 Display existing family information 4.3.3 Load and place customized code-compliant families After reading the information about the relevant elements already in the project, the next step is to load the ADC code-compliant families and place the families for collision detection. Loading and placing are two sections. There are two steps in the loading section (Figure 4. 23). The first step is to check if the existing project has already loaded the ADC code-compliant family. If it has been loaded, then proceed to the next step. Otherwise, load the ADC code-compliant family from the Revit add-in default folder. Figure 4. 23 Load ADC code-compliant family 85 After the family is loaded, a pop-up window will remind the user that the loading is successful. At this time, the user's project model will not be changed in any way, but there will be showing in the project browser family folder to indicate that the loading is successful (Figure 4. 24). Figure 4. 24 Revit response to the loading command To place the ADC code-compliant family into the project is the second step. The method used here is the Create.NewFamilyInstance in the Revit API. According to the relevant types are the plumbing fixture and special equipment, the method of creating a new instance using three inputs of XYZ coordinates, FamilySymbol and StructureType are selected here. This method can create an instance at any position without a reference level or host element. Detailed code for placing each ADC code-compliant family is showing in table 4.5. Table 4. 5 C# code showing how to place the code-compliant family Family type Customized code complained clearance example C# Code – Place the code-compliant family Toilet 86 Sink 87 Mirror - Grab Bar 88 4.3.4 Collision detection After placing the code-compliant family, the next step is to check for collisions. ADC plug-in uses the ElementIntersectsElementFilter in the Revit API for collision detection. Its principle is to use the ADC code-compliant family as a filter and then set another filter to collect all the elements in the project, and then see which of the elements intersect with the ADC code-compliant family. When setting the type of collision check, ADC also subdivides the filter according to the actual situation. For example, the toilet side clearance requirement only involves the toilet and wall two types of elements. When coding the program, the filter applied here sets a sub-filter to check if there any collision between the wall and toilet (Figure 4. 25). Figure 4. 25 C# code shows check the toilet side clearance It should be noted that the ADC does a certain order for the specification check. In addition to the different types of elements, there is an order for some specifications that set a range. For example, the side clearance of the toilet, ADC will run the minimum 17” first and see if there is any collision with the wall. And then run the 18” maximum. However, if there is a collision with the 17” minimum clearance, it will remind the 89 user of its design not pass the toilet side clearance requirement and give corresponding building code (Figure 4. 26). Detailed C# code for each ADC code-compliant family collision detection is listed in table 4.6. Figure 4. 26 Collision detection and result Table 4. 6 ADC code-compliant family collision detection Family type Customized code complained clearance example C# Code – Code-compliant family collision detection Toilet 90 Sink 91 Mirror - Grab Bar 92 4.4 Result visualization At this stage, the results of the ADC are reported to the user in real-time during the collision check. All the detail results have reflected the user in real-time in the form of pop-up windows, whether they pass the inspection or not. All failed elements and passed elements are provided to the user in a pop-up window (Figure 4. 27), there is no final summary report that included all the detail. Figure 4. 27 Final Summary showing all failed elements 93 4.4.1 Highlight related element In order to facilitate the user to track down which elements failed the code check, after the inspection, these elements that failed the specification inspection will be highlighted in the model. The function of the override graphic in Revit is used here. The user can accurately and quickly find the wrong element for modification (Figure 4.28). This function is only for the elements that have not passed the code check, and it would not affect other elements that have passed the inspection. Figure 4. 28 Highlight all error elements after code check 4.4.2 Pop-up reminder For elements that passed the code check, the universal design solution related to this element will be provided to the designer for reference. The intention is that more designers could pay more attention to accessible design and universal design. For the failed elements, the relevant building code will be provided to explain the specific reasons clearly (Table 4. 7). Table 4. 7 Result visualization Passed Not Passed 94 4.5 Summary The features of ADC plug-in were categorized according to their order and functions. All the ADC code- compliant families were created beside the programing and will be packaged with the program when the user downloads the plug-in. The user needs to check the family name they use at first to make sure when running the plug-in, ADC could get the corresponding element correctly. Read the relative element location and use this location to place the ADC code-compliant family, the final step was to run collision detection and showed the result (Figure 4. 29). Figure 4. 29 Chapter 4 Diagram The approach of the two-dimensional plane rotation formula solved the problem that the bounding box of an angled family cannot get the exact center really well. At the same time, it also provides a reference method for the controversial how to locate the element in a Revit project. The collision check method is used to avoid the problem that the family used by the user may lack related parameters. The full code is available in the Appendix. The results based on the C # code were tested in the test case and described in Chapter 5. 95 Chapter 5: Test cases and plug-in validation This chapter introduces how the ADC (Accessible Design Consultant) plug-in was validated in the Revit project test files. The validation of this tool took multiple steps. There are two steps before running the plug-in; the first step is to install the plug-in at the right location, and the second step is to prepare the model. Three different test cases were used to illustrate the running process of the plug-in and the code check results. They also verify the usability and accuracy of the plug-in by checking whether the functions of the program are working correctly and giving the expected results (Figure 5. 1). Figure 5. 1 Chapter 5 Diagram 5.1 Plug-in Installation and model preparation ADC is a plug-in that runs under Autodesk Revit 2020. All ADC customized code-compliant families were also built in the Revit 2020 version. Since the family built in the newer version cannot be loaded into the lower version of Revit, the ADC can only run under Revit 2020. This section describes how to set up and load ADC into Revit and the test model preparation. 5.1.1 Preparation for running the program To work with ADC plug-in, the first step is to install this plug-in at the right location. Since ADC runs under Revit 2020, it is more convenient to install the plug-in in the Revit default folder. Every time the user starts Revit, it will automatically read the addin file in this folder (Figure 5. 2). The ADC zipped file contains all required files to run the ADC plug-in (Figure 5. 3). 96 Folder and files: ADC-CodeCompliantFamily: contains all the customized code-compliant families ADC-Test cases: contains three test cases for the user to try ADC plug-in ADC.dll and ADC.addin: the executable files that can be read and loaded into Revit. ADC.dbp: the debug file. Not very necessary, just for the current ADC test version. ADC-Readme: a simple instruction file for the user to read before running ADC. Figure 5. 2 Load ADC into the Revit addins default folder Figure 5. 3 ADC Plug-in contents 5.1.2 Load ADC into Revit After unzipping the file, the next step is to load the plug-in into Revit 2020. Revit reads the default folder every time the user starts Revit and load all .addin files from this folder. User can choose always load at the first time user open Revit after unzipping the ADC file, and then they do not have to load it later (Figure 5. 4). 97 Figure 5. 4 Load ADC plug-in when start Revit After loading ADC into Revit, users can find the plug-in under the Add-ins tab – External Tools (Figure 5. 5). Figure 5. 5 Where to find ADC 5.1.3 Model Preparation Users can use the test case model from the installation package to test the ADC plug-in or use their own project file. Currently, the ADC plug-in can only run on the single-user restroom. All related families in the model have to be 3D and have a specific keyword. The keywords required for the restroom-related families must follow exact guidelines (Table 5. 1). Table 5. 1 keyword requirement for restroom-related families Family type Must contain keyword (Not case sensitive) Toilet Toilet, water closet Sink Sink, lavatory Mirror Mirror Grab Bar Grab bar Urinals Urinal Door Restroom door, bathroom door, toilet door 5.2 Test case setup Three test cases were set up to validate the accuracy and useability of ADC plug-in. All three test cases were the same area single-user restroom. The first and second cases were parallel to the project coordinate 98 system; the test case 3 had a 45-degree angle with the project coordinate system (Figure 5. 6). All elements in the first test case met the design standard. In the second case, some of the elements did not follow the design code requirement. These errors are intentionally set up. The first two test cases were mainly to compare and detect whether the plug-in can run smoothly and test whether the plug-in can accurately detect errors in the model. Test case 3 was to test whether ADC can run normally for models that are not parallel to the coordinate system. All families in the third test case met the design criteria. The primary purpose was to verify whether the rotate method works for the angled element. Figure 5. 6 3D views of three Test cases The plans for each test case show the exact placement of the fixtures and door (Figure 5. 7). 99 Figure 5. 7 Detailed plan of three test cases There were four types of families tested (Table 5. 2). 100 Table 5. 2 Tested families and detail information Family Example Information Test Toilet Family Name: Toilet-Domestic- 3D Freestanding toilet • Toilet side clearance • Toilet front clearance Sink Family name: SINK Left one: ADA standard sink Right one: Revit default square sink vanity • Sink front clearance • Sink side clearance • Toe knee clearance Grab bar Family name: side grabbar / back grabbar • Side grab bar distance from the front of the toilet • Side grab bar height • Back grab bar height Mirror Family name: Mirror Check to see if ADC can get the correct information from the project element. Wheelc hair turning space Family name: ADA_Wheelchair_turning_spac e Check wheelchair turning space based on user's placement 101 The user has to place the 60-inch-diameter wheelchair turning space. After placement, it would be tested according to the user's placement position to check whether it meets the requirements of the design specification. 5.2.1 Test case 2 detail Test case 2 was intentionally set to have many non-compliant designs. The detailed settings are shown in Table 5.3. Table 5. 3 Test case 2 detail (International Code Council, 2016) Test case 2 plan Did not follow the building code • "The water closet shall be positioned with a wall or partition to the rear and to one side. The center-line of the water closet shall be 17 inches (432 mm) minimum to 18 inches (457 mm) maximum from the side wall or partition." • "The side wall grab bar shall be positioned 24 inches (610 mm) minimum in front of the water closet." • "Knee clearance shall be 27" min. extend 8" min. under the front edge. and the toe clearance shall be 9" min. extend 17" min. to 25" max.under lavatory." 102 • "Lavatories, when located adjacent to a side wall or partition, shall be a minimum of 18 inches (457 mm) to the center-line of the fixture." • "The clear floor or ground space shall be 30 inches (762 mm) minimum by 48 inches (1219 mm) minimum." • "Clearance around a water closet shall be 60 inches (1524 mm) minimum measured perpendicular from the side wall and 56 inches (1422 mm) minimum measured perpendicular from the rear wall. A minimum 60 inches (1524 mm) wide and 48 inches (1219 mm) deep maneuvering space shall be provided in front of the water closet." 103 5.3 Plug-in validation Figure 5. 8 Plug-in validation - Test cases Test results of the three cases show the accuracy and usability of the ADC plug-in. In order to facilitate and improve user experience, pop-up window reminders during loading and placing were deleted. This part of the program would run in the background to complete, and the user did not need to perform any further operations. The entire running process is very convenient; users only need to start the plug-in program with one click (Figure 5. 9). Figure 5. 9 Run ADC Plug-in The plug-in will finish reading the relevant family information in the project and then automatically load and place the code-compliant clearance. After the placement is completed, the user would be prompted to start the code check. The user needs to use the mouse to click or press the Enter key to complete the inspection steps, and the inspection results of each specification would automatically pop up. For the wheelchair turning space clearance, the plug-in would pop up a window to remind the user to place this 104 clearance and try to avoid collision with other elements. After the user completed this step, it would run the code check for the wheelchair turning space. In the end, all the inspection results will pop up. There is a summary of all the elements that had passed the inspection and failed, and the relevant families that do not pass the code check would be automatically highlighted for the users. All the clearance that passed the inspection would be automatically deleted without affecting the original model. 5.3.1 Test case 1 result The first test case is the baseline to compare against. All elements used in the model meet the requirements of the design code. The purpose is to check whether the plug-in can check correctly, and in the case that all the families meet the specifications, the code check process would not affect the original model. The user can choose to run the plug-in in a 3D or floor plan view. This is to ensure that the relevant element information in the model can be read. The user needs a view that contains all the relevant elements. The test process was selected using a 3D view in order better to show the entire code check process and results (Table 5. 4). The results shown are omitted after step 6. Some of the omitted parts are window prompts passed by other specifications, which are similar to the examples given. The complete process can be viewed in Appendix A. Table 5. 4 Test 1 result - All passed the code check Step Function Result 1 Filter existing specialty equipment. Read existing back grab bar information. 105 2 Filter existing specialty equipment. Read existing side grab bar information 3 Filter existing plumbing fixtures: read existing sink information. This step obtained the name, ID, position information, and rotation angle of the sink in the user’s original model. The position information here was used to place ADC code- compliant families 4 Filter existing plumbing fixtures: read existing toilet information. This step obtained the name, ID, position information, and rotation angle of the toilet in the user’s original model. The position information here was used to place ADC code- compliant families 106 5 All code-compliant families were placed and started the code check. The first code check was the sink front clearance. 6 Passed result for the sink front clearance. Relevant design advice was also provided. 7 User placed the wheelchair turning space clearance, and after placement, the app would run the turning space code check. 107 8 The final result for all the elements passed the code check. 9 All the code-compliant families that passed the inspection were deleted after the code check. The original model is not affected. 5.3.2 Test case 2 result Test 2 is based on Test 1 except that elements that originally code-compliant were intentionally changed to non-compliant (Table 5. 5). Table 5. 5 Compare Test case 1 and 2 Test case 1 Test case 2 108 The purpose of this set up is to check whether the plug-in can correctly detect every error. In this test, the results of each step are shown in order to be able to see that each error can provide the correct response intuitively (Table 5. 6). Table 5. 6 Test 2 Result – some not pass the code check Step Function Result 1 Filter existing specialty equipment. Read existing back grab bar information. Read existing side grab bar information. 2 Filter existing specialty equipment. Read existing mirror information. 3 Filter existing plumbing fixtures. Read existing sink information. This step got the family name, ID, position information and rotation angle of the sink in the 109 original model. The XYZ position here is used to place ADC-compliant families Note: The operation of loading the code- compliant family may take a while; it runs in the background and will not be reflected in the model. 4 Filter existing plumbing fixture. Read existing toilet information, and this step obtained the family name, ID, XYZ position and rotation angle of the toilet in the original model. And use the XYZ position to place relevant ADC code-compliant clearance. 110 5 All code-compliant families were loaded and placed at the correct location. Start code check. Check the sink front clearance. Result: the side wall had intersected with the sink. A pop-up window will remind the user which wall is the problem and provide the corresponding family ID. 6 Check the sink side clearance. Result: the side wall had intersected with the sink. A pop-up window will remind the user which wall and provide corresponding family ID. Note: This code related to two elements, the sink and the side wall. When detecting the collision, only the collision with the wall is detected. 111 7 Check the toe knee clearance . Result: the sink intersected with the toe knee clearance. A pop-up window will remind the user and provide corresponding sink ID. Note: This code related to two elements, the sink and the toe knee clearance. When setting collision detection, only the collision with the plumbing fixture is detected. 8 Check the toilet side clearance. Result: the wall had collided with the toe knee clearance. A pop- up window will remind the user and provide corresponding wall ID. 112 9 Check the toilet and side grab bar distance . Result: The distance is not correct, and the user is reminded that the grab bar should be positioned at least 24" in front of the toilet. 10 Check the side grab bar height. Result: Passed the code check, and a relevant universal design solution was proposed as design advice. This advice is only given if the object is code compliant. It provides the designer with an alternative solution. 11 Check the back grab bar height. Result: Passed the code check, and a relevant universal design solution was proposed as design advice. Note: some design advice are the same since they are all elements of the same type. 113 12 Check the toilet front clearance. Result: it did not pass the code check; more space is needed. Note: This check is a little bit complicated. The side clearance between the toilet and the side wall may cause failure, or the area in front of the toilet is too small. However, this code requires to provide wheelchair users a turning space. This check result needs to be viewed with the result of the turning space clearance placed by the user in order to obtain a correct result. 13 Place and check the wheelchair turning space. Note: This step requires the user to place the family by himself. There was a reminder to avoid collision with other families. After the placement, a collision check would be performed. It should be noted here that the ADC families placed in the previous step were also in the 114 model. To avoid detecting collisions with these families, these ADC code- complaint families were excluded when checking for collisions. This setting is to ensure these ADC code- compliant families would not affect the code check results. 14 The final result showing what elements passed the code check and what elements did not pass. 16 All elements that fail the check will be highlighted for user modification. If all elements passed the code check, the relevant code-compliant clearance would be deleted. 115 5.3.3 Test case 3 result The third test was based on the first test case, but the model was rotated 45 degrees counterclockwise (Table 5. 7). The purpose of this case study is to check if the application can be used on models that are not parallel to the project coordinate system. If the original bounding box positioning method (see 4.3.3.2 for further details) cannot be used, the test checks whether the plug-in can run correctly and place the family in the correct position. Table 5. 7 Comparison of Test cases 1 and 3 Test case 1 Test case 3 The plug-in will first turn the family in the project back to 0 degrees, read the family's bounding box and related points based on 0 degrees. And then use the points obtained here and the original family's rotation angle to calculate new points to place ADC code-compliant clearance. After that, the original element will be rotated back to the original location (Figure 5. 10). 116 Figure 5. 10 Test 3 process The subsequent code check steps were the same as those in test case 1. In the end, the final result was provided to the user. All ADC code-compliant families that passed the inspection were deleted (Figure 5. 11). Figure 5. 11 Test 3 process 117 5.4 Summary Figure 5. 12 ADC validation These three test cases proved that the main features of ADC achieved their accuracy and functionality (Figure 5. 12). ADC specifically checks sink, toilet and grab surrounding clearance. The Revit project's existing element information was correctly obtained. ADC code-compliant family placement was successful under both parallel and not parallel to the project coordination system conditions. The code check process successfully detects non-compliant elements and highlights elements in the view. For the elements that passed the code check, related design suggestions were also provided for users' reference. A summary report was also given at the end of the plug-in operation. Further discussion about ADC and possible future work is covered in Chapter 6. 118 Chapter 6: Conclusion, Discussion, and Future Work This chapter discusses the current status of this version of the ADC (Accessible Design Consultant) plug- in and some deficiencies found during the testing and development process. It also describes the possible future improvements based on these limitations to enable ADC to improve into a more comprehensive and advanced plug-in to help designers with accessible design. 6.1 Discussion This section discusses how ADC performed its functions based on the current workflow; the limitations found during the development and testing process are also described to guide the future ADC development. Figure 6. 1 ADC Development Diagram Before creating the ADC plug-in, research was done on the existing building codes and universal design solution, and expert advice on accessible design was obtained. Based on the study of the specifications, the scale of the prototype is limited to the restroom, and the subsequent parts are the plug-in development platform set up, plug-in development, and plug-in validation. In addition, existing plug-ins and software for building code check in the market was investigated. Since most of the current standard inspections are completed manually by people, the need to apply BIM to code check is urgent and necessary. 119 ADC is a Revit plug-in that helps designers check accessible designs and provide design advice. The prototype at this stage can check whether the relevant element of a restroom in the design meets the specifications. At the same time, suitable universal design solutions are provided for the elements that have passed the code check. This is where the ADC differs from other existing code check plug-ins or software. Now that accessible design is becoming more and more important in people's lives, current ADA design specifications cannot fully cover and meet people's needs. ADC provides additional information based on Universal Design Solution to provide other code-compliant, but perhaps better solutions. The Hunter Point library is a good example. The designer stated that the design of the library passed the code check; however, there are parts of the ADA design specifications that are not covered, which has also led to some sublevels in this library not being accessible to the disabled people (Stone, 2019). This kind of example also creates a demand for what architects can do outside of existing accessibility laws to make their design experience more accessible. ADC is like a reminder. While completing the basic specification inspection, the designer is continuously reminded of what can be improved based on the review in the field of accessible design (Figure 6. 2). Figure 6. 2 ADC Plug-in result example 6.1.1 Evaluation of the current workflow The development of the ADC is carried out in modules, and the plug-in is not just a line-by-line code of programming. A deep understanding of the relevant building code is very important for the development 120 of ADC. In addition, how to convert a text-based building code into a family in Revit and interact with the family in the user model in the correct order is the most challenging part. There are three parts that are parallel and effect each other: to collect and organize related specifications, write programs, and build families that conform to the specifications Three test cases also prove that the ADC can detect non-compliant designs in different situations and can provide relevant suggestions for design elements that meet the code requirement. The entire operation process also works smoothly. 6.1.2 Limitations of the current version In the test, the various functions of ADC worked normally, and the results obtained were as accurate as predicted. Some features can be improved, such as the scale, the impact of ADC plug-in used on the user's original model, the program user interface, and the program code. All designs that pass the ADC code inspection only meet the minimum requirements of the building code and the ADC just gives the designer a tool to facilitate their review of the design. Even if the design does not pass the ADC code check, there are many exceptions in reality. This requires the designer to communicate with the inspector. 6.1.2.1 Scale and program version The current ADC prototype plug-in can only run under the Revit 2020 version. All the code-compliant clearances are also built in the Revit 2020 version. This is not friendly for users using older versions of Revit (Figure 6.3). Figure 6.3 ADC plug-in could not run under Revit 2019 or earlier version 121 The existing version ADC plug-in can only check a single-user restroom and is not applicable to projects with multiple restrooms or projects with multi-user restrooms. The plug-in at this stage is just a prototype, mainly focusing on whether ADA code checking is feasible. Therefore, the restroom was chosen as a prototype, and the scale was very small. On the one hand, the plug-in should be able to detect more specifications, including more details, such as the requirements for signs. On the other hand, the existing scale should be expanded to extend the space other than a restroom. The current place code-compliant family method is relatively single and other detection methods should be developed so that the plug-in can better help designers. For example, one could study the most error-prone parts from the certified accessible specialist survey and specialize in testing methods for related issues. 6.1.2.2 The impact of ACD plug-in used on the original model Because the ADC has to read the Revit family information in the user model when running, the current requirement is that the user needs to modify the name of the related family before running the plug-in. This will affect the plumbing fixtures and specialty equipment schedule created by the user. An updated version of ADC could automatically establish a type parameter for each family of the plumbing fixture and specialty equipment categories in the user model, and let the user choose whether the family belongs to the sink, toilet, or a grab bar type before running the plug-in. This can avoid problems that affect the user's schedule. Another part that needs to be improved is the need to choose the right family type for the ADC code- compliant family. At this stage, the ADC code-compliant clearance families that are related to plumbing fixtures are all under the plumbing fixtures category. Subsequent development should establish all ADC code-compliant families under one type for easy invocation. 6.1.2.3 Code and user interface development There is currently no source code classification based on the type of inspection or the different elements. In addition, all the current running results use the pop-up method to remind the user. This method is not the most efficient. If the user does not read the information of each pop-up window carefully, the information that ADC wants to pass may not be well understood by the user. It is a limitation that the message box 122 disappears after the user clicks to continue running the plug-in. At present, in the final summary of the code check result and the related specifications information or design suggestions which are given before, will not be presented to the user again. More detailed design suggestions and pictures should be provided for the reference. The summary of the plug-in code check should include all the information in the check process and develop the function that can export this as a report. 6.1.3 Plug-in limitation The ADC uses the family's bounding box to locate each element. However, due to the flexibility of family establishment (users can create objects in different ways), some types of families cannot obtain their position correctly. For example, for a wall mount toilet, since this family is hung on a wall, it does not have a rotation angle. In the user-defined direction, the ADC may not be able to place the code-compliant family accurately. It may be opposite to the direction in which the user's family is placed (Figure 6. 4). In addition, for some families that do not control the origin when modeling, the ADC cannot use the bounding box to locate it accurately (Figure 6. 5). Figure 6. 4 Wall mount toilet example 123 Figure 6. 5 Element with a huge bounding box 6.2 Future work There are many possible developments and directions for ADC to address the current limitations and improve the functions. The scope of work at this stage is still very small. For accessible design, more consideration can be given to the element that is easy for designers to make mistakes or the parts that are easy to ignore to provide code check, such as building circulation and parking, which are prone to design errors. In addition, some public areas with a large number of people, such as building entrances, are also places that need to pay more attention. Currently, all designs that passed the ADC inspection met only the minimum requirements of the building standards. This does not meet the user's needs very well. What can be done beyond this is to provide designers with more flexible design suggestions. Right now, most of the additional design suggestions come from Universal Design Solutions (see section 2.3 for more information). For future development, ADC can get more actual experience from the certified access specialist. Responsive research methods based on the problems found during their actual work. Besides, accessibility issues that experts have discovered when working on different building types should be collected, and ADC should provide corresponding design suggestions based on specific building types. For example, kindergartens and elementary schools, which are usually public buildings with many children, are areas need special attention. In addition, more attention should be paid to residential buildings that are not covered by regulations and are the areas where most people spend the most time. 124 Another area that needs improvement is the ADC program. One area for future work is to classify different types of restrooms. There are different standard inspections for single-use toilets and multi-use toilets. There are also plans to create more families related to accessible design, such as toilet paper holders, hand dryers, baby changing tables, and signage that has to be in the restroom. One could make these specific Revit families into families that can change parameters so that the customers can choose the family that is suitable for their design. In addition, the development of ADC in the future could provide users with design recommendations of optional levels. If the user wants to improve a part of the design, the ADC can give the user different options. For example, the design suggestions of a toilet compartment might be to provide more space, or the user can choose to add more user-friendly equipment, or the user can choose to adopt both recommendations. The ADC code at this stage is still relatively messy. It should be organized and summarized according to the corresponding functions. During the programming process, the naming of functions needs to be more clear and understandable. 6.3 Conclusion The development of the ADC plug-in provides a new variation for the BIM-based code checking process, to make better use of the powerful family functions in Revit for code check. It is a good tool to improve the designer's attention and efficiency in the accessible design part of the design process. At the same time, ADC also tried a new element positioning method by using the element's location point and bounding box to define the element more accurately. The difference between the ADC and other plug-ins for specification checking is that the ADC provides design suggestions. This function is to promote universal design and is a new attempt to encourage accessibility design. The goal is to allow more designers to pay more attention to accessible design both by following the building code and also to be provided with expert advice. 125 REFERENCES 2010 ADA standards for accessible design (2010). Washington, D.C.: Dept. of Justice. Retrieved from http://purl.fdlp.gov/GPO/gpo22806 “2012 Texas Accessibility Standards.” 2012 Texas Accessibility Standards, Texas Department of Licensing and Regulation, 2012. www.tdlr.texas.gov/ab/2012TAS/2012tasComplete.pdf. A Guide to Disability Rights Laws - ADA.gov homepage. http://www.ada.gov/cguide.htm Accessible and Usable Buildings and Facilities (ICC A117.1-2009). (2011) American National Standard Institute. Retrieved from https://cdn.ymaws.com/www.aiatriangle.org/resource/resmgr/CE_/ICC_A117.1-09.pdf Architectural Barriers Act (ABA) of 1968. (n.d.). Retrieved from https://www.access-board.gov/the- board/laws/architectural-barriers-act-aba. Akin, Ö . “Building Codes”. In Embedded Commissioning of Building Systems, 178. Boston: Artech House, 2012. Autodesk Help. Retrieved from http://help.autodesk.com/view/RVT/2015/ENU/?guid=GUID-A2686090- 69D5-48D3-8DF9-0AC4CC4067A5 BIM Wiki Part of Designing Buildings Wiki www.designingbuildings.co.uk. (n.d.). Retrieved from https://www.designingbuildings.co.uk/wiki/Parametric_modelling. Bouazza, T., Udeaja, C., & Greenwood, D. (2015). The Use Of Building Information Modelling (BIM) In Managing Knowledge In Construction Project Delivery: A Conceptual Model. WIT Transactions on the Built Environment, 149, 107–117. https://doi.org/10.2495/BIM150101 Clayton, Mark. (2013). Automated Plan Review for Building Code Compliance Using BIM. Code of Practice for Building Information Modelling (BIM) e-Submission. (2017). Retrieved from https://www.corenet.gov.sg/media/2157471/2_cp_for_bim_esubmission_archi_v1-1.pdf. Design solutions. (2019). Retrieved from https://thisisud.com/dashboard/solutions_l.php 126 EDM (2009).” EXPRESS Data Manager”, EPM Technology, http://www.epmtech.jotne.com. Ellar, M. (2019, September 5). Personal interview. Filtering | Search | Autodesk Knowledge Network. https://knowledge.autodesk.com/search- result/caas/CloudHelp/cloudhelp/2016/ENU/Revit-API/files/GUID-85E4A43E-88B5-43C6-908C- 2D138C9F611D-htm.html Flasch, J. (1998). Accessible design. Marketplace, 9(13), 18. Retrieved from http://libproxy.usc.edu/login?url=https://search-proquest com.libproxy1.usc.edu/docview/219621844?accountid=14749 Install Visual Studio. (2019). Retrieved from https://docs.microsoft.com/en-us/visualstudio/install/install- visual-studio?view=vs-2019 IsUD (2019) “Solutions”, innovative solutions for Universal Design, https://www.thisisud.com/solutions_l.php Kent, J. (2017). Ada in details: interpreting the 2010 Americans with Disabilities Act Standards for Accessible Design. Hoboken, NJ: John Wiley & Sons, Inc. LADBS (2019) “Plan Check & Permit”, https://www.ladbs.org/services/core-services/plan-check-permit Leshko, B., & Mchugh, J. (2013). SmartCodes and BIM. Structures Congress 2013: Bridging Your Passion with Your Profession, 928–937. https://doi.org/10.1061/9780784412848.082 Meadati, Pavan. (2009). BIM Extension into Later Stages of Project Life Cycle. Nawari, N. 2013. “SmartCodes and BIM.” Structures Congress 2013, 928–37. doi:doi:10.1061/9780784412848.082. Rhoads, M. A. (2013). Applying the ADA : Designing for the 2010 americans with disabilities act standards for accessible design in multiple building types. Somerset: John Wiley & Sons, Incorporated. Retrieved from http://ebookcentral.proquest.com/lib/socal/detail.action?docID=1161974 127 Sacks, R., Eastman, C. M., Lee, G., & Teicholz, P. M. (2018). Bim handbook a guide to building information modeling for owners, designers, engineers, contractors, and facility managers. Hoboken, NJ: Wiley. SMC (2009).“automated code checking for accessibility”, Solibri, http://www.solibri.com/press- releases/solibri-model-checker-v.4.2-accessibility.html. Smith, P. (2014). BIM & the 5D Project Cost Manager. Procedia - Social and Behavioral Sciences, 119(C), 475–484. https://doi.org/10.1016/j.sbspro.2014.03.053 Steinfeld, E., & Maisel, J. (2012). Universal design: creating inclusive environments. Hoboken: John Wiley & Sons, Inc. Stone, L. (2019, November 26). Hunters Point Library is being sued over ADA violations. The Architect's Newspaper. Retrieved from https://archpaper.com/2019/11/hunters-point-library-is-being-sued-over- ada-violations Understanding Revit Terms. (2014). Retrieved from http://help.autodesk.com/view/RVT/2014/ENU/?guid=GUID-2480CA33-C0B9-46FD-9BDD- FDE75B513727 Upcode AI (2019) https://up.codes/features/ai WBDG Accessible Committee. (2019, July 17). History of Accessible Facility Design. Retrieved from https://www.wbdg.org/design-objectives/accessible/history-accessible-facility-design. What is a CASp? (n.d.). Retrieved 2015, from https://casinstitute.org/about/casp. Zhang, L. (2015). Application of BIM-Based Collision Detection in Pipeline Layout. Advanced Materials Research, 1065, 1678–1682. https://doi.org/10.4028/www.scientific.net/AMR.1065-1069.1678 Zhu, C. (n.d). Comparative Study of Accessibility Construction between China and Foreign Countries. Retrieved from http://www.cdpf.org.cn/special/2012luntan/site43/20120614/0013025e890f11441aab08.pdf 128 APPENDIX A Main Code using Autodesk.Revit.Attributes; using Autodesk.Revit.DB; using Autodesk.Revit.DB.Events; using Autodesk.Revit.UI; using System.Collections.Generic; using System.Diagnostics; using System.Text; using System.Linq; using ADC; using System; namespace ADC { [TransactionAttribute(TransactionMode.Manual)] public class Codecheck : IExternalCommand { List<ElementId> _added_element_ids = new List<ElementId> (); public FamilySymbol Creatcodecompliantfamily(Document document, string AccessibleFamilyTypeName) { FamilySymbol CCF = null; bool loaded = false; //find name = Accessible family in the current project ElementFilter CCFPCategoryFilter = new ElementCategoryFilter(BuiltInCategory.OST_PlumbingFixtures); ElementFilter CCFPfamilySymbolFilter = new ElementClassFilter(typeof(FamilySymbol)); LogicalAndFilter andFilter = new LogicalAndFilter(CCFPCategoryFilter, CCFPfamilySymbolFilter); FilteredElementCollector CCFPSymbols = new FilteredElementCollector(document); CCFPSymbols = CCFPSymbols.WherePasses(andFilter); foreach (FamilySymbol CCFP in CCFPSymbols) 129 { if (CCFP.Name == AccessibleFamilyTypeName) { loaded = true; CCF = CCFP; TaskDialog.Show("Reminder", "Code Compliant family already exist"); } } // if the project does not have the code compliant family, load it if (!loaded) { string file = @"C:\ProgramData\Autodesk\Revit\Addins\2020\ADC-CodeCompliantFamily\" + AccessibleFamilyTypeName + ".rfa"; Family AF; bool loadSuccess = document.LoadFamily(file, out AF); if (loadSuccess) { foreach (ElementId AFTypeId in AF.GetFamilySymbolIds()) { CCF = document.GetElement(AFTypeId) as FamilySymbol; } } else { TaskDialog.Show("Load family failed", "Could not load family file '" + file + "'"); } } return CCF; } void OnDocumentChanged(object sender, DocumentChangedEventArgs e) { 130 // this does not work, because the handler will // be called each time a new instance is added, // overwriting the previous ones recorded: //_added_element_ids = e.GetAddedElementIds(); _added_element_ids.AddRange(e.GetAddedElementIds()); } public XYZ GetCenter(XYZ min,XYZ max) { XYZ center = new XYZ((min.X+max.X) * 0.5, (min.Y + max.Y) * 0.5, (min.Z + max.Z) * 0.5); return center; } public XYZ GetBackCenter(XYZ min, XYZ max) { XYZ backcenter = new XYZ((min.X + max.X)*0.5, max.Y, min.Z); return backcenter; } public XYZ GetBackUpCenter(XYZ min, XYZ max) { XYZ backupcenter = new XYZ((min.X + max.X) * 0.5, max.Y, max.Z); return backupcenter; } public XYZ GetFrontCenter(XYZ min, XYZ max) { XYZ frontcenter = new XYZ((min.X + max.X) * 0.5, min.Y, min.Z); return frontcenter; } public double COS (double angle) { if (angle == 0) { return 1; 131 } double an = 1; int n = 1; while (POW(angle, 2*n)/Fac(2*n) > 0.00001){ an = an + POW(-1, n) * POW(angle, 2 * n) / Fac(2 * n); n = n + 1; } return an; } public double SIN(double angle) { if (angle == 0) { return 0; } double an = 0; int n = 1; while (POW(angle, 2 * n - 1) / Fac(2 * n - 1) > 0.00001) { an = an + POW(-1, n - 1) * POW(angle, 2 * n - 1) / Fac(2 * n - 1); n = n + 1; } return an; } public double POW(double a, int n) { double an = 1; while (n > 0) { an = an * a; n = n - 1; } return an; 132 } public double Fac(int n) { double an = 1; while (n > 1) { an = an * n; n = n - 1; } return an; } public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) { UIDocument doc = commandData.Application.ActiveUIDocument; Document document = commandData.Application.ActiveUIDocument.Document; UIApplication uiapp = commandData.Application; UIDocument uidoc = uiapp.ActiveUIDocument; Autodesk.Revit.ApplicationServices.Application app = uiapp.Application; //collect all plumbing fixtures message = "please note"; List<XYZ> TcenterList = new List<XYZ>(); List<XYZ> ScenterList = new List<XYZ>(); List<XYZ> GcenterList = new List<XYZ>(); List<XYZ> McenterList = new List<XYZ>(); List<Element> Deletepassed = new List<Element>(); int Toiletfrontclearancer = 0; int Toiletfrontclearancel = 0; List<Element> NotPassedEl = new List<Element>(); List<ElementId> excludes = new List<ElementId>(); Transaction trans = new Transaction(document, "code check"); trans.Start(); //Start filter current model 133 //collect all specialty equipment FilteredElementCollector specialtyequiment = new FilteredElementCollector(document).OfCategory(BuiltInCategory.OST_SpecialityEquipment).WhereEle mentIsNotElementType(); foreach (Element e in specialtyequiment) { double elementlocation = (e.Location as LocationPoint).Rotation; XYZ ORIGIN = (e.Location as LocationPoint).Point; double nminx = (ORIGIN.X - e.get_BoundingBox(default).Min.X) * COS(elementlocation) - (ORIGIN.Y - e.get_BoundingBox(default).Min.Y) * SIN(elementlocation); double nminy = (ORIGIN.X - e.get_BoundingBox(default).Min.X) * SIN(elementlocation) + (ORIGIN.Y - e.get_BoundingBox(default).Min.Y) * COS(elementlocation); XYZ nmin = new XYZ(nminx + e.get_BoundingBox(default).Min.X, nminy + e.get_BoundingBox(default).Min.Y, e.get_BoundingBox(default).Min.Z); double nmaxx = (ORIGIN.X - e.get_BoundingBox(default).Max.X) * COS(elementlocation) - (ORIGIN.Y - e.get_BoundingBox(default).Max.Y) * SIN(elementlocation); double nmaxy = (ORIGIN.X - e.get_BoundingBox(default).Max.X) * SIN(elementlocation) + (ORIGIN.Y - e.get_BoundingBox(default).Max.Y) * COS(elementlocation); XYZ nmax = new XYZ(nmaxx + e.get_BoundingBox(default).Max.X, nmaxy + e.get_BoundingBox(default).Max.Y, e.get_BoundingBox(default).Max.Z); XYZ new_backcenter = GetBackCenter(nmin, nmax); XYZ center = GetCenter(nmin, nmax); // get all grabbar List<Element> allgrabbar = new List<Element>(); if (e.Name.ToString().ToLower().Contains("grabbar")) { allgrabbar.Add(e); } //setup string builder to store data StringBuilder displayInfo1 = new StringBuilder(); //loop through, collect datastring location = grabbarrotation.ToString(); foreach (Element grabbar in allgrabbar) { 134 double grabbarrotation = (grabbar.Location as LocationPoint).Rotation; GcenterList.Add(center); var elementinfo1 = string.Format("Family Name: {0} Element Id: {1} Location: {2} rotation:{3}", grabbar.Name, grabbar.Id, GetCenter(e.get_BoundingBox(default).Min, e.get_BoundingBox(default).Max), elementlocation.ToString()); displayInfo1.AppendLine(elementinfo1); } // get all mirror List<Element> allmirror = new List<Element>(); if (e.Name.ToString().ToLower().Contains("mirror")) { allmirror.Add(e); } //loop through, collect data foreach (Element mirror in allmirror) { McenterList.Add(center); var elementinfo1 = string.Format("Family Name: {0} Element Id: {1} Location: {2}", mirror.Name, mirror.Id, GetCenter(e.get_BoundingBox(default).Min, e.get_BoundingBox(default).Max)); displayInfo1.AppendLine(elementinfo1); } TaskDialog.Show("Existing Specialty Equiment", displayInfo1.ToString()); } //filter all plumbing fixtures FilteredElementCollector plumbingFixtures = new FilteredElementCollector(document).OfCategory(BuiltInCategory.OST_PlumbingFixtures).WhereEleme ntIsNotElementType(); foreach (Element el in plumbingFixtures) { bool allloaded = false; if (!allloaded) { double elementrotation = (el.Location as LocationPoint).Rotation; 135 XYZ ORIGIN = (el.Location as LocationPoint).Point; double nminx = (ORIGIN.X - el.get_BoundingBox(default).Min.X) * COS(elementrotation) - (ORIGIN.Y - el.get_BoundingBox(default).Min.Y) * SIN(elementrotation); double nminy = (ORIGIN.X - el.get_BoundingBox(default).Min.X) * SIN(elementrotation) + (ORIGIN.Y - el.get_BoundingBox(default).Min.Y) * COS(elementrotation); XYZ nmin = new XYZ(nminx + el.get_BoundingBox(default).Min.X, nminy + el.get_BoundingBox(default).Min.Y, el.get_BoundingBox(default).Min.Z); double nmaxx = (ORIGIN.X - el.get_BoundingBox(default).Max.X) * COS(elementrotation) - (ORIGIN.Y - el.get_BoundingBox(default).Max.Y) * SIN(elementrotation); double nmaxy = (ORIGIN.X - el.get_BoundingBox(default).Max.X) * SIN(elementrotation) + (ORIGIN.Y - el.get_BoundingBox(default).Max.Y) * COS(elementrotation); XYZ nmax = new XYZ(nmaxx + el.get_BoundingBox(default).Max.X, nmaxy + el.get_BoundingBox(default).Max.Y, el.get_BoundingBox(default).Max.Z); XYZ new_backcenter = GetBackCenter(nmin, nmax); XYZ center = GetCenter(nmin, nmax); // Sink List<Element> allsink = new List<Element>(); if (el.Name.ToString().ToLower().Contains("sink")) { allsink.Add(el); } if (el.Name.ToString().ToLower().Contains("lavatory")) { allsink.Add(el); } foreach (FamilyInstance sink in allsink) { //loop through, collect data double srotation = (sink.Location as LocationPoint).Rotation; XYZ rotatepointmin = sink.get_BoundingBox(default).Min; XYZ rotatepointmax = sink.get_BoundingBox(default).Max; 136 XYZ snewbackcenter = GetBackCenter(rotatepointmin, rotatepointmax); XYZ scenter = GetCenter(rotatepointmin, rotatepointmax); if (srotation != 0) { XYZ elementpoint = new XYZ(ORIGIN.X, ORIGIN.Y, 0); Line elaxis = Line.CreateBound(elementpoint, new XYZ(elementpoint.X, elementpoint.Y, elementpoint.Z + 10)); ElementTransformUtils.RotateElement(document, sink.Id, elaxis, -srotation); nminx = (ORIGIN.X - rotatepointmin.X) * COS(srotation) - (ORIGIN.Y - rotatepointmin.Y) * SIN(srotation); nminy = (ORIGIN.X - rotatepointmin.X) * SIN(srotation) + (ORIGIN.Y - rotatepointmin.Y) * COS(srotation); nmin = new XYZ(nminx + rotatepointmin.X, nminy + rotatepointmin.Y, rotatepointmin.Z); nmaxx = (ORIGIN.X - rotatepointmin.X) * COS(srotation) - (ORIGIN.Y - rotatepointmax.Y) * SIN(srotation); nmaxy = (ORIGIN.X - rotatepointmax.X) * SIN(srotation) + (ORIGIN.Y - rotatepointmax.Y) * COS(srotation); nmax = new XYZ(nmaxx + rotatepointmax.X, nmaxy + rotatepointmax.Y, rotatepointmax.Z); snewbackcenter = GetBackCenter(nmin, nmax); scenter = GetCenter(nmin, nmax); } StringBuilder displayInfo = new StringBuilder(); var elementinfo = string.Format("Family Name: {0} Element Id: {1} Location: {2} rotation:{3}", sink.Name, sink.Id, GetCenter(sink.get_BoundingBox(default).Min, sink.get_BoundingBox(default).Max), elementrotation.ToString()); displayInfo.AppendLine(elementinfo); TaskDialog.Show("Existing Plumbing Fixtures", displayInfo.ToString()); //Place code compliant family FamilySymbol SFC48 = Creatcodecompliantfamily(document, "AccessibleS- frontclearance"); if (null != SFC48) { if (!SFC48.IsActive) 137 SFC48.Activate(); // Create family instance XYZ frontcenter = GetFrontCenter(el.get_BoundingBox(default).Min, el.get_BoundingBox(default).Max); XYZ fcp = new XYZ(frontcenter.X, frontcenter.Y, 0); FamilyInstance sfc48 = document.Create.NewFamilyInstance(fcp, SFC48, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); XYZ ppt = new XYZ(ORIGIN.X, ORIGIN.Y, 0); Line axis = Line.CreateBound(ppt, new XYZ(ppt.X, ppt.Y, ppt.Z + 10)); ElementTransformUtils.RotateElement(document, sfc48.Id, axis, elementrotation); } FamilySymbol SSC18 = Creatcodecompliantfamily(document, "AccessibleS- sideclearance18"); if (null != SSC18) { if (!SSC18.IsActive) SSC18.Activate(); // Create family instance XYZ frontcenter = GetFrontCenter(el.get_BoundingBox(default).Min, el.get_BoundingBox(default).Max); XYZ fcp = new XYZ(frontcenter.X, frontcenter.Y, 0); FamilyInstance ssc18 = document.Create.NewFamilyInstance(fcp, SSC18, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); XYZ ppt = new XYZ(ORIGIN.X, ORIGIN.Y, 0); Line axis = Line.CreateBound(ppt, new XYZ(ppt.X, ppt.Y, ppt.Z + 10)); ElementTransformUtils.RotateElement(document, ssc18.Id, axis, elementrotation); } FamilySymbol TK = Creatcodecompliantfamily(document, "ToeKneeClearance"); if (null != TK) { if (!TK.IsActive) TK.Activate(); // Create family instance 138 XYZ frontcenter = GetFrontCenter(el.get_BoundingBox(default).Min, el.get_BoundingBox(default).Max); XYZ bcp = new XYZ(frontcenter.X, frontcenter.Y, 0); FamilyInstance tk = document.Create.NewFamilyInstance(bcp, TK, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); XYZ ppt = new XYZ(ORIGIN.X, ORIGIN.Y, 0); Line axis = Line.CreateBound(ppt, new XYZ(ppt.X, ppt.Y, ppt.Z + 10)); ElementTransformUtils.RotateElement(document, tk.Id, axis, elementrotation); } XYZ elementnpoint = new XYZ(ORIGIN.X, ORIGIN.Y, 0); Line enlaxis = Line.CreateBound(elementnpoint, new XYZ(elementnpoint.X, elementnpoint.Y, elementnpoint.Z + 10)); ElementTransformUtils.RotateElement(document, sink.Id, enlaxis, srotation); } //Toilet List<Element> alltoilet = new List<Element>(); if (el.Name.ToString().ToLower().Contains("toilet")) { alltoilet.Add(el); } //use LINQ to filter for familyInstances containing water closet in the family name if (el.Name.ToString().ToLower().Contains("water closet")) { alltoilet.Add(el); } foreach (Element toilet in alltoilet) { //checking current project existing toilet location double trotation = (toilet.Location as LocationPoint).Rotation; XYZ rotatepointmin = toilet.get_BoundingBox(default).Min; XYZ rotatepointmax = toilet.get_BoundingBox(default).Max; XYZ new_backcenter_toilet = GetBackCenter(rotatepointmin, rotatepointmax); 139 XYZ toilet_center = GetCenter(rotatepointmin, rotatepointmax); if (trotation != 0) { XYZ elementpoint = new XYZ(ORIGIN.X, ORIGIN.Y, 0); Line elaxis = Line.CreateBound(elementpoint, new XYZ(elementpoint.X, elementpoint.Y, elementpoint.Z + 10)); ElementTransformUtils.RotateElement(document, toilet.Id, elaxis, -trotation); nminx = (ORIGIN.X - rotatepointmin.X) * COS(trotation) - (ORIGIN.Y - rotatepointmin.Y) * SIN(trotation); nminy = (ORIGIN.X - rotatepointmin.X) * SIN(trotation) + (ORIGIN.Y - rotatepointmin.Y) * COS(trotation); nmin = new XYZ(nminx + rotatepointmin.X, nminy + rotatepointmin.Y, rotatepointmin.Z); nmaxx = (ORIGIN.X - rotatepointmin.X) * COS(trotation) - (ORIGIN.Y - rotatepointmax.Y) * SIN(trotation); nmaxy = (ORIGIN.X - rotatepointmax.X) * SIN(trotation) + (ORIGIN.Y - rotatepointmax.Y) * COS(trotation); nmax = new XYZ(nmaxx + rotatepointmax.X, nmaxy + rotatepointmax.Y, rotatepointmax.Z); new_backcenter_toilet = GetBackCenter(nmin, nmax); toilet_center = GetCenter(nmin, nmax); } StringBuilder displayInfo = new StringBuilder(); var elementinfo = string.Format("Family Name: {0} Element Id: {1} Location: {2} rotation:{3}", toilet.Name, toilet.Id, GetCenter(toilet.get_BoundingBox(default).Min, toilet.get_BoundingBox(default).Max), elementrotation.ToString()); displayInfo.AppendLine(elementinfo); TaskDialog.Show("Exisitng Toilet", displayInfo.ToString()); //Start place code complisnt family FamilySymbol TSC17 = Creatcodecompliantfamily(document, "AccessibleT- sideclearance17"); if (null != TSC17) { if (!TSC17.IsActive) 140 TSC17.Activate(); // Create family instance XYZ frontcenter = GetFrontCenter(el.get_BoundingBox(default).Min, el.get_BoundingBox(default).Max); XYZ fcp = new XYZ(frontcenter.X, frontcenter.Y, frontcenter.Z); FamilyInstance tsc17 = document.Create.NewFamilyInstance(fcp, TSC17, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); XYZ ppt = new XYZ(ORIGIN.X, ORIGIN.Y, 0); Line axis = Line.CreateBound(ppt, new XYZ(ppt.X, ppt.Y, ppt.Z + 10)); ElementTransformUtils.RotateElement(document, tsc17.Id, axis, trotation); } else { TaskDialog.Show("erorr", "FamilySymbol is empty"); } FamilySymbol TSC18 = Creatcodecompliantfamily(document, "AccessibleT- sideclearance18"); if (null != TSC18) { if (!TSC18.IsActive) TSC18.Activate(); // Create family instance XYZ frontcenter = GetFrontCenter(el.get_BoundingBox(default).Min, el.get_BoundingBox(default).Max); XYZ fcp = new XYZ(frontcenter.X, frontcenter.Y, frontcenter.Z); FamilyInstance tsc18 = document.Create.NewFamilyInstance(fcp, TSC18, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); XYZ ppt = new XYZ(ORIGIN.X, ORIGIN.Y, 0); Line axis = Line.CreateBound(ppt, new XYZ(ppt.X, ppt.Y, ppt.Z + 10)); ElementTransformUtils.RotateElement(document, tsc18.Id, axis, elementrotation); } else { 141 TaskDialog.Show("erorr", "FamilySymbol is empty"); } FamilySymbol TFCR48 = Creatcodecompliantfamily(document, "AccessibleT- frontclearance48-r"); if (null != TFCR48) { if (!TFCR48.IsActive) TFCR48.Activate(); // Create family instance XYZ frontcenter = GetFrontCenter(el.get_BoundingBox(default).Min, el.get_BoundingBox(default).Max); XYZ fcp = new XYZ(frontcenter.X, frontcenter.Y, frontcenter.Z); FamilyInstance tfcr48 = document.Create.NewFamilyInstance(fcp, TFCR48, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); XYZ ppt = new XYZ(ORIGIN.X, ORIGIN.Y, 0); Line axis = Line.CreateBound(ppt, new XYZ(ppt.X, ppt.Y, ppt.Z + 10)); ElementTransformUtils.RotateElement(document, tfcr48.Id, axis, elementrotation); } FamilySymbol TFCL48 = Creatcodecompliantfamily(document, "AccessibleT- frontclearance48-l"); if (null != TFCL48) { if (!TFCL48.IsActive) TFCL48.Activate(); // Create family instance XYZ frontcenter = GetFrontCenter(el.get_BoundingBox(default).Min, el.get_BoundingBox(default).Max); XYZ fcp = new XYZ(frontcenter.X, frontcenter.Y, frontcenter.Z); FamilyInstance tfcl48 = document.Create.NewFamilyInstance(fcp, TFCL48, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); XYZ ppt = new XYZ(ORIGIN.X, ORIGIN.Y, 0); Line axis = Line.CreateBound(ppt, new XYZ(ppt.X, ppt.Y, ppt.Z + 10)); ElementTransformUtils.RotateElement(document, tfcl48.Id, axis, elementrotation); } 142 FamilySymbol GFCL24 = Creatcodecompliantfamily(document, "AccessibleG- clearance24"); if (null != GFCL24) { if (!GFCL24.IsActive) GFCL24.Activate(); // Create family instance XYZ frontcenter = GetFrontCenter(el.get_BoundingBox(default).Min, el.get_BoundingBox(default).Max); XYZ fcp = new XYZ(frontcenter.X, frontcenter.Y, frontcenter.Z); FamilyInstance gfcl24 = document.Create.NewFamilyInstance(fcp, GFCL24, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); XYZ ppt = new XYZ(ORIGIN.X, ORIGIN.Y, 0); Line axis = Line.CreateBound(ppt, new XYZ(ppt.X, ppt.Y, ppt.Z + 10)); ElementTransformUtils.RotateElement(document, gfcl24.Id, axis, elementrotation); } FamilySymbol GH = Creatcodecompliantfamily(document, "AccessibleG-Height"); if (null != GH) { if (!GH.IsActive) GH.Activate(); // Create family instance XYZ frontcenter = GetFrontCenter(el.get_BoundingBox(default).Min, el.get_BoundingBox(default).Max); XYZ fcp = new XYZ(frontcenter.X, frontcenter.Y, frontcenter.Z); FamilyInstance gh = document.Create.NewFamilyInstance(fcp, GH, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); XYZ ppt = new XYZ(ORIGIN.X, ORIGIN.Y, 0); Line axis = Line.CreateBound(ppt, new XYZ(ppt.X, ppt.Y, ppt.Z + 10)); ElementTransformUtils.RotateElement(document, gh.Id, axis, elementrotation); } FamilySymbol GBH = Creatcodecompliantfamily(document, "AccessibleG-BackH"); if (null != GBH) 143 { if (!GBH.IsActive) GBH.Activate(); // Create family instance XYZ backcenter = GetBackCenter(el.get_BoundingBox(default).Min, el.get_BoundingBox(default).Max); XYZ bcp = new XYZ(backcenter.X, backcenter.Y, backcenter.Z); FamilyInstance gbh33 = document.Create.NewFamilyInstance(bcp, GBH, Autodesk.Revit.DB.Structure.StructuralType.NonStructural); XYZ ppt = new XYZ(ORIGIN.X, ORIGIN.Y, 0); Line axis = Line.CreateBound(ppt, new XYZ(ppt.X, ppt.Y, ppt.Z + 10)); ElementTransformUtils.RotateElement(document, gbh33.Id, axis, elementrotation); } // rotate the element back XYZ elementnpoint = new XYZ(ORIGIN.X, ORIGIN.Y, 0); Line enlaxis = Line.CreateBound(elementnpoint, new XYZ(elementnpoint.X, elementnpoint.Y, elementnpoint.Z + 10)); ElementTransformUtils.RotateElement(document, toilet.Id, enlaxis, trotation); } } allloaded = true; //Hightlight - set up fill pattern IList<FillPatternElement> fillPatternList = new FilteredElementCollector(document).WherePasses(new ElementClassFilter(typeof(FillPatternElement))). ToElements().Cast<FillPatternElement>().ToList(); ElementId solidFillPatternId = null; foreach (FillPatternElement fp in fillPatternList) { if (fp.GetFillPattern().IsSolidFill) { solidFillPatternId = fp.Id; } } 144 Color color = new Color(255, 0, 0); //start code check if (allloaded) { //checking for sink side clearance List<Element> S18 = new List<Element>(); if (el.Name.ToString().ToLower().Equals("ssc18")) { S18.Add(el); excludes.Add(el.Id); foreach (Element s18 in S18) { TaskDialog.Show("processing", "Checking sink side clearance..."); ElementIntersectsElementFilter SS18 = new ElementIntersectsElementFilter(el); FilteredElementCollector ss18collector = new FilteredElementCollector(document); IList<Element> ss18IntersectWalls = ss18collector.OfClass(typeof(Wall)).WherePasses(SS18).ToElements(); if (ss18IntersectWalls.Count == 0) { TaskDialog.Show("Passed", "Passed!" + "\n" + "Please consider Universal Design Solution: Lavatories has an adjacent storage space where items will not get wet."); Deletepassed.Add(s18); } else { foreach (Element s1 in ss18IntersectWalls) { OverrideGraphicSettings overrideGraphicSettings = new OverrideGraphicSettings(); overrideGraphicSettings.SetCutForegroundPatternColor(color); overrideGraphicSettings.SetSurfaceForegroundPatternColor(color); 145 overrideGraphicSettings.SetSurfaceForegroundPatternId(solidFillPatternId); overrideGraphicSettings.SetSurfaceForegroundPatternVisible(true); document.ActiveView.SetElementOverrides(s18.Id, overrideGraphicSettings); document.ActiveView.SetElementOverrides(s1.Id, overrideGraphicSettings); NotPassedEl.Add(s18); TaskDialog.Show("Error - Sink Side Clearance", "The Wall" + s1.Name + "|" + s1.Id.ToString() + " has intersect with the sink" + "\n" + "It's not pass the CBC code :Lavatories, when located adjacent to a side wall or partition, shall be a minimum of 18 inches (457 mm) to the centerline of the fixture."); } } } } //checking for sink front clearance List<Element> SF48 = new List<Element>(); if (el.Name.ToString().ToLower().Equals("sfc48")) { SF48.Add(el); excludes.Add(el.Id); foreach (Element sf48 in SF48) { TaskDialog.Show("processing", "Checking sink front clearance..."); ElementIntersectsElementFilter SFC48 = new ElementIntersectsElementFilter(el); FilteredElementCollector sf48collector = new FilteredElementCollector(document); IList<Element> sf48Intersect = sf48collector.OfClass(typeof(Wall)).WherePasses(SFC48).ToElements(); if (sf48Intersect.Count == 0) { TaskDialog.Show("Passed", "Passed!" + "\n" + "Please consider Universal Design Solution: Lavatories has an adjacent storage space where items will not get wet."); Deletepassed.Add(sf48); } 146 else { foreach (Element s1 in sf48Intersect) { OverrideGraphicSettings overrideGraphicSettings = new OverrideGraphicSettings(); NotPassedEl.Add(sf48); overrideGraphicSettings.SetCutForegroundPatternColor(color); overrideGraphicSettings.SetSurfaceForegroundPatternColor(color); overrideGraphicSettings.SetSurfaceForegroundPatternId(solidFillPatternId); overrideGraphicSettings.SetSurfaceForegroundPatternVisible(true); document.ActiveView.SetElementOverrides(sf48.Id, overrideGraphicSettings); document.ActiveView.SetElementOverrides(s1.Id, overrideGraphicSettings); TaskDialog.Show("Error - Sink Front Clearance", "The element" + s1.Name + "|" + s1.Id.ToString() + " has intersect with the sink" + "\n" + "It's not pass the CBC code :The clear floor or ground space shall be 30 inches (762 mm) minimum by 48 inches (1219 mm) minimum."); } } } } // check for sink toe knee clearance List<Element> TKC = new List<Element>(); if (el.Name.ToString().ToLower().Equals("toekneeclearance")) { TKC.Add(el); excludes.Add(el.Id); foreach (Element tkc in TKC) { TaskDialog.Show("processing", "Checking sink toe knee clearance..."); 147 ElementIntersectsElementFilter STKC = new ElementIntersectsElementFilter(el); FilteredElementCollector stkccollector = new FilteredElementCollector(document); IList<Element> stkcIntersect = stkccollector.OfCategory(BuiltInCategory.OST_PlumbingFixtures).WherePasses(STKC).ToElements(); if (stkcIntersect.Count == 0) { TaskDialog.Show("Passed", "Passed!" + "\n" + "Please consider Universal Design Solution: Lavatories has an adjacent storage space where items will not get wet."); Deletepassed.Add(tkc); } else { foreach (Element tk1 in stkcIntersect) { NotPassedEl.Add(tkc); OverrideGraphicSettings overrideGraphicSettings = new OverrideGraphicSettings(); overrideGraphicSettings.SetCutForegroundPatternColor(color); overrideGraphicSettings.SetSurfaceForegroundPatternColor(color); overrideGraphicSettings.SetSurfaceForegroundPatternId(solidFillPatternId); overrideGraphicSettings.SetSurfaceForegroundPatternVisible(true); document.ActiveView.SetElementOverrides(tk1.Id, overrideGraphicSettings); TaskDialog.Show("Error - Toe Knee Clearance ", "The element" + tk1.Name + "|" + tk1.Id.ToString() + " has intersect with the toe knee clearance" + "\n" + "It's not pass the CBC code :Knee Clearance shall be 27” min. extend 8” min. under the front edge. and the toe clearance shall be 9” min. extend 17” min.to 25” max.under lavatory"); } } } } //Toilet Check //Check for toilet side clearance 148 bool Toiletsideclearance = false; if (el.Name.ToString().ToLower().Equals("accessiblet-sideclearance17")) { List<Element> ToSC17 = new List<Element>(); ToSC17.Add(el); excludes.Add(el.Id); foreach (Element tsc in ToSC17) { TaskDialog.Show("processing", "Checking toilet side clearance..."); ElementIntersectsElementFilter ToiletSC17 = new ElementIntersectsElementFilter(el); FilteredElementCollector tsccollector = new FilteredElementCollector(document); IList<Element> tscIntersectWalls = tsccollector.OfClass(typeof(Wall)).WherePasses(ToiletSC17).ToElements(); if (tscIntersectWalls.Count == 0) { Toiletsideclearance = true; Deletepassed.Add(tsc); } else { foreach (Element ts17 in tscIntersectWalls) { NotPassedEl.Add(tsc); TaskDialog.Show("Error - Toilet Side Clearance", "The wall" + ts17.Name + "|" + ts17.Id.ToString() + "intersert with the toilet" + "\n" + "It's not pass the CBC Code:The water closet shall be positioned with a wall or partition to the rear and to one side. The center-line of the water closet shall be 17 inches (432 mm) minimum to 18 inches (457 mm) maximum from the side wall or partition."); OverrideGraphicSettings overrideGraphicSettings = new OverrideGraphicSettings(); overrideGraphicSettings.SetCutForegroundPatternColor(color); overrideGraphicSettings.SetSurfaceForegroundPatternColor(color); overrideGraphicSettings.SetSurfaceForegroundPatternId(solidFillPatternId); 149 overrideGraphicSettings.SetSurfaceForegroundPatternVisible(true); document.ActiveView.SetElementOverrides(ts17.Id, overrideGraphicSettings); document.ActiveView.SetElementOverrides(tsc.Id, overrideGraphicSettings); } } } } if (el.Name.ToString().ToLower().Equals("accessiblet-sideclearance18")) { excludes.Add(el.Id); } if (Toiletsideclearance) { FilteredElementCollector toiletfixture = new FilteredElementCollector(document).OfCategory(BuiltInCategory.OST_PlumbingFixtures).WhereEleme ntIsNotElementType(); foreach (Element ele in toiletfixture) { if (ele.Name.ToString().ToLower().Equals("accessiblet-sideclearance18")) { List<Element> TSC18 = new List<Element>(); TSC18.Add(ele); excludes.Add(ele.Id); foreach (Element tsc18 in TSC18) { ElementIntersectsElementFilter ToiletSC18 = new ElementIntersectsElementFilter(ele); FilteredElementCollector tsc18collector = new FilteredElementCollector(document); IList<Element> tsc18IntersectWalls = tsc18collector.OfClass(typeof(Wall)).WherePasses(ToiletSC18).ToElements(); if (tsc18IntersectWalls.Count == 0) 150 { NotPassedEl.Add(ele); TaskDialog.Show("Error - Toilet Side Clearance", "It's not pass the CBC Code:The water closet shall be positioned with a wall or partition to the rear and to one side. The center- line of the water closet shall be 17 inches (432 mm) minimum to 18 inches (457 mm) maximum from the side wall or partition."); OverrideGraphicSettings overrideGraphicSettings = new OverrideGraphicSettings(); overrideGraphicSettings.SetCutForegroundPatternColor(color); overrideGraphicSettings.SetSurfaceForegroundPatternColor(color); overrideGraphicSettings.SetSurfaceForegroundPatternId(solidFillPatternId); overrideGraphicSettings.SetSurfaceForegroundPatternVisible(true); document.ActiveView.SetElementOverrides(tsc18.Id, overrideGraphicSettings); } else { TaskDialog.Show("Passed", "Passed!" + "\n" + "Please consider Universal Design Solution: Toilets are available on the premises with two differing seat heights, or at least one toilet has an adjustable seat height(without the use of after - market removable risers"); Deletepassed.Add(tsc18); } } } } } //Check back wall grab bar height if (el.Name.ToString().ToLower().Equals("accessibleg-backh")) { List<Element> Grabbarheight = new List<Element>(); Grabbarheight.Add(el); excludes.Add(el.Id); foreach (Element gh33 in Grabbarheight) 151 { TaskDialog.Show("processing", "Checking back grab bar height"); ElementIntersectsElementFilter GB33 = new ElementIntersectsElementFilter(el); FilteredElementCollector gb33collector = new FilteredElementCollector(document); IList<Element> gb33Intersect = gb33collector.OfCategory(BuiltInCategory.OST_SpecialityEquipment).WherePasses(GB33).ToElements (); if (gb33Intersect.Count == 0) { NotPassedEl.Add(gh33); TaskDialog.Show("Error - Side Grab bar Height ", "Grab bar missing or at wrong location" + "\n" + "It's not pass the CBC Code: Grab bars shall be installed in a horizontal position, 33 inches (838 mm) minimum and 36 inches (914 mm) maximum above the finish floor measured to the top of the gripping surface"); OverrideGraphicSettings overrideGraphicSettings = new OverrideGraphicSettings(); overrideGraphicSettings.SetCutForegroundPatternColor(color); overrideGraphicSettings.SetSurfaceForegroundPatternColor(color); overrideGraphicSettings.SetSurfaceForegroundPatternId(solidFillPatternId); overrideGraphicSettings.SetSurfaceForegroundPatternVisible(true); document.ActiveView.SetElementOverrides(gh33.Id, overrideGraphicSettings); } else { foreach (Element gbh33 in gb33Intersect) { TaskDialog.Show("Passed", "Passed!" + "\n" + "Please consider Universal Design Solution: swing up-grab bar on both sides of the toilet."); Deletepassed.Add(gh33); } } } } 152 //Check toilet front clearance List<Element> F48R = new List<Element>(); if (el.Name.ToString().ToLower().Contains("accessiblet-frontclearance48-r")) { F48R.Add(el); excludes.Add(el.Id); foreach (Element f48r in F48R) { //create bounding box outline,set up boundingboxintersect filter ElementIntersectsElementFilter TF48R = new ElementIntersectsElementFilter(el); FilteredElementCollector tfr48collector = new FilteredElementCollector(document); IList<Element> tfr48Intersect = tfr48collector.OfClass(typeof(Wall)).WherePasses(TF48R).ToElements(); if (tfr48Intersect.Count == 1) { Toiletfrontclearancel = Toiletfrontclearancel + 2; } else if (tfr48Intersect.Count == 0) { Toiletfrontclearancel = Toiletfrontclearancel - 1; } else { NotPassedEl.Add(f48r); Toiletfrontclearancel = Toiletfrontclearancel - 2; OverrideGraphicSettings overrideGraphicSettings = new OverrideGraphicSettings(); overrideGraphicSettings.SetCutForegroundPatternColor(color); overrideGraphicSettings.SetSurfaceForegroundPatternColor(color); overrideGraphicSettings.SetSurfaceForegroundPatternId(solidFillPatternId); 153 overrideGraphicSettings.SetSurfaceForegroundPatternVisible(true); document.ActiveView.SetElementOverrides(f48r.Id, overrideGraphicSettings); } } } List<Element> F48L = new List<Element>(); if (el.Name.ToString().ToLower().Contains("accessiblet-frontclearance48-l")) { F48L.Add(el); excludes.Add(el.Id); foreach (Element f48l in F48L) { //create bounding box outline,set up boundingboxintersect filter ElementIntersectsElementFilter TF48L = new ElementIntersectsElementFilter(el); FilteredElementCollector tfl48collector = new FilteredElementCollector(document); IList<Element> tfl48Intersect = tfl48collector.OfClass(typeof(Wall)).WherePasses(TF48L).ToElements(); if (tfl48Intersect.Count == 1) { foreach (Element fie in tfl48Intersect) { Toiletfrontclearancer = Toiletfrontclearancer + 2; } } else if (tfl48Intersect.Count == 0) { Toiletfrontclearancer -= 1; } else 154 { Toiletfrontclearancer += 4; } } } // check toilet and grab bar clearance (24") List<Element> GF24 = new List<Element>(); if (el.Name.ToString().ToLower().Equals("accessibleg-clearance24")) { GF24.Add(el); excludes.Add(el.Id); foreach (Element gf24 in GF24) { TaskDialog.Show("processing", "Checking grab bar and toilet clearance..."); ElementIntersectsElementFilter GFC24 = new ElementIntersectsElementFilter(el); FilteredElementCollector gf24collector = new FilteredElementCollector(document); IList<Element> gf24Intersect = gf24collector.OfCategory(BuiltInCategory.OST_SpecialityEquipment).WherePasses(GFC24).ToElement s(); if (gf24Intersect.Count == 0) { NotPassedEl.Add(gf24); TaskDialog.Show("Error - Toilet and Side Grab bar Diatance", "It's not pass the CBC code : The side wall grab bar shall be positioned 24 inches (610 mm) minimum in front of the water closet."); OverrideGraphicSettings overrideGraphicSettings = new OverrideGraphicSettings(); overrideGraphicSettings.SetCutForegroundPatternColor(color); overrideGraphicSettings.SetSurfaceForegroundPatternColor(color); overrideGraphicSettings.SetSurfaceForegroundPatternId(solidFillPatternId); overrideGraphicSettings.SetSurfaceForegroundPatternVisible(true); document.ActiveView.SetElementOverrides(gf24.Id, overrideGraphicSettings); } 155 else { TaskDialog.Show("Passed", "Passed!" + "\n" + "Please consider Universal Design Solution: swing up-grab bar on both sides of the toilet."); Deletepassed.Add(gf24); } } } //check grab bar location (33" - 36" from the top surface of the grab bar to floor) List<Element> GH36 = new List<Element>(); if (el.Name.ToString().ToLower().Equals("accessibleg-height")) { GH36.Add(el); excludes.Add(el.Id); foreach (Element gh36 in GH36) { TaskDialog.Show("processing", "Checking side grab bar height..."); ElementIntersectsElementFilter GHC36 = new ElementIntersectsElementFilter(el); FilteredElementCollector gh36collector = new FilteredElementCollector(document); IList<Element> gh36Intersect = gh36collector.OfCategory(BuiltInCategory.OST_SpecialityEquipment).WherePasses(GHC36).ToElemen ts(); if (gh36Intersect.Count == 0) { TaskDialog.Show("Error - Back Grab bar Height", "It's not pass the CBC code :Grab bars shall be installed in a horizontal position, 33 inches (838 mm) minimum and 36 inches (914 mm) maximum above the finish floor measured to the top of the gripping surface"); NotPassedEl.Add(gh36); } else { foreach (Element G1 in gh36Intersect) { 156 TaskDialog.Show("Passed", "Passed!" + "\n" + "Please consider Universal Design Solution: swing up-grab bar on both sides of the toilet."); } Deletepassed.Add(gh36); } } } } } trans.Commit(); //checking toilet front clearance int tf = Toiletfrontclearancel + Toiletfrontclearancer; if (tf == 1) { TaskDialog.Show("Processing", "Checking Toilet Front Clearance"); TaskDialog.Show("Passed", "Passed!, Please consider providing larger turning space"); FilteredElementCollector toiletfrontclearancedelete = new FilteredElementCollector(document).OfCategory(BuiltInCategory.OST_PlumbingFixtures).WhereEleme ntIsNotElementType(); foreach (Element tfcd in toiletfrontclearancedelete) { if (tfcd.Name.ToString().ToLower().Contains("accessiblet-frontclearance48")) { Deletepassed.Add(tfcd); } } } else { TaskDialog.Show("Processing", "Checking Toilet Front Clearance"); TaskDialog.Show("Error - Toilet Front Clearance", "It's not pass the CBC code : Clearance around a water closet shall be 60 inches (1524 mm) minimum measured perpendicular from the side wall 157 and 56 inches (1422 mm) minimum measured perpendicular from the rear wall. A minimum 60 inches (1524 mm) wide and 48 inches (1219 mm) deep maneuvering space shall be provided in front of the water closet."); FilteredElementCollector toiletfrontclearancedelete = new FilteredElementCollector(document).OfCategory(BuiltInCategory.OST_PlumbingFixtures).WhereEleme ntIsNotElementType(); foreach (Element tfcd in toiletfrontclearancedelete) { if (tfcd.Name.ToString().ToLower().Contains("accessiblet-frontclearance48")) { NotPassedEl.Add(tfcd); } } } //place the 60" turning space circle using (Transaction TURNING = new Transaction(document, "checking wheelchair turning space")) { TURNING.Start(); FamilySymbol C60 = Creatcodecompliantfamily(document, "ADA_Wheelchair_turning_space"); if (null != C60) { if (!C60.IsActive) C60.Activate(); TURNING.Commit(); // Create family instance _added_element_ids.Clear(); app.DocumentChanged += new EventHandler<DocumentChangedEventArgs>(OnDocumentChanged); try { TaskDialog.Show("Reminder", "Please try to place the clearance somewhere in the restroom not impact other elements "+"\n"+"After place the clearance, Please press ESC to continue"); 158 uidoc.PromptForFamilyInstancePlacement(C60); } catch (Autodesk.Revit.Exceptions.OperationCanceledException ex) { Debug.Print(ex.Message); } app.DocumentChanged -= new EventHandler<DocumentChangedEventArgs>(OnDocumentChanged); int n = _added_element_ids.Count; TaskDialog.Show("Place Family Instance", string.Format("{0} wheelchair turning space {1} added.", n, ((1 == n) ? "" : "s"))); } FilteredElementCollector wcts = new FilteredElementCollector(document).OfCategory(BuiltInCategory.OST_PlumbingFixtures).WhereEleme ntIsNotElementType(); foreach (Element WCTS in wcts) { if (WCTS.Name.ToString().Contains("ADA_Wheelchair_turning_space")) { ElementIntersectsElementFilter WTS60 = new ElementIntersectsElementFilter(WCTS); FilteredElementCollector wts60collector = new FilteredElementCollector(document); FilteredElementCollector wts60collector1 = wts60collector.Excluding(excludes); IList<Element> WTSIntersect = wts60collector1.WherePasses(WTS60).ToElements(); if (WTSIntersect.Count == 0) { TaskDialog.Show("Passed", "Passed!, Please consider providing larger turning space"); Deletepassed.Add(WCTS); } else { foreach (Element Wheelchair in WTSIntersect) { 159 TaskDialog.Show("Error - Wheelchair turning space clearance", Wheelchair.Name.ToString() + "has some problem" + "\n" + "It's not pass the CBC code : Clearance around a water closet shall be 60 inches (1524 mm) minimum measured perpendicular from the side wall and 56 inches (1422 mm) minimum measured perpendicular from the rear wall. A minimum 60 inches (1524 mm) wide and 48 inches (1219 mm) deep maneuvering space shall be provided in front of the water closet."); NotPassedEl.Add(WCTS); } } } } } string deleteelement = null; foreach (Element passedel in Deletepassed) { deleteelement += passedel.Name.ToString() + "\n"; } TaskDialog.Show("Passed", "Congratulations!"+ "\n" + "These elements passed code check:" + deleteelement + "\n" + "Please notice the highlight elements"); foreach (Element passed in Deletepassed) { using (Transaction delete = new Transaction(document, "Delete element")) { delete.Start(); document.Delete(passed.Id); delete.Commit(); } } string notpassedelement = null; foreach (Element notpass in NotPassedEl) { notpassedelement += notpass.Name.ToString() + "\n"; } 160 if (NotPassedEl.Count != 0) { TaskDialog.Show("Not Pass", "Please check these highlight and existing elements and clearance," + " " + "they are not pass the code check:" + "\n" + notpassedelement); } return Result.Succeeded; } } }
Abstract (if available)
Abstract
Accessible design uses modern ideas about barrier-free architecture to transform the existing environment, providing a safe living and working spaces for aging people and people with disabilities and creating conditions for such people to integrate into society equally. As the trend is towards an aging population, accessible design is increasingly important in architecture design and construction. Since the adoption of the Americans with Disabilities Act in 1990, the accessible design has become a law and not just a design option. However, the traditional planning check process is relatively ineffective and expensive
Linked assets
University of Southern California Dissertations and Theses
Conceptually similar
PDF
Automating fire code compliance using BIM and Revit plug-ins
PDF
Streamlining sustainable design in building information modeling: BIM-based PV design and analysis tools
PDF
Carbon accounting tool (CAT) in BIM: an embodied carbon plug-in for revit
PDF
MM Electrical Tool: a tool for generating electrical single line diagrams in BIM
PDF
Lightnet: a Web based teaching tool
PDF
Building bridges: filling gaps between BIM and other tools in mechanical design
PDF
Planning in advance for rehabilitation and restoration using BIM and seismic simulation to record and analyze the Japanese House in Los Angeles
PDF
Revit plugins for electrical engineering improvements in buildings: Lighting power density and electrical equipment placement
PDF
Multi-domain assessment of a kinetic facade: determining the control strategy of a kinetic façade using BIM based on energy performance, daylighting, and occupants’ preferences; Multi-domain asse...
PDF
Streamlining precast back-frame design: automated design using Revit plugin
PDF
Shading mask: a computer-based teaching tool for sun shading devices
PDF
A BIM-based visualization tool for facilities management: fault detection through integrating real-time sensor data into BIM
PDF
Evaluation of daylighting circadian effects: Integrating non-visual effects of lighting in the evaluation of daylighting designs
PDF
BIM+AR in architecture: a building maintenance application for a smart phone
PDF
Exploration for the prediction of thermal comfort & sensation with application of building HVAC automation
PDF
Lateral design with mass timber: examination of structural wood in high-rise timber construction
PDF
Bridging the gap: a tool to support bim data transparency for interoperability with building energy performance software
PDF
Design2sustain- a web based resource suite for sustainability designed for undergraduate architecture programs
PDF
Development of circadian-effective toplighting strategies: using multiple daylighting performance goals for dementia care communities
PDF
Office floor plans generation based on Generative Adversarial Network
Asset Metadata
Creator
Liu, Zhiying
(author)
Core Title
A BIM-based tool for accessible design standard plan check: an automated plan review plug-in for Revit focusing on accessible design
School
School of Architecture
Degree
Master of Building Science
Degree Program
Building Science
Publication Date
05/06/2020
Defense Date
05/05/2020
Publisher
University of Southern California
(original),
University of Southern California. Libraries
(digital)
Tag
accessible design,BIM,OAI-PMH Harvest,Revit API,universal design
Language
English
Contributor
Electronically uploaded by the author
(provenance)
Advisor
Kensek, Karen M. (
committee chair
), Regnier, Victor Albert (
committee member
), Schiler, Marc (
committee member
)
Creator Email
liuzhiyi@usc.edu
Permanent Link (DOI)
https://doi.org/10.25549/usctheses-c89-298175
Unique identifier
UC11665154
Identifier
etd-LiuZhiying-8436.pdf (filename),usctheses-c89-298175 (legacy record id)
Legacy Identifier
etd-LiuZhiying-8436.pdf
Dmrecord
298175
Document Type
Thesis
Rights
Liu, Zhiying
Type
texts
Source
University of Southern California
(contributing entity),
University of Southern California Dissertations and Theses
(collection)
Access Conditions
The author retains rights to his/her dissertation, thesis or other graduate work according to U.S. copyright law. Electronic access is being provided by the USC Libraries in agreement with the a...
Repository Name
University of Southern California Digital Library
Repository Location
USC Digital Library, University of Southern California, University Park Campus MC 2810, 3434 South Grand Avenue, 2nd Floor, Los Angeles, California 90089-2810, USA
Tags
accessible design
BIM
Revit API
universal design