diff --git a/vcg/space/polygon3.h b/vcg/space/polygon3.h index 7444c561..ce2629b9 100644 --- a/vcg/space/polygon3.h +++ b/vcg/space/polygon3.h @@ -191,7 +191,7 @@ typename PolygonType::ScalarType PolyNormDeviation(const PolygonType &F) AvgNorm.Normalize(); - if (!CheckNormalizedCoords(AvgNorm))return 1; + //if (!CheckNormalizedCoords(AvgNorm))return 1; ScalarType Dev=0; for (int i=0;i void GetPolyTemplatePos(const PolygonType &F, std::vector &TemplatePos, - typename PolygonType::ScalarType TargetArea=-1, bool force_isotropy=false) { typedef typename PolygonType::FaceType FaceType; @@ -440,6 +439,13 @@ void GetPolyTemplatePos(const PolygonType &F, dirX.Normalize(); dirY.Normalize(); dirZ.Normalize(); +// CoordType dirXN=dirX;dirXN.Normalize(); +// CoordType dirYN=dirY;dirYN.Normalize(); +// CoordType dirZN=dirZ;dirZN.Normalize(); + +// dirX=dirX*0.8+dirXN*0.2; +// dirY=dirY*0.8+dirYN*0.2; +// dirZ=dirZ*0.8+dirZN*0.2; } ///set the Rotation matrix @@ -486,8 +492,8 @@ void GetPolyTemplatePos(const PolygonType &F, ///add displacement along Z for (size_t i=0;i -typename PolygonType::ScalarType PolyAspectRatio(const PolygonType &F) +typename PolygonType::ScalarType PolyAspectRatio(const PolygonType &F, + bool isotropic=false) { typedef typename PolygonType::FaceType FaceType; typedef typename PolygonType::CoordType CoordType; typedef typename PolygonType::ScalarType ScalarType; std::vector TemplatePos; - GetPolyTemplatePos(F,TemplatePos); + GetPolyTemplatePos(F,TemplatePos,isotropic); ScalarType diff=0; assert((int)TemplatePos.size()==F.VN());