1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024945: Extrema_ExtPElC::Perform does not consider angular tolerance when calculates angle between two vectors

Consider angular tolerance during calculation of angle between two vectors for protection against deviations that are significantly less than tolerance.
Simplified code to reduce number of comparison
Added QA command OCC24945 and test case bugs/moddata_3/bug24945
This commit is contained in:
oan
2014-06-05 14:16:48 +04:00
committed by apn
parent 5e5b6f81c1
commit c764e804ba
3 changed files with 68 additions and 0 deletions

View File

@@ -124,6 +124,13 @@ Method:
if (OPp.Magnitude() < Tol) { return; }
Standard_Real Usol[2];
Usol[0] = C.XAxis().Direction().AngleWithRef(OPp,Axe); // -M_PI<U1<M_PI
const Standard_Real aAngTol = Precision::Angular();
if ( Usol[0] + M_PI < aAngTol )
Usol[0] = -M_PI;
else if ( Usol[0] - M_PI > -aAngTol )
Usol[0] = M_PI;
Usol[1] = Usol[0] + M_PI;
Standard_Real myuinf = Uinf;