Scan-to-HBIM for conservation and preservation of Cultural Heritage building: the case study of San Nicola in Montedoro church (Italy)

The management of Cultural Heritage (CH) requires increasingly efficient, simple and shareable tools, methods and knowledge. In this environment, a suitable procedure was developed to transform the point cloud, generated by geomatics surveys, into parameterized objects. In order to obtain an object with precise geometric and physical characteristics, a three-dimensional modelling software (Rhinoceros) was used. This software, using the tools and specific plugins, has allowed the parameterization of objects. In particular, the use of the Grasshopper plugin allowed a two-way transformation of the objects between the modelling software and the BIM software (Revit). As a result, any changes to the model made in Rhinoceros were automatically made in Revit and vice versa. The paper shows the potentiality, simplicity and efficiency of the developed method in order to perform the scan-to-HBIM process. This approach was applied to a religious building, located in Italy, belonging to the Cultural Heritage.


Introduction
The digital management of objects and structures belonging to the Cultural Heritage (CH) is of crucial importance for conservation, maintenance and protection activities. The spatial data acquired, e.g. through a geomatics survey, can be structured in a more suitable way for their use. For example, the GIS (Geographic Information System) or SIS (Spatial Information System) is a valid tool to manage historical information (Pepe and Parente 2017). In the recent years, the BIM (Building Information Modeling) approach is spreading rapidly (Chen and Tang 2019); the application of BIM to historical or heritage structure is an interesting challenge both in the field of 3D modelling and in the management/valorization of the building of particular historical and cultural interest (Castagnetti et al. 2017;Diara and Rinaudo 2018). The term Historic (or Heritage) Building Information Modeling (HBIM) was introduced by Dore and Murphy (2012). In this environment, architectural elements are represented not only in their geometry but also in the corresponding attributes of a historical database. In this way, geometries, materials, status of deterioration, historical phases and design interventions on a building can be managed on a three-dimensional model. Especially in recent years, research and development of solutions in the HBIM environment have been growing. Dore et al. (2015) discuss about the current findings to date of the Historic Building Information Model (HBIM) of the Four Courts in Dublin. Paris and Wahbeh (2016), using Revit Autodesk software, wrote about an experimentation of an element of the "Scala Regia" in the Vatican. Nieto et al. (2016) propose an innovative methodology of analysis and treatment of the information based on a representative 3D graphic model of the flooring and wall tiling of a historic building; this methodology was applied to the Pavillion of Charles V, a Renaissance-characterized building located in outdoor areas of the Alcazar of Seville, Spain. Sztwiertnia et al. (2019) discussed an HBIM application to the so-called Wang Temple in Karpacz (Poland) highlighting the potential of this system in creating a vast, complicated and detailed documentation of a single building. Coli et al. (2019) wrote about an HBIM methodology applied to resurrection of Christ by Piero della Francesca mural painting at Sansepolcro, Italy. In order to create a "3D informative model", the paper describes the geometry with objects linking them the information related to knowledge of cultural heritage and it can represent a technical and organizational support for future conservation operations. Costantino et al. (2020) propose a scan-to-HBIM procedure applied to the church of Montedoro that involved the construction of the meshes and subsequent editing of the meshes in another 3D modelling software; however, the management of the number of meshes required important computational capabilities of the PC and the meshes obtained by the photogrammetric process did not allow to correctly describe the geometry of the structure in some parts, such as the edges. Salam (2020) discussed the use of HBIM in the restoration field and, of consequence, introduces a suitable sustainable approach to be used in the upcoming restoration projects in Egypt. In particular, the HBIM is applied to the Baron Empain Palace in Heliopolis, Egypt. Pepe et al. (2020) identify an efficient pipeline in order to build HBIM and create digital models to be used in structural analysis.
The procedure for the construction of an HBIM relating to a generative structure (church, castle, building, etc.) can be composed as follows (Wang et al. 2019): (i) identification of information requirements; (ii) determination of required scan data quality, (iii) scan data acquisition, and (iv) as-is BIM reconstruction. The first step means to identify the Level of Development (LOD). The LODs have the task of precisely defining the level of development of the various types of information contained within the model. In particular, the several LODs can be sketched as follows (NBS 2016;Brumana et al. 2018): LOD100 represents a conceptual a-dimensional model, LOD 200 means that the elements of the model are represented with generic quantity, size, shape, position and orientation; nongraphic information may also be linked to the element, LOD 300 a three-dimensional model in the executive design phase, LOD350-400 represents the model implemented for the construction phase and LOD500 the as-built updating after the construction phase. Therefore, taking into account this classification, the HBIM project is oriented in a LOD500 level direction. With regard to the second topic, i.e. the determination of required scan data quality, particular attention must be paid to different aspects of geomatics survey, such as spatial resolution, density and texture of the point cloud (Dai et al. 2012). This means even to identify a suitable sensor able to satisfy the characteristics of the project. In order to obtain dense point cloud, the survey can be performed by the use of active sensor, such as terrestrial laser scanner (TLS) or passive sensor (digital camera) (Gomarasca 2009). The third step involves in the scan of the structure under investigation. The last step, also known as "Scan-to-BIM", consists of transforming the point cloud into parametric objects. This means the objects, such as walls, doors or windows of a structure, can be modified with a simple set-up of its dimensions in a project database; i.e. the geometry, properties of materials and technical elements of the objects can be modified, modified, queried and linked with other information in a simple, precise and intuitive way. The scan-to-BIM task is in continuous development in order to develop methods and algorithms able to automate this process (Son et al. 2015). Indeed, especially when there are numerous objects to model, this operation takes on considerable importance. Consequently, the computerized management, i.e. the description from an architectural-engineering and archaeological point of view of every single object, represents a modern and indispensable tool in cultural heritage environment.
In the present paper, we would like to address two main issues: automation transformation process from point cloud to BIM and the management of BIM objects for the conservation and enhancement of Cultural Heritage. To validate the implemented approach, a case study of San Nicola in Montedoro church is shown in the manuscript.

Methods and data
From SfM/TLS clouds to HBIM models The procedure that allows obtaining a parametric model of a structure from point cloud (acquired with photogrammetric methods and/or with active sensors, as for example the TLS) can be divided into several steps.
In order to obtain dense point cloud of a structure, a very common method is the photogrammetric method. In particular, Structure from Motion (SfM) approach has become quite popular in Close Range Photogrammetry (CRP) thanks to ability to determine the parameters of external orientation without any a priori knowledge of the approximate positions for cameras and 3D points (Bitelli et al. 2018). SfM technique requires, in order realizing 3D models, a block of images with a high degree of overlap that capture the complete 3D structure of the scene viewed from several positions. Based on the estimated camera positions, it is possible to calculate depth information for each image in order to be combined into a single dense point cloud. Indeed, on the base of MVS (Multi-View-Stereo) algorithm, this task allows increasing the density of the point cloud generated in SfM process (Pepe et al. 2019;Visintini et al. 2019;Alessandri et al. 2019).
A great advantage of the photogrammetric method is that, once a suitable reference plane has been chosen, orthophotos with high texture quality are produced. The fisheye lens allows to take photogrammetric measurements even in small environments. The geometry of the images taken with a fisheye lens does not conform to the central perspective projection. Thus, the collinearity equation cannot be used to describe the imaging process mathematically. The fisheye projection is based on the principle that in the ideal case the distance between an image point and the principle point is linearly dependent on the angle of incidence of the ray from the corresponding object point. The equations of the fisheye projection model are (Schwalbe 2005): where coordinates of the principle point.
Once the mathematical projection model is defined using fish eye lens, it is possible to create the 3D model.
Besides the photogrammetric method, in measurement technology, Terrestrial Laser Scanning (TLS) is intensely used in digital architectural documentation and cultural heritage studies to generate dense point cloud. Indeed, TLS is competitive for indoors surveys allowing to perform textured scans even in poor light conditions. In addition, TLS is used in the 3D survey of narrow spaces. However, these two techniques can be integrated by exploiting the advantages of one over the other, as already shown in several studies (Guarnieri et al. 2011;Bianchi et al. 2018).
Once the point cloud has been acquired, it is necessary to transform the points of a structure into parametric objects. This task can be done using a 3D reconstruction through profiles; indeed, starting from a set of 3D point cloud, a curve or a parametric surface can be described by two methods (De Luca 2011): -Approximation (the curve or surface is defined by means of points but does not necessarily pass through them; the surface is then described by adjusting some control points); -Interpolation (the curve or surface passes through all entry points).
Among the parametric representations of curve/surfaces, one of the most used is the so-called NURBS (Non Uniform Rational B-Splines). A NURBS curve C(u), which is a vectorvalued piecewise rational polynomial function, is defined as (Piegl 1991): where the w i are the weights, the P i are the control points, and the N i, p (u) are the normalized B-Spline basis functions of degree p (De Boor 1972). Therefore, a set of NURBs allows the geometry of a generic (and complex) surface to be described. In particular, a series of profiles are constructed from the point cloud acquired using geomatics techniques. These profiles are interpolated with NURBs. The three-dimensional modelling phase can be realized in different commercial software, such as Rhinoceros and Blender. In this paper, Rhinoceros (also called "Rhino") version 7 WIP (Work In Progress) software was used.
The reason of this choice is due to simplicity in the creation and modelling of the objects and the implementation of some tools and plugin in Rhinoceros software. For example, a plugin very useful in 3D modelling is Arena4D, which allows importing point clouds into Rhino for modelling. All Rhino functions are controlled via the simple Arena 4D panel, presented in the familiar Rhino style; functions include the following: point cloud overlay, point cloud decimation, onepoint snap, sections through a point cloud, sections between geometry, customizable shader.
In addition, this software contains, starting with version 6.0 of the software, Grasshopper. Grasshopper is a visual programming language that, like Rhino, has become a solid development platform. Grasshopper provides the foundation for numerous third-party components, ranging from physical simulation to robotic control. Recent developments in Grasshopper programming have enabled the transformation of objects modelled in Rhinoceros into Autodesk Revit software.
The objects realized in this way belong to both Rhinoceros and Revit. Therefore, the three software (Revit, Grasshopper and Rhino) are fully connected and, of consequence, the user can view real-time surface images in both Rhinoceros and in Revit. In this way, the surfaces can be managed through the Grasshopper programming language and, of consequence, can be shifted rotated, etc. All the objects are completely parameterized.
The path between the programs is bi-univocal so the surface imported in Revit once modified changes simultaneously in Rhinoceros.
In Grasshopper software are chosen and assigned categories (architectural-structural elements) such as the following: walls, floors, pillars, generic masses.
The characteristics assigned in Grasshopper are automatically recognized in Revit software. Therefore, threedimensional models are simultaneously modified in Rhinoceros and Revit software thus creating a connection between the two software.
The pipeline of the main steps to produce scan-to-HBIM model can be summarized as shown in Fig. 1.
In this way, it is possible to design a working environment for the creation, modelling and digital management of cultural heritage. In addition, it is possible to link semantic information produced by other environments. For example, historical or architectural information can be integrated into the BIM model within Revit software by the use of hyperlink field. Thus, the objects created can be continuously updated in terms of geometry, materials and semantic information.

Brief history of San Nicola in Montedoro church
The church of San Nicola in Montedoro (Fig. 2) is one of the oldest in the town of Martina Franca in the province of Taranto (Italy) and presumably dates back to the fourteenth century, the period of Angevin foundation of the city, located in the Montedoro district, hence "San Nicola di Montedoro".
The church of San Nicola in Montedoro stands on a site that in the fourteenth century was occupied by the Church of San Paolo dei Greci, whose name also indicated the neighbourhood. This small church went to ruin in the sixteenth century and was rebuilt in the seventeenth century, first called St. Nicholas (of the poor), because in the past, together another building called "Ospedaletto", it was mainly dedicated to social welfare activities; then, later it was called St. Nicholas in Montedoro.
The church preserves its original structure, despite the internal transformations of the seventeenth century. Over the centuries, the church has undergone several changes; the most significant occurred in the seventeenth century. The structure is characterized by a modest rectangular hall and late medieval architectural elements visible especially outside. The simplicity of the external facade is embellished only by the roof with raised pitches that intersect and form two gables with cladding made with the typical "chiancarelle" (limestone slabs). The portal, slightly ogival, is surmounted by a lunette and a small radial rose window, while on the tympanum of the main facade stands a graceful bell tower. The interior of the church was remodelled several times, such as the stone altars made in the seventeenth century and the vast repertoire of paintings made between the sixteenth and nineteenth centuries. Many frescoes were repainted with very evident superimpositions; in other cases, the pictorial film was completely chiselled leaving only some traces of the sinopia on display. The

Integrated survey of the external and internal of the church
The survey of the church was carried out through the use and integration of active and passive sensors, terrestrial and aerial. In particular, the external façade was surveyed using TLS, the inside part using DLSR (Digital Single Lens Reflex) camera with fisheye and the upper part of the building (the roof and other architectural elements not visible through a terrestrial survey) with a camera mounted on UAV (aerial) platform.
The topographic survey was carried out by TS30 Leica Geosystems total station which allows acquiring discrete points with an angular precision of 0.5″ (0.15 mgon) and to acquire distance with prism (precision of 0.6 mm + 1 ppm) and without prism (2 mm + 2 ppm). The topographic survey was realized out by creating a station inside the church and one outside. In this way, it was possible to measure 20 reference points, as shown in Fig. 3a. The post-processing of the topographic data was performed in Leica Geo Office (LGO) software which allowed determining the spatial coordinates of the points in a local reference system, useful for the georeferencing of the point cloud. In particular, it was possible to identify 12 ground control points (GCP S ) and 8 check points (CPs). The spatial distribution of the points is reported in Fig. 3b.
The survey of the external part of the church was realized using a TLS for the facades while, for the upper part of the structure, a photogrammetric UAV platform survey was realized. Regarding the generation of the model for the external part of the church, the survey was carried out by FARO FocusS 350 TLS, which is specially designed for long-distance applications. HDR imaging and HD photo resolution (overlay up to 165 megapixel colour) ensure true-to-detail scan results with high data quality (distance accuracy up to ± 1 mm). In order to cover the entire external surface of the church, three acquisition Fig. 1 Simplified pipeline for the construction of scan-to-HBIM models stations were carried out. These three scans were aligned and referenced by a checkpoint whose coordinates were determined with a previous topographical survey.
As regards the survey of the upper part and the roof of the church, it was carried out using a Parrot Anafi quadcopter drone. This system is equipped with a Sony Sensor ® 1/2.4″ 21MP (5344 × 4016) CMOS, which allows to obtain, thanks also to a 3-axis stabilizer, clear and detailed images. The main feature of the UAS may be summarized in Table 1.
The distance between the UAV and the building was close due to the presence of many obstacles in the old town where the church is located; this means that the images have a higher geometrical resolution than the designed GSD that was 0.01 m. In any case, the photogrammetric survey was carried out with high degree overlap between the images (Pepe 2018). In addition, varying the tilt angle of the camera, it was possible to acquire every part of the building. In this way, it was possible to build a network of the images with high degree of overlap and convergent. A total amount of 60 images were acquired. The post processing of the images was performed by the use of Agisoft Metashape software.
The root mean square of the photogrammetric block evaluated on 5 ground control points (GCPs) was 0.009 m and on 4 check points (CPs) was 0.010 m. Subsequently, it was possible to build a dense point cloud of the upper part of the structure.
The point clouds obtained by TLS and UAV photogrammetry were integrated in 3D Zephyr software, and subsequently, it was exported a unique point cloud. This point cloud was imported, in turn, in Geomagic Studio software for 3D modelling and construction of the orthophotos of the single façades of the building, as shown in Fig. 4.
The survey of the interior of the church was carried out with terrestrial photogrammetric method. In particular, taking into account the rather restricted environment, the survey was performed by DSLR Nikon D5000 camera with a fisheye lens (focal length of 10 mm). The fisheye is a wide-angle photographic lens that allows observing a wide scene. This type of lens was used successfully in photogrammetry field, as shown in Kannala and Brandt (2006) especially in narrow space.
The image modelling workflow to build accurate 3D model foresees camera calibration, dense matching and surface extraction. Therefore, the first photogrammetric step was the calibration of camera. In this way, it was possible to calculate the main parameters of the camera (focal length, coordinates of the principal point, radial and tangential distortions). This task was carried out using Agisoft Lens, which uses LCD screen as a calibration target. The chessboard was displayed on a 42″ LCD monitor, and 12 photos were taken in different positions. The processing results, radial and tangential distortion curves are shown in Fig. 5.
Subsequently, in Agisoft Metashape software environment, the 3D model was built. In order to completely cover the interior of the church, 22 photos were performed. After importing the images in the software and uploading the camera calibration parameters, the software in automatic way aligned the images. To scale the model and to perform a quality of the build photogrammetric model, a topographical survey was carried out. In particular, 8 points were calculated of which 6 points used as GCPs. The accuracy of the photogrammetric model evaluated on GCPs was 0.003 m while on CPs was 0.004 m. Once this phase was terminated, the dense cloud was built. After dense point cloud was reconstructed, it was possible to generate polygonal mesh model based on the dense cloud data. In this way, the architectures inside the church were built. The features of the geomatics survey can be summarized as reported in Table 2.
Based on the three-dimensional surveys and after having generated a georeferenced point cloud, it was possible to start the production of 2D layout, characterized by a higher level of detail than traditional restitution.
The 2D digitization was realized by importing the point cloud in LAS format into the ICV software (Costantino et al. 2017). In particular, through the tool section, it was possible to set the number of section planes, the slice thickness, the interpolation step, and the distance between consecutive sections, as well as to set their orientation (horizontal, vertical, oblique), both in manual mode (manipulator with box) and keyboard. The generated outputs were exported in .dxf file and, therefore, managed in CAD environment.
In addition, in Agisopht Metashape environment, orthophoto in very high resolution was realized; the projection planes were chosen in relation to the positions of the frescoes. To obtain a high quality of the orthophotos and, of consequence, emphasize the valuable frescoes in the church, a pixel size of 0.001 m was used. Subsequently, through the realization of the orthophotos, it has proved possible to integrate the sections obtained with them by creating a two-dimensional representation with the metric information of the frescoes in the church. In order to highlight the characteristic elements of the interior of the church both through CAD representation and the use of orthophotos, an architectural layout has been created (Fig. 6).

Realization of the HBIM models
The HBIM model of the set of objects that make up the church of San Nicola in Montedoro was divided into two parts. The first part concerns the modelling of the structure, that is the modelling of the walls, arches, doors and windows, while the second, instead, concerns the objects and elements of particular value present inside the church. In this way, objects such as altars and frescoes are placed on the wall elements or arches.
The point cloud obtained from the geomatics survey was imported in Rhinoceros software. In order to create the parametric objects of structural elements, such as walls, inside Rhinoceros software, a particular useful tool was Arena4D. Once the point cloud has been loaded into the Rhino  sections. Before performing this task, it was necessary to transform the point cloud in LAS format into a VPC format. By importing this point cloud into Rhino, profiles were created in certain sections, as shown in Fig. 7. The different profiles were vectorized and interpolated by NURBS surfaces in Rhino environment. The (parametric) model of the structure of the church, visualized in render view, is shown in Fig. 8.
The surfaces thus generated in Rhinoceros are associated with the Grasshopper software by means of specific tools capable of recognizing such entities. In this way, the surfaces thus created belong simultaneously to Rhinoceros, Grasshopper and Revit. For example, the parameterization of the walls in the three software is shown in Fig. 8. In particular, Fig. 9a shows the walls realized in Rhino and the management of them through the tools implemented in the Grasshopper software, while Fig. 9b shows the objects (walls) parameterized in the Revit software.
With regard to the modelling of the several elements present in the church, it was necessary to perform a modelling of the structure for HBIM purposes. This task was carried out in Rhino software. Indeed, using Arena4D plugin, the point cloud was sectioned along an object of which we want to reconstruct a 3D profile. For example, in Fig. 10, the reconstruction through profiles of an altar in the church of San Nicola in Montedoro is reported. The sections were transformed into three-dimensional parametric objects through Boolean tools such as extrude and lofts. In this way, it was possible to obtain a 3D model (Fig. 11) that is fully parameterized both from a geometric and material point of view. Indeed, every object reconstructed in 3D is defined in its dimensions and it is possible to associate the type of the material of which it is made.
The surfaces thus generated in Rhinoceros are associated to Grasshopper software, as shown in Fig. 12a. The model was automatically imported into Revit, and as a   (Fig. 12b).
As was done for the altars, the same approach was used to model the part of the plaster containing the frescoes. In fact, Fig. 9 Simultaneous modelling of the walls in the three software used for the creation of parametric objects: visualization in Rhino-Grasshopper (a) and in Revit software (b) starting from the point, in Rhinoceros software, this part of the structure was modelled and, through Grasshopper, the model was imported into Revit Software. In Fig. 13 several screenshots show the transformation and management of the parametric objects of the frescoes in the three software.
A modelling of the frescoes carried out in a BIM environment allowed to manage information regarding the characteristics of the materials and the geometry of the surfaces. This is particularly useful in the storage and sharing of geometric and semantic information in order to manage the elements of particular historical-architectural value. In addition, in Revit software, it was possible to manage information intrinsic to the characteristics of the materials and, at the same time, obtain semantic information.
This task can be obtained by linking the objects to other external files via a "hyperlink" field. Of consequence, it is possible to associate to each object the historical and architectural information. This can be achieved through the construction of a simple local database or a centralized one, i.e. one made with standard specifications where all the objects present on the national territory and recognized as belonging to the cultural heritage are catalogued. Indeed, recently on the Italian territory, a new General Information System of the Catalogue (SIGECweb) has been launched which offers the opportunity to reflect on the current meaning of the Catalogue of Cultural Heritage as provided by the Code of Cultural Heritage and Landscape. SIGECweb was created with the aim of unifying and optimizing the processes related to the cataloguing of cultural heritage, ensuring, thanks to the control of the procedures applied, the quality of the data produced and their compliance with national standards. Therefore, through the URL (Uniform Resource Locator) link, it was possible to link the information of each model to a centralized database. In this way, the homogeneity of the information is guaranteed; the latter aspect represents the prerequisite for their immediate availability, proper use and sharing of Cultural Heritage information. However, the hyperlink command can only be activated on objects already in the Revit family. To overcome this situation, it was possible to import an image relative to each object where all the elementary descriptions or simple URLs.

Discussion and conclusions
The document shows a procedure to transform the point cloud generated by the survey using different geomatic techniques into a BIM parameterized object. By integrating the data from the different surveying techniques, it is possible to accurately model even complex architectures, such as altars in churches, arches and walls.
The prerequisite to obtain precise and accurate 3D models is the construction of a dense point cloud that is able to describe geometrically the object to be parameterized.
In the case study, it has been demonstrated how it is possible to obtain a dense point cloud through the integration of photogrammetric surveys (terrestrial and UAV) and laser scanners. The point cloud thus generated in addition to meeting the requirement of high density avoids that there may be elements lacking in metric information (holes or noise).
Starting from the point cloud thus obtained, we described the processing process implemented through the Rhinoceros software. The great advantage of the method described is the sharing of parametric elements generated in Rhinoceros and, subsequently, modifiable and transformable. Through the use of the Grasshopper plugin, it was possible to modify and import the models generated in the Revit environment. In fact, the Grasshopper plugin allows you to modify objects simultaneously in both Rhinoceros and Revit.
The proposed methodology is therefore based on the construction of a parametric object of complex shape starting from the point cloud. It was chosen to generate accurate models starting from the analysis and processing of point clouds, first generating the extraction of significant sections of the object and then modelling with the tools implemented within Rhinoceros.