Salome HOME
PAL10953. Fix GetSubmeshComputed(): there may be elements but no nodes in a submesh
[modules/smesh.git] / src / SMESH / SMESH_subMesh.cxx
index 777c09103e17d266c643efea950e5b3156e11dfa..2500404533a5cb1f7b0c9c5936514c032ecada71 100644 (file)
@@ -202,7 +202,7 @@ bool SMESH_subMesh::SubMeshesComputed()
     // recompute 3D when a locale triangle hypo changes (see PAL7428).
     // So we check if mesh is really present
     //bool computeOk = (sm->GetComputeState() == COMPUTE_OK);
-    bool computeOk = ( ds && ds->GetNodes()->more() );
+    bool computeOk = ( ds && ( ds->GetNodes()->more() || ds->GetElements()->more() ));
     if (!computeOk)
     {
       const TopoDS_Shape & ss = sm->GetSubShape();
@@ -1244,7 +1244,8 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
           break;
         }
         // compute
-        RemoveSubMeshElementsAndNodes();
+        CleanDependants();
+        //RemoveSubMeshElementsAndNodes();
         //removeSubMesh( _meshDS, _subShape );
         if (!algo->NeedDescretBoundary() && !algo->OnlyUnaryInput())
           ret = ApplyToCollection( algo, GetCollection( gen, algo ) );