]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/SMESH_I/SMESH_Filter_i.cxx
Salome HOME
0021347: [CEA 497] Visualisation into SMESH and VISU of hexagonal prism cells (MED_OC...
[modules/smesh.git] / src / SMESH_I / SMESH_Filter_i.cxx
index 1728f7dee2545cb0d0ec6eb2119bf2c288b1138d..87aaccae9702d1fb7ef8277855cc8c2e84cdb62f 100644 (file)
@@ -34,7 +34,6 @@
 #include "SMDS_MeshNode.hxx"
 #include "SMDS_MeshElement.hxx"
 #include "SMDS_ElemIterator.hxx"
-#include "SMDS_VolumeTool.hxx"
 
 #include "SMESHDS_Mesh.hxx"
 
@@ -2294,6 +2293,8 @@ void Filter_i::SetPredicate( Predicate_ptr thePredicate )
   {
     myFilter.SetPredicate( myPredicate->GetPredicate() );
     myPredicate->Register();
+    if ( const SMDS_Mesh* aMesh = MeshPtr2SMDSMesh(myMesh))
+      myPredicate->GetPredicate()->SetMesh( aMesh );
     TPythonDump()<<this<<".SetPredicate("<<myPredicate<<")";
   }
   std::list<TPredicateChangeWaiter*>::iterator i = myWaiters.begin();
@@ -2326,6 +2327,10 @@ SetMesh( SMESH_Mesh_ptr theMesh )
 
   myMesh = SMESH_Mesh::_duplicate( theMesh );
   TPythonDump()<<this<<".SetMesh("<<theMesh<<")";
+
+  if ( myPredicate )
+    if ( const SMDS_Mesh* aMesh = MeshPtr2SMDSMesh(theMesh))
+      myPredicate->GetPredicate()->SetMesh( aMesh );
 }
 
 SMESH::long_array*
@@ -3100,6 +3105,8 @@ Predicate_ptr Filter_i::GetPredicate()
   else
   {
     SMESH::Predicate_var anObj = myPredicate->_this();
+    // if ( SMESH::Functor_i* fun = SMESH::DownCast<SMESH::Functor_i*>( anObj ))
+    //   TPythonDump() << fun << " = " << this << ".GetPredicate()";
     return anObj._retn();
   }
 }