]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix for bug PAL12711 and PAL12710.
authorenk <enk@opencascade.com>
Wed, 5 Jul 2006 14:49:36 +0000 (14:49 +0000)
committerenk <enk@opencascade.com>
Wed, 5 Jul 2006 14:49:36 +0000 (14:49 +0000)
src/VTKViewer/VTKViewer_ConvexTool.cxx
src/VTKViewer/VTKViewer_ConvexTool.h

index b8064df2bce10c9e117dea32397e8d5b4b7cc86b..7c66519fdb9f1d9e775ee79c726e6503c7232bf6 100644 (file)
@@ -524,10 +524,15 @@ VTKViewer_DelaunayTriangulator
     }
   }
 
+  return myPoints;
+}
+
+void
+VTKViewer_DelaunayTriangulator
+::UpdatePolyData()
+{
   myGeometryFilter->Update();
   myPolyData = myGeometryFilter->GetOutput();
-
-  return myPoints;
 }
 
 vtkIdType 
@@ -548,6 +553,7 @@ vtkFloatingPointType
 VTKViewer_DelaunayTriangulator
 ::GetCellLength()
 {
+  if(!myPolyData) this->UpdatePolyData();
   return myPolyData->GetLength();
 }
 
@@ -555,6 +561,7 @@ vtkIdType
 VTKViewer_DelaunayTriangulator
 ::GetNumFaces()
 {
+  if(!myPolyData) this->UpdatePolyData();
   return myPolyData->GetNumberOfCells();
 }
 
@@ -562,6 +569,7 @@ vtkCell*
 VTKViewer_DelaunayTriangulator
 ::GetFace(vtkIdType theFaceId)
 {
+  if(!myPolyData) this->UpdatePolyData();
   return myPolyData->GetCell(theFaceId);
 }
 
index 2bf024d5e0fc1d1a7bd86b948ab215259e59e2dd..e6de8106b90f72a9eed3e5015326239405607b1c 100644 (file)
@@ -197,6 +197,9 @@ class VTKVIEWER_EXPORT VTKViewer_DelaunayTriangulator : public VTKViewer_Triangu
   virtual
   vtkIdType 
   GetConnectivity(vtkIdType thePntId);
+
+  void UpdatePolyData();
+  
 };