Version: 8.3.0
SMESH_MeshAlgos Namespace Reference

Data Structures

struct  TFreeBorderPart
 
struct  CoincidentFreeBorders
 

Typedefs

typedef std::vector< const
SMDS_MeshNode * > 
TFreeBorder
 
typedef std::vector< TFreeBorderTFreeBorderVec
 
typedef std::vector
< TFreeBorderPart
TCoincidentGroup
 
typedef std::vector
< TCoincidentGroup
TCoincidentGroupVec
 

Functions

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...
 
double GetDistance (const SMDS_MeshElement *elem, const gp_Pnt &point)
 Return minimal distance from a point to an element. More...
 
double GetDistance (const SMDS_MeshEdge *edge, const gp_Pnt &point)
 Return minimal distance from a point to an edge. More...
 
double GetDistance (const SMDS_MeshFace *face, const gp_Pnt &point)
 Return minimal distance from a point to a face. More...
 
double GetDistance (const SMDS_MeshVolume *volume, const gp_Pnt &point)
 Return minimal distance from a point to a volume. More...
 
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. More...
 
const SMDS_MeshElementFindFaceInSet (const SMDS_MeshNode *n1, const SMDS_MeshNode *n2, const TIDSortedElemSet &elemSet, const TIDSortedElemSet &avoidSet, int *i1=0, int *i2=0)
 Return a face having linked nodes n1 and n2 and which is. More...
 
bool FaceNormal (const SMDS_MeshElement *F, gp_XYZ &normal, bool normalized=true)
 Calculate normal of a mesh face. More...
 
std::vector< const
SMDS_MeshNode * > 
GetCommonNodes (const SMDS_MeshElement *e1, const SMDS_MeshElement *e2)
 Return nodes common to two elements. More...
 
SMESH_NodeSearcherGetNodeSearcher (SMDS_Mesh &mesh)
 Return SMESH_NodeSearcher. More...
 
SMESH_NodeSearcherGetNodeSearcher (SMDS_ElemIteratorPtr elemIt)
 Return SMESH_NodeSearcher. More...
 
SMESH_ElementSearcherGetElementSearcher (SMDS_Mesh &mesh, double tolerance=-1.)
 Return SMESH_ElementSearcher. More...
 
SMESH_ElementSearcherGetElementSearcher (SMDS_Mesh &mesh, SMDS_ElemIteratorPtr elemIt, double tolerance=-1.)
 Return SMESH_ElementSearcher acting on a sub-set of elements. More...
 
void FindCoincidentFreeBorders (SMDS_Mesh &mesh, double tolerance, CoincidentFreeBorders &foundFreeBordes)
 Returns TFreeBorder's coincident within the given tolerance. More...
 
void DeMerge (const SMDS_MeshElement *elem, std::vector< const SMDS_MeshNode * > &newNodes, std::vector< const SMDS_MeshNode * > &noMergeNodes)
 Find nodes whose merge makes the element invalid. More...
 

Typedef Documentation

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

Function Documentation

void SMESH_MeshAlgos::DeMerge ( const SMDS_MeshElement elem,
std::vector< const SMDS_MeshNode * > &  newNodes,
std::vector< const SMDS_MeshNode * > &  noMergeNodes 
)

Find nodes whose merge makes the element invalid.

(Implemented in SMESH_DeMerge.cxx)

(Degenerated elem is OK)

Parameters
[in]elem- the element
[in]newNodes- nodes of the element after the merge
[out]noMergeNodes- nodes to undo merge

References SMDS_MeshCell::applyInterlace(), SMDS_MeshElement::GetEntityType(), SMDS_MeshElement::GetType(), SMDS_MeshCell::interlacedSmdsOrder(), SMDS_MeshElement::IsQuadratic(), SMDS_VolumeTool::Set(), SMDSAbs_Edge, SMDSAbs_Face, and SMDSAbs_Volume.

Referenced by SMESH_MeshEditor::applyMerge().

void SMESH_MeshAlgos::GetBarycentricCoords ( const gp_XY &  p,
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 )

References Abs().

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

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 SMDS_MeshElement::GetType(), SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_Node, and SMDSAbs_Volume.

Referenced by SMESH_ElementSearcherImpl::FindClosestTo(), GetDistance(), and VISCOUS_3D::_SolidData::PrepareEdgesToSmoothOnFace().

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

Return minimal distance from a point to an edge.

References SMDS_MeshElement::interlacedNodesElemIterator(), Min(), and SMDS_MeshElement::NbNodes().

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

References Abs(), SMDS_MeshElement::NbCornerNodes(), and SMDS_MeshElement::nodesIterator().

double SMESH_MeshAlgos::GetDistance ( const SMDS_MeshVolume volume,
const gp_Pnt &  point 
)
SMESH_ElementSearcher * SMESH_MeshAlgos::GetElementSearcher ( SMDS_Mesh mesh,
SMDS_ElemIteratorPtr  elemIt,
double  tolerance = -1. 
)

Return SMESH_ElementSearcher acting on a sub-set of elements.

SMESH_NodeSearcher * SMESH_MeshAlgos::GetNodeSearcher ( SMDS_Mesh mesh)
SMESH_NodeSearcher * SMESH_MeshAlgos::GetNodeSearcher ( SMDS_ElemIteratorPtr  elemIt)