SMESH_MeshAlgos Namespace Reference

Classes

struct  CoincidentFreeBorders
 
struct  TFreeBorderPart
 

Typedefs

typedef std::vector< TFreeBorderPartTCoincidentGroup
 
typedef std::vector< TCoincidentGroupTCoincidentGroupVec
 
typedef std::vector< const SMDS_MeshNode * > TFreeBorder
 
typedef std::vector< TFreeBorderTFreeBorderVec
 

Functions

SMESHUtils_EXPORT bool FaceNormal (const SMDS_MeshElement *F, gp_XYZ &normal, bool normalized=true)
 Calculate normal of a mesh face. More...
 
SMESHUtils_EXPORT void FindCoincidentFreeBorders (SMDS_Mesh &mesh, double tolerance, CoincidentFreeBorders &foundFreeBordes)
 
SMESHUtils_EXPORT const SMDS_MeshElementFindFaceInSet (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const TIDSortedElemSet &elemSet, const TIDSortedElemSet &avoidSet, int *i1=0, int *i2=0)
 
SMESHUtils_EXPORT void GetBarycentricCoords (const gp_XY &point, const gp_XY &t0, const gp_XY &t1, const gp_XY &t2, double &bc0, double &bc1)
 Returns barycentric coordinates of a point within a triangle. A not returned bc2 = 1. - bc0 - bc1. The point lies within the triangle if ( bc0 >= 0 && bc1 >= 0 && bc0+bc1 <= 1 ) More...
 
SMESHUtils_EXPORT std::vector< const SMDS_MeshNode * > GetCommonNodes (const SMDS_MeshElement *e1, const SMDS_MeshElement *e2)
 Return nodes common to two elements. More...
 
SMESHUtils_EXPORT double GetDistance (const SMDS_MeshEdge *edge, const gp_Pnt &point)
 Return minimal distance from a point to an edge. More...
 
SMESHUtils_EXPORT double GetDistance (const SMDS_MeshElement *elem, const gp_Pnt &point)
 Return minimal distance from a point to an element. More...
 
SMESHUtils_EXPORT double GetDistance (const SMDS_MeshFace *face, const gp_Pnt &point)
 Return minimal distance from a point to a face. More...
 
SMESHUtils_EXPORT double GetDistance (const SMDS_MeshVolume *volume, const gp_Pnt &point)
 Return minimal distance from a point to a volume. More...
 
SMESHUtils_EXPORT SMESH_ElementSearcherGetElementSearcher (SMDS_Mesh &mesh, double tolerance=-1.)
 Return SMESH_ElementSearcher. The caller is responsible for deleting it. More...
 
SMESHUtils_EXPORT SMESH_ElementSearcherGetElementSearcher (SMDS_Mesh &mesh, SMDS_ElemIteratorPtr elemIt, double tolerance=-1.)
 Return SMESH_ElementSearcher acting on a sub-set of elements. More...
 
SMESHUtils_EXPORT SMESH_NodeSearcherGetNodeSearcher (SMDS_Mesh &mesh)
 Return SMESH_NodeSearcher. The caller is responsible for deleting it. More...
 
SMESHUtils_EXPORT bool IsOut (const SMDS_MeshElement *element, const gp_Pnt &point, double tol)
 Return true if the point is IN or ON of the element. More...
 

Typedef Documentation

◆ TCoincidentGroup

◆ TCoincidentGroupVec

◆ TFreeBorder

typedef std::vector<const SMDS_MeshNode*> SMESH_MeshAlgos::TFreeBorder

◆ TFreeBorderVec

Function Documentation

◆ FaceNormal()

◆ FindCoincidentFreeBorders()

SMESHUtils_EXPORT void SMESH_MeshAlgos::FindCoincidentFreeBorders ( SMDS_Mesh mesh,
double  tolerance,
CoincidentFreeBorders foundFreeBordes 
)

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)

◆ FindFaceInSet()

const SMDS_MeshElement * SMESH_MeshAlgos::FindFaceInSet ( const SMDS_MeshNode n1,
const SMDS_MeshNode n2,
const TIDSortedElemSet &  elemSet,
const TIDSortedElemSet &  avoidSet,
int i1 = 0,
int i2 = 0 
)

◆ GetBarycentricCoords()

void SMESH_MeshAlgos::GetBarycentricCoords ( const gp_XY &  point,
const gp_XY &  t0,
const gp_XY &  t1,
const gp_XY &  t2,
double &  bc0,
double &  bc1 
)

Returns barycentric coordinates of a point within a triangle. A not returned bc2 = 1. - bc0 - bc1. The point lies within the triangle if ( bc0 >= 0 && bc1 >= 0 && bc0+bc1 <= 1 )

Referenced by FaceQuadStruct::findCell(), and FaceQuadStruct::isNear().

◆ GetCommonNodes()

vector< const SMDS_MeshNode * > SMESH_MeshAlgos::GetCommonNodes ( const SMDS_MeshElement e1,
const SMDS_MeshElement e2 
)

◆ GetDistance() [1/4]

double SMESH_MeshAlgos::GetDistance ( const SMDS_MeshEdge edge,
const gp_Pnt &  point 
)

Return minimal distance from a point to an edge.

◆ GetDistance() [2/4]

double SMESH_MeshAlgos::GetDistance ( const SMDS_MeshElement elem,
const gp_Pnt &  point 
)

Return minimal distance from a point to an element.

Currently we ignore non-planarity and 2nd order of face

References GetDistance(), and SMDS_MeshElement::GetType().

Referenced by SMESH_ElementSearcherImpl::FindClosestTo(), and GetDistance().

◆ GetDistance() [3/4]

double SMESH_MeshAlgos::GetDistance ( const SMDS_MeshFace face,
const gp_Pnt &  point 
)

Return minimal distance from a point to a face.

Currently we ignore non-planarity and 2nd order of face

◆ GetDistance() [4/4]

double SMESH_MeshAlgos::GetDistance ( const SMDS_MeshVolume volume,
const gp_Pnt &  point 
)

◆ GetElementSearcher() [1/2]

◆ GetElementSearcher() [2/2]

SMESH_ElementSearcher * SMESH_MeshAlgos::GetElementSearcher ( SMDS_Mesh mesh,
SMDS_ElemIteratorPtr  elemIt,
double  tolerance = -1. 
)

Return SMESH_ElementSearcher acting on a sub-set of elements.

References draftutils.utils::tolerance().

◆ GetNodeSearcher()

SMESH_NodeSearcher * SMESH_MeshAlgos::GetNodeSearcher ( SMDS_Mesh mesh)

Return SMESH_NodeSearcher. The caller is responsible for deleting it.

Return SMESH_NodeSearcher.

◆ IsOut()

bool SMESH_MeshAlgos::IsOut ( const SMDS_MeshElement element,
const gp_Pnt &  point,
double  tol 
)