PARAMETRIC MODELLING OF AS-BUILT BEAM FRAMED STRUCTURE IN BIM ENVIRONMENT

A complete documentation and conservation of a historic timber roof requires the integration of geometry modelling, attributional and dynamic information management and results of structural analysis. Recently developed as-built Building Information Modelling (BIM) technique has the potential to provide a uniform platform, which provides possibility to integrate the traditional geometry modelling, parametric elements management and structural analysis together. The main objective of the project presented in this paper is to develop a parametric modelling tool for a timber roof structure whose elements are leaning and crossing beam frame. Since Autodesk Revit, as the typical BIM software, provides the platform for parametric modelling and information management, an API plugin, able to automatically create the parametric beam elements and link them together with strict relationship, was developed. The plugin under development is introduced in the paper, which can obtain the parametric beam model via Autodesk Revit API from total station points and terrestrial laser scanning data. The results show the potential of automatizing the parametric modelling by interactive API development in BIM environment. It also integrates the separate data processing and different platforms into the uniform Revit software.


INTRODUCTION
Built heritage is our legacy from the past, what we live with today, and what we pass on to future generations.The recording medium of cultural built heritage has changed from paper materials to digitalized materials, from 2D drawings to 3D models.ICOMOS (2003) recommended the need of further structural analysis and management of the architectural heritage on the basis of geometric documentation.That is, a complete documentation of architectural heritage requires a unified platform with 3D geometry model and additional semantic, materials, and relationship information.It not only records the graphic and non-graphic aspects of the structure, but also provides the base for further structural analysis.Current heritage projects are struggling with such data management and information exchange especially for the complex structures.For example, 3D geometry information is acquired by photogrammetry and laser scanning equipment, algorithms and software; the attributes, material and relationship information can be added and managed in Building Information Modelling and Geographic Information System environment; and further structural analysis is conducted in civil engineering software.However, the separate processing, the software incompatibility and data exchange increase the difficulty about heritage conservation analysis among multi-field specialists.

Timber roof and beam frame system
The above mentioned problem is particularly true for timber roof structure.Timber roof structure is the typical architectural style in the historic buildings, and it is generally supported by beam frame system.The connected and joint beams are organized as a structural system to sustain the load bearing of the roofs.However, for the wooden beam frame supporting the building roofs, the bearing mechanisms still have not received the due attention and consideration they certainly deserve.Semplici and Tampone (2006) explored the widely existed historic timber architectures and load bearing structures in the UNESCO World Heritage List.They reported that timber beam structures were not the object of conservation and appropriate * Corresponding author repair in many countries and were suffering from neglect and alteration.Structural analysis is the only way to assess the structural condition and load-bearing capacity of the beam structure (Chapman et al., 2006), which is extremely important to the building roof conservation.The structural analysis depends highly on the as-built model close to the real situation, including various aspects of inputting parameters (geometry, materials and joint relationship).Currently, both reality-based geometry modelling and structural analysis have been addressed (Figure 1), although the conservational analysis about the historic beam frame system is relatively neglected.On the one hand, the realitybased remote sensing data can model the accurate geometry model of the current condition of the heritage and monitor the later changes.The typical beam frames consisting the historical castle (Koehl et al., 2015) and towers (Leonov et al. 2015) has been geometrically re-built from remote sensing and surveying data.On the other hand, Finite Element Method (FEM) based computational software can conduct structural analysis by directly introducing 3D geometry files obtained by reality-based modelling (Armesto et al., 2009).So, the 3D geometry model can be directly utilized to structurally analyse the reliability of a timber beam frame structure.Reality-based modelling and reverse engineering provide the asbuilt model about the heritage for further structural analysis.Often, the auxiliary property and dynamic information is relatively neglected owing to the limitation of knowledge management.Meanwhile, the modelling and analysing is usually conducted separately in different platforms.The gap between the geometry modelling and structural analysis needs a 3D information model and a unified platform to manage the geometry, relationship, material and even changing information to perform structural analysis.Therefore, a detailed model of the beam frame provides the material information and spatial relationships as joints, which is important for further analysis and heritage conservation.

Building Information Modelling/Management
The recently developed Building Information Modelling (BIM) technique is really accordant with above mentioned need (Chi et al., 2015) about the uniform platform for geometric and parametric modelling, information management and structural analysis of the beam framed roof structure.BIM contributes to the creation of a digital representation having all physical and functional building characteristics in several dimensions, as e.g.XYZ (3D), time and non-architectural information that is necessary for construction and management of building and its elements.BIM technique can help to segment and parameterize the entity-based virtual/geometry reconstruction to elementbased model enriched with measurement, semantic, attribute, relationship and dynamic information (Yang et al. 2016).BIM also provides the base for further structural analysis and data management.Therefore, the BIM environment combines the geometry modelling, element parameterization, dynamic information management and structural analysis together, which avoids the transformation among diverse platforms and data formats.Currently, BIM software (typically Autodesk Revit) has provided a platform for manual semantic modelling on reference of realitybased data, such as measurement, total station points, imagery and laser scanning.Once the elements have been parametrically created, they are simultaneously linked together with strict spatial relationships.The spatial relationships are fixed, even if the sizes or shapes of the elements change.However, the manual elements segmentation and parameterization process is time-consuming, especially when addressing complex structures.
Anyway, with recent developments in BIM technique, the wellknown traditional geometry model is increasingly developing to information model.The new model offers us uniform platform for the whole information representing the heritage and further structural and material analysis (Barazzetti et al. 2015;Murphy et al. 2013;Saygi and Remondino, 2013).

Revit API development
Autodesk Revit has been widely used to aid the reality-based parametric modelling process, by directly manual family creation (Garagnani and Manferdini, 2013) or commercial plugins (Klein et al., 2015) such as Scan-to-BIM and Leica CloudWorx.Yet the plugins are expensive and tend to regular buildings and the manual creation becomes time-consuming with the complex 3D space distribution of the elements.The Revit Application programming interface (API) combines the BIM parametric modelling and programming functions (Table 1).The interacting programming methods offer designers the ability to interactively design and manipulate Revit elements using algorithms and computational logic.Revit can provide the UI platform, serves as the basic view platform and database, and parametrically represents the element and builds the relationship automatically.The program can reduce the manual operation, and realize automatic and batch processing aiming at specific functions.Besides, the existing algorithms and libraries can be directly introduced and conducted.Therefore, they can simultaneously automate the element segmentation and parametric representation procedure in BIM environment by specific functions.

Research aims
Bassier et al. (2016) noted the important role of BIM from scan data to structural analysis model for heritage timber roof structures.They utilized BIM technique to connect the geometry model (SolidWorks ScanTO3D) and structural analysis (ANSYS) (Figure 1).The goal of our research is to explore the potential of such uniform platform for heritage documentation and management (Figure 2).Utilizing Revit API, we developed a plugin with a workflow that consists of automatic geometry reconstruction and element parametric modelling.The Revit platform serves as the visualization platform, spatial database and the base for structural analysis.

Study area
The case study is a building roof with wooden beam framed structure, the so-called "Castle of Haut-Koenigsbourg", Alsace, France (Figure 3).It is a medieval castle and has been restored (from 1900-1908) following a close study of remain walls, archives and other fortified castle built at the same period.It shows about romantic nationalist ideas of the past and has been officially designated as a national historic site by the French Ministry of Culture.The timber roof is supported by beam frame and truss structure (Figure 4).The beams are normally leaning and oblique distributed in the 3D space.The beams are of very regular shape and not broken, which makes total station based approach feasible.

Total station data source
In this project, conventional surveying data was utilized.The beams were identified through a total station (Leica TS02), taking measurements on the edges of them.Six points were at least acquired on each beam (Figure 5), which were located in the three or four parallel edges of this beam.Totally, 1710 3D points (Figure 6) were collected in order to obtain the parametric model via a BIM platform (Revit).The collected data such as point IDs and XYZ coordinates were saved in ASCII text formats (Table 2).The ID indicates the selected beam, the point position and edge number.The position recorded whether the collected point was the corner of the beam, which is marked as "P".Anyway, when collecting the total station points, it is difficult for the operator to identify correctly the end of the beams, which can be a source of error and is neglected in the current works.Compared to datasets based on point clouds acquired by terrestrial laser scanning, the number points recorded by total station is very low but each point is significant.Total stations deliver highly accurate single-points, often used as 3D surface reconstruction reference points or control points for other techniques.Although limited number of measured points does not allow a detailed study of the structure, it is still easy to rebuild undistorted rectangular beams.To construct the beams in Revit, we can either manually create beams in 3D space, or firstly draw the lines in CAD and then apply a transfer into Revit IFC format.Revit 3D modelling tools focus primarily on delivering 2D documents with the added 3D capability.When creating complicated geometry and handle large amounts of data in 3D space directly, the user's freeform design is limited.This dramatically reduces project productivity and accuracy of arbitrary tip-tilted distribution of beam frame.On the another hand, it is time-consuming to link the points of the beam edges in AutoCAD (Figure 7).The obtained beam system is linear wire-frame model, and it is increasingly accepted to transfer it to the solid model in the BIM environment.Compared to the traditional wire-frame model, the BIM solid model provides not only definite relationship and variable parameters descripting the beam elements, but also more reality results in terms of geometry and structure behavior (Bassier, 2016).

Total station based beam construction
Although the field work based on the total station points was time consuming, the beam construction process could be finished fast with a limited number of accurate points.It is expected to transfer the disordered points to parameters describing the cuboid beams.A cuboid beam can be described by a central point, three directions and extensions (Figure 8), which is the basis to create the beam element in Revit.As the points are not always the corners, the two parameters of the beam are not totally confirmed: one is the circle point and another is the height.A Python program has been developed to calculate the beam parameters based on the following algorithm workflow (Figure 9).Firstly, we can obtain the direction of height (h), considering that collected total station points are located in a set of parallel edges.Then mapping the points to the vertical plane along with the height direction, we can obtain three (if the points are located in the three out of four edges) or four corners (if the points are situated in the whole four edges).In the former case, we can calculate the fourth point under the rectangular assumption of the beam shape.The other two directions (l & w) are thus confirmed.The three obtained directions are further refined because they may be not vertical to each other owing to the error of total station points.Finally, the extension can be calculated by vector computing.And the circle point is confirmed by the minimum bounding box of the total station points.After constructing the blocks (Figure 10), the relationship and additional information need to be added and managed, which is the advantage of BIM technique.

PLUGIN IMPLEMENTATION
The developing "Beam Frame Modelling" package is to characterize the geometry of timber roof structures from total station surveying points.(2) Cleaning point data.Some total station data are redundant and mistaken, which need to be eliminated before the beam parameter

CONCLUSION
In this paper, we discussed the potential of as-built BIM environment for the historic beam frame conservation utilizing interactive Revit API development.The tool does not only automate the parametric modelling, but also integrate together the traditionally separate geometry modelling, parametric elements management and structural analysis.BIM software, typically as Autodesk Revit, is increasingly supportive of reality-based data, normally called Scan-to-BIM process.The current element parametric procedure is generally manual, and it ignores the existing semantic modelling and point cloud processing algorithms and libraries.The Revit API provides interactive environment to utilize Revit functions and develop specific algorithms simultaneously.Meanwhile, the API development manipulates the geometric/semantic modelling and structural analysis directly in BIM environment.For example, beam elements are traditionally constructed firstly, and their joint and interconnected relationship need to be judged and analyzed further.While the relationship is the core for BIM technique and related functions are available within API development.Thus, the integrated environment not only avoids the data exchange, but also reduces some inefficient and repetitive work.
In conclusion, current reality-based modelling and structural analysis technique and platforms are important for verifying the actual load-bearing capacity and structural safety of historic timber roof structures, and the BIM provides the possibility to combine the separate processing, the software incompatibility and data homogeneity to the uniform platform.The BIM based parametric modelling of a timber roof structure can provide: (i) an accurate complete survey on the geometry aspect; (ii) attribute, material and relationship information of the sub-elements; (iii) possible deformations and changes over time; and (iv) loadbearing and structural analysis.Generally, it provides the conservation professionals decision support with spatial, temporal and multi-criteria analysis.
The Plugin is still under development.The current version is just supportive of total station data.The intersection and crossing relationship among the beam frame are still being addressed.The final frame consists of parametric beam elements, which can be applied to structure analysis.Ongoing development also focuses on the laser scanning data to obtain accurate modelling on the basis of obtained rectangular beams.

Figure 1 .
Figure 1.The separation between remote sensing reality-based modelling and civil engineering structural analysis dealing with beam framed historic roof

Figure 2 .
Figure 2. Uniform BIM environment for beam frame structure construction and analysis

Figure 5 .Figure 6 .
Figure 5.The total station data recording of the beam.Each beam collects at least six total station points.

Figure 8 .
Figure 8. Rectangular beam description by central point, extensions, and directions.

Figure 10 .
Figure 10.Beam geometry construction.The height need to be processed further.2.4 Revit plugin development Autodesk Revit, a widely used software in most practices, was one of the BIM-related computer program to pay on the reverse engineering based as-built parametric modelling.Revit structure, as one of its typical workspace, is also a specialized software with theoretical model to analyse the global structure of the frame.Thus it directly supports beam frame parametric modelling and structural analysis.Moreover, Revit provides a rich and powerful .Net Application Program Interface (API) with some free and friendly tools to the development process, such as Revit SDK 1 , RevitLookup 2 , and AddinManager.Revit SDK is the Revit API document, which provides the API class name and function methods.RevitLookup interactively and visually look up the built-in information in Revit.The digitalized parameters link the Revit and developed plugins together to interactively process the elements.AddinManager provide the totally interactive processing between Revit and API program in real-time.Therefore, we are developing a plugin utilizing Revit API development tool, which will automatically realize the geometric modelling and knowledge management of timber beam frame structure in Revit platform.The obtained model is defined and managed in the unique BIM environment with the framework of geometry, attribute and spatial relationship knowledge.The current package focus on the total station data processing and the next version including point cloud processing parts is expected.
1 http://www.autodesk.com/revit-sdkcalculating.The inputting total station points are shown in Figure11(a), which are disordered and difficult to transfer to Revit beam structure directly.(3)Parameter and corner calculation.The parameters and corners are calculated by the proposed workflow in Figure9.The algorithm is also a built-in function in the developed plugin.It can automatically transfer the disordered points to the corners of beam structures (Figure11(b)).(4) Parametric beam generation.A Revit "Beam family" is created firstly, which is in the regular rectangular shape and basic wooden materials.Then the family instances (Figure11(c)) can be created in the central position (based on the calculated parameters) along the direction confirmed by the corners.The beam elements are in standard BIM parametric type, which can be modified and exchanged either by the API or users.

Table 1 .
Revit API development It is a Revit API plugin that can run automatically in Revit interface and conducts further processing with Revit functions.If a timber roof structure is studied, the plugin allows the geometry reconstruction of the beam frame from ASCII text files, and outputs the IFC format data.