From 59f4ea94a32567ddc2e7c775504225efd4994b18 Mon Sep 17 00:00:00 2001 From: eap Date: Thu, 2 Sep 2010 06:26:23 +0000 Subject: [PATCH] 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 + ... --- src/SMESH/SMESH_HypoFilter.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/SMESH/SMESH_HypoFilter.cxx b/src/SMESH/SMESH_HypoFilter.cxx index 1f6685d15..dd99ac11a 100644 --- a/src/SMESH/SMESH_HypoFilter.cxx +++ b/src/SMESH/SMESH_HypoFilter.cxx @@ -30,6 +30,8 @@ #include "SMESH_Hypothesis.hxx" #include "SMESH_subMesh.hxx" +#include + 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 ); }