SCAN-TO-BIM FOR THE MANAGEMENT OF HERITAGE BUILDINGS: THE CASE STUDY OF THE CASTLE OF MAREDOLCE (PALERMO, ITALY)

Conservation and preservation of heritage buildings require the knowledge and sharing of a great deal of data and information about buildings. Such information comes from the different disciplines involved in the restoration and maintenance processes. The integration and use of all this information in a single working environment is a key factor for the success of historical building conservation and management projects. Heritage (or Historic) Building Information Modelling (HBIM) is nowadays the most appropriate tool to collect and manage all data related to Architectural Heritage. The HBIM process requires an in-depth knowledge of the historical building that can be achieved using a detailed 3D survey and adequate parametric modelling. For this reason, the Scan-to-BIM approach, which involves creating the BIM model from a laser scanner survey, is widely used. The work focuses on the application of the Scan-to-BIM process to a historical/archaeological building in Palermo (Italy), the Castle of Maredolce. The work aims to obtain an HBIM of the building but the paper deals also with the survey issues and the modelling challenges, focusing on the different modelling approach between parametric and not-parametric architectural elements. The most difficult challenge of the modelling step was to obtain parametric objects of the complex geometries of the historical building. The work has allowed achieving the HBIM of the Castle of Maredolce and has highlighted some issues and advantages of the Scan-to-BIM approach.


INTRODUCTION
Projects for the restoration and maintenance of historical heritage buildings have to deal with the very relevant problem of data management. The restoration and maintenance of historic heritage buildings involve the accurate knowledge of the structure through the acquisition of geometric, material and semantic data of the building; moreover, the knowledge of the constructive evolution and the previous restoration actions is fundamental for the new restorations and maintenance. Cultural heritage management deals with two main issues: the large amount of data needed to know in an exhaustive way the architectural heritage and the uniqueness of the shapes and geometries, related both to the various construction techniques used and to the processes of modification that have occurred over the years (Brusaporci et al., 2018). The traditional approach to data management was that the information were collected in paper-based sources or digital documents; this approach, besides being a messy and dispersive method for information management, makes difficult to link the different data to each chronological period, causing misunderstandings about the real conditions of the building (Bruno et al., 2019). The use of Building Information Modelling (BIM) process would seem to be the best way to integrate all kind of information into a single 3D database and to manage architectural heritage buildings (Badenko et al., 2019). The result of the BIM process is objected-oriented semantic modelling, enriched by heterogeneous information, continuously expandable. The application of the BIM process to heritage buildings is known as Heritage (or Historic) Building Information Modelling (HBIM) (Dore & Murphy, 2012, Murphy et al., 2017. The main difference between BIM and HBIM is the object of modelling: while BIM is used in the field of new construction, HBIM applies the methodology of BIM to an existing building to recreate in a digital world the building "as-built" (Hichria et al., 2013). The information in the HBIM model can range from geometric to material, cultural, historical, structural ones. The biggest challenge of the HBIM modelling is the creation of smart parametric objects, to which to assign the collected information, able to represent the unique and singular shapes and geometries of historical architecture (Tommasi et al., 2016).
To create a digital model of an existing building is essential to collect as much data as possible with a high level of detail, starting from survey data and not from project data. The survey of historic buildings is usually carried out using laser scanning technology that allows obtaining very dense 3D point clouds of buildings (Ebolese et al., 2018). The main advantages of a laser scanning technology are the high geometric accuracy and the reduction of survey time. This approach is generally referred to as Scan-to-BIM methodology and foresees the creation of a digital BIM model of the heritage building starting from its point cloud Pepe et al., 2020). Even if the HBIM and Scan-to-BIM processes are still evolving, excellent results have already been achieved. Indeed, the possibility to automatically generating building information models from point clouds applied to the heritage buildings has attracted the interest of many researchers. Many applications of Scan-to-BIM process to cultural heritage demonstrate the possibility of manage archaeological areas, monuments, historic building into a BIM platform, showing the potentiality of the methodology. Some interesting works show the limits and potential of this approach, applying the methodology in different contexts (Themistocleous et al., 2018;Parisi et al., 2019;Sztwiertnia et. al. 2019). The different researches have highlighted some difficult aspects of the process: in the "Scan" phase the management of a huge amount of data could cause problems in the processing, while in the "BIM" phase the modelling of singular shapes of historic architecture could be too complex. Many studies show the need to create ad hoc libraries of parametric objects for historical buildings, demonstrating that BIM software needs to be more structured to meet the needs of the Heritage field (Tommasi, 2016). Moreover, HBIM approach has already demonstrated its capacity for the management of heterogeneous information about heritage buildings, such as their geometries and properties, various construction (vault system, walls, windows and niches, etc..)  and decorative technologies (Bruno et al., 2019). In the last few years, research has shown that an HBIM is the starting point for the interpretation of the historical evolution of the building and the creation of projects for maintenance and restoration (Pocobelli et al., 2018). This study aims to apply the Scan-to-BIM methodology to a building of the historical-architectural heritage of the city of Palermo (Sicily, Italy), the Castle of Maredolce. The Castle is one of the most important examples of the Arab-Norman architecture in Sicily and, thanks to its architectural features, in the near future, it could be part of the Arab-Norman itinerary of the city of Palermo and included in the "UNESCO" World Heritage List. The aim of the work is to obtain an HBIM of the building and to develop a workflow that, starting from the survey data, leads to a smart parametric model for the elements of the historic building. The main difficulty addressed during the process was the modelling of architectural elements that characterized the historical building, composed of complex shapes and unique geometries. For objects with complex shapes that are frequently found inside the castle, it was developed a parametric modelling workflow that has allowed creating a parametric object rule by editable parameter. For example, the pointed arches, that characterized the rooms of the Castle, were obtained from a single parametric model, but adaptable to the different shapes of the rooms. For objects with complex geometries but unique inside the Castle, a different workflow was followed, modelling them not-parametrically. The work has outlined the advantages and challenges of the application of HBIM methodology and has allowed the development of a workflow useful in the future as a start point for similar buildings (Arab-Norman architectures).

THE CASTLE OF MAREDOLCE
The Castle of Maredolce, also known as "Castle of Favara", is in the southern part of the city of Palermo ( Figure 1). The origins of the Castle date back to Arab times (late X th -early XI th century). In those years, it was probably the Castle of the Emir Gia'far. In 1072, King Ruggero II conquered the city of Palermo and transformed the Castle into his summer residence. During the Norman period, the Castle took the shape as we can see today and, taking advantage of the richness of underground water, an artificial water basin, called "Maredolce", was created near the Castle ( Figure 2) (Bellanca, 2016). During the following centuries, the castle has changed owners and use several times, undergoing numerous modifications. At the beginning of the XIV th century, the property of the Castle has been given to the Teutonic knights; in the second half of the XV th century, the kingdom treasurer managed the Castle. In the XVII th century, the Castle was abandoned; the building was used as storage and the park was used for agricultural purposes. In 1779, the Castle of Maredolce was included in the "Antiquities Plan", a project that included the most important Cultural Heritage of Sicily, and began to be managed and preserved. From this point, the Castle starts its architectural revival with the first restoration and structural recovery works. 1 Local office responsible for Cultural Heritage Unfortunately, in the '80s and '90s of the last century, its structure was damaged by the construction of unauthorized structures that modified its original configuration. Today the Castle of Maredolce is managed by the "Soprintendenza per i Beni Culturali e Ambientali" 1 of Palermo that, thanks to the numerous restoration works, has restored the Castle to its historical and architectural beauty and has made it one of the most interesting cultural sites in the city of Palermo.  The castle of Maredolce has a quadrangular plan, characterized by a bending in the East corner ( Figure 3). The rooms develop around an internal courtyard, originally surrounded on its sides by a crossvault, of which today remain only traces of the openings (Figure 4). High and slender pointed arches, arranged regularly, characterize the walls of the façades. All the façades, originally probably plastered, show a clear separation between the basement, made of large blocks of stone, and the remaining part of the masonry, made of squared blocks of medium size in a regular pattern. The large blocks of the basement are arranged in eight rows on the main façade and in three rows along with the other ones, where there are traces of "cocciopesto" (hydraulic plaster made with lime, sand and fragments of earthenware or brick), which testify that the building was surrounded on three sides by water. The wall of the main façade is interrupted by three large openings: the first one, to the North, allows direct access to the inner courtyard; the second one is the main entrance to the Castle and leads to the "Chapel of St. Philip"; the third opening is the entrance to the "Aula Regia".  The Chapel of St. Philip has a rectangular plan with an orthogonal transept and space is ideally divided into two parts by two crossvaults. In the centre of the presbytery, there is a drum surmounted by a small hemispherical dome. The "Aula Regia" has a rectangular plan and is covered by a barrel vault and a crossvault. The hall is characterized by a particular niche with a semi-vaulted pleated pavilion. Proceeding inside the Castle, there is the entrance to a third room, known as the "Prayer room". The room has a rectangular plan and is surmounted by a crossvault. On the south-east wall, there are three muqarnas, which originally decorated all the room. Around the courtyard, small rooms are communicating both with the inner courtyard and sometimes with each other. These small rooms are covered with crossvaults and are illuminated both by embrasures faced on the courtyard and by small rectangular openings on the façade.
In the south corner of the Castle, there is a particular room, known as "Sala dell'Imbarcadero". It is a large room, divided into two covered areas with crossvaults, which through a large opening connects the exterior "Maredolce" basin with the inside of the Castle. Originally allowed to enter inside the Castle directly with a boat. About the rooms on the other sides of the Castle, today there are only portions of the original walls and, in some areas, traces of the roofs.

3D survey
The first step of the Scan-to-BIM process is the survey phase, carried out with a laser scanner. The main issues of the survey are due to the layout of the Castle's spaces; the internal courtyard, the internal rooms and the external facades have very few spaces in common. So, it was necessary to find an efficient method to connect the point clouds of the internal courtyard with those of the internal rooms and with those of the external facades. For these reasons, a laser scanner Leica RTC360, which is equipped with a Visual Inertial System (VIS), an integration between an Inertial Measurement Unit (IMU) and a Visual Simultaneous Localization and Mapping (SLAM) system, has been chosen for the laser scanner survey. By continuously tracking the pose of the RTC360 while moving, VIS allows to check and to align the point-clouds in real-time on the field. (Biasion et al., 2019). This methodology can be of great help in situations like this where the connections among the various environments are limited. In addition, the acquisition speed of the laser scanner (2000000 pt/s) has allowed surveying the entire castle in just two days of work. The strategy adopted for the survey followed four steps: 1. survey of the courtyard and the rooms overlooking it; 2. survey of the external façades; 3. survey of the internal rooms; 4. survey of the roofs.
The first step was to produce a general scan of the courtyard ( Figure 5) and of the rooms overlooking it mainly using the preregistration capability of the RTC360 laser scanner. To minimize the error occurred in merging the internal and external point clouds, the scans were performed along a path that involved a sequence of internal and external scans ( Figure 6). This path allowed aligning the internal and external point clouds directly on the field. The survey of external façades was carried out as the second step so that the registration between the scans of the first step and those of the second step allowed estimating the correct thickness of the outside wall. The connection between external façades scans and the internal survey was done through the large opening of the "Sala dell'Imbarcadero". The third step, carried out at the beginning of the second day, closed the survey at ground level. It closed the connection between external façades and internal of the Castle using as connecting scan points the three large openings of the main façades; the first one was used to connect the main façade with the internal courtyard, while the others were used to connect the main façades with the internal rooms.
All the scans obtained with the laser scanner Leica RTC360 have been acquired with "medium" resolution (6 mm at 10 m), except for the external façades where it was chosen a "high" resolution (3 mm at 10 m) to maximize the level of detail. In addition, for all the scans of the external façades and some of the courtyard, the photographic images were also acquired. Overall, 69 scans at the ground level were obtained. The fourth step was the survey of the roof; this survey was performed independently of the others with a Faro Focus 3D laser scanner and with the only trick to perform a link scan between the roofs survey and those at the ground level. A first very dense scan in the roof was done from a position in which both the roofs and the courtyard were visible. The other scans were carried out in a way to be connected with the first one, using the overlap between common portions of the scans. The survey of the roofs required five more scans, done with a resolution of 6 mm at 10 m, except for the first scan, done with a resolution of 3 mm at 10 m.

Data processing
The collected data were processed with two different software, Cyclone and 3D Reshaper, from Leica Geosystem. Thanks to the VIS of the RTC360 laser scanner, the scans were imported in Cyclone already pre-aligned; also the scans of the roofs, recorded with the Faro Focus 3D laser scanner, were imported in Cyclone. In Cyclone, each single raw point cloud, derived from survey operations, was registered into a unique coordinate system. The registration process between two or more single raw point cloud was generated by a system of constraints, based on the overlapping of common parts between point clouds or selection of at least three common points. The alignment between the scans has been carried out with two different procedures: the "Visual Alignment" and the "Cloud to Cloud" alignment. The Visual Alignment procedure can be done both automatically and manually. The automatic "Visual Alignment" allowed to group the scans for which the software found enough overlapping points. For the other ones, the alignment was done manually. At the end of each alignment between two scans, the software computes the residuals of the alignment procedure. The data processing strategy followed three steps: 1. validation of pre-alignment operation; 2. registration of scans carried out with Leica RTC360; 3. integration with the roof scans.
The registration process started with the validation of the prealignment of the scans, performed on the field. The pre-alignment allows introducing the point clouds into Cyclone already organized into two groups, related to the two workdays. Inside each group, the pre-alignment correction was first verified and then the registration process was confirmed; two point clouds containing all the scans carried out with the RTC360 laser scanner were obtained. In the second step, the two point clouds were constraint each other through the manual alignment process. The final step of the registration process was the integration of the registered scans with the roofs scans, carried out with the laser scanner Faro Focus 3D. Once all the alignments have been completed, a global registration was performed, through which the already established constraints were automatically recalculated, improving the alignment. At the end of the global registration procedure, the reliability of the process was checked by means of the RMS values in the registration report (Table 1).

Scans of 1 st survey day
0.009 Scans of 2 nd survey day 0.010 Scans of 2 nd and 3 rd days 0.018 All scans 0.015 Table 1. RMS values of the registration process.
The process led to the production of a complete raw point cloud of the Castle of Maredolce with more than 100 million points and more than 80 GB of data.
The following processing steps, carried out with 3D Reshaper, were editing, filtering and sampling of the complete raw point cloud. The editing has eliminated all disturbance and extraneous points to the surveyed object, such as trees, brushwood, people and context elements. Filtering removed the "noise" points in a percentage way; thanks to the accuracy of the data survey, only 220 thousand points were identified as "noise", equal to about 0.3% of the total points. The point cloud was also sampled through a "regular sampling" process, which allows reducing the density of the points in a regular grid, by setting an average distance between the points of 1 cm. The number of the points was so reduced to about 72 million points (Figure 7).

BIM PHASE: PARAMETRIC MODELING AND PROJECT DOCUMENTATION
The morphological complexity of the Castle of Maredolce causes difficulties in modelling, due to geometrically complex elements, lack of orthogonality between the walls, random distribution of holes, etc.. In order to address these issues, it was necessary to establish the Level Of Development (LOD) of BIM model and an appropriate modelling strategy. According to HBIM classification (Brookes, 2017), it was chosen to reach an intermediate LOD between 2 (low) and 3 (medium); this level aims to define the elements also from a constructive point of view and allows complete and realistic visualization of the model. In addition, the amount of information may be suitable for the drafting of preliminary conservation or maintenance projects. The modelling strategy followed five steps: 1. importing of point cloud and preliminary operations; 2. geometric modelling of the structure of the Castle; 3. creation of families (walls, floors, roofs, vaults, openings, etc.); 4. insertion of the families into the model, creation and editing of local elements; 5. material editing and texturing.
The software used for BIM modelling is Autodesk Revit. After importing the point cloud in Revit format, some horizontal reference planes ("levels" in Revit), have been defined following some remarkable reference points of the point cloud such as the ground level, the upper edge of the perimeter walls, the extrados height of flat roofs. Firstly, the outside and the internal walls were modelled, following as closely as possible the survey data. This operation was fundamental for the modelling of the walls inside the courtyard, which have a very irregular profile due to collapses and partial collapse. The process continued with the insertion of floors and roofs. The modelling of the structure takes into account the real constraints that exist between the objects, such as the structural connection between beams and pillar, roofs and beams, etc.. For walls, floors and roofs, ad-hoc parametric families have been defined, respecting the different geometric and semantic characteristics of the elements. BIM modelling software is mainly developed for the design of new buildings, so the default parametric families are not suitable for the representation of historical architecture. It was, therefore, necessary to create a library of parametric families capable of reproducing the Arab-Norman geometries of the Castle as close as possible to the real object. However, it was necessary to simplify the details, due to the complexity and variety of shapes.
More attention was dedicated to the creation of families for complex objects, such as windows, niches and vaults. Indeed, in the Castle, there are different types of elements of the same categories, i.e. ogival, rectangular, embrasures and niches, recessed, ogival, bi or tri-lobate windows.

Vault modelling
The most interesting challenge was the creation of parametric families for vault modelling. In the Castle, there are different types of vaults, such as barrel and crossvaults, with a horizontal or inclined generatrix line, set on a quadrangular irregular impost block perimeter, always different. The scope was to create a parametric family that allows to represents at the same time different types of vaults, only changing the parameters that regulate it. Starting from this idea, the parametric family of "pointed crossvault with variable generator" was created. Starting from the family of "generic adaptive metric model", it was decided to create a parametric void that reproduced the geometry of the vaulted intrados of the roofs. First of all, there were defined the adaptive points, i.e. those points through which it is possible to insert the parametric element in any quadrangular impost block perimeter of the model, even irregular. A total of 12 points have been chosen, the 4 vertexes of the vault plus 2 other points per vertex that identify the feet of the vault (Figure 8).
The 4 vertexes of the vault were connected by reference lines. On each reference line, 3 reference points were positioned and starting on each point a vertical line was drawn. A point on every vertical line was placed; joining these points with reference splines and defining parameters that manipulate the geometry, the arches of the vault were generated. This process must be repeated both on the four sides of the vault, setting the same parameters to arches on opposite sides and on two intermediate planes; To make the arch symmetrical, the same parameters are assigned to both the two points. Finally, arches on the perimeter sides must be joined, in pairs, with those on the intermediate planes, creating a void that reproduces the geometry of the vault. The vault is inserted into the model with the twelve adaptive points and its geometry is manipulated by varying the parameters and adapted it to the point cloud. Once the model was correctly positioned, a boolean subtraction from the flat roof geometry was carried out, obtaining the vaulted intrados ( Figure 9).

Not-parametric object modelling
Inside the Castle, some unique architectural elements have been modelled in a not-parametric way. This is due both to the complexity of the shape but mostly to their uniqueness. These objects were modelled within the CAD software Rhinoceros and after imported into generic families in Revit, to make easier their insertion into the model of the Castle. A meaningful example is the niche of the "Aula Regia", that has a semi-vaulted pleated pavilion. After making the model in Rhinoceros, it was inserted in Revit through a family of generic metric model based on the wall (Figure 10). In order to reproduce particular geometries, it was decided to use "local model", that are localized modifications on a single object that allows changing its shape, in a not-parametric way. A specific local model was used to model the basement part of the perimeter wall, which has an inclined back face; starting from a regular wall, it was created a local triangular void, extruded along the wall path. The modelling takes also care of details, such as key ends of chains, water drainage pipes and the beginning of the impost block on the courtyard walls. All these aspects contribute to give to the model a complete and detailed appearance.

Project documentation
Once finished the geometric modelling of all architectural elements, the HBIM model of Castle of Maredolce was obtained ( Figure 11). The HBIM was integrated with all the not-geometric information to the model, such as types of stratigraphy of masonry walls, roofs and floors. The BIM modelling allows generating automatically, starting from the 3D parametric model, all the two-dimensional drawings necessary for the geometric, material and construction description of the object. As regards the geometrical description, the production of traditional two-dimensional graphics such as plans, elevations and sections were carried out through the creation of planar or section views. In addition, axonometric projections and perspective sections, which show all the spatial information of the building, were generated ( Figure 12). The drawings produced in the documentation phase are used to add to the geometric information all the not-geometric information collected in the project database. This aspect is, perhaps, the most "innovative" of the BIM methodology. Through the automatic definition of abacus, computations and legends, it was possible to quickly display the amount of data contained in the project. The workflow has provided for the insertion of the information to be documented, both in categories and in individual instances.
The amount and type of information inserted are proportional to the LOD reached; for each parametric object, geometric and material information were set, as the type of material and quantity used, and for each room, the function has been described and the surface area calculated. Each element was supported by photographic documentation. All the information inside the model have been shown with different abacus and material calculation, such as abacus of rooms, windows and niches, floors, generic models, and material calculation of wall and roof.

CONCLUSIONS
At the end of the work, it is possible to evaluate the results of the Scan-to-BIM methodology, applied to the case study of the Castle of Maredolce. This monument, according to its morphology, has made it challenging both the acquisition of survey data and the construction of an archive of geometric and semantic data with HBIM approach. The survey has achieved the objective of acquiring with a subcentimetric resolution a large amount of data related to the geometric and dimensional characteristics of the Castle. The use of the laser scanner Leica RTC360, thanks to its VIS technology, has proved to be a suitable instrument for the survey of a complex historical building such as the Castle of Maredolce. It has enabled to acquire every detail effectively in just three days of work and it was useful to solve the problem of the connection between indoor and outdoor environments. The processing of the raw data was aimed at obtaining a final point cloud that guarantees a level of detail adequate to the modelling phase and, at the same time, manageable in a BIM environment. The main problem in the processing phase was the management of the data, as the files have a size in the order of tens of GB, and the long processing time. The produced point cloud (about 72 million points, with sampling at 1 cm) is a first 3D model of the Castle and it is useful as visual documentation of its state of conservation; however, it is a purely geometric model that does not contain other types of information.
Although the quality of the metric data would have allowed further developments, it was chosen to reach an intermediate LOD between 2 (low) and 3 (medium) in the modelling phase; the level of detail of the model is suitable for drafting preliminary conservation plans up to a scale of 1: 100. During the modelling phase, the metric data provided by the point cloud was managed with full control they were discretized by use of parametric objects representing the building elements of the Castle (walls, floors, roofs, etc…), in a way as closed as possible to reality. In this regard, the most challenging part has been the creation of families of parametric objects, capable of correctly describing the corresponding construction elements. Indeed, the predefined libraries of BIM Modelling refer only to new buildings and are not adaptable to the shapes of historical architecture. In addition, some building elements have undefined shapes, due to collapses or disruptions, and therefore have been difficult to model using Revit drawing tools. The added value of parametric modelling lies in the fact that the created families are reusable in different parts of the same building or in buildings with similar characteristics. The database obtained contains a significant sample of typological elements of Arab-Norman architecture, such as crossvaults, pointed arch openings, embrasures, niches with recessed arches, and so on. The value of the HBIM process has also been exploited for the automatic creation of two-dimensional graphic data (plans, façades, sections, axonometric projection, etc...), as well as of abacus and materials computations, which allow a thematic analysis of the castle, for each of its elements. The Scan-to-BIM methodology has proved to be very effective tool to include all the multidisciplinary information concerning the monument in a single digital environment, to draw up documentation that can be updated and implemented over time and to ensure optimal management of the building.