//
#include "SMESH_Filter_i.hxx"
-#include "SMESH_Gen_i.hxx"
-#include "SMESH_PythonDump.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 <SALOMEDS_wrap.hxx>
#include <BRep_Tool.hxx>
#include <Geom_CylindricalSurface.hxx>
{
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;
}
}
}
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);
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();