1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0027762: Incorrect result of General Fuse operation

The algorithm of finding of extrema solutions of a point and a torus in Extrema_ExtPElS has been corrected for the case of torus having major radius equal to zero.

Test cases are added.
This commit is contained in:
msv
2016-08-11 10:23:53 +03:00
committed by bugmaster
parent 2ba9eb3059
commit 5a0fc7ce60
3 changed files with 41 additions and 2 deletions

View File

@@ -341,9 +341,10 @@ void Extrema_ExtPElS::Perform(const gp_Pnt& P,
if(O1.SquareDistance(P) < Tol) { return; }
if(O2.SquareDistance(P) < Tol) { return; }
Standard_Real V1 = OO1.AngleWithRef(gp_Vec(O1,P),OO1.Crossed(OZ));
Standard_Real V1 = OPp.AngleWithRef(gp_Vec(O1,P),OPp.Crossed(OZ));
if (V1 > -ExtPElS_MyEps && V1 < ExtPElS_MyEps) { V1 = 0.; }
Standard_Real V2 = OO2.AngleWithRef(gp_Vec(P,O2),OO2.Crossed(OZ));
OPp.Reverse();
Standard_Real V2 = OPp.AngleWithRef(gp_Vec(P,O2),OPp.Crossed(OZ));
if (V2 > -ExtPElS_MyEps && V2 < ExtPElS_MyEps) { V2 = 0.; }
if (V1 < 0.) { V1 += 2. * M_PI; }