Salome HOME
merge V5_1_4
[modules/smesh.git] / src / SMESH_I / SMESH_Filter_i.cxx
index 933239e59e64e2eb57be57092f5ec425a7f0aaa6..969ffb61387adfbe9d2b6a7ae0149770f5bf8651 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
+//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -19,6 +19,7 @@
 //
 //  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
@@ -2099,7 +2100,7 @@ SetMesh( SMESH_Mesh_ptr theMesh )
   if(!CORBA::is_nil(myMesh))
     myMesh->Destroy();
 
-  myMesh = theMesh;
+  myMesh = SMESH_Mesh::_duplicate( theMesh );
   TPythonDump()<<this<<".SetMesh("<<theMesh<<")";
 }
 
@@ -2436,13 +2437,13 @@ CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria
       pd << "aCriterion = SMESH.Filter.Criterion(" << aCriterion << "," << aCompare
          << "," << aThreshold << ",'" << aThresholdStr;
       if (aThresholdID && strlen(aThresholdID))
-       //pd << "',salome.ObjectToID(" << aThresholdID
+        //pd << "',salome.ObjectToID(" << aThresholdID
         pd << "','" << aThresholdID
-          << "'," << aUnary << "," << aBinary << "," << aTolerance
-          << "," << aTypeOfElem << "," << aPrecision << ")";
+           << "'," << aUnary << "," << aBinary << "," << aTolerance
+           << "," << aTypeOfElem << "," << aPrecision << ")";
       else
-       pd << "',''," << aUnary << "," << aBinary << "," << aTolerance
-          << "," << aTypeOfElem << "," << aPrecision << ")";
+        pd << "',''," << aUnary << "," << aBinary << "," << aTolerance
+           << "," << aTypeOfElem << "," << aPrecision << ")";
     }
 
     SMESH::Predicate_ptr aPredicate = SMESH::Predicate::_nil();
@@ -2534,7 +2535,7 @@ CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria
         {
           SMESH::LyingOnGeom_ptr tmpPred = aFilterMgr->CreateLyingOnGeom();
           tmpPred->SetElementType( aTypeOfElem );
-         tmpPred->SetShape( aThresholdID, aThresholdStr );
+          tmpPred->SetShape( aThresholdID, aThresholdStr );
           tmpPred->SetTolerance( aTolerance );
           aPredicate = tmpPred;
         }