3D digital city target VR space cutting body conflict detection method

By converting 3D targets into convex polyhedral groups and using polyhedral convex decomposition and convex polyhedral projection detection, the complex problem of the conflict detection process of three-dimensional building models in the existing technology is solved, and rapid and simplified conflict detection is achieved, which improves the detection efficiency and intuitiveness of model display.

CN120107501AInactive Publication Date: 2025-06-06秦大国

Patent Information

Application Number
CN202510127242.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-01
Publication Date
2025-06-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to simplify the conflict detection process of three-dimensional architectural models, and it is impossible to quickly realize conflict detection of three-dimensional models. Moreover, traditional methods are based on the model itself or location, resulting in complex algorithms and inconvenient design and implementation.

Method used

By converting 3D targets into convex polyhedral groups and using polyhedral convex decomposition and convex polyhedral projection detection, the transformation from polyhedral detection to convex polyhedral detection is achieved, simplifying the conflict detection process of the three-dimensional architectural model.

Benefits of technology

The calculation process of three-dimensional building model detection is greatly simplified, the conflict detection of three-dimensional models is realized faster, the speed and efficiency of detection is improved, and a more intuitive urban model display is provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120107501A_ABST
    Figure CN120107501A_ABST
Patent Text Reader

Abstract

According to the 3D digital city target VR space cutting body conflict detection method, firstly, a new method for solving city three-dimensional building model conflict detection is established, a method approximate to 3D grid layered segmentation is adopted, a 3D target is converted into a convex polyhedron group, a conflict detection algorithm is converted into two thoughts, and the three-dimensional building model conflict detection method is established; the conversion from polyhedron detection to convex polyhedron detection to convex polyhedron detection is completed, and the calculation process of three-dimensional building model detection is simplified; secondly, a convex polyhedron projection detection algorithm is constructed; and 3, developing a B / S end three-dimensional building model detection system: establishing a three-dimensional model detection system, taking the three-dimensional model detection system as a part of an urban three-dimensional cadastral management system, obtaining a result graph after convex decomposition and convex body detection based on a skeleton structure extracted from a three-dimensional building model, and simulating a three-dimensional urban planning detection system. The 3D target conflict detection effect is good, the speed is high, and the detection is comprehensive and accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to a 3D target space cutting volume conflict detection method, and in particular to a 3D digital city target VR space cutting volume conflict detection method, belonging to the target space conflict detection technical field. Background Art

[0002] Guided by computers, surveying and mapping, and interdisciplinary studies, the construction of digital cities has become popular. In particular, in recent years, mobile devices such as smartphones and tablets have spread all over the world, mobile Internet has become the mainstream, and comprehensive information management based on space and location has become a comprehensive intersection of all walks of life. Spatial three-dimensional information is widely used in various aspects such as urban planning and urban construction. The effective use of spatial three-dimensional information plays an important role in improving the efficiency of urban land, building planning, and municipal engineering implementation. Due to the lack of basic functions such as powerful spatial analysis, the application of 3D GIS has become very limited.

[0003] With the rapid popularization of the Internet and the continuous improvement of computer graphics hardware and processing capabilities, the 3D GIS management platform can show users more geographic information and more intuitive city models, and can provide guidance and assistance to other industries, such as urban planning, disaster assessment and many other fields. The 3D space management system can make full use of current technology to facilitate management work. However, the 3D GIS management system is still in its infancy, especially the 3D space planning system and 3D property management system on the BS side. There are still many missing functions.

[0004] Conflict detection of 3D objects is an important topic in 3D geographic information management systems, computer graphics modeling, 3D games and mixed reality. Both 3D space planning and 3D property management must rely on conflict detection. Given that the traditional 3D object conflict detection method is based on the model itself or the position of the model in the scene, the entire conflict detection algorithm is quite abstract and complex, which is not convenient for algorithm design and idea development. It is urgent to combine the actual urban 3D building model, convert the traditional conflict detection algorithm into the cutting body of the 3D object and the conflict detection for convex polyhedrons to solve the problem of finally completing the transformation from polyhedron detection to convex polyhedron detection and then to convex polygon detection. The existing technology cannot simplify the calculation process of 3D building model detection, and cannot quickly realize the conflict detection of 3D models.

[0005] 3D target conflict detection is also an important function in 3D modeling and analysis software such as 3DCAD, 3DGIS, SketchUp, etc. 3D space model conflict detection is also an important function. New complex 3D models can be constructed by using the intersection, union, complement and difference functions in the entity tools. The development of entity models makes the current 3D models more and more complex. The current popular technology requires that the scenes and models in virtual reality are getting bigger and bigger. This is a big problem for technical developers, and the conflict detection algorithm has become one of the key technical points to be broken through.

[0006] In addition to being used in emerging fields such as three-dimensional management systems, mixed reality, and robotic AI technology, 3D target conflict detection algorithms also have broad prospects for adoption in many fields such as geology (underground exploration, mine excavation), medicine (combined with augmented reality), and 3D games. The most basic requirement for 3D target conflict detection is to determine whether two or more polyhedrons intersect and determine the intersection. In the field of geology, conflict detection algorithms can quickly determine the intersection between two ore body models to form the union effect of two ore bodies. At the beginning of the establishment of underground mine tunnels, simulations can be used to check whether the two mine tunnels are cross-connected; in the field of medicine, 3D target conflict detection algorithms also play an important role in simulation experiments before major operations.

[0007] The problems that need to be solved in the existing 3D target space conflict detection and the key technical difficulties of this application include:

[0008] (1) Both three-dimensional space planning and three-dimensional property management must rely on conflict detection. Given that the traditional 3D object conflict detection method is based on the model itself or the position of the model in the scene, the entire conflict detection algorithm is quite abstract and complex, which is not convenient for algorithm design and idea development. It is urgent to combine the actual urban three-dimensional building model, convert the traditional conflict detection algorithm into the cut body of the 3D target and the conflict detection for convex polyhedrons to solve the two problems, and finally complete the transformation from polyhedron detection to convex polyhedron detection and then to convex polygon detection. The existing technology cannot simplify the calculation process of three-dimensional building model detection and cannot quickly realize the conflict detection of three-dimensional models. In addition to its important applications in three-dimensional property management and urban planning, the conflict detection of 3D objects is also an important function in three-dimensional modeling and analysis software such as 3DCAD, 3DGIS, SketchUp, etc. However, the existing technology cannot construct new complex three-dimensional models by performing intersection, union, complement, and difference functions in the three-dimensional model tool. The development of physical models has made the current three-dimensional models more and more complex. The current popular technology requires that the scenes and models in virtual reality are getting bigger and bigger. This is a big problem for technical developers, and the conflict detection algorithm has become one of the key technical difficulties to be overcome.

[0009] (2) In view of the relationship between the current complex three-dimensional building model and multiple intricate models, the existing technology lacks an efficient and simple conflict detection method, which is not conducive to improving the system functions of the three-dimensional cadastral management system. The key technical difficulties of the conflict detection in this application are divided into three parts: detecting the concavity and convexity of the polyhedron model; convex decomposition of the model and conflict detection for convex polyhedrons. The technical problems that need to be solved include: First, the loading and display of the three-dimensional building model: the front end is planned to use HTML5+Three.js. Three.js is convenient to load three-dimensional models (obj, wrl and other formats) and has excellent performance, and Three.js quickly constructs convex polyhedrons for the array of points generated by the decomposed three-dimensional model. Second, detect the concavity and convexity of the polyhedron model: judge the concavity and convexity according to the edges of the geometric body composed of the model (the inner angle of the two faces constituting the edge is >180 for a concave body). The third is the convex decomposition of the model: at the concave edge found, a suitable method is selected (which is convenient for later calculations and minimizes the number of decompositions) to decompose the original model into multiple convex bodies. The fourth is the conflict detection for convex polyhedrons: determine whether the convex polyhedrons conflict, thereby determining the intersection of the original model, converting the convex polyhedron into a convex polygon, and using the convex polygon to determine the association.

[0010] (3) The existing 3D management systems are all C / S-side, and the conflict detection function of the B / S-side is not very perfect. In view of the complex 3D spatial data models that the actual 3D cadastral system has to deal with, there is a lack of a general means of combining convex decomposition + convex polyhedron conflict, and it is impossible to simply and efficiently implement spatial analysis such as property rights management. The traditional 3D target conflict detection method is based on the model itself or the position of the model in the scene, which makes the entire conflict detection algorithm quite abstract and complex, and it is not convenient for algorithm design and idea development. It is not combined with the actual urban 3D building model, lacks the cutting body of the 3D target and the conflict detection for convex polyhedron, and does not convert the traditional conflict detection algorithm into the cutting body of the 3D target and the conflict detection for convex polyhedron. It is impossible to complete the transformation from polyhedron detection and convex polyhedron detection to convex polygon detection. The calculation process of 3D building model detection is complicated, and it is impossible to quickly realize the conflict detection of 3D models. The conflict detection effect is poor and the representation is not comprehensive. Summary of the invention

[0011] In view of the fact that the traditional 3D target conflict detection method is based on the model itself or the position of the model in the scene, the entire conflict detection algorithm is quite abstract and complex, which is not convenient for algorithm design and idea development. This application combines the actual urban three-dimensional building model, converts the traditional conflict detection algorithm into the cutting body of the 3D target and the conflict detection for convex polyhedron to solve the problem in two aspects, and finally completes the transformation from polyhedron detection to convex polyhedron detection and then to convex polygon detection, which greatly simplifies the calculation process of three-dimensional building model detection and realizes the conflict detection of three-dimensional models more quickly. The established three-dimensional geographic information system management platform can show users more geographic information and more intuitive city models, and can provide guidance and help to other industries, such as urban planning, disaster assessment and many other fields.

[0012] In order to achieve the above technical effects, the technical solutions adopted in this application are as follows:

[0013] 3D digital city target VR space cutting volume conflict detection method, polyhedron conflict detection based on polyhedron convex decomposition and convex polyhedron projection detection, and establish urban 3D building model conflict detection method in 3D geographic information management system;

[0014] 1) Establish a new method to solve the conflict detection of urban three-dimensional building models: construct a cutting volume method for 3D targets, adopt a method that approximates 3D grid layered segmentation, convert 3D targets into convex polyhedron groups, and convert the conflict detection algorithm into two ideas. The general polyhedron is convexly decomposed and converted into a convex polyhedron group. The convex polyhedron group is then reduced in dimension and projected into a two-dimensional convex polygon for interference judgment. Finally, the transformation from polyhedron detection to convex polyhedron detection and then to convex polygon detection is completed, simplifying the calculation process of three-dimensional building model detection and realizing conflict detection of three-dimensional models;

[0015] 2) Construct a convex polyhedron projection detection algorithm: Based on the properties of convex polyhedrons, the convex body detection is simplified. After projection is performed on another coordinate plane along the direction of the intersection line of the facing surface and the coordinate plane, the minimum convex hull polygon is obtained from the coordinate point set obtained by the projection. Then, the intersection of the edges of the convex polygons is determined to determine whether the two convex polygons intersect. According to the intersection of the two convex polygons obtained along the projection direction of the intersection line of the facing surfaces, if there is a group of convex polygons that do not intersect, the two convex polyhedrons do not intersect; otherwise, the two convex polyhedrons intersect, and the convex group obtained at the same time is used to perform general polyhedron intersection judgment, and the specific position of the polyhedron intersection is determined according to the position of the convex body in the original polyhedron;

[0016] 3) Develop a B / S-side 3D building model detection system: Establish a 3D model detection system as part of the city’s 3D cadastral management system. Based on the skeleton structure extracted from the 3D building model, obtain the result graph after convex decomposition and convex body detection, simulate the 3D urban planning detection system, and detect conflicts between the planned routes and existing urban house models.

[0017] Preferably, the 3D target VR space conflict detection method architecture: converting a complex building model into a plurality of simple convex polyhedron models, dividing a complex three-dimensional building model into a plurality of simple convex polyhedron models;

[0018] It only takes one preprocessing to decompose each complex polyhedron model into simple polyhedrons, and there is no need to perform repeated decomposition in subsequent multiple topology detections. After the model is convexly decomposed, the decomposed polyhedron group is used as the original model to simplify conflict detection. For an irregular three-dimensional building model, it is only necessary to design a suitable convex decomposition algorithm to decompose the model within the allowable error range to achieve the result of conflict detection between each building model.

[0019] For a group of convex polyhedrons, multiple concepts are used to reduce the number of conflict detections of convex polyhedrons. After a group of polyhedrons are conflict-checked with each other, the intersecting polyhedrons are found. According to the position relationship of the polyhedrons in the original three-dimensional building model, it is approximately determined whether the two three-dimensional models intersect, and the approximate intersection position can be pointed out to achieve accurate detection results.

[0020] The method of solving the conflict detection of three-dimensional building models in this application is to convert the conflict detection for building models of different forms into a relatively easy-to-handle problem: a convex decomposition method of the three-dimensional building model and a conflict detection method for the decomposed convex polyhedron, and an improved convex decomposition method of the building model and a convex polyhedron conflict detection method.

[0021] Preferably, a cutting volume algorithm for a 3D target is established: define S as a polyhedron in 3D Euclidean space, V = {A 1 , A 2 , …, A n} is the vertex array of S, n represents the number of vertices of S, 0={t 1 , t 2 ,…,t r} is the triangular face of the polyhedron S, and T represents the total number of triangular faces of S;

[0022] The exact convex decomposition of a polyhedron S consists in dividing it into a set of minimal sub-convex surfaces. For fixed factors α and θ, a decomposition result set I = {π 1 , π 2 ,…,π K}, ensure that the decomposition result K is the least and verify that the concavity of each sub-convex surface is lower than α;

[0023] The iterative approximation of the convex decomposition problem is adopted. Based on the divide-and-conquer strategy, an iterative mesh is established until the concavity of each sub-convex surface is lower than the critical value α. In each step i, the vertex A with the maximum concavity is selected. i * , and consider passing A i * The bisection plane of A i * The convex body to which it belongs is divided into two sub-convex bodies;

[0024] The VR convex hierarchical segmentation is approximated by a 3D mesh. First, the 3D mesh is treated as a graph and its dual graph is calculated. Then, the vertices are clustered iteratively by continuously applying topological extraction while minimizing the cost function associated with the concavity and aspect ratio of the generated segmentation clusters.

[0025] The dual graph S of the grid S is associated * The definition is as follows: The dual graph S of a planar graph S * Consider each region of the plane as a point. The two adjacent regions to which each edge of the original graph belongs are connected by edges to the points in the dual graph. Once the dual graph S is calculated, * , the algorithm enters the extraction phase, which includes sequentially applying the half-edge cascade extraction process, each half-edge cascade process applied to the edge (v, w) represented as Wb(v, w) merges the two vertices v and w, the vertex w is removed and all its incident edges are connected to v;

[0026] Let A(v) be the initial array of vertex v. Initially, the array A(v) is empty. At each process Wb(v, w) applied to vertex v, the array A(v) is represented by the pseudocode A(v)←A(v)∪A(w)∪{w}.

[0027] The extraction process is controlled by a cost function describing the concavity and aspect ratio of S(v,w), where S(v,w) is obtained from vertices v and w and their initial arrays, where S(v,w) is represented by A(v)∪A(w)∪{w,v};

[0028] The aspect ratio E of the surface S(v, w) shape (v, w) is obtained from formula 1:

[0029]

[0030] where ρ(S(v, w)) and σ(S(v, w)) are the perimeter and area of ​​S(v, w) respectively;

[0031] Using the cost function E shape (v, w) is convenient for generating compact clusters. When the surface is a circle, E shape =1; the more irregular the surface, the larger the aspect ratio;

[0032] The extraction cost E(v, w) associated with the outer edge (v, w) is obtained by Equation 2:

[0033]

[0034] where C(S(v,w)) is the concavity of S(v,w), D is a normalization factor equal to the bounding diagonal of S, and α is the control shape factor E shape (v, w) Contribution factor relative to concavity cost;

[0035] At each step of the extraction process, the Wb process with the lowest extraction cost is used, and the following new partitions are calculated in It is expressed by formula 3:

[0036]

[0037] in represents the dual graph S obtained after n half-edge cascade extraction processing * vertices, iterate until all S * The outer edge of produces has a value lower than E;

[0038] The concavity C(S) of the three-dimensional grid S is defined as follows:

[0039]

[0040] P(M) represents the projection of point M on the convex hull CH(S) of S. Relative to the half-ray with origin M and the direction perpendicular to the surface S at M, the concavity of the convex surface is zero. The more concave the surface of the polyhedron, the farther the vertex is from the convex hull.

[0041] Preferably, the conflict detection method for convex polyhedrons: the detection problem of ordinary three-dimensional property body model is converted into two aspects: convex decomposition and conflict detection for convex polyhedrons. When the conflict detection algorithm for convex polyhedrons is used, the conflict detection algorithm for the body is converted into a plane intersection algorithm for two-dimensional planes;

[0042] The convex polyhedron is transformed into a two-dimensional convex polygon by projection, and then the body is transformed into a two-dimensional figure for detection and judgment;

[0043] Definition A: For two polyhedrons A and B of arbitrary shapes, if the intersection of the projections of the vertices of the two polyhedrons on the coordinate plane about any line 1 is an empty set, then the two polyhedrons do not intersect;

[0044] Two convex polyhedrons do not intersect when there are convex polygons formed by sets of projections of vertices that do not intersect. The condition for determining that two convex polyhedrons intersect is corrected to the fact that the intersection of convex polygons formed by sets of vertices projected in any direction is not an empty set instead of only the intersection of sets of vertices projected on the coordinate plane being not empty.

[0045] Preferably, definition B: A convex polyhedron is the sum of points, faces and the internal space enclosed by them in a three-dimensional Euclidean space. The convex polyhedron has vertices A l , A 2 , …, A n , n represents the number of vertices of the polyhedron, and the polyhedron is represented by V(A 1 , A 2 , …, A n ) means that the point C(x C ,y C , z C ), C(x C ,y C , z C ) is V(A l , A 2 , ..., A n ), calculated as Equation 5:

[0046]

[0047] If two convex polyhedrons V A and V B The centers of A and C B , vector C A C B is defined as a convex polyhedron V A About V B For a face F in the convex polyhedron V, a normal vector of face F from inside the convex polyhedron to outside the convex polyhedron is the external normal vector of this face, denoted by N;

[0048] If C A and C B Each is a convex polyhedron V A and V B The center of V A (V B ) The perpendicular vector between the Chinese and foreign vectors and the vector C A C B The face with an acute angle between the vectors is the facing face, which is close to or facing V. A V A Normal vectors in China and abroad and vector C A C BThe face with a right angle or an obtuse angle is the back face, which is far away from V. A , for two convex polyhedrons V A and V B , if two polyhedrons intersect, the intersection is at the facing faces;

[0049] C A and C B are the centers of the two polyhedrons, C A C B is a convex polyhedron V A and V B The center vector, A 1 A 3 A 4 and B 1 B 4 B 8 B 5 , B 1 B 2 B 6 B 5 , B 5 B 6 B 7 B 8 Represents the facing faces of two polyhedrons.

[0050] Preferably, assume that the face F is a convex polyhedron V A and V B If V A and V B The intersection of the projections of a set of straight lines parallel to the surface F onto any coordinate plane is empty, and the surface F is V A and V B If the projected separation surface of two convex polyhedrons V A and V B Disjoint, V A and V B There is at least one projected separating surface F, based on the angle between the outer perpendicular vector of the surface and the vector angle between the two surface center vectors, which are respectively in V A and V B The set of faces F A and F B Get n 0 and m 0 The set S of facing faces A and S B V A and V B The quasi-projective separation face set of two convex polyhedrons V A and V B There is no intersection, and the resulting projected separation surface is V A and V BThe projected separation surface set S A and S B One of the elements, face M, is two convex polyhedrons V A and V B A projected separation surface of , surface M spatially divides the two polyhedrons into two spaces;

[0051] Take S in sequence and alternately A and S B The surface in V A and V B Project the plane onto the coordinate plane in the direction of the intersection line parallel to the plane and the coordinate plane, find the convex hull polygon for the two projected coordinate point sets, and determine whether the two projected polygons intersect. If there is a plane F k belongs to two quasi-projection separation face sets, so that the two projected polygons do not intersect, then V A and V B Disjoint, if the quasi-projection separation face set does not have face F k So that the two projected polygons do not intersect, two convex polyhedrons V A and V B Intersect, and the correct dimensionality reduction algorithm for convex polyhedron conflict detection is as follows:

[0052] Input: Vertex factors of two convex polyhedra, V A (A 1 , A 2 , …, A n ) and V B (B 1 , B 2 , …, B n );

[0053] Output: Two convex polyhedrons V A and V B The intersection of

[0054] Step 1: Get the convex polyhedron V based on the vertices of the two convex polyhedrons A and V B Center C A and C B ;

[0055] Step 2: Calculate the face set F A and F B , get the external normal vector N of the face Ak (k=1,2,…,n 1 ) and N Bk (k=1,2,…,m 1 ), calculate N Ak and vector C A C B The angle set and NBk and vector C B C A The set of angles (replaced by cosine values);

[0056] Step 3: From the face set F A and F B Filter out the positive values ​​of the pre-selected angle value set, and organize the selected faces that meet the conditions into a new face set S according to the cosine value from large to small (the size of the vector angle). A ={F Ak |k=1,2,…,n 0} and S B ={F Bk |k=1,2,…,m 0}, then the two sets S A and S B The elements in the array are arranged alternately to form a face array S = {F k |k=1,2,…,n 0 +m 0}, let i = 1;

[0057] Step 4: Convex Polyhedron V A and V B The vertices of the element face F along the array S i Make a parallel projection on the xoy coordinate plane from the direction of the intersection line with the yoz coordinate plane (if F is parallel to the y-axis, make an orthographic projection on the yoz plane), and calculate the convex hull of the projected point set to obtain V A and V B The projection polygon P of on the xoy plane iA and P iB ;

[0058] Step 5: Calculate two projected polygons P iA and P iB Intersection: Loop through the edge segments of the two polygons to determine whether they intersect. If they do, the two polygons intersect. Otherwise, continue looping until the two polygons do not intersect. If the two projected polygons do not intersect, set flag = 0 and go to step 7.

[0059] Step 6: If i = n 0 +m 0 , all quasi-projection separation surfaces have been judged, set flag = 1; otherwise, set i = i + 1 and go to step 4;

[0060] Step 7: If flag = 0, the result that the two convex polyhedrons do not intersect is output; if flag = 1, the result that the two convex polyhedrons intersect is output.

[0061] Preferably, the present application avoids the problem that the conclusion is valid only when the polyhedron is projected onto the coordinate plane when it is parallel to the coordinate plane. It is applicable to general convex polyhedrons and only needs to perform intersection judgment on the convex polygons obtained by projecting along the intersection direction of the opposite surface and the coordinate plane onto another coordinate plane, thereby reducing the workload and difficulty.

[0062] When the surface plane of the model is parallel to the coordinate plane yoz, the orthographic projection on the coordinate plane is a special case of this method, which completes the conversion of general complex and diverse three-dimensional property entities into a special convex polyhedron group, and uses conflict detection between convex polyhedrons to complete the planning of three-dimensional space and the management of three-dimensional property rights.

[0063] Preferably, the target VR conflict detection method development framework is divided into two parts: browser and server. The server includes two modules: data scheduling and data processing. Two most important algorithms are configured in data processing: convex decomposition and convex polyhedron conflict detection, which are composed of two servlets and associated codes. In addition to the interface display, including the initial model loading and the display of the decomposed results, the browser side also needs to use Ajax technology to pass the associated json data to the associated servlet in the background according to the user's function selection. After the server passes the associated function in the data processing module, the data management module decides to pass the corresponding part of the data to the front-end browser in the json format to meet the user's needs. The browser side provides a variety of display modes, including the overlapping display of the initial three-dimensional building model and the decomposition results, etc., which facilitates users to verify the actual demonstration effect of the algorithm through a variety of display modes.

[0064] After comprehensive background convex decomposition and convex polyhedron detection, the three-dimensional building model is converted into a group of convex polyhedrons, and then the background dimensionality reduction method is used to calculate the intersection of the convex polyhedron group. According to the position of the convex polyhedron in the original model, the intersection situation and position of the three-dimensional building models can be roughly determined.

[0065] Preferably, the digital city conflict detection method develops:

[0066] 1.3D building model processing

[0067] The 3D building model is generated in SketchUp through push-pull processing based on the CAD plan. After the front-end Three.js reads the model, it converts the model structure into geometry and mesh, which represent the model's geometric structure and material respectively. The geometry contains vertices array and faces array, which are passed to the geometry information of the 3D building model on the backend server.

[0068] The backend server processes the frontend geometry information. The 3D library used in the backend is jme3. Relying on jme3, the 3D model is parsed and the object information including position coordinates and vertex sets is output after convex decomposition.

[0069] (II) Front-end model and test result display

[0070] When loading a model, Three.js first initializes MTLLoader to load the MTL material file, and then sets the material to an OBJLoader object for easy application when loading the OBJ model. After the model is loaded, it needs to be added to the scene, the camera's perspective and the renderer's factor are set, and the controller (mouse and keyboard factors) are configured. The model is loaded.

[0071] After the convex decomposition is completed in the background, a json formatted data is passed to the front end, which includes the vertex array of the convex polyhedron group after the two models are decomposed, as well as the position and proportion information of the convex body. The front end needs to parse the josn, extract the vertex coordinates, generate the gcometry array of the body according to Three.js's THREE.ConvexGeometry, and then configure the mesh for the body through geometry, configure a uniform color for the convex bodies belonging to the same model, and finally add the mesh to the scene. After the convex decomposition is completed, the front end displays the convex polyhedron detection. After the convex polyhedron detection is completed, the color of the mesh of the intersecting polyhedron is changed according to the result transmitted by the server, the color factor in the mesh of the intersecting polyhedron is changed, and the detection result is displayed by color.

[0072] Preferably, the 3D object collision detection algorithm is analyzed as follows:

[0073] (I) Convex factor analysis

[0074] Depth represents the number of decompositions of the model when performing convex decomposition. When performing the depth adjustment control test, an L-shaped model plus a solid model with a slightly extended top is used;

[0075] For any model, the depth factor should be large by default so that the decomposition result can be restored to the original model as much as possible;

[0076] The factor concavity controls the visual value of the entire convex decomposition. The default value is 0.01. The concavity of each polyhedron after decomposition must be less than 0.01. The value range of concavity is between 0 and 1. For any model, concavity is small by default, which controls the critical value of decomposition and makes the decomposition result closer to the real model.

[0077] For the convex decomposition of a polyhedron, both factors, concavity and depth, require that the depth be as large as possible to ensure more convex decomposition processes, and concavity be as small as possible to ensure that the decomposition judgment and the decomposition results are as precise as possible, close to the true convex polyhedron.

[0078] resolution controls the maximum number of voxels generated during the model voxel reading stage, and controls the speed and accuracy of decomposition. The value range of resolution is between 1,000 and 16,000,000. Approximate convex decomposition is performed on the model and the minimum convex hull of the model. The result generated is also the minimum convex hull. The minimum convex hull is used to approximate the decomposition result. The more voxels there are, the closer the decomposition result is to the model itself, but at the same time, the decomposition process will be longer as the number of voxels increases.

[0079] The larger the maximum voxel setting, the finer the convex decomposition results. The more convex decomposition results there are, the better the accuracy of the conflict detection algorithm can be guaranteed. Different factors are used for different models to strike a balance between the accuracy and efficiency of the decomposition results.

[0080] (II) Front-end and back-end data compatibility

[0081] After the 3D building model is convexly decomposed in the background, the array of vertex coordinates of each convex body, as well as the orientation and size of the polyhedron, is obtained. After being passed to the front end, the data is processed in some basic way to correctly display the convex body group in the front end. The arrangement of the vertex array after the background decomposition is (x 1 ,y 1 , z 1 , x 2 ,y 2 , z 2 , …, x n ,y n , z n ), when the front-end is displayed, a vertex set array is first restored to point form. The Three.js construct requires two attributes, vertices and faces. The faces array contains the serial numbers of the vertices that make up each face.

[0082] Compared with the prior art, the innovations and advantages of this application are:

[0083] (1) In view of the fact that the traditional 3D target conflict detection method is based on the model itself or the position of the model in the scene, the entire conflict detection algorithm is quite abstract and complex, which is not convenient for algorithm design and idea development. This application combines the actual urban three-dimensional building model, converts the traditional conflict detection algorithm into the cutting body of the 3D target and the conflict detection for convex polyhedron to solve the problem in two aspects, and finally completes the transformation from polyhedron detection to convex polyhedron detection and then to convex polygon detection, which greatly simplifies the calculation process of three-dimensional building model detection and realizes the conflict detection of three-dimensional models more quickly. The established three-dimensional geographic information system management platform can show users more geographic information and more intuitive urban models, and can provide guidance and assistance to other industries, such as urban planning, disaster assessment and many other fields.

[0084] (2) The present application first proposes a cutting volume of a 3D target: the urban three-dimensional building model is complex and diverse, and the mainstream conflict detection method is based on the model itself. Therefore, it is impossible to deal with all situations by only building a conflict detection method for a model structure. The idea of ​​cutting a 3D target came into being, and the precise cutting volume was proved to be quite complicated. Therefore, the present application adopts a method of approximating 3D grid layered segmentation. The 3D target is converted into a group of convex polyhedra, which ensures efficiency on the basis of accuracy. The second is conflict detection for convex polyhedra: convex polyhedra have more features, and it is relatively easy to perform conflict detection for convex polyhedra. Compared with two-dimensional, three-dimensional makes the problem of conflict detection more complicated because of the additional dimension. However, when the model is convex, the vertices of the model are projected on the coordinate axis along a certain direction on the coordinate plane, and the plane point sets generated by the two projections are used to construct the minimum convex hull. The conflict situation of the two minimum convex hulls on the plane is used to judge the conflict situation of the two convex polyhedra. Combining the above two points, conflict detection is performed for any urban three-dimensional building model, and the detection method is fast, accurate and efficient.

[0085] (3) The first purpose of this application is to establish a new method for solving the conflict detection of urban three-dimensional building models: adopt a method of approximate 3D grid layered segmentation to convert 3D targets into convex polyhedron groups, and convert the conflict detection algorithm into two ideas: convex decomposition of general polyhedrons, convert them into convex polyhedron groups, and then reduce the dimension of the convex polyhedron groups and project them into two-dimensional convex polygons for judgment, and finally complete the transformation from polyhedron detection to convex polyhedron detection and then to convex polygon detection, simplify the calculation process of three-dimensional building model detection, and realize the conflict detection of three-dimensional models; second, construct a convex polyhedron projection detection algorithm; third, develop a B / S end three-dimensional building model detection system: establish a three-dimensional model detection system, and as a part of the urban three-dimensional cadastral management system, based on the skeleton structure extracted from the three-dimensional building model, obtain the result map after convex decomposition and convex body detection, simulate the three-dimensional urban planning detection system, and detect the conflict between the planned route and the existing urban house model. The conflict detection effect of 3D targets is good, the speed is fast, and the detection is comprehensive and accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0086] Figure 1 It is a flow chart of conflict detection of VR space cutting volume of 3D digital city target.

[0087] Figure 2 It is a schematic diagram of the center point and facing faces of the convex polyhedron conflict detection.

[0088] Figure 3 It is a schematic diagram of the projection separation surface for conflict detection of convex polyhedrons.

[0089] Figure 4 It is a flowchart of the conflict detection algorithm for convex polyhedra.

[0090] Figure 5 It is a display diagram of the front-end interface for loading and visualizing a 3D building model.

[0091] Figure 6 This is a schematic diagram of the effect after the system clicks the model convex decomposition button.

[0092] Figure 7 This is a schematic diagram of the distribution of points of interest after 1:577791 regular grid classification.

[0093] Figure 8 This is a schematic diagram of the distribution of interest points after 1:577791 full quadtree classification.

[0094] Fig. 9 It is a specific numerical comparison chart of the number of points of interest displayed at each performance level. DETAILED DESCRIPTION

[0095] The following further describes the technical solution of the 3D digital city target VR space cutting volume conflict detection method provided by the present application in conjunction with the accompanying drawings, so that those skilled in the art can better understand the present application and implement it.

[0096] Conflict detection of 3D objects is an important topic in three-dimensional geographic information management systems, computer graphics modeling, 3D games, and mixed reality. Three-dimensional space planning and three-dimensional property management must rely on conflict detection. Given that traditional methods of 3D object conflict detection are based on the model itself or the position of the model in the scene, the entire conflict detection algorithm is quite abstract and complex, which is not convenient for algorithm design and idea development. This application combines the actual three-dimensional building model of the city, converts the traditional conflict detection algorithm into two aspects to solve the problem of cutting the 3D object and conflict detection for convex polyhedrons, and finally completes the transformation from polyhedron detection to convex polyhedron detection and then to convex polygon detection, greatly simplifying the calculation process of three-dimensional building model detection, and realizing conflict detection of three-dimensional models more quickly.

[0097] (1) Cutting volume of 3D target: Urban three-dimensional building models are complex and diverse, and the mainstream conflict detection method is based on the model itself. Therefore, it is impossible to deal with all situations by only building a conflict detection method for one model structure. The idea of ​​cutting volume of 3D target came into being, but the precise cutting volume proved to be quite complicated. Therefore, this application adopts a method of approximating 3D grid layered segmentation. The 3D target is converted into a group of convex polyhedrons, which ensures efficiency on the basis of accuracy.

[0098] (2) Conflict detection for convex polyhedra: Convex polyhedra have many features, so conflict detection for convex polyhedra is relatively easy. Compared with two-dimensional models, three-dimensional models have an additional dimension, which makes the problem of conflict detection more complicated. However, when the model is convex, the vertices of the model are projected onto the coordinate plane along a certain direction of the coordinate axis, and the minimum convex hull is constructed from the plane point sets generated by the two projections. The conflict situation of the two minimum convex hulls on the plane is used to determine the conflict situation of the two convex polyhedra.

[0099] Combining points (1) and (2), conflict detection is performed on any urban three-dimensional building model. Since the complex model has been converted into a convex polyhedron group, the specific intersection position of the complex model can be roughly determined based on the intersection of the convex polyhedrons in the group. The feasibility of the algorithm is then tested using the building model skeleton data, and the system is used to simulate the property rights conflict detection problem caused by line planning.

[0100] 1. Architecture of 3D Target VR Space Conflict Detection Method

[0101] The conflict detection problem for 3D space planning and 3D property management is to determine the intersection of two sets from a set perspective. The existing face-body intersection detection algorithm needs to consider the characteristics of the polyhedron itself and design different conflict detection schemes based on the different characteristics of the polyhedron itself. However, in reality, 3D entities are very complex, and there are many features to consider and take into account for conflict detection of 3D entities.

[0102] In practice, the volume representation models of most buildings are relatively regular, and the angles between faces are mostly right angles. Therefore, converting a complex building model into multiple simple convex polyhedron models and dividing a complex three-dimensional building model into multiple simple convex models have the following advantages: First, the three-dimensional building model is relatively regular and easy to cut; second, after converting the complex three-dimensional building model into a convex polyhedron group, it is only necessary to design a conflict detection algorithm for the convex polyhedron, reducing the need to design special conflict detection algorithms for polyhedrons with different shape characteristics and reducing the workload; third, due to the many features of convex polyhedrons, it is relatively easy to design and optimize conflict detection algorithms. Converting a complex polyhedron into a group of convex polyhedron groups is a simplification process that conforms to the normal design algorithm and solution flow.

[0103] For each independent test, the problem size has been reduced to a constant, and each test result is obtained in a constant time;

[0104] There are a large number of actual urban three-dimensional building models. It only takes one preprocessing to decompose each complex polyhedron model into simple polyhedrons, and there is no need for repeated decomposition in subsequent multiple topology detections. After the model is convexly decomposed, the decomposed polyhedron group is used as the original model to simplify the conflict detection in the second step of the process. For an irregular three-dimensional building model, it is only necessary to design a suitable convex decomposition algorithm to decompose the model within the allowable error range to achieve the result of conflict detection between each building model. The result is not 100% accurate, but the error is very low. For a group of convex polyhedrons, multiple concepts are used to reduce the number of conflict detections of convex polyhedrons. In addition, convex polyhedrons themselves are easy to detect. After a group of polyhedrons are conflict-detected with each other, the intersecting polyhedrons are found. According to the positional relationship of the polyhedrons in the original three-dimensional building model, it is approximately determined whether the two three-dimensional models intersect, and the approximate intersection position can be pointed out to achieve accurate detection results. Figure 1 This is the flowchart of this algorithm.

[0105] In summary, the method of solving the conflict detection of three-dimensional building models in this application is to convert the conflict detection for building models of different forms into a relatively easy-to-handle problem: a convex decomposition method of the three-dimensional building model and a conflict detection method designed for the convex polyhedron after decomposition, and a convex decomposition method and a convex polyhedron conflict detection method suitable for the building model are designed.

[0106] 2. Establishing the cutting volume algorithm of 3D target

[0107] Define S as a polyhedron in 3D Euclidean space, V = {A 1 , A 2 , …, A n} is the vertex array of S, n represents the number of vertices of S, 0={t 1 , t 2 ,…,t r} is the triangular face of the polyhedron S, and T represents the total number of triangular faces of S;

[0108] The exact convex decomposition of a polyhedron S consists in dividing it into a set of minimal sub-convex surfaces. For fixed factors α and θ, a decomposition result set I = {π 1 , π 2 ,…,π K}, ensure that the decomposition result K is the least and verify that the concavity of each sub-convex surface is lower than α;

[0109] The iterative approximation of the convex decomposition problem is adopted. Based on the divide-and-conquer strategy, an iterative mesh is established until the concavity of each sub-convex surface is lower than the critical value α. In each step i, the vertex A with the maximum concavity is selected. i * , and consider passing A i * The bisection plane of A i * The convex body is divided into two sub-convex bodies. The limitation at this time is related to the selection of the best cutting plane, which requires complex analysis of the model characteristics. In addition, in fact, only considering the plane-based dichotomy has more restrictions and may lead to poor decomposition results.

[0110] To overcome this limitation, this application uses a three-dimensional grid to approximate VR convex hierarchical segmentation. First, the three-dimensional grid is treated as a graph and the dual graph of the graph is calculated. Then, by continuously adopting topological extraction processing, while minimizing the cost function associated with the concavity and aspect ratio of the generated segmentation clusters, its vertices are clustered iteratively.

[0111] The dual graph S of the grid S is associated * The definition is as follows: The dual graph S of a planar graph S * Consider each region of the plane as a point. The two adjacent regions to which each edge of the original graph belongs are connected by edges to the points in the dual graph. Once the dual graph S is calculated, * , the algorithm enters the extraction phase, which includes sequentially applying the half-edge cascade extraction process, each half-edge cascade process applied to the edge (v, w) represented as Wb(v, w) merges the two vertices v and w, the vertex w is removed and all its incident edges are connected to v;

[0112] Let A(v) be the initial array of vertex v. Initially, the array A(v) is empty. At each process Wb(v, w) applied to vertex v, the array A(v) is represented by the pseudocode A(v)←A(v)∪A(w)∪{w}.

[0113] The extraction process is controlled by a cost function describing the concavity and aspect ratio of S(v,w), where S(v,w) is obtained from vertices v and w and their initial arrays, where S(v,w) is represented by A(v)∪A(w)∪{w,v};

[0114] The aspect ratio E of the surface S(v, w) shape (v, w) is obtained from formula 1:

[0115]

[0116] where ρ(S(v, w)) and σ(S(v, w)) are the perimeter and area of ​​S(v, w) respectively;

[0117] Using the cost function E shape (v, w) is convenient for generating compact clusters. When the surface is a circle, E shape =1; the more irregular the surface, the larger the aspect ratio;

[0118] The extraction cost E(v, w) associated with the outer edge (v, w) is obtained by Equation 2:

[0119]

[0120] where C(S(v,w)) is the concavity of S(v,w), D is a normalization factor equal to the bounding diagonal of S, and α is the control shape factor E shape (v, w) Contribution factor relative to concavity cost;

[0121] At each step of the extraction process, the Wb process with the lowest extraction cost is used, and the following new partitions are calculated in It is expressed by formula 3:

[0122]

[0123] in represents the dual graph S obtained after n half-edge cascade extraction processing * vertices, iterate until all S * The outer edge of produces has a value lower than E;

[0124] The concavity C(S) of the three-dimensional grid S is defined as follows:

[0125]

[0126] P(M) represents the projection of point M on the convex hull CH(S) of S. Relative to the half-ray with origin M and the direction perpendicular to the surface S at M, the concavity of the convex surface is zero. The more concave the surface of the polyhedron, the farther the vertex is from the convex hull.

[0127] The face group detected at the beginning of the algorithm consists of a few adjacent triangles with almost zero concavity. The extraction cost E is determined by the aspect ratio E shape This is conducive to generating compact surfaces. This behavior gradually fails during the extraction process because the face group becomes more and more concave. The shape contribution factor α is also introduced to determine E shape It does not affect the final extraction process.

[0128] 3. Conflict Detection Method for Convex Polyhedrons

[0129] Based on the conversion idea, when solving the more difficult detection problem of ordinary three-dimensional property body models, the problem is converted into two aspects: convex decomposition and conflict detection algorithm for convex polyhedrons. When the conflict detection algorithm for convex polyhedrons is used, the conflict detection algorithm for the body is converted into a plane intersection algorithm for two-dimensional planes.

[0130] The convex polyhedron is transformed into a two-dimensional convex polygon by projection, and then the body is transformed into a two-dimensional figure for detection and judgment. However, the defect of this method is also found in the end: the conclusion is only valid when the polyhedron is parallel to the coordinate plane and the positive projection is made to the coordinate plane. After studying and analyzing the association theory, this idea is improved and supplemented, and the problem that this idea can only be corrected for some special convex bodies.

[0131] Definition A: For two polyhedrons A and B of arbitrary shapes, if the intersection of the projections of the vertices of the two polyhedrons on the coordinate plane about any line 1 (or the projections on a certain line) is an empty set, then the two polyhedrons do not intersect;

[0132] When there are convex polygons formed by sets of vertex projections that do not intersect, then the two convex polyhedrons do not intersect. The condition for determining that two convex polyhedrons intersect is corrected to the fact that the intersection of convex polygons formed by the vertex sets projected in any direction is not an empty set instead of only the intersection of the projected vertex sets on the coordinate plane is not empty. However, in actual programming development, it is unrealistic to project all faces, and this condition cannot be used as a basis for development to determine whether convex polyhedrons intersect.

[0133] Definition B: A convex polyhedron is the sum of the points, faces and the internal space enclosed by the three-dimensional Euclidean space. A convex polyhedron has vertices A l , A 2, …, A n , n represents the number of vertices of the polyhedron, and the polyhedron is represented by V(A 1 , A 2 , …, A n ) means that the point C(x C ,y C , z C ), C(x C ,y C , z C ) is V(A l , A 2 , ..., A n ), calculated as Equation 5:

[0134]

[0135] If two convex polyhedrons V A and V B The centers of A and C B , vector C A C B (Vector C B C A ) is defined as a convex polyhedron V A About V B (V B About V A ), for a face F in the convex polyhedron V, a normal vector (perpendicular vector) of face F from inside the convex polyhedron to outside the convex polyhedron is the external normal vector (external perpendicular vector) of this face, denoted by N;

[0136] If C A and C B Each is a convex polyhedron V A and V B The center of V A (V B ) The perpendicular vector between the Chinese and foreign vectors and the vector C A C B (C B C A ) is an acute angle between the vectors of V and V. A (V B ) A (V B ) The normal vector and the vector C A C B (C B C A ) is a right angle or an obtuse angle, which is the back face. A (V B), for two convex polyhedrons V A and V B , if two polyhedrons intersect, the intersection is at the facing faces;

[0137] like Figure 2 , C A and C B are the centers of the two polyhedrons, C A C B is a convex polyhedron V A and V B The center vector, A 1 A 3 A 4 and B 1 B 4 B 8 B 5 , B 1 B 2 B 6 B 5 , B 5 B 6 B 7 B 8 Represents the facing faces of two polyhedrons;

[0138] Assume that face F is a convex polyhedron V A and V B If V A and V B The intersection of the projections of a set of straight lines parallel to the surface F onto any coordinate plane is empty, and the surface F is V A and V B If the projected separation surface of two convex polyhedrons V A and V B Disjoint, V A and V B There is at least one projected separation plane F, based on the angles between the outer perpendicular vector of the plane and the vector angles between the two plane center vectors (take the acute angle and arrange in ascending order) at V A and V B The set of faces F A and F B Get n 0 and m 0 The set S of facing faces A and S B V A and V B The quasi-projective separation face set of two convex polyhedrons V A and V B There is no intersection, and the resulting projected separation surface is V A and V B The projected separation surface set SA and S B One of the elements, such as Figure 3 , the faces M are two convex polyhedrons V A and V B A projected separation surface of , surface M spatially divides the two polyhedrons into two spaces;

[0139] Take S in sequence and alternately A and S B The surface in V A and V B Project the plane onto the coordinate plane in the direction of the intersection line parallel to the plane and the coordinate plane, find the convex hull polygon for the two projected coordinate point sets, and determine whether the two projected polygons intersect. If there is a plane F k belongs to two quasi-projection separation face sets, so that the two projected polygons do not intersect, then V A and V B Disjoint, if the quasi-projection separation face set does not have face F k So that the two projected polygons do not intersect, two convex polyhedrons V A and V B Intersect, and the correct dimensionality reduction algorithm for convex polyhedron conflict detection is as follows: Figure 4 :

[0140] Input: Vertex factors of two convex polyhedra, V A (A 1 , A 2 , …, A n ) and V B (B 1 , B 2 , …, B n );

[0141] Output: Two convex polyhedrons V A and V B The intersection of

[0142] Step 1: Get the convex polyhedron V based on the vertices of the two convex polyhedrons A and V B Center C A and C B ;

[0143] Step 2: Calculate the face set F A and F B , get the external normal vector N of the face Ak (k=1,2,…,n 1 ) and N Bk (k=1,2,…,m 1 ), calculate N Ak and vector C A CB The angle set and N Bk and vector C B C A The set of angles (replaced by cosine values);

[0144] Step 3: From the face set F A and F B Filter out the positive values ​​of the pre-selected angle value set, and organize the selected faces that meet the conditions into a new face set S according to the cosine value from large to small (the size of the vector angle). A ={F Ak |k=1,2,…,n 0} and S B ={F Bk |k=1,2,…,m 0}, then the two sets S A and S B The elements in the array are arranged alternately to form a face array S = {F k |k=1,2,…,n 0 +m 0}, let i = 1;

[0145] Step 4: Convex Polyhedron V A and V B The vertices of the element face F along the array S i Make a parallel projection on the xoy coordinate plane from the direction of the intersection line with the yoz coordinate plane (if F is parallel to the y-axis, make an orthographic projection on the yoz plane), and calculate the convex hull of the projected point set to obtain V A and V B The projection polygon P of on the xoy plane iA and P iB ;

[0146] Step 5: Calculate two projected polygons P iA and P iB Intersection: Loop through the edge segments of the two polygons to determine whether they intersect. If they do, the two polygons intersect. Otherwise, continue looping until the two polygons do not intersect. If the two projected polygons do not intersect, set flag = 0 and go to step 7.

[0147] Step 6: If i = n 0 +m 0 , all quasi-projection separation surfaces have been judged, set flag = 1; otherwise, set i = i + 1 and go to step 4;

[0148] Step 7: If flag = 0, output the result that the two convex polyhedrons do not intersect; if flag = 1, output the result that the two convex polyhedrons intersect;

[0149] The above method can avoid the problem that the conclusion is valid only when the polyhedron is projected onto the coordinate plane when it is parallel to the coordinate plane. This method is applicable to general convex polyhedrons. Since it only needs to judge the intersection of the convex polygons obtained by projecting along the intersection direction of the opposite face and the coordinate plane onto another coordinate plane, it reduces the workload and difficulty.

[0150] When the surface plane of the model is parallel to the coordinate plane yoz, the orthographic projection on the coordinate plane is a special case of this method. It completes the transformation of general complex and diverse three-dimensional property entities into a special convex polyhedron group, and uses conflict detection between convex polyhedrons to complete the planning of three-dimensional space and the management of three-dimensional property.

[0151] 4. Development framework of target VR conflict detection method

[0152] The development architecture of the detection model is divided into two parts: browser and server. The server includes two modules: data scheduling and data processing. There are two most important algorithms in data processing: convex decomposition and convex polyhedron conflict detection, which are composed of two servlets and related codes. In addition to the interface display, including the initial model loading and the display of the decomposition results, the browser side also needs to use Ajax technology to pass the associated json data to the associated servlet in the background according to the user's function selection. After the server passes the association function in the data processing module, the data management module decides to pass the corresponding part of the data to the front-end browser in json format to meet the user's needs. The browser side provides a variety of display methods, including the overlapping display of the initial three-dimensional building model and the decomposition results, etc., through a variety of display methods, it is convenient for users to verify the actual demonstration effect of the algorithm.

[0153] After comprehensive background convex decomposition and convex polyhedron detection, the three-dimensional building model is converted into a group of convex polyhedrons, and then the background dimensionality reduction method is used to calculate the intersection of the convex polyhedron group. According to the position of the convex polyhedron in the original model, the intersection situation and position of the three-dimensional building models can be roughly determined.

[0154] 5. Development of conflict detection methods for digital cities

[0155] 1.3D building model processing

[0156] The 3D building model is generated in SketchUp through push-pull processing based on the CAD plan. After the front-end Three.js reads the model, it converts the model structure into geometry and mesh, which represent the model's geometric structure and material respectively. The geometry contains vertices array and faces array, which are passed to the geometry information of the 3D building model on the backend server.

[0157] The backend server processes the frontend geometry information. The 3D library used in the background is jme3. Relying on jme3, the 3D model is analyzed. After convex decomposition processing, the object information including position coordinates and vertex sets is output.

[0158] (II) Front-end model and test result display

[0159] When Three.js loads a model, it first initializes MTLLoader to load the MTL material file, and then sets the material to an OBJLoader object for easy application when loading the OBJ model. After the model is loaded, it needs to be added to the scene, the camera's perspective and the renderer's factor are set, and the controller (mouse and keyboard factors) are configured. The model is loaded.

[0160] After the convex decomposition is completed in the background, a json formatted data is passed to the front end, which includes the vertex array of the convex polyhedron group after the two models are decomposed, as well as the position and proportion information of the convex body. The front end needs to parse the josn, extract the vertex coordinates, generate the gcometry array of the body according to Three.js's THREE.ConvexGeometry, and then configure the mesh for the body through geometry, configure a uniform color for the convex bodies belonging to the same model, and finally add the mesh to the scene. After the convex decomposition is completed, the front end displays the convex polyhedron detection. After the convex polyhedron detection is completed, the color of the mesh of the intersecting polyhedron is changed according to the result transmitted by the server, the color factor in the mesh of the intersecting polyhedron is changed, and the detection result is displayed by color.

[0161] 6. Conflict Detection System Display

[0162] Under the Eclipse development platform, using B / S framework and Jme3 visualization java graphics library technology, the intersection detection of 3D building models is completed, 3D space planning and 3D property management are realized, and the intersection detection system of 3D building models is designed and developed. First, the accuracy of conflict detection is tested. Secondly, the 3D space planning of a subway site is simulated according to the actual situation, which basically meets the needs of finding the intersection position of the 3D building model. Users use the system to view the 3D building model, view the convex body groups after convex decomposition of the 3D building model, and perform convex body detection between convex body groups. The detection results are displayed in different colors to remind users of the approximate location of the intersection between the two 3D building models. The conflict problems of the planned lines are given in the system, providing guidance for 3D space planning and 3D property management.

[0163] 1) Loading and visualization of 3D building models

[0164] The front-end interface provides basic 3D model loading and display, such as Figure 5 As shown, the main interface window supports the mouse gestures of left-click dragging and rotating, right-clicking and scroll wheel zooming. The current fps and memory usage information are displayed in the upper left corner of the interface. The two buttons displayed in the upper right corner are system functions. The 3D model uses real 3D building data.

[0165] After convex decomposition, the display interface uses a convex body group to replace the original three-dimensional building model. The user chooses to have the original three-dimensional building model re-overlapped with the convex body group in a transparent manner. After convex body detection, the user can easily find the intersection position in the original building model through the material change of a certain piece in the convex body group. The change in display reduces the burden of establishing the topological structure of the original three-dimensional building model and the convex body group, and intuitively finds the intersection position between the building models, which is convenient for checking the omissions of the building model data.

[0166] 2) Convex decomposition display of 3D building model

[0167] When the user clicks the polyhedron convex decomposition button on the front-end interface, three.js obtains all models in the current scene and passes the model data to the backend via ajax in json format. The backend passes the result of the convex decomposition back to the frontend, where the decomposed convex body group is displayed. Each small convex polyhedron in the convex body group is represented by a color and displayed in a semi-transparent form, which can intuitively determine which complex model the body belongs to. Figure 6 , users can intuitively understand the model decomposition results, and can check whether the decomposition effect of each decomposition result is accurate by superimposing the original model and the decomposition results. Figure 6 It can be seen that the decomposition effect of the two red circles is not very perfect.

[0168] 3) Conflict detection display after decomposition

[0169] When the user clicks the conflict detection button on the front-end interface, the front-end will first determine whether the model in three.js has been convexly decomposed. If there is no convex decomposition, the user will be reminded to perform convex decomposition first. When the system recognizes that the convex decomposition has been completed, the request will be sent to the back-end, and the vertex arrays of the two polyhedrons will be traversed to extract the polyhedron vertices in the two arrays. According to the direction of the intersection of the quasi-projection surface and the yoz coordinate plane, the polyhedron vertices in the two arrays are projected to the xoy coordinate plane. After the projection plane point set is generated into a convex hull, a two-dimensional convex polygon projection intersection detection is performed, and the detection results are returned to the front-end, and the convex polyhedron blocks with intersections are replaced with black materials. The user determines whether the original three-dimensional building models intersect and the approximate location of the intersection based on the color of the convex polyhedron group and the message prompted on the web page, so as to meet the requirements of three-dimensional building model management planning.

[0170] 7. Analysis of 3D target conflict detection algorithm

[0171] (I) Convex factor analysis

[0172] Depth represents the number of decompositions of the model when performing convex decomposition. When performing the depth adjustment control test, an L-shaped model plus a solid model with a slightly extended top is used.

[0173] For any model, the depth factor should be large by default so that the decomposition result can be restored to the original model as much as possible.

[0174] The factor concavity controls the visual value of the entire convex decomposition. The default value is 0.01. The concavity of each polyhedron after decomposition must be less than 0.01. The value range of concavity is between 0 and 1.

[0175] For any model, concavity is preset to be small, controlling the critical value of decomposition and making the decomposition result closer to the real model.

[0176] For the convex decomposition of a polyhedron, both factors, concavity and depth, require that the depth be as large as possible to ensure more convex decomposition processes, and that the concavity be as small as possible to ensure that the decomposition judgment and the decomposition results are as precise as possible, close to a truly convex polyhedron.

[0177] Resolution controls the maximum number of voxels generated during the model voxel reading stage, and controls the speed and accuracy of decomposition. The value range of resolution is between 1,000 and 16,000,000. Approximate convex decomposition is performed on the model and the minimum convex hull of the model. The result generated is also the minimum convex hull. The minimum convex hull is used to approximate the decomposition result. The more voxels there are, the closer the decomposition result is to the model itself. However, the decomposition process will be longer as the number of voxels increases. Therefore, resolution cannot be set too large for the pursuit of accuracy, nor can it be set too small for the pursuit of efficiency. Although efficiency is guaranteed, the decomposition result will be inaccurate.

[0178] like Figure 7 , Figure 8 as well as Fig. 9 As shown, these three groups of pictures are several relatively simple models obtained by combining entity tools in SketchUp and their decomposition effects when the factor resolution is default.

[0179] Figure 7 (a) shows the model diagram obtained by finding the union of two stacked rectangular blocks. Figure 7 (b) is the decomposition result of this model when resolution = 100,000. Figure 7 (b) shows that the decomposition effect is very good. Figure 7 The model in (a) achieves perfect convex decomposition.

[0180] Figure 8 (a) shows a double L-shaped model obtained by union of three adjacent cuboids of equal height. Figure 8 (b) is the decomposition result of this model when resolution = 100,000. Figure 8 (b) shows that the decomposition effect is generally quite accurate, and the overall details of the model in 8(a) are restored. Figure 8 In (b), the inaccurate restoration of the two green blocks in the decomposition result is found.

[0181] Fig. 9 (a) shows the K-type model obtained by combining four cuboids of different heights. Fig. 9 (b) is the decomposition result diagram of this model when resolution = 10,000. Fig. 9 In (b), the original model is decomposed into only three results, which is a poor restoration of the model. Fig. 9 (c) is the decomposition result diagram of this model when resolution = 100,000. Fig. 9 There is some improvement in the decomposition result in (b), but the similarity with the original model is still not high.

[0182] from Figure 7 , Figure 8 as well as Fig. 9 It can be seen that for different models, the decomposition effect of the same resolution factor is different. For the simple model decomposition, that is, Figure 7 When the default resolution factor is kept at 100,000, the decomposition result is consistent with the actual situation. For complex models, the result obtained by keeping the default resolution does not meet the requirements of the later convex decomposition. For the same object, the different resolution factor settings will result in finer decomposition results.

[0183] For more complex models, the decomposition effect is difficult to achieve the expected effect when the factor resolution is set to the default value. The resolution must be set large enough to achieve a more accurate decomposition result. In addition, for some complex cases, even when the factor is set to the maximum, the decomposition result that fully meets the requirements cannot be obtained.

[0184] In summary, the larger the maximum voxel setting, the finer the convex decomposition results. More convex decomposition results can better guarantee the accuracy of the conflict detection algorithm. However, in the decomposition practice, it is found that a larger factor will also lead to lower convex decomposition efficiency. It takes much longer to decompose a model. It is meaningless to use a larger factor resolution for a simple model in a scene. Therefore, the best solution is to use different factors for different models to strike a balance between the accuracy and efficiency of the decomposition results.

[0185] (II) Front-end and back-end data compatibility

[0186] After the 3D building model is convexly decomposed in the background, the array of vertex coordinates of each convex body, as well as the orientation and size of the polyhedron, is obtained. After being passed to the front end, the data is processed in some basic way to correctly display the convex body group in the front end. The arrangement of the vertex array after the background decomposition is (x 1 ,y 1 , z 1 , x 2 ,y 2 , z 2 , …, x n ,y n , z n ), when the front-end is displayed, a vertex set array is first restored to point form. The Three.js construct requires two attributes, vertices and faces. The faces array contains the serial numbers of the vertices that make up each face.

[0187] (III) Analysis of conflict detection algorithm for convex polyhedrons

[0188] There are two parts to the conflict detection problem of convex polyhedrons: the first part is the problem of the conflict detection algorithm itself, and the other part is the impact of the results of convex decomposition of complex three-dimensional models on convex polyhedron conflict detection.

[0189] The conflict detection algorithm for convex polyhedrons used in this application is obtained after convex decomposition of the 3D target. Therefore, the convex decomposition has a great influence on the accuracy of subsequent tests. It is very likely that the result of conflict detection on the decomposed convex polyhedron will not be consistent with the actual situation.

[0190] This application divides the 3D target conflict detection algorithm into two parts, that is, the algorithm error is dispersed into two processes, which is a negative effect brought about by the algorithm idea designed in this application. In addition, the method adopted by this application in convex decomposition is a three-dimensional grid approximation VR convex layered segmentation method, which is an improvement on the general approximate convex decomposition method. Due to the approximation, the error is also increased during decomposition.

[0191] In the conflict detection process of 3D targets in this application, there may be a total of two approximation processes. The first is the feature extraction of the three-dimensional building model to obtain the geometric structure of the building model. During this process, the model will be simplified and the first approximation will be performed (the approximation is only related to the model and is not necessary); the second is the convex decomposition algorithm for complex building models. The precise convex decomposition algorithm is very complex, and at this stage only an approximate convex decomposition algorithm can be used instead. In addition to these two approximations, the iterative errors caused by the two algorithms will also be amplified, and the results will be affected by these factors. This also requires a manual judgment of the detection results after the conflict detection to ensure that the detection effect is in line with the actual situation.

Claims

1. 3D digital city target VR space cutting volume conflict detection method, characterized by: Based on polyhedron convex decomposition and convex polyhedron projection detection, polyhedron conflict detection is carried out, and a method for urban three-dimensional building model conflict detection in three-dimensional geographic information management system is established; 1) Establish a new method to solve the conflict detection of urban three-dimensional building models: construct a cutting volume method for 3D targets, adopt a method that approximates 3D grid layered segmentation, convert 3D targets into convex polyhedron groups, and convert the conflict detection algorithm into two ideas. The general polyhedron is convexly decomposed and converted into a convex polyhedron group. The convex polyhedron group is then reduced in dimension and projected into a two-dimensional convex polygon for interference judgment. Finally, the transformation from polyhedron detection to convex polyhedron detection and then to convex polygon detection is completed, simplifying the calculation process of three-dimensional building model detection and realizing conflict detection of three-dimensional models; 2) Construct a convex polyhedron projection detection algorithm: Based on the properties of convex polyhedrons, the convex body detection is simplified. After projection is performed on another coordinate plane along the direction of the intersection line of the facing surface and the coordinate plane, the minimum convex hull polygon is obtained from the coordinate point set obtained by the projection. Then, the intersection of the edges of the convex polygons is determined to determine whether the two convex polygons intersect. According to the intersection of the two convex polygons obtained along the projection direction of the intersection line of the facing surfaces, if there is a group of convex polygons that do not intersect, the two convex polyhedrons do not intersect; otherwise, the two convex polyhedrons intersect, and the convex group obtained at the same time is used to perform general polyhedron intersection judgment, and the specific position of the polyhedron intersection is determined according to the position of the convex body in the original polyhedron; 3) Develop a B / S-side 3D building model detection system: Establish a 3D model detection system as part of the city’s 3D cadastral management system. Based on the skeleton structure extracted from the 3D building model, obtain the result graph after convex decomposition and convex body detection, simulate the 3D urban planning detection system, and detect conflicts between the planned routes and existing urban house models.

2. The 3D digital city target VR space cutting volume conflict detection method according to claim 1 is characterized in that: 3D target VR space conflict detection method architecture: converting complex building models into multiple simple convex polyhedron models, and dividing complex three-dimensional building models into multiple simple convex models; It only takes one preprocessing to decompose each complex polyhedron model into simple polyhedrons, and there is no need to perform repeated decomposition in subsequent multiple topology detections. After the model is convexly decomposed, the decomposed polyhedron group is used as the original model to simplify conflict detection. For an irregular three-dimensional building model, it is only necessary to design a suitable convex decomposition algorithm to decompose the model within the allowable error range to achieve the result of conflict detection between each building model. For a group of convex polyhedrons, multiple concepts are used to reduce the number of conflict detections of convex polyhedrons. After a group of polyhedrons are conflict-checked with each other, the intersecting polyhedrons are found. According to the position relationship of the polyhedrons in the original three-dimensional building model, it is approximately determined whether the two three-dimensional models intersect, and the approximate intersection position can be pointed out to achieve accurate detection results. The method of solving the conflict detection of three-dimensional building models in this application is to convert the conflict detection for building models of different forms into a relatively easy-to-handle problem: a convex decomposition method of the three-dimensional building model and a conflict detection method for the decomposed convex polyhedron, and an improved convex decomposition method of the building model and a convex polyhedron conflict detection method.

3. The 3D digital city target VR space cutting volume conflict detection method according to claim 1 is characterized in that: The cutting volume algorithm for establishing a 3D target is as follows: S is defined as a polyhedron in 3D Euclidean space, V = {A1, A2, ..., A n } is the vertex array of S, n represents the number of vertices of S, 0 = {t1, t2, ..., t r } is the triangular face of the polyhedron S, and T represents the total number of triangular faces of S; The exact convex decomposition of a polyhedron S consists in dividing it into a set of minimal sub-convex surfaces. For fixed factors α and θ, a decomposition result set I = {π1, π2, ..., π K }, ensure that the decomposition result K is the least and verify that the concavity of each sub-convex surface is lower than α; The iterative approximation of the convex decomposition problem is adopted. Based on the divide-and-conquer strategy, an iterative mesh is established until the concavity of each sub-convex surface is lower than the critical value α. In each step i, the vertex A with the maximum concavity is selected. i * , and consider passing A i * The bisection plane of A i * The convex body to which it belongs is divided into two sub-convex bodies; The VR convex hierarchical segmentation is approximated by a 3D mesh. First, the 3D mesh is treated as a graph and its dual graph is calculated. Then, the vertices are clustered iteratively by continuously applying topological extraction while minimizing the cost function associated with the concavity and aspect ratio of the generated segmentation clusters. The dual graph S of the grid S is associated * The definition is as follows: The dual graph S of a planar graph S * Consider each region of the plane as a point. The two adjacent regions to which each edge of the original graph belongs are connected by edges to the points in the dual graph. Once the dual graph S is calculated, * , the algorithm enters the extraction phase, which includes sequentially applying the half-edge cascade extraction process, each half-edge cascade process applied to the edge (v, w) represented as Wb(v, w) merges the two vertices v and w, the vertex w is removed and all its incident edges are connected to v; Let A(v) be the initial array of vertex v. Initially, the array A(v) is empty. At each process Wb(v, w) applied to vertex v, the array A(v) is represented by the pseudocode A(v)←A(v)∪A(w)∪{w}. The extraction process is controlled by a cost function describing the concavity and aspect ratio of S(v,w), where S(v,w) is obtained from vertices v and w and their initial arrays, where S(v,w) is represented by A(v)∪A(w)∪{w,v}; The aspect ratio E of the surface S(v, w) shape (v, w) is obtained from formula 1: where ρ(S(v, w)) and σ(S(v, w)) are the perimeter and area of ​​S(v, w) respectively; Using the cost function E shape (v, w) is convenient for generating compact clusters. When the surface is a circle, E shape =1; the more irregular the surface, the larger the aspect ratio; The extraction cost E(v, w) associated with the outer edge (v, w) is obtained by Equation 2: where C(S(v,w)) is the concavity of S(v,w), D is a normalization factor equal to the bounding diagonal of S, and α is the control shape factor E shape (v, w) Contribution factor relative to concavity cost; At each step of the extraction process, the Wb process with the lowest extraction cost is used, and the following new partitions are calculated in It is expressed by formula 3: in represents the dual graph S obtained after n half-edge cascade extraction processing * vertices, iterate until all S * The outer edge of produces has a value lower than E; The concavity C(S) of the three-dimensional grid S is defined as follows: P(M) represents the projection of point M on the convex hull CH(S) of S. Relative to the half-ray with origin M and the direction perpendicular to the surface S at M, the concavity of the convex surface is zero. The more concave the surface of the polyhedron, the farther the vertex is from the convex hull.

4. The 3D digital city target VR space cutting volume conflict detection method according to claim 1, characterized in that: Conflict detection method for convex polyhedrons: The detection problem of ordinary three-dimensional property body models is converted into two aspects: convex decomposition and conflict detection for convex polyhedrons. When the conflict detection algorithm for convex polyhedrons is used, the conflict detection algorithm for the body is converted into a plane intersection algorithm for two-dimensional planes; The convex polyhedron is transformed into a two-dimensional convex polygon by projection, and then the body is transformed into a two-dimensional figure for detection and judgment; Definition A: For two polyhedrons A and B of arbitrary shapes, if the intersection of the projections of the vertices of the two polyhedrons on the coordinate plane about any line 1 is an empty set, then the two polyhedrons do not intersect; Two convex polyhedrons do not intersect when there are convex polygons formed by sets of projections of vertices that do not intersect. The condition for determining that two convex polyhedrons intersect is corrected to the fact that the intersection of convex polygons formed by sets of vertices projected in any direction is not an empty set instead of only the intersection of sets of vertices projected on the coordinate plane being not empty.

5. The 3D digital city target VR space cutting volume conflict detection method according to claim 4 is characterized in that: Definition B: A convex polyhedron is the sum of the points, faces and the internal space enclosed by the three-dimensional Euclidean space. A convex polyhedron has vertices A l , A2,…,A n , n represents the number of vertices of the polyhedron, and the polyhedron is represented by V(A1, A2, ..., A n ) means that the point C(x C ,y C , z C ), C(x C ,y C , z C ) is V(A l , A2, ..., A n ), calculated as Equation 5: If two convex polyhedrons V A and V B The centers of A and C B , vector C A C B is defined as a convex polyhedron V A About V B For a face F in the convex polyhedron V, a normal vector of face F from inside the convex polyhedron to outside the convex polyhedron is the external normal vector of this face, denoted by N; If C A and C B Each is a convex polyhedron V A and V B The center of V A (V B ) The perpendicular vector between the Chinese and foreign vectors and the vector C A C B The face with an acute angle between the vectors is the facing face, which is close to or facing V. A V A Normal vectors in China and abroad and vector C A C B The face with a right angle or an obtuse angle is the back face, which is far away from V. A , for two convex polyhedrons V A and V B , if two polyhedrons intersect, the intersection is at the facing faces; C A and C B are the centers of the two polyhedrons, C A C B is a convex polyhedron V A and V B The center vectors A1A3A4 and B1B4B8B5, B1B2B6B5, B5B6B7B8 represent the facing faces of two polyhedrons.

6. The 3D digital city target VR space cutting volume conflict detection method according to claim 5, characterized in that: Assume that face F is a convex polyhedron V A and V B If V A and V B The intersection of the projections of a set of straight lines parallel to the surface F onto any coordinate plane is empty, and the surface F is V A and V B If the projected separation surface of two convex polyhedrons V A and V B Disjoint, V A and V B There is at least one projected separating surface F, based on the angle between the outer perpendicular vector of the surface and the vector angle between the two surface center vectors, which are respectively in V A and V B The set of faces F A and F B Take n0 and m0 facing faces, and the set S A and S B V A and V B The quasi-projective separation face set of two convex polyhedrons V A and V B There is no intersection, and the resulting projected separation surface is V A and V B The projected separation surface set S A and S B One of the elements, face M, is two convex polyhedrons V A and V B A projected separation surface of , surface M spatially divides the two polyhedrons into two spaces; Take S in sequence and alternately A and S B The surface in V A and V B Project the plane onto the coordinate plane in the direction of the intersection line parallel to the plane and the coordinate plane, find the convex hull polygon for the two projected coordinate point sets, and determine whether the two projected polygons intersect. If there is a plane F k belongs to two quasi-projection separation face sets, so that the two projected polygons do not intersect, then V A and V B Disjoint, if the quasi-projection separation face set does not have face F k So that the two projected polygons do not intersect, two convex polyhedrons V A and V B Intersect, and the correct dimensionality reduction algorithm for convex polyhedron conflict detection is as follows: Input: Vertex factors of two convex polyhedra, V A (A1, A2, ..., A n ) and V B (B1, B2, ..., B n ); Output: Two convex polyhedrons V A and V B The intersection of Step 1: Get the convex polyhedron V based on the vertices of the two convex polyhedrons A and V B Center C A and C B ; Step 2: Calculate the face set F A and F B , get the external normal vector N of the face Ak (k=1, 2, ..., n1) and N Bk (k=1,2,…,m1), calculate N Ak and vector C A C B The angle set and N Bk and vector C B C A The set of angles (replaced by cosine values); Step 3: From the face set F A and F B Filter out the positive values ​​of the pre-selected angle value set, and organize the selected faces that meet the conditions into a new face set S according to the cosine value from large to small (the size of the vector angle). A ={F Ak |k=1,2,…,n0} and S B ={F Bk |k=1,2,…,m0}, then the two sets S A and S B The elements in the array are arranged alternately to form a face array S = {F k |k=1, 2,...,n0+m0}, let i=1; Step 4: Convex Polyhedron V A and V B The vertices of the element face F along the array S i Make a parallel projection on the xoy coordinate plane from the direction of the intersection line with the yoz coordinate plane (if F is parallel to the y-axis, make an orthographic projection on the yoz plane), and calculate the convex hull of the projected point set to obtain V A and V B The projection polygon P of on the xoy plane iA and P iB ; Step 5: Calculate two projected polygons P iA and P iB Intersection: Loop through the edge segments of two polygons to determine whether they intersect. If they do, the two polygons intersect. Otherwise, continue the loop until the two polygons do not intersect at the end of the loop. If the two projected polygons do not intersect, set flag = 0 and go to step 7; Step 6: If i=n0+m0, all quasi-projection separation surfaces have been judged, set flag=1; Otherwise, let i=i+1 and go to step 4; Step 7: If flag = 0, the result that the two convex polyhedrons do not intersect is output; if flag = 1, the result that the two convex polyhedrons intersect is output.

7. The 3D digital city target VR space cutting volume conflict detection method according to claim 6, characterized in that: This application avoids the problem that the conclusion is valid only when the polyhedron is parallel to the coordinate plane and is projected onto the coordinate plane. It is applicable to general convex polyhedrons. It only needs to perform intersection judgment on the convex polygons obtained by projecting along the intersection direction of the opposite face and the coordinate plane onto another coordinate plane, which reduces the workload and difficulty. When the surface plane of the model is parallel to the coordinate plane yoz, the orthographic projection on the coordinate plane is a special case of this method, which completes the conversion of general complex and diverse three-dimensional property entities into a special convex polyhedron group, and uses conflict detection between convex polyhedrons to complete the planning of three-dimensional space and the management of three-dimensional property rights.

8. The 3D digital city target VR space cutting volume conflict detection method according to claim 1, characterized in that: Target VR conflict detection method development framework: divided into two parts: browser and server. The server includes two modules: data scheduling and data processing. Two most important algorithms are configured in data processing: convex decomposition and convex polyhedron conflict detection, which are composed of two servlets and related codes. In addition to the interface display, including the initial model loading and the display of the decomposed results, the browser side also needs to use Ajax technology to pass the associated json data to the associated servlet in the background according to the user's function selection. After the server passes the association function in the data processing module, the data management module decides to pass the corresponding part of the data to the front-end browser in json format to meet the user's needs. The browser side provides a variety of display methods, including the overlapping display of the initial three-dimensional building model and the decomposition results, etc., which facilitates users to verify the actual demonstration effect of the algorithm through a variety of display methods. After comprehensive background convex decomposition and convex polyhedron detection, the three-dimensional building model is converted into a group of convex polyhedrons, and then the background dimensionality reduction method is used to calculate the intersection of the convex polyhedron group. According to the position of the convex polyhedron in the original model, the intersection situation and position of the three-dimensional building models can be roughly determined.

9. The 3D digital city target VR space cutting volume conflict detection method according to claim 1, characterized in that: Development of conflict detection methods for digital cities: 1.3D building model processing The 3D building model is generated in SketchUp through push-pull processing based on the CAD plan. After the front-end Three.js reads the model, it converts the model structure into geometry and mesh, which represent the model's geometric structure and material respectively. The geometry contains vertices array and faces array, which are passed to the geometry information of the 3D building model on the backend server. The backend server processes the frontend geometry information. The 3D library used in the backend is jme3. Relying on jme3, the 3D model is parsed and the object information including position coordinates and vertex sets is output after convex decomposition. (II) Front-end model and test result display When loading a model, Three.js first initializes MTLLoader to load the MTL material file, and then sets the material to an OBJLoader object for easy application when loading the OBJ model. After the model is loaded, it needs to be added to the scene, the camera's perspective and the renderer's factor are set, and the controller (mouse and keyboard factors) are configured. The model is loaded. After the convex decomposition is completed in the background, a json formatted data is passed to the front end, which includes the vertex array of the convex polyhedron group after the two models are decomposed, as well as the position and proportion information of the convex body. The front end needs to parse the josn, extract the vertex coordinates, generate the gcometry array of the body according to Three.js's THREE.ConvexGeometry, and then configure the mesh for the body through geometry, configure a uniform color for the convex bodies belonging to the same model, and finally add the mesh to the scene. After the convex decomposition is completed, the front end displays the convex polyhedron detection. After the convex polyhedron detection is completed, the color of the mesh of the intersecting polyhedron is changed according to the result transmitted by the server, the color factor in the mesh of the intersecting polyhedron is changed, and the detection result is displayed by color.

10. The 3D digital city target VR space cutting volume conflict detection method according to claim 1, characterized in that: Analysis of the collision detection algorithm for 3D objects: (I) Convex factor analysis Depth represents the number of decompositions of the model when performing convex decomposition. When performing the depth adjustment control test, an L-shaped model plus a solid model with a slightly extended top is used; For any model, the depth factor should be large by default so that the decomposition result can be restored to the original model as much as possible; The factor concavity controls the visual value of the entire convex decomposition. The default value is 0.

01. The concavity of each polyhedron after decomposition must be less than 0.

01. The value range of concavity is between 0 and 1. For any model, concavity is small by default, which controls the critical value of decomposition and makes the decomposition result closer to the real model. For the convex decomposition of a polyhedron, both factors, concavity and depth, require that the depth be as large as possible to ensure more convex decomposition processes, and concavity be as small as possible to ensure that the decomposition judgment and the decomposition results are as precise as possible, close to the true convex polyhedron. resolution controls the maximum number of voxels generated during the model voxel reading stage, and controls the speed and accuracy of decomposition. The value range of resolution is between 1,000 and 16,000,000. Approximate convex decomposition is performed on the model and the minimum convex hull of the model. The result generated is also the minimum convex hull. The minimum convex hull is used to approximate the decomposition result. The more voxels there are, the closer the decomposition result is to the model itself, but at the same time, the decomposition process will be longer as the number of voxels increases. The larger the maximum voxel setting, the finer the convex decomposition results. The more convex decomposition results there are, the better the accuracy of the conflict detection algorithm can be guaranteed. Different factors are used for different models to strike a balance between the accuracy and efficiency of the decomposition results. (II) Front-end and back-end data compatibility After the convex decomposition of the three-dimensional building model in the background, the array of vertex coordinates of each convex body, as well as the orientation and size of the polyhedron, is obtained. After being passed to the front end, some basic processing is done on the data to correctly display the convex body group in the front end. The arrangement of the vertex array after the background decomposition is (x1, y1, z1, x2, y2, z2, ..., x n ,y n , z n ), when the front-end is displayed, a vertex set array is first restored to point form. The Three.js construct requires two attributes, vertices and faces. The faces array contains the serial numbers of the vertices that make up each face.

Citation Information

Patent Citations

  • Real-time multi-resolution 3D collision detection using cube-maps

    CN101496067A

  • Detection method and device, electronic equipment and storage medium

    CN111274943A

  • Pickup method, device and equipment of three-dimensional model component and storage medium

    CN115272605A

  • Algorithm for automatically identifying room internal partition data according to building three-dimensional model

    CN118070396A

Cited By

  • A Sample Object Loading Method and System Based on Spatial Adaptation Constraints

    CN122574562A

  • Sample object loading method and system based on spatial adaptation constraints

    CN122574562B