Salome HOME
First step for the "21793: [CEA 625] Clipping : from coordinates or from bounding...
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_VTKUtils.cxx
index efc82df3d6272028d547ab4674113e5ed537c7b7..4a72abca58cbc361903add17cdef0ef78606bb1c 100644 (file)
@@ -1396,6 +1396,20 @@ namespace SMESH
                                        double theDist,
                                        double theBounds[6],
                                        double theOrigin[3] )
+  {
+    bool anIsOk = false;
+    anIsOk = ComputeBounds( theActorList, theBounds );
+
+
+    if( !anIsOk )
+      return false;
+
+    DistanceToPosition( theBounds, theNormal, theDist, theOrigin );
+    return true;
+  }
+
+  bool ComputeBounds( std::list<vtkActor*> theActorList,
+                      double theBounds[6])
   {
     bool anIsOk = false;
     theBounds[0] = theBounds[2] = theBounds[4] = VTK_DOUBLE_MAX;
@@ -1416,12 +1430,7 @@ namespace SMESH
         }
       }
     }
-
-    if( !anIsOk )
-      return false;
-    
-    DistanceToPosition( theBounds, theNormal, theDist, theOrigin );
-    return true;
+    return anIsOk;
   }
 
 #ifndef DISABLE_PLOT2DVIEWER