Salome HOME
23416: [CEA 2033] Impossible to re-compute a mesh from an hdf
[modules/smesh.git] / src / SMESHDS / SMESHDS_GroupBase.cxx
index 818c52009306bfed4f4b76d5096f4f8543377c49..7d4d10fdfc9f41f8fff17b1f3db466370501b952 100644 (file)
@@ -124,6 +124,9 @@ int SMESHDS_GroupBase::Extent() const
 
 bool SMESHDS_GroupBase::IsEmpty()
 {
+  if ( myMesh->GetMeshInfo().NbElements( myType ) == 0 )
+    // avoid long iteration over sub-meshes of a complex sub-mesh of a group on geometry
+    return false;
   SMDS_ElemIteratorPtr it = GetElements();
   return ( !it || !it->more() );
 }