From 7f5d1328b11c315d5afa46e19f1eb1ab3e302070 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 10 Jan 2013 11:29:37 +0000 Subject: [PATCH] 21397: EDF SMESH: a quadrangle face mesh can't be projected to a cylinder after successful algo->Compute(), send SUBMESH_COMPUTED to all lower sub-meshes if ( !algo->NeedDiscreteBoundary() ) --- src/SMESH/SMESH_subMesh.cxx | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index 27092ce8f..270a4f870 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -1522,7 +1522,26 @@ bool SMESH_subMesh::ComputeStateEngine(int event) { _computeError.reset(); } - updateDependantsState( SUBMESH_COMPUTED ); // send event SUBMESH_COMPUTED + + // send event SUBMESH_COMPUTED + if ( ret ) { + if ( !algo->NeedDiscreteBoundary() ) + // send SUBMESH_COMPUTED to dependants of all sub-meshes of shape + for (subS.ReInit(); subS.More(); subS.Next()) + { + SMESH_subMesh* sm = _father->GetSubMesh( subS.Current() ); + SMESH_subMeshIteratorPtr smIt = sm->getDependsOnIterator(false,false); + while ( smIt->more() ) { + sm = smIt->next(); + if ( sm->GetSubShape().ShapeType() == TopAbs_VERTEX ) + sm->updateDependantsState( SUBMESH_COMPUTED ); + else + break; + } + } + else + updateDependantsState( SUBMESH_COMPUTED ); + } } break; #ifdef WITH_SMESH_CANCEL_COMPUTE @@ -1865,9 +1884,7 @@ void SMESH_subMesh::updateDependantsState(const compute_event theEvent) for (; it.More(); it.Next()) { const TopoDS_Shape& ancestor = it.Value(); - SMESH_subMesh *aSubMesh = - _father->GetSubMeshContaining(ancestor); - if (aSubMesh) + if ( SMESH_subMesh *aSubMesh = _father->GetSubMeshContaining(ancestor)) aSubMesh->ComputeStateEngine( theEvent ); } } -- 2.39.2