X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FOBJECT%2FSMESH_ActorUtils.cxx;h=fdaa86c251d9f09a99fa622439afb9f024c00a6a;hb=10df32bae67a6ff227a078d4c4ccdf9b2b137ac0;hp=a5823c66f03ef69b34823b038bd0a72039e37131;hpb=e4737e85f0da6d3f90fd08f6be1c2825195fe16f;p=modules%2Fsmesh.git diff --git a/src/OBJECT/SMESH_ActorUtils.cxx b/src/OBJECT/SMESH_ActorUtils.cxx index a5823c66f..fdaa86c25 100644 --- a/src/OBJECT/SMESH_ActorUtils.cxx +++ b/src/OBJECT/SMESH_ActorUtils.cxx @@ -23,6 +23,9 @@ #include "QAD_Config.h" #include "utilities.h" +#include +#include + #ifdef _DEBUG_ static int MYDEBUG = 1; #else @@ -30,10 +33,22 @@ static int MYDEBUG = 0; #endif namespace SMESH{ + float GetFloat(const QString& theValue, float theDefault){ if(theValue.isEmpty()) return theDefault; QString aValue = QAD_CONFIG->getSetting(theValue); if(aValue.isEmpty()) return theDefault; return aValue.toFloat(); } + + void WriteUnstructuredGrid(vtkUnstructuredGrid* theGrid, const char* theFileName){ + vtkUnstructuredGridWriter* aWriter = vtkUnstructuredGridWriter::New(); + aWriter->SetFileName(theFileName); + aWriter->SetInput(theGrid); + if(theGrid->GetNumberOfCells()){ + aWriter->Write(); + } + aWriter->Delete(); + } + }