Salome HOME
Add a function to know kind of mesh element
[modules/smesh.git] / src / SMESHDS / SMESHDS_SubMesh.cxx
index 6d9ba0835e7fc45436da07e501760a4b2acbe1ee..2f1f0ca8fb3548173cde553a206686d19206b27a 100644 (file)
@@ -141,9 +141,9 @@ template<class ELEM, typename TSET> class MySetIterator:
 {
   typedef SMDS_SetIterator<ELEM, typename TSET::const_iterator > TFather;
   public:
-       MySetIterator(const TSET& s):TFather(s.begin(),s.end())
-       {
-       }
+        MySetIterator(const TSET& s):TFather(s.begin(),s.end())
+        {
+        }
 };
 
 // =====================
@@ -243,17 +243,18 @@ SMDS_NodeIteratorPtr SMESHDS_SubMesh::GetNodes() const
 bool SMESHDS_SubMesh::Contains(const SMDS_MeshElement * ME) const
 {
   // DO NOT TRY TO FIND A REMOVED ELEMENT !!
-  if ( IsComplexSubmesh() || !ME )
+  //if ( IsComplexSubmesh() || !ME )
+  if (!ME )
     return false;
 
-//   if ( IsComplexSubmesh() )
-//   {
-//     set<const SMESHDS_SubMesh*>::const_iterator aSubIt = mySubMeshes.begin();
-//     for ( ; aSubIt != mySubMeshes.end(); aSubIt++ )
-//       if ( (*aSubIt)->Contains( ME ))
-//         return true;
-//     return false;
-//   }
+  if ( IsComplexSubmesh() )
+  {
+    set<const SMESHDS_SubMesh*>::const_iterator aSubIt = mySubMeshes.begin();
+    for ( ; aSubIt != mySubMeshes.end(); aSubIt++ )
+      if ( (*aSubIt)->Contains( ME ))
+        return true;
+    return false;
+  }
 
   if ( ME->GetType() == SMDSAbs_Node )
     return ( myNodes.find( ME ) != myNodes.end() );