AUTOMATING THE VERIFICATION OF HERITAGE BUILDING INFORMATION MODELS CREATED FROM POINT CLOUD DATA

The use of remote sensors to acquire metric information for building information modelling (BIM) of heritage buildings is now common. Problematically, the creation of models from that information is still largely a manual and non-quantifiable process. As a result, a key aspect of the scan-to-BIM process is verification of the accuracy of the model in relation to the metric information. The most common method to check a model element constructed from a point cloud seems to be the analysis of deviations between this element and the corresponding point cloud (Anil et al., 2013; Tang et al., 2011). It is comprised of three main steps: the computation, the visualisation and the analysis of deviations. The verification process is particularly onerous for large-scale buildings where it is necessary to ensure that all elements of a model are consistent with metric data that may come from diverse sources (Chow and Fai, 2017). In this paper, we discuss the development of a plug-in for Autodesk Revit that automates this verification process.


INTRODUCTION
The use of remote sensors to acquire metric information for building information modelling (BIM) of heritage buildings is now common practice.Point cloud data is often used for the digital reconstruction of buildings.The manual generation of BIM models from point clouds consists of using point cloud data as visual support in BIM software.The scan-to-BIM process tends to be automated (Macher et al., 2017;Thomson and Boehm, 2015) but remains still mainly manual.
Whether or not they are automatic, the scan-to-BIM approaches lack clear methods for geometric quality assessment of BIM based on point clouds (Bonduel et al., 2017).The verification process is a key aspect of scan-to-BIM process since it guarantees the reliability of BIM models for further uses by other stakeholders.
In this paper, related works about the verification process will be first synthesised and the verification process developed by and currently in use at the Carleton Immersive Media Studio (CIMS) will be explained.Next, a plug-in developed at CIMS to automate the verification process will be presented.Finally, modelling errors will be categorized and the benefits of the developed plug-in compared to the current process will be highlighted.

Related work
The discussion of the verification of BIM elements created from point clouds is limited in literature.(Anil et al., 2011) and (Anil et al., 2013) provide a starting point in the literature.They propose a method for the quality assessment (QA) of as-built BIM created from point clouds by analyzing the patterns of deviations between the model and the point cloud data.The deviation analysis method is composed of three major steps: the computation of deviations, the visualisation of deviations and the analysis of deviation patterns.The last step is performed manually and requires a professional.(Anil et al., 2013) demonstrate that the deviation analysis method compared to physical measurement method allows identifying almost six times more errors with more than 40% time savings.(Bonduel et al., 2017) propose a verification process composed of two scales: the macro-scale and the micro-scale.The macro scale consists in the quick localisation of occluded zones, nonmodelled elements and zones with serious deviations and modelling errors in the complete building.The micro scale considers individual BIM elements and allows a detailed comparison between the point cloud and the model.(Stojanovic et al., 2018) investigate a deviation analysis approach which enables visual assessment of differences between existing BIM geometry and point cloud data.The deviation analysis is, in this case, an updating process used to identify and document new features in a building.

Process currently in use
At CIMS, BIM models are generated from point clouds by using the commercial software Revit from Autodesk.Point clouds are used as visual support to model building elements.Since the architectural geometry found in heritage buildings typically show deformation, the modelling process may involve some approximations.As a result, an acceptable tolerance has to be agreed upon by all project partners at the onset of a project.At CIMS, that tolerance is a maximum deviation of 2.5 cm.If the deviations are higher than the allowable tolerance, the element has to be replaced or remodelled.
The process for verifying a model created from point clouds involves creating multiple sectional views along elements in Revit and measuring the deviations that appear to be the greatest between the point cloud and the model element.Figure 1 presents an example of the verification of a wall element in Revit.This method can be time-consumingnotably for large BIM projectsand it limits the verification of the model to specific section locations.Moreover, as highlighted by (Anil et al. 2013), while a visual inspection is a straightforward method and does not require much computation, it is subjective and the results cannot be easily quantified.From this observation, the idea to develop a plug-in for Revit to automate the verification process started.

Overview
Revit software provides an Application Programming Interface (API) namely a set of subroutine definitions, protocols and tools for building application software.Custom tools and features can be created by C# programming (Microsoft Visual Studio) and plugged directly into Revit, extending its functionality (Autodesk, 2018).
A plug-in for Revitnamed 3D Analysiswas developed at CIMS to automate the verification process.The plug-in aims to visualise the deviations between Revit wall elements and adjacent point cloud data in a 3D view.Figure 2 presents an overview of the developed plug-in.
Figure 2: Overview of the developed plug-in The user is prompted to select a wall and a point cloud in the Revit environment either in a 2D or a 3D view.Points which are within a given distance from the two faces of the wall are selected.For those points, deviations between points and the wall are computed by projecting points on wall faces.Finally, the wall and the pointscolorized according to the calculated distancesare displayed in a 3D view.Information about the repartition of deviations can help the user to analyse the result.
The different steps are detailed below.

Selection of points and computation
Once the user has selected a wall and a point cloud, points, which are within a given distance from the two faces of the wall, are selected.In order to do that the following parameters are extracted from the Revit wall element (Figure 3a): expanded, support was extended for metric units but the existing database structures were preserved for backward compatibility.
The length values extracted from the Revit database are in imperial units.Thus, the extracted parameters have to be converted into metric units.
A distance d between the points and the wall has been fixed to 5 cm.This value is two times higher than the tolerance used at CIMS so that points which were missed during the modelling process can be located.Considering the modelling process, points are located either inside or outside the wall, therefore, points for which the distances from the wall are smaller or equal to 5 cm are selected in the two sides of wall faces and deviations are between -5 cm and 5 cm.Two boxes are determined for the two main faces of the wall.In a 2D view, the contours of a box are obtained based on the end points of the wall, the width and the distance d (Figure 3b).The "Unconnected Height" is used to obtain 3D points defining a box.Finally, points, which are within the two boxes, are selected by considering the direction and orientation of the wall.
A set of planes are defined and the method CreateMultiPlaneFilter in class PointCloudFactory is used.
Then the method GetPoints in class PointCloudInstance is used to extract a collection of points based on the filter.Deviations between the selected points and the wall are finally computed.The distances between each point and the two main faces of the wall are computed considering the orientation of the wall and the minimal distance is stored.

Visualisation
For each point of a CloudPoint structure, one can access the colour of the point by using point.Color.Unfortunately, this field is in a read-only mode and cannot be used to apply a colour map to the points depending on deviation values.
To display the computed distances thanks to a colour map, the Analysis Visualization Framework (AVF) was used.AVF is a part of the Revit API, which enables to draw colour graphics in a Revit project with different display styles (colored surface, markers, diagram, and vectors).Graphics are not residents of the database and thus don't increase the size of the Revit model.They are only stored until the document is closed.AVF is normally used for visualising data like lighting, energy, structural analysis, airflow, and temperature.The visualisation of point cloud deviations from a model is an unusual use for the AVF.
A new point cloud is created and colorized based on the deviations from the wall.This requires XYZ points and values attributed to these points that are deviations in our case.In order to do this, the point cloud has to be split into smaller ones (it is recommended to create multiple primitives with no more than 500 points).A new display style is created.Default settings for marker, colour, and legend are defined.Five colours are set to easily visualise and analyse the deviations:  Deviations from -1 cm to 1 cm : good adjustment of the wall, green colour  Deviations from -2.5 to -1 cm and from 1 cm to 2.5 cm : deviations still in the tolerance, yellow and orange colours respectively  Deviations from -5 to -2.5 cm and from 2.5 cm to 5 cm : deviations out of the tolerance, blue and red colours respectively The display style defined is applied to a temporary 3D view named "3D analysis".In this view, the points are colorized according to the calculated distances from the wall element and the corresponding colour map is displayed.Neighbouring model elements are also displayed for a better understanding of the context.The user can rotate the wall in this 3D view to see deviations in both sides of the wall.The selection of the wall allows seeing the points inside the wall by transparency.The user can still change the display style thanks to an interface proposed by the AVF.

Analysis of deviations
Once the process is done, the user has to analyse the deviations.
To help the user analyse the result, the percentages of points belonging to different ranks are displayed in a window.Three ranks are considered:  Rank 1: from -1 cm to 1 cm  Rank 2 -negative: from -2.5 to -1 cm  Rank 2 -positive: from 1 to 2.5 cm  Rank 3 -negative: from -5 to -2.5 cm  Rank 3 -positive: from 2.5 to 5 cm Different modelling errors can be identified as a result of the visualisation and the repartition of deviations.This is discussed in the next section.
The result of the 3D Analysis plug-in applied for a wall element is presented Figure 4.In a 3D temporary view, the following elements are displayed: the wall and its neighbouring elements, the selected points colorized according to the computed deviations, the colour map and a window containing information about the repartition of deviations.

Modelling errors
Based on the analysis of deviations, different categories of modelling errors can be identified by the user: location errors, geometry errors, and orientation errors.
A location error can be revealed if there are constant deviation values over the wall.For example, if positive deviations are observed on one side of the wall and negative on the other side, the wall would need to be replaced.A geometry error can be observed if the thickness of the wall is incorrect.One can identify this error if the deviation values are positives in both side of the wall (wall too much thin) or negatives in both sides of the wall (wall too much thick).An orientation error can be identified if the deviation values increase from one end to the other end of a wall.

Benefits of the plug-in
The benefit compared to the previous method described above is that the deviations are represented in a 3D view for the whole element making it easier to see potential modelling errors and deviations.The plug-in is easy to use, the users only have to select the wall element and adjacent point cloud.
The computation and the display of the result takes a few seconds.The analysis of the result is facilitated with information about deviation repartition.
The plug-in is currently being used for the verification of a large-scale heritage BIM project.Since the plug-in automates part of the verification process, it increases efficiency by eliminating the need to manually check the deviations between the point cloud data and wall elements through multiple section locations.This also means the verification of the wall elements is not limited to specific locationsthus the use of the plug-in can increase the number of modelling errors detected.The analysis of deviations in a threedimensional view also makes the verification process easier.

Plug-in for wall replacement
As it has been shown above, the 3D Analysis plug-in allows the identification of potential modelling errors for wall elements.If an error is identified, one has to replace the wall but this can be difficult to accurately replace the wall manually.Due to this, another plug-in is under development to replace walls automatically.This second plug-in isfor nowlimited to the translation of a wall along X or Y axis and do not consider the automatic rotation of a wall.
The aim of the plug-in is to minimize deviations from the point cloud data.For example, a wall that is parallel to the X axis.The averages of Y coordinates of points are computed for both sides of the wall and a translation is deducted and applied to the wall.Additionally, a thickness is computed and compared to the thickness chosen by the user.A window shows the two values and prompts the user to change wall thickness if these values are different.It allows quantifying geometry errors.

CONCLUSION
A key aspect of the scan-to-BIM process is to guarantee the reliability of BIM models created from point cloud data.The manual verification process is time-consuming and errorprone since it is limited to specific locations in the model.
A plug-in was developed to automate the verification process by computing and displaying deviations between a point cloud and wall elementsfor the time being.The plug-in is relatively easy to use.The user selects a wall and adjacent point cloud in the Revit environment.After minimal computation time, the wall and its neighbouring elements, points colorized according to the computed deviations and a colour map are displayed.To help the user analyse the deviations, a window containing information about the repartition of deviations is also displayed.
The current use of the plug-in for the verification of a largescale heritage BIM project already demonstrates its efficiency.The plug-in saves time compared to the previous verification process.Moreover, deviations are represented in a 3D view making it easier to see potential modelling errors and deviations.
Another plug-in is under development to complete the verification process with the automatic replacement of walls when modelling errors are identified.The development of this plug-in will be the object of further works.
A potential use of the application that could be developed in the future is the analysis of an entire building that automatically identifies modelling errors.
Figure 1: Creation of a sectional view along a wall element for the verification of the wall modelling from a point cloud


PT[0] and PT[1]: two wall end points, which described wall axis  Direction: vector of the wall axis  Orientation: normal vector of a wall face  Width: wall thickness  "Unconnected Height": wall height Revit was originally developed for the US market where architects work in imperial units.When Revit's market Point

Figure 3 :
Figure 3: Point selection in both sides of the wallOne should note that there is a limitation in point queries in Revit to avoid the program crashing.The default upper limit is one million points.To retrieve the entire list of points in a point cloud, the implementation of a custom point cloud engine would be necessary.However, the selected points are well

Figure 4 :
Figure 4: Result of the 3D Analysis plug-in

Figure 5
Figure5presents an example of wall replacement.Before replacement, the result of the 3D analysis plug-in shows that the deviations are within the allowable tolerance, however positive deviation values are observed on one side and negative values are observed on the other side of the wall (Figure5a).After replacing the wall, the 3D Analysis plug-in is once again launched and the result is presented in Figure5b.Before the wall replacement about 40 % of the deviations were within the rank 1, whereas after wall replacement about 65 % of the deviations are within the rank 1.