X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHUtils%2FSMESH_MeshAlgos.hxx;h=9b860a6ab1150ef5169e25d1b81a6d89d27ba68b;hb=25b7d7ffe76e153c93cb67055192b11b16c3d0e2;hp=df65d1f83585b3bbd01040a2a1389b2e6033466e;hpb=d2c62e114d7c0cbe1be4487e2da51a7946d7f45a;p=modules%2Fsmesh.git diff --git a/src/SMESHUtils/SMESH_MeshAlgos.hxx b/src/SMESHUtils/SMESH_MeshAlgos.hxx index df65d1f83..9b860a6ab 100644 --- a/src/SMESHUtils/SMESH_MeshAlgos.hxx +++ b/src/SMESHUtils/SMESH_MeshAlgos.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -6,7 +6,7 @@ // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -55,6 +55,9 @@ struct SMESHUtils_EXPORT SMESH_NodeSearcher { virtual const SMDS_MeshNode* FindClosestTo( const gp_Pnt& pnt ) = 0; virtual void MoveNode( const SMDS_MeshNode* node, const gp_Pnt& toPnt ) = 0; + virtual int FindNearPoint(const gp_Pnt& point, + const double tolerance, + std::vector< const SMDS_MeshNode* >& foundNodes) = 0; }; //======================================================================= @@ -153,10 +156,45 @@ namespace SMESH_MeshAlgos * \brief Return SMESH_ElementSearcher. The caller is responsible for deleting it */ SMESHUtils_EXPORT - SMESH_ElementSearcher* GetElementSearcher( SMDS_Mesh& mesh ); + SMESH_ElementSearcher* GetElementSearcher( SMDS_Mesh& mesh, + double tolerance=-1.); SMESHUtils_EXPORT SMESH_ElementSearcher* GetElementSearcher( SMDS_Mesh& mesh, - SMDS_ElemIteratorPtr elemIt ); -} + SMDS_ElemIteratorPtr elemIt, + double tolerance=-1. ); + + + + typedef std::vector TFreeBorder; + typedef std::vector TFreeBorderVec; + struct TFreeBorderPart + { + int _border; // border index within a TFreeBorderVec + int _node1; // node index within the border-th TFreeBorder + int _node2; + int _nodeLast; + }; + typedef std::vector TCoincidentGroup; + typedef std::vector TCoincidentGroupVec; + struct CoincidentFreeBorders + { + TFreeBorderVec _borders; // nodes of all free borders + TCoincidentGroupVec _coincidentGroups; // groups of coincident parts of borders + }; + + /*! + * Returns TFreeBorder's coincident within the given tolerance. + * If the tolerance <= 0.0 then one tenth of an average size of elements adjacent + * to free borders being compared is used. + * + * (Implemented in ./SMESH_FreeBorders.cxx) + */ + SMESHUtils_EXPORT + void FindCoincidentFreeBorders(SMDS_Mesh& mesh, + double tolerance, + CoincidentFreeBorders & foundFreeBordes); + + +} // SMESH_MeshAlgos #endif