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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user