diff --git a/src/meshlabplugins/filter_sampling/filter_sampling.cpp b/src/meshlabplugins/filter_sampling/filter_sampling.cpp index 02b5cfd3f..56e836866 100644 --- a/src/meshlabplugins/filter_sampling/filter_sampling.cpp +++ b/src/meshlabplugins/filter_sampling/filter_sampling.cpp @@ -776,6 +776,8 @@ switch(ID(action)) mm->updateDataMask(curMM); BaseSampler mps(&(mm->cm)); + mps.perFaceNormal = par.getBool("PerFaceNormal"); + if(par.getBool("EdgeSampling")) { tri::SurfaceSampling::EdgeMontecarlo(curMM->cm,mps,par.getInt("SampleNum"),false); @@ -1237,7 +1239,7 @@ switch(ID(action)) Point3i volumeDim; Box3m volumeBox = baseMesh->cm.bbox; - volumeBox.Offset(volumeBox.Diag()/10.0f+offsetThr); + volumeBox.Offset(volumeBox.Diag()/10.0f+abs(offsetThr)); BestDim(volumeBox , voxelSize, volumeDim ); Log("Resampling mesh using a volume of %i x %i x %i",volumeDim[0],volumeDim[1],volumeDim[2]); diff --git a/src/meshlabplugins/filter_texture/filter_texture.cpp b/src/meshlabplugins/filter_texture/filter_texture.cpp index 05b3d5003..90d23b82b 100644 --- a/src/meshlabplugins/filter_texture/filter_texture.cpp +++ b/src/meshlabplugins/filter_texture/filter_texture.cpp @@ -1045,7 +1045,7 @@ bool FilterTexturePlugin::applyFilter(QAction *filter, MeshDocument &md, RichPar assert(srcMesh!=NULL); assert(trgMesh!=NULL); - CheckError(trgMesh->cm.fn == 0, "Source mesh requires to have faces"); + CheckError(srcMesh->cm.fn == 0, "Source mesh requires to have faces"); // Check whether is possible to access source mesh texture CheckError(!srcMesh->hasDataMask(MeshModel::MM_WEDGTEXCOORD), "Source mesh doesn't have Per Wedge Texture Coordinates");