]> OCCT Git - occt-copy.git/commitdiff
0032266: Modeling Data - Projection of curve on surface is wrong CR32266
authorifv <ifv@opencascade.com>
Tue, 30 Mar 2021 08:37:44 +0000 (11:37 +0300)
committerifv <ifv@opencascade.com>
Tue, 30 Mar 2021 08:37:44 +0000 (11:37 +0300)
ProjLib_ComputeApproxOnPolarSurface.cxx : control of validity aLocateExtPS is added

src/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx

index 58f9516a4696ceaeb74de905e008200828cd24a3..0d087e3cce23e49d04d01b741e169448f4517323 100644 (file)
@@ -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