]> OCCT Git - occt-copy.git/commitdiff
Test commit CR0_FixS_22-021
authorifv <ifv@opencascade.com>
Tue, 16 Jun 2020 11:48:14 +0000 (14:48 +0300)
committerifv <ifv@opencascade.com>
Tue, 16 Jun 2020 11:48:14 +0000 (14:48 +0300)
src/IntTools/IntTools_TopolTool.cxx

index 863e0687fcb4894efb77e1cde8aa1e4347b11783..9c5eaf65a124f8e0db3f2c46ac540d58a78bc84d 100644 (file)
@@ -246,6 +246,20 @@ void IntTools_TopolTool::ComputeSamplePoints()
     }
     if(nbsu < 10) nbsu = 10;
     if(nbsv < 10) nbsv = 10;
+    // Check anisotropy
+    Standard_Real anULen = (usup - uinf) / myS->UResolution(1.);
+    Standard_Real anVLen = (vsup - vinf) / myS->VResolution(1.);
+    Standard_Real aRatio = anULen / anVLen;
+    if (aRatio >= 10.)
+    {
+      nbsu *= 5;
+      nbsu = Min(nbsu, aMaxNbSample);
+    }
+    else if (aRatio <= 0.1 )
+    {
+      nbsv *= 5;
+      nbsv = Min(nbsv, aMaxNbSample);
+    }
   }
     break;
   case GeomAbs_SurfaceOfExtrusion: {