mesh.repair function

Repair of a mesh