added k-neighbors instead of radius to make it more stable

This commit is contained in:
nico 2019-05-06 18:17:17 +10:00
parent eab154fca5
commit 565f4c4f53
1 changed files with 2 additions and 2 deletions

View File

@ -406,7 +406,8 @@ public:
Eigen::MatrixXd PD1,PD2,PV1,PV2;
MeshToMatrix<MeshType>::GetTriMeshData(mesh,F,V);
igl::principal_curvature(V,F,PD1,PD2,PV1,PV2,Nring);
igl::principal_curvature(V,F,PD1,PD2,PV1,PV2,Nring,true);
//then copy curvature per vertex
for (size_t i=0;i<mesh.vert.size();i++)
@ -497,7 +498,6 @@ public:
// (SParam.curv_thr>0))
InitByCurvature(mesh,SParam.curvRing);
SelectConstraints(mesh,SParam);
//then do the actual smooth
SmoothDirections(mesh,SParam.Ndir,SParam.SmoothM,true,SParam.alpha_curv);