Problems of Creation and Usage of 3D Model of Structures and Theirs Possible Solution

: This article describes problems that occur when creating three-dimensional (3D) building models. The ﬁrst problem is geometric accuracy; the next is the quality of visualization of the resulting model. The main cause of this situation is that current Computer-Aided Design (CAD) software does not have su ﬃ cient means to precision mapping the measured data of a given object in ﬁeld. Therefore the process of 3D model creation is mainly a relatively high proportion of manual work when connecting individual points, approximating curves and surfaces, or laying textures on surfaces. In some cases, it is necessary to generalize the model in the CAD system, which degrades the accuracy and quality of ﬁeld data. The article analyzes these problems and then recommends several variants for their solution. There are described two basic methods: using topological codes in the list of coordinates points and creating new special CAD features while using Python scripts. These problems are demonstrated on examples of 3D models in practice. These are mainly historical buildings in di ﬀ erent locations and di ﬀ erent designs (brick or wooden structures). These are four sacral buildings in the Czech Republic (CR): the church of saints Johns of Brno-Bystrc, the Church of St. Paraskiva in Blansko, further the Strejc’s Church in Židlochovice, and Church of St. Peter in Alcantara in Karvin á city. All of the buildings were geodetically surveyed by terrestrial method while using total station. The 3D model was created in both cases in the program AUTOCAD v. 18 and MicroStation.


Introduction
A geodetic survey of buildings and other construction is one of the common activities in the field of surveying. Satellite methods, photogrammetry, or currently popular laser scanning are also used in addition to classical terrestrial measurements. Very often, three-dimensional (3D) models of buildings and structures are created from the measured data for the purpose of reconstruction, evaluation of the current state or just visualization.
A number of technologies have been developed for this activity. [1,2] using the latest knowledge of related fields. There are still problems that have not yet been satisfactorily resolved, despite the facts in the flow chart ( Figure 1). The article tries to identify, analyze, present, and try to propose an acceptable solution. These problems can be divided into two basic categories: 1. display geometry (position and height accuracy) of the geographic object (GO) in the terrain into appropriate software, and 2.
visualization of the created 3D model in suitable software.
Problem ad (1) is related to obtaining the data by measurement. Today's geodesy data collection technologies enable the user to focus the selected object with the required accuracy. These technologies integrate many features and provide high user comfort. The next step in the processing chain ( Figure 1) technologies integrate many features and provide high user comfort. The next step in the processing chain ( Figure 1) poses a problem. It is a creation of a 3D model from a list of coordinates of detailed points, which is based on connecting points with general lines being selected from the element libraries in the software. In many cases, it is necessary to generalize the model to make interconnection possible. In fact, this means degrading the geodesist's work in the field while locating the object. The problem ad (2) mainly depends on the supply of surface materials in selected software that represent the surface of a focused GO in the field. Basically, it is about surface textures or the implementation of photographs on the partial surfaces of an object. The essence of the problem, in this case, is that the real surfaces of the object are in general not planar, which, in current applications, is solved by decomposing the general surface into a system of planar surfaces. As a result, the resulting image is rendered when the object is visualized.
This paper presents the problems encountered in the creation of 3D models that the authors have encountered in solving projects in [3][4][5][6]. These are mainly historical church buildings, in the case of [3] wooden buildings. The text also contains a solution proposal in the context of current possibilities of available applications.
The paper is organized, as follows. In Section 2, we mention some related work for 3D models. In Section 3, we describe problems regarding 3D model creation and propose the method of a possible solution. Section 4 demonstrates the experiments. Section 5 contains discussion of the given topic. Section 6 addresses the conclusions.

Related Works
A number of papers have been published on this topic, of which only those are directly related to our article are described, as follows. Previous publications can be divided into the following categories: 1. Building information modelling (BIM). 2. Reverse engineering. 3. New technologies for data processing from TLS (Terrestrial Laser Scanning). 4. New methods for 3D models creation. 5. Visualization of 3D objects.

BIM
The topic of the paper [1] is the integration of BIM with the issue of reverse engineering. It is about improving the sub-phases of the information flow throughout the entire project cycle. The aim is to reduce the errors and increase efficiency by supporting technologies, such as prefabrication, virtual reality, 3D printing, etc. The proposed methodology also includes tools for managing and organizing the entire workflow. The results can be used in projects for the renewal of towns and municipalities. The article [7] deals with Historic Building Information Modeling (HBIM). It is special library of historical architectural elements, from which it is possible to reconstruct entire historical buildings and complexes. The library was created in ArchiCAD GDL (Geometric Description Language). These are parametric elements whose specific geometry is defined by the user. The resulting model is composed of laser scanning surveying or photogrammetric data and is The problem ad (2) mainly depends on the supply of surface materials in selected software that represent the surface of a focused GO in the field. Basically, it is about surface textures or the implementation of photographs on the partial surfaces of an object. The essence of the problem, in this case, is that the real surfaces of the object are in general not planar, which, in current applications, is solved by decomposing the general surface into a system of planar surfaces. As a result, the resulting image is rendered when the object is visualized.
This paper presents the problems encountered in the creation of 3D models that the authors have encountered in solving projects in [3][4][5][6]. These are mainly historical church buildings, in the case of [3] wooden buildings. The text also contains a solution proposal in the context of current possibilities of available applications.
The paper is organized, as follows. In Section 2, we mention some related work for 3D models. In Section 3, we describe problems regarding 3D model creation and propose the method of a possible solution. Section 4 demonstrates the experiments. Section 5 contains discussion of the given topic. Section 6 addresses the conclusions.

Related Works
A number of papers have been published on this topic, of which only those are directly related to our article are described, as follows. Previous publications can be divided into the following categories:
Reverse engineering.

3.
New technologies for data processing from TLS (Terrestrial Laser Scanning).

4.
New methods for 3D models creation.

BIM
The topic of the paper [1] is the integration of BIM with the issue of reverse engineering. It is about improving the sub-phases of the information flow throughout the entire project cycle. The aim is to reduce the errors and increase efficiency by supporting technologies, such as prefabrication, virtual reality, 3D printing, etc. The proposed methodology also includes tools for managing and organizing the entire workflow. The results can be used in projects for the renewal of towns and municipalities. The article [7] deals with Historic Building Information Modeling (HBIM). It is special library of historical architectural elements, from which it is possible to reconstruct entire historical buildings and complexes. The library was created in ArchiCAD GDL (Geometric Description Language). These are parametric elements whose specific geometry is defined by the user. The resulting model is composed of laser scanning surveying or photogrammetric data and is completed with elements from library. The resulting model serves for conservation purposes. The publication [8] is a continuation Symmetry 2020, 12, 181 3 of 13 of the research that was presented in the previous paper [7]. The method for HBIM creation was supplemented by algorithms of data segmentation from point clouds that were obtained by ground laser scanning of buildings. This is a difficult task to be solved by algorithm, therefore a heuristic method was used.

Reverse Engineering
Article [2] deals with reverse engineering technology. The topic is terrestrial 3D laser scanning. There are latest technologies of point cloud processing by powerful technical and software tools described. The work [9] proposes a special procedure for laser scanning of buildings. The method consists in optimizing the arrangement of devices in the space by means of a telecommunication device located on the roofs of buildings. It is a virtual simulation of antenna sites, which generates a 3D scenario of the process. The method was verified at a project at the Technical University of Madrid. [10] is another work that belongs to the field of reverse engineering. It proposes an algorithm for comparing the actual state of the pipe design with the state in the Computer-Aided Design (CAD) system. 3D model is obtained from laser scanning. The method is used for reconstruction of buildings or verification of quality in construction. In the work [11] is described a new method of reverse engineering combined with knowledge engineering of construction. It deals with a definition of inverse CAD process while using topology and tree structure of design process. A specific geometry of the model is then created from this general concept.

Terrestrial Laser Scanning
The study [12] presents a new methodology for creating a 3D model of wooden structures. This is a quick procedure based on generative algorithms. Terrain data are obtained while using Terrestrial Laser Scanning. The method was verified in the framework of a research project of wooden roof structures in Bologna. A new algorithm for transforming point clouds into a 3D model while using parametric tools was developed. The model is created, in general, and other building elements can be modeled by changing of input parameters. The work [13] deals with the creation of a 3D model of the church that was obtained by Terrestrial Laser Scanning. There are described methods of point cloud analysis and digitization in CAD system.

New Methods for 3D Models Creation
In the paper [14] is proposed a method for reconstruction of geometry of 3D object and its components. The object is surveyed by geodetic terrestrial methods and obtained list of points is processed by object methods. The paper describes strategies for recognizing elements in objects and develops new algorithms that improve existing methods. The article [15] describes the method of reconstruction of reinforced concrete arch bridge. The technology is based on the smallest element method. The aim is to identify the structure of the building and create a 3D model of its actual execution. The work also presents an analysis of the accuracy of the geometric method that was used in object surveying. The content of the article [16] is a new technology for the surveying of historical buildings in hard to reach places. It is a photogrammetric method that uses fish-eye lenses. The advantage of the method is the speed of data acquisition and optimization of the data volume. It is an alternative method to Unmanned Aerial Vehicles (UAV). The paper [17] describes the monitoring of buildings by using of the methods of engineering geodesy. Buildings are geodetically surveyed and 2D or 3D models can be obtained from the data. The models are also used for the stage of structure protection and safety of buildings. The method of laser scanning of buildings is described in detail. It is also possible to create drawings, which include views and sections, from the data. Close-range photogrammetry can also be used to create orthoimage and linear drawing. This method is particularly suitable for surveying historical buildings that do not have building documentation.
Ref. [18] describes a special approach to 3D modeling. It is a new method of hybrid 3D reconstruction of objects, which is a combination of building elements, and computer graphics methods. This integrated method takes advantage of the geometry, topology, and visualization of building objects in the process of 3D model creation.

Visualization of 3D Objects
The paper [19] deals with the analysis of 3D objects visualization. A new method that is based on the analysis of topology and time series of the object is proposed. The method does not need its own 3D model; the information is directly obtained from the data. Visualization is used to obtain new functional relationships within an object. The method is verified on a case study. Article [20] deals with the reconstruction of architectural elements of historical buildings from a cloud of points that were obtained by laser scanning. It is a high resolution 3D model in Triangular Irregular Network (TIN) format. The benefit is the high speed of algorithm and realistic visualization of the object. The method is used in architecture for the reconstruction of historical buildings. The paper [21] describes a method for approximating the surface of 3D models in CAD software. The method allows for creating a surface from suitably randomly selected points that were obtained from reverse engineering or from the design process. Geodesy algorithms motivated the technology, e.g., the creation of a digital terrain model. The paper [22] presents a design of an algorithm based on Gaussian map. It is a procedure that is suitable for visualization of ancient architecture. Technology has been proven during archaeological research of ancient cities. Experiments show that the method is accurate enough, with minimum noise, and no need for user intervention.

Problems Description
The process of creating a 3D model of a geographic object (GO) is simplified according to the diagram presented in Figure 1. The GO can represent any real object of interest (e.g., building or other construction). A general and not yet fully solved problem is to create a 3D model in suitable software (SW) with given accuracy.
The mapping f must be homomorphism for capturing the topology of GO.

2.
f must satisfy the level of geometric accuracy that was reached with surveying the GO.
After generalization in software ( Figure 1) the mapping function can be described with following equation: where O' = U(O) and U represents neighborhood of vectors that display the input vectors of GO from the real space to the digital database. The neighborhood size of U then represents the true accuracy of the 3D model in used SW. This accuracy is less, and then the a priori accuracy of the geodetic survey of GO in field. The mapping function g then describes the functional repository of the used SW (CAD, GIS), while g ⊂ f is valid. A closed set of functions g though to describe the topology of GO, but it is necessary to generalize the 3D model in many cases. That means O' ⊂ O ⊆ I. In fact, we lose not only the accuracy of the position of points, but also some details of GO, which is a big disadvantage for further use of 3D models in engineering practice. Another problem when creating a 3D model is the visualization of the results. This mainly involves rendering surfaces that represent the surface of an object. The problem can be divided into two categories:
The quality of the appearance of texture.

Posibility of Solutions
Replacing complex elements with simple entities where there is no further need for generalization can solve the problem of the geometric accuracy of a 3D model in suitable software. E.g. composite arcs or larger degree curves can be replaced with polyline elements. For the model [6], the authors used the method of topological coding [23]. The main principle consists in adding special codes into list of coordinates of points, according to field sketch: topological code: L/x,y or S/x where, L refers to line S refers to surface (polygon), x is unique identifier of the line (integer), and y is order number of the point in the line segment.
Format of the list of coordinates is following: Point ID, Y, X, Z [, code 1 , code 2 , . . . , code n ] Every attribute is separated by comma, while topological codes in square brackets are optional. The application in the form of the script in Python language was created for points input into graphic editors. This script offers automatic creation of topologically correct drawing in CAD or GIS-based software. The script also checks duplicities of entities and provides full topology of the drawing. Figure 2 presents the chart diagram. Another problem when creating a 3D model is the visualization of the results. This mainly involves rendering surfaces that represent the surface of an object. The problem can be divided into two categories: 1. Texture mapping onto surface areas, 2. The quality of the appearance of texture.

Posibility of Solutions
Replacing complex elements with simple entities where there is no further need for generalization can solve the problem of the geometric accuracy of a 3D model in suitable software. E.g. composite arcs or larger degree curves can be replaced with polyline elements. For the model [6], the authors used the method of topological coding [23]. The main principle consists in adding special codes into list of coordinates of points, according to field sketch: topological code: L/x,y or S/x where L refers to line, S refers to surface (polygon), x is unique identifier of the line (integer), and y is order number of the point in the line segment.
Format of the list of coordinates is following: Point ID, Y, X, Z [, code1, code2, …, coden] Every attribute is separated by comma, while topological codes in square brackets are optional. The application in the form of the script in Python language was created for points input into graphic editors. This script offers automatic creation of topologically correct drawing in CAD or GIS-based software. The script also checks duplicities of entities and provides full topology of the drawing. Figure 2 presents the chart diagram. The problem of visualization of the produced 3D model can be solved in two ways: 1. Using available visualization tools in commonly available CAD products (e.g., AUTOCAD, MicroStation, etc.). In this case, there are two options: (a) used build-in modules with customary texture models in given software, and 1.
Using available visualization tools in commonly available CAD products (e.g., AUTOCAD, MicroStation, etc.). In this case, there are two options: (a) used build-in modules with customary texture models in given software, and (b) create your own set of textures and import them into the software (if the program product has the appropriate features for this purpose).

2.
Placing the textures on 3D surfaces of given GO while using the special applications-see [24,25].

Transformation of Point Cloud into 3D Model
Creating a 3D model by terrestrial laser scanning technology has several phases: 1. Data acquisition. Scanning an object in the field results in a raw point cloud, which, in many cases, is made up of several partial clouds.

2.
Transformation of individual measured point clouds from the coordinate system of the scanner into a project system to create a homogeneous spatial model. Subsequently, transformation from the project system to a global coordinate system-national grids and an altimetry system. In the Czech Republic, it is S-JTSK (Datum of Uniform Trigonometric Cadastral Network) and Bpv (Baltic Vertical Datum After Adjustment).

3.
Subsequent levelling of measured data using the ICP (iterative closest point) technology correlation of mutual position of individual clouds.

4.
Create a 3D/BIM (Building Information Modelling) model. The core of this phase is to detect objects (edges, faces) in the point cloud and link these elements to the resulting model. Generally, it is necessary that modelling complied with agreed standards. The phase of focusing and plotting of the 3D/BIM model of the current state should be part of the so-called BIM Execution Plan if the whole project will be processed by the BIM methodology. LOD (Level of Detail), i.e., the level of detail and detail that the 3D/BIM model will carry from the phase of surveying the current state.

Results
The problems that are described in the previous chapter, the authors encountered in the practical implementation of 3D models of existing GO. These are four sacral buildings in the Czech Republic (CR): the church of saints Johns of Brno-Bystrc (Figures 3 and 4), the Church of St. Paraskiva in Blansko (Figures 4 and 5), further the Strejc's Church in Židlochovice and Church of St. Peter in Alcantara in Karviná city. All of the buildings were geodetically surveyed by the terrestrial method while using total station. The 3D model was created in both cases in the program AUTOCAD v. 18 and MicroStation.      Figure 3 shows a detail of the rotunda with the upper and lower arches indicated. Both arcs actually have different radii of curvature. When creating a wireframe, it was not possible to connect these arcs with vertical edges in AUTOCAD. The connection of the same edge to the lower arc was disconnected and vice versa when joining an edge to the upper arc. It was necessary to generalize the model in order to connect both arcs with vertical edges. The result after generalization is evident in Figure 4. The disadvantage is that similar inaccuracies limit the further practical use of the 3D model, e.g., making sections for the purpose of object reconstruction etc.
Problems with visualization are demonstrated on the 3D model of the Church of St. Paraskiva in Blansko (CR). In general, it involves laying textures or patterns with the real appearance of the building material used (e.g., roof tiles or shingles) on 3D model surfaces. In existing programs, this is only possible when the surfaces are planar. However, for real objects, the surfaces of buildings rarely meet that requirement. Most of these are general areas in space-see Figure 5. In this case, it is very difficult to apply realistic textures to these surfaces. Usually, it is necessary to decompose the surface into a numerous of planar patterns and then cover them with textures or photographs. Usually, triangles or planar quadrilaterals are used. However, this process is very time-consuming and laborious and in many cases the result does not correspond to the exerted effort. Figures 5 and 6 show the difference.  Figure 3 shows a detail of the rotunda with the upper and lower arches indicated. Both arcs actually have different radii of curvature. When creating a wireframe, it was not possible to connect these arcs with vertical edges in AUTOCAD. The connection of the same edge to the lower arc was disconnected and vice versa when joining an edge to the upper arc. It was necessary to generalize the model in order to connect both arcs with vertical edges. The result after generalization is evident in Figure 4. The disadvantage is that similar inaccuracies limit the further practical use of the 3D model, e.g., making sections for the purpose of object reconstruction etc.
Problems with visualization are demonstrated on the 3D model of the Church of St. Paraskiva in Blansko (CR). In general, it involves laying textures or patterns with the real appearance of the building material used (e.g., roof tiles or shingles) on 3D model surfaces. In existing programs, this is only possible when the surfaces are planar. However, for real objects, the surfaces of buildings rarely meet that requirement. Most of these are general areas in space-see Figure 5. In this case, it is very difficult to apply realistic textures to these surfaces. Usually, it is necessary to decompose the surface into a numerous of planar patterns and then cover them with textures or photographs. Usually, triangles or planar quadrilaterals are used. However, this process is very time-consuming and laborious and in many cases the result does not correspond to the exerted effort. Figures 5 and 6 show the difference.  Figures 9 and 10. The visualization quality of the 3D model is many times higher than that of the Strejc's Church (Figures 7 and 8). However, the bases of both visualizations are the same-the textures in both models were placed on generalized (planar) surfaces. If we left the model without generalization, one of the methods described in [24] or [25] would have to be used for visualization.   Figures 9 and 10. The visualization quality of the 3D model is many times higher than that of the Strejc's Church (Figures 7 and 8). However, the bases of both visualizations are the same-the textures in both models were placed on generalized (planar) surfaces. If we left the model without generalization, one of the methods described in [24] or [25] would have to be used for visualization.  Figures 9 and 10. The visualization quality of the 3D model is many times higher than that of the Strejc's Church (Figures 7 and 8). However, the bases of both visualizations are the same-the textures in both models were placed on generalized (planar) surfaces. If we left the model without generalization, one of the methods described in [24] or [25] would have to be used for visualization.

Discussion
Practically, the above-mentioned problems manifested in two aspects: 1. geometric accuracy of the model, and 2. quality of model visualization.

Discussion
Practically, the above-mentioned problems manifested in two aspects: 1. geometric accuracy of the model, and 2. quality of model visualization.

Discussion
Practically, the above-mentioned problems manifested in two aspects: 1. geometric accuracy of the model, and 2. quality of model visualization.

Discussion
Practically, the above-mentioned problems manifested in two aspects: 1.
geometric accuracy of the model, and 2.
quality of model visualization.
The solution of the above problems is dealt with in several works, of which the most important ones are mentioned.
The Geometric accuracy of the model is further explained in publications [11,18,23]. In paper [11] the geometry of the 3D model is complemented by a knowledge database that was obtained from a real object. It includes, for example, a tree that captures the GO topology. The article [18] is dealing with the problem of the precision issue with hybrid modeling. The elements of the building are extracted and then formally saved to the library as an object for further use. Another solution is presented in [23]. It is a complement of the list of coordinates with topological codes directly when surveying the object in the field. From the list of point coordinates, the exact drawing in the CAD program is then automatically displayed while using a Python script.
Visualization quality is discussed in [16,21,24,25]. The article [16] presents a visualization of historical objects that were captured by photogrammetrically special fish-eye camera. The object is measured by laser scanning. An interesting approach to surface modeling is described in [21]. The object's surface is approximated by curves that are defined by randomly selected points from the point cloud from laser scanning. Curves are created by special VB.NET applications in the AUTOCAD program. The work [24] proposes a method of classification of the surface of a 3D object that is based on the skeleton metric of this object. The result of the classification is a set of classes of segments that can be used for the whole surface. The most appropriate display method is then selected for each class. The publication [25] presents a design of the CatSurf system for displaying 3D objects in CAD (Computer-Aided Design). It is the surface texture information system, which is a part of the integrated CAD surface texture platform. The disadvantage of the latter two applications is that they are highly specialized systems that are difficult for ordinary users available.

Conclusions and Future Work
The main problems for creating 3D models of existing GOs were identified and described. The experimental results show that the currently used CAD programs are relatively outdated in its repertoire when compared to the quality and possibilities of geodetic surveying of real objects. Current methods of data acquisition in the field use modern technologies that allow for surveying the object with high accuracy. In addition, data collection devices have a number of built-in features, which allow for people with basic training to use them.
The authors proposed a solution concerning the first part of the problem mentioned in Section 4, namely the geometric accuracy of the 3D model. A Python application was created to produce a wireframe 3D model from a list of coordinate points with topological codes in suitable software. This procedure will significantly speed up the whole process-see Figure 1 and make the work easier for users. The script can be added as a plug-in to CAD software.
Further research in this area will be focused on solving the problem of quality visualization of the 3D model of GO.