diff --git a/src/meshlabplugins/filter_texture/filter_texture.cpp b/src/meshlabplugins/filter_texture/filter_texture.cpp index 86639f395..959f45d95 100644 --- a/src/meshlabplugins/filter_texture/filter_texture.cpp +++ b/src/meshlabplugins/filter_texture/filter_texture.cpp @@ -1019,6 +1019,7 @@ void FilterTexturePlugin::transferToTexture( CheckError(!img.save(textName, "PNG"), "Specified file cannot be saved: " + textName); log("Dummy Texture \"%s\" Created ", textName.toStdString().c_str()); assert(textFile.exists()); + textFile.remove(); } //Assign texture diff --git a/src/meshlabplugins/filter_texture/rastering.h b/src/meshlabplugins/filter_texture/rastering.h index bf69763a2..ba9e1489a 100644 --- a/src/meshlabplugins/filter_texture/rastering.h +++ b/src/meshlabplugins/filter_texture/rastering.h @@ -267,6 +267,8 @@ public: startPt[1] = bary[0]*f.cV(0)->cP().Y()+bary[1]*f.cV(1)->cP().Y()+bary[2]*f.cV(2)->cP().Y(); startPt[2] = bary[0]*f.cV(0)->cP().Z()+bary[1]*f.cV(1)->cP().Z()+bary[2]*f.cV(2)->cP().Z(); + if (!srcMesh->bbox.IsInEx(startPt)) return; + // Retrieve closest point on source mesh if(usePointCloudSampling) @@ -274,7 +276,7 @@ public: CMeshO::VertexType *nearestV=0; CMeshO::ScalarType dist=dist_upper_bound; nearestV = vcg::tri::GetClosestVertex(*srcMesh,unifGridVert,startPt,dist_upper_bound,dist); //(PDistFunct,markerFunctor,startPt,dist_upper_bound,dist,closestPt); - //if(cb) cb(sampleCnt++*100/sampleNum,"Resampling Vertex attributes"); + //if(cb) cb(sampleCnt++*100/sampleNum,"Resampling Vertex attributes"); //if(storeDistanceAsQualityFlag) p.Q() = dist; if(dist == dist_upper_bound) return ;