mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-05 11:54:17 +05:00
patch for hypofilter (to avoid the exception)
Signed-off-by: asl <asl@opencascade.com>
This commit is contained in:
parent
ecff7cff5b
commit
6c8252b448
@ -131,24 +131,26 @@ void SMESH_HypoFilter::IsMoreLocalThanPredicate::findPreferable()
|
|||||||
{
|
{
|
||||||
const int shapeID = _mesh.GetMeshDS()->ShapeToIndex( _shape );
|
const int shapeID = _mesh.GetMeshDS()->ShapeToIndex( _shape );
|
||||||
const TListOfListOfInt& listOfShapeIDList = _mesh.GetMeshOrder();
|
const TListOfListOfInt& listOfShapeIDList = _mesh.GetMeshOrder();
|
||||||
TListOfListOfInt::const_iterator listsIt = listOfShapeIDList.begin();
|
TListOfListOfInt::const_iterator listsIt = listOfShapeIDList.begin();
|
||||||
for ( ; listsIt != listOfShapeIDList.end(); ++listsIt )
|
for ( ; listsIt != listOfShapeIDList.end(); ++listsIt )
|
||||||
{
|
{
|
||||||
const TListOfInt& idList = *listsIt;
|
const TListOfInt& idList = *listsIt;
|
||||||
TListOfInt::const_iterator idIt =
|
TListOfInt::const_iterator idIt =
|
||||||
std::find( idList.begin(), idList.end(), shapeID );
|
std::find( idList.begin(), idList.end(), shapeID );
|
||||||
if ( idIt != idList.end() && *idIt != idList.front() )
|
if ( idIt != idList.end() && *idIt != idList.front() )
|
||||||
{
|
{
|
||||||
for ( ; idIt != idList.end(); --idIt )
|
for ( --idIt; true; --idIt )
|
||||||
{
|
{
|
||||||
const TopoDS_Shape& shape = _mesh.GetMeshDS()->IndexToShape( *idIt );
|
const TopoDS_Shape& shape = _mesh.GetMeshDS()->IndexToShape( *idIt );
|
||||||
if ( !shape.IsNull())
|
if ( !shape.IsNull())
|
||||||
_preferableShapes.Add( shape );
|
_preferableShapes.Add( shape );
|
||||||
|
|
||||||
|
if ( idIt == idList.begin() )
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : IsMoreLocalThanPredicate::IsOk
|
//function : IsMoreLocalThanPredicate::IsOk
|
||||||
//purpose :
|
//purpose :
|
||||||
|
Loading…
Reference in New Issue
Block a user