Version: 9.16.0
SMESHUtils Namespace Reference

Data Structures

struct  ArrayDeleter
 Auto pointer to array. More...
 
class  BoostTxtArchive
 Load an object from a string created by boost::archive::text_oarchive. More...
 
struct  ControlPnt
 Control point: coordinates and element size at these coordinates. More...
 
struct  Deleter
 Auto pointer. More...
 
class  SMESH_RegularGrid
 Define a regular grid of nx,ny,nz dimension. More...
 

Functions

void subdivideTriangle (const gp_Pnt &p1, const gp_Pnt &p2, const gp_Pnt &p3, const double &theSize, std::vector< ControlPnt > &thePoints)
 Subdivides a triangle until it reaches a certain size (recursive function) More...
 
void computePointsForSplitting (const gp_Pnt &p1, const gp_Pnt &p2, const gp_Pnt &p3, gp_Pnt midPoints[3])
 Returns the appropriate points for splitting a triangle the tangency points of the incircle are used in order to have mostly well-shaped sub-triangles. More...
 
gp_Pnt tangencyPoint (const gp_Pnt &p1, const gp_Pnt &p2, const gp_Pnt &Center)
 Computes the tangency points of the circle of center Center with. More...
 
void createControlPoints (const TopoDS_Shape &theShape, const double &theSize, std::vector< ControlPnt > &thePoints)
 Fills a vector of points from which a size map input file can be written. More...
 
void createPointsSampleFromEdge (const TopoDS_Edge &theEdge, const double &theSize, std::vector< ControlPnt > &thePoints)
 Fills a vector of points with point samples approximately. More...
 
void createPointsSampleFromFace (const TopoDS_Face &theFace, const double &theSize, std::vector< ControlPnt > &thePoints)
 Fills a vector of points with point samples approximately. More...
 
void createPointsSampleFromSolid (const TopoDS_Solid &theSolid, const double &theSize, std::vector< ControlPnt > &thePoints)
 Fills a vector of points with point samples approximately. More...
 
template<class TVECTOR >
void FreeVector (TVECTOR &vec)
 Enforce freeing memory allocated by std::vector. More...
 
template<class TVECTOR >
void CompactVector (TVECTOR &vec)
 
template<class ELEM_SET >
SMDS_ElemIteratorPtr elemSetIterator (const ELEM_SET &elements)
 
template<typename ENUM >
void Increment (ENUM &v, int delta=1)
 Increment enum value. More...
 
template<typename ENUM >
ENUM Add (ENUM v, int delta)
 Return incremented enum value. More...
 

Function Documentation

◆ Add()

◆ CompactVector()

template<class TVECTOR >
void SMESHUtils::CompactVector ( TVECTOR &  vec)

◆ computePointsForSplitting()

void SMESHUtils::computePointsForSplitting ( const gp_Pnt &  p1,
const gp_Pnt &  p2,
const gp_Pnt &  p3,
gp_Pnt  midPoints[3] 
)

Returns the appropriate points for splitting a triangle the tangency points of the incircle are used in order to have mostly well-shaped sub-triangles.

References tangencyPoint().

Referenced by subdivideTriangle().

◆ createControlPoints()

void SMESHUtils::createControlPoints ( const TopoDS_Shape &  theShape,
const double &  theSize,
std::vector< ControlPnt > &  thePoints 
)

Fills a vector of points from which a size map input file can be written.

References createControlPoints(), createPointsSampleFromEdge(), createPointsSampleFromFace(), createPointsSampleFromSolid(), Edge, and Face.

Referenced by createControlPoints().

◆ createPointsSampleFromEdge()

void SMESHUtils::createPointsSampleFromEdge ( const TopoDS_Edge &  theEdge,
const double &  theSize,
std::vector< ControlPnt > &  thePoints 
)

Fills a vector of points with point samples approximately.

spaced with a given size

References Handle(), and SMESHUtils::ControlPnt::SetSize().

Referenced by createControlPoints().

◆ createPointsSampleFromFace()

void SMESHUtils::createPointsSampleFromFace ( const TopoDS_Face &  theFace,
const double &  theSize,
std::vector< ControlPnt > &  thePoints 
)

Fills a vector of points with point samples approximately.

spaced with a given size

References Handle(), and subdivideTriangle().

Referenced by createControlPoints().

◆ createPointsSampleFromSolid()

void SMESHUtils::createPointsSampleFromSolid ( const TopoDS_Solid &  theSolid,
const double &  theSize,
std::vector< ControlPnt > &  thePoints 
)

Fills a vector of points with point samples approximately.

spaced with a given size

References Add(), Face, and MESHCUT::intersections.

Referenced by createControlPoints().

◆ elemSetIterator()

◆ FreeVector()

◆ Increment()

template<typename ENUM >
void SMESHUtils::Increment ( ENUM &  v,
int  delta = 1 
)

◆ subdivideTriangle()

void SMESHUtils::subdivideTriangle ( const gp_Pnt &  p1,
const gp_Pnt &  p2,
const gp_Pnt &  p3,
const double &  theSize,
std::vector< ControlPnt > &  thePoints 
)

Subdivides a triangle until it reaches a certain size (recursive function)

References computePointsForSplitting(), and subdivideTriangle().

Referenced by createPointsSampleFromFace(), and subdivideTriangle().

◆ tangencyPoint()

gp_Pnt SMESHUtils::tangencyPoint ( const gp_Pnt &  p1,
const gp_Pnt &  p2,
const gp_Pnt &  Center 
)

Computes the tangency points of the circle of center Center with.

the straight line (p1 p2)

References MESHCUT::d.

Referenced by computePointsForSplitting().