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.
Dendro_invalid_mesh_PF-Rebuild.gh (23.0 KB)
Here is a C# component that merges vertices without Pufferfish.
Dendro_invalid_mesh_fix.gh (13.9 KB)
And to link with another discussion
“Simple” C# codes are quite the same, but I made some mistake, so I correct it here
Mesh result = mesh.DuplicateMesh();
Nice, thanks to you and @ryein for the help (if it’s not obvious, I am super rough at C#)
Mesh result = Mcheck.DuplicateMesh();
M = Mcheck;
Dendro_invalid_mesh_fix_02.gh (15.4 KB)