Version: 9.16.0
SMESH::Position Class Reference

Describes position of mesh node or element on a reference shape. More...

#include <SMESHGUI_SelectionProxy.h>

Public Member Functions

 Position ()
 Constructor. More...
 
bool isValid () const
 Check if position is valid. More...
 
int shapeId () const
 Get reference shape ID. More...
 
int shapeType () const
 Get reference shape type. More...
 
bool hasU () const
 Check if there is U position on a shape. More...
 
double u () const
 Get U position on a shape. More...
 
bool hasV () const
 Check if there is V position on a shape. More...
 
double v () const
 Get V position on a shape. More...
 

Private Member Functions

void setShapeId (int)
 Set reference shape ID. More...
 
void setShapeType (int)
 Set reference shape type. More...
 
void setU (double)
 Set U position on a shape. More...
 
void setV (double)
 Set V position on a shape. More...
 

Private Attributes

int myShapeId
 
int myShapeType
 
double myU
 
double myV
 
bool myHasU
 
bool myHasV
 

Friends

class SelectionProxy
 

Detailed Description

Describes position of mesh node or element on a reference shape.

Constructor & Destructor Documentation

◆ Position()

SMESH::Position::Position ( )

Constructor.

Creates invalid position.

Member Function Documentation

◆ hasU()

bool SMESH::Position::hasU ( ) const

Check if there is U position on a shape.

Returns
true if U position is valid; false otherwise.

Referenced by SMESHGUI_ElemInfo::writeInfo().

◆ hasV()

bool SMESH::Position::hasV ( ) const

Check if there is V position on a shape.

Returns
true if V position is valid; false otherwise.

Referenced by SMESHGUI_ElemInfo::writeInfo().

◆ isValid()

bool SMESH::Position::isValid ( ) const

Check if position is valid.

Returns
true if position is valid; false otherwise.

Referenced by SMESHGUI_ElemInfo::writeInfo().

◆ setShapeId()

void SMESH::Position::setShapeId ( int  id)
private

Set reference shape ID.

Parameters
idShape / sub-shape ID.

Referenced by SMESH::SelectionProxy::elementPosition(), and SMESH::SelectionProxy::nodePosition().

◆ setShapeType()

void SMESH::Position::setShapeType ( int  type)
private

Set reference shape type.

Parameters
typeShape type.

Referenced by SMESH::SelectionProxy::elementPosition(), and SMESH::SelectionProxy::nodePosition().

◆ setU()

void SMESH::Position::setU ( double  u)
private

Set U position on a shape.

\parm u U position.

Referenced by SMESH::SelectionProxy::nodePosition().

◆ setV()

void SMESH::Position::setV ( double  v)
private

Set V position on a shape.

\parm v V position.

Referenced by SMESH::SelectionProxy::nodePosition().

◆ shapeId()

int SMESH::Position::shapeId ( ) const

Get reference shape ID.

Returns
Shape / sub-shape ID.

Referenced by SMESHGUI_ElemInfo::writeInfo().

◆ shapeType()

int SMESH::Position::shapeType ( ) const

Get reference shape type.

Returns
Shape type.

Referenced by SMESHGUI_ElemInfo::writeInfo().

◆ u()

double SMESH::Position::u ( ) const

Get U position on a shape.

Returns
U position.

Referenced by SMESHGUI_ElemInfo::writeInfo().

◆ v()

double SMESH::Position::v ( ) const

Get V position on a shape.

Returns
V position.

Referenced by SMESHGUI_ElemInfo::writeInfo().

Friends And Related Function Documentation

◆ SelectionProxy

friend class SelectionProxy
friend

Field Documentation

◆ myHasU

bool SMESH::Position::myHasU
private

◆ myHasV

bool SMESH::Position::myHasV
private

◆ myShapeId

int SMESH::Position::myShapeId
private

◆ myShapeType

int SMESH::Position::myShapeType
private

◆ myU

double SMESH::Position::myU
private

◆ myV

double SMESH::Position::myV
private