Dendro Invalid Mesh - Pufferfish Mesh Rebuild Fix

If you have used the Dendro Volume to Mesh component you may have gotten an “Invalid Mesh” on complex outputs. This appears to be a result of mesh vertices being generated out of Dendro that are closer than the minimum tolerances defined in Rhino (possible floating point rounding error).

Saw this mentioned on another post but a quick solution that seems to solve this issue is to use the Pufferfish Rebuild Mesh component with “Merge Vertices” enabled. This fix is pretty computationally efficient compared to other options like using Align Vertices.

Included cluster bypasses the Merge component if the mesh is valid. (23.0 KB)


Here is a C# component that merges vertices without Pufferfish. (13.9 KB)

1 Like

And to link with another discussion

“Simple” C# codes are quite the same, but I made some mistake, so I correct it here
Charlie one

   M.Vertices.CombineIdentical(true, true);

Mine (corrected)

Mesh result = mesh.DuplicateMesh();
result.Vertices.CombineIdentical(true, true);
1 Like

Nice, thanks to you and @ryein for the help (if it’s not obvious, I am super rough at C#)

 if (!Mcheck.IsValid)
      Mesh result = Mcheck.DuplicateMesh();
      Mcheck.Vertices.CombineIdentical(true, true);
    M = Mcheck; (15.4 KB)

1 Like