bool SMESH_HypoFilter::IsMoreLocalThanPredicate::IsOk(const SMESH_Hypothesis* aHyp,

const TopoDS_Shape&     aShape) const
 {
+  // issue 0020963
+  // if aShape is COMPOUND (i.e. most probably a GEOM group) then
+  // it is more local if it contains shapes of less dimension than _shapeType
+  ...
This commit is contained in:
eap 2010-09-02 06:26:23 +00:00
parent b539de9f45
commit 59f4ea94a3

View File

@ -30,6 +30,8 @@
#include "SMESH_Hypothesis.hxx"
#include "SMESH_subMesh.hxx"
#include <TopExp_Explorer.hxx>
using namespace std;
@ -126,6 +128,13 @@ bool SMESH_HypoFilter::IsAssignedToPredicate::IsOk(const SMESH_Hypothesis* aHyp,
bool SMESH_HypoFilter::IsMoreLocalThanPredicate::IsOk(const SMESH_Hypothesis* aHyp,
const TopoDS_Shape& aShape) const
{
// issue 0020963
// if aShape is COMPOUND (i.e. most probably a GEOM group) then
// it is more local if it contains shapes of less dimension than _shapeType
if ( aShape.ShapeType() == TopAbs_COMPOUND )
for ( int moreLocalType = _shapeType+1; moreLocalType < int(TopAbs_SHAPE); ++moreLocalType )
if ( TopExp_Explorer( aShape, TopAbs_ShapeEnum(moreLocalType)).More())
return true;
return ( aShape.ShapeType() > _shapeType );
}