A 3D Model Cutting and Analysis Algorithm for GIS
By introducing tolerance range processing and OBB tree collision detection in the three-dimensional model cutting algorithm, combined with adjustment operation and triangle reconstruction, the problems of high requirements for model data and low tolerance in the prior art cutting algorithm are solved, and precise cutting and reconstruction of complex models are realized.
Patent Information
- Application Number
- CN202211069528.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-31
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2042-08-31
AI Technical Summary
The existing three-dimensional model cutting algorithm has high requirements for model data, lacks tolerance concepts, and low fault tolerance, making it difficult to apply to the cutting of complex models such as large-scale geological bodies and aboveground landscapes.
The three-dimensional model cutting analysis algorithm for GIS is used to adjust the coordinate point of the three-dimensional model through the preset tolerance range, and the OBB tree is constructed for collision detection, and the intersection points and intersection lines are traversed to find the adjustment operation and triangle reconstruction are performed. The triangle network is segmented based on topological relationships.
The tolerance range and fault tolerance of the cutting algorithm are improved, and the triangular network is accurately segmented and reconstructed, which supports the cutting requirements of complex models and enhances the understanding of the internal structure of a large-scale three-dimensional model.
Smart Images

Figure CN115359190B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of three-dimensional space analysis, and in particular to a three-dimensional model cutting and analysis algorithm for GIS. Background Art
[0002] Compared with the two-dimensional plane, a three-dimensional model can display the entity structure in any direction and the plane projection in any direction, and is currently widely used. However, the three-dimensional model only shows the surface structure information, and many internal objects are wrapped inside the surface structure, making it impossible to see. To better understand the internal objects, it is necessary to achieve this through cutting technology. The cutting of a three-dimensional model is a basic application of three-dimensional visualization research. Through cutting, the internal spatial structure and spatial distribution details of geological bodies and above-ground landscape models can be intuitively understood, enhancing the understanding of the internal structure of large-scale three-dimensional models.
[0003] The current classic cutting algorithms are mainly the cutting of computational geometry based on mathematical theories. They have high requirements for model data, no tolerance concept, low fault tolerance rate, and cannot be applied to the cutting of large-scale models such as geological bodies and above-ground landscapes. Summary of the Invention
[0004] To solve the problems raised in the above background art, the technical solution adopted by the present invention is as follows:
[0005] A three-dimensional model cutting and analysis algorithm for GIS, comprising the following steps:
[0006] S1. Preset the tolerance range in the algorithm process, and perform coordinate point adjustment on the input three-dimensional model to remove duplicate points and duplicate triangles of the triangular mesh on the outer surface of the three-dimensional model;
[0007] S2. Based on the OBB tree algorithm, construct OBB trees for the model to be cut and the cutting model respectively, and then perform collision detection between the two;
[0008] S3. Traverse the collision detection pairs, find the intersections and intersection lines for the spatially related triangles, and organize the data structures of the intersections and intersection lines;
[0009] S4. Perform adjustment operations on the obtained intersections and intersection lines;
[0010] S5. Reconstruct triangles according to the intersection lines after the adjustment operation;
[0011] S6. Use the intersection lines as boundary constraints, and divide the original patches based on topological relationships, and group the divided results according to their sources to obtain multiple divided sub-patches;
[0012] S7. According to multiple segmented sub-mesh patches, each cut surface is divided into multiple parts, each part belonging to either the left or the right side of the cut surface, and then volumes are respectively constructed based on the topological information to obtain the cutting result.
[0013] In some embodiments, in step S1, when performing coordinate point adjustment on the input 3D model to remove duplicate points and duplicate triangles in the triangular mesh on the outer surface of the 3D model, the specific steps are as follows:
[0014] First, perform adjustment on the vertices within the preset tolerance range in the triangular mesh to remove duplicate points within the tolerance range of the vertices, and replace them with the midpoints of these points;
[0015] Then, remove duplicate triangles within the tolerance range in the triangular mesh;
[0016] Finally, remove degenerate triangles;
[0017] When removing acute degenerate triangles, for acute triangles within the tolerance range, perform adjustment on their degenerate edges, replace the degenerate edges with midpoints, and delete the adjusted degenerate triangles;
[0018] When removing obtuse degenerate triangles, for obtuse triangles within the tolerance range, delete the opposite side of the obtuse angle of the triangle, connect the opposite vertices of the two related triangles of this side, and reconstruct the two related triangles of this side.
[0019] In some embodiments, in step S3, the specific steps to obtain the intersection points and intersection line segments are as follows:
[0020] First, perform edge-edge intersection. Traverse the edges of two related triangles, find the intersection points of the edges of the two triangles, and consider two edges with a distance within the tolerance range as intersecting edges to find their intersection points;
[0021] Then, perform edge-face intersection. Respectively find the intersection points of each edge of the triangle with the face of its related triangle;
[0022] Finally, generate the intersection line according to the spatial position information of the obtained intersection points and the topological information.
[0023] In some embodiments, in step S4, it specifically includes the following steps:
[0024] First, perform intersection line adjustment operation: Index and sort all the intersection lines on each triangle. After sorting, find the relevant intersection lines, find the intersection points formed by all the intersection lines on each triangle, and break them into multiple sub-intersection lines;
[0025] Then, perform intersection point adjustment operation: Remove duplicate points within the tolerance range among the intersection points, and update the intersection points in the original face;
[0026] Finally, for the coplanar patches, find the boundary intersection lines of the coplanar regions, and together with the non-coplanar intersection lines, construct the line topology to obtain the nodal line information table.
[0027] In some embodiments, in step S5, it specifically includes the following steps:
[0028] First, reconstruct the spatial information: Add the intersection lines to the associated triangles and reconstruct the triangles with intersection line constraints.
[0029] Then, reconstruct the topological information: Record the topological relationship information of each intersection line and reconstruct and update the nodal line information table.
[0030] Compared with the prior art, the beneficial effects of the present invention are:
[0031] The 3D model cutting analysis algorithm for GIS provided by the present invention takes into account the tolerance ranges of each step, solves problems such as incorrect spatial relationship judgment due to precision errors in traditional cutting algorithms; and accurately divides and reconstructs the triangular mesh by constructing the topological relationships of points, lines, and faces between associated triangles, thereby realizing the cutting of 3D models based on triangular meshes, enabling it to well support the cutting requirements of multi-dimensional and multi-scale complex models such as above-ground urban public facilities, underground structures, geological structures, and lithology models. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 is a schematic flow chart of the 3D model cutting analysis algorithm for GIS provided by the present invention;
[0033] Figure 2a and Figure 2b is a schematic diagram before and after removing acute-angled degenerate triangles in a specific embodiment;
[0034] Figure 3a and Figure 3b is a schematic diagram before and after removing obtuse-angled degenerate triangles in a specific embodiment;
[0035] Figure 4 is a schematic diagram of intersection finding of spatially related triangles in a specific embodiment;
[0036] Figure 5a and Figure 5b is a schematic diagram before and after intersection line adjustment operation in a specific embodiment;
[0037] Figure 6a and Figure 6b is a schematic diagram before and after intersection point adjustment operation in a specific embodiment;
[0038] Figure 7 is a schematic diagram for reconstructing spatial information in a specific embodiment;
[0039] Figure 8 It is a schematic diagram of the sub-mesh obtained after segmentation in a specific embodiment;
[0040] Figures 9a - 9d It is a schematic diagram of the cutting effect in a specific embodiment. Specific Embodiment
[0041] To make the technical means, creative features, achieved purposes and effects of the present invention easy to understand, the following further elaborates how the present invention is implemented in combination with the accompanying drawings and specific embodiments.
[0042] Referring to Figure 1 as shown, the present invention provides a 3D model cutting and analysis algorithm for GIS, including the following steps:
[0043] S1. Preset the tolerance range in the algorithm process, and perform coordinate point adjustment on the input 3D model to remove duplicate points and duplicate triangles of the triangular mesh on the outer surface of the 3D model.
[0044] In step S1, specifically, first, perform adjustment on the vertices within the preset tolerance range in the triangular mesh to remove duplicate points of the vertices within the tolerance range, and replace them with the midpoints of these points; then, remove duplicate triangles within the tolerance range in the triangular mesh; finally, remove degenerate triangles.
[0045] In a specific embodiment, when removing acute degenerate triangles, referring to Figure 2a and Figure 2b as shown, for the acute triangle AD1D2 within the tolerance range (i.e., the triangle with vertices close to 0°), perform adjustment on its degenerate edge D1D2, replace the degenerate edge D1D2 with the midpoint D’, and delete the adjusted degenerate triangle AD1D2.
[0046] In a specific embodiment, when removing obtuse degenerate triangles, referring to Figure 3a and Figure 3b as shown, for the obtuse triangle ABC within the tolerance range (i.e., the triangle with vertices close to 180°), delete the opposite side AC of the obtuse angle of the triangle, connect the opposite vertices BD of the two related triangles on this side, and reconstruct the two related triangles on this side.
[0047] After such processing, the proximity of coordinate points and triangles within the tolerance range can be reduced, and the data complexity can be lowered.
[0048] S2. Based on the OBB tree algorithm, construct OBB trees for the model to be cut and the cutting model respectively, and then perform collision detection between the two. After such processing, irrelevant triangles can be filtered, and the triangle pairs that are truly spatially related can be quickly found.
[0049] S3. Traverse the collision detection pairs, find the intersections of the space-related triangles, obtain the intersection points and intersection lines, and organize the data structures of the intersection points and intersection lines, including information such as intermediate position information, intersection point types, and sources.
[0050] In step S3, the specific steps to obtain the intersection points and intersection line segments are as follows: First, perform edge-edge intersection. Traverse the edges of the two related triangles, find the intersection points of the edges of the two triangles, and consider the two edges within the tolerance range as intersecting edges to find their intersection points. Then, perform edge-face intersection, and find the intersection points of each edge of the triangle with the faces of its related triangles respectively. Finally, generate the intersection line according to the spatial position information and topological information of the obtained intersection points.
[0051] In a specific embodiment, referring to Figure 4 as shown, it can be seen that Figure 4 in, pq2 is the intersection point of the edges of the two triangles, pq1 is the intersection point of the edge and the face, and the line segment connected by pq1 and pq2 is the generated intersection line.
[0052] The solution provided by the present invention, when finding the intersection of triangles, directly finds the intersection points of the edges of the two triangles and the intersection points of the edge and the face, instead of the two cases of finding coplanar triangles and non-coplanar triangles in the traditional algorithm, avoiding the accuracy deviation in judging whether the triangles are coplanar, thus avoiding problems such as unreasonable triangle intersection.
[0053] S4. Perform adjustment operations on the obtained intersection points and intersection lines.
[0054] In step S4, it specifically includes the following steps:
[0055] First, perform intersection line adjustment operations: Index and sort all the intersection lines on each triangle. After sorting, find the relevant intersection lines, find the intersection points formed by all the intersection lines on each triangle, and break them into multiple sub-intersection lines. In a specific embodiment, referring to Figure 5a as shown before the adjustment operation, find two intersection lines in the triangle; referring to Figure 5b as shown, the intersection point is D0, and the multiple sub-intersection lines formed by breaking are S0, S1, S2, and S3.
[0056] Then, perform intersection point adjustment operations: Remove the duplicate points within the tolerance range among the intersection points, and update the intersection points in the original surface. Referring to Figure 6a and Figure 6b as shown, Figure 6a after the duplicate points in Figure 6b are removed, only one intersection point in
[0057] is retained. Finally, for the coplanar patches, find the boundary intersection lines of the coplanar regions, and together with the non-coplanar intersection lines, construct a line topology to obtain the nodal line information table.
[0058] S5. Reconstruct triangles based on the intersection lines after adjustment calculations.
[0059] In step S5, it specifically includes the following steps:
[0060] First, reconstruct spatial information: Add the intersection lines to the associated triangles for triangle reconstruction with intersection line constraints. In a specific implementation, referring to Figure 7 as shown, it is a schematic diagram of the reconstructed spatial information in the picture of Figure 5. After reconstruction, seven sub - triangles are obtained, and at this time, the intersection lines are added to the original picture.
[0061] Then, reconstruct topological information: Record the topological relationship information of each intersection line and reconstruct and update the nodal line information table.
[0062] S6. Use the intersection lines as boundary constraints, divide the original patches based on the topological relationship, and group the divided results by source to obtain multiple divided sub - patches.
[0063] In a specific embodiment, referring to Figure 8 as shown, it is Figure 7 a schematic diagram of the picture in which the side lines and intersection lines are used as boundaries to obtain four sub - patches.
[0064] S7. According to the multiple divided sub - patches, divide each cut surface into multiple parts, each part belongs to the left or right side of the cut surface, and then construct solids respectively according to the topological information to obtain the cutting result.
[0065] In a specific embodiment, referring to Figures 9a - 9d as shown, Figure 9a it is a schematic diagram of cutting a geological body. In the figure, the middle part is the cut surface, and the left and right sides are the left and right sides of the cut surface respectively; Figure 9b , Figure 9c , Figure 9d are respectively the effect diagrams of the left side of the cut surface, the right side of the cut surface, and the cut surface.
[0066] The 3D model cutting and analysis algorithm for GIS provided by the present invention is applicable to the cutting of large - scale geological models, solves the problem that the traditional cutting algorithm does not comprehensively consider special situations caused by floating - point errors of intersection point coordinates, and thus cannot support the cutting of complex engineering geological data.
[0067] In summary, the 3D model cutting and analysis algorithm for GIS provided by the present invention takes into account the tolerance ranges of each step, solves problems such as incorrect spatial relationship judgment caused by precision errors in traditional cutting algorithms; and accurately divides and reconstructs the triangular mesh by constructing the topological relationships of points, lines, and surfaces between associated triangles, thereby realizing the cutting of 3D models based on the triangular mesh, enabling it to well support the cutting requirements of multi-dimensional and multi-scale complex models such as above-ground urban public facilities, underground structures, geological structures, and lithology models.
[0068] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the purpose and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.
Claims
1. A 3D model cutting and analysis algorithm for GIS, characterized in that, It includes the following steps: S1. Preset the tolerance range in the algorithm process, and perform coordinate point adjustment on the input 3D model to remove duplicate points and duplicate triangles of the triangular mesh on the outer surface of the 3D model; S2. Based on the OBB tree algorithm, construct OBB trees for the model to be cut and the cutting model respectively, and then perform collision detection between the two; S3. Traverse the collision detection pairs, find the intersections and intersection lines of the spatially related triangles, and organize the data structures of the intersections and intersection lines; S4. Perform adjustment operations on the obtained intersections and intersection lines; S5. Reconstruct triangles according to the intersection lines after the adjustment operation; S6. Use the intersection lines as boundary constraints, divide the original patches based on the topological relationship, and group the divided results by source to obtain multiple divided sub-patches; S7. According to the multiple divided sub-patches, divide each cut surface into multiple parts, each part belonging to the left or right side of the cut surface, and then construct solids respectively according to the topological information to obtain the cutting result.
2. The 3D model cutting and analysis algorithm for GIS according to claim 1, characterized in that In step S1, when performing coordinate point adjustment on the input 3D model to remove duplicate points and duplicate triangles of the triangular mesh on the outer surface of the 3D model, it specifically includes the following steps: First, perform adjustment on the vertices within the preset tolerance range in the triangular mesh to remove the duplicate points within the tolerance range of the vertices, and replace them with the midpoints of these points; Then, remove the duplicate triangles within the tolerance range in the triangular mesh; Finally, remove the degenerate triangles; When removing acute degenerate triangles, for the acute triangles within the tolerance range, perform adjustment on their degenerate edges, replace the degenerate edges with midpoints, and delete the adjusted degenerate triangles; When removing obtuse degenerate triangles, for the obtuse triangles within the tolerance range, delete the opposite side of the obtuse angle of the triangle, connect the opposite vertices of the two related triangles of this side, and reconstruct the two related triangles of this side.
3. The 3D model cutting and analysis algorithm for GIS according to claim 2, characterized in that In step S3, the specific steps to obtain the intersections and intersection line segments are as follows: First, perform edge-edge intersection. Traverse the edges of the two related triangles, find the intersections of the edges of the two triangles, and consider the two edges whose distance is within the tolerance range as intersecting edges to find their intersections; Then, perform edge-face intersection, and find the intersections of each edge of the triangle with the faces of its related triangles respectively; Finally, generate intersection lines according to the spatial position information and topological information of the obtained intersections.
4. The 3D model cutting and analysis algorithm for GIS according to claim 3, characterized in that, In step S4, it specifically includes the following steps: First, perform intersection line adjustment operation: Index and sort all the intersection lines on each triangle. After sorting, find the relevant intersection lines, find the intersections formed by all the intersection lines on each triangle, and break them into multiple sub-intersection lines; Then, perform intersection point adjustment operation: Remove the duplicate points within the tolerance range among the intersection points, and update the intersection points in the original surface; Finally, for the coplanar patches, find the boundary intersection lines of the coplanar regions, and together with the non-coplanar intersection lines, construct a line topology to obtain the node line information table.
5. The 3D model cutting and analysis algorithm for GIS according to claim 4, characterized in that, In step S5, it specifically includes the following steps: First, reconstruct the spatial information: Add the intersection lines to the associated triangles and perform triangle reconstruction with intersection line constraints; Then, reconstruct the topological information: Record the topological relationship information of each intersection line and reconstruct and update the node line information table.
Citation Information
Patent Citations
Cutting method based on integrated three-dimensional GIS model
CN103413297A
Three-dimensional bridge reconstruction method based on vehicle-mounted LiDAR point cloud data
CN104952107A