- SMDS_ElemIteratorPtr interlacedNodesElemIterator() const;

This commit is contained in:
eap 2013-05-16 16:10:37 +00:00
parent 010ee1ec71
commit c448c8ff74
4 changed files with 2 additions and 58 deletions

View File

@ -116,21 +116,6 @@ namespace
} }
}; };
//=======================================================================
//class : _MyInterlacedNodeElemIterator
//purpose :
//=======================================================================
class _MyInterlacedNodeElemIterator : public SMDS_ElemIterator
{
SMDS_NodeIteratorPtr myItr;
public:
_MyInterlacedNodeElemIterator(SMDS_NodeIteratorPtr interlacedNodeItr):
myItr( interlacedNodeItr ) {}
bool more() { return myItr->more(); }
const SMDS_MeshElement* next() { return myItr->next(); }
};
//======================================================================= //=======================================================================
//class : _MyNodeIterator //class : _MyNodeIterator
//purpose : //purpose :
@ -154,18 +139,6 @@ SMDS_NodeIteratorPtr SMDS_QuadraticEdge::interlacedNodesIterator() const
return SMDS_NodeIteratorPtr (new _MyInterlacedNodeIterator (myNodes)); return SMDS_NodeIteratorPtr (new _MyInterlacedNodeIterator (myNodes));
} }
//=======================================================================
//function : interlacedNodesElemIterator
//purpose :
//=======================================================================
SMDS_ElemIteratorPtr SMDS_QuadraticEdge::interlacedNodesElemIterator() const
{
return SMDS_ElemIteratorPtr
(new _MyInterlacedNodeElemIterator ( interlacedNodesIterator() ));
}
//======================================================================= //=======================================================================
//function : elementsIterator //function : elementsIterator
//purpose : //purpose :

View File

@ -56,8 +56,6 @@ public:
SMDS_NodeIteratorPtr interlacedNodesIterator() const; SMDS_NodeIteratorPtr interlacedNodesIterator() const;
SMDS_ElemIteratorPtr interlacedNodesElemIterator() const;
protected: protected:
SMDS_ElemIteratorPtr SMDS_ElemIteratorPtr
elementsIterator(SMDSAbs_ElementType type) const; elementsIterator(SMDSAbs_ElementType type) const;

View File

@ -192,21 +192,6 @@ namespace {
} }
}; };
//=======================================================================
//class : _MyInterlacedNodeElemIterator
//purpose :
//=======================================================================
class _MyInterlacedNodeElemIterator : public SMDS_ElemIterator
{
SMDS_NodeIteratorPtr myItr;
public:
_MyInterlacedNodeElemIterator(SMDS_NodeIteratorPtr interlacedNodeItr):
myItr( interlacedNodeItr ) {}
bool more() { return myItr->more(); }
const SMDS_MeshElement* next() { return myItr->next(); }
};
//======================================================================= //=======================================================================
//class : _MyNodeIterator //class : _MyNodeIterator
//purpose : //purpose :
@ -234,16 +219,6 @@ SMDS_NodeIteratorPtr SMDS_QuadraticFaceOfNodes::interlacedNodesIterator() const
(new _MyInterlacedNodeIterator (myNodes, myNodes.size()==6 ? triaInterlace : quadInterlace)); (new _MyInterlacedNodeIterator (myNodes, myNodes.size()==6 ? triaInterlace : quadInterlace));
} }
//=======================================================================
//function : interlacedNodesElemIterator
//purpose :
//=======================================================================
SMDS_ElemIteratorPtr SMDS_QuadraticFaceOfNodes::interlacedNodesElemIterator() const
{
return SMDS_ElemIteratorPtr
(new _MyInterlacedNodeElemIterator ( interlacedNodesIterator() ));
}
/// =================================================================== /// ===================================================================
/*! /*!
* \brief Iterator on edges of face * \brief Iterator on edges of face
@ -257,10 +232,10 @@ class _MyEdgeIterator : public SMDS_ElemIterator
public: public:
_MyEdgeIterator(const SMDS_QuadraticFaceOfNodes* face):myIndex(0) { _MyEdgeIterator(const SMDS_QuadraticFaceOfNodes* face):myIndex(0) {
myElems.reserve( face->NbNodes() ); myElems.reserve( face->NbNodes() );
SMDS_ElemIteratorPtr nIt = face->interlacedNodesElemIterator(); SMDS_NodeIteratorPtr nIt = face->interlacedNodesIterator();
const SMDS_MeshNode* n0 = face->GetNodeWrap( -1 ); const SMDS_MeshNode* n0 = face->GetNodeWrap( -1 );
while ( nIt->more() ) { while ( nIt->more() ) {
const SMDS_MeshNode* n1 = static_cast<const SMDS_MeshNode*>( nIt->next() ); const SMDS_MeshNode* n1 = nIt->next();
const SMDS_MeshElement* edge = SMDS_Mesh::FindEdge( n0, n1 ); const SMDS_MeshElement* edge = SMDS_Mesh::FindEdge( n0, n1 );
if ( edge ) if ( edge )
myElems.push_back( edge ); myElems.push_back( edge );

View File

@ -66,8 +66,6 @@ public:
SMDS_NodeIteratorPtr interlacedNodesIterator() const; SMDS_NodeIteratorPtr interlacedNodesIterator() const;
SMDS_ElemIteratorPtr interlacedNodesElemIterator() const;
/*! /*!
* \brief Return node by its index * \brief Return node by its index
* \param ind - node index * \param ind - node index