mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-04 21:34:17 +05:00
IPAL52974: Find Element by Point shows nodes that do not belong to current group
This commit is contained in:
parent
4ed74ad3da
commit
3ae5846f24
@ -404,3 +404,14 @@ vtkUnstructuredGrid* SMESHGUI_MeshEditPreview::GetGrid() const
|
|||||||
{
|
{
|
||||||
return myGrid;
|
return myGrid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Returns myViewWindow
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
SVTK_ViewWindow* SMESHGUI_MeshEditPreview::GetViewWindow() const
|
||||||
|
{
|
||||||
|
return myViewWindow;
|
||||||
|
}
|
||||||
|
@ -74,6 +74,7 @@ public:
|
|||||||
|
|
||||||
SALOME_Actor* GetActor() const;
|
SALOME_Actor* GetActor() const;
|
||||||
vtkUnstructuredGrid* GetGrid() const;
|
vtkUnstructuredGrid* GetGrid() const;
|
||||||
|
SVTK_ViewWindow* GetViewWindow() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SMESHGUI_MESHEDITPREVIEW_H
|
#endif // SMESHGUI_MESHEDITPREVIEW_H
|
||||||
|
@ -60,7 +60,8 @@ struct SMESH_NodeSearcherImpl: public SMESH_NodeSearcher
|
|||||||
/*!
|
/*!
|
||||||
* \brief Constructor
|
* \brief Constructor
|
||||||
*/
|
*/
|
||||||
SMESH_NodeSearcherImpl( const SMDS_Mesh* theMesh )
|
SMESH_NodeSearcherImpl( const SMDS_Mesh* theMesh = 0,
|
||||||
|
SMDS_ElemIteratorPtr theElemIt = SMDS_ElemIteratorPtr() )
|
||||||
{
|
{
|
||||||
myMesh = ( SMDS_Mesh* ) theMesh;
|
myMesh = ( SMDS_Mesh* ) theMesh;
|
||||||
|
|
||||||
@ -70,6 +71,14 @@ struct SMESH_NodeSearcherImpl: public SMESH_NodeSearcher
|
|||||||
while ( nIt->more() )
|
while ( nIt->more() )
|
||||||
nodes.insert( nodes.end(), nIt->next() );
|
nodes.insert( nodes.end(), nIt->next() );
|
||||||
}
|
}
|
||||||
|
else if ( theElemIt )
|
||||||
|
{
|
||||||
|
while ( theElemIt->more() )
|
||||||
|
{
|
||||||
|
const SMDS_MeshElement* e = theElemIt->next();
|
||||||
|
nodes.insert( e->begin_nodes(), e->end_nodes() );
|
||||||
|
}
|
||||||
|
}
|
||||||
myOctreeNode = new SMESH_OctreeNode(nodes) ;
|
myOctreeNode = new SMESH_OctreeNode(nodes) ;
|
||||||
|
|
||||||
// get max size of a leaf box
|
// get max size of a leaf box
|
||||||
@ -714,8 +723,12 @@ FindElementsByPoint(const gp_Pnt& point,
|
|||||||
if ( type == SMDSAbs_Node || type == SMDSAbs_0DElement || type == SMDSAbs_Ball)
|
if ( type == SMDSAbs_Node || type == SMDSAbs_0DElement || type == SMDSAbs_Ball)
|
||||||
{
|
{
|
||||||
if ( !_nodeSearcher )
|
if ( !_nodeSearcher )
|
||||||
_nodeSearcher = new SMESH_NodeSearcherImpl( _mesh );
|
{
|
||||||
|
if ( _meshPartIt )
|
||||||
|
_nodeSearcher = new SMESH_NodeSearcherImpl( 0, _meshPartIt );
|
||||||
|
else
|
||||||
|
_nodeSearcher = new SMESH_NodeSearcherImpl( _mesh );
|
||||||
|
}
|
||||||
std::vector< const SMDS_MeshNode* > foundNodes;
|
std::vector< const SMDS_MeshNode* > foundNodes;
|
||||||
_nodeSearcher->FindNearPoint( point, tolerance, foundNodes );
|
_nodeSearcher->FindNearPoint( point, tolerance, foundNodes );
|
||||||
|
|
||||||
@ -1695,6 +1708,17 @@ SMESH_NodeSearcher* SMESH_MeshAlgos::GetNodeSearcher(SMDS_Mesh& mesh)
|
|||||||
return new SMESH_NodeSearcherImpl( &mesh );
|
return new SMESH_NodeSearcherImpl( &mesh );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Return SMESH_NodeSearcher
|
||||||
|
*/
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
SMESH_NodeSearcher* SMESH_MeshAlgos::GetNodeSearcher(SMDS_ElemIteratorPtr elemIt)
|
||||||
|
{
|
||||||
|
return new SMESH_NodeSearcherImpl( 0, elemIt );
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Return SMESH_ElementSearcher
|
* \brief Return SMESH_ElementSearcher
|
||||||
|
@ -159,6 +159,9 @@ namespace SMESH_MeshAlgos
|
|||||||
SMESHUtils_EXPORT
|
SMESHUtils_EXPORT
|
||||||
SMESH_NodeSearcher* GetNodeSearcher( SMDS_Mesh& mesh );
|
SMESH_NodeSearcher* GetNodeSearcher( SMDS_Mesh& mesh );
|
||||||
|
|
||||||
|
SMESHUtils_EXPORT
|
||||||
|
SMESH_NodeSearcher* GetNodeSearcher( SMDS_ElemIteratorPtr elemIt );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Return SMESH_ElementSearcher. The caller is responsible for deleting it
|
* \brief Return SMESH_ElementSearcher. The caller is responsible for deleting it
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user