Three-dimensional geological section real-time cutting method and system and storage medium
By accelerating pruning with BVH trees and constructing undirected graph structures, combined with the Earcut algorithm and WebGL rendering, the real-time and interactivity issues of traditional 3D geological model profile generation on the Web platform are solved, achieving efficient real-time profile analysis and visualization.
Patent Information
- Application Number
- CN202510640734.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-10-17
AI Technical Summary
Traditional methods for generating 3D geological model profiles struggle to balance accuracy and real-time performance when used in real-time web applications. They also lack interactive flexibility and the existing algorithms are inefficient, making it difficult to meet the real-time processing needs of multi-level and large-scale models.
BVH trees are used to accelerate the trimming of 3D geological models. Triangular meshing is performed by constructing an undirected graph structure and using the Earcut algorithm. Real-time interactive profile analysis is achieved by combining WebGL rendering technology.
It enables real-time 3D geological model cross-section analysis on the web, improving processing efficiency and visualization completeness. Users can adjust the cross-section direction and position in real time, enhancing the flexibility of geological analysis and user experience.
Smart Images

Figure CN120807846A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer graphics, and particularly relates to a three-dimensional geological profile real-time clipping method and system and a storage medium. BACKGROUND
[0002] Three-dimensional geological body model data is an important type of geological data and is the basis for analyzing and calculating complex problems in the field of resources and environment. By integrating geological data, geophysical exploration and drilling and other multi-source data, three-dimensional models can intuitively reflect the spatial distribution of geological bodies such as strata, lithology and faults, and provide a basis for resource exploration, engineering planning and geological disaster analysis. Three-dimensional geological modeling can reveal underground concealed structures and assist in geological decision-making, and has become one of the basic tools and trends of modern geological survey and research. In recent years, with the development of computer graphics and geographic information technology, the application range of three-dimensional geological modeling has been continuously expanding. At present, Guizhou Province in China has taken the lead in carrying out provincial "glass land" key technology research and development, and has constructed three-dimensional geological models of multiple levels, multiple scales and multiple elements. Studies have shown that the visualization analysis of three-dimensional geological models plays an important role in mineral prediction, groundwater resource assessment and geological disaster simulation.
[0003] As a common method for observing underground geological bodies, profile analysis can clearly reveal the spatial distribution of rock layers and the trend of structures by cutting and analyzing three-dimensional models of geological bodies along the vertical direction of strata, which is a necessary means to enhance the understanding of complex geological structure information. In reality, the fields of mineral exploration, oil and gas exploration, engineering geology and geothermal resources often use profile analysis to study the extension and mutual relationship of geological bodies. In teaching and research, three-dimensional profile visualization helps geologists to intuitively demonstrate the spatial relationship between strata structure and tectonic deformation. The interactive generation function of this two-dimensional profile is an important part of geological modeling and visualization, and provides intuitive reference for geological interpretation and mine design.
[0004] However, the traditional profile generation method faces the problem of difficult to balance accuracy and real-time when applied in the Web end. Most methods rely on desktop software for preprocessing and display the profile results in a static form on the Web end, which makes it difficult for users to adjust the profile direction and position in real time and lacks interactive flexibility. Since the original model is usually a hollow structure, the generated profile often lacks filling and is limited to a single layer, making it difficult to fully display the internal characteristics of complex geological bodies. In addition, for multi-level and large-scale models, the efficiency of existing algorithms is low, making it difficult to meet the demand for real-time processing. In view of the above analysis, in the analysis and calculation of complex problems in the resource and environment field, real-time profile analysis of three-dimensional geological models faces many problems and challenges, so it is necessary to propose a Web-based real-time interactive profile analysis method for three-dimensional geological models to break through the traditional preprocessing dependence and improve the efficiency and visualization integrity of profile generation to meet the dynamic analysis needs of complex problems in the resource and environment field. SUMMARY
[0005] In order to break through the traditional preprocessing dependence, improve the efficiency and visualization integrity of profile generation, the purpose of the present application is to provide a three-dimensional geological profile real-time cutting method, system and storage medium, the technical solution adopted is as follows:
[0006] In the first aspect, the present application discloses a three-dimensional geological profile real-time cutting method, the method comprises:
[0007] S1, construct BVH tree to accelerate the cutting of three-dimensional geological model, and calculate the projection of the intersection line segment in the two-dimensional coordinate system of the cutting plane to obtain a set of projected line segments;
[0008] S2, based on the set of projected line segments, construct an undirected graph structure;
[0009] S3, based on the undirected graph structure, extract the closed profile contour, and perform triangle mesh subdivision and rendering display.
[0010] Further, in step S1, the BVH tree is constructed to accelerate the cutting of the three-dimensional geological model, and the projection of the intersection line segment in the two-dimensional coordinate system of the cutting plane is calculated to obtain a set of projected line segments, comprising:
[0011] S11, obtain a three-dimensional geological model, and recursively divide the three-dimensional geological model into a plurality of bounding boxes with parent-child relationship to form a BVH tree;
[0012] S12, obtain the cutting plane parameters, and determine the cutting plane according to the cutting plane parameters;
[0013] S13, traverse the BVH tree to determine the triangular mesh elements intersecting with the cutting plane, and calculate the intersection line segment of the triangular mesh elements relative to the cutting plane;
[0014] S14, project each of the intersection line segments into a two-dimensional coordinate system in which the clipping plane is located to obtain a set of projected line segments.
[0015] Further, in step S2, the undirected graph structure is constructed based on the set of projected line segments, including:
[0016] S21, map the two end points of each projected line segment into nodes in the graph respectively, and integrate the nodes into a set to obtain a set of nodes;
[0017] S22, map the projected line segment itself into an undirected edge connecting the two nodes, and integrate each edge into a set to obtain a set of edges;
[0018] S23, based on the set of nodes and the set of edges, initialize and establish the association between nodes and edges through the graph data structure to construct an undirected graph structure.
[0019] Further, in step S3, the closed profile contour extraction is performed based on the undirected graph structure, and the triangular mesh is divided and rendered, including:
[0020] S31, based on a graph traversal algorithm, identify a closed profile contour from the undirected graph structure;
[0021] S32, for each identified closed profile contour, perform triangular division using the Earcut algorithm to obtain triangular mesh data composed of vertex coordinate arrays, triangular patch index arrays and associated attribute information;
[0022] S33, encapsulate the triangular mesh data into a geometry object compatible with the rendering engine and transmit it to the rendering engine for rendering and display on the Web.
[0023] Further, in step S31, after identifying the closed profile contour, the method further includes: based on the comparison result of the Euclidean distance between the first and last node coordinates and the preset threshold, when it is determined that the first and last nodes of the contour do not coincide, regarding it as an invalid contour to filter the pseudo-contour caused by projection error.
[0024] Further, in step S31, after identifying the closed profile contour, the method further includes: based on the comparison result of the Euclidean distance between the first and last nodes and the preset tolerance threshold, when it is determined that an approximately closed contour is identified, based on linear interpolation or geometric center alignment algorithm to complete the contour to repair the small gap caused by floating-point precision error or geometric symmetry, and ensure the topological integrity of subsequent triangular division and rendering.
[0025] Further, in step S32, for the contour with holes, when the Earcut algorithm is used for triangulation, the method further comprises: automatically identifying the parent-child relationship between the outer contour and the inner contour, i.e., the holes, by the area sign method, to construct a topological constraint tree; and based on the topological constraint tree, performing a Boolean difference operation on the outer contour and the holes to generate an effective triangulation area, and finally generating a triangular mesh that conforms to the original polygon nesting relationship.
[0026] Further, in step S33, in the process of rendering and displaying on the Web side, the method further comprises: based on the geological attribute data associated with the triangular mesh vertices, assigning a unique color value to each profile triangle through a discrete color mapping table; simultaneously superimposing a normal map to enhance the expression of bedding undulation, and integrating a WebGL pickup interaction function, when the cursor hovers over a specific color block, dynamically displaying the stratigraphic thickness, occurrence and contact relationship annotations.
[0027] In a second aspect, the present application discloses a three-dimensional geological profile real-time clipping system, which comprises a BVH accelerated clipping and projection module, a projection line segment graph structure construction module, and a closed contour extraction and rendering module, wherein:
[0028] The BVH accelerated clipping and projection module is used to construct a BVH tree to accelerate the clipping of a three-dimensional geological model, and calculate the projection of an intersection line segment in a two-dimensional coordinate system of a clipping plane to obtain a projection line segment set;
[0029] The projection line segment graph structure construction module is used to construct an undirected graph structure based on the projection line segment set;
[0030] The closed contour extraction and rendering module is used to extract a closed profile contour based on the undirected graph structure, and perform triangulation and rendering display.
[0031] In a third aspect, the present application discloses a computer storage medium for storing computer execution instructions, wherein the computer execution instructions are used to execute the three-dimensional geological profile real-time clipping method of any one of the preceding aspects.
[0032] The present application has the following beneficial effects:
[0033] 1) By constructing a BVH tree, the intersection detection between a three-dimensional geological model and a clipping plane can be significantly accelerated. The BVH tree can quickly exclude regions that do not intersect with the clipping plane by hierarchical division of space, thereby reducing the number of geometric elements that need to be checked. This acceleration effect makes it possible to perform three-dimensional geological model sectioning analysis in real time on the Web side, improving processing efficiency;
[0034] 2) Based on the set of projection line segments, an undirected graph structure is constructed, which can accurately represent the connection relationship between line segments. This structure helps to identify closed contours, and through graph traversal algorithm, the closed profile contour can be efficiently extracted, providing accurate basic data for subsequent three-dimensional reconstruction and visualization;
[0035] 3) Triangle mesh data is transmitted to the rendering engine, so that high-quality rendering display can be realized on the Web side. Since BVH tree accelerates the clipping calculation, users can adjust the position and direction of the section surface in real time on the Web side, and observe the geological structure of different sections. This real-time interactivity improves the user experience and makes geological analysis more flexible and efficient. BRIEF DESCRIPTION OF DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, and the advantages thereof, a brief introduction will be given to the drawings needed in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor based on these drawings.
[0037] Figure 1 A method flow chart of a three-dimensional geological profile real-time clipping method provided by an embodiment of the present application;
[0038] Figure 2 A flowchart for displaying three-dimensional geological profiles in real time on the Web based on BVH acceleration and graph reconstruction;
[0039] Figure 3 A system structure diagram of a three-dimensional geological profile real-time clipping system provided by an embodiment of the present application. DETAILED DESCRIPTION
[0040] In order to further illustrate the technical means and effects adopted by the present application to achieve the predetermined object, the following describes in detail the specific implementation, structure, features and effects of a three-dimensional geological profile real-time clipping method, system and storage medium according to the present application, with reference to the drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.
[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs.
[0042] The specific scheme of a three-dimensional geological profile real-time clipping method, system and storage medium provided by the present application will be described in detail below with reference to the drawings.
[0043] Referring to Figure 1 , which shows a method flow chart of a three-dimensional geological profile real-time clipping method provided by an embodiment of the present application, the method comprises:
[0044] Step S1, constructing BVH tree to accelerate clipping of the three-dimensional geological model, and calculating projection of the intersecting line segment on the two-dimensional coordinate system of the clipping surface to obtain a projection line segment set.
[0045] Step S2, constructing an undirected graph structure based on the projection line segment set.
[0046] Step S3, extracting a closed profile contour based on the undirected graph structure, and performing triangulation of the triangular mesh and rendering display.
[0047] As can be seen from the above, the three-dimensional geological profile real-time clipping method disclosed by the present application, on the one hand, through the construction of the BVH tree, the intersection detection of the three-dimensional geological model and the clipping surface can be significantly accelerated. The BVH tree can quickly exclude the regions not intersecting with the clipping surface through hierarchical division of the space, thereby reducing the number of geometric elements that need to be checked. This acceleration effect makes it possible to perform profile analysis of the three-dimensional geological model in real time on the Web side, improving the processing efficiency; secondly, the present application constructs an undirected graph structure based on the projection line segment set, and the structure can accurately represent the connection relationship between the line segments. This structure helps to identify the closed contour, and through the graph traversal algorithm, the closed profile contour can be efficiently extracted, providing accurate basic data for subsequent three-dimensional reconstruction and visualization; finally, the present application transmits the triangular mesh data to the rendering engine, so that high-quality rendering display can be realized on the Web side. Since the BVH tree accelerates the clipping calculation, the user can adjust the position and direction of the profile surface in real time on the Web side, and observe the geological structure of different profiles. This real-time interactivity improves the user experience, making the geological analysis more flexible and efficient.
[0048] In one embodiment, in step S1, the construction of the BVH tree to accelerate the clipping of the three-dimensional geological model and the calculation of the projection of the intersecting line segment on the two-dimensional coordinate system of the clipping surface to obtain the projection line segment set comprises:
[0049] Step S11, obtaining the three-dimensional geological model, and recursively dividing the three-dimensional geological model into a plurality of bounding boxes having a parent-child relationship to form a BVH tree.
[0050] Specifically, in the process of constructing the BVH tree, the recursive division is the core step. Initially, the entire three-dimensional geological model is surrounded by a large bounding box, which is the root node of the BVH tree. Then the large bounding box is recursively divided, where each division generates smaller bounding boxes inside the current bounding box, which become the child bounding boxes of the current bounding box, and the current bounding box becomes the parent bounding box of these child bounding boxes. This parent-child relationship is the basis of the BVH tree structure, which enables efficient traversal and query of the BVH tree.
[0051] In step S12, the clipping plane parameters are obtained, and the clipping surface is determined according to the clipping plane parameters.
[0052] Specifically, the clipping plane parameters include the normal vector of the plane and a point, or use the plane equation (such as Ax+By+Cz+D=0) to represent, where the parameters involved include the four coefficients (A, B, C, D) in the plane equation, or the three components (nx, ny, nz) of the normal vector, and the coordinates of a known point (x0, y0, z0) on the plane. According to these parameters, the specific position and direction of the clipping surface in three-dimensional space can be calculated, so as to determine the clipping surface.
[0053] In step S13, the BVH tree is traversed to determine the triangular mesh elements intersecting with the clipping surface, and the intersection line segments of the triangular mesh elements with respect to the clipping surface are calculated.
[0054] Specifically, after the clipping surface is determined, the BVH tree is traversed, and during the traversal process, the plane intersection test is performed on each traversed bounding box, such as calculating the distance between the extreme points of the bounding box and the clipping surface to determine whether the bounding box intersects with the clipping surface, so as to filter out the triangular mesh elements intersecting with the clipping surface. It should be noted that the triangular mesh element intersects with the clipping surface only when all three of its vertices are not located on the same side of the clipping surface, and the intersection line segments of the triangular mesh element with respect to the clipping surface can be calculated by detecting the intersection points of the edges of the triangular mesh element with the clipping surface (for example, for each edge of the triangular mesh element, if the two vertices of the edge are located on the two sides of the clipping surface, the intersection point of the edge with the clipping surface is calculated). Further, in order to preserve the geometric details after clipping and support subsequent undirected graph construction analysis, the application further records the coordinates of the two end points of each intersection line segment.
[0055] In step S14, each intersection line segment is projected onto the two-dimensional coordinate system in which the clipping surface is located, to obtain a set of projected line segments.
[0056] Specifically, the application takes the clipping plane normal vector as the Z-axis direction to establish a local two-dimensional coordinate system; then, for each end point of the intersecting line segment, an affine transformation matrix is applied to convert it from a three-dimensional space coordinate system to a local two-dimensional coordinate system of the clipping plane; finally, in the two-dimensional coordinate system, the reconnected end point pairs of the transformed line segment form a set of projection line segments represented by two-dimensional end point coordinates (x', y').
[0057] It should be noted that, please refer to Figure 2 (a)-(b), which illustrates the BVH-based spatial partitioning and query process. Specifically, in implementation, the application first constructs a bounding volume hierarchy (BVH) for the input three-dimensional geological model and divides the model into multiple hierarchical bounding boxes to accelerate spatial queries. Further, when the clipping plane is updated, only the triangular elements that are likely to intersect with the clipping plane are selected by traversing the BVH tree, thereby quickly eliminating a large number of irrelevant triangles. Finally, for the selected intersecting triangles, the application calculates the intersection line with the clipping plane, thereby obtaining a set of line segments.
[0058] In one embodiment, in step S2, the undirected graph structure is constructed based on the set of projection line segments, including:
[0059] In step S21, the two end points of each projection line segment are mapped to nodes in the graph, respectively, and the nodes are integrated into a set to obtain a node set.
[0060] Specifically, for all end points in the set of projection line segments, if the Euclidean distance between the coordinates of two end points satisfies a preset threshold, they are considered as the same node. Further, in order to realize node uniqueness management and avoid node redundancy in the graph structure, the application also allocates a globally unique identifier to each unique node to ensure that the node can be efficiently indexed and referenced in graph traversal, path search and other operations; finally, the application also stores the two-dimensional coordinates of the nodes and their associated original three-dimensional end point information to support reverse tracing from the two-dimensional projection result to the original geometric features of the three-dimensional geological model, and to provide a data basis for subsequent topological analysis (such as contour closure detection).
[0061] In step S22, the projection line segment itself is mapped to an undirected edge connecting the two nodes, and each edge is integrated into a set to obtain an edge set.
[0062] Specifically, for each projected line segment, the application creates an undirected edge connecting the corresponding nodes according to the unique identifier of its two end points; for each edge, in order to support subsequent geometric analysis (such as path weight calculation, topological relationship verification), the application adds attribute information, including the original line segment length, associated triangular mesh cell ID, etc.; in one embodiment, in order to eliminate redundant edges in the graph structure and optimize storage efficiency, the application also performs edge consistency detection, and if two edges connect the same node pair and have consistent attributes, they are merged into a single edge.
[0063] Step S23, based on the node set and the edge set, the association between nodes and edges is initialized and established through a graph data structure, and an undirected graph structure is constructed.
[0064] Specifically, the application uses an adjacency list to store the graph structure to adapt to the sparse connection characteristics that may exist in the cutting result of the geological model, significantly reducing memory occupation and improving traversal efficiency; for each node, the application maintains its adjacent edge list and connected node list; for each edge, the application maintains its associated two nodes and adjacent edge list. Further, in order to ensure the topological consistency of the graph structure and support subsequent geometric analysis (such as closed contour extraction), the application also verifies whether there are isolated nodes or hanging edges in the graph to ensure that all edges are connected to two valid nodes and the node degree meets the geometric constraints (such as the contour node degree is 2).
[0065] In one embodiment, in step S3, the closed profile contour is extracted based on the undirected graph structure, and the triangular mesh is divided and rendered, including:
[0066] Step S31, based on a graph traversal algorithm, a closed profile contour is identified from the undirected graph structure.
[0067] Specifically, the application obtains the coordinates (x, y) of each vertex in the graph and a set of adjacent edges. Then, a depth-first search algorithm is used to initialize the traversal state, including creating a set of unvisited edges and including all edges in the graph at the beginning; and selecting an endpoint of an unvisited edge as a starting vertex. Then, starting from the selected starting vertex, the direction vectors of all adjacent edges of the current vertex are calculated in a clockwise or counterclockwise direction; and based on the direction vectors, the relative direction of the adjacent edge is determined by the sign of the vector cross product, thereby selecting the edge with the smallest angle with the initial traversal direction, which can be considered as the legal extension direction of the current traversal path. During the traversal process, the application also continuously detects the contour closure condition, including judging whether the Euclidean distance between the current vertex and the starting point of the path is less than a tolerance threshold, and judging whether the direction of the current edge and the direction of the starting edge of the path can form a continuous loop, when it is determined that the above closure condition is satisfied, it is considered that the current traversal path constitutes a closed profile contour. In this way, all topologically independent closed profile contours in the graph can be recursively identified through the above mechanism.
[0068] Please refer to Figure 2 (c)-(d), which illustrates a set of unordered vertices and their possible connection methods, and the final closed contour can be determined using a graph theory algorithm. In specific implementation, the application projects each determined intersection line segment onto a two-dimensional coordinate system in which the cutting plane is located to construct a graph theory structure. In this structure, the endpoints of each line segment are nodes of the graph, and the line segments themselves are edges between the nodes. In one embodiment, all closed loops in the graph can be identified by a depth-first search or other graph traversal algorithm, wherein each closed path corresponds to a complete profile contour.
[0069] Step S32, for each closed profile contour identified, a Earcut algorithm is used for triangulation to obtain triangular mesh data composed of vertex coordinate arrays, triangular patch index arrays and associated attribute information.
[0070] Step S33, the triangular mesh data is packaged as a geometry object compatible with the rendering engine and transmitted to the rendering engine for rendering and display on the Web.
[0071] Based on steps S32-S33, it needs to be explained that the application constructs a triangular mesh corresponding to the profile contour in real time based on the Earcut algorithm and outputs it as a three-dimensional profile structure. Finally, the obtained profile is rendered and displayed on the Web through shading and texture processing, and finally a complete geological profile image is obtained after texture mapping and lighting rendering processing. For details, please refer to Figure 2(e)-(f), which illustrates a final constructed cross-section schematic diagram, wherein different colored regions represent different geological layers, thereby intuitively presenting the spatial distribution law and contact relationship of the geological body through color difference, providing visual basis for stratigraphic correlation analysis and structural analysis.
[0072] In one of the embodiments, after identifying the closed profile contour in step S31, the method further comprises: based on the comparison result of the Euclidean distance of the head and tail node coordinates and the preset threshold, when it is determined that the head and tail nodes of the contour do not coincide, regarding it as an invalid contour to filter the pseudo-contour caused by projection error.
[0073] In one of the embodiments, after identifying the closed profile contour in step S31, the method further comprises: based on the comparison result of the Euclidean distance of the head and tail nodes and the preset tolerance threshold, when it is determined that the approximate closed contour is identified, performing contour completion based on linear interpolation or geometric center alignment algorithm to repair the slight gap caused by floating-point precision error or geometric symmetry, and ensure the topological integrity of subsequent triangulation and rendering.
[0074] Specifically, the present application is based on dynamic tolerance detection and adaptive completion strategy to implement linear interpolation or geometric center alignment repair on the approximate closed contour. In one of the embodiments, in order to further improve the accuracy and robustness of contour repair, dynamic parameter adjustment and topological verification mechanism can also be combined to eliminate the slight gap and ensure the topological integrity of subsequent processing by dynamically adjusting the number of interpolation points or the alignment strength.
[0075] In one of the embodiments, in step S32, for the contour with holes, when using the Earcut algorithm for triangulation, the method further comprises: automatically identifying the parent-child relationship between the outer contour and the inner contour, i.e. the hole, by the area sign method to construct a topological constraint tree; based on the topological constraint tree, performing Boolean difference operation on the outer contour and the hole to generate an effective triangulation area, and finally generating a triangular mesh conforming to the original polygon nesting relationship.
[0076] In one of the embodiments, in step S33, during the rendering and display on the Web side, the method further comprises: based on the geological attribute data associated with the vertices of the triangular mesh, assigning a unique color value to each profile triangle through a discrete color mapping table; at the same time, superimposing the normal map to enhance the expression of bedding relief, and integrating the WebGL pick-up interaction function, when the cursor hovers over a specific color block, dynamically displaying the stratigraphic thickness, occurrence and contact relationship annotations.
[0077] Please refer to Figure 2The application discloses a three-dimensional geological profile real-time clipping system, which is characterized in that the system comprises a BVH accelerated clipping and projection module, a projection line segment graph structure construction module and a closed contour extraction and surface rendering module.
[0078] The BVH accelerated clipping and projection module is used for constructing BVH tree accelerated three-dimensional geological model clipping and calculating the projection of the intersection line segment on the two-dimensional coordinate system of the clipping surface to obtain a projection line segment set.
[0079] The projection line segment graph structure construction module is used for constructing a directed graph structure based on the projection line segment set.
[0080] The closed contour extraction and surface rendering module is used for extracting a closed profile contour based on the directed graph structure and performing triangular mesh dissection and rendering display.
[0081] In one embodiment, the modules are also used to implement a three-dimensional geological profile real-time clipping method as described in any of the preceding method embodiments, which is not limited in the application.
[0082] As can be seen from the above, the three-dimensional geological profile real-time clipping system disclosed by the application can accelerate the intersection detection of the three-dimensional geological model and the clipping surface by constructing a BVH tree. The BVH tree can quickly exclude the regions that are not intersected with the clipping surface by hierarchical division of the space, thereby reducing the number of geometric elements that need to be checked. This acceleration effect makes it possible to perform three-dimensional geological model section analysis in real time on the Web side, thereby improving the processing efficiency. Secondly, the application constructs a directed graph structure based on the projection line segment set, and the structure can accurately represent the connection relationship between the line segments. This structure helps to identify the closed contour, and through a graph traversal algorithm, the closed profile contour can be efficiently extracted, thereby providing accurate basic data for subsequent three-dimensional reconstruction and visualization. Finally, the triangular mesh data is transmitted to the rendering engine, so that high-quality rendering display can be realized on the Web side. Since the BVH tree accelerates the clipping calculation, the user can adjust the position and direction of the section surface in real time on the Web side and observe the geological structure of different sections. This real-time interactivity improves the user experience and makes the geological analysis more flexible and efficient.
[0083] Further, the application also discloses a computer storage medium for storing computer execution instructions for executing the three-dimensional geological profile real-time clipping method of any of the preceding embodiments.
[0084] As can be seen from the above, the computer storage medium disclosed in the application can accelerate the intersection detection of the three-dimensional geological model and the clipping surface on one hand by constructing the BVH tree. The BVH tree can quickly exclude the regions that are not intersected with the clipping surface by hierarchical division of space, thereby reducing the number of geometric elements that need to be checked. This acceleration effect makes it possible to perform the section analysis of the three-dimensional geological model in real time on the Web side, and improves the processing efficiency. On the other hand, the application constructs the undirected graph structure based on the set of projected line segments, and the structure can accurately represent the connection relationship between the line segments. This structure is helpful to identify the closed contour, and through the graph traversal algorithm, the closed section contour can be efficiently extracted, thereby providing accurate basic data for the subsequent three-dimensional reconstruction and visualization. Finally, the triangular mesh data is transmitted to the rendering engine, so that high-quality rendering display can be realized on the Web side. Since the BVH tree accelerates the clipping calculation, the user can adjust the position and direction of the section surface in real time on the Web side, and observe the geological structure of different sections. This real-time interactivity improves the user experience, and makes the geological analysis more flexible and efficient.
[0085] It should be noted that the above-mentioned sequence of the embodiments of the application is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are also possible or can be advantageous.
[0086] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment mainly describes the differences from other embodiments.
Claims
1. A real-time clipping method for a three-dimensional geological profile, characterized in that: The method comprises: S1. Construct a BVH tree to accelerate the clipping of the 3D geological model and calculate the projection of the intersecting line segments on the 2D coordinate system of the clipping surface to obtain a set of projected line segments; S2. constructing an undirected graph structure based on the set of projection line segments; S3. Extracting the closed cross-section contour based on the undirected graph structure, dividing the triangle mesh, and rendering and displaying the result.
2. The method according to claim 1, characterized in that In step S1, the BVH tree is constructed to accelerate the clipping of the three-dimensional geological model, and the projection of the intersecting line segments on the two-dimensional coordinate system of the clipping surface is calculated to obtain a set of projected line segments, including: S11, obtaining a three-dimensional geological model, and recursively dividing the three-dimensional geological model into a plurality of bounding boxes having a parent-child relationship to form a BVH tree; S12, obtaining clipping plane parameters, and determining a clipping plane according to the clipping plane parameters; S13. Traverse the BVH tree to determine the triangular mesh units intersecting with the clipping plane, and calculate the intersecting line segments of the triangular mesh units relative to the clipping plane; S14. Projecting each of the intersecting line segments into the two-dimensional coordinate system where the clipping plane is located to obtain a set of projected line segments.
3. The method according to claim 1, characterized in that In step S2, constructing an undirected graph structure based on the projected line segment set includes: S21. Map the two endpoints of each projected line segment to nodes in the graph, and integrate the nodes into a set to obtain a node set; S22. Map the projected line segment itself into an undirected edge connecting the two nodes, and integrate the edges into a set to obtain an edge set; S23. Based on the node set and the edge set, initialize the graph data structure and establish the association between nodes and edges to construct an undirected graph structure.
4. The method according to claim 1, wherein In step S3, the extraction of closed cross-section contours based on the undirected graph structure, the segmentation of triangular meshes, and the rendering and display include: S31. Identifying a closed cross-section outline from the undirected graph structure based on a graph traversal algorithm; S32. For each identified closed cross-section contour, triangulate it using the Earcut algorithm to obtain triangular mesh data consisting of a vertex coordinate array, a triangle patch index array, and associated attribute information; S33: Encapsulate the triangular mesh data into a geometric object compatible with a rendering engine and transmit the object to the rendering engine for rendering and display on a Web terminal.
5. The method according to claim 4, characterized in that In step S31, after the closed profile contour is identified, the method further includes: based on the comparison result of the Euclidean distance of the first and last node coordinates with a preset threshold, when it is determined that the first and last nodes of the contour do not overlap, it is regarded as an invalid contour to filter out pseudo contours caused by projection errors.
6. The method according to claim 4, characterized in that In step S31, after the closed profile contour is identified, the method further includes: based on the comparison result of the Euclidean distance between the first and last nodes and the preset tolerance threshold, when it is determined that an approximate closed contour is identified, contour completion is performed based on linear interpolation or geometric center alignment algorithm to repair tiny gaps caused by floating-point precision errors or geometric symmetry, thereby ensuring the topological integrity of subsequent triangulation and rendering.
7. The method according to claim 4, characterized in that In step S32, for a contour with holes, when using the Earcut algorithm for triangulation, the method further includes: automatically identifying the parent-child relationship between the outer contour and the inner contour, i.e., the hole, through the area symbol method to construct a topological constraint tree; based on the topological constraint tree, performing a Boolean difference operation on the outer contour and the hole to generate a valid triangulation area, and finally generating a triangular mesh that conforms to the nested relationship of the original polygons.
8. The method according to claim 4, characterized in that In step S33, during the rendering and display process on the Web side, the method also includes: assigning a unique color value to each profile triangle through a discrete color mapping table based on the geological attribute data associated with the triangular mesh vertices; at the same time, superimposing a normal map to enhance the bedding undulation performance, and integrating the WebGL picking interaction function, and dynamically displaying the stratum thickness, occurrence and contact relationship annotations when the cursor hovers over a specific color block.
9. A three-dimensional geological profile real-time clipping system, characterized in that: The system includes a BVH accelerated clipping and projection module, a projection line segment graph structure construction module, and a closed contour extraction and rendering module, wherein: The BVH accelerated clipping and projection module is used to construct a BVH tree to accelerate the clipping of the three-dimensional geological model, and calculate the projection of the intersecting line segments in the two-dimensional coordinate system of the clipping surface to obtain a set of projection line segments; The projected line segment graph structure construction module is used to construct an undirected graph structure based on the projected line segment set; The closed contour extraction and rendering module is used to extract the closed cross-section contour based on the undirected graph structure, divide it into triangular meshes, and perform rendering and display.
10. A computer storage medium, characterized in that The computer storage medium is used to store computer-executable instructions, and the computer-executable instructions are used to execute the three-dimensional geological profile real-time clipping method according to any one of claims 1 to 8.
Citation Information
Cited By
Projection method and device of three-dimensional grid model, equipment and storage medium
CN121357314A