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

0025660: Project command produce wrong 2dcurve

Changed starting point of Newton optimization.

Test case for issue CR25660
This commit is contained in:
aml
2015-01-15 15:33:15 +03:00
committed by bugmaster
parent fa89e0828b
commit 4f0d73a918
2 changed files with 62 additions and 7 deletions

View File

@@ -756,18 +756,24 @@ void ProjLib_CompProjectedCurve::Init()
t = Triple.X() + Step;
if (t > LastU) t = LastU;
Standard_Real U0, V0;
gp_Pnt2d aLowBorder(mySurface->FirstUParameter(),mySurface->FirstVParameter());
gp_Pnt2d aUppBorder(mySurface->LastUParameter(), mySurface->LastVParameter());
gp_Pnt2d aTol(myTolU, myTolV);
//Here we are trying to prolong continuous part
while (t <= LastU && new_part)
{
Standard_Real U0, V0;
U0 = Triple.Y();
V0 = Triple.Z();
U0 = Triple.Y() + (Triple.Y() - prevTriple.Y());
V0 = Triple.Z() + (Triple.Z() - prevTriple.Z());
// adjust U0 to be in [mySurface->FirstUParameter(),mySurface->LastUParameter()]
U0 = Min(Max(U0, aLowBorder.X()), aUppBorder.X());
// adjust V0 to be in [mySurface->FirstVParameter(),mySurface->LastVParameter()]
V0 = Min(Max(V0, aLowBorder.Y()), aUppBorder.Y());
aPrjPS.Perform(t, U0, V0, gp_Pnt2d(myTolU, myTolV),
gp_Pnt2d(mySurface->FirstUParameter(),mySurface->FirstVParameter()),
gp_Pnt2d(mySurface->LastUParameter(), mySurface->LastVParameter()),
FuncTol, Standard_True);
aPrjPS.Perform(t, U0, V0, aTol,
aLowBorder, aUppBorder, FuncTol, Standard_True);
if(!aPrjPS.IsDone())
{