From: eap Date: Thu, 2 Sep 2010 06:26:23 +0000 (+0000) Subject: bool SMESH_HypoFilter::IsMoreLocalThanPredicate::IsOk(const SMESH_Hypothesis* aHyp, X-Git-Tag: V5_1_5a1~65 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=59f4ea94a32567ddc2e7c775504225efd4994b18;p=modules%2Fsmesh.git 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 + ... --- 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 ); }