Roadway lithology division and stratum excavation method based on Boolean operation and related equipment

By pruning the 3D geological model and extracting intersection loops, classifying triangular patches and performing Boolean operations, the problem of Boolean operation errors in 3D geological modeling was solved, improving computational efficiency and accuracy, and enabling accurate guidance for tunnel lithology classification and stratum excavation.

CN118521724BActive Publication Date: 2026-04-28INNER MONGOLIA RESEARCH INSTITUTE CHINA UNIVERSITY OF MINING AND TECHNOLOGY (BEIJING) +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INNER MONGOLIA RESEARCH INSTITUTE CHINA UNIVERSITY OF MINING AND TECHNOLOGY (BEIJING)
Filing Date
2024-04-26
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

In 3D geological modeling, natural phenomena such as faults and collapse columns increase the complexity of the model, making Boolean operations prone to errors and affecting the accuracy and guidance of tunnel lithology classification and stratum excavation.

Method used

By reading the model data structure of the three-dimensional geological model, model pruning and collision detection are performed, intersection loops are extracted, triangular facets are classified, and Boolean operations are performed to obtain high-precision Boolean intersection, union, and difference results, which guide the lithological classification of tunnels and stratigraphic excavation.

Benefits of technology

It improves the computational efficiency and accuracy of Boolean operations, realizes the visualization of lithological classification on the surface of three-dimensional tunnels, and provides a reliable basis for tunnel support design and construction guidance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118521724B_ABST
    Figure CN118521724B_ABST
Patent Text Reader

Abstract

The application provides a roadway lithology division and stratum excavation method based on Boolean operation and related equipment, which can screen out a large number of non-intersecting triangular facets through model pruning, reduce the calculation amount of Boolean operation, and improve the calculation efficiency. A series of intersection line segments obtained through intersection test are regularly paired into intersection line rings to avoid the problem that the intersection line segments cannot be merged, and further avoid the problems that gaps and overlaps are prone to occur when the model is reconstructed, thereby improving the Boolean calculation accuracy. According to the stratum lithology, the high-precision Boolean intersection result, Boolean union result and Boolean difference set result in the three-dimensional geological model are used for lithology division of the three-dimensional roadway and setting of corresponding colors, three-dimensional roadway surface lithology division and visualization are realized, and a foundation is laid for auxiliary roadway support design, risk assessment and construction guidance; the Boolean difference set result of the stratum in the region can also be used to guide the excavation of the stratum.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method and related equipment for roadway lithology classification and stratum excavation based on Boolean operations. Background Technology

[0002] With the rapid development of 3D geological modeling technology, its application in the field of digital mining has become more widespread. Boolean operations between models are one of the key steps in 3D geological modeling. However, in the field of 3D geological modeling, natural phenomena such as faults and collapse columns increase the complexity of the models, and Boolean operations between large-scale and structurally complex 3D geological models are prone to errors. Summary of the Invention

[0003] In view of this, the purpose of this application is to propose a method and related equipment for roadway lithology classification and stratum excavation based on Boolean operations, which can be used to realize the visualization of three-dimensional geological models and lay the foundation for auxiliary roadway support design, risk assessment and construction guidance.

[0004] To achieve the above objectives, the first aspect of this application provides a method for roadway lithology classification and stratigraphic excavation based on Boolean operations, comprising:

[0005] Read the 3D geological model to obtain the model topology of the model data structure;

[0006] Based on the model data structure, collision detection is used to prune the three-dimensional geological model to obtain a lightweight model.

[0007] Based on the model topology, the lightweight model is subjected to intersection testing to extract intersection loops, resulting in at least one intersection loop. Target triangular faces that intersect with the intersection loop and ordinary triangular faces that do not intersect with the intersection loop are then identified in the lightweight model.

[0008] The model is reconstructed based on the target triangular facet to obtain a reconstructed model including multiple reconstructed triangular facets; wherein, the reconstructed triangular facets include internal reconstructed triangular facets and external reconstructed triangular facets;

[0009] The ordinary triangular facets are classified according to the intersection loop to obtain inner and outer ordinary triangular facets. The facets are then merged and recombined according to Boolean operation formulas to obtain Boolean intersection, Boolean union, and Boolean difference results.

[0010] Based on the lithology of the strata, the Boolean intersection results, Boolean union results, and Boolean difference results in the three-dimensional geological model are labeled respectively to obtain a guiding model for guiding the lithology division of tunnels and stratum excavation.

[0011] The second aspect of this application provides a tunnel lithology classification and stratigraphic excavation device based on Boolean operations, comprising:

[0012] The model reading module is configured to read the three-dimensional geological model and obtain the model topology of the model data structure;

[0013] The model pruning module is configured to: prune the three-dimensional geological model based on the model data structure and through collision detection to obtain a lightweight model;

[0014] The intersection loop extraction module is configured to: extract intersection loops from the lightweight model based on the model topology through an intersection test to obtain at least one intersection loop, and identify target triangular facets that intersect with the intersection loop and ordinary triangular facets that do not intersect with the intersection loop in the lightweight model;

[0015] The model reconstruction module is configured to: reconstruct the model based on the target triangular facet to obtain a reconstructed model including multiple reconstructed triangular facets; wherein the reconstructed triangular facets include internal reconstructed triangular facets and external reconstructed triangular facets;

[0016] The classification and merging module is configured to: classify the ordinary triangular facets according to the intersection loop to obtain inner ordinary triangular facets and outer ordinary triangular facets, and merge and reorganize the facets according to Boolean operation formulas to obtain Boolean intersection result, Boolean union result and Boolean difference result;

[0017] The segmentation and excavation module is configured to: label the Boolean intersection results, Boolean union results, and Boolean difference results in the three-dimensional geological model according to the lithology of the strata, so as to obtain a guiding model for guiding the lithology segmentation and stratum excavation of the tunnel.

[0018] A third aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method provided in the first aspect of this application.

[0019] A fourth aspect of this application provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method provided in the first aspect of this application.

[0020] As can be seen from the above, the method and related equipment for roadway lithology classification and stratigraphic excavation based on Boolean operations provided in this application can read a three-dimensional geological model and obtain the model topology of the model data structure; based on the model data structure, the three-dimensional geological model is pruned through collision detection to obtain a lightweight model; based on the model topology, the lightweight model is subjected to intersection loop extraction through intersection testing to obtain at least one intersection loop, and the target triangular facets intersecting with the intersection loops and ordinary triangular facets not intersecting with the intersection loops are identified in the lightweight model; the model is reconstructed based on the target triangular facets. The process yields a reconstructed model comprising multiple reconstructed triangular facets, including internal and external facets. Ordinary triangular facets are classified according to intersection loops, resulting in internal and external ordinary triangular facets. Boolean operations are then used to merge and reassemble these facets, producing Boolean intersection, union, and difference results. These results are then labeled according to the stratigraphic lithology, creating a guiding model for lithological classification and excavation of tunnels. Model pruning removes a large number of non-intersecting triangular facets, reducing the computational load of Boolean operations and improving efficiency. A series of intersection segments obtained through intersection testing are paired into intersection loops according to a set pattern, preventing the inability to merge intersection segments and thus avoiding gaps and overlaps during model reconstruction, thereby improving the accuracy of Boolean calculations. Based on the lithology of the strata, the high-precision Boolean intersection, Boolean union, and Boolean difference results in the 3D geological model are used to classify the lithology of the 3D tunnel and set corresponding colors, realizing the lithology classification and visualization of the 3D tunnel surface. This lays the foundation for assisting tunnel support design, risk assessment, and construction guidance. Furthermore, the Boolean difference results of the strata in the region can be used to guide the excavation of the strata. Attached Figure Description

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

[0022] Figure 1 This is a flowchart illustrating the Boolean operation-based method for tunnel lithology classification and stratigraphic excavation in an embodiment of this application.

[0023] Figure 2 This is a flowchart illustrating the specific Boolean operations in an embodiment of this application.

[0024] Figure 3 This is a flowchart illustrating the process of reading a three-dimensional geological model in an embodiment of this application.

[0025] Figure 4 A flowchart illustrating the pruning process for the model in the embodiments of this application;

[0026] Figure 5a This is a schematic diagram of a three-dimensional model of the strata and tunnels in an embodiment of this application;

[0027] Figure 5b This is a schematic diagram of the AABB enclosure box of the strata and tunnels in an embodiment of this application;

[0028] Figure 5c This is a schematic diagram of the collision detection area in an embodiment of this application;

[0029] Figure 5d This is a schematic diagram of an AABB tree according to an embodiment of this application;

[0030] Figure 5e This is a schematic diagram of the hierarchical bounding box tree in an embodiment of this application;

[0031] Figure 6 This is a flowchart illustrating the extraction of intersection loops in an embodiment of this application;

[0032] Figure 7a This is a schematic diagram of a triangle intersection test according to an embodiment of this application;

[0033] Figure 7b This is a schematic diagram of the pairing of intersecting line segments in an embodiment of this application;

[0034] Figure 8a This is a schematic diagram of the top surface of the model in an embodiment of this application;

[0035] Figure 8b This is a schematic diagram of the bottom surface of the model in an embodiment of this application;

[0036] Figure 9a This is a schematic diagram of the intersection loop 1 in an embodiment of this application;

[0037] Figure 9b This is a schematic diagram of the intersection loop 2 in an embodiment of this application;

[0038] Figure 9c This is a schematic diagram of the intersection loop 3 in an embodiment of this application;

[0039] Figure 9d This is a schematic diagram of the overall intersection loop in an embodiment of this application;

[0040] Figure 10 This is a flowchart illustrating the model reconstruction of an embodiment of this application;

[0041] Figure 11a This is a schematic diagram illustrating how a triangular facet is cut into multiple polygons according to an embodiment of this application;

[0042] Figure 11bThis is a schematic diagram of polygon extraction in an embodiment of this application;

[0043] Figure 11c This is a schematic diagram illustrating the polygonal region division in an embodiment of this application;

[0044] Figure 12 This is a flowchart illustrating the classification of triangular facets in an embodiment of this application;

[0045] Figure 13a This is a schematic diagram of the external ordinary triangular facet in an embodiment of this application;

[0046] Figure 13b This is a schematic diagram of a common triangular facet within an embodiment of this application;

[0047] Figure 13c This is a schematic diagram of all the internal ordinary triangular faces of the tunnel model in the embodiments of this application;

[0048] Figure 14 This is a flowchart illustrating the merging and recombination of facets in an embodiment of this application;

[0049] Figure 15a This is a schematic diagram of the internal reconstruction of the triangular facets in an embodiment of this application;

[0050] Figure 15b This is a schematic diagram of the Boolean intersection result of an embodiment of this application;

[0051] Figure 15c This is a schematic diagram of the Boolean union result of an embodiment of this application;

[0052] Figure 15d This is a schematic diagram of the Boolean difference set results in an embodiment of this application;

[0053] Figure 16a This is a schematic diagram of the intersection of the tunnel and the aquifer in an embodiment of this application;

[0054] Figure 16b This is a partially enlarged schematic diagram of the intersection between the tunnel and the aquifer in an embodiment of this application;

[0055] Figure 16c This is a schematic diagram of the Boolean intersection result of the tunnel and the aquifer in an embodiment of this application;

[0056] Figure 17a This is a schematic diagram of the intersection of the tunnel and the waterproof layer in an embodiment of this application;

[0057] Figure 17b This is a partially enlarged schematic diagram of the intersection 1 between the tunnel and the waterproof layer in an embodiment of this application;

[0058] Figure 17c This is a schematic diagram of the Boolean operation intersection result of the intersection point 1 where the tunnel and the waterproof layer intersect in an embodiment of this application;

[0059] Figure 17d This is an enlarged schematic diagram of the Boolean intersection result 1 at the intersection point 1 in the embodiments of this application;

[0060] Figure 17e This is an enlarged schematic diagram of the Boolean intersection result 2 at intersection 1 in the embodiments of this application;

[0061] Figure 17f This is a partially enlarged schematic diagram of the intersection 2 between the tunnel and the waterproof layer in an embodiment of this application;

[0062] Figure 17g This is a schematic diagram of the Boolean operation intersection result of the intersection point 2 where the tunnel and the waterproof layer intersect in an embodiment of this application;

[0063] Figure 17h This is an enlarged schematic diagram of the Boolean intersection result 1 at intersection 2 in the embodiments of this application;

[0064] Figure 17i This is an enlarged schematic diagram of the Boolean intersection result 2 at intersection point 2 in the embodiments of this application;

[0065] Figure 18a This is a schematic diagram illustrating the intersection of a coal seam and a roadway in an embodiment of this application.

[0066] Figure 18b This is an enlarged schematic diagram of the intersection 3 of the coal seam and the roadway in an embodiment of this application;

[0067] Figure 18c This is a schematic diagram of the Boolean intersection result at the intersection of the roadway and the coal seam in an embodiment of this application;

[0068] Figure 18d This is an enlarged schematic diagram of the Boolean intersection result 1 at intersection point 3 in the embodiments of this application;

[0069] Figure 18e This is an enlarged schematic diagram of the Boolean intersection result 2 at intersection 3 in the embodiments of this application;

[0070] Figure 19a This is a diagram showing the overall results of the Boolean intersection operation in the embodiments of this application.

[0071] Figure 19b Examples of this application Figure 19a A magnified view of the result at point A;

[0072] Figure 19c Examples of this application Figure 19a A magnified view of the result at point B;

[0073] Figure 19d Examples of this application Figure 19b A magnified view of the details at point C;

[0074] Figure 20a This is a schematic diagram of the target stratum and a cylindrical excavation model according to an embodiment of this application;

[0075] Figure 20b This is a partially enlarged schematic diagram of the excavation location of the cylindrical tunnel stratum in an embodiment of this application;

[0076] Figure 20c This is a schematic diagram of the target stratum and the irregular hexahedral excavation model in an embodiment of this application;

[0077] Figure 20d This is a partially enlarged schematic diagram of the excavation location of the irregular hexagonal tunnel stratum in an embodiment of this application;

[0078] Figure 21 This is a schematic diagram of the structure of the tunnel lithology division and stratum excavation device based on Boolean operations, as described in this application.

[0079] Figure 22 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0080] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.

[0081] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this application should have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms "first," "second," and similar terms used in the embodiments of this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are only used to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0082] In this article, it is important to understand that any number of elements in the accompanying figures is for illustrative purposes and not for limitation, and any naming is for distinction only and has no limiting meaning.

[0083] Based on the above background description, the following situations also exist in the related technologies:

[0084] In the field of 3D geological modeling, natural phenomena such as faults and collapse columns increase the complexity of models. Boolean operations between large-scale, complex 3D geological models are prone to errors. Related Boolean operation algorithms mainly consist of three steps: intersection loop extraction, model reconstruction, and model classification and merging. Intersection loop extraction requires connecting discrete intersection pairs sequentially to form intersection loops. Related technologies use a preset distance threshold to merge the endpoints of the nearest intersection segments, ultimately completing the intersection loop extraction. However, when the distance threshold is set improperly, two points that should be merged may fail to merge, leading to intersection loop extraction failure. This, in turn, can cause gaps and overlaps when reconstructing complex 3D geological models, resulting in significant errors in the final Boolean operation results. Consequently, the guidance effect for tunnel lithology classification and stratigraphic excavation is poor, leading to significant losses during construction.

[0085] This application provides a method and related equipment for roadway lithology classification and stratigraphic excavation based on Boolean operations. The method can read a three-dimensional geological model to obtain its topological structure. Based on the model data structure, collision detection is used to prune the three-dimensional geological model, resulting in a lightweight model. Based on the model topology, intersection testing is used to extract intersection loops from the lightweight model, obtaining at least one intersection loop. Target triangular faces intersecting with the intersection loop and ordinary triangular faces not intersecting with the intersection loop are identified in the lightweight model. The model is then reconstructed based on the target triangular faces to obtain a... This model comprises multiple reconstructed triangular facets, including internal and external reconstructed triangular facets. Ordinary triangular facets are classified according to intersection loops, resulting in internal and external ordinary triangular facets. Boolean operations are then used to merge and reassemble these facets, yielding Boolean intersection, union, and difference results. These results are then labeled according to the stratigraphic lithology, providing a guiding model for lithological classification and stratigraphic excavation in tunnels. Model pruning removes a large number of non-intersecting triangular facets, reducing the computational load of Boolean operations and improving efficiency. A series of intersection segments obtained through intersection testing are paired into intersection loops according to a set pattern, avoiding the problem of unmerged intersection segments and thus preventing gaps and overlaps during model reconstruction, thereby improving the accuracy of Boolean calculations. Based on the lithology of the strata, the high-precision Boolean intersection, Boolean union, and Boolean difference results in the 3D geological model are used to classify the lithology of the 3D tunnel and set corresponding colors, realizing the lithology classification and visualization of the 3D tunnel surface. This lays the foundation for assisting tunnel support design, risk assessment, and construction guidance. Furthermore, the Boolean difference results of the strata in the region can be used to guide the excavation of the strata.

[0086] The following describes, with reference to the accompanying drawings, a Boolean-based method for tunnel lithology classification and stratum excavation according to an exemplary embodiment of this application.

[0087] In some embodiments, such as Figure 1 As shown, a method for roadway lithology classification and stratigraphic excavation based on Boolean operations includes:

[0088] Step 101: Read the three-dimensional geological model to obtain the model topology of the model data structure.

[0089] In specific implementation, such as Figure 2 As shown, the first step is to collect the address information of the construction location, then construct the corresponding 3D address model, and store the 3D geological model in the required file format, such as an OFF file. The first step in performing Boolean operations is to read the 3D geological model and obtain the corresponding model topology structure. Based on the model information of the 3D geological model, three basic data structures are established: a vertex data structure (Point), an edge data structure (Edge), and a face data structure (Triangle). The Point class contains attributes such as the vertex's x, y, z coordinates and its vertex identifier (id); the Edge class contains attributes such as the vertex's ID, the starting vertex (startPoint), the ending vertex (endPoint), and the triangle (adjacent triangles); the Triangle class contains attributes such as the face identifier, the three vertices and three edges of the triangle, and the adjacent triangles. Arrays `points`, `edges`, and `triangles` are defined to store the model's vertices, edges, and triangles. The model data structure includes `points`, `edges`, and `triangles`. The topological relationships between `points`, `edges`, and `triangles` constitute the model topology structure.

[0090] Step 102: Based on the model data structure, perform model pruning on the 3D geological model through collision detection to obtain a lightweight model.

[0091] In specific implementation, such as Figure 2 As shown, after obtaining the model topology of the model data structure, pre-detection is performed by constructing AABB bounding boxes to determine the collision detection region for Boolean operations; a hierarchical bounding box tree is then constructed for collision detection to filter out a large number of non-intersecting triangular faces, thus achieving model pruning. It can be seen that model pruning can be achieved through collision detection algorithms, where the collision detection process includes three steps: ① bounding box pre-detection, ② bounding box tree construction, and ③ bounding box tree traversal.

[0092] Step 103: Based on the model topology, perform intersection loop extraction on the lightweight model through intersection testing to obtain at least one intersection loop, and identify the target triangular facets that intersect with the intersection loop and the ordinary triangular facets that do not intersect with the intersection loop in the lightweight model.

[0093] In practice, Boolean operations include a preparation phase and a calculation phase, such as... Figure 2 As shown, after model pruning, the preparation stage for Boolean operations is complete, and the first stage of the Boolean operation calculation stage begins: the intersection loop extraction stage. In this stage, a large number of non-intersecting triangular faces (also called triangles) in the model are removed through pruning, retaining potentially intersecting triangular faces for intersection testing. The series of intersection segments obtained after the intersection test are paired according to a pattern to form intersection loops, thus extracting the intersection loops. The triangular faces traversed by these intersection loops are recorded for subsequent model reconstruction, model classification, and merging.

[0094] Step 104: Reconstruct the model based on the target triangular facets to obtain a reconstructed model that includes multiple reconstructed triangular facets; wherein, the reconstructed triangular facets include internal reconstructed triangular facets and external reconstructed triangular facets.

[0095] In specific implementation, such as Figure 2 As shown, after the intersection loop extraction is completed, the second stage of the calculation phase begins: the model reconstruction stage. In this stage, the triangular faces traversed by the intersection loop form a series of polygons. Model reconstruction is then performed using polygon extraction algorithms, polygon region partitioning, and polygon triangulation to obtain the corresponding reconstructed model. Specifically, during polygon region partitioning, internal and external polygon regions are defined. The reconstructed triangular faces obtained by triangulating the internal polygon regions are called internal heavy triangular faces, and the reconstructed triangular faces obtained by triangulating the external polygon regions are called external heavy triangular faces.

[0096] Step 105: Classify the ordinary triangular facets according to the intersection loop to obtain the inner ordinary triangular facets and the outer ordinary triangular facets. Then, merge and reorganize the facets according to the Boolean operation formula to obtain the Boolean intersection result, Boolean union result, and Boolean difference result.

[0097] In specific implementation, such as Figure 2As shown, after model reconstruction is completed, the third stage of the computation phase begins: triangle classification and merging. In this stage, the objects of triangle classification are ordinary triangular faces that have not passed through the intersection loop. A breadth-first search (BFS) algorithm is used to quickly classify the ordinary triangular faces into internal and external types, resulting in internal and external ordinary triangular faces. The model merging process requires merging and recombining faces according to Boolean operation formulas to achieve the intersection, union, and difference of the models, corresponding to Boolean intersection, Boolean union, and Boolean difference results, respectively. The merged and recombined faces include internal ordinary triangular faces, external ordinary triangular faces, internal reconstructed triangular faces, and external reconstructed triangular faces.

[0098] Step 106: Based on the lithology of the strata, the Boolean intersection, Boolean union, and Boolean difference results in the three-dimensional geological model are labeled to obtain a guiding model for guiding the lithology division of tunnels and stratum excavation.

[0099] In practical implementation, for the scenario of roadway lithology classification, the 3D roadway can be classified according to different strata lithologies and corresponding colors can be set to achieve lithology classification and visualization on the 3D roadway surface, laying the foundation for assisting roadway support design, risk assessment, and construction guidance. For the scenario of stratum excavation, Boolean difference operation (i.e., calculating the Boolean difference set result) is used as the basis for excavating a certain stratum in the mining area to obtain information such as the exposed stratum structure and cavity shape after excavation.

[0100] In summary, the Boolean operation-based tunnel lithology classification and stratum excavation method provided in this application can reduce the computational load of Boolean operations and improve computational efficiency by pruning and filtering out a large number of non-intersecting triangular facets. A series of intersection segments obtained through intersection testing are paired into line loops according to a set pattern, avoiding the problem of unmerged intersection segments. This avoids gaps and overlaps that easily occur during model reconstruction, improving the accuracy of Boolean calculations. Based on the stratum lithology, the high-precision Boolean intersection, union, and difference results in the 3D geological model are used to classify the lithology of the 3D tunnel and set corresponding colors, realizing the lithology classification and visualization of the 3D tunnel surface. This lays the foundation for assisting tunnel support design, risk assessment, and construction guidance; the Boolean difference results of the strata within the region can also be used to guide the excavation of the strata.

[0101] In some embodiments, such as Figure 3 As shown, the model data structure includes vertex data structure, face data structure, and edge data structure; by reading the 3D geological model, the model topology of the model data structure is obtained, including:

[0102] Step 301: Read the OFF file corresponding to the 3D geological model according to the preset reading start position to obtain multiple vertices, assign a unique vertex identification code to each vertex, and store the vertex and its corresponding vertex identification code in the vertex data structure.

[0103] In practice, the first step in reading the model is as follows: Based on the format of the OFF file corresponding to the 3D geological model, starting from the third line, read the x, y, and z values ​​of the vertices and assign a vertex identification code id attribute to each vertex. Finally, add this vertex to the array points. The second step is to read the vertices in the OFF file sequentially and perform the operations in the first step until all vertices in the OFF file have been added to the array points. The resulting array points is the vertex data structure.

[0104] Step 302: In response to the fact that the vertex data structure stores all the vertices in the OFF file, read the triangles in the OFF file, assign a unique face identification code to each triangle, and store the triangle and its corresponding face identification code in the face data structure.

[0105] Step 303: Read the vertices of the triangular facet according to the preset reading direction, construct the three edges of the triangular facet according to the reading direction and the vertices, assign an edge index number to each edge, and store the edge and its corresponding edge index number in the edge data structure.

[0106] In practice, after the vertex data is read, the third step of reading the model is performed: Next, the triangular facet information in the OFF file is read. When the first character of a line is "3", it indicates that this line records triangular facet information. The current triangular facet Ti (i is the facet index number of this triangular facet) is taken, and the three vertex indices of triangular facet Ti are V1, V2, and V3. First, the indices of the three vertices are read counter-clockwise, and the facet identification code id attribute is assigned to this triangular facet.

[0107] Then, based on the pairwise connections between the three vertices, V1 and V2, V2 and V3, and V3 and V1 construct the three edges Edge1, Edge2, and Edge3 (edge ​​indices) of the triangular facet. Subsequently, the index i of this triangular facet is added to the adjacent triangular facet array of each edge to construct the adjacent triangular facets of each edge. When all three edges are constructed, the adjacent facet domain of this triangular facet is obtained based on the relationship between the adjacent triangular facets in the edge.

[0108] Finally, the triangular face Ti is added to the array triangles, and the three edges Edge1, Edge2, and Edge3 are added to the array edges, thus realizing the reading of a face and its corresponding edges.

[0109] Following the steps in step three, until all triangles in the OFF file have been read, the reading of faces and edges has been completed, resulting in edge data structures and face data structures.

[0110] Step 304: Construct the model topology by connecting the vertices, edges, and triangular faces.

[0111] In specific implementation, the connection relationships between vertices, edges, and triangular faces include: there are corresponding connection relationships between vertices, there are corresponding connection relationships between edges, there are connection relationships between triangular faces, vertices exist at both ends of an edge, and three edges form a triangular face, etc. The corresponding model topology is constructed based on these connection relationships.

[0112] By reading the model, the parameters and topology required for the subsequent Boolean calculation stage are determined, providing a foundation for the subsequent calculation. This process involves reading the model to obtain the input data.

[0113] In some embodiments, such as Figure 4 As shown, based on the model data structure, collision detection is used to prune the 3D geological model, resulting in a lightweight model, including:

[0114] Step 401: Pre-detect the collision detection region for Boolean operations by using bounding boxes constructed based on the model data structure.

[0115] In practice, during the model pruning process, bounding box pre-detection is first required. The pre-detection formula is as follows:

[0116]

[0117] Where U represents the collision detection region, indicating the intersection region of the AABB bounding boxes of the two models, P is a point in region U, A and B represent the bounding boxes of the two models respectively, Vx is the intersection of the bounding boxes A and B on the x-axis, Vy is the intersection of the bounding boxes A and B on the y-axis, and Vz is the intersection of the bounding boxes A and B on the z-axis. Figure 5a As shown, taking a 3D geological model as an example, which represents a partial stratum and tunnel 3D theoretical model, the two models are the stratum model and the tunnel model, respectively. The AABB bounding boxes of the two models are as follows: Figure 5b As shown. Figure 5c As shown, the yellow bounding box is the intersection region of the AABB bounding boxes of the two models, which is also the collision detection region used for Boolean operations.

[0118] Step 402: Construct hierarchical bounding box trees corresponding to different sub-models in the 3D geological model within the collision detection area.

[0119] In practice, after the bounding box pre-detection is completed, a bounding box tree is constructed. Since collisions between the two models can only occur within the collision detection region corresponding to the yellow bounding box, the algorithm for constructing the bounding box trees for each model is as follows:

[0120] Input: root node.

[0121] Output: bounding box tree rootTree.

[0122] Step 1: Initialize the left and right subsets. Create two empty sets, leftTriangles and rightTriangles, to store the segmented triangular faces.

[0123] Step 2: Determine the dividing plane. First, calculate the dimensions of the bounding box on the three coordinate axes: dx, dy, and dz. Then, compare these three dimensions and determine the coordinate axis corresponding to the largest dimension. Traverse all triangular faces in the current node and calculate the average coordinate value val of their common center point on the axis.

[0124] Step 3: Segment the triangles. Iterate through all triangles in the current node, calculate the coordinates of the center point of each triangle on the axis, pval, and compare pval with val. If pval ≤ val, add the current triangle to the leftTriangles set; if pval > val, add the current triangle to the rightTriangles set.

[0125] Step 4: Update the left and right child bounding boxes. Initialize leftBox and rightBox. Update the left child bounding box leftBox based on the triangles in the leftTriangles subset, and update the right child bounding box rightBox based on the triangles in the rightTriangles subset.

[0126] Step 5: Create left and right child nodes and recursively call the function. Create the left and right child nodes of the root node using the updated left and right bounding boxes and the corresponding set of triangles. If the number of triangles in the current node exceeds a threshold (e.g., 100), and the number of triangles in the subset is not equal to the number of triangles in the current node (indicating that a partition has indeed occurred), then recursively call the function on the left and right child nodes to determine the next level of child nodes, until the number of triangles equals the number of child nodes, at which point the recursion stops.

[0127] For example, such as Figure 5dAs shown, the AABB tree is a binary tree. The face includes face A, face B, and face C, for a total of three faces. The root node has two child nodes: the right child corresponding to face C and the left child corresponding to face A and face B. At this point, there are 2 child nodes and 3 faces. The number of child nodes is not equal to the number of faces, so the recursion continues. The left child node is divided into an intermediate node. The left child node of this intermediate node corresponds to face A, and the right child node corresponds to face B. At this point, the number of child nodes is equal to the number of faces, which is 3. The recursion stops.

[0128] like Figure 5e As shown, the bounding box tree of the stratum model and the bounding box tree of the tunnel model each correspond to a hierarchical bounding box. The yellow part represents the hierarchical bounding box of the tunnel model, and the red part represents the hierarchical bounding box of the bottom layer model.

[0129] Step 403: Perform collision detection based on the hierarchical bounding box tree, and remove non-intersecting triangular faces from the detection results to obtain the lightweight model after model pruning.

[0130] In practice, after constructing the bounding box tree, a bounding box tree traversal is performed. In the bounding box tree, the root node stores the model's largest bounding box and the set of all triangles. Each other node stores bounding boxes and triangles that are subsets of the root node's set. By traversing the bounding box tree, we can determine which triangle pairs intersect between the two models. This process is a recursive double traversal: First, the root node of one model's bounding box tree is used to traverse the bounding box tree of the other model. If a leaf node is reached, that leaf node is used to traverse the bounding box tree of the first model. If a leaf node is reached, the triangles contained in the two leaf nodes are further tested for intersection. During this process, if the bounding boxes of two nodes intersect, further intersection tests on their contained triangles are required. If the bounding boxes of two nodes do not intersect, it can be determined that their contained triangles also do not intersect, therefore no further intersection tests are needed.

[0131] The specific algorithm is as follows:

[0132] Step 1: Input the bounding box trees of the two models, nodeTree1 and nodeTree2.

[0133] Step 2: Determine whether the bounding boxes of the two nodes intersect. If they do not intersect, no collision has occurred. If they intersect, proceed to step 3.

[0134] Step 3: Determine whether the two nodes are both leaf nodes. If they are both leaf nodes, then perform an exact intersection calculation on the triangles contained in the two leaf nodes.

[0135] Step 4: If the first node is a leaf node and the second node is an internal node, take the left and right child nodes of the first and second nodes as the current nodes respectively, and jump to step 2.

[0136] Step 5: If the first node is an internal node and the second node is a leaf node, take the left and right child nodes of the first node and the second node as the current node, and jump to step 2.

[0137] Step 6: If all current nodes are internal nodes, perform the following operations:

[0138] ①: Take the first node and the left child of the second node as the current node, and jump to the second step.

[0139] ②: Take the first node and the right child of the second node as the current node, and jump to the second step.

[0140] ③: Take the left child of the first node and the second node as the current node, and jump to the second step.

[0141] ④: Take the right child of the first node and the second node as the current node, and jump to the second step.

[0142] After traversing the bounding box tree, intersecting and non-intersecting triangular faces can be identified in the 3D geological model. Non-intersecting triangular faces have almost no impact on the results of Boolean operations. In order to reduce the computational load of Boolean operations and improve computational efficiency, non-intersecting triangular faces in the 3D geological model are filtered out to achieve model pruning and obtain a lightweight model.

[0143] In some embodiments, such as Figure 6 As shown, based on the model topology, intersection loop extraction is performed on the lightweight model through intersection testing, including:

[0144] Step 601: Determine the first triangular facet corresponding to the first sub-model in the lightweight model and the second triangular facet corresponding to the second sub-model in the lightweight model.

[0145] In specific implementation, for example, such as Figure 7a As shown, the first triangular facet corresponding to the first sub-model in the lightweight model is △A1A2A3, and the second triangular facet corresponding to the second sub-model in the lightweight model is △B1B2B3.

[0146] Step 602: Perform an intersection test on the first triangular facet and the second triangular facet to obtain the number of intersection points, and determine the test result based on the number of intersection points.

[0147] In practice, we find the intersection of each side of △A1A2A3 with △B1B2B3, and we find the intersection of each side of △B1B2B3 with △A1A2A3. The detailed steps are as follows:

[0148] Step 1: Find the parametric equation of the line containing line segment A1A2:

[0149] A = A1 + t(A2 - A1) (t is a parameter, -∞ ≤ t ≤ +∞) (2)

[0150] Step 2: Determine t0 such that point A0 = A1 + t0(A2 - A1) lies on the plane of △B1B2B3, i.e., satisfying:

[0151]

[0152] Step 3: Obtain t0 using formula (3). If 0 ≤ t0 ≤ 1, it means the intersection point is on line segment A1A2, but not on its extension. Next, determine whether the intersection point A0 is on the side or inside △B1B2B3. If the condition is met, A0 must satisfy the following conditions:

[0153]

[0154] If A0 meets the conditions in step three, it proves that A0 is an intersection point of triangles △A1A2A3 and △B1B2B3. Next, we need to perform intersection tests on the other two sides A2A3 and A3A1 of △A1A2A3 with respect to △B1B2B3, and three tests on the three sides of △B1B2B3 with respect to △A1A2A3. After completing six tests, we remove duplicate points from the obtained intersection points to obtain the number of intersection points, and determine the test result based on the number of intersection points.

[0155] Zero points: Prove that △A1A2A3 and △B1B2B3 have no intersection points and are in a disjoint state.

[0156] A single intersection point: If △A1A2A3 and △B1B2B3 intersect at only one point, it means that a line cannot be formed or the line is degenerate. This situation does not need to be considered.

[0157] Two intersection points: Prove that △A1A2A3 and △B1B2B3 intersect. Connecting these two intersection points forms the line segment of intersection between △A1A2A3 and △B1B2B3, and this line segment is stored in the line segment set.

[0158] Step 603: In response to the test result being intersecting, store the intersection segment of the first triangular facet and the second triangular facet in the intersection segment set.

[0159] In practice, when there are two intersection points, the test result is determined to be intersecting. The two intersection points are connected to form the intersection line of △A1A2A3 and △B1B2B3, and the intersection line is stored in the intersection line segment set.

[0160] Step 604: Merge the discrete intersection segments in the intersection segment set using the model topology to obtain the intersection loop.

[0161] In practice, after the intersection test is completed, the extraction of intersection loops continues. The key to extracting intersection loops lies in merging identical intersection points using the model's own topology. The specific steps for extracting intersection loops are as follows:

[0162] Step 1: Selecting the starting point. Initialize the intersectionLoop set to store the intersection loop. Take one intersection segment from the edges set that stores discrete intersection segments as the starting intersection segment. Delete this intersection segment from edges. Select one endpoint of the starting intersection segment as the starting point and the corresponding other endpoint as the ending point. Add these two points to the intersectionLoop in sequence.

[0163] Step 2: Pairing of discrete intersection segments. The key to pairing intersection segments is to merge the intersection points generated by the common edges and determine the next intersection segment to be connected based on the tail point of the already connected intersection loop. The specific implementation can be divided into two steps: (1) Find the intersection segments connected to the previous tail point from the remaining edges. (2) Merge the same intersection points and add the other end point of the intersection segment to the intersectionLoop.

[0164] For example, such as Figure 7b As shown, assuming the tail point is P2, the intersection segment P1P2 is generated by the intersection of triangular facets △T2 and △T1. Based on the edge where the intersection point P2 is located, the adjacent triangle △T3 can be directly searched. It is also known that the intersection segment P3P4 generated by the intersection of △T3 and △T1 is the next intersection segment to be connected. Since P2 and P3 are intersection points generated by the same edge, they are merged, and P4 is added to the intersectionLoop. The above operation is repeated until one end of the extracted intersection segment is the same as the first endpoint.

[0165] For the direction of the intersection loops, regardless of whether it's a tunnel model or a stratigraphic model, the arrangement of the vertices of their triangular faces is counter-clockwise. Taking a tunnel triangle as an example, when reconstructing the tunnel triangle, the direction of each intersection segment is equal to the cross product of the normal vector of the tunnel triangle and the direction of the normal vector of the stratigraphic triangle. Assume the intersection segments are P1P2, the normal vector of the tunnel triangle is n1, and the normal vector of the stratigraphic triangle is n2. Given coordinates P1 (xp1, yp1, zp1), P2 (xp2, yp2, zp2), and n (xn, yn, zn), if the direction of (xp2-xp1, yp2-yp1, zp2-zp1) is the same as (xn, yn, zn), then the direction of the intersecting line segment is P1→P2; otherwise, it is P2→P1. Therefore, the direction of each intersecting line segment determines the direction of the intersecting loop.

[0166] Assuming the semi-circular arch model represents the tunnel model and the irregular cube represents the geological strata model, Figure 8a The top surface of the three-dimensional geological model. Figure 8b The bottom surface of the three-dimensional geological model is shown in the figure. It can be seen that the tunnel model and the bottom layer model intersect at three points, namely intersection 1, intersection 2, and intersection 3.

[0167] The three intersections form three intersection loops, as shown in intersection loop 1. Figure 9a As shown, intersection loop 2 is as follows Figure 9b As shown, the intersection loop 3 is as follows Figure 9c As shown. The overall intersection loop is as follows. Figure 9d As shown. Because the vertices of the triangular facets are arranged in reverse order, the normal vector of each triangular facet in the model points outwards. Figure 9d The direction of the intersection loops is clockwise.

[0168] This application embodiment selects a method that differs from the related technology of merging the endpoints of the nearest intersecting line segments based on a preset distance threshold. Instead, it extracts the intersection loop by using the pairing of discrete intersection segments. This avoids the problem that if the distance threshold is set unreasonably, the two points that should be merged cannot be merged, resulting in the failure of intersection loop extraction. This also avoids the problem of gaps and overlaps that are easy to occur when reconstructing the model, and improves the accuracy of Boolean calculation.

[0169] In some embodiments, such as Figure 10 As shown, the model is reconstructed based on the target triangular facets, resulting in a reconstructed model that includes multiple reconstructed triangular facets, including:

[0170] Step 1001: Extract polygons from the target triangular facet and divide the target triangular facet into multiple polygonal regions.

[0171] In practice, model reconstruction includes three parts: polygon extraction, polygon region division, and polygon triangulation. During polygon extraction, because the intersection loops cut each triangular facet into different polygonal regions, the first step in reconstructing the triangular facets is to extract the polygonal region for each triangular facet. For example... Figure 11aAs shown: For the triangular facet △MNO, points 1 and 2 are the two intersection points of the line segment and side MN; points 3, 4, 5, and 6 are the intersection points of the line segment and side MO; and points 7, 8, 9, and 10 are the intersection points of the line segment and side OM. The specific operation for extracting the polygon is shown below:

[0172] Input: Triangle △MNO and the set of intersection segments

[0173] Output: Six polygons arranged counterclockwise.

[0174] Step 1: Sort the three vertices of the triangle and their intersection points 1-10 counterclockwise to obtain the point set M-1-2-N-3-4-5-6-O-7-8-9-10-M. Details are as follows:

[0175] ①: Initialize the set AnticoilwisePoints to store counterclockwise points. First, put vertex M into the set AnticoilwisePoints. Then, call the getIntersectionP() method on edge MN to obtain the set of intersection points on edge MN. However, points 1 and 2 in the set are unordered. Next, calculate the Euclidean distance from intersection points 1 and 2 to vertex M respectively, and add points 1 and 2 into the set AnticoilwisePoints in ascending order of distance.

[0176] ②: Repeat the operation in ① for edge NO and edge OM until the set AnticlockwisePoints is a point set including M-1-2-N-3-4-5-6-O-7-8-9-10-M.

[0177] Step 2: Initialize the set `polygon` to store individual polygons, and `polygons` to store all polygon regions extracted from △MNO. Traverse the points in the set `AnticlockwisePoints`, starting from M. When a point on an intersection segment is encountered, traverse along that segment and add the point to the set `polygon`. After traversing the intersection segment, continue traversing from the next point after the end of the intersection segment in the set `AnticlockwisePoints`, until returning to the starting point. Stop traversing and mark it as visited. A closed polygon region has been extracted, and the set `polygon` is added to the set `polygons`.

[0178] Step 3: Next, iterate through the set AnticolockwisePoints, extracting the closed polygon regions from each point until all points have been traversed. All polygons have been extracted. The extracted results are as follows: Figure 11bAs shown: There are six closed polygonal regions in total, numbered 1, 2, 3, 4, 5, and 6. The points in these six polygons are arranged in a counter-clockwise order.

[0179] Step 1002: Classify multiple polygonal regions according to the intersection loop to obtain the internal polygonal regions and the external polygonal regions.

[0180] In practice, after polygon extraction, polygon regions are divided. Triangular faces are cut into different closed polygon regions by the intersection ring. Determining whether a polygon region is inside or outside the intersection ring provides a basis for identifying the interior and exterior of the triangular faces after triangulation. If the polygon is inside the intersection ring, the triangular faces it divides into are internal triangular faces; otherwise, they are external triangular faces. Since polygons are stored counter-clockwise, the key to determining whether a polygon region is inside or outside lies in sequentially checking the points on the intersection segment of the polygon against the original intersection segment. If the order is the same, the polygon is inside the intersection ring; otherwise, it is outside. The specific classification steps are as follows:

[0181] Step 1: Call Figure 11b Extract the completed set of polygons and iterate through it. First, determine the closed polygon region 1 by defining a boolean variable in and initializing its value to false.

[0182] Step 2: Traverse the original set of intersecting line segments in △MNO, obtain the start point and end point of the current intersecting line segment. If the closed polygon region 1 contains start point and end point, go to step 3. Otherwise, determine whether the polygon region 1 contains the start point and end point of other intersecting line segments.

[0183] Step 3: Define `startIndex` and `endIndex`, representing the indices of the start and end points of the line segment within polygon 1. Define a collection `polygonSegment` to store the specific position of the current line segment within polygon 1. Polygon 1 calls the built-in Java collection method `indexOf(Point)`, representing the index of point `Point` within polygon 1. Set `int startIndex = polygon1.indexOf(startPoint)` and `int endIndex = polygon1.indexOf(endPoint)`. If `endIndex = 0`, `polygonSegment = polygon1.subList(startIndex, polygon1.size())`. If `startIndex = 0`, `polygonSegment = polygon1.subList(endIndex, polygon1.size())`. If `startIndex ≤ endIndex`, `polygonSegment = polygon1.subList(startIndex, endIndex + 1)`. Otherwise, `polygonSegment = polygon1.subList(endIndex, startIndex + 1)`. The `subList` function is a built-in Java function used for truncation operations.

[0184] Step 4: Compare the first element in the polygonSegment set with the first element of the current intersection segment. If they are the same, set in to true, indicating that the current polygon region is inside the intersection loop. Otherwise, the current polygon region is outside the intersection loop.

[0185] Step 5: Repeat steps 1 through 4 for each of the remaining closed polygon regions.

[0186] Based on the above algorithm, we can obtain the following: Figure 11c As shown: the inner polygonal regions are 2 and 5, and the outer polygonal regions are 1, 3, 4, and 6.

[0187] Step 1003: Triangulate the internal polygonal region according to the ear-cutting method to obtain multiple internal reconstructed triangular patches.

[0188] Step 1004: Triangulate the external polygonal region using the ear-cutting method to obtain multiple external reconstructed triangular patches.

[0189] Step 1005: Integrate all internal and external reconstruction triangles to obtain the reconstruction model.

[0190] In practice, after the polygon region is divided, polygon triangulation is performed. For example, the ear-cutting method can be used to triangulate the polygon. The specific steps are as follows:

[0191] Input: polygon collection polygon2d.

[0192] Output: a collection of triangles.

[0193] Step 1: Initialize the collection triangles to store the triangular facets after subdivision, and initialize the collection earPoints of type Point to store the ears of the polygons.

[0194] Step 2: Iterate through each vertex in the polygon2d set and determine if it is an ear. If it is, add it to the earPoints set.

[0195] Step 3: If the number of vertices in the polygon2d set is ≥3 and the earPoints set is not empty, enter the while loop; otherwise, jump to step 4. Get the first element, Point ear, from earPoints and remove it from the earPoints set. Based on point ear, obtain its index earIndex in the polygon, as well as the indices of the preceding and following vertices earIndex-1 and earIndex+1. Based on these indices, obtain the three adjacent vertices in the polygon. Instantiate these three vertices into a triangle. Add this triangle to the triangles set. Next, remove this ear vertex from the polygon2d set. Since removing the ear may change the attributes of adjacent vertices (i.e., it might not have been an ear before but becomes one, or it might have been an ear before but not one), for the first case, add the vertex to the earPoints set; for the second case, remove the vertex from the earPoints set.

[0196] Step 4: Output the set of triangles.

[0197] The closed polygon is divided into a series of triangular facets. These facets are all two-dimensional, meaning that on the xy, xz, and yz planes, the vertex IDs of the polygon and the vertices of the facets are matched to transform the divided two-dimensional facets into three-dimensional facets. At this point, the facets traversed by the intersection loop are reconstructed, and the intersection loop serves as the boundary to distinguish between inner and outer facets, resulting in multiple external and multiple internal reconstructed facets.

[0198] In some embodiments, such as Figure 12As shown, ordinary triangular facets are classified according to the intersection loops, resulting in internal and external ordinary triangular facets, including:

[0199] Step 1201: Determine at least one head vertex within the intersection loop.

[0200] Step 1202: Based on the breadth-first search algorithm, visit the unvisited adjacent vertices of the head vertex in sequence, and visit the adjacent vertices of the adjacent vertices in sequence, until all vertices of the ordinary triangle facet have been visited. The classification ends, and the inner ordinary triangle facet and the outer ordinary triangle facet are obtained.

[0201] In practice, after the model reconstruction is completed, it is necessary to classify the ordinary triangular faces that have not been traversed by the intersection loop into internal and external categories. For example, taking the three-dimensional address models of the tunnel model and the bottom layer model as an example, the internal ordinary triangular faces are those located between the top and bottom of the strata, while the external ordinary triangular faces are those located outside the top and bottom. Figure 13a As shown, the arrow points to the outer ordinary triangular facet. To facilitate viewing the inner ordinary triangular facet, the sidewall triangles of the formation have been deleted, as shown. Figure 13b As shown, the arrow points to the internal ordinary triangular facet.

[0202] This application employs a graph search technique based on a breadth-first search (BFS) algorithm to classify faces in a triangular mesh into internal and external parts. The core idea of ​​this algorithm is to utilize the geometric and topological continuity of the triangular mesh, dividing the mesh faces into internal and external parts through intersection loops, ensuring that the internal and external properties of faces are consistent within the same region. In this structure, the topological information of the triangular faces is presented in the form of a graph, while the intersection loops divide these regions into several connected parts. Therefore, starting from any internal ordinary triangular face or internal vertex, all other internal ordinary triangular faces within the entire model can be expanded and identified. Similarly, the search for external triangles follows the same principle. Using the BFS algorithm, ordinary triangular faces can be searched and classified efficiently, thus quickly completing the internal and external part division of the entire model. The key to the algorithm is to first find a point inside or outside the intersection loop, using this point as the starting point and the intersection loop as the boundary for the search traversal. Taking the search for internal ordinary triangular faces as an example, the detailed steps of the algorithm are as follows:

[0203] Step 1: Initialize the set `inTriangles` to store the required internal ordinary triangular faces; the type is Set. <triangle>The set of target triangles traversed by the intersection loop is passed in for boundary search.

[0204] Step 2: Find a point surePoint within the intersection loop. According to the above region classification algorithm, an internal polygon region of a triangle can be obtained. If a point belongs to both the internal polygon and a vertex of the triangle, this point is the surePoint.

[0205] Step 3: Initialize the queue and store the surePoints into the queue.

[0206] Step 4: Process the head vertex. Based on the point-to-face storage structure of the triangular mesh, search for all triangular faces containing this point. Iterate through each triangular face containing this vertex. If it hasn't been classified yet (i.e., it's not a target triangular face traversed by the intersection loop and isn't within the `inTriangles` set), add it to the `inTriangles` set and process its three vertices. If the vertex isn't in the queue, add it to the end of the queue. After processing these triangular faces, the head vertex processing is complete, and the head vertex is removed from the queue.

[0207] Step 5: Continue processing the new head vertex and add the triangles that meet the requirements to the set inTriangles.

[0208] Step 6: If the queue is empty, end the algorithm and return the collection inTriangles.

[0209] Taking the two theoretical models above as examples, in order to obtain the complete internal ordinary triangular facets, using the triangles traversed by the three intersection loops as boundaries, all internal ordinary triangular facets of the tunnel are searched based on the internal point p1. The complete internal ordinary triangular facets of the tunnel model are as follows: Figure 13c As shown.

[0210] In some embodiments, such as Figure 14 As shown, by merging and recombining facets according to Boolean operation formulas, we obtain Boolean intersection, Boolean union, and Boolean difference results, including:

[0211] Step 1401: Merge and recombine the internal reconstructed triangles and the internal ordinary triangles to obtain the Boolean intersection result.

[0212] Step 1402: Merge and reorganize the external reconstructed triangle facet and the external ordinary triangle facet to obtain the Boolean union result.

[0213] Step 1403: Determine the difference between the three-dimensional geological model and the Boolean intersection result as the Boolean difference result.

[0214] In practice, union merges two objects into one, removing the common topology and geometry and retaining A and B, thus reconstructing the topology. Intersection finds the common parts of two objects; it only requires topological reconstruction of the calculated common parts. Difference subtracts the common parts of two objects from one object, removing the common parts from the corresponding original parts, thus reconstructing the topology.

[0215] Generally, Boolean operations between three-dimensional geological models can be summarized by the following simple mathematical formula:

[0216]

[0217] Where A and B represent two-dimensional geological models, ∩, ∪, and / represent the intersection, union, and difference of sets, respectively, AinB represents all triangular facets of model A within model B, and AoutB represents all triangular facets of model A outside model B. -1 This means inverting the normal vectors of the triangular facets in the model.

[0218] After classifying the triangles inside and outside, the required triangles are merged and recombined according to Boolean operation formulas. The result of the Boolean operation can be divided into two parts. Taking the Boolean intersection of two models as an example, the triangular facets corresponding to the Boolean intersection result include the internal reconstructed triangular facets after model reconstruction and the internal ordinary triangular facets after the internal and external classification. Taking the stratigraphic model and the tunnel model as examples, such as... Figure 15a As shown, the internal reconstructed triangular facets of the reconstructed tunnel model can be obtained by the model reconstruction algorithm. The complete internal ordinary triangular facets of the tunnel model can be obtained by the triangle interior / exterior classification algorithm; similarly, the required stratigraphic model can also be obtained. Merging and recombining the two yields the Boolean intersection result of the two models, as shown below. Figure 15b As shown.

[0219] Furthermore, the Boolean union results of the tunnel model and the stratigraphic model are as follows: Figure 15c As shown, the Boolean difference results of the tunnel model and the stratigraphic model are as follows: Figure 15d As shown.

[0220] In some embodiments, for the scenario of roadway lithology classification, taking the application of Boolean intersection operation between coal mine roadways and strata as an example, the strata model includes aquifers, aquitards and coal seams.

[0221] First, perform a Boolean intersection operation between the tunnel and the aquifer.

[0222] exist Figure 16a In the diagram, based on the aquifer lithology description: the yellow model represents the aquifer, and the white model represents the tunnel model. The area within the red box represents the intersection of the two models. Figure 16b In the model, the tunnel intersects with both the top and bottom of the aquifer. Boolean operations are used to determine the tunnel section between these two layers, which is the Boolean intersection of the two models. This Boolean intersection represents a portion of the tunnel shaft. Figure 16c As shown.

[0223] Then, perform a Boolean intersection operation between the tunnel and the aquitard.

[0224] exist Figure 17a Where the tunnel intersects with the aquitard, based on the lithological description of the aquitard: yellowish-brown represents the aquitard model, and white represents the tunnel model. The tunnel and the aquitard intersect in two parts: Intersection 1 and Intersection 2. A magnified view of a portion of Intersection 1 is shown below. Figure 17b As shown, Figure 17c This represents the Boolean intersection result of the tunnel and the impermeable layer at point 1. To observe the details of the Boolean operation result, we can... Figure 17c Enlarge points 1 and 2 in the image to obtain the following: Figure 17d The Boolean intersection result 1 shown at intersection point 1 ( Figure 17c Enlarged diagram of point 1) and as shown Figure 17e The Boolean intersection result 2 at intersection 1 is shown. Figure 17c Enlarged schematic diagram of (2 locations). Figure 17f This shows a magnified view of the intersection point 2. Figure 17g This represents the Boolean intersection result of the tunnel and the impermeable layer at point 2. To observe the details of the Boolean operation result, we can... Figure 17g Enlarge points 1 and 2 in the image to obtain the following: Figure 17h The Boolean intersection result 1 at intersection point 2 is shown. Figure 17g Enlarged diagram of point 1) and as shown Figure 17i The Boolean intersection result 2 of the intersection point 2 shown is... Figure 17g Enlarged schematic diagram of (2 locations).

[0225] Next, perform a Boolean intersection operation between the roadway and the coal seam. For example... Figure 18a In the diagram showing the intersection of the coal seam and the roadway, white represents the 3D roadway model, blackish-gray represents the coal seam, and the red box represents the part where the roadway and the coal seam intersect, i.e., intersection point 3. Figure 18b This is a magnified view of the intersection point. A Boolean intersection operation is performed between the roadway model and the coal seam to obtain the Boolean intersection result, as shown below. Figure 18c As shown, in order to observe the details of the Boolean operation results, we can... Figure 18c Enlarge points 1 and 2 in the image to obtain the following: Figure 18d The Boolean intersection result 1 (shown at intersection point 3) Figure 18c Enlarged diagram of point 1) and as shown Figure 18e The Boolean intersection result 2 at intersection point 3 is shown. Figure 18c Enlarged schematic diagram of (2 locations).

[0226] After performing Boolean intersections between the roadway and all aquifers, impermeable layers, and coal seams, the three Boolean intersection results are combined to obtain... Figure 19a The Boolean intersection result map shown is a general map of the intersection of the tunnel and all strata, with the corresponding strata colors attached. Figure 19b for Figure 19a The magnified view of point A, and Figure 19c for Figure 19a The result of a magnified view of part B. Figure 19d for Figure 19b The enlarged detail of point C shows the sections where yellow intersects with aquifers, tan intersects with impermeable layers, and black intersects with coal seams, demonstrating the lithological classification of the three-dimensional tunnels based on different stratigraphic lithologies. Figure 19d It can be seen that the Boolean algorithm performs well in detail processing and can classify the lithology of the three-dimensional tunnel according to the different lithologies of the strata and set the corresponding colors, so as to realize the lithology classification and visualization of the three-dimensional tunnel surface.

[0227] In some embodiments, for stratum excavation scenarios, Boolean difference operations are often used to simulate the stratum excavation process in 3D geological modeling and mining engineering. When it is necessary to simulate the excavation behavior of surface or underground space in a 3D geological model, Boolean difference operations can help users subtract the geometry representing the excavation area from the original geological model to obtain the geological model after excavation.

[0228] For example, when planning the mining of geological formations or the construction of underground engineering projects, Boolean difference operations can be used through the following steps:

[0229] 1: Establish a complete three-dimensional geological model of the target strata, including various rock layers, faults, and other geological structures.

[0230] 2: Based on the mining design or engineering construction plan, construct a three-dimensional geometric model representing the excavation outline or tunnel path.

[0231] 3: Use Boolean difference operation to subtract the excavated geometry from the original geological model to obtain the Boolean difference set result, which reflects the new geological model after excavation.

[0232] 4. The new model displays information such as the exposed rock strata structure and the expected cavity shape after excavation. This information guides the excavation of the strata, increasing the safety and efficiency of strata excavation.

[0233] like Figure 20a The image shows the target strata and a cylindrical excavation model. Figure 20b This represents the results of the strata excavation. In order to observe the details of the strata after excavation, a local magnification is performed. Figure 20c This represents the target stratum and the irregular hexahedral excavation model. Figure 20d This represents the excavation results of the strata, and a local magnification is used to observe the details of the strata after excavation. The Boolean difference set results obtained through Boolean difference operations can clearly show the impact of excavation operations on the geological environment, thereby enabling safety assessments, stability analyses, and support design, which helps to make more scientific decisions and optimize engineering plans.

[0234] It should be noted that the method in this embodiment can be executed by a single device, such as a computer or server. The method can also be applied in a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method in this embodiment, and the multiple devices will interact with each other to complete the method described.

[0235] It should be noted that the above description describes some embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0236] Based on the same inventive concept, and corresponding to any of the above embodiments, this application also provides a tunnel lithology classification and stratum excavation device based on Boolean operations.

[0237] refer to Figure 21 The Boolean-based tunnel lithology classification and stratigraphic excavation device includes:

[0238] The model reading module 10 is configured to read the three-dimensional geological model and obtain the model topology of the model data structure.

[0239] The model pruning module 20 is configured to: prune the 3D geological model based on the model data structure through collision detection to obtain a lightweight model;

[0240] The intersection loop extraction module 30 is configured to: extract intersection loops from the lightweight model based on the model topology through an intersection test to obtain at least one intersection loop, and identify target triangular facets that intersect with the intersection loops and ordinary triangular facets that do not intersect with the intersection loops in the lightweight model;

[0241] The model reconstruction module 40 is configured to: reconstruct the model based on the target triangular facets to obtain a reconstructed model including multiple reconstructed triangular facets; wherein the reconstructed triangular facets include internal reconstructed triangular facets and external reconstructed triangular facets;

[0242] The classification and merging module 50 is configured to: classify ordinary triangular facets according to the intersection loop to obtain internal and external ordinary triangular facets, and merge and reorganize the facets according to Boolean operation formulas to obtain Boolean intersection result, Boolean union result and Boolean difference result;

[0243] The excavation module 60 is configured to: label the Boolean intersection, Boolean union, and Boolean difference results in the three-dimensional geological model according to the lithology of the strata, so as to obtain a guiding model for guiding the lithology division of the tunnel and the excavation of the strata.

[0244] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, in implementing this application, the functions of each module can be implemented in one or more software and / or hardware.

[0245] The apparatus described above is used to implement the corresponding Boolean operation-based tunnel lithology classification and stratum excavation method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0246] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the Boolean operation-based tunnel lithology division and stratum excavation method described in any of the above embodiments.

[0247] Figure 22 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.

[0248] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0249] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0250] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.

[0251] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0252] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.

[0253] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0254] The electronic devices described above are used to implement the corresponding Boolean operation-based tunnel lithology classification and stratum excavation methods in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0255] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this application also provides a non-transitory computer-readable storage medium that stores computer instructions for causing the computer to execute the Boolean operation-based tunnel lithology division and stratum excavation method as described in any of the above embodiments.

[0256] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0257] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the Boolean operation-based tunnel lithology classification and stratum excavation method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0258] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this application (including the claims) is limited to these examples; within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this application as described above, which are not provided in the details for the sake of brevity.

[0259] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this application, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this application, and this also takes into account the fact that the details of the implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this application will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuits) have been set forth to describe exemplary embodiments of this application, it will be apparent to those skilled in the art that the embodiments of this application can be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0260] Although this application has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0261] The embodiments of this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this application should be included within the protection scope of this application.< / triangle>

Claims

1. A method for roadway lithology classification and stratigraphic excavation based on Boolean operations, characterized in that, include: Read the 3D geological model to obtain the model topology of the model data structure; Based on the model data structure, collision detection is used to prune the three-dimensional geological model to obtain a lightweight model. Based on the model topology, the lightweight model is subjected to intersection testing to extract intersection loops, resulting in at least one intersection loop. Target triangular faces that intersect with the intersection loop and ordinary triangular faces that do not intersect with the intersection loop are then identified in the lightweight model. The model is reconstructed based on the target triangular facet to obtain a reconstructed model including multiple reconstructed triangular facets; wherein, the reconstructed triangular facets include internal reconstructed triangular facets and external reconstructed triangular facets; The ordinary triangular facets are classified according to the intersection loop to obtain inner and outer ordinary triangular facets. The facets are then merged and recombined according to Boolean operation formulas to obtain Boolean intersection, Boolean union, and Boolean difference results. Based on the lithology of the strata, the Boolean intersection results, Boolean union results, and Boolean difference results in the three-dimensional geological model are labeled respectively to obtain a guiding model for guiding the lithology division of tunnels and stratum excavation.

2. The method according to claim 1, characterized in that, The model data structure includes a vertex data structure, a face data structure, and an edge data structure. The process of reading the three-dimensional geological model to obtain the model data structure and its topological structure includes: The OFF file corresponding to the three-dimensional geological model is read according to the preset reading start position to obtain multiple vertices. Each vertex is assigned a unique vertex identification code, and the vertex and the corresponding vertex identification code are stored in the vertex data structure. In response to the fact that all vertices in the OFF file are stored in the vertex data structure, the triangles in the OFF file are read, each triangle is assigned a unique face identification code, and the triangle and the corresponding face identification code are stored in the face data structure. The vertex of the triangular facet is read according to the preset reading direction, and the three edges of the triangular facet are constructed according to the reading direction and the vertex. Each edge is assigned an edge index number, and the edge and the corresponding edge index number are stored in the edge data structure. The connection relationships between the vertices, edges, and triangular facets are used to construct the model topology.

3. The method according to claim 1, characterized in that, The process of pruning the 3D geological model based on the model data structure through collision detection to obtain a lightweight model includes: Collision detection regions for Boolean operations are determined by pre-detection using bounding boxes constructed based on the model data structure; Within the collision detection area, construct hierarchical bounding box trees corresponding to different sub-models in the three-dimensional geological model; Collision detection is performed based on the hierarchical bounding box tree, and non-intersecting triangular faces in the detection results are removed to obtain the lightweight model after model pruning.

4. The method according to claim 1, characterized in that, The step of extracting intersection loops from the lightweight model based on the model topology through intersection testing includes: Determine the first triangular facet corresponding to the first sub-model in the lightweight model and the second triangular facet corresponding to the second sub-model in the lightweight model; An intersection test is performed on the first triangular facet and the second triangular facet to obtain the number of intersection points, and the test result is determined based on the number of intersection points. In response to the test result being an intersection, the intersection line segment of the first triangular facet and the second triangular facet is stored in the intersection line segment set; The discrete intersection segments in the intersection segment set are merged using the model topology to obtain the intersection loop.

5. The method according to claim 1, characterized in that, The process of reconstructing the model based on the target triangular facets to obtain a reconstructed model including multiple reconstructed triangular facets includes: The target triangular facet is subjected to polygon extraction, and the target triangular facet is divided into multiple polygonal regions; The multiple polygonal regions are classified according to the intersection loop to obtain internal polygonal regions and external polygonal regions. The internal polygonal region is triangulated using the ear-cutting method to obtain multiple internal reconstructed triangular patches. The external polygonal region is triangulated using the ear-cutting method to obtain multiple external reconstructed triangular patches. The reconstructed model is obtained by integrating all the internal and external reconstructed triangular facets.

6. The method according to claim 1, characterized in that, The step of classifying the ordinary triangular facets according to the intersection loop to obtain inner and outer ordinary triangular facets includes: Determine at least one head vertex within the intersection loop; According to the breadth-first search algorithm, the unvisited adjacent vertices of the head vertex are visited in sequence, and the adjacent vertices of the adjacent vertices are visited in sequence until all vertices of the ordinary triangle facet are visited. The classification ends, and the inner ordinary triangle facet and the outer ordinary triangle facet are obtained.

7. The method according to claim 1, characterized in that, The process of merging and recombining facets according to Boolean operation formulas to obtain Boolean intersection, Boolean union, and Boolean difference results includes: The internal reconstructed triangular facets and the internal ordinary triangular facets are merged and recombined to obtain the Boolean intersection result; The external reconstructed triangular facet and the external ordinary triangular facet are merged and recombined to obtain the Boolean union result; The difference between the three-dimensional geological model and the Boolean intersection result is determined as the Boolean difference result.

8. A tunnel lithology classification and stratigraphic excavation device based on Boolean operations, characterized in that, include: The model reading module is configured to read the three-dimensional geological model and obtain the model topology of the model data structure; The model pruning module is configured to: prune the three-dimensional geological model based on the model data structure and through collision detection to obtain a lightweight model; The intersection loop extraction module is configured to: extract intersection loops from the lightweight model based on the model topology through an intersection test to obtain at least one intersection loop, and identify target triangular facets that intersect with the intersection loop and ordinary triangular facets that do not intersect with the intersection loop in the lightweight model; The model reconstruction module is configured to: reconstruct the model based on the target triangular facet to obtain a reconstructed model including multiple reconstructed triangular facets; wherein the reconstructed triangular facets include internal reconstructed triangular facets and external reconstructed triangular facets; The classification and merging module is configured to: classify the ordinary triangular facets according to the intersection loop to obtain inner ordinary triangular facets and outer ordinary triangular facets, and merge and reorganize the facets according to Boolean operation formulas to obtain Boolean intersection result, Boolean union result and Boolean difference result; The segmentation and excavation module is configured to: label the Boolean intersection results, Boolean union results, and Boolean difference results in the three-dimensional geological model according to the lithology of the strata, so as to obtain a guiding model for guiding the lithology segmentation and stratum excavation of the tunnel.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Foundation pit and geologic body model seamless integration method based on three-dimensional Boolean operation

    CN103871101A

  • STL-model-based intersection loop calculation algorithm for numerical control machining geometrical simulation

    CN106446472A