mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 01:40:33 +05:00
Make const GetAppliedHypothesis() and GetUsedHypothesis()
This commit is contained in:
parent
b4fdb7ebde
commit
4443257370
@ -262,15 +262,16 @@ const vector < string > &SMESH_Algo::GetCompatibleHypothesis()
|
||||
const list <const SMESHDS_Hypothesis *> &
|
||||
SMESH_Algo::GetUsedHypothesis(SMESH_Mesh & aMesh,
|
||||
const TopoDS_Shape & aShape,
|
||||
const bool ignoreAuxiliary)
|
||||
const bool ignoreAuxiliary) const
|
||||
{
|
||||
_usedHypList.clear();
|
||||
SMESH_Algo* me = const_cast< SMESH_Algo* >( this );
|
||||
me->_usedHypList.clear();
|
||||
SMESH_HypoFilter filter;
|
||||
if ( InitCompatibleHypoFilter( filter, ignoreAuxiliary ))
|
||||
{
|
||||
aMesh.GetHypotheses( aShape, filter, _usedHypList, true );
|
||||
aMesh.GetHypotheses( aShape, filter, me->_usedHypList, true );
|
||||
if ( ignoreAuxiliary && _usedHypList.size() > 1 )
|
||||
_usedHypList.clear(); //only one compatible hypothesis allowed
|
||||
me->_usedHypList.clear(); //only one compatible hypothesis allowed
|
||||
}
|
||||
return _usedHypList;
|
||||
}
|
||||
@ -286,12 +287,13 @@ SMESH_Algo::GetUsedHypothesis(SMESH_Mesh & aMesh,
|
||||
const list<const SMESHDS_Hypothesis *> &
|
||||
SMESH_Algo::GetAppliedHypothesis(SMESH_Mesh & aMesh,
|
||||
const TopoDS_Shape & aShape,
|
||||
const bool ignoreAuxiliary)
|
||||
const bool ignoreAuxiliary) const
|
||||
{
|
||||
_appliedHypList.clear();
|
||||
SMESH_Algo* me = const_cast< SMESH_Algo* >( this );
|
||||
me->_appliedHypList.clear();
|
||||
SMESH_HypoFilter filter;
|
||||
if ( InitCompatibleHypoFilter( filter, ignoreAuxiliary ))
|
||||
aMesh.GetHypotheses( aShape, filter, _appliedHypList, false );
|
||||
aMesh.GetHypotheses( aShape, filter, me->_appliedHypList, false );
|
||||
|
||||
return _appliedHypList;
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ class SMESH_EXPORT SMESH_Algo : public SMESH_Hypothesis
|
||||
virtual const std::list <const SMESHDS_Hypothesis *> &
|
||||
GetUsedHypothesis(SMESH_Mesh & aMesh,
|
||||
const TopoDS_Shape & aShape,
|
||||
const bool ignoreAuxiliary=true);
|
||||
const bool ignoreAuxiliary=true) const;
|
||||
/*!
|
||||
* \brief Returns a list of compatible hypotheses assigned to a shape in a mesh
|
||||
* \param aMesh - the mesh
|
||||
@ -210,7 +210,7 @@ class SMESH_EXPORT SMESH_Algo : public SMESH_Hypothesis
|
||||
const list <const SMESHDS_Hypothesis *> &
|
||||
GetAppliedHypothesis(SMESH_Mesh & aMesh,
|
||||
const TopoDS_Shape & aShape,
|
||||
const bool ignoreAuxiliary=true);
|
||||
const bool ignoreAuxiliary=true) const;
|
||||
/*!
|
||||
* \brief Make the filter recognize only compatible hypotheses
|
||||
* \param theFilter - the filter to initialize
|
||||
|
Loading…
Reference in New Issue
Block a user