mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-28 09:10:33 +05:00
Regeression of the Test Case 3D_submesh/A0
fix IsMoreLocalThanPredicate after the patch for issue 0020963
This commit is contained in:
parent
8f8561ea74
commit
6223f216fe
@ -27,7 +27,9 @@
|
|||||||
//
|
//
|
||||||
#include "SMESH_HypoFilter.hxx"
|
#include "SMESH_HypoFilter.hxx"
|
||||||
|
|
||||||
|
#include "SMESH_Gen.hxx"
|
||||||
#include "SMESH_Hypothesis.hxx"
|
#include "SMESH_Hypothesis.hxx"
|
||||||
|
#include "SMESH_MesherHelper.hxx"
|
||||||
#include "SMESH_subMesh.hxx"
|
#include "SMESH_subMesh.hxx"
|
||||||
|
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
@ -115,7 +117,7 @@ bool SMESH_HypoFilter::InstancePredicate::IsOk(const SMESH_Hypothesis* aHyp,
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
bool SMESH_HypoFilter::IsAssignedToPredicate::IsOk(const SMESH_Hypothesis* aHyp,
|
bool SMESH_HypoFilter::IsAssignedToPredicate::IsOk(const SMESH_Hypothesis* aHyp,
|
||||||
const TopoDS_Shape& aShape) const
|
const TopoDS_Shape& aShape) const
|
||||||
{
|
{
|
||||||
return ( !_mainShape.IsNull() && !aShape.IsNull() && _mainShape.IsSame( aShape ));
|
return ( !_mainShape.IsNull() && !aShape.IsNull() && _mainShape.IsSame( aShape ));
|
||||||
}
|
}
|
||||||
@ -128,14 +130,19 @@ bool SMESH_HypoFilter::IsAssignedToPredicate::IsOk(const SMESH_Hypothesis* aHyp,
|
|||||||
bool SMESH_HypoFilter::IsMoreLocalThanPredicate::IsOk(const SMESH_Hypothesis* aHyp,
|
bool SMESH_HypoFilter::IsMoreLocalThanPredicate::IsOk(const SMESH_Hypothesis* aHyp,
|
||||||
const TopoDS_Shape& aShape) const
|
const TopoDS_Shape& aShape) const
|
||||||
{
|
{
|
||||||
// issue 0020963
|
if ( SMESH_MesherHelper::IsSubShape( aShape, /*mainShape=*/_shape ))
|
||||||
// if aShape is COMPOUND (i.e. most probably a GEOM group) then
|
return true;
|
||||||
// it is more local if it contains shapes of less dimension than _shapeType
|
|
||||||
if ( aShape.ShapeType() == TopAbs_COMPOUND )
|
if ( aShape.ShapeType() == TopAbs_COMPOUND &&
|
||||||
for ( int moreLocalType = _shapeType+1; moreLocalType < int(TopAbs_SHAPE); ++moreLocalType )
|
!SMESH_MesherHelper::IsSubShape( _shape, /*mainShape=*/aShape)) // issue 0020963
|
||||||
if ( TopExp_Explorer( aShape, TopAbs_ShapeEnum(moreLocalType)).More())
|
{
|
||||||
return true;
|
for ( int type = TopAbs_SOLID; type < TopAbs_SHAPE; ++type )
|
||||||
return ( aShape.ShapeType() > _shapeType );
|
if ( aHyp->GetDim() == SMESH_Gen::GetShapeDim( TopAbs_ShapeEnum( type )))
|
||||||
|
for ( TopExp_Explorer exp( aShape, TopAbs_ShapeEnum( type )); exp.More(); exp.Next())
|
||||||
|
if ( SMESH_MesherHelper::IsSubShape( exp.Current(), /*mainShape=*/_shape ))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
// SMESH SMESH : implementaion of SMESH idl descriptions
|
// SMESH SMESH : implementaion of SMESH idl descriptions
|
||||||
// File : SMESH_HypoFilter.hxx
|
// File : SMESH_HypoFilter.hxx
|
||||||
// Module : SMESH
|
// Module : SMESH
|
||||||
// $Header$
|
|
||||||
//
|
//
|
||||||
#ifndef SMESH_HypoFilter_HeaderFile
|
#ifndef SMESH_HypoFilter_HeaderFile
|
||||||
#define SMESH_HypoFilter_HeaderFile
|
#define SMESH_HypoFilter_HeaderFile
|
||||||
@ -168,8 +167,8 @@ class SMESH_EXPORT SMESH_HypoFilter: public SMESH_HypoPredicate
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct IsMoreLocalThanPredicate : public SMESH_HypoPredicate {
|
struct IsMoreLocalThanPredicate : public SMESH_HypoPredicate {
|
||||||
TopAbs_ShapeEnum _shapeType;
|
TopoDS_Shape _shape;
|
||||||
IsMoreLocalThanPredicate( const TopoDS_Shape& shape ):_shapeType(shape.ShapeType()){}
|
IsMoreLocalThanPredicate( const TopoDS_Shape& shape ):_shape(shape){}
|
||||||
bool IsOk(const SMESH_Hypothesis* aHyp,
|
bool IsOk(const SMESH_Hypothesis* aHyp,
|
||||||
const TopoDS_Shape& aShape) const;
|
const TopoDS_Shape& aShape) const;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user