mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 18:30:35 +05:00
PAL13330( When mesh generation does not success, trace where )
fix COMPERR_EXCEPTION in OK cases
This commit is contained in:
parent
b3a1001b71
commit
3e2e4cdedd
@ -1372,7 +1372,7 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
|
|||||||
RemoveSubMeshElementsAndNodes();
|
RemoveSubMeshElementsAndNodes();
|
||||||
ret = false;
|
ret = false;
|
||||||
_computeState = FAILED_TO_COMPUTE;
|
_computeState = FAILED_TO_COMPUTE;
|
||||||
_computeError = SMESH_ComputeError::New(COMPERR_EXCEPTION,"",algo);
|
_computeError = SMESH_ComputeError::New(COMPERR_OK,"",algo);
|
||||||
try {
|
try {
|
||||||
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
|
||||||
OCC_CATCH_SIGNALS;
|
OCC_CATCH_SIGNALS;
|
||||||
@ -1387,15 +1387,16 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!algo->NeedDescretBoundary() && !algo->OnlyUnaryInput())
|
if (!algo->NeedDescretBoundary() && !algo->OnlyUnaryInput()) {
|
||||||
ret = ApplyToCollection( algo, GetCollection( gen, algo ) );
|
ret = ApplyToCollection( algo, GetCollection( gen, algo ) );
|
||||||
else
|
break;
|
||||||
|
}
|
||||||
|
else {
|
||||||
ret = algo->Compute((*_father), _subShape);
|
ret = algo->Compute((*_father), _subShape);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if ( !ret )
|
if ( !ret )
|
||||||
if ( SMESH_ComputeErrorPtr err = algo->GetComputeError())
|
_computeError = algo->GetComputeError();
|
||||||
if ( !err->IsOK() ) // avoid overriding the error set by ApplyToCollection()
|
|
||||||
_computeError = err;
|
|
||||||
}
|
}
|
||||||
catch (Standard_Failure& exc) {
|
catch (Standard_Failure& exc) {
|
||||||
if ( !_computeError ) _computeError = SMESH_ComputeError::New();
|
if ( !_computeError ) _computeError = SMESH_ComputeError::New();
|
||||||
@ -1419,6 +1420,10 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
|
|||||||
_computeError->myName = COMPERR_STD_EXCEPTION;
|
_computeError->myName = COMPERR_STD_EXCEPTION;
|
||||||
_computeError->myComment = exc.what();
|
_computeError->myComment = exc.what();
|
||||||
}
|
}
|
||||||
|
catch ( ... ) {
|
||||||
|
if ( _computeError )
|
||||||
|
_computeError->myName = COMPERR_EXCEPTION;
|
||||||
|
}
|
||||||
if ( ret && _computeError && !_computeError->IsOK() ) {
|
if ( ret && _computeError && !_computeError->IsOK() ) {
|
||||||
ret = false;
|
ret = false;
|
||||||
}
|
}
|
||||||
@ -1655,12 +1660,18 @@ bool SMESH_subMesh::ApplyToCollection (SMESH_Algo* theAlgo,
|
|||||||
{
|
{
|
||||||
if ( !subMesh->CheckComputeError( theAlgo ))
|
if ( !subMesh->CheckComputeError( theAlgo ))
|
||||||
localOK = false;
|
localOK = false;
|
||||||
|
else
|
||||||
|
subMesh->UpdateDependantsState( SUBMESH_COMPUTED );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( !ok && localOK )
|
if ( !ok && localOK ) { // KO but error set to none submesh
|
||||||
return false; // store error in this subMesh
|
_computeError = theAlgo->GetComputeError();
|
||||||
|
if ( _computeError->IsOK() )
|
||||||
|
_computeError = SMESH_ComputeError::New(COMPERR_ALGO_FAILED);
|
||||||
|
CheckComputeError( theAlgo );
|
||||||
|
}
|
||||||
|
|
||||||
return ( this->_computeState == COMPUTE_OK );
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user