]> OCCT Git - occt.git/commitdiff
0025824: Infinite presentations should be excluded when computing gravity center...
authorvsr <vsr@opencascade.com>
Thu, 12 Feb 2015 13:42:58 +0000 (16:42 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 19 Feb 2015 12:04:57 +0000 (15:04 +0300)
src/V3d/V3d_View.cxx

index d261682333f9090b0b1a4bfd975c2ff826a998fd..fb7e4578e7786213008e335f7cbbc5defddb0448 100644 (file)
@@ -2129,7 +2129,7 @@ void V3d_View::Gravity (Standard_Real& theX,
     }
 
     Bnd_Box aBox = aStruct->MinMaxValues();
-    if (aBox.IsVoid())
+    if (aBox.IsVoid() || aStruct->IsInfinite())
     {
       continue;
     }
@@ -2170,7 +2170,7 @@ void V3d_View::Gravity (Standard_Real& theX,
       }
 
       Bnd_Box aBox = aStruct->MinMaxValues();
-      if (aBox.IsVoid())
+      if (aBox.IsVoid() || aStruct->IsInfinite())
       {
         continue;
       }