A cave modeling method, system, storage medium and program product fusing lateral constraints and cross-sectional profiles

CN122597697APending Publication Date: 2026-08-18POWERCHINA HUADONG ENG CORP LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611073905.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-20
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

这些缺陷导致原始点集无法实现对轮廓形状的完整表征和源轮廓与目标轮廓间的平稳过渡;在顶点匹配与三角网拼接中,单一的局部或全局约束不足以维持局部过渡的平滑和整体形态的一致,需要兼顾对基本三角面片性质和镶嵌过程的约束

Benefits of technology

[0064] High precision. This invention innovatively introduces lateral constraints during the modeling process. Through projection, point embedding, and mesh deformation fitting, it achieves a precise fit between the model and the lateral geological constraints, eliminating distortion problems such as model distortion and abnormal expansion and contraction. At the same time, through mesh optimization in the constraint area, it ensures smooth surface transitions and regular topological structures, with geometric errors controlled at the centimeter level, so that the reconstructed karst cave model truly conforms to the actual geological extension law.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122597697A_ABST
    Figure CN122597697A_ABST
Patent Text Reader

Abstract

The application discloses a kind of cave modeling methods, systems, storage medium and program product of fusing lateral constraint and section contour, adopt the technical route of explicit modeling and lateral constraint deformation combination, by distinguishing closed contour line and non-closed lateral contour line, to adapt multiple types of survey contour data;Based on the surface method of two-dimensional contour line reconstruction, the initial model of cave is constructed, to retain the core form of section, and consolidate the foundation of modeling accuracy;Rely on lateral constraint projection, point embedding and grid deformation fitting, realize the accurate fit of model and lateral geological constraint, eliminate model distortion, abnormal swelling and other distortion problems;At the same time, through the optimization of constraint area grid, guarantee the smooth transition of curved surface, and the regular topological structure;Finally realize the dual consideration of modeling efficiency and geometric accuracy, make reconstructed cave model real fitting actual geological extension law.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of three-dimensional geological modeling technology, specifically relating to a method, system, storage medium, and program product for modeling karst caves that integrates lateral constraints and cross-sectional contours. Background Technology

[0002] Currently, 3D modeling methods for karst caves are mainly divided into two categories: implicit modeling and explicit modeling. Implicit modeling relies on interpolation functions to construct the boundaries of geological bodies. Although it can quickly generate the overall model, it lacks accuracy when dealing with complex contour constraints and depicting local details, making it difficult to adapt to the morphological characteristics of complex karst caves. Explicit modeling directly constructs the geometric shape of geological interfaces, making it more suitable for fine modeling of complex geological bodies. However, existing explicit modeling methods have shortcomings in accurately adapting to multi-contour coupling constraints and lateral constraints, making it difficult to balance modeling efficiency and model accuracy.

[0003] Surface reconstruction based on object cross-sectional contours is an important method for surface rendering. It constructs the object's surface by generating a series of triangular patches between the vertices of adjacent contour lines. However, due to limitations in geological environment and exploration technology, the contours themselves have sparse and scattered vertices, and the source and target contours differ significantly in shape and vertex count. These shortcomings prevent the original point set from fully representing the contour shape and ensuring a smooth transition between the source and target contours. In vertex matching and triangular mesh stitching, a single local or global constraint is insufficient to maintain smooth local transitions and consistent overall shape; constraints on the properties of basic triangular patches and the tessellation process must be considered simultaneously.

[0004] However, traditional contour line reconstruction methods mainly focus on the connection of triangular facets between adjacent contour lines, while seriously neglecting the geological constraints on the lateral side of the contour lines. This results in the reconstructed cave models exhibiting distortions, excessive contraction, or expansion in the lateral direction that do not conform to geological laws, failing to accurately reflect the natural extension morphology of caves controlled by geological structures such as strata and joints.

[0005] Therefore, there is an urgent need for a modeling method that balances modeling efficiency and accuracy while adapting to various complex karst caves. Summary of the Invention

[0006] Purpose of the invention: To solve the problems in the prior art, this invention proposes a method, system, storage medium and program product for modeling karst caves that integrates lateral constraints and cross-sectional contours, achieving a balance between modeling efficiency and geometric accuracy, and making the reconstructed karst cave model truly conform to the actual geological extension law.

[0007] Technical solution:

[0008] In a first aspect, this invention proposes a method for modeling karst caves that integrates lateral constraints and cross-sectional contours, including:

[0009] Obtain the outline of the cave. Each outline includes a set of constraint points reflecting the location of the cave boundary. Establish a spatial coordinate system and divide the outline into closed cross-sectional outlines and non-closed lateral outlines.

[0010] All cross-sectional outlines are laid out along the spatial extension of the cave to form a sequence of cross-sectional outlines and preprocessed. The shortest diagonal method is used to construct a triangular mesh including all cross-sectional outlines as the initial model of the cave.

[0011] The initial model is optimized by using an isotropic mesh reconstruction method, including triangular patch edge length convergence, triangular patch edge flipping, and triangular patch vertex correction, to obtain the optimized model.

[0012] The lateral contour line space is vertically projected onto the surface of the optimized model, and projection points are inserted at the projection positions corresponding to the constraint points of the lateral contour line. The projection points are topologically bound to the optimized model, and the projection points are controlled to move along the normal direction of the triangular facet to the original position of the constraint point of the lateral contour line to obtain the optimized model with local deformation.

[0013] The optimized model of local deformation is smoothed to output the cave model.

[0014] Furthermore, the step of dividing the contour lines into closed sectional contour lines and non-closed lateral contour lines includes:

[0015] Calculate the Euclidean distance between the constraint points at one end and the constraint points at the other end of the contour line in the spatial coordinate system. If the calculated Euclidean distance is less than the preset standard closure tolerance, the contour line is divided into a cross-sectional contour line; if the calculated Euclidean distance is greater than or equal to the preset standard closure tolerance, the contour line is divided into a lateral contour line.

[0016] Furthermore, the process of forming the cross-sectional contour line sequence and performing preprocessing includes:

[0017] Close the cross-sectional outline, transform all constraint points into vertices on the cross-sectional outline, and sort them according to the spatial extension direction of the cave to form a sequence of cross-sectional outlines.

[0018] Select any two adjacent cross-sectional contour lines in the cross-sectional contour line sequence, determine whether the adjacent cross-sectional contour lines meet the vertex matching condition, and use the cumulative arc length resampling method to fill the points for the two adjacent cross-sectional contour lines that do not meet the vertex matching condition; traverse the cross-sectional contour line sequence until any two adjacent cross-sectional contour lines meet the vertex matching condition.

[0019] Align all cross-sectional outlines, including direction alignment, center alignment, and first vertex alignment.

[0020] Furthermore, the vertex matching conditions include:

[0021] Obtain the number of vertices of two adjacent cross-sectional contour lines, calculate the ratio of the larger number of vertices to the smaller number of vertices, and the ratio obtained is less than the preset standard ratio; calculate the cosine similarity of the curvature distribution vectors of the two adjacent cross-sectional contour lines, and the cosine similarity obtained is greater than the preset standard cosine similarity; satisfying any of the above conditions is considered to satisfy the vertex matching condition.

[0022] Furthermore, the method of constructing a triangular mesh including all cross-sectional contours using the shortest diagonal method includes:

[0023] Step 1: Select two adjacent cross-sectional contour lines sequentially from the cross-sectional contour line sequence. and ;

[0024] Step 2: Cross-sectional outline Including vertices Cross-sectional outline Including vertices subscript and For the vertex indicator variable, initialize the vertex indicator variable to 0;

[0025] Step 3: Design the cost function and calculate the cost of the spatial quadrilaterals respectively. By candidate diagonal Method, by candidate diagonal Considering the cost of partitioning methods, choose the method with the lower cost to partition the space quadrilateral. Divide into triangular facets;

[0026] Step 4: If by candidate diagonal Method of partitioning, let Increment by 1, Unchanged; if according to candidate diagonal Method of partitioning, let Increment by 1, constant;

[0027] Step 5: Repeat steps 3 and 4 until any vertex indicator variable reaches its maximum value, represented as or Connect the vertex whose vertex indicator variable has reached its maximum value with the remaining vertices of another cross-sectional profile to form a triangular patch, resulting in a cross-sectional profile that includes the two currently adjacent vertices. and Triangular mesh;

[0028] Step 6: Repeat steps 1 to 5 until all cross-sectional contour lines in the sequence have been traversed, resulting in a triangular mesh containing all cross-sectional contour lines.

[0029] Furthermore, the cost function, combined with the diagonal length constraint and volume constraint, is expressed as:

[0030]

[0031] in Let the three-dimensional Euclidean length of the candidate diagonal be given. Let V be the volume of the tetrahedron formed by the candidate triangular facets and their corresponding cross-sectional contours. , These are the preset weighting coefficients.

[0032] Furthermore, the convergence of the side lengths of the triangular facets includes:

[0033] Set the threshold range for the side length of the triangular facet A priority queue strategy is adopted to perform edge length convergence processing on all triangular facets in the initial model in rounds.

[0034] In each round, all edges of the object being processed in that round are traversed, and edges with lengths greater than a threshold are... For edges with lengths less than a threshold, insert a new vertex at the midpoint of that edge; The edge is collapsed to its midpoint, and the two vertices of the edge and the adjacent triangular facets are merged.

[0035] Furthermore, the adoption of the priority queue strategy includes:

[0036] Edges of any triangular facet in the initial model , , The edge represents the vertex it connects, and the subscript indicates the vertex index. The edge is calculated... target length The formula is:

[0037]

[0038] in As vertices The local feature size at a vertex is numerically the product of the square root of the mean area of ​​all triangular faces within the 1-ring neighborhood of that vertex and a preset coefficient.

[0039] Get edges The length is According to the side length deviation In descending order, several edges from the initial model are selected as the processing objects for each round until the preset round limit is reached. The number of edges processed in each round is less than the total number of edges in the initial model.

[0040] Furthermore, the flipping of the triangular facet edges includes:

[0041] In the initial model, the edges corresponding to the cross-section contour line and the edges within the edge 1 ring corresponding to the cross-section contour line and whose minimum interior angle of the quadrilateral formed by the two triangular facets is less than the preset standard interior angle are considered as fixed edges, and the remaining edges are considered as internal edges.

[0042] Define a reward function, iterate through all internal edges, and perform edge flipping on an internal edge when the reward function of edge flipping is greater than 0 and no degenerate facets are generated.

[0043] Furthermore, the revenue function includes:

[0044] any internal edge , , Let the two vertices connected by the internal edge be the internal edge. The two triangular facets are represented as and , , Define the internal edges as the vertices of the two triangular faces. The reward function for performing edge flipping :

[0045]

[0046] in To flip the previous vertex degree, For the flipped vertices degrees, subscript Represents the vertex index. To flip the quadrilateral The smallest interior angle of The flipped quadrilateral The smallest interior angle of The preset angle weights.

[0047] Furthermore, the correction of the triangular facet vertices includes:

[0048] Step 1: Treat the vertices on the non-section contour lines in the initial model as correction points, and select any correction point for correction processing;

[0049] Step 2: Calculate the displacement vector by combining the centroid of the 1-ring neighborhood of the correction point, retain the displacement component of the displacement vector in the tangential direction of the correction point, calculate the updated position of the correction point according to the displacement component, and smooth the correction point from the original position to the updated position along the tangential direction.

[0050] Step 3: Search for the nearest intersection point between the initial model and the updated position along the normal direction of the original position, and project the correction point of the updated position back to the surface of the initial model along the normal direction; if the projection distance exceeds the preset standard projection distance, revert the correction point to the original position.

[0051] Step 4: Repeat steps 2 to 3 until the displacement component of the current correction point is less than the preset standard displacement component, and complete the correction process for the current correction point;

[0052] Step 5: Repeat steps 1 to 4 to iterate through all correction points in the initial model.

[0053] Furthermore, the smoothing process for the optimization model of local deformation includes:

[0054] The DSI smoothing algorithm is used to iteratively process the mesh vertices that are not on the contour line, with 3 to 5 iterations; mesh topology defects, including holes, self-intersecting edges, and non-manifold edges, are repaired.

[0055] Secondly, this invention also proposes a cave modeling system that integrates lateral constraints and cross-sectional contours, comprising:

[0056] The contour line classification module is used to obtain the contour lines of the caves. Each contour line includes a set of constraint points reflecting the location of the cave boundary. A spatial coordinate system is established to divide the contour lines into closed cross-sectional contour lines and non-closed lateral contour lines.

[0057] The mesh building module is used to lay out all cross-sectional outlines along the spatial extension of the cave, forming a sequence of cross-sectional outlines and performing preprocessing. The shortest diagonal method is used to construct a triangular mesh including all cross-sectional outlines as the initial model of the cave.

[0058] The mesh optimization module is used to optimize the initial model by using isotropic mesh reconstruction, including triangle patch edge length convergence, triangle patch edge flipping, and triangle patch vertex correction, to obtain an optimized model.

[0059] The lateral constraint module is used to vertically project the lateral contour line space onto the surface of the optimization model, insert projection points at the projection positions corresponding to the constraint points of the lateral contour line, bind the projection points to the topology of the optimization model, and control the projection points to move along the normal direction of the triangular facet to the original position of the lateral contour line constraint point to obtain the optimization model with local deformation.

[0060] The output module is used to smooth the optimized model of local deformation and output the cave model.

[0061] Thirdly, the present invention also proposes a computer-readable storage medium for cave modeling that integrates lateral constraints and cross-sectional profiles, wherein a computer program is stored thereon, which, when executed by a processor, implements the steps of any of the aforementioned methods.

[0062] Fourthly, the present invention also proposes a cave modeling program product that integrates lateral constraints and cross-sectional profiles, including computer program instructions that, when executed by a processor, implement the steps of any of the aforementioned methods.

[0063] Beneficial effects: Compared with the prior art, the method of the present invention has the following substantial improvements:

[0064] High precision. This invention innovatively introduces lateral constraints during the modeling process. Through projection, point embedding, and mesh deformation fitting, it achieves a precise fit between the model and the lateral geological constraints, eliminating distortion problems such as model distortion and abnormal expansion and contraction. At the same time, through mesh optimization in the constraint area, it ensures smooth surface transitions and regular topological structures, with geometric errors controlled at the centimeter level, so that the reconstructed karst cave model truly conforms to the actual geological extension law.

[0065] High efficiency. This invention rapidly constructs an initial model based on near-parallel cross-sectional contour lines, and then optimizes local mesh deformation by combining lateral contour lines. Through a two-stage modeling method, it balances modeling efficiency and precision, eliminates the need for complex interpolation function calculations, effectively reduces computational costs, and is adaptable to various survey data scenarios.

[0066] Highly adaptable. This invention distinguishes contour lines by closure, with simple computational logic, and is compatible with various types of exploration contour data. This invention designs a contour line preprocessing method and proposes to optimize contour lines through vertex matching, adapting to scenarios with uneven numbers of contour constraint points and large morphological differences, providing a high-quality foundation for subsequent triangular patch tiling, and meeting the needs of refined modeling of karst underground engineering. Attached Figure Description

[0067] Figure 1 This is a flowchart of the method of the present invention;

[0068] Figure 2 It is the outline of Embodiment 1 of the present invention;

[0069] Figure 3 This is the optimized model obtained by isotropic mesh reconstruction in Embodiment 1 of the present invention;

[0070] Figure 4 This is the cave model output by Embodiment 1 of the present invention. Detailed Implementation

[0071] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments. Figure 1The diagram shows a flowchart of a cave modeling method integrating lateral constraints and cross-sectional contours according to the present invention, which specifically includes the following steps:

[0072] S1. Contour line classification and preprocessing.

[0073] This invention obtains contour lines by analyzing the topological connectivity of discrete points in exploration data. Each contour line includes several vertices, serving as constraint points for modeling. Using the spatial distance between the first and last vertices of the contour line as the core criterion, supplemented by curvature continuity as a verification criterion, the contour lines are divided into two categories: one is the cross-sectional contour line, i.e., the closed boundary contour line of the karst cave, used to construct the main morphology of the karst cave; the other is the lateral contour line, i.e., the non-closed boundary contour line of the karst cave, used to reflect the strata, joints, and sidewall boundaries of the karst cave, controlling the lateral morphology. Specific judgment conditions include:

[0074] (1) Cross-sectional contour line: Calculate the coordinates of the first vertex of the contour line. and tail vertex coordinates In three-dimensional space, if the calculated Euclidean distance is less than a preset closure tolerance threshold ε, the contour line is considered to be a closed cross-sectional contour line, capable of enclosing a topological surface with a non-zero area. In this embodiment, the closure tolerance threshold ε = 0.01.

[0075] (2) Lateral contour line: Calculate the Euclidean distance between the first and last vertices of the contour line. If the calculated Euclidean distance is greater than or equal to the closure tolerance threshold ε, the contour line is considered to be unable to independently form a closed region, and the contour line is a non-closed lateral contour line. The lateral contour line usually exhibits a single extended trajectory.

[0076] To eliminate the contour burrs and discrepancy errors of the original contour lines, further regularization processing is required on the classified contour lines.

[0077] For non-closed lateral contour lines, redundant discrete points, flying points, and broken line segments are eliminated, and effective line segments that can reflect the lateral boundaries and geological structures of the cave are retained.

[0078] For the cross-sectional contour line, vertex refinement and vertex aggregation are performed sequentially, including:

[0079] (1) First, the curvature adaptive encryption strategy is adopted to encrypt the vertices. The inflection points, extreme points and curvature change points of the cross-sectional contour line are regarded as encrypted vertices, and the discrete point density of the above encrypted vertices is increased to ensure that the contour shape is fully represented.

[0080] (2) The closed contour line is smoothed using a vertex aggregation method to eliminate extremely close discrete points. The vertex aggregation method is a mature duplicate coordinate compression technique from the computational geometry library, which performs topological cleaning on the discrete points of the contour line by setting an absolute tolerance threshold. In this embodiment, the specific execution flow of vertex aggregation is as follows:

[0081] Step 1: Parameter initialization. Set the absolute tolerance for spatial location. (The default value is 0.001), which represents the maximum Euclidean distance threshold for being considered as the same vertex.

[0082] Step 2: Traverse the vertex sequence along the contour line sequentially. For any pair of adjacent vertices... Calculate the three-dimensional Euclidean distance In the formula , and Represents vertices The three-dimensional coordinates , and Represents vertices The three-dimensional coordinates.

[0083] Step 3: If the calculated three-dimensional Euclidean distance Then determine the vertex. With vertex For redundant duplicate points, perform aggregation operations, including: retaining the vertex with the smaller index. As a reference point, delete the vertex. And redirect the connections of all subsequent vertices back to the reference point; if If the current adjacent vertex pair is not found, then the current adjacent vertex pair is retained, and the next pair of adjacent vertex pairs is traversed.

[0084] Step 4: Repeat steps 2 to 3 until all vertices of the entire contour line have been traversed and no new aggregation operations occur, outputting a smooth contour line with a reduced number of vertices and no zero-length edges.

[0085] After obtaining the regularized contour lines, a spatial coordinate system is established to unify the spatial coordinate system and accuracy level of the cross-sectional contour lines and lateral contour lines, so as to avoid large-scale coordinates affecting subsequent calculations.

[0086] This embodiment selects a karst cave in a mountainous tunnel project as the modeling target. This cave has a single, complex, and irregular shape, with significant cross-sectional undulations and irregularly extending sidewalls controlled by stratigraphic joints. By analyzing the exploration data, the original outline of the cave's boundary is obtained. After processing in step S1, this embodiment extracts the following... Figure 2The 16 cross-sectional contour lines (green lines in the figure) and 5 lateral contour lines (red lines in the figure) shown are used to establish a Cartesian coordinate system with millimeter-level precision.

[0087] S2. Construct an initial model of the karst cave based on the cross-sectional contour lines.

[0088] An explicit modeling method for reconstructing surfaces using two-dimensional contour lines is adopted. Using the cross-sectional contour lines obtained in step S1 as a reference, a sequence of contour lines is laid out along the spatial extension of the karst cave. The shortest diagonal method is used to model multiple contour lines. The explicit modeling method for reconstructing surfaces using two-dimensional contour lines is based on the research of Liu Kunliang et al. (Computer Engineering and Science, Liu Kunliang, Huang Jinming. Research and Implementation of Three-Dimensional Shape Reconstruction Technology with Multiple Contour Lines [J]. J4, 2015, 37(1): 133-138.). In this embodiment, it specifically includes the following sub-steps:

[0089] Step 2-1: Perform vertex matching on adjacent cross-sectional contour lines. For any two adjacent closed contour lines laid out along the extension direction of the cave... and Calculate the number of discrete vertices for each. , And calculate the normalized curvature distribution vector based on the vertex coordinate sequence. , Define the ratio of the number of vertices. and morphological similarity (Cosine similarity), used as a quantification criterion parameter:

[0090]

[0091]

[0092] , This is a preset judgment threshold. When (In this embodiment) When the value is 1.5, it is considered that the number of vertices is uneven; when... (In this embodiment) When the value is 0.7, it is considered that the shape difference is large. If any of the above conditions are met, it is determined that the adjacent contour line pair needs to be processed by equal interpolation to fill the points, and proceed to step 2-2.

[0093] Step 2-2: Using the cross-sectional contour line with a large number of vertices as a reference, set a uniform target number of vertices. The number of compensation points The compensation coefficient (0.3 in this embodiment) is used to compensate for insufficient local sampling density caused by morphological differences. The extreme point of curvature or the closest point of geometric centroid projection is selected as the unified phase starting point to align the starting points of the two cross-sectional contour lines and avoid spiral distortion caused by subsequent triangulation.

[0094] Steps 2-3: [Regarding...] and For cross-sectional profiles with fewer vertices, cumulative arc length parameterized resampling is performed to complete point filling. The specific operation of cumulative arc length parameterized resampling includes calculating the total perimeter of the cross-sectional profile with fewer vertices. Map the cumulative arc length of each vertex to the parameter domain. Generate at equal intervals within the parameter domain The spatial coordinates of each new parameter point are obtained through linear interpolation. After adding the points, the contour lines of adjacent sections are... and All were resampled to have the same number of vertices. A set of points with consistent topological order is used to achieve strict vertex correspondence matching.

[0095] Step 2-4: Repeat steps 2-1 to 2-3 to traverse all adjacent cross-sectional contour lines, so that each cross-sectional contour line corresponds and matches the vertices of its adjacent cross-sectional contour lines.

[0096] Steps 2-5: Perform alignment preprocessing on all adjacent cross-sectional outlines, including direction alignment, center alignment, and starting point alignment.

[0097] Unified direction involves calculating the signed area formed by the points along each cross-sectional contour line. If the area is negative (clockwise), the point order is reversed to ensure that all cross-sectional contour lines are in a counter-clockwise direction. Center alignment involves calculating the cross-sectional contour lines separately. and its adjacent cross-sectional outline The geometric center is used to translate the two contour lines to coincide with the origin, eliminating the triangulation degradation caused by projection deviation. Starting point alignment is based on... First vertex Based on, traverse Find the vertex with the closest Euclidean distance. ,Will The point sequence is cyclically shifted so that the Euclidean vertex is closest to it. become New First Vertex Establish initial connection edges .

[0098] Steps 2-6: Set two vertex indicator variables , respectively pointing to and The currently processed vertex. (Using...) express The total number of vertices, express The total number of vertices is used to determine the range of values ​​for the vertex indicator variable. .

[0099] Triangulation is performed using the shortest diagonal method, for triangles formed by four points. The resulting spatial quadrilateral can be triangulated in two ways:

[0100] Method A: Connect the diagonals ,generate ;

[0101] Method B: Connect the diagonals ,generate .

[0102] Define the joint cost function ,in The three-dimensional Euclidean length of the candidate diagonal; The volume of the tetrahedron formed by the candidate triangular facets and their corresponding contour segments (take the absolute value). These are the preset weighting coefficients.

[0103] Cost of comparison method A Cost of method B ,like Select method A to partition the quadrilateral and let Otherwise, choose method B to partition the quadrilateral and let This mechanism prioritizes preserving the shortest diagonal of the mesh while avoiding the generation of excessively flat or self-intersecting ill-conditioned triangles through volume constraints.

[0104] Steps 2-7: When any position indicates a variable or When the end of the cross-sectional outline is reached, the remaining vertices of the other outline are connected to the last vertex that has been reached to form a triangle, thus completing the triangular facet mosaic.

[0105] In particular, for quadrilaterals spanning both ends The joint cost decision is executed again to ensure the topological integrity of the closed contour, whereby... express The tail vertex, express The tail vertex. After splicing, the outline is translated back to its original coordinate position.

[0106] The present invention constructs an initial model of a karst cave composed of continuous triangular meshes through step S2. This model uses a closed contour as the core supporting skeleton, initially defining the spatial morphology of the gradually changing cross-section of the main body of the karst cave, and providing a basic mesh carrier for subsequent lateral constraint deformation.

[0107] S3, Isotropic mesh reconstruction.

[0108] To address the issue of low-quality triangular facets with elongated shapes and uneven areas in the initial model, this invention employs an isotropic mesh reconstruction algorithm to optimize the mesh quality. Specifically, it includes the following sub-steps:

[0109] Step 3-1: Set the side length threshold and perform long side segmentation and short side collapse on the initial model.

[0110] This step aims to converge the triangular mesh side lengths to a specified side length threshold range. To eliminate scale distortion, denote any edge of the initial model. , , This indicates the vertices connected by the edge, and the edge itself. The actual length is Calculate edges Target length:

[0111]

[0112] in As vertices The local feature size at a given location, where the subscript indicates the vertex index, and the local feature size is numerically equal to the value of that vertex. The square root of the mean area of ​​all triangular faces within the one-ring neighborhood multiplied by a coefficient .

[0113] A priority queue strategy is adopted, based on the side length deviation. In descending order, a subset of edges is selected as the processing target for each round. Multiple iterations are performed to split the long edge and collapse the short edge. This iterative process prevents oscillations. The specific processing steps are as follows:

[0114] Iterate through all edges of the object being processed in this round, if If a new vertex is inserted at the midpoint of the edge, the adjacent triangular facet is divided in two, completing the long side segmentation; the normal vector of the new vertex is obtained by spherical linear interpolation (Slerp) of the normal vectors of the two endpoints, and its position is projected back to the original skeleton face along the normal to maintain geometric fidelity. If If an edge is collapsed to its midpoint, the two endpoints and their associated faces are merged. A validity check is performed before collapse to ensure that no self-intersections occur after collapse, the boundary topology is not altered, and the degree of any vertex does not exceed the upper limit. .

[0115] Step 3-2: Optimize the shape of the triangular facet by balancing the vertex degree through edge flipping.

[0116] This step optimizes the combined quality through local topological transformation without changing the vertex positions. In the initial model, the edges representing the cave outline boundary cannot be flipped, and edges within one ring of the boundary are only... Edges that cannot be flipped are considered non-flippable to prevent jagged edges. Excluding the non-flippable edges, the remaining edges are treated as flippable internal edges. Let any internal edge be denoted as... , , Let the two vertices connected by the edge be... The two triangles are represented as follows: and Define the flip-profit function. :

[0117]

[0118] in To flip the previous vertex degree, For the flipped vertices degrees, subscript Represents the vertex index. To flip the quadrilateral The smallest interior angle of The flipped quadrilateral The smallest interior angle of For angle weights.

[0119] Only when If no degenerate face is generated after flipping, edge flipping is performed. In each round, all flippable edges are traversed, and the number of effective flips is recorded. The process terminates when the effective flipping rate is less than 1% for two consecutive rounds.

[0120] Step 3-3: Laplacian smoothing and projection correction for non-boundary vertices.

[0121] This step fine-tunes vertex positions while maintaining a fixed topology, further improving geometric uniformity. For each non-boundary vertex... Calculate the centroid of a ring neighborhood. :

[0122]

[0123] In the above formula, Represents a node The ring-shaped neighborhood, for The nodes in.

[0124] Further calculation of the displacement vector To avoid volume shrinkage, only the displacement vector is retained. Components on the vertex tangent plane ,in As vertices The unit normal vector. Update position. relaxation factor This achieves tangential Laplacian smoothing.

[0125] After smoothing, vertices may deviate from the original initial model. Therefore, for each updated vertex, the nearest intersection point is searched along the normal direction of its original position, and the vertex is projected back to the initial model along the normal direction, with the projection distance limited to a certain value. ( (This is the global reference side length set in S3 of this embodiment). If the limit is exceeded, it will revert to the position before smoothing.

[0126] Boundary vertices are only allowed to slide along the contour tangent direction, with the sliding amount driven by the difference in adjacent edge lengths, ensuring a smooth boundary without deviating from the original contour. Smoothing and projection are performed alternately, with the maximum single-step displacement of all non-boundary vertices determined by the projection. Stop when the time comes.

[0127] After processing in step S3, an optimized model with uniform size and regular topology is obtained, ensuring accurate and distortion-free embedding of subsequent lateral contour lines and model deformation effects. The optimized model obtained through isotropic mesh reconstruction in step S3 in this embodiment is as follows: Figure 3 The gray area is shown. As can be seen from the figure, the isotropic mesh reconstruction can strictly fit the input cross-sectional contour line (green line in the figure). All discrete sampling points on the cross-sectional contour line are forcibly mapped to the vertices of the mesh surface, ensuring that the cross-sectional shape is without offset or distortion.

[0128] However, because the interpolation region between two adjacent cross-sectional contours in the figure is not subject to hard cross-sectional constraints, and relies solely on linear interpolation to complete the spatial surface transition, the interpolated surface will radially shrink towards the model's interior in sections with abrupt changes in cross-sectional contour curvature, significant differences in cross-sectional area, and large cross-sectional spacing. This results in distortion problems such as mesh concavity and thickness reduction, failing to conform to the lateral contour of the cave (red line in the figure), leading to poor modeling accuracy and realism. To address this issue, this invention further processes the optimized model.

[0129] S4. Introduce hard constraints on the lateral contour lines to perform local mesh deformation.

[0130] Spatial projection processing is performed on the lateral contour lines, projecting all lateral contour lines onto the surface of the optimized model constructed in step S3, and obtaining the projection lines and projection point set of the lateral contour lines on the optimized model.

[0131] The projection method is spatial vertical projection, avoiding point offset errors caused by oblique projection. Specifically, the lateral contour lines are vertically projected onto the model surface using the surface normal vector of the optimized model as the projection direction, resulting in projection lines; the vertices of the lateral contour lines (referred to as constraint points) are vertically projected onto the model surface, resulting in a set of projection points.

[0132] Traverse the triangular facets of the optimization model, determine the triangular facet element where the projection point is located, insert the projection point into the corresponding triangular facet, complete the topological binding between the projection point set and the optimization model, and ensure the spatial correlation between the projection point and the mesh facet.

[0133] Based on the one-to-one correspondence between constraint points and projection points, the actual spatial position of the constraint point is taken as the target position. The projection point inserted in the triangular patch is displaced along the spatial normal direction to the corresponding target position, thus obtaining the mesh after the constraint point displacement.

[0134] This invention uses forced offset of points to induce local deformation of triangular mesh, so that the model as a whole fits the spatial shape of the lateral contour line, corrects the lateral distortion and expansion / contraction distortion of the initial model, and achieves a precise fit between the model and lateral geological constraints.

[0135] S5, model smoothing optimization and high-precision output.

[0136] Steps S2 to S4 have forced the mesh vertices corresponding to the contour lines to fit the constraint points. To solve the problems of mesh distortion, patch overlap, and sharp corners that may be caused by local mesh deformation, step S5 further performs smoothing optimization on the mesh obtained in S4.

[0137] The DSI smoothing algorithm is used to optimize the mesh vertices around the contour line. A weighted smoothing strategy is employed to ensure that the mesh adheres to the constraint line position while achieving a smooth transition between constrained and unconstrained regions. The number of smoothing iterations of the DSI smoothing algorithm is controlled between 3 and 5 to balance constraint fit accuracy and overall mesh smoothness, preventing over-smoothing from distorting the contour shape. Mesh topological defects, including holes, self-intersections, and non-manifold edges, are repaired. The optimized model is then converted into a general 3D format for visualization, cross-sectional measurement, and to provide accurate geological data for engineering applications. Figure 4 The image shows the final cave model obtained in this embodiment. The model has a regular grid and smooth curved surface, which conforms to the natural extension law of caves.

[0138] Example 2

[0139] Based on the cave modeling method of Example 1, this example proposes a cave modeling system that integrates lateral constraints and cross-sectional contours. This system can be deployed on a cloud server or edge terminal, and running this system implements the method described in Example 1. Specifically, it includes the following modules:

[0140] (1) Contour line classification module, used to obtain the contour line of the cave. Each contour line includes a set of constraint points reflecting the boundary position of the cave. A spatial coordinate system is established to divide the contour line into closed cross-sectional contour lines and non-closed lateral contour lines.

[0141] (2) Mesh building module, used to lay out all cross-sectional contour lines along the spatial extension direction of the cave, form a sequence of cross-sectional contour lines and perform preprocessing, and use the shortest diagonal method to construct a triangular mesh including all cross-sectional contour lines as the initial model of the cave;

[0142] (3) Mesh optimization module, which is used to optimize the initial model by using isotropic mesh reconstruction, including triangular patch edge length convergence, triangular patch edge flipping and triangular patch vertex correction, to obtain the optimized model;

[0143] (4) Lateral constraint module, used to vertically project the lateral contour line space onto the surface of the optimization model, insert projection points at the projection positions corresponding to the constraint points of the lateral contour line; bind the projection points to the topology of the optimization model, and control the projection points to move along the normal direction of the triangular facet to the original position of the lateral contour line constraint point to obtain the local deformation optimization model;

[0144] (5) Output module, used to smooth the optimized model of local deformation and output the cave model.

[0145] Example 3

[0146] Various embodiments of the systems and methods described above herein can be implemented in combinations of existing hardware technologies. These various embodiments may include: implementation in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0147] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0148] In the context of this invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0149] Example 4

[0150] In one embodiment, the present invention further includes a computer program product, which includes a computer program that, when executed by a processor, implements the engineering scene table recognition method based on a multimodal large model according to Embodiment 1 of the present invention.

[0151] In the process of implementing a computer program product, computer program code for performing the operations of the present invention can be written in one or more programming languages ​​or a combination thereof. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server.

[0152] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for modeling karst caves that integrates lateral constraints and cross-sectional contours, characterized in that, include: Obtain the outline of the cave. Each outline includes a set of constraint points reflecting the location of the cave boundary. Establish a spatial coordinate system and divide the outline into closed cross-sectional outlines and non-closed lateral outlines. All cross-sectional outlines are laid out along the spatial extension of the cave to form a sequence of cross-sectional outlines and preprocessed. The shortest diagonal method is used to construct a triangular mesh including all cross-sectional outlines as the initial model of the cave. The initial model is optimized by using an isotropic mesh reconstruction method, including triangular patch edge length convergence, triangular patch edge flipping, and triangular patch vertex correction, to obtain the optimized model. The lateral contour line space is vertically projected onto the surface of the optimized model, and projection points are inserted at the projection positions corresponding to the constraint points of the lateral contour line. The projection points are topologically bound to the optimized model, and the projection points are controlled to move along the normal direction of the triangular facet to the original position of the constraint point of the lateral contour line to obtain the optimized model with local deformation. The optimized model of local deformation is smoothed to output the cave model.

2. The method for modeling karst caves by integrating lateral constraints and cross-sectional contours according to claim 1, characterized in that, The method of dividing the contour line into closed sectional contour lines and non-closed lateral contour lines includes: Calculate the Euclidean distance between the constraint points at one end and the constraint points at the other end of the contour line in the spatial coordinate system. If the calculated Euclidean distance is less than the preset standard closure tolerance, the contour line is divided into a cross-sectional contour line; if the calculated Euclidean distance is greater than or equal to the preset standard closure tolerance, the contour line is divided into a lateral contour line.

3. The method for modeling karst caves by integrating lateral constraints and cross-sectional contours according to claim 2, characterized in that, The process of forming the cross-sectional contour line sequence and performing preprocessing includes: Close the cross-sectional outline, transform all constraint points into vertices on the cross-sectional outline, and sort them according to the spatial extension direction of the cave to form a sequence of cross-sectional outlines. Select any two adjacent cross-sectional contour lines in the cross-sectional contour line sequence, determine whether the adjacent cross-sectional contour lines meet the vertex matching condition, and use the cumulative arc length resampling method to fill the points for the two adjacent cross-sectional contour lines that do not meet the vertex matching condition; traverse the cross-sectional contour line sequence until any two adjacent cross-sectional contour lines meet the vertex matching condition. Align all cross-sectional outlines, including direction alignment, center alignment, and first vertex alignment.

4. The method for modeling karst caves by integrating lateral constraints and cross-sectional contours according to claim 3, characterized in that, The vertex matching conditions include: Obtain the number of vertices of two adjacent cross-sectional contour lines, calculate the ratio of the larger number of vertices to the smaller number of vertices, and the ratio obtained is less than the preset standard ratio; calculate the cosine similarity of the curvature distribution vectors of the two adjacent cross-sectional contour lines, and the cosine similarity obtained is greater than the preset standard cosine similarity; satisfying any of the above conditions is considered to satisfy the vertex matching condition.

5. The method for modeling karst caves by integrating lateral constraints and cross-sectional contours according to claim 4, characterized in that, The method of constructing a triangular mesh including all cross-sectional contours using the shortest diagonal method includes: Step 1: Select two adjacent cross-sectional contour lines sequentially from the cross-sectional contour line sequence. and ; Step 2: Cross-sectional outline Including vertices Cross-sectional outline Including vertices subscript and For the vertex indicator variable, initialize the vertex indicator variable to 0; Step 3: Design the cost function and calculate the cost of the spatial quadrilaterals respectively. By candidate diagonal Method, by candidate diagonal Considering the cost of partitioning methods, choose the method with the lower cost to partition the space quadrilateral. Divide into triangular facets; Step 4: If by candidate diagonal Method of partitioning, let Increment by 1, Unchanged; if according to candidate diagonal Method of partitioning, let Increment by 1, constant; Step 5: Repeat steps 3 and 4 until any vertex indicator variable reaches its maximum value, represented as or Connect the vertex whose vertex indicator variable has reached its maximum value with the remaining vertices of another cross-sectional profile to form a triangular patch, resulting in a cross-sectional profile that includes the two currently adjacent vertices. and Triangular mesh; Step 6: Repeat steps 1 to 5 until all cross-sectional contour lines in the sequence have been traversed, resulting in a triangular mesh containing all cross-sectional contour lines.

6. The method for modeling karst caves by integrating lateral constraints and cross-sectional contours according to claim 5, characterized in that, The cost function, combining the diagonal length constraint and the volume constraint, is expressed as: in Let the three-dimensional Euclidean length of the candidate diagonal be given. Let V be the volume of the tetrahedron formed by the candidate triangular facets and their corresponding cross-sectional contours. , These are the preset weighting coefficients.

7. The method for modeling karst caves by integrating lateral constraints and cross-sectional contours according to claim 6, characterized in that, The convergence of the side length of the triangular facet includes: Set the threshold range for the side length of the triangular facet A priority queue strategy is adopted to perform edge length convergence processing on all triangular facets in the initial model in rounds. In each round, all edges of the object being processed in that round are traversed, and edges with lengths greater than a threshold are... For edges with lengths less than a threshold, insert a new vertex at the midpoint of that edge; The edge is collapsed to its midpoint, and the two vertices of the edge and the adjacent triangular facets are merged.

8. The method for modeling karst caves by integrating lateral constraints and cross-sectional contours according to claim 7, characterized in that, The adoption of the priority queue strategy includes: Edges of any triangular facet in the initial model , , The edge represents the vertex it connects, and the subscript indicates the vertex index. The edge is calculated... target length The formula is: in As vertices The local feature size at a vertex is numerically the product of the square root of the mean area of ​​all triangular faces within the 1-ring neighborhood of that vertex and a preset coefficient. Get edges The length is According to the side length deviation In descending order, several edges from the initial model are selected as the processing objects for each round until the preset round limit is reached. The number of edges processed in each round is less than the total number of edges in the initial model.

9. The method for modeling karst caves by integrating lateral constraints and cross-sectional contours according to claim 8, characterized in that, The triangular facet edge flipping includes: In the initial model, the edges corresponding to the cross-section contour line and the edges within the edge 1 ring corresponding to the cross-section contour line and whose minimum interior angle of the quadrilateral formed by the two triangular facets is less than the preset standard interior angle are considered as fixed edges, and the remaining edges are considered as internal edges. Define a reward function, iterate through all internal edges, and perform edge flipping on an internal edge when the reward function of edge flipping is greater than 0 and no degenerate facets are generated.

10. The method for modeling karst caves by integrating lateral constraints and cross-sectional contours according to claim 9, characterized in that, The payoff function includes: any internal edge , , Let the two vertices connected by the internal edge be the internal edge. The two triangular facets are represented as and , , Define the internal edges as the vertices of the two triangular faces. The reward function for performing edge flipping : in To flip the previous vertex degree, For the flipped vertices degrees, subscript Represents the vertex index. To flip the quadrilateral The smallest interior angle of The flipped quadrilateral The smallest interior angle of The preset angle weights.

11. The method for modeling karst caves by integrating lateral constraints and cross-sectional contours according to claim 10, characterized in that, The correction of the vertex of the triangular facet includes: Step 1: Treat the vertices on the non-section contour lines in the initial model as correction points, and select any correction point for correction processing; Step 2: Calculate the displacement vector by combining the centroid of the 1-ring neighborhood of the correction point, retain the displacement component of the displacement vector in the tangential direction of the correction point, calculate the updated position of the correction point according to the displacement component, and smooth the correction point from the original position to the updated position along the tangential direction. Step 3: Search for the nearest intersection point between the initial model and the updated position along the normal direction of the original position, and project the correction point of the updated position back to the surface of the initial model along the normal direction; if the projection distance exceeds the preset standard projection distance, revert the correction point to the original position. Step 4: Repeat steps 2 to 3 until the displacement component of the current correction point is less than the preset standard displacement component, and complete the correction process for the current correction point; Step 5: Repeat steps 1 to 4 to iterate through all correction points in the initial model.

12. The method for modeling karst caves by integrating lateral constraints and cross-sectional contours according to claim 11, characterized in that, The smoothing process for the optimization model of local deformation includes: The DSI smoothing algorithm is used to iteratively process mesh vertices that are not on the contour line, with 3 to 5 iterations; mesh topology defects, including holes, self-intersections, and non-manifold edges, are repaired.

13. A cave modeling system integrating lateral constraints and cross-sectional contours, characterized in that, include: The contour line classification module is used to obtain the contour lines of the caves. Each contour line includes a set of constraint points reflecting the location of the cave boundary. A spatial coordinate system is established to divide the contour lines into closed cross-sectional contour lines and non-closed lateral contour lines. The mesh building module is used to lay out all cross-sectional outlines along the spatial extension of the cave, forming a sequence of cross-sectional outlines and performing preprocessing. The shortest diagonal method is used to construct a triangular mesh including all cross-sectional outlines as the initial model of the cave. The mesh optimization module is used to optimize the initial model by using isotropic mesh reconstruction, including triangle patch edge length convergence, triangle patch edge flipping, and triangle patch vertex correction, to obtain an optimized model. The lateral constraint module is used to vertically project the lateral contour line space onto the surface of the optimization model, insert projection points at the projection positions corresponding to the constraint points of the lateral contour line, bind the projection points to the topology of the optimization model, and control the projection points to move along the normal direction of the triangular facet to the original position of the lateral contour line constraint point to obtain the optimization model with local deformation. The output module is used to smooth the optimized model of local deformation and output the cave model.

14. A computer-readable storage medium for modeling karst caves that integrates lateral constraints and cross-sectional contours, wherein a computer program is stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of any of the methods described in claims 1 to 12.

15. A cave modeling program product integrating lateral constraints and cross-sectional contours, comprising computer program instructions, characterized in that, When executed by a processor, the computer program instructions implement the steps of any of the methods described in claims 1 to 12.