From: ifv Date: Tue, 30 Mar 2021 08:37:44 +0000 (+0300) Subject: 0032266: Modeling Data - Projection of curve on surface is wrong X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FCR32266;p=occt-copy.git 0032266: Modeling Data - Projection of curve on surface is wrong ProjLib_ComputeApproxOnPolarSurface.cxx : control of validity aLocateExtPS is added --- diff --git a/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx b/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx index 58f9516a46..0d087e3cce 100644 --- a/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx +++ b/src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx @@ -1279,17 +1279,19 @@ Handle(Adaptor2d_Curve2d) if (aLocateExtPS.IsDone()) { - if (aLocateExtPS.SquareDistance() < DistTol3d2) + aLocateExtPS.Point().Parameter(U0, V0); + U1 = U0 + usens*uperiod; + V1 = V0 + vsens*vperiod; + Pts2d(i).SetCoord(U1, V1); + + if (aLocateExtPS.SquareDistance() < DistTol3d2 && + !Pts2d(i-1).IsEqual(Pts2d(i), Precision::PApproximation())) { //OCC217 //if (aLocateExtPS.SquareDistance() < Tol3d * Tol3d) { if (aLocateExtPS.SquareDistance() > myDist) { myDist = aLocateExtPS.SquareDistance(); } - (aLocateExtPS.Point()).Parameter(U0,V0); - U1 = U0 + usens*uperiod; - V1 = V0 + vsens*vperiod; - Pts2d(i).SetCoord(U1,V1); myProjIsDone = Standard_True; } else