diff --git a/vcg/complex/algorithms/parametrization/tangent_field_operators.h b/vcg/complex/algorithms/parametrization/tangent_field_operators.h index 28f557f9..85b5a029 100644 --- a/vcg/complex/algorithms/parametrization/tangent_field_operators.h +++ b/vcg/complex/algorithms/parametrization/tangent_field_operators.h @@ -22,6 +22,7 @@ ****************************************************************************/ #include #include +#include #ifndef VCG_TANGENT_FIELD_OPERATORS #define VCG_TANGENT_FIELD_OPERATORS @@ -837,6 +838,7 @@ public: ret=i; } } + assert(ret!=-1); return ret; @@ -1080,13 +1082,13 @@ public: if (fabs(rotatedDir*tF0)>fabs(rotatedDir*tF1)) { - mag1+=fabs(f.V(i)->K1()); - mag2+=fabs(f.V(i)->K2()); + mag1+=(f.V(i)->K1()); + mag2+=(f.V(i)->K2()); } else { - mag1+=fabs(f.V(i)->K2()); - mag2+=fabs(f.V(i)->K1()); + mag1+=(f.V(i)->K2()); + mag2+=(f.V(i)->K1()); } } @@ -1393,7 +1395,13 @@ public: for (size_t i=0;i