mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
IPAL22173 TC6.2.0: "Netgen1D-2D" algorithm doesn't work on "flight_solid.brep"
1) Treate a case where a valid mesh is computed anyhow while the algo reports errors 2) Remove unused - bool ApplyToCollection (SMESH_Algo* theAlgo, - const TopoDS_Shape& theCollection);
This commit is contained in:
parent
3eefc085d8
commit
0650af74ab
@ -1456,7 +1456,7 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ret)
|
||||
if (ret && _computeError && _computeError->myName != COMPERR_WARNING )
|
||||
{
|
||||
_computeError.reset();
|
||||
}
|
||||
@ -1720,6 +1720,7 @@ bool SMESH_subMesh::CheckComputeError(SMESH_Algo* theAlgo, const TopoDS_Shape& t
|
||||
// Check my state
|
||||
if ( !_computeError || _computeError->IsOK() )
|
||||
{
|
||||
// no error description is set to this sub-mesh, check if any mesh is computed
|
||||
_computeState = IsMeshComputed() ? COMPUTE_OK : FAILED_TO_COMPUTE;
|
||||
}
|
||||
else
|
||||
@ -1739,53 +1740,14 @@ bool SMESH_subMesh::CheckComputeError(SMESH_Algo* theAlgo, const TopoDS_Shape& t
|
||||
|
||||
INFOS( text );
|
||||
|
||||
_computeState = FAILED_TO_COMPUTE;
|
||||
_computeState = _computeError->IsKO() ? FAILED_TO_COMPUTE : COMPUTE_OK;
|
||||
|
||||
noErrors = false;
|
||||
}
|
||||
}
|
||||
return noErrors;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ApplyToCollection
|
||||
//purpose : Apply theAlgo to all subshapes in theCollection
|
||||
//=======================================================================
|
||||
|
||||
bool SMESH_subMesh::ApplyToCollection (SMESH_Algo* theAlgo,
|
||||
const TopoDS_Shape& theCollection)
|
||||
{
|
||||
MESSAGE("SMESH_subMesh::ApplyToCollection");
|
||||
ASSERT ( !theAlgo->NeedDescretBoundary() );
|
||||
|
||||
if ( _computeError )
|
||||
_computeError->myName = COMPERR_OK;
|
||||
|
||||
bool ok = theAlgo->Compute( *_father, theCollection );
|
||||
|
||||
// set _computeState of subshapes
|
||||
TopExp_Explorer anExplorer( theCollection, _subShape.ShapeType() );
|
||||
for ( ; anExplorer.More(); anExplorer.Next() )
|
||||
{
|
||||
if ( SMESH_subMesh* subMesh = _father->GetSubMeshContaining( anExplorer.Current() ))
|
||||
{
|
||||
bool localOK = subMesh->CheckComputeError( theAlgo );
|
||||
if ( !ok && localOK && !subMesh->IsMeshComputed() )
|
||||
{
|
||||
subMesh->_computeError = theAlgo->GetComputeError();
|
||||
if ( subMesh->_computeError->IsOK() )
|
||||
_computeError = SMESH_ComputeError::New(COMPERR_ALGO_FAILED);
|
||||
localOK = CheckComputeError( theAlgo );
|
||||
}
|
||||
if ( localOK )
|
||||
subMesh->UpdateDependantsState( SUBMESH_COMPUTED );
|
||||
subMesh->UpdateSubMeshState( localOK ? COMPUTE_OK : FAILED_TO_COMPUTE );
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : UpdateSubMeshState
|
||||
//purpose :
|
||||
|
@ -266,12 +266,6 @@ protected:
|
||||
SMESH_Algo* theAlgo,
|
||||
bool & theSubComputed);
|
||||
|
||||
/*!
|
||||
* \brief Apply theAlgo to all subshapes in theCollection
|
||||
*/
|
||||
bool ApplyToCollection (SMESH_Algo* theAlgo,
|
||||
const TopoDS_Shape& theCollection);
|
||||
|
||||
/*!
|
||||
* \brief Update compute_state by _computeError
|
||||
* \retval bool - false if there are errors
|
||||
|
Loading…
Reference in New Issue
Block a user