From 72a9d5d9452e9077c6bc49eaf35841ef517453d4 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 20 Dec 2005 11:49:47 +0000 Subject: [PATCH] fix bug PAL10974: check if SubMeshesComputed() by presence of nodes in submesh. --- src/SMESH/SMESH_subMesh.cxx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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) -- 2.39.2