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

0025876: Geom2dAPI_InterCurveCurve returns only one intersection point instead of two intersection points

Extend domain of circle to include all possible solutions.

Test case for issue CR25876

Correct test case

Period 'jump" handling algorithm changed.
This commit is contained in:
msv
2015-03-12 12:30:18 +03:00
committed by bugmaster
parent b11a99d9c1
commit 3062fdf993
2 changed files with 43 additions and 9 deletions

View File

@@ -719,7 +719,11 @@ void IntCurve_IntConicConic::Perform(const gp_Circ2d& Circle1
PeriodicInterval C1Domain(DomainCirc1);
//-- On se ramene entre 0 et 2PI
Standard_Real deltat = C1Domain.Bsup-C1Domain.Binf;
if(deltat>=PIpPI) { deltat=PIpPI-1e-14; }
if(deltat>=PIpPI)
{
// make deltat not including the upper limit
deltat=NextAfter(PIpPI, 0.);
}
while(C1Domain.Binf >= PIpPI)
C1Domain.Binf-=PIpPI;
@@ -732,8 +736,8 @@ void IntCurve_IntConicConic::Perform(const gp_Circ2d& Circle1
deltat = C2Domain.Bsup-C2Domain.Binf;
if(deltat>=PIpPI)
{
deltat=PIpPI-1e-14;
}
deltat=NextAfter(PIpPI, 0.);
}
while(C2Domain.Binf >= PIpPI)
C2Domain.Binf-=PIpPI;
@@ -1027,19 +1031,13 @@ void IntCurve_IntConicConic::Perform(const gp_Circ2d& Circle1
if(Opposite)
{
if(nbsol!=3)
{
if(C2inf<C2sup)
C2inf+=PIpPI;
}
}
else
{
if(nbsol!=3)
{
if(C2sup<C2inf)
C2sup+=PIpPI;
}
}
IntRes2d_IntersectionPoint NewPoint2(P1b,C1sup,C2sup,T1b,T2b,Standard_False);