diff --git a/src/OpenMesh/Tools/Decimater/McDecimaterT.cc b/src/OpenMesh/Tools/Decimater/McDecimaterT.cc index 50e9e978..e7761b8b 100644 --- a/src/OpenMesh/Tools/Decimater/McDecimaterT.cc +++ b/src/OpenMesh/Tools/Decimater/McDecimaterT.cc @@ -141,11 +141,6 @@ size_t McDecimaterT::decimate(size_t _n_collapses) { tmpHandle = typename Mesh::HalfedgeHandle( (double(rand()) / double(RAND_MAX) ) * double(mesh_.n_halfedges()-1) ); #endif - // Only take valid Handles! - if ( tmpHandle.idx() >=mesh_.n_halfedges() ) { - continue; - } - // if it is not deleted, we analyse it if ( ! mesh_.status(tmpHandle).deleted() ) { @@ -268,11 +263,6 @@ size_t McDecimaterT::decimate_to_faces(size_t _nv, size_t _nf) { tmpHandle = typename Mesh::HalfedgeHandle( ( double(rand()) / double(RAND_MAX) ) * double(mesh_.n_halfedges() - 1)); #endif - // Only take valid Handles! - if ( tmpHandle.idx() >=mesh_.n_halfedges() ) { - continue; - } - // if it is not deleted, we analyse it if (!mesh_.status(tmpHandle).deleted()) { @@ -411,11 +401,6 @@ size_t McDecimaterT::decimate_constraints_only(float _factor) { tmpHandle = typename Mesh::HalfedgeHandle(int(rand() * randomNormalizer ) ); #endif - // Only take valid Handles! - if ( tmpHandle.idx() >=mesh_.n_halfedges() ) { - continue; - } - // if it is not deleted, we analyze it if (!mesh_.status(mesh_.edge_handle(tmpHandle)).deleted()) {