SMESH_ElementSearcherImpl Struct Reference

Classes

struct  TFaceLink
 < link and faces sharing it (used in findOuterBoundary()) More...
 
struct  TInters
 < data of intersection of the line and the mesh face (used in GetPointState()) More...
 

Public Member Functions

virtual const SMDS_MeshElementFindClosestTo (const gp_Pnt &point, SMDSAbs_ElementType type)
 Find an element of given type most close to the given point. More...
 
virtual int FindElementsByPoint (const gp_Pnt &point, SMDSAbs_ElementType type, vector< const SMDS_MeshElement * > &foundElements)
 Find elements of given type where the given point is IN or ON. Returns nb of found elements and elements them-selves. More...
 
void findOuterBoundary (const SMDS_MeshElement *anyOuterFace)
 Find all faces belonging to the outer boundary of mesh. More...
 
void GetElementsNearLine (const gp_Ax1 &line, SMDSAbs_ElementType type, vector< const SMDS_MeshElement * > &foundElems)
 Return elements possibly intersecting the line. More...
 
bool getIntersParamOnLine (const gp_Lin &line, const SMDS_MeshElement *face, const double tolerance, double &param)
 Find intersection of the line and an edge of face and return parameter on line. More...
 
virtual TopAbs_State GetPointState (const gp_Pnt &point)
 Classify the given point in the closed 2D mesh. More...
 
double getTolerance ()
 define tolerance for search More...
 
bool isOuterBoundary (const SMDS_MeshElement *face) const
 
 SMESH_ElementSearcherImpl (SMDS_Mesh &mesh, double tol=-1, SMDS_ElemIteratorPtr elemIt=SMDS_ElemIteratorPtr())
 
virtual ~SMESH_ElementSearcherImpl ()
 
- Public Member Functions inherited from SMESH_ElementSearcher
virtual const SMDS_MeshElementFindClosestTo (const gp_Pnt &point, SMDSAbs_ElementType type)=0
 Return an element most close to the given point. More...
 
virtual int FindElementsByPoint (const gp_Pnt &point, SMDSAbs_ElementType type, std::vector< const SMDS_MeshElement * > &foundElems)=0
 Find elements of given type where the given point is IN or ON. Returns nb of found elements and elements them-selves. More...
 
virtual void GetElementsNearLine (const gp_Ax1 &line, SMDSAbs_ElementType type, std::vector< const SMDS_MeshElement * > &foundElems)=0
 Return elements possibly intersecting the line. More...
 
virtual TopAbs_State GetPointState (const gp_Pnt &point)=0
 Find out if the given point is out of closed 2D mesh. More...
 
virtual ~SMESH_ElementSearcher ()
 Implementation of search for the elements by point and of classification of point in 2D mesh. More...
 

Constructor & Destructor Documentation

◆ SMESH_ElementSearcherImpl()

SMESH_ElementSearcherImpl::SMESH_ElementSearcherImpl ( SMDS_Mesh mesh,
double  tol = -1,
SMDS_ElemIteratorPtr  elemIt = SMDS_ElemIteratorPtr() 
)

◆ ~SMESH_ElementSearcherImpl()

virtual SMESH_ElementSearcherImpl::~SMESH_ElementSearcherImpl ( )
virtual

Member Function Documentation

◆ FindClosestTo()

const SMDS_MeshElement * SMESH_ElementSearcherImpl::FindClosestTo ( const gp_Pnt &  point,
SMDSAbs_ElementType  type 
)
virtual

Find an element of given type most close to the given point.

WARNING: Only face search is implemeneted so far

Implements SMESH_ElementSearcher.

References DraftVecUtils::dist(), SMESH_MeshAlgos::GetDistance(), SMDS_MeshElement::NbNodes(), and SMDS_MeshElement::nodesIterator().

◆ FindElementsByPoint()

int SMESH_ElementSearcherImpl::FindElementsByPoint ( const gp_Pnt &  point,
SMDSAbs_ElementType  type,
vector< const SMDS_MeshElement * > &  foundElements 
)
virtual

Find elements of given type where the given point is IN or ON. Returns nb of found elements and elements them-selves.

'ALL' type means elements of any type excluding nodes, balls and 0D elements

Implements SMESH_ElementSearcher.

References SMESH_NodeSearcherImpl::FindNearPoint(), getTolerance(), SMESH_MeshAlgos::IsOut(), and draftutils.utils::tolerance().

◆ findOuterBoundary()

void SMESH_ElementSearcherImpl::findOuterBoundary ( const SMDS_MeshElement anyOuterFace)

◆ GetElementsNearLine()

void SMESH_ElementSearcherImpl::GetElementsNearLine ( const gp_Ax1 &  line,
SMDSAbs_ElementType  type,
vector< const SMDS_MeshElement * > &  foundElems 
)
virtual

Return elements possibly intersecting the line.

Implements SMESH_ElementSearcher.

◆ getIntersParamOnLine()

bool SMESH_ElementSearcherImpl::getIntersParamOnLine ( const gp_Lin &  line,
const SMDS_MeshElement face,
const double  tolerance,
double &  param 
)

Find intersection of the line and an edge of face and return parameter on line.

References draftguitools.gui_annotationstyleeditor::param.

Referenced by GetPointState().

◆ GetPointState()

TopAbs_State SMESH_ElementSearcherImpl::GetPointState ( const gp_Pnt &  point)
virtual

◆ getTolerance()

◆ isOuterBoundary()

bool SMESH_ElementSearcherImpl::isOuterBoundary ( const SMDS_MeshElement face) const

Referenced by GetPointState().


The documentation for this struct was generated from the following file: