If you go in the script from this discussion there are some rhinocommon command in c# to cure meshes. It works on some problems.