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

0027029: Possible regression in test de iges_1 L6 because of fix for issue 26837

In BRepLib::SameRange, allow exceeding curve range for periodic curves.

Test cases returned to the state before fix for issue #26837.
This commit is contained in:
nbv
2015-12-23 17:43:19 +03:00
committed by abv
parent 86e810711f
commit 9a7b15dc60
3 changed files with 25 additions and 10 deletions

View File

@@ -955,10 +955,26 @@ void GeomLib::SameRange(const Standard_Real Tolerance,
}
else
{ // On segmente le resultat
Standard_Real Udeb = Max(CurvePtr->FirstParameter(), FirstOnCurve);
Standard_Real Ufin = Min(CurvePtr->LastParameter(), LastOnCurve);
Handle(Geom2d_TrimmedCurve) TC =
new Geom2d_TrimmedCurve( CurvePtr, Udeb, Ufin );
Handle(Geom2d_TrimmedCurve) TC;
Handle(Geom2d_Curve) aCCheck = CurvePtr;
if(aCCheck->IsKind(STANDARD_TYPE(Geom2d_TrimmedCurve)))
{
aCCheck = Handle(Geom2d_TrimmedCurve)::DownCast(aCCheck)->BasisCurve();
}
if(aCCheck->IsPeriodic())
{
TC = new Geom2d_TrimmedCurve( CurvePtr, FirstOnCurve, LastOnCurve );
}
else
{
const Standard_Real Udeb = Max(CurvePtr->FirstParameter(), FirstOnCurve);
const Standard_Real Ufin = Min(CurvePtr->LastParameter(), LastOnCurve);
TC = new Geom2d_TrimmedCurve( CurvePtr, Udeb, Ufin );
}
//
Handle(Geom2d_BSplineCurve) BS =
Geom2dConvert::CurveToBSplineCurve(TC);