mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-30 19:30:35 +05:00
NPAL14335 (EDF 344 SMESH : "ERROR : Iterator not implemented " when loading a script)
add optional SMDSAbs_ElementType arg to GetInverseElementIterator()
This commit is contained in:
parent
8c74c25d2c
commit
7dad29749c
@ -88,16 +88,28 @@ const SMDS_PositionPtr& SMDS_MeshNode::GetPosition() const
|
||||
return myPosition;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
/*!
|
||||
* \brief Iterator on list of elements
|
||||
*/
|
||||
//=======================================================================
|
||||
|
||||
class SMDS_MeshNode_MyInvIterator:public SMDS_ElemIterator
|
||||
{
|
||||
NCollection_List<const SMDS_MeshElement*>::Iterator myIterator;
|
||||
SMDSAbs_ElementType myType;
|
||||
public:
|
||||
SMDS_MeshNode_MyInvIterator(const NCollection_List<const SMDS_MeshElement*>& s):
|
||||
myIterator(s)
|
||||
SMDS_MeshNode_MyInvIterator(const NCollection_List<const SMDS_MeshElement*>& s,
|
||||
SMDSAbs_ElementType type):
|
||||
myIterator(s), myType(type)
|
||||
{}
|
||||
|
||||
bool more()
|
||||
{
|
||||
if ( myType != SMDSAbs_All ) {
|
||||
while ( myIterator.More() && myIterator.Value()->GetType() != myType)
|
||||
myIterator.Next();
|
||||
}
|
||||
return myIterator.More() != Standard_False;
|
||||
}
|
||||
|
||||
@ -110,9 +122,9 @@ class SMDS_MeshNode_MyInvIterator:public SMDS_ElemIterator
|
||||
};
|
||||
|
||||
SMDS_ElemIteratorPtr SMDS_MeshNode::
|
||||
GetInverseElementIterator() const
|
||||
GetInverseElementIterator(SMDSAbs_ElementType type) const
|
||||
{
|
||||
return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(myInverseElements));
|
||||
return SMDS_ElemIteratorPtr(new SMDS_MeshNode_MyInvIterator(myInverseElements,type));
|
||||
}
|
||||
|
||||
// Same as GetInverseElementIterator but the create iterator only return
|
||||
|
@ -56,7 +56,7 @@ class SMDS_WNT_EXPORT SMDS_MeshNode:public SMDS_MeshElement
|
||||
void RemoveInverseElement(const SMDS_MeshElement * parent);
|
||||
void ClearInverseElements();
|
||||
bool emptyInverseElements();
|
||||
SMDS_ElemIteratorPtr GetInverseElementIterator() const;
|
||||
SMDS_ElemIteratorPtr GetInverseElementIterator(SMDSAbs_ElementType type=SMDSAbs_All) const;
|
||||
void SetPosition(const SMDS_PositionPtr& aPos);
|
||||
const SMDS_PositionPtr& GetPosition() const;
|
||||
SMDSAbs_ElementType GetType() const;
|
||||
|
Loading…
Reference in New Issue
Block a user