Three-dimensional earthwork digging and filling calculation and interaction method and system for building regeneration
By generating grids by dividing the elevation data of the original site and the designed site in the earthwork calculation method, distinguishing and repairing the grid edges, extracting closed grid entities to intuitively display the excavation and filling effect, solving the problem of difficulty in taking into account both accuracy and efficiency in the existing technology, and achieving high accuracy and high efficiency earthwork volume calculation.
Patent Information
- Application Number
- CN202510287173.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-06-27
AI Technical Summary
The existing earthwork calculation methods are difficult to take into account both accuracy and calculation efficiency, and are not suitable for complex sites, so they cannot visually display the earthwork volume and volume.
By generating a grid from the elevation data of the original site and the designed site, distinguishing unchanged sites, excavation areas and fill areas, and repairing the edges of the grid, extracting closed grid entities to visually display the excavation and fill effects, and calculating the volume from the overall perspective.
It improves the accuracy and calculation efficiency of earth volume calculation, can intuitively display the excavation and filling effect, is suitable for complex sites, and reduces the calculation amount.
Smart Images

Figure CN120217499A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of earthwork calculation, and particularly to a three-dimensional earthwork excavation and filling calculation and interaction method for building regeneration. Background Art
[0002] Earthwork volume calculation is a common problem in the field of engineering design. Designers need to plan the earthwork volume in advance on the building model to guide the earthwork excavation and filling during actual construction. Especially in the field of building regeneration, when renovating old buildings, the advance planning and calculation of earthwork excavation and filling need to be more accurate. There are already a large number of mature solutions for earthwork volume calculation that meet the accuracy requirements, but there is still a large room for optimization in the flat ground, excavation and filling position areas, and intuitive volume display based on the existing solutions.
[0003] Existing software generally uses the triangulation method and the grid method to calculate the earthwork volume. The calculation principle is to obtain the average elevation difference by calculating the elevation of the grid vertices, and then multiply it by the grid area to obtain the volume; however, the earthwork accuracy depends on the accuracy of grid sampling, and there will be large errors in the grid sampling at positions with large vertical elevation differences, which will also lead to inaccurate calculation results. It is necessary to add points or encrypt specific areas of the grid to improve the calculation accuracy. Therefore, the grid calculation is only applicable to relatively flat sites and is not suitable for earthwork calculation of complex sites; moreover, the traditional grid method usually has a grid size of about 10m - 40m. In recent years, with the rapid development of technologies such as unmanned aerial vehicles and laser scanning, the cost of obtaining high-precision terrain data at the decimeter or even centimeter level has been greatly reduced. Based on the high-precision elevation data, the grid density can be greatly increased, and the calculation accuracy can also be improved, but the amount of calculation data is significantly increased; in addition, existing software usually only calculates the earthwork volume value, but cannot intuitively display the excavation and filling entities corresponding to the volume value, and designers cannot intuitively obtain the site leveling effect and the estimated earthwork volume. Summary of the Invention
[0004] (1) Technical Problems to be Solved
[0005] Based on the above problems, the present invention provides a three-dimensional earthwork excavation and filling calculation and interaction method for building regeneration, which solves the problems that it is difficult to balance the accuracy and calculation efficiency of the existing earthwork calculation methods, is not applicable to complex sites, and cannot be intuitively displayed.
[0006] (2) Technical Solutions
[0007] Based on the above technical problems, the present invention provides a three-dimensional earthwork excavation and filling calculation and interaction method for building regeneration, including:
[0008] S1. Generate a grid for the original site according to the DEM elevation and coordinate data;
[0009] S2. Pick up the designed site corresponding to the original site, process the designed site into a Mesh grid, and the designed site has the same point order and mesh face list as the original site;
[0010] S3. Obtain the elevations corresponding to the grid point coordinates of the original site and the designed site respectively;
[0011] S4. Compare the elevation of the original site with that of the designed site, distinguish the unchanged site and the changed site, and then distinguish the excavation area and the filling area from the changed site;
[0012] S5. Extract the meshes of the unchanged site, the excavation area, and the filling area, and repair the edges of the meshes into closed figures;
[0013] S6. Extract the edges and vertical mesh faces of the repaired meshes of the unchanged site, the excavation area, and the filling area to obtain the closed mesh entities of the unchanged site, the excavation area, and the filling area;
[0014] S7. Calculate the volumes of the excavation area and the filling area as a whole.
[0015] Further, the S4 includes: judging whether the elevation of the original site is the same as that of the designed site. If they are the same, it is the unchanged site. If they are different, it is the changed site. Then, for the changed site, judge whether the elevation of the original site is greater than that of the designed site. If so, it is the excavation area, otherwise, it is the filling area.
[0016] Further, in S5, the repairing the edges of the meshes into closed figures includes: if there are gaps at the edges of the meshes, close the gaps; if there are self-intersecting vertices or non-manifold edges at the edges of the meshes, move the intersecting vertices away.
[0017] Further, the self-intersecting vertices or non-manifold edges include: the intersection of vertices of two mesh triangulations, the intersection of vertices of three mesh triangulations, and the intersection of vertices of four mesh triangulations.
[0018] Further, the S6 includes: extracting the mesh of the lower surface of the original site corresponding to the filling area, the mesh of the upper surface of the designed site corresponding to the filling area, and the vertical mesh faces between the upper and lower surfaces to obtain the closed mesh entity of the filling area; extracting the mesh of the lower surface of the original site corresponding to the excavation area, the mesh of the upper surface of the designed site corresponding to the excavation area, and the vertical mesh faces between the upper and lower surfaces to obtain the closed mesh entity of the excavation area; extracting the mesh of the upper surface, the mesh of the lower surface, and the vertical mesh faces between the upper and lower surfaces of the unchanged site to obtain the closed mesh entity of the unchanged site.
[0019] Further, it is implemented in any 3D modeling software and Grasshopper plugin.
[0020] The present invention also discloses a 3D earthwork excavation and filling calculation and interaction system for building regeneration, including:
[0021] At least one processor; and at least one memory communicatively connected to the processor, wherein:
[0022] The memory stores program instructions executable by the processor, and the processor can execute the described method by invoking the program instructions.
[0023] The present invention also discloses a non-transitory computer-readable storage medium, and the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions cause the computer to execute the described method.
[0024] (3) Advantageous Effects
[0025] The above technical solutions of the present invention have the following advantages:
[0026] (1) According to the elevations corresponding to the original site and the designed site grid, the present invention distinguishes the unchanged site, the excavation area and the filling area, and then repairs the grid edges, which is beneficial to improving the accuracy of volume calculation; finally, the closed grid entities of the unchanged site, the excavation area and the filling area are extracted according to the repaired grid edges, and intuitive and visible excavation solid models and filling solid models are obtained, which can more intuitively reflect the leveling effect and volume size of the site; and the volumes of the excavation solid model and the filling solid model are calculated separately as a whole, which can not only improve the accuracy of volume calculation, the calculation accuracy is not affected by the grid segmentation density, but also reduce the calculation amount, improve the calculation efficiency, and can perform rapid calculations on a grid network with more than 40 million grids;
[0027] (2) Based on the general Mesh geometric structure of computer graphics, the present invention does not rely on other special data designs, and can be implemented on any 3D modeling software that implements the Mesh geometric structure, and has good scalability. Description of the Drawings
[0028] The features and advantages of the present invention will be more clearly understood by referring to the accompanying drawings. The drawings are schematic and should not be construed as any limitation to the present invention. In the drawings:
[0029] Figure 1 is the overall flow schematic diagram of the 3D earthwork excavation and filling calculation and interaction method for building regeneration according to the embodiment of the present invention;
[0030] Figure 2 is the algorithm module operation diagram of S1 according to the embodiment of the present invention;
[0031] Figure 3 It is the operation diagram of the algorithm module of S2 in the embodiment of the present invention;
[0032] Figure 4 It is the operation diagram of the algorithm module of S3 in the embodiment of the present invention;
[0033] Figure 5 It is the operation diagram of the algorithm module of S4 in the embodiment of the present invention;
[0034] Figure 6 It is the generation schematic diagram of S4 in the embodiment of the present invention;
[0035] Figure 7 It is the schematic diagram of three cases of non - manifold edges or self - intersecting vertices in the embodiment of the present invention;
[0036] Figure 8 It is the repair comparison schematic diagram of non - manifold edges or self - intersecting vertices in the embodiment of the present invention;
[0037] Figure 9 It is the operation diagram of the algorithm module of S6 in the embodiment of the present invention;
[0038] Figure 10 It is the generation schematic diagram of S6 in the embodiment of the present invention. Detailed implementation manners
[0039] The following combines the drawings and embodiments to further describe in detail the specific implementation manners of the present invention. The following embodiments are used to illustrate the present invention, but are not used to limit the scope of the present invention.
[0040] The embodiment of the present invention discloses a three - dimensional earthwork excavation and filling calculation and interaction method for building regeneration, which is implemented in any three - dimensional modeling software and Grasshopper plug - in. In this embodiment, the three - dimensional modeling software is Rhinocero3D software. RhinoCommon provides a complete Mesh data structure and its algorithm interface for users to call, and Rhinocero3D provides a 3D visualization window for intuitively displaying the algorithm results. The overall process is as Figure 1 shown, including the following steps:
[0041] S1. Generate a grid based on the DEM elevation and coordinate data of the original site;
[0042] Considering that the DEM data itself is a grid point matrix, directly use the DEM coordinates as the grid points of the grid as sampling points. The operation diagram of the module is as Figure 2 shown;
[0043] S2. Pick up the designed site corresponding to the original site, and process the designed site into a Mesh grid. The designed site and the original site have the same point order and grid face list;
[0044] The module operation diagram is as Figure 3 shown. The designed site and the original site have the same point order and grid surface list. Except for the difference in the elevation of the elevation points, they are exactly the same grid.
[0045] S3. Respectively obtain the elevations corresponding to the grid point coordinates of the original site and the designed site;
[0046] The module operation diagram is as Figure 4 shown;
[0047] S4. Compare the elevation of the original site with that of the designed site to distinguish the unchanged site and the changed site, and then distinguish the excavation area and the filling area from the changed site;
[0048] Specifically, judge whether the elevation of the original site is the same as that of the designed site. If they are the same, it is an unchanged site. If they are different, it is a changed site. Then, for the changed site, judge whether the elevation of the original site is greater than that of the designed site. If so, it is an excavation area, otherwise, it is a filling area;
[0049] The module operation diagram is as Figure 5 shown, and the generated diagram is as Figure 6 shown. In the figure, the red part is the vertex of the excavation area, the green part is the vertex of the filling area, and the gray part is the vertex of the unchanged site.
[0050] S5. Extract the grids of the unchanged site, the excavation area, and the filling area, and repair the edges of the grids into closed figures;
[0051] Judge whether there are gaps or self-intersecting vertices at the edges of the grids. If so, repair the edges of the grids into closed figures and proceed to the next step. Otherwise, do not repair and directly proceed to the next step.
[0052] There are only three cases of non-manifold edges or self-intersecting vertices as Figure 7 shown, including the intersection of two grid triangulation vertices, the intersection of three grid triangulation vertices, and the intersection of four grid triangulation vertices. If there is a gap at the edge of the grid, close the gap. If there are self-intersecting vertices or non-manifold edges at the edge of the grid, as Figure 8 shown, then move the intersecting vertices apart.
[0053] S6. Extract the edges and vertical grid surfaces of the repaired grids of the unchanged site, the excavation area, and the filling area to obtain the closed grid entities of the unchanged site, the excavation area, and the filling area;
[0054] Specifically, extract the grid of the lower surface of the original site corresponding to the filled area, the grid of the upper surface of the designed site corresponding to the filled area, and the vertical grid surface between the upper and lower surfaces to obtain the closed grid entity of the filled area; extract the grid of the lower surface of the original site corresponding to the excavated area, the grid of the upper surface of the designed site corresponding to the excavated area, and the vertical grid surface between the upper and lower surfaces to obtain the closed grid entity of the excavated area; extract the grid of the upper surface, the grid of the lower surface, and the vertical grid surface between the upper and lower surfaces of the unchanged site to obtain the closed grid entity of the unchanged site; the module operation diagram is as shown in Figure 9 shown, and the generated diagram is as shown in Figure 10 shown. In the figure, the red part is the closed grid entity of the excavated area, the green part is the closed grid entity of the filled area, and the gray part is the closed grid entity of the unchanged site, realizing the visualization of the earthwork excavation and filling results.
[0055] S7. Calculate the volumes of the excavated area and the filled area as a whole;
[0056] In this embodiment, the volume is calculated according to the overall dimensions of the extracted closed grid entity, rather than by superimposing the volumes of each grid. This not only improves the accuracy of volume calculation, but also makes the calculation accuracy unaffected by the grid segmentation density, reduces the calculation amount, and improves the calculation efficiency.
[0057] Finally, it should be noted that the above method can be converted into software program instructions, which can be implemented by running a control system including a processor and a memory, or can be implemented by computer instructions stored in a non-transitory computer-readable storage medium. The above integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above software functional unit stored in a storage medium includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute some steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.
[0058] In summary, through the above three-dimensional earthwork excavation and filling calculation and interaction method for building regeneration, the following beneficial effects can be obtained:
[0059] (1) The present invention distinguishes unchanged sites, excavation areas, and filling areas according to the elevations corresponding to the original site and the designed site grid, and then repairs the grid edges, which is beneficial to improving the accuracy of volume calculation. Finally, the closed grid entities of the unchanged sites, excavation areas, and filling areas are extracted according to the repaired grid edges, and intuitive and visible excavation solid models and filling solid models are obtained, which can more intuitively reflect the leveling effect and volume size of the site. And the volumes of the excavation solid model and the filling solid model are calculated separately as a whole, which can not only improve the accuracy of volume calculation, the calculation accuracy is not affected by the grid segmentation density, but also reduce the calculation amount, improve the calculation efficiency, and can perform rapid calculations on a grid network that can carry more than 40 million grids.
[0060] (2) The present invention is based on the general Mesh geometric structure of computer graphics, does not rely on other special data designs, and can be implemented on any three-dimensional modeling software that implements the Mesh geometric structure, and has good scalability.
[0061] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A three-dimensional earthwork cut and fill calculation and interactive method for building regeneration, characterized in that: include: S1, generate a grid from the original site according to DEM elevation and coordinate data; S2, picking up the design site corresponding to the original site, processing the design site into a Mesh grid, wherein the design site has the same point sequence and mesh surface list as the original site; S3, respectively obtaining the elevations corresponding to the grid point coordinates of the original site and the designed site; S4, comparing the elevation of the original site with the elevation of the designed site, distinguishing the unchanged site from the changed site, and then distinguishing the excavation area and the filling area from the changed site; S5, extracting the grids of the unchanged site, the excavation area, and the filling area, and repairing the edges of the grids into a closed figure; S6, extracting the edges and vertical mesh surfaces of the repaired mesh of the unchanged site, the cut area, and the filled area to obtain closed mesh entities of the unchanged site, the cut area, and the filled area; S7. Calculate the volumes of the cut area and the fill area as a whole.
2. The three-dimensional earthwork excavation and filling calculation and interactive method for building regeneration according to claim 1 is characterized in that: The S4 includes: judging whether the elevation of the original site is the same as the elevation of the design site, if they are the same, it is an unchanged site, if they are different, it is a changed site, and then judging whether the elevation of the original site is greater than the elevation of the design site for the changed site, if so, it is an excavation area, otherwise, it is a filling area.
3. The three-dimensional earthwork excavation and filling calculation and interactive method for building regeneration according to claim 1 is characterized in that: In S5, repairing the edge of the mesh into a closed shape includes: if there is a gap on the edge of the mesh, closing the gap; if there is a self-intersecting vertex or a non-manifold edge on the edge of the mesh, removing the intersecting vertex.
4. The three-dimensional earthwork excavation and filling calculation and interactive method for building regeneration according to claim 3 is characterized in that: The self-intersecting vertices or non-manifold edges include: the intersection of two mesh triangulated vertices, the intersection of three mesh triangulated vertices, and the intersection of four mesh triangulated vertices.
5. The three-dimensional earthwork excavation and filling calculation and interactive method for building regeneration according to claim 1 is characterized in that: The S6 includes: extracting the mesh of the lower surface of the fill area corresponding to the original site, the mesh of the upper surface of the fill area corresponding to the designed site, and the vertical mesh surface between the upper and lower surfaces to obtain a closed mesh entity of the fill area; extracting the mesh of the lower surface of the excavation area corresponding to the original site, the mesh of the upper surface of the excavation area corresponding to the designed site, and the vertical mesh surface between the upper and lower surfaces to obtain a closed mesh entity of the excavation area; extracting the mesh of the upper surface of the unchanged site, the mesh of the lower surface, and the vertical mesh surface between the upper and lower surfaces to obtain a closed mesh entity of the unchanged site.
6. The three-dimensional earthwork cut and fill calculation and interactive method for building regeneration according to claim 1 is characterized in that: Implemented in any 3D modeling software and Grasshopper plugin.
7. A three-dimensional earthwork excavation and filling calculation and interactive system for building regeneration, characterized in that: include: at least one processor; and at least one memory in communication with the processor, wherein: The memory stores program instructions executable by the processor, and the processor can execute the method according to any one of claims 1 to 6 by calling the program instructions.
8. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which cause the computer to execute the method according to any one of claims 1 to 6.