Automatic surface mesh generation for discrete models: A complete and automatic pipeline based on reparameterization