From: rnv Date: Mon, 15 Jan 2018 12:48:20 +0000 (+0300) Subject: Merge eap/23491 branch. X-Git-Tag: V9_0_0^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=7a713be33b27d6a8c77f983460f0e97e52c6ff7c Merge eap/23491 branch. --- 7a713be33b27d6a8c77f983460f0e97e52c6ff7c diff --cc src/SMESHUtils/SMESH_MeshAlgos.hxx index 6b8f7c609,0bf9c49b5..88b1c6d24 --- a/src/SMESHUtils/SMESH_MeshAlgos.hxx +++ b/src/SMESHUtils/SMESH_MeshAlgos.hxx @@@ -162,17 -153,57 +162,65 @@@ namespace SMESH_MeshAlgo SMESHUtils_EXPORT std::vector< const SMDS_MeshNode*> GetCommonNodes(const SMDS_MeshElement* e1, const SMDS_MeshElement* e2); + /*! + * \brief Return true if node1 encounters first in the face and node2, after. + * The nodes are supposed to be neighbor nodes in the face. + */ + SMESHUtils_EXPORT + bool IsRightOrder( const SMDS_MeshElement* face, + const SMDS_MeshNode* node0, + const SMDS_MeshNode* node1 ); + /*! + * \brief Mark elements given by SMDS_Iterator + */ + template< class ElemIter > + void MarkElems( ElemIter it, const bool isMarked ) + { + while ( it->more() ) it->next()->setIsMarked( isMarked ); + } + /*! + * \brief Mark elements given by std iterators + */ + template< class ElemIter > + void MarkElems( ElemIter it, ElemIter end, const bool isMarked ) + { + for ( ; it != end; ++it ) (*it)->setIsMarked( isMarked ); + } + /*! + * \brief Mark nodes of elements given by SMDS_Iterator + */ + template< class ElemIter > + void MarkElemNodes( ElemIter it, const bool isMarked, const bool markElem = false ) + { + if ( markElem ) + while ( it->more() ) { + const SMDS_MeshElement* e = it->next(); + e->setIsMarked( isMarked ); + MarkElems( e->nodesIterator(), isMarked ); + } + else + while ( it->more() ) + MarkElems( it->next()->nodesIterator(), isMarked ); + } + /*! + * \brief Mark elements given by std iterators + */ + template< class ElemIter > + void MarkElemNodes( ElemIter it, ElemIter end, const bool isMarked, const bool markElem = false ) + { + if ( markElem ) + for ( ; it != end; ++it ) { + (*it)->setIsMarked( isMarked ); + MarkElems( (*it)->nodesIterator(), isMarked ); + } + else + for ( ; it != end; ++it ) + MarkElems( (*it)->nodesIterator(), isMarked ); + } + /*! - * \brief Return SMESH_NodeSearcher. The caller is responsible for deleteing it + * \brief Return SMESH_NodeSearcher. The caller is responsible for deleting it */ SMESHUtils_EXPORT SMESH_NodeSearcher* GetNodeSearcher( SMDS_Mesh& mesh );