X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_Filter_i.cxx;h=f7040c5abbea6916a6efc1c672d8a54192e68fa3;hp=fc5314b8cbf339ae8721f9bd3ab80bd492256889;hb=9a54694a0ab1e5cbc558a35c4606ceea4f7af2ef;hpb=1067ffa6e7e5c394e3a1b17219d8b355a57607cd diff --git a/src/SMESH_I/SMESH_Filter_i.cxx b/src/SMESH_I/SMESH_Filter_i.cxx index fc5314b8c..f7040c5ab 100644 --- a/src/SMESH_I/SMESH_Filter_i.cxx +++ b/src/SMESH_I/SMESH_Filter_i.cxx @@ -18,24 +18,23 @@ // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// // SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses // File : SMESH_Filter_i.cxx // Author : Alexey Petrov, OCC // Module : SMESH -// -#include "SMESH_Filter_i.hxx" -#include "SMESH_Gen_i.hxx" -#include "SMESH_PythonDump.hxx" +#include "SMESH_Filter_i.hxx" +#include "SMDS_ElemIterator.hxx" #include "SMDS_Mesh.hxx" -#include "SMDS_MeshNode.hxx" #include "SMDS_MeshElement.hxx" -#include "SMDS_ElemIterator.hxx" - +#include "SMDS_MeshNode.hxx" #include "SMESHDS_Mesh.hxx" +#include "SMESH_Gen_i.hxx" +#include "SMESH_PythonDump.hxx" + +#include #include #include @@ -496,7 +495,9 @@ static TopoDS_Shape getShapeByName( const char* theName ) { CORBA::Object_var anObj = aList[ 0 ]->GetObject(); GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow( anObj ); - return aSMESHGen->GeomObjectToShape( aGeomObj ); + TopoDS_Shape shape = aSMESHGen->GeomObjectToShape( aGeomObj ); + SALOME::UnRegister( aList ); // UnRegister() objects in aList + return shape; } } } @@ -509,7 +510,7 @@ static TopoDS_Shape getShapeByID (const char* theID) SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen(); SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy(); if ( !aStudy->_is_nil() ) { - SALOMEDS::SObject_var aSObj = aStudy->FindObjectID(theID); + SALOMEDS::SObject_wrap aSObj = aStudy->FindObjectID(theID); if ( !aSObj->_is_nil() ) { CORBA::Object_var obj = aSObj->GetObject(); GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(obj); @@ -526,7 +527,7 @@ static std::string getShapeNameByID (const char* theID) SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen(); SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy(); if ( !aStudy->_is_nil() ) { - SALOMEDS::SObject_var aSObj = aStudy->FindObjectID(theID); + SALOMEDS::SObject_wrap aSObj = aStudy->FindObjectID(theID); if ( !aSObj->_is_nil() ) { CORBA::String_var name = aSObj->GetName(); return name.in(); @@ -578,12 +579,12 @@ CORBA::Double NumericalFunctor_i::GetValue( CORBA::Long theId ) return myNumericalFunctorPtr->GetValue( theId ); } -SMESH::Histogram* NumericalFunctor_i::GetHistogram(CORBA::Short nbIntervals) +SMESH::Histogram* NumericalFunctor_i::GetHistogram(CORBA::Short nbIntervals, CORBA::Boolean isLogarithmic) { std::vector nbEvents; std::vector funValues; std::vector elements; - myNumericalFunctorPtr->GetHistogram(nbIntervals,nbEvents,funValues,elements); + myNumericalFunctorPtr->GetHistogram(nbIntervals,nbEvents,funValues,elements,0,isLogarithmic); #ifdef WIN32 nbIntervals = CORBA::Short( min( nbEvents.size(), funValues.size() - 1));