Closing Open Mesh

Hello everyone,

I am trying to calculate the volume of a mesh, but the task has turned out to be more challenging than I expected. I am unable to close the mesh, mainly due to the poor quality of the bottom mesh.

To give some context, I was provided with a terrain model and asked to build and infill an embankment. My goal is to calculate the volume of that infill. At this point, I have run out of ideas. Even though the mesh is open, I am still obtaining a volume value, although I assume it contains some error.

As a quick verification, I tried extracting the faces of the bottom mesh, calculating the centroid of each face, and then using a mesh ray to find the intersection of each point with the infill Brep. Knowing the height and area of each face, I calculated the volume per face and obtained a similar result, which I believe is more accurate.

Does anyone have suggestions on how to properly close the mesh?

Thanks in advance!

Open Mesh.gh (5.2 MB)

This would take longer to do in Gh than Rhino in my opinion - the easiest way while losing minimal accuracy would be

  1. Bake your mesh
  2. QuadRemesh it to give it a more regular topology (choose a moderately small EdgeLength - the shorter the edges, the more accurate the new mesh)
  3. Use ShrinkWrap to close the holes and make a closed approximation of the mesh

By doing that you are affecting a lot precision when extracting the volumes, removing the sharp edges etc

Yup and thus, saving huge amounts of time

The loss of accuracy is negligible though - your friend does not need the exact number of grams, a small tolerance should be expected

Alternatively you could use CloudCompare’s 2.5D volume calculation.

Use “Sample Points on a mesh” in CloudCompare (the volume calculation must be performed with point clouds).

Then you can use “Compute 2.5D volume” as shown below, and specify the resolution. There are some additional options, and I have had to play with those to find out how they apply to the measurement I am making. I have only used a topography relative to a single elevation. It is possible for your case some of the other options may not be relevant.

One note on this:

You should use the area of the face projected onto the plane perpendicular to the height (XY); otherwise, the approach is conceptually incorrect.

Also, in a general case where you need to adjust precision (regardless of the mesh density) you can create a rectangular grid beneath your pair of meshes, project all points of this grid on both meshes, measure the differences of each pair of projections, and then multiply by the area of each grid element.