diff --git a/wrap/igl/smooth_field.h b/wrap/igl/smooth_field.h index e507ceb9..8c17e4a1 100644 --- a/wrap/igl/smooth_field.h +++ b/wrap/igl/smooth_field.h @@ -492,13 +492,21 @@ public: { //for the moment only cross and line field - //initialize direction by curvature if needed -// if ((SParam.alpha_curv>0)|| -// (SParam.sharp_thr>0)|| -// (SParam.curv_thr>0)) +// //initialize direction by curvature if needed + if ((SParam.alpha_curv>0)|| + (SParam.sharp_thr>0)|| + (SParam.curv_thr>0)) + { + InitByCurvature(mesh,SParam.curvRing); + SelectConstraints(mesh,SParam); + } + else + { + SelectConstraints(mesh,SParam); + vcg::tri::CrossField::PropagateFromSelF(mesh); + } + - InitByCurvature(mesh,SParam.curvRing); - SelectConstraints(mesh,SParam); //then do the actual smooth SmoothDirections(mesh,SParam.Ndir,SParam.SmoothM,true,SParam.alpha_curv); }