Mesh smoothing with global optimization under constraints