diff -up vcglib-1.0.1/vcg/complex/algorithms/create/resampler.h.stdmin vcglib-1.0.1/vcg/complex/algorithms/create/resampler.h --- vcglib-1.0.1/vcg/complex/algorithms/create/resampler.h.stdmin 2017-07-20 11:11:49.636640240 -0400 +++ vcglib-1.0.1/vcg/complex/algorithms/create/resampler.h 2017-07-20 11:12:14.835048273 -0400 @@ -23,6 +23,7 @@ #ifndef __VCG_MESH_RESAMPLER #define __VCG_MESH_RESAMPLER +#include #include #include #include @@ -251,7 +252,7 @@ class Resampler : public BasicGridvoxel[0],this->voxel[1]),this->voxel[2]); + float max_dist = std::min(std::min(this->voxel[0],this->voxel[1]),this->voxel[2]); int flippedCnt=0; int flippedTot=0; int flippedTimes=0;