Volume component complains about mesh closure and dumps error

Dear experts,

Volume component says that one of my meshes “TetraMesh” is open and thus it cannot compute the volume (error dumped: Volume cannot be computed for an open mesh). The other “CubeMesh” was included as control. Both were generated using an in-house GhPython script. OpenMesh.gh (17.9 KB)

However, I think that both are closed meshes since I cannot see any opening.

Can you help me to make Volume component work again? Is something wrong with my mesh? Thanks!

You’ll need to “Weld” your mesh vertices.


OpenMesh_re.gh (14.9 KB)

1 Like

Thanks a lot HS_Kim for the instantaneous response!

The Combine&Clean Kangaroo2 component you´ve suggested is the solution!

I thought that duplicate vertices was not a problem since the Volume component works perfectly with “CubeMesh” (it has redundant vertices as well).

Does anybody know how to remove redundant vertices directly from GH python? I already used the following python methods in mesh generation, but they do not do the job…

mesh.Normals.ComputeNormals()
mesh.Compact()

@Vigardo you can use:

mesh.Vertices.Align(dist)

See the documentation for details.

Thanks,

Giulio


Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

1 Like

Hi Giulio, thanks for your help!

Unfortunately, I was not able to make it work: OpenMesh_re2.gh (22.6 KB). Despite your method returns “5”, I can´t see any reduction in the number of vertices… what am I doing wrong? Thanks!