Salome HOME
Regeression of the Test Case 3D_submesh/A0
authoreap <eap@opencascade.com>
Fri, 12 Nov 2010 14:31:15 +0000 (14:31 +0000)
committereap <eap@opencascade.com>
Fri, 12 Nov 2010 14:31:15 +0000 (14:31 +0000)
  fix IsMoreLocalThanPredicate after the patch for issue 0020963

src/SMESH/SMESH_HypoFilter.hxx
src/SMESH/SMESH_Hypothesis.cxx

index 0fb043e57debecc43d06911a28a3afb488a8ea4e..fc98428f54e6aa5ffccbe3d5c12c08388c6a4273 100644 (file)
@@ -78,6 +78,8 @@ class SMESH_EXPORT SMESH_HypoFilter: public SMESH_HypoPredicate
   static SMESH_HypoPredicate* HasDim(const int theDim);
   static SMESH_HypoPredicate* HasType(const int theHypType);
 
+  bool IsEmpty() const { return myPredicates.empty(); }
+
   /*!
    * \brief check aHyp or/and aShape it is assigned to
    */
index 8210f156d498f34e1334d1e9c44f9450aea8a4de..9ababf9e424017ac86b4ac398eacf5bb30f552cb 100644 (file)
@@ -151,6 +151,24 @@ void SMESH_Hypothesis::SetLibName(const char* theLibName)
   _libName = string(theLibName);
 }
 
+//=======================================================================
+//function : GetMeshByPersistentID
+//purpose  : Find a mesh with given persistent ID
+//=======================================================================
+
+SMESH_Mesh* SMESH_Hypothesis::GetMeshByPersistentID(int id)
+{
+  StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId);
+  map<int, SMESH_Mesh*>::iterator itm = itm = myStudyContext->mapMesh.begin();
+  for ( ; itm != myStudyContext->mapMesh.end(); itm++)
+  {
+    SMESH_Mesh* mesh = (*itm).second;
+    if ( mesh->GetMeshDS()->GetPersistentId() == id )
+      return mesh;
+  }
+  return 0;
+}
+
 //=============================================================================
 /*!
  *