mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 18:20:34 +05:00
0021406: EDF 1975 NETGENPLUGIN: Submesh hypothesis not taken into account
Pass theShapeToMesh to IsMoreLocalThanPredicate
This commit is contained in:
parent
17e8b29aa5
commit
1b8f195eb5
@ -129,6 +129,9 @@ 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
|
||||||
{
|
{
|
||||||
|
if ( aShape.IsSame( _shapeToMesh ))
|
||||||
|
return false; // aHyp is global
|
||||||
|
|
||||||
if ( SMESH_MesherHelper::IsSubShape( aShape, /*mainShape=*/_shape ))
|
if ( SMESH_MesherHelper::IsSubShape( aShape, /*mainShape=*/_shape ))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -293,9 +296,10 @@ SMESH_HypoPredicate* SMESH_HypoFilter::IsApplicableTo(const TopoDS_Shape& theSha
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
SMESH_HypoPredicate* SMESH_HypoFilter::IsMoreLocalThan(const TopoDS_Shape& theShape)
|
SMESH_HypoPredicate* SMESH_HypoFilter::IsMoreLocalThan(const TopoDS_Shape& theShape,
|
||||||
|
const TopoDS_Shape& theShapeToMesh)
|
||||||
{
|
{
|
||||||
return new IsMoreLocalThanPredicate( theShape );
|
return new IsMoreLocalThanPredicate( theShape, theShapeToMesh);
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@ -72,7 +72,8 @@ class SMESH_EXPORT SMESH_HypoFilter: public SMESH_HypoPredicate
|
|||||||
static SMESH_HypoPredicate* IsAssignedTo(const TopoDS_Shape& theShape);
|
static SMESH_HypoPredicate* IsAssignedTo(const TopoDS_Shape& theShape);
|
||||||
static SMESH_HypoPredicate* Is(const SMESH_Hypothesis* theHypo);
|
static SMESH_HypoPredicate* Is(const SMESH_Hypothesis* theHypo);
|
||||||
static SMESH_HypoPredicate* IsGlobal(const TopoDS_Shape& theMainShape);
|
static SMESH_HypoPredicate* IsGlobal(const TopoDS_Shape& theMainShape);
|
||||||
static SMESH_HypoPredicate* IsMoreLocalThan(const TopoDS_Shape& theShape);
|
static SMESH_HypoPredicate* IsMoreLocalThan(const TopoDS_Shape& theShape,
|
||||||
|
const TopoDS_Shape& theShapeToMesh);
|
||||||
static SMESH_HypoPredicate* HasName(const std::string & theName);
|
static SMESH_HypoPredicate* HasName(const std::string & theName);
|
||||||
static SMESH_HypoPredicate* HasDim(const int theDim);
|
static SMESH_HypoPredicate* HasDim(const int theDim);
|
||||||
static SMESH_HypoPredicate* HasType(const int theHypType);
|
static SMESH_HypoPredicate* HasType(const int theHypType);
|
||||||
@ -169,8 +170,10 @@ class SMESH_EXPORT SMESH_HypoFilter: public SMESH_HypoPredicate
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct IsMoreLocalThanPredicate : public SMESH_HypoPredicate {
|
struct IsMoreLocalThanPredicate : public SMESH_HypoPredicate {
|
||||||
TopoDS_Shape _shape;
|
TopoDS_Shape _shape, _shapeToMesh;
|
||||||
IsMoreLocalThanPredicate( const TopoDS_Shape& shape ):_shape(shape){}
|
IsMoreLocalThanPredicate( const TopoDS_Shape& shape,
|
||||||
|
const TopoDS_Shape& shapeToMesh )
|
||||||
|
:_shape(shape),_shapeToMesh(shapeToMesh){}
|
||||||
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