PAL13330( When mesh generation does not success, trace where )

care of states of descendants of submesh where !algo->NeedDescretBoundary()
This commit is contained in:
eap 2007-04-12 08:59:13 +00:00
parent 374666c175
commit 15889cb6e1

View File

@ -1419,6 +1419,8 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
catch ( ... ) { catch ( ... ) {
if ( _computeError ) if ( _computeError )
_computeError->myName = COMPERR_EXCEPTION; _computeError->myName = COMPERR_EXCEPTION;
else
ret = false;
} }
if ( ret && _computeError && !_computeError->IsOK() ) { if ( ret && _computeError && !_computeError->IsOK() ) {
ret = false; ret = false;
@ -1439,6 +1441,8 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
_computeError.reset(); _computeError.reset();
UpdateDependantsState( SUBMESH_COMPUTED ); // send event SUBMESH_COMPUTED UpdateDependantsState( SUBMESH_COMPUTED ); // send event SUBMESH_COMPUTED
} }
if ( !algo->NeedDescretBoundary() )
UpdateSubMeshState( ret ? COMPUTE_OK : FAILED_TO_COMPUTE );
CheckComputeError( algo ); CheckComputeError( algo );
} }
break; break;
@ -1648,23 +1652,23 @@ bool SMESH_subMesh::ApplyToCollection (SMESH_Algo* theAlgo,
bool ok = theAlgo->Compute( *_father, theCollection ); bool ok = theAlgo->Compute( *_father, theCollection );
// set _computeState of subshapes // set _computeState of subshapes
bool localOK = true;
TopExp_Explorer anExplorer( theCollection, _subShape.ShapeType() ); TopExp_Explorer anExplorer( theCollection, _subShape.ShapeType() );
for ( ; anExplorer.More(); anExplorer.Next() ) for ( ; anExplorer.More(); anExplorer.Next() )
{ {
if ( SMESH_subMesh* subMesh = _father->GetSubMeshContaining( anExplorer.Current() )) if ( SMESH_subMesh* subMesh = _father->GetSubMeshContaining( anExplorer.Current() ))
{ {
if ( !subMesh->CheckComputeError( theAlgo )) bool localOK = subMesh->CheckComputeError( theAlgo );
localOK = false; if ( !ok && localOK && !subMesh->IsMeshComputed() )
else {
subMesh->UpdateDependantsState( SUBMESH_COMPUTED ); subMesh->_computeError = theAlgo->GetComputeError();
} if ( subMesh->_computeError->IsOK() )
}
if ( !ok && localOK ) { // KO but error set to none submesh
_computeError = theAlgo->GetComputeError();
if ( _computeError->IsOK() )
_computeError = SMESH_ComputeError::New(COMPERR_ALGO_FAILED); _computeError = SMESH_ComputeError::New(COMPERR_ALGO_FAILED);
CheckComputeError( theAlgo ); localOK = CheckComputeError( theAlgo );
}
if ( localOK )
subMesh->UpdateDependantsState( SUBMESH_COMPUTED );
subMesh->UpdateSubMeshState( localOK ? COMPUTE_OK : FAILED_TO_COMPUTE );
}
} }
return true; return true;