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_MeshElement * | FindClosestTo (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 ¶m) |
| 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_MeshElement * | FindClosestTo (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... | |
| SMESH_ElementSearcherImpl::SMESH_ElementSearcherImpl | ( | SMDS_Mesh & | mesh, |
| double | tol = -1, |
||
| SMDS_ElemIteratorPtr | elemIt = SMDS_ElemIteratorPtr() |
||
| ) |
|
virtual |
|
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().
|
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().
| void SMESH_ElementSearcherImpl::findOuterBoundary | ( | const SMDS_MeshElement * | anyOuterFace | ) |
Find all faces belonging to the outer boundary of mesh.
References SMESH_MeshAlgos::FaceNormal(), SMESH_MeshAlgos::FindFaceInSet(), SMDS_MeshElement::GetNode(), SMDS_MeshElement::GetNodeIndex(), SMDS_MeshElement::IsQuadratic(), SMDS_MeshElement::NbNodes(), SMESH_TLink::node1(), and SMESH_TLink::node2().
Referenced by GetPointState().
|
virtual |
Return elements possibly intersecting the line.
Implements SMESH_ElementSearcher.
| 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().
|
virtual |
Classify the given point in the closed 2D mesh.
Implements SMESH_ElementSearcher.
References SMESH_MeshAlgos::FaceNormal(), findOuterBoundary(), SMESH_MeshAlgos::GetCommonNodes(), getIntersParamOnLine(), getTolerance(), SMESH_MeshAlgos::IsOut(), isOuterBoundary(), draftguitools.gui_annotationstyleeditor::param, and draftutils.utils::tolerance().
| double SMESH_ElementSearcherImpl::getTolerance | ( | ) |
define tolerance for search
References DraftVecUtils::dist(), SMESH_TNodeXYZ::Distance(), SMDS_Mesh::elementsIterator(), SMDS_Mesh::GetMeshInfo(), SMESH_NodeSearcherImpl::getTree(), SMESH_Octree::maxSize(), SMDS_MeshInfo::NbElements(), SMDS_MeshInfo::NbNodes(), SMDS_MeshElement::nodesIterator(), and SMDS_Mesh::nodesIterator().
Referenced by FindElementsByPoint(), and GetPointState().
| bool SMESH_ElementSearcherImpl::isOuterBoundary | ( | const SMDS_MeshElement * | face | ) | const |
Referenced by GetPointState().