[PATCH] vtkMeshQuality::TriangleMinAngle() repports wrong value
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
(this is a copy of a mail sent to vtk-users ML, but this mail had no answer)
We found a bug in vtk 5.0.3, in the method vtkMeshQuality::TriangleMinAngle(). the method computes the 3 triangle angles : alpha, beta and gamma, but the last one is incorrectly computed. I think it computes PI-gamma instead of gamma. This bug can sometimes result in a minimal angle greater than 60 degrees, which is impossible.
I saw that the class vtkMeshQuality has changed a lot in the current CVS, but the following patch could come handy for an update of vtk 5.0.3:
RCS file: /cvsroot/VTK/VTK/Graphics/vtkMeshQuality.cxx,v retrieving revision 1.31 diff -r1.31 vtkMeshQuality.cxx 670c670 < gamma = acos(vtkMath::Dot(a,b) / sqrt(a2 * b2));
gamma = acos(-vtkMath::Dot(a,b) / sqrt(a2 * b2));