Earthwork quantity calculation method and device based on geological model

By detecting and repairing the grid of the geological model, the problems of incomplete grid function and low splitting power in the calculation of earthwork volume in the existing technology are solved, realizing efficient and accurate earthwork volume calculation and supporting construction progress settlement and allocation.

CN121527164BActive Publication Date: 2026-05-01CHINA POWER CONSRTUCTION GRP GUIYANG SURVEY & DESIGN INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610043031.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-14
Publication Date
2026-05-01
Estimated Expiration
2046-01-14

AI Technical Summary

Technical Problem

Existing technologies for calculating earthwork quantities suffer from incomplete grid functionality, complex operations, low grid algorithm efficiency, and low splitting power. In particular, they lack effective grid repair functions when dealing with geological models, which affects calculation efficiency and accuracy.

Method used

By performing mesh detection and repair on the initial geological model, including detecting non-manifold edges, non-manifold points, triangular self-intersections, and unclosed meshes, a new mesh is formed using a hole-filling algorithm. Combined with the design elevation surface and partition boundary processing, the excavated and remaining geological bodies are separated to achieve accurate mesh repair and partitioning. Finally, the earthwork volume is calculated based on the repaired model.

Benefits of technology

It improves the efficiency and accuracy of earthwork quantity calculation, with a cutting efficiency of over 99%, providing a reliable basis for construction progress settlement and earthwork allocation, and realizing rapid and accurate quantity calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121527164B_ABST
    Figure CN121527164B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on geological model's earthwork quantity calculation method and device.Method includes: obtaining the initial geological model corresponding to project engineering, design elevation surface, partition boundary, obtains the point cloud data obtained by project engineering field scanning;First geological model is generated;Based on design elevation surface and partition boundary, first geological model is partitioned and handled to form partitioned geological model, and the expected excavation geological body of each partition is determined;Based on point cloud data, current topographic surface is determined, and each expected excavation geological body of each partition is divided into two parts by using topographic surface, when meeting second preset condition, grid repair is carried out to the grid corresponding to the geological body that has been dug and the grid corresponding to remaining geological body, to obtain the geological model that is repaired completely;Based on the geological model that is repaired completely, the earthwork quantity is determined.The application improves the efficiency and accuracy of calculating earthwork quantity in civil engineering construction.
Need to check novelty before this filing date? Find Prior Art

Description

A method and apparatus for calculating earthwork volume based on geological model Technical Field

[0001] This invention relates to the field of BIM technology, specifically to a method and apparatus for calculating earthwork quantities based on a geological model. Background Technology

[0002] Throughout the entire process of an engineering project, from planning and design to construction settlement, earthwork quantities need to be calculated multiple times. Currently, professional earthwork software or the grid function in BIM design platforms are generally used to calculate earthwork quantities. This mainly involves processing existing design drawings or point cloud data to generate a simple grid model for quantity calculation. When using existing technology to calculate the excavation quantity of a geological model, grid splitting often fails due to grid quality issues. The specific cause cannot be found during processing, and there is a lack of useful grid repair functions, which seriously affects the efficiency of earthwork quantity calculation. In short, existing technologies suffer from technical problems such as incomplete grid functions, complicated operation process, low grid algorithm efficiency, and low splitting success rate. Summary of the Invention

[0003] In view of this, the present invention provides a method and apparatus for calculating earthwork volume based on a geological model, which can solve the above-mentioned technical problems.

[0004] To solve the above-mentioned technical problems, the present invention is implemented as follows.

[0005] A method for calculating earthwork quantities based on a geological model, comprising:

[0006] Step S1: Obtain the initial geological model, design elevation surface, and zoning boundary corresponding to the project, and obtain the point cloud data obtained from the on-site scanning of the project.

[0007] Step S2: Detect the initial geological model composed of meshes, and repair the mesh to obtain the first geological model when it meets the first preset conditions; divide the first geological model into zones based on the design elevation surface and zone boundaries to form a zoned geological model, and determine the expected excavation geological bodies in each zone;

[0008] Step S3: Based on point cloud data, determine the current topographic surface. Apply the current topographic surface to divide each expected excavation geological body in each zone into two parts: the upper part is the excavated geological body and the lower part is the remaining geological body. When the second preset condition is met, perform mesh repair on the mesh corresponding to the excavated geological body and the mesh corresponding to the remaining geological body to obtain the repaired geological model.

[0009] Step S4: Determine the earthwork volume based on the repaired geological model.

[0010] Preferably, in step S2, the initial geological model is used as the grid to be judged, and the first preset condition is one or more of the following four cases: the grid to be judged has non-manifold edges, the grid to be judged has non-manifold points, the triangles in the grid to be judged are self-intersecting, and the grid to be judged has non-closed grids.

[0011] Preferably, the method for determining whether the mesh to be judged has non-manifold edges includes:

[0012] Traverse the triangles in the grid to be judged. When there are two connecting edges between two vertices of a triangle, each of the two connecting edges is regarded as a non-manifold edge. The grid to be judged has a non-manifold edge when there is at least one non-manifold edge.

[0013] Methods for determining whether a non-manifold point exists in the grid to be judged include:

[0014] Each triangle in the grid to be judged is treated as a point-related triangle;

[0015] For each point-related triangle, determine whether the point-related triangle contains a non-manifold point, including:

[0016] The point-related triangles adjacent to the point-related triangles are denoted as adjacent point triangles. The point-related triangles and adjacent point triangles are merged and their normals are unified to form a merged network, and the boundary of the merged network is obtained. The vertices corresponding to the non-manifold edges that serve as the boundary in the point-related triangles are designated as non-manifold points.

[0017] The grid to be judged has a non-manifold point if at least one non-manifold point exists.

[0018] Methods for determining self-intersection of triangles in the mesh to be judged include:

[0019] Divide the grid to be judged into multiple sub-regions;

[0020] For each sub-region:

[0021] Scan each triangle in the sub-region to divide the grid to be judged into multiple sub-regions; in each sub-region, construct a quadtree to store the triangles in that sub-region; search for candidate intersecting triangles based on the quadtree, where candidate intersecting triangles are triangles that may intersect with other triangles in the sub-region, and intersecting triangles are triangles that intersect with other triangles in the sub-region; select several first candidate related triangles from the candidate intersecting triangles through bounding box testing, and select intersecting triangles from the first candidate related triangles using geometric intersection calculation; when there is at least one pair of intersecting triangles in the grid to be judged, the triangles in the grid to be judged are self-intersecting.

[0022] Preferably, mesh repair includes:

[0023] For each nonmanifold point: delete the triangle edges of the triangles associated with the point that makes the nonmanifold point a nonmanifold point;

[0024] For each non-manifold edge: delete the triangle containing that non-manifold edge;

[0025] For each pair of self-intersecting triangles: delete the self-intersecting triangles; for the holes formed after deleting the self-intersecting triangles, use the hole-filling algorithm to form new meshes at the holes; and merge all the new meshes with the original meshes.

[0026] For non-closed meshes: Use a hole-filling algorithm to create new meshes at the holes formed by the non-closed meshes, and merge all the new meshes with the original meshes.

[0027] Preferably, in step S2, the first geological model is partitioned based on the design elevation surface and partition boundaries to form a partitioned geological model, and the expected excavation geological bodies for each partition are determined, including:

[0028] Step S21: Determine the expected excavation geological body based on the design elevation surface and the first geological model; stretch the boundary of each zone to the design elevation in the direction perpendicular to the horizontal plane to determine the initial expected excavation geological body of each zone; the initial expected excavation geological body occupying two or more zones is regarded as the cross-zone expected excavation geological body.

[0029] Step S22: For cross-zone expected excavation geological bodies, merge adjacent zones to form new zones until there are no cross-zone expected excavation geological bodies in the initial expected excavation geological bodies; the first geological model with the final zone information and the final zone boundary is used as the zone geological model;

[0030] Step S23: Determine the expected excavation geological bodies for each zone based on the initial expected excavation geological bodies in each zone of the zonal geological model. For each zone, the following operations are performed:

[0031] Step S231: Obtain the design elevation surface boundary E1 corresponding to the partition. Boundary E1 is a closed curve composed of multiple straight line segments.

[0032] For each straight line segment: set a value greater than the maximum elevation of the zonal geological model for each endpoint of the straight line segment as the Z-coordinate of the new endpoint corresponding to each endpoint. The plane coordinates of the new endpoints are consistent with the plane coordinates of the endpoints of the corresponding straight line segments. Two new endpoints form a new straight line segment, and all new straight line segments constitute a new boundary E2.

[0033] For each line segment in E1, perform the following operations:

[0034] Step S2311: Denote the line segment in E1 as the first line segment;

[0035] Step S2312: Obtain each line segment in E2. For each line segment in E2, perform the following operations:

[0036] The straight line segment in E2 is designated as the second straight line segment;

[0037] Store the two triangles formed by the two endpoints of the first line segment and the two endpoints of the second line segment into the first triangle set;

[0038] Step S2313: Divide E2 into planar triangles and store the resulting triangles in the second triangle set;

[0039] Merge the first triangle set and the second triangle set to form the third triangle set; all triangles in the third triangle set form the first excavation face, which is closed.

[0040] Step S232: Obtain the first intersecting triangle in the first excavation face. The first intersecting triangle refers to the triangle in which the first excavation face and the grid corresponding to the partition have an intersection line and an intersection point. With the goal of minimizing the number of first intersecting triangle pairs, the first intersecting triangles are combined into several first intersecting triangle pairs. The intersection lines of each first intersecting triangle pair are obtained, and all intersection lines are combined into an intersection line set.

[0041] Step S233: Based on the intersection set, segment the triangles where the grid corresponding to the partition intersects with the first excavation face;

[0042] Step S234: Determine the positional relationship between the triangles in the grid corresponding to the partition and the first excavation face; determine the positional relationship between the triangles in the grid corresponding to the initial expected excavation geological body and the first excavation face; the triangles inside the first excavation face form the fourth triangle set, and the triangles outside the first excavation face form the fifth triangle set;

[0043] Step S235: Determine the positional relationship between the triangles in the grid corresponding to the first excavation face and the grid corresponding to the partition; the triangles in the grid face corresponding to the partition form a sixth triangle set;

[0044] Step S236: Merge the fourth triangle set and the sixth triangle set to form the excavated geological body; merge the fifth triangle set and the sixth triangle set to form the remaining geological body.

[0045] Preferably, in step S3, when the second preset condition is met, the grids corresponding to the excavated geological bodies and the grids corresponding to the remaining geological bodies are repaired to obtain a repaired geological model, wherein:

[0046] The grids corresponding to the excavated geological bodies and the grids corresponding to the remaining geological bodies are respectively used as grids to be judged. The second preset condition is one or more of the following four cases: the grid to be judged has non-manifold edges, the grid to be judged has non-manifold points, the triangles in the grid to be judged are self-intersecting, and the grid to be judged contains non-closed grids.

[0047] Preferably, after step S4, the method further includes:

[0048] Step S5: Perform lightweight processing on the excavated geological body mesh and the remaining geological body mesh in the repaired geological model, write the attributes corresponding to each excavated geological body and the attributes corresponding to each remaining geological body into a lightweight file, and store and manage the lightweight file.

[0049] A device for calculating earthwork quantities based on a geological model, comprising:

[0050] Initialization module: Configured to obtain the initial geological model, design elevation surface, and partition boundaries corresponding to the project, and to obtain point cloud data obtained from on-site scanning of the project.

[0051] The partitioning module is configured to detect the initial geological model composed of meshes, and repair the mesh to obtain the first geological model when it meets the first preset conditions; based on the design elevation surface and partition boundaries, the first geological model is partitioned to form a partitioned geological model, and the expected excavation geological bodies of each partition are determined.

[0052] Geological body segmentation module: It is configured to determine the current topographic surface based on point cloud data, and apply the current topographic surface to segment each expected excavation geological body in each zone into two parts, the upper part being the excavated geological body and the lower part being the remaining geological body. When the second preset condition is met, the mesh corresponding to the excavated geological body and the mesh corresponding to the remaining geological body are repaired to obtain the repaired geological model.

[0053] Calculation module: Configured to determine earthwork volume based on the repaired geological model.

[0054] The present invention provides a computer-readable storage medium storing a plurality of instructions; the plurality of instructions are used by a processor to load and execute the method as described above.

[0055] The present invention provides an electronic device, characterized in that the electronic device comprises:

[0056] A processor is used to execute multiple instructions;

[0057] Memory, used to store multiple instructions;

[0058] The plurality of instructions are to be stored in the memory and loaded and executed by the processor as described above.

[0059] Beneficial effects:

[0060] (1) This invention realizes the quality inspection and repair of geological body mesh, reduces the problems that may be encountered in the subsequent geological body segmentation process, eliminates mesh quality problems that affect the accuracy of engineering quantity calculation, provides a basis for the subsequent geological body segmentation, and improves the efficiency and accuracy of earthwork engineering quantity calculation;

[0061] (2) The present invention uses a cutting surface to cut geological bodies, with a cutting success rate of over 99% and a precise and controllable cutting process;

[0062] (3) This invention realizes rapid and accurate quantity calculation based on geological model, and can calculate the engineering quantity of excavated and remaining materials with one click. It can dynamically calculate the engineering quantity according to the progress of the project, and provides a reliable basis for progress settlement and earthwork allocation during the construction process. Attached Figure Description

[0063] Figure 1 is a schematic diagram of the earthwork volume calculation method based on a geological model according to the present invention. Detailed Implementation

[0064] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0065] As shown in Figure 1, this invention proposes a method for calculating earthwork volume based on a geological model. The method includes:

[0066] Step S1: Obtain the initial geological model, design elevation surface, and zoning boundary corresponding to the project, and obtain the point cloud data obtained from the on-site scanning of the project.

[0067] Step S2: Detect the initial geological model composed of meshes, and repair the mesh to obtain the first geological model when it meets the first preset conditions; divide the first geological model into zones based on the design elevation surface and zone boundaries to form a zoned geological model, and determine the expected excavation geological bodies in each zone;

[0068] Step S3: Based on point cloud data, determine the current topographic surface. Apply the current topographic surface to divide each expected excavation geological body in each zone into two parts: the upper part is the excavated geological body and the lower part is the remaining geological body. When the second preset condition is met, perform mesh repair on the mesh corresponding to the excavated geological body and the mesh corresponding to the remaining geological body to obtain the repaired geological model.

[0069] Step S4: Determine the earthwork volume based on the repaired geological model.

[0070] In this invention, in step S1, the initial geological model corresponding to the project is a grid model determined based on topographic data, geological survey data, and the interpreted data of the geological survey data, generated using geological modeling software. In step S1, the initial geological model includes multiple geological bodies. For each geological body, a name, color, and material properties are added based on the survey data. The material properties include soil, soil-rock mixture, and stone. In subsequent processing of the geological bodies, the processed geological bodies inherit the name, color, and all attributes of the original geological body.

[0071] Furthermore, in step S2, the initial geological model is used as the grid to be judged, and the first preset condition is one or more of the following four cases: the grid to be judged has non-manifold edges, the grid to be judged has non-manifold points, the triangles in the grid to be judged are self-intersecting, and the grid to be judged has an unclosed grid.

[0072] Methods for determining whether a non-manifold edge exists in the mesh to be judged include:

[0073] Traverse the triangles in the grid to be judged. When there are two connecting edges between two vertices of a triangle, each of the two connecting edges is regarded as a non-manifold edge. When the grid to be judged has at least one non-manifold edge, the grid to be judged has a non-manifold edge.

[0074] Methods for determining whether a non-manifold point exists in the grid to be judged include:

[0075] Each triangle in the grid to be judged is treated as a point-related triangle;

[0076] For each point-related triangle, determine whether the point-related triangle contains a non-manifold point, including:

[0077] The point-related triangles adjacent to the point-related triangles are denoted as adjacent point triangles. The point-related triangles and adjacent point triangles are merged and their normals are unified to form a merged network, and the boundary of the merged network is obtained. The vertices corresponding to the non-manifold edges that serve as the boundary in the point-related triangles are designated as non-manifold points.

[0078] The grid to be judged has a non-manifold point if at least one non-manifold point exists.

[0079] Methods for determining self-intersection of triangles in the mesh to be judged include:

[0080] Divide the grid to be judged into multiple sub-regions;

[0081] For each sub-region:

[0082] Scan each triangle in the sub-region to divide the grid to be judged into multiple sub-regions; in each sub-region, construct a quadtree to store the triangles in that sub-region; search for candidate intersecting triangles based on the quadtree, where candidate intersecting triangles are triangles that may intersect with other triangles in the sub-region, and intersecting triangles are triangles that intersect with other triangles in the sub-region; select several first candidate related triangles from the candidate intersecting triangles through bounding box testing, and select intersecting triangles from the first candidate related triangles using geometric intersection calculation; when there is at least one pair of intersecting triangles in the grid to be judged, the triangles in the grid to be judged are self-intersecting.

[0083] Furthermore, mesh repair includes:

[0084] For each nonmanifold point: delete the triangle edges of the triangles associated with the point that makes the nonmanifold point a nonmanifold point;

[0085] For each non-manifold edge: delete the triangle containing that non-manifold edge;

[0086] For each pair of self-intersecting triangles: delete the self-intersecting triangles; for the holes formed after deleting the self-intersecting triangles, use the hole-filling algorithm to form new meshes at the holes; and merge all the new meshes with the original meshes.

[0087] For non-closed meshes: Use a hole-filling algorithm to create new meshes at the holes formed by the non-closed meshes, and merge all the new meshes with the original meshes.

[0088] Further, in step S2, the first geological model is partitioned based on the design elevation surface and partition boundaries to form a partitioned geological model, and the expected excavation geological bodies for each partition are determined, including:

[0089] Step S21: Determine the expected excavation geological body based on the design elevation surface and the first geological model; stretch the boundary of each zone to the design elevation in the direction perpendicular to the horizontal plane to determine the initial expected excavation geological body of each zone; the initial expected excavation geological body occupying two or more zones is regarded as the cross-zone expected excavation geological body.

[0090] Step S22: For cross-zone expected excavation geological bodies, merge adjacent zones to form new zones until there are no cross-zone expected excavation geological bodies in the initial expected excavation geological bodies; the first geological model with the final zone information and the final zone boundary is used as the zone geological model;

[0091] Step S23: Determine the expected excavation geological bodies for each zone based on the initial expected excavation geological bodies in each zone of the zonal geological model. For each zone, the following operations are performed:

[0092] Step S231: Obtain the design elevation surface boundary E1 corresponding to the partition. Boundary E1 is a closed curve composed of multiple straight line segments.

[0093] For each straight line segment: set a value greater than the maximum elevation of the zonal geological model for each endpoint of the straight line segment as the Z-coordinate of the new endpoint corresponding to each endpoint. The plane coordinates of the new endpoints are consistent with the plane coordinates of the endpoints of the corresponding straight line segments. Two new endpoints form a new straight line segment, and all new straight line segments constitute a new boundary E2.

[0094] For each line segment in E1, perform the following operations:

[0095] Step S2311: Denote the line segment in E1 as the first line segment;

[0096] Step S2312: Obtain each line segment in E2. For each line segment in E2, perform the following operations:

[0097] The straight line segment in E2 is designated as the second straight line segment;

[0098] Store the two triangles formed by the two endpoints of the first line segment and the two endpoints of the second line segment into the first triangle set;

[0099] Step S2313: Divide E2 into planar triangles and store the resulting triangles in the second triangle set;

[0100] Merge the first triangle set and the second triangle set to form the third triangle set; all triangles in the third triangle set form the first excavation face, which is closed.

[0101] Step S232: Obtain the first intersecting triangle in the first excavation face. The first intersecting triangle refers to the triangle in which the first excavation face and the grid corresponding to the partition have an intersection line and an intersection point. With the goal of minimizing the number of first intersecting triangle pairs, the first intersecting triangles are combined into several first intersecting triangle pairs. The intersection lines of each first intersecting triangle pair are obtained, and all intersection lines are combined into an intersection line set.

[0102] Step S233: Based on the intersection set, segment the triangles where the grid corresponding to the partition intersects with the first excavation face;

[0103] Step S234: Determine the positional relationship between the triangles in the grid corresponding to the partition and the first excavation face; determine the positional relationship between the triangles in the grid corresponding to the initial expected excavation geological body and the first excavation face; the triangles inside the first excavation face form the fourth triangle set, and the triangles outside the first excavation face form the fifth triangle set;

[0104] Step S235: Determine the positional relationship between the triangles in the grid corresponding to the first excavation face and the grid corresponding to the partition; the triangles in the grid face corresponding to the partition form a sixth triangle set;

[0105] Step S236: Merge the fourth triangle set and the sixth triangle set to form the excavated geological body; merge the fifth triangle set and the sixth triangle set to form the remaining geological body.

[0106] In step S3, when the second preset condition is met, the mesh corresponding to the excavated geological body and the mesh corresponding to the remaining geological body are repaired to obtain a repaired geological model, wherein:

[0107] The grids corresponding to the excavated geological bodies and the grids corresponding to the remaining geological bodies are respectively used as grids to be judged. The second preset condition is one or more of the following four cases: the grid to be judged has non-manifold edges, the grid to be judged has non-manifold points, the triangles in the grid to be judged are self-intersecting, and the grid to be judged contains non-closed grids.

[0108] For each geological body in the repaired geological model, add an excavation status attribute, which includes the excavated status and the remaining status.

[0109] In step S4, each geological body in the repaired geological model is traversed, and the volume of each geological body is calculated; the excavation state attribute and material property attribute of the geological body are obtained, and the engineering quantity is calculated according to the excavation state attribute and material property attribute, that is, the engineering quantity of excavated soil, excavated soil-rock mixture, excavated stone, remaining soil, remaining soil-rock mixture and remaining stone corresponding to the geological body are obtained.

[0110] Furthermore, after step S4, the method further includes:

[0111] Step S5: Perform lightweight processing on the excavated geological body mesh and the remaining geological body mesh in the repaired geological model, write the attributes corresponding to each excavated geological body and the attributes corresponding to each remaining geological body into a lightweight file, and store and manage the lightweight file.

[0112] The present invention also provides a device for calculating earthwork quantities based on a geological model, the device comprising:

[0113] Initialization module: Configured to obtain the initial geological model, design elevation surface, and partition boundaries corresponding to the project, and to obtain point cloud data obtained from on-site scanning of the project.

[0114] The partitioning module is configured to detect the initial geological model composed of meshes, and repair the mesh to obtain the first geological model when it meets the first preset conditions; based on the design elevation surface and partition boundaries, the first geological model is partitioned to form a partitioned geological model, and the expected excavation geological bodies of each partition are determined.

[0115] Geological body segmentation module: It is configured to determine the current topographic surface based on point cloud data, and apply the current topographic surface to segment each expected excavation geological body in each zone into two parts, the upper part being the excavated geological body and the lower part being the remaining geological body. When the second preset condition is met, the mesh corresponding to the excavated geological body and the mesh corresponding to the remaining geological body are repaired to obtain the repaired geological model.

[0116] Calculation module: Configured to determine earthwork volume based on the repaired geological model.

[0117] The specific embodiments described above only illustrate the design principles of the present invention. The shapes and names of the components in this description may differ and are not limited. Therefore, those skilled in the art can modify or make equivalent substitutions to the technical solutions described in the foregoing embodiments; and these modifications and substitutions do not depart from the inventive spirit and technical solutions of the present invention, and should all fall within the protection scope of the present invention.

Claims

1. A method for calculating earthwork quantities based on a geological model, characterized in that, include: Step S1: Obtain the initial geological model, design elevation surface, and zoning boundary corresponding to the project, and obtain the point cloud data obtained from the on-site scanning of the project. Step S2: Detect the initial geological model composed of meshes. If it meets the first preset condition, perform mesh repair to obtain the first geological model. Based on the design elevation surface and partition boundaries, divide the first geological model into partitioned geological models to determine the expected excavation geological bodies in each partition. Step S3: Determine the current topographic surface based on point cloud data. Apply the current topographic surface to divide each expected excavation geological body in each partition into upper and lower parts. The upper part is the excavated geological body, and the lower part is the remaining geological body. If the second preset condition is met, perform mesh repair on the meshes corresponding to the excavated geological bodies and the meshes corresponding to the remaining geological bodies to obtain the repaired geological model. Step S4: Determine the earthwork volume based on the repaired geological model. In step S2, the first geological model is partitioned based on the design elevation surface and partition boundaries to form a partitioned geological model, and the expected excavation geological bodies of each partition are determined, including: Step S21: Determine the expected excavation geological bodies based on the design elevation surface and the first geological model; stretch the boundaries of each partition to the design elevation in a direction perpendicular to the horizontal plane to determine the initial expected excavation geological bodies of each partition; the initial expected excavation geological bodies occupying two or more partitions are designated as cross-partition expected excavation geological bodies; Step S22: For cross-partition expected excavation geological bodies, merge adjacent partitions to form new partitions, until there are no cross-partition expected excavation geological bodies in the initial expected excavation geological bodies; the first geological model contains the final partition information and the final partition boundaries. As a zonal geological model; Step S23: Based on the initial expected excavation geological bodies in each zonal of the zonal geological model, determine the expected excavation geological bodies for each zonal. For each zonal, perform the following operations: Step S231: Obtain the design elevation surface boundary E1 corresponding to the zonal. Boundary E1 is a closed curve composed of multiple straight line segments. For each straight line segment: Set a value greater than the maximum elevation of the zonal geological model for each endpoint of the straight line segment as the Z-coordinate of the new endpoint. The plane coordinates of the new endpoints are consistent with the plane coordinates of the endpoints of the corresponding straight line segments. Two new endpoints form a new straight line segment, and all new straight line segments constitute a new boundary E2. For each straight line segment in E1, perform the following operations: Step S 2311: Denote the line segment in E1 as the first line segment; Step S2312: Obtain each line segment in E2, and for each line segment in E2, perform the following operations: Denote the line segment in E2 as the second line segment; Store the two triangles formed by the two endpoints of the first line segment and the two endpoints of the second line segment into the first triangle set; Step S2313: Divide E2 into planar triangles, and store the resulting triangles into the second triangle set; Merge the first triangle set and the second triangle set to form the third triangle set; All triangles in the third triangle set form the first excavation face, which is closed; Step S232: Obtain the first intersecting triangle in the first excavation face. The first intersecting triangle refers to a triangle that has an intersection line and an intersection point with the first excavation face and the grid corresponding to the partition. With the goal of minimizing the number of first intersecting triangle pairs, the first intersecting triangles are grouped into several pairs, and the intersection lines of each pair are obtained. All intersection lines form an intersection line set. Step S233: Based on the intersection line set, the triangles intersecting the first excavation face with the grid corresponding to the partition are segmented. Step S234: The positional relationship between the triangles in the grid corresponding to the partition and the first excavation face is determined; the positional relationship between the triangles in the grid corresponding to the initial expected excavation geological body and the first excavation face is determined; the triangles inside the first excavation face form a fourth triangle set, and the triangles outside the first excavation face form a fifth triangle set.Step S235: Determine the positional relationship between the triangles in the grid corresponding to the first excavation face and the grid corresponding to the partition; the triangles in the grid face corresponding to the partition form the sixth triangle set; Step S236: Merge the fourth triangle set and the sixth triangle set to form the excavated geological body, and merge the fifth triangle set and the sixth triangle set to form the remaining geological body.

2. The method as described in claim 1, characterized in that, In step S2, the initial geological model is used as the grid to be judged. The first preset condition is one or more of the following four conditions: the grid to be judged has non-manifold edges, the grid to be judged has non-manifold points, the triangles in the grid to be judged are self-intersecting, and the grid to be judged contains non-closed grids.

3. The method as described in claim 2, characterized in that, In step S3, when the second preset condition is met, the grid corresponding to the excavated geological body and the grid corresponding to the remaining geological body are repaired to obtain the repaired geological model. The grid corresponding to the excavated geological body and the grid corresponding to the remaining geological body are respectively used as grids to be judged. The second preset condition is one or more of the following four situations: the grid to be judged has non-manifold edges, the grid to be judged has non-manifold points, the triangles in the grid to be judged are self-intersecting, and the grid to be judged has non-closed grids.

4. The method as described in claim 3, characterized in that, After step S4, the method further includes: step S5: performing lightweight processing on the excavated geological body mesh and the remaining geological body mesh in the repaired geological model, writing the attributes corresponding to each excavated geological body and the attributes corresponding to each remaining geological body into a lightweight file, and storing and managing the lightweight file.

5. A device for calculating earthwork quantities based on a geological model, used to execute the method described in any one of claims 1-4, characterized in that, Includes: Initialization module: configured to acquire the initial geological model, design elevation surface, and zoning boundaries corresponding to the project, and to acquire point cloud data obtained from on-site scanning of the project. The zoning module is configured to detect the initial geological model composed of meshes, and perform mesh repair to obtain the first geological model when the first preset condition is met. Based on the design elevation surface and zoning boundary, the first geological model is zoned to form a zoning geological model, and the expected excavation geological bodies of each zoning are determined. The geological body segmentation module is configured to determine the current topographic surface based on point cloud data, and apply the current topographic surface to divide each expected excavation geological body of each zoning into upper and lower parts. The upper part is the excavated geological body, and the lower part is the remaining geological body. When the second preset condition is met, the meshes corresponding to the excavated geological bodies and the meshes corresponding to the remaining geological bodies are repaired to obtain the repaired geological model. Calculation module: Configured to determine earthwork volume based on the repaired geological model.