From e8bb75d6c6e460d4d8df1392fbac644ca9330541 Mon Sep 17 00:00:00 2001 From: enk Date: Wed, 5 Jul 2006 14:49:36 +0000 Subject: [PATCH] Fix for bug PAL12711 and PAL12710. --- src/VTKViewer/VTKViewer_ConvexTool.cxx | 12 ++++++++++-- src/VTKViewer/VTKViewer_ConvexTool.h | 3 +++ 2 files changed, 13 insertions(+), 2 deletions(-) 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(); + }; -- 2.39.2