An Algorithm for Remeshing in Metal Forming