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 );