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

0026351: Wrong result found by the projection algorithm

C2 continuity intervals changed to Knots intervals in case of Bspline curve.
Fixed incorrect extremaPC usage.

Test case for issue CR26351
Update of test-cases according to the new behavior
This commit is contained in:
aml
2015-06-24 15:44:28 +03:00
committed by bugmaster
parent e03bdee2e1
commit c8bf1eb747
43 changed files with 405 additions and 203 deletions

View File

@@ -494,9 +494,16 @@ void ProjLib_ProjectedCurve::Load(const Handle(Adaptor3d_HCurve)& C)
Extrema_ExtPC anExtr(P, mySurface->BasisCurve()->Curve(), myTolerance);
if (anExtr.IsDone())
{
Standard_Integer anIndex = 1;
while (!anExtr.IsMin(anIndex) && anIndex < anExtr.NbExt()) anIndex++;
Vsingular[0] = anExtr.Point(anIndex).Parameter();
Standard_Real aMinDist = RealLast();
for(Standard_Integer anIdx = 1; anIdx <= anExtr.NbExt(); anIdx++)
{
if (anExtr.IsMin(anIdx) &&
anExtr.SquareDistance(anIdx) < aMinDist)
{
aMinDist = anExtr.SquareDistance(anIdx);
Vsingular[0] = anExtr.Point(anIdx).Parameter();
}
}
}
else
Vsingular[0] = ElCLib::Parameter(L, P);
@@ -513,9 +520,16 @@ void ProjLib_ProjectedCurve::Load(const Handle(Adaptor3d_HCurve)& C)
Extrema_ExtPC anExtr(P, mySurface->BasisCurve()->Curve(), myTolerance);
if (anExtr.IsDone())
{
Standard_Integer anIndex = 1;
while (!anExtr.IsMin(anIndex) && anIndex < anExtr.NbExt()) anIndex++;
Vsingular[1] = anExtr.Point(anIndex).Parameter();
Standard_Real aMinDist = RealLast();
for(Standard_Integer anIdx = 1; anIdx <= anExtr.NbExt(); anIdx++)
{
if (anExtr.IsMin(anIdx) &&
anExtr.SquareDistance(anIdx) < aMinDist)
{
aMinDist = anExtr.SquareDistance(anIdx);
Vsingular[1] = anExtr.Point(anIdx).Parameter();
}
}
}
else
Vsingular[1] = ElCLib::Parameter(L, P);