X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_subMesh.cxx;h=d3f8e90f347825aa22ef17f21c7b871b571ba196;hb=5f031651f0f6e7d2fe88cea63fb7636b504737ab;hp=5e67bd73a041d0035e7afa0e7f23f3ae07810612;hpb=6674c3301f6d1d0b88cce86117889474c7c0a2f1;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 5e67bd73a..d3f8e90f3 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -195,12 +195,19 @@ bool SMESH_subMesh::SubMeshesComputed() for (itsub = subMeshes.begin(); itsub != subMeshes.end(); itsub++) { SMESH_subMesh *sm = (*itsub).second; - - const TopoDS_Shape & ss = sm->GetSubShape(); - int type = ss.ShapeType(); - bool computeOk = (sm->GetComputeState() == COMPUTE_OK); + SMESHDS_SubMesh * ds = sm->GetSubMeshDS(); + // PAL10974. + // There are some tricks with compute states, e.g. Penta_3D leaves + // one face with READY_TO_COMPUTE state in order to be able to + // 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() ); if (!computeOk) { + const TopoDS_Shape & ss = sm->GetSubShape(); + int type = ss.ShapeType(); + subMeshesComputed = false; switch (type)