Method, device and equipment for flattening inclined three-dimensional models

By setting the flattening range and parameters in the 3D model, performing self-intersection judgment and triangle splitting, the problem of low model processing efficiency at the boundary of the flattening area in urban design simulation is solved, and more efficient model flattening and real-world matching are achieved.

CN115393529BActive Publication Date: 2025-10-28UNDERGROUND SPACE TECHNOLOGY DEVELOPMENT CO LTD OF CNACG
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211176325.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-26
Publication Date
2025-10-28
Estimated Expiration
2042-09-26

AI Technical Summary

Technical Problem

In urban design simulation, the processing efficiency of models at the flattened area boundaries is low, which affects the efficiency of browsing design schemes.

Method used

By setting the flattening range and flattening parameters, performing self-intersection judgment, obtaining the latitude and longitude range and block number, traversing the block file, parsing the vertices and triangle indices, modifying the elevation values ​​of the triangles, using the Clipper algorithm library to find the intersection and difference sets, and splitting the triangles to form new triangle indices.

Benefits of technology

It improves the processing efficiency of models at the boundaries of the flattened area, reduces the overlap of 3D models, and improves the browsing efficiency of design schemes and the matching accuracy between models and the real world.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115393529B_ABST
    Figure CN115393529B_ABST
Patent Text Reader

Abstract

This application relates to the field of computer graphics processing technology, specifically to a method, apparatus, and device for flattening a tilted 3D model, which can, to some extent, solve the problem of low efficiency in processing models at the boundaries of the flattened area. The method includes: based on a defined flattened range, performing a self-intersection judgment; when no self-intersection exists, obtaining the latitude and longitude range of the flattened range and all block numbers within the flattened range; traversing the obtained block number list and obtaining all block files; traversing all block files obtained from the block number list and sequentially intersecting them with the flattened range to obtain all model data within the flattened range; traversing all block files within the flattened range, parsing each block file, and obtaining all vertices and triangle indices of the block file; traversing all triangle indices, determining the position of the triangle's projected coordinates relative to the flattened range, and modifying the triangle's elevation value to form the flattened model data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer graphics processing technology, and more specifically, to a method, apparatus, and device for flattening a tilted three-dimensional model. Background Technology

[0002] As a geographical complex integrating population, resources, environment, and socio-economic factors, cities, in their continuous expansion, are influenced by multiple factors, exhibiting dynamic and changing characteristics and becoming increasingly complex in their physical space. Urban design, as the rational design of urban physical space, requires collaborative decision-making among citizens, designers, and other stakeholders. The final product needs to be presented clearly and intuitively from multiple perspectives. However, compared to the complexity of physical space, traditional methods of showcasing urban design outcomes, such as renderings, models, and animations, have static and mechanical limitations. To address these issues, urban design simulation technology, due to its intuitive presentation and ease of operation, can make complex urban spaces and design outcomes easier to understand. Applying simulation technology in urban design perfectly aligns with the characteristics of the complexity of physical space and the inherent requirements of presenting urban design outcomes.

[0003] In some urban design simulation processes, urban planning modeling is required. During the modeling process, the existing model is flattened, and then the corresponding urban planning model is added to the flattened area.

[0004] However, when using the urban design simulation technology disclosed in the relevant technologies for old city renovation or demolition of designated buildings, the process of flattening the model at the boundary of the specific area is quite cumbersome, which in turn affects the efficiency of browsing design schemes. Summary of the Invention

[0005] To address the issue of low efficiency in processing models at the boundaries of flattened regions, this application provides a method, apparatus, and device for flattening tilted three-dimensional models.

[0006] The embodiment of the present application is implemented as follows:

[0007] A first aspect of this application provides a method for flattening a tilted three-dimensional model, the method comprising:

[0008] Define the flattening range, set the relevant flattening parameters, and obtain the elevation of the flattened range after flattening based on the defined flattening range and flattening parameters. The flattening parameters include the flattening value.

[0009] Based on the defined flattening range, self-intersection is determined. If no self-intersection exists, the latitude and longitude range of the flattening range is obtained, and all block numbers within the flattening range are acquired.

[0010] Iterate through the list of block numbers and retrieve all block files;

[0011] Iterate through all the block files obtained from the block number list, and find the intersection of each block with the flattening range to obtain all model data within the flattening range;

[0012] Iterate through all block files within the flattening range, parse each block file, and obtain all vertices and triangle indices of the block file;

[0013] Traverse all triangle indices, determine the position of the triangle's projected coordinates and flattening range, and modify the triangle's elevation value to form the flattened model data.

[0014] In some embodiments, the method includes the following steps in determining the position of the projected coordinates of the triangle and the flattening range:

[0015] Determine the position of the triangle's vertices. When all three vertices are within the flattening range, modify the elevation of each vertex of the triangle to the flattened elevation value.

[0016] Based on the defined flattening range, the intersection of the triangle and the flattening range is determined, a new triangle is constructed, and the triangle is added to the triangle index to obtain a new triangle index;

[0017] Based on the coordinates of the intersection point, obtain the flattened coordinates of that point;

[0018] Iterate through all intersection points, determine the midpoint of the line segment formed by two adjacent intersection points, and if the midpoint is not within the flattening range, construct a new triangle and add the triangle to the triangle index;

[0019] All the triangles will be combined to generate a new block file, which will then be displayed.

[0020] In some embodiments, the method includes the following steps in determining the intersection of the triangle and the flattened area:

[0021] Based on the defined flattening range, the intersection of the triangle and the defined flattening range is calculated. The number of intersection points obtained in the process of finding the intersection is determined. The figure formed by the intersection points is split into triangles to form multiple triangles. The new triangles are added to the triangle index.

[0022] Based on the defined flattening range, the difference between the triangle and the defined flattening range is calculated. The number of difference sets obtained in the process of calculating the difference sets is determined. The figure formed by the difference sets is triangulated to form multiple triangles. The new triangles are added to the triangle index.

[0023] In some embodiments, the method includes the step of finding the intersection of the triangle and the defined flattening area:

[0024] The number of intersection points can be obtained from the intersection of the triangle and the flattened area, and the number of intersection points can be judged.

[0025] If the number of intersection points is 0, determine whether the next triangle intersects.

[0026] If the number of intersection points is not zero, find the intersection of the intersection point with the triangle, obtain the coordinates of the intersection point, and modify the elevation value of the intersection point after flattening.

[0027] The figure formed by the intersection points is triangulated to obtain a set of triangle indices. The coordinates of the triangle vertices are modified, and the triangles are added to the set of triangle indices.

[0028] In some embodiments, the elevation value of the intersection point after flattening is modified as follows:

[0029] The elevation after the intersection is flattened = the elevation after the intersection is flattened + (the actual elevation of the intersection - the elevation after the intersection is flattened) * 0.01.

[0030] In some embodiments, the method includes the step of finding the difference between the triangle and the defined flattened area:

[0031] The number of difference sets can be obtained from the difference set between the triangle and the flattened area, and the number of difference sets can be judged.

[0032] If the difference set has 0 values, proceed to the next triangle.

[0033] Otherwise, find the intersection point with the triangle and obtain the elevation value of the intersection point;

[0034] The figure formed by the intersection points is triangulated to obtain a set of triangle indices. The coordinates of the triangle vertices are modified, and the triangles are added to the triangle index to form new triangle indices.

[0035] In some embodiments, when the number of differences is greater than 0 and all intersections are located inside the triangle, the ring formed by the triangle and the intersections is split so that it can form at least two polygons; when the triangle and the intersections do not form a ring, there is no need to split it again.

[0036] In some embodiments, the method for determining the midpoint of a line segment formed by two adjacent intersection points includes:

[0037] Take the current intersection point and the next intersection point, and connect the two intersection points to form a line segment;

[0038] Determine whether the midpoint of the line segment is within the drawn flattened area;

[0039] If the midpoint is located within the flattened area, then proceed to the next iteration;

[0040] Otherwise, construct faces using the intersection point, the next intersection point, and the corresponding flattened intersection point to form two triangles, and add the newly formed triangles to the triangle index.

[0041] A second aspect of this application provides a device for flattening a tilted three-dimensional model, comprising:

[0042] The input unit is used to define the flattening range and set the relevant flattening parameters, and to obtain the elevation of the flattened range after flattening based on the defined flattening range and flattening parameters, wherein the flattening parameters include flattening values;

[0043] The first processing unit is used to perform self-intersection judgment based on the defined flattening range. When there is no self-intersection, it obtains the latitude and longitude range of the flattening range and obtains all block numbers within the flattening range.

[0044] The second processing unit iterates through the obtained list of block numbers and retrieves all block files;

[0045] The third processing unit traverses all block files obtained from the block number list, and intersects them with the flattening range in turn to obtain all model data within the flattening range.

[0046] The fourth processing unit traverses all block files within the flattening range, parses each block file, and obtains all vertices and triangle indices of the block file;

[0047] The fifth processing unit traverses all triangle indices, determines the position of the triangle's projected coordinates and flattening range, and modifies the triangle's elevation value to form the flattened model data.

[0048] A third aspect of this application provides a tilted three-dimensional model flattening device, including at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the steps of the tilted three-dimensional model flattening method described in the above technical solution.

[0049] The beneficial effects of this application are as follows: By first setting a flattening range on the 3D model, the model is divided into pre-flattened sections based on the flattening range. Then, the flattening range is queried through self-intersection judgment, thereby reducing the overlap of 3D models within the flattening range. Furthermore, the block files within the flattening range are traversed sequentially to obtain the vertices and triangle indices of the block files. Moreover, by traversing the triangle indices, the projected coordinates of the triangles and the position of the flattening range can be easily obtained, so as to obtain the model data presented after flattening. This can improve the efficiency of processing the model at the boundary of the flattening area. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 This is a step diagram illustrating a method for flattening a tilted three-dimensional model according to an embodiment of this application;

[0052] Figure 2 This is a diagram illustrating the steps of determining the position of a triangle's projected coordinates and the flattening range in a method for flattening a tilted three-dimensional model according to another embodiment of this application.

[0053] Figure 3 This diagram illustrates the steps of finding the intersection of a triangle and a defined flattening range in a method for flattening a tilted three-dimensional model according to another embodiment of this application.

[0054] Figure 4 This diagram illustrates the steps of finding the difference between a triangle and a defined flattening range in a method for flattening a tilted three-dimensional model according to another embodiment of this application.

[0055] Figure 5 This is a step diagram illustrating the process of determining the midpoint position of a line segment formed by two adjacent intersection points in a method for flattening an inclined three-dimensional model according to another embodiment of this application.

[0056] Figure 6 This is a structural diagram of a tilted three-dimensional model flattening device according to an embodiment of this application. Detailed Implementation

[0057] To make the objectives, implementation methods and advantages of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the described exemplary embodiments are only some embodiments of this application, and not all embodiments.

[0058] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.

[0059] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.

[0060] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.

[0061] like Figure 1 As shown. Figure 1 This is a step diagram of a method for flattening a tilted three-dimensional model according to an embodiment of this application.

[0062] In some embodiments, the present application provides a method for flattening a tilted three-dimensional model. The method includes: in a three-dimensional visualization system, defining a flattening range, which is used to define the area where the three-dimensional model is flattened, thereby flattening the three-dimensional model in the defined area, and setting relevant flattening parameters, including a flattening value, which is the height to be compressed of the three-dimensional model, and then obtaining the elevation of the flattened range through the flattening range and the flattening value, thereby displaying the state of the three-dimensional model after flattening.

[0063] Based on the defined flattening range, self-intersection judgment is performed. If self-intersection exists, the flattening range needs to be redrawn. If self-intersection does not exist, the latitude and longitude range of the flattening range is obtained, and all block numbers within the flattening range are obtained. By using self-intersection judgment, it is ensured that all block numbers within the defined flattening range do not overlap, thereby improving the efficiency of reading all block numbers. At the same time, the obtained latitude and longitude range can better match the real world and reduce the probability of errors.

[0064] The algorithm iterates through the block number list obtained from the calculation, reads the USMT format files under each block folder, and obtains all block files. It then iterates through all block files obtained from the block number list, intersecting each block file with the flattening range to obtain all model data within the flattening range. Finally, it iterates through all block files within the flattening range, parses each block file, and obtains all vertices and triangle indices of the block file. It then iterates through all triangle indices, determines the position of the triangle's projected coordinates relative to the flattening range, and modifies the triangle's elevation value to form the flattened model data.

[0065] By first defining a flattening range on the 3D model and then dividing the pre-flattened model using this range, and then querying the flattening range using self-intersection judgment, the overlapping of 3D models within the flattening range is reduced. Further, the block files within the flattening range are traversed sequentially to obtain the vertices and triangle indices of the block files. Furthermore, by traversing the triangle indices, the projected coordinates of the triangles and the position of the flattening range can be easily obtained, facilitating the acquisition of the model data after flattening. This improves the efficiency of processing models at the boundaries of the flattened area, thereby increasing the efficiency of browsing design schemes.

[0066] Reference Figure 2 , Figure 2 This diagram illustrates the steps involved in determining the position of a triangle's projected coordinates and the flattening range in a method for flattening a tilted three-dimensional model, according to another embodiment of this application.

[0067] In some embodiments, in the step of determining the position of the projected coordinates of the triangle and the flattening range, the method disclosed in this application includes: determining the position of the triangle vertices; when the positions of all three vertices are within the flattening range, modifying the elevation of each vertex of the triangle to the flattened elevation value; wherein, the position of the three vertices within the flattening range includes the case where the vertices are at the boundary of the flattening range.

[0068] Based on the defined flattening range, the intersection of the triangle with the flattening range is determined, and a new triangle is constructed. This new triangle is then added to the triangle index to obtain a new triangle index. Based on the coordinates of the intersection point, the flattened coordinates of that intersection point are obtained. All intersection points are traversed, and the midpoint of the line segment formed by two adjacent intersection points is determined. If the midpoint is not within the flattening range, a new triangle is constructed and added to the triangle index. All the obtained triangles are combined to generate a new block file, which is then displayed.

[0069] First, the vertices of the triangle are identified. If all vertices of the triangle are within the flattening area, the elevation of the triangle vertices is directly modified to the flattened elevation value. At the same time, the projection coordinates of the surrounding triangles are determined. The triangles are then intersected with the flattening area. When an intersection occurs, the shape formed by the boundary between the triangle and the flattening area is further divided. The resulting shape is then triangulated to form new triangles, which are added to the triangle index. This allows for the sequential determination of the triangles' projection coordinates, thereby improving the efficiency of obtaining the flattened model.

[0070] In some embodiments, in the step of determining the intersection of the triangle and the flattening range, the flattening method for the tilted three-dimensional model disclosed in this application further includes: using the Clipper algorithm library, and based on the defined flattening range, finding the intersection of the triangle and the defined flattening range, determining the number of intersection points, splitting the figure formed by the intersection points into triangles to form multiple triangles, and adding the new triangles to the triangle index; using the Clipper algorithm library, and based on the defined flattening range, finding the difference between the triangle and the defined flattening range, determining the number of difference sets, splitting the figure formed by the difference sets into triangles to form multiple triangles, and adding the new triangles to the triangle index.

[0071] By employing methods of finding intersections and differences, the triangles intersecting with the defined flattening range are further subdivided into smaller triangles. This facilitates detailed division of the triangles, improves the efficiency of adjusting the projection coordinates and elevations of the triangles, and enhances the efficiency and accuracy of displaying the 3D model of the flattened state. It also facilitates the efficient matching of different construction schemes with the current urban landscape.

[0072] Reference Figure 3 , Figure 3 This diagram illustrates the steps of finding the intersection of a triangle and a defined flattening range in a method for flattening a tilted three-dimensional model according to another embodiment of this application.

[0073] In some embodiments, in the step of finding the intersection of the triangle and the defined flattening range, the tilted three-dimensional model flattening method disclosed in this application includes: judging the number of intersection points formed by the triangle and the defined flattening range during the intersection process; if the number of intersection points is 0, judging whether the next triangle intersects; if the number of intersection points is not 0, judging whether the intersection points are within the judged triangles; if they are all within the triangles, setting bRing = true, otherwise bRing = false; performing ray intersection on the intersection points and triangles respectively, obtaining the coordinates of the intersection points, and calculating the flattened elevation of the intersection points based on the coordinates of the intersection points, while modifying the flattened elevation of the intersection points; simultaneously using a triangle algorithm to triangulate and decompose the inner polygon formed by the intersection points to obtain a set of triangle indices, while modifying the coordinate values ​​of the original triangle vertices; if the number of newly formed triangles is greater than 1, adding the newly formed triangles to the original set of triangle indices, and adding new vertices and triangle indices.

[0074] During the process of finding the intersection of the triangle with the boundary of the flattened area, the triangle intersecting with the flattened area is further subdivided, thereby decomposing the formed triangle into multiple smaller triangles, thus improving the efficiency of dividing the boundary of the model.

[0075] In some embodiments, the formula used to modify the elevation after the intersection point is flattened is:

[0076] The elevation after the intersection is flattened = the elevation after the intersection is flattened + (the actual elevation of the intersection - the elevation after the intersection is flattened) * 0.01.

[0077] By using the above formula to obtain the elevation value of the intersection point, the problem of flickering caused by overlapping after the tilted 3D model is flattened is reduced. This facilitates a smooth transition of the intersection point position during the flattening process, reduces the probability of offset during the construction of triangle projection, and makes it easier to display the flattened 3D model. It also reduces the probability of 3D model offset and improves the display effect of the flattened tilted 3D model in the 3D visualization system.

[0078] Reference Figure 4 , Figure 4 This diagram illustrates the steps of finding the difference between a triangle and a defined flattening range in a method for flattening a tilted three-dimensional model according to another embodiment of this application.

[0079] In some embodiments, in the step of finding the difference between the triangle and the defined flattening range, the flattening method for the inclined three-dimensional model disclosed in this application includes: judging the number of differences formed by the triangle and the defined flattening range during the difference calculation process; if the number of differences is 0, then judging the next triangle; performing ray intersection on the intersection point and the triangle to obtain the coordinates of the intersection point, and obtaining the flattened elevation value of the intersection point based on the intersection point coordinates and modifying the flattened elevation value of the intersection point; the method for modifying the flattened elevation value of the intersection point is as follows:

[0080] The elevation after the intersection is flattened = the elevation after the intersection is flattened + (the actual elevation of the intersection - the elevation after the intersection is flattened) * 0.01.

[0081] Since tilted 3D models will flicker when they are at the same elevation after being flattened, the probability of the tilted 3D models being at the same elevation after being flattened can be reduced by modifying the obtained elevation of the intersection point after flattening, thereby improving the display effect of the obtained flattened model.

[0082] Otherwise, perform ray intersection on the intersection point and the triangle, triangulate the figure formed by the intersection point to obtain a set of triangle indices, modify the coordinates of the triangle vertices, and add the triangle to the original triangle index to form a new triangle index.

[0083] When calculating the difference between the triangle and the boundary of the flattened area, the triangle at the boundary of the flattened area is further subdivided into multiple smaller triangles, thereby improving the accuracy of the boundary division of the model and thus improving the efficiency of matching with the real scene.

[0084] In some embodiments, when the difference set is obtained in the process of finding the difference set between the triangle and the flattened area, and the number of difference sets is 2, one of which is the three points of the triangle and the other is all the points of the polygon, and the intersection points are all located inside the triangle, i.e., bRing = true, it is necessary to split the ring formed by the triangle and the intersection points surrounding the inner polygon in order to split the ring to form at least two polygons; in this process, if the triangle and the intersection points do not form a ring, it is not necessary to split it again.

[0085] By using a triangulation algorithm, the outer polygon formed by the difference set is triangulated and split to obtain another set of triangle indices. The triangles obtained by triangulation are added to the set of triangle indices, and new vertices and triangle indices are added.

[0086] By dividing the ring-shaped shape into multiple triangles and determining the boundaries of these triangles with the flattened area, the accuracy of model segmentation is improved, making it easier for the model to fit the real scene and reducing the probability of deformation at the boundaries of the flattened model.

[0087] Reference Figure 5 , Figure 5 This is a step diagram illustrating the process of determining the midpoint position of a line segment formed by two adjacent intersection points in a method for flattening an inclined three-dimensional model according to another embodiment of this application.

[0088] In some embodiments, the method for flattening a tilted 3D model disclosed in this application, in the process of determining the midpoint position of a line segment formed by two adjacent intersection points, includes: traversing all intersection points, taking the current intersection point and the next intersection point, establishing a line segment with the two intersection points as endpoints, determining whether the midpoint of the line segment is within the obtained polygon, and if the midpoint is inside the polygon and does not coincide with the polygon boundary, traversing the next intersection point; otherwise, taking the intersection point, the next intersection point, and the corresponding flattened intersection point, constructing surfaces respectively, forming two triangles, recalculating the normal coordinates of the newly formed triangle, adding the newly formed triangle to the triangle index, and adding new vertices and triangle indices.

[0089] Combine all the triangular mesh information to form a new tilted block file. At the same time, set the refresh flag in the 3D system to true. Then, modify the tilt data of the flattened range in the 3D system to the flattened data so that the flattened 3D effect can be displayed in real time in the 3D system.

[0090] Reference Figure 6 , Figure 6 This is a structural diagram of a tilted three-dimensional model flattening device according to an embodiment of this application.

[0091] In some embodiments, based on the tilted three-dimensional model flattening method disclosed in the above technical solutions, this application also discloses a tilted three-dimensional model flattening device, which includes an input unit, a first processing unit, a second processing unit, a third processing unit, a fourth processing unit, and a fifth processing unit. The input unit is used to define the flattening range, set relevant flattening parameters, and obtain the flattened elevation of the flattened range according to the defined flattening range and the flattening parameters, wherein the flattening parameters include flattening values. The first processing unit is used to perform self-intersection judgment based on the defined flattened range; when no self-intersection exists, it obtains the latitude and longitude range of the flattened range, obtains all block numbers within the flattened range, and transmits the block number list composed of the block numbers to the second processing unit.

[0092] The second processing unit iterates through the obtained block number list and retrieves all block files, then passes these block files to the third processing unit. The third processing unit iterates through all block files obtained from the block number list, sequentially intersecting them with the flattening range to obtain all model data within the flattening range. Simultaneously, the fourth processing unit iterates through all block files within the flattening range, parses each block file, and obtains all vertices and triangle indices. The fifth processing unit iterates through all triangle indices obtained by the fourth processing unit, determines the position of the triangle's projected coordinates relative to the flattening range, and modifies the triangle's elevation values ​​to form the flattened model data.

[0093] After inputting the flattening range and flattening parameters into the input unit, the defined flattening range is judged by self-intersection judgment, and the latitude and longitude parameters of the flattening range are obtained, which facilitates matching with the urban landscape. Furthermore, by adjusting the model at the boundary of the defined flattening range, the probability of distortion at the edge of the flattened 3D model is reduced, which facilitates the smooth transformation of the 3D model into the flattened state and improves the efficiency of browsing multiple construction schemes.

[0094] In some embodiments, based on the tilted three-dimensional model flattening method disclosed in the above technical solutions, this application also discloses a tilted three-dimensional model flattening device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor performs the steps of the tilted three-dimensional model flattening method in the above technical solutions.

[0095] The beneficial effects of this embodiment are as follows: by first setting a flattening range on the 3D model, dividing the pre-flattened model by the flattening range, and then querying the flattening range by self-intersection judgment, the overlapping of 3D models within the flattening range is reduced; furthermore, the block files within the flattening range are traversed sequentially to obtain the vertices and triangle indices of the block files; even further, by traversing the triangle indices, the projected coordinates of the triangles and the position of the flattening range can be easily obtained, so as to obtain the model data presented after flattening. This can improve the efficiency of processing the model at the boundary of the flattening area, thereby improving the efficiency of browsing design schemes.

[0096] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the discussion in some embodiments above is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the embodiments and various different variations of the embodiments suitable for specific application considerations.

Claims

1. A method for flattening an inclined three-dimensional model, characterized in that, The method includes: Define the flattening range, set the relevant flattening parameters, and obtain the elevation of the flattened range after flattening based on the defined flattening range and flattening parameters. The flattening parameters include the flattening value. Based on the defined flattening range, self-intersection is determined. If no self-intersection exists, the latitude and longitude range of the flattening range is obtained, and all block numbers within the flattening range are acquired. Iterate through the list of block numbers and retrieve all block files; Iterate through all the block files obtained from the block number list, and find the intersection of each block with the flattening range to obtain all model data within the flattening range; Iterate through all block files within the flattening range, parse each block file, and obtain all vertices and triangle indices of the block file; Traverse all triangle indices, determine the position of the triangle's projected coordinates and flattening range, and modify the triangle's elevation value to form the flattened model data.

2. The method for flattening an inclined three-dimensional model as described in claim 1, characterized in that, In the step of determining the position of the projected coordinates of the triangle and the flattening range, the method includes: Determine the position of the triangle's vertices. When all three vertices are within the flattening range, modify the elevation of each vertex of the triangle to the flattened elevation value. Based on the defined flattening range, the intersection of the triangle and the flattening range is determined, a new triangle is constructed, and the triangle is added to the triangle index to obtain a new triangle index; Based on the coordinates of the intersection point, obtain the flattened coordinates of that point; Iterate through all intersection points, determine the midpoint of the line segment formed by two adjacent intersection points, and if the midpoint is not within the flattening range, construct a new triangle and add the triangle to the triangle index; All the triangles will be combined to generate a new block file, which will then be displayed.

3. The method for flattening an inclined three-dimensional model as described in claim 2, characterized in that, In the step of determining the intersection of the triangle and the flattened area, the method includes: Based on the defined flattening range, the intersection of the triangle and the defined flattening range is calculated. The number of intersection points obtained in the process of finding the intersection is determined. The figure formed by the intersection points is split into triangles to form multiple triangles. The new triangles are added to the triangle index. Based on the defined flattening range, the difference between the triangle and the defined flattening range is calculated. The number of difference sets obtained in the process of calculating the difference sets is determined. The figure formed by the difference sets is triangulated to form multiple triangles. The new triangles are added to the triangle index.

4. The method for flattening an inclined three-dimensional model as described in claim 3, characterized in that, In the step of finding the difference between the triangle and the defined flattened area, the method includes: The number of difference sets can be obtained from the difference set between the triangle and the flattened area, and the number of difference sets can be judged. If the difference set has 0 values, proceed to the next triangle. Otherwise, find the intersection point with the triangle and obtain the elevation value of the intersection point; The figure formed by the intersection points is triangulated to obtain a set of triangle indices. The coordinates of the triangle vertices are modified, and the triangles are added to the triangle index to form new triangle indices.

5. The method for flattening an inclined three-dimensional model as described in claim 4, characterized in that, When the difference set has a greater than 0 and all intersection points are located inside the triangle, the ring formed by the triangle and the intersection points is split to form at least two polygons; when the triangle and the intersection points do not form a ring, there is no need to split it again.

6. A device for flattening an inclined three-dimensional model, characterized in that, It includes: The input unit is used to define the flattening range and set the relevant flattening parameters, and to obtain the elevation of the flattened range after flattening based on the defined flattening range and flattening parameters. The flattening parameters include flattening values. The first processing unit is used to perform self-intersection judgment based on the defined flattening range. When there is no self-intersection, it obtains the latitude and longitude range of the flattening range and obtains all block numbers within the flattening range. The second processing unit iterates through the obtained list of block numbers and retrieves all block files; The third processing unit traverses all block files obtained from the block number list, and intersects them with the flattening range in turn to obtain all model data within the flattening range. The fourth processing unit traverses all block files within the flattening range, parses each block file, and obtains all vertices and triangle indices of the block file; The fifth processing unit traverses all triangle indices, determines the position of the triangle's projected coordinates and flattening range, and modifies the triangle's elevation value to form the flattened model data.

7. A device for flattening an inclined three-dimensional model, characterized in that, The method includes at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the steps of the method for flattening a tilted three-dimensional model as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Methods, apparatus, equipment, and storage media for flattening and editing quantized grid terrain.

    CN114937126A

  • Accelerated ray tracing using shallow bounding volume hierarchies

    US20100053162A1