From: enk Date: Wed, 5 Jul 2006 14:49:36 +0000 (+0000) Subject: Fix for bug PAL12711 and PAL12710. X-Git-Tag: T3_2_1_pre~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e8bb75d6c6e460d4d8df1392fbac644ca9330541;p=modules%2Fgui.git Fix for bug PAL12711 and PAL12710. --- diff --git a/src/VTKViewer/VTKViewer_ConvexTool.cxx b/src/VTKViewer/VTKViewer_ConvexTool.cxx index b8064df2b..7c66519fd 100644 --- a/src/VTKViewer/VTKViewer_ConvexTool.cxx +++ b/src/VTKViewer/VTKViewer_ConvexTool.cxx @@ -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); } diff --git a/src/VTKViewer/VTKViewer_ConvexTool.h b/src/VTKViewer/VTKViewer_ConvexTool.h index 2bf024d5e..e6de8106b 100644 --- a/src/VTKViewer/VTKViewer_ConvexTool.h +++ b/src/VTKViewer/VTKViewer_ConvexTool.h @@ -197,6 +197,9 @@ class VTKVIEWER_EXPORT VTKViewer_DelaunayTriangulator : public VTKViewer_Triangu virtual vtkIdType GetConnectivity(vtkIdType thePntId); + + void UpdatePolyData(); + };