Version: 8.3.0
SMDS_VolumeTool Class Reference

#include <SMDS_VolumeTool.hxx>

Data Structures

struct  Facet
 
struct  SaveFacet
 Saver/restorer of a SMDS_VolumeTool::myCurFace. More...
 

Public Types

enum  VolumeType {
  UNKNOWN = -1, TETRA = 0, PYRAM, PENTA,
  HEXA, HEX_PRISM, QUAD_TETRA, QUAD_PYRAM,
  QUAD_PENTA, QUAD_HEXA, POLYHEDA, NB_VOLUME_TYPES
}
 

Public Member Functions

 SMDS_VolumeTool ()
 
 ~SMDS_VolumeTool ()
 
 SMDS_VolumeTool (const SMDS_MeshElement *theVolume, const bool ignoreCentralNodes=true)
 
bool Set (const SMDS_MeshElement *theVolume, const bool ignoreCentralNodes=true, const std::vector< const SMDS_MeshNode * > *nodes=0)
 
const SMDS_MeshVolumeElement () const
 
int ID () const
 
bool IsPoly () const
 
VolumeType GetVolumeType () const
 
bool IsForward () const
 
void Inverse ()
 
const SMDS_MeshNode ** GetNodes () const
 
int NbNodes () const
 
double GetSize () const
 
bool GetBaryCenter (double &X, double &Y, double &Z) const
 
bool IsOut (double X, double Y, double Z, double tol) const
 Classify a point. More...
 
bool IsLinked (const SMDS_MeshNode *theNode1, const SMDS_MeshNode *theNode2, const bool theIgnoreMediumNodes=false) const
 
bool IsLinked (const int theNode1Index, const int theNode2Index, bool theIgnoreMediumNodes=false) const
 
int GetNodeIndex (const SMDS_MeshNode *theNode) const
 
int GetAllExistingEdges (std::vector< const SMDS_MeshElement * > &edges) const
 Fill vector with boundary edges existing in the mesh. More...
 
double MinLinearSize2 () const
 Return minimal square distance between connected corner nodes. More...
 
double MaxLinearSize2 () const
 Return maximal square distance between connected corner nodes. More...
 
void SetExternalNormal ()
 
int NbFaces () const
 
int NbFaceNodes (int faceIndex) const
 
const intGetFaceNodesIndices (int faceIndex) const
 
const SMDS_MeshNode ** GetFaceNodes (int faceIndex) const
 
bool GetFaceNodes (int faceIndex, std::set< const SMDS_MeshNode * > &theFaceNodes) const
 
bool IsFaceExternal (int faceIndex) const
 
bool IsFreeFace (int faceIndex, const SMDS_MeshElement **otherVol=0) const
 fast check that only one volume is build on the face nodes This check is valid for conformal meshes only More...
 
bool IsFreeFaceAdv (int faceIndex, const SMDS_MeshElement **otherVol=0) const
 Thorough check that only one volume is build on the face nodes. More...
 
bool GetFaceNormal (int faceIndex, double &X, double &Y, double &Z) const
 
bool GetFaceBaryCenter (int faceIndex, double &X, double &Y, double &Z) const
 Return barycenter of a face. More...
 
double GetFaceArea (int faceIndex) const
 
int GetOppFaceIndex (int faceIndex) const
 
int GetCenterNodeIndex (int faceIndex) const
 Return index of the node located at face center of a quadratic element like HEX27. More...
 
int GetFaceIndex (const std::set< const SMDS_MeshNode * > &theFaceNodes, const int theFaceIndexHint=-1) const
 
int GetAllExistingFaces (std::vector< const SMDS_MeshElement * > &faces) const
 Fill vector with boundary faces existing in the mesh. More...
 

Static Public Member Functions

static VolumeType GetType (int nbNodes)
 
static int NbFaces (VolumeType type)
 
static const intGetFaceNodesIndices (VolumeType type, int faceIndex, bool external)
 
static int NbFaceNodes (VolumeType type, int faceIndex)
 
static int NbCornerNodes (VolumeType type)
 Useful to know nb of corner nodes of a quadratic volume. More...
 
static int GetOppFaceIndexOfHex (int faceIndex)
 

Private Types

typedef std::pair< int, intLink
 

Private Member Functions

bool setFace (int faceIndex) const
 
bool projectNodesToNormal (int faceIndex, double &minProj, double &maxProj) const
 

Private Attributes

const SMDS_MeshElementmyVolume
 
const SMDS_VtkVolumemyPolyedre
 
bool myIgnoreCentralNodes
 
bool myVolForward
 
int myNbFaces
 
std::vector< const
SMDS_MeshNode * > 
myVolumeNodes
 
std::vector< intmyPolyIndices
 
std::vector< intmyPolyQuantities
 
std::vector< intmyPolyFacetOri
 
std::map< Link, intmyFwdLinks
 
bool myExternalFaces
 
const intmyAllFacesNodeIndices_F
 
const intmyAllFacesNodeIndices_RE
 
const intmyAllFacesNbNodes
 
int myMaxFaceNbNodes
 
Facet myCurFace
 

Member Typedef Documentation

typedef std::pair<int,int> SMDS_VolumeTool::Link
private

Member Enumeration Documentation

Enumerator
UNKNOWN 
TETRA 
PYRAM 
PENTA 
HEXA 
HEX_PRISM 
QUAD_TETRA 
QUAD_PYRAM 
QUAD_PENTA 
QUAD_HEXA 
POLYHEDA 
NB_VOLUME_TYPES 

Constructor & Destructor Documentation

SMDS_VolumeTool::SMDS_VolumeTool ( )
SMDS_VolumeTool::~SMDS_VolumeTool ( )
SMDS_VolumeTool::SMDS_VolumeTool ( const SMDS_MeshElement theVolume,
const bool  ignoreCentralNodes = true 
)

Member Function Documentation

const SMDS_MeshVolume * SMDS_VolumeTool::Element ( ) const
int SMDS_VolumeTool::GetAllExistingEdges ( std::vector< const SMDS_MeshElement * > &  edges) const

Fill vector with boundary edges existing in the mesh.

Parameters
edges- vector of found edges
Return values
int- nb of found faces

References SMDS_Mesh::FindEdge().

Referenced by _MySubIterator::_MySubIterator().

int SMDS_VolumeTool::GetAllExistingFaces ( std::vector< const SMDS_MeshElement * > &  faces) const

Fill vector with boundary faces existing in the mesh.

Parameters
faces- vector of found nodes
Return values
int- nb of found faces

References SMDS_Mesh::FindFace().

Referenced by _MySubIterator::_MySubIterator().

bool SMDS_VolumeTool::GetBaryCenter ( double &  X,
double &  Y,
double &  Z 
) const
int SMDS_VolumeTool::GetCenterNodeIndex ( int  faceIndex) const

Return index of the node located at face center of a quadratic element like HEX27.

Referenced by SMESH_MesherHelper::AddTLinks(), and SMESH_MeshEditor::SplitVolumes().

double SMDS_VolumeTool::GetFaceArea ( int  faceIndex) const
bool SMDS_VolumeTool::GetFaceBaryCenter ( int  faceIndex,
double &  X,
double &  Y,
double &  Z 
) const

Return barycenter of a face.

Referenced by SMESH_MeshAlgos::GetDistance(), and SMESH_MeshEditor::SplitVolumes().

int SMDS_VolumeTool::GetFaceIndex ( const std::set< const SMDS_MeshNode * > &  theFaceNodes,
const int  theFaceIndexHint = -1 
) const
bool SMDS_VolumeTool::GetFaceNodes ( int  faceIndex,
std::set< const SMDS_MeshNode * > &  theFaceNodes 
) const
const int * SMDS_VolumeTool::GetFaceNodesIndices ( VolumeType  type,
int  faceIndex,
bool  external 
)
static
bool SMDS_VolumeTool::GetFaceNormal ( int  faceIndex,
double &  X,
double &  Y,
double &  Z 
) const
int SMDS_VolumeTool::GetNodeIndex ( const SMDS_MeshNode theNode) const
int SMDS_VolumeTool::GetOppFaceIndex ( int  faceIndex) const

References MESSAGE.

Referenced by SMESH_MeshEditor::applyMerge().

int SMDS_VolumeTool::GetOppFaceIndexOfHex ( int  faceIndex)
static
double SMDS_VolumeTool::GetSize ( ) const
SMDS_VolumeTool::VolumeType SMDS_VolumeTool::GetVolumeType ( ) const
int SMDS_VolumeTool::ID ( ) const
void SMDS_VolumeTool::Inverse ( )

References MESSAGE, and SWAP_NODES.

bool SMDS_VolumeTool::IsFaceExternal ( int  faceIndex) const
bool SMDS_VolumeTool::IsFreeFaceAdv ( int  faceIndex,
const SMDS_MeshElement **  otherVol = 0 
) const

Thorough check that only one volume is build on the face nodes.

References GetBaryCenter(), SMDS_MeshNode::GetInverseElementIterator(), and SMDSAbs_Volume.

bool SMDS_VolumeTool::IsLinked ( const SMDS_MeshNode theNode1,
const SMDS_MeshNode theNode2,
const bool  theIgnoreMediumNodes = false 
) const
bool SMDS_VolumeTool::IsLinked ( const int  theNode1Index,
const int  theNode2Index,
bool  theIgnoreMediumNodes = false 
) const
bool SMDS_VolumeTool::IsOut ( double  X,
double  Y,
double  Z,
double  tol 
) const

Classify a point.

Parameters
tol- thickness of faces

Referenced by SMESH_MeshAlgos::IsOut().

bool SMDS_VolumeTool::IsPoly ( ) const
double SMDS_VolumeTool::MaxLinearSize2 ( ) const

Return maximal square distance between connected corner nodes.

double SMDS_VolumeTool::MinLinearSize2 ( ) const

Return minimal square distance between connected corner nodes.

Referenced by SMESH_MesherHelper::FixQuadraticElements().

int SMDS_VolumeTool::NbCornerNodes ( VolumeType  type)
static

Useful to know nb of corner nodes of a quadratic volume.

Parameters
type- volume type
Return values
int- nb of corner nodes

Referenced by StdMeshers_Projection_3D::Compute().

int SMDS_VolumeTool::NbFaceNodes ( VolumeType  type,
int  faceIndex 
)
static
int SMDS_VolumeTool::NbFaces ( VolumeType  type)
static
bool SMDS_VolumeTool::projectNodesToNormal ( int  faceIndex,
double &  minProj,
double &  maxProj 
) const
private
bool SMDS_VolumeTool::setFace ( int  faceIndex) const
private

myAllFacesNodeIndices_FE = &Hexa_FE[0][0];

References me, MESSAGE, myPolyIndices, myPolyQuantities, and reverse().

Referenced by GetSize().

Field Documentation

const int* SMDS_VolumeTool::myAllFacesNbNodes
mutableprivate
const int* SMDS_VolumeTool::myAllFacesNodeIndices_F
mutableprivate
const int* SMDS_VolumeTool::myAllFacesNodeIndices_RE
mutableprivate
Facet SMDS_VolumeTool::myCurFace
mutableprivate
bool SMDS_VolumeTool::myExternalFaces
mutableprivate
std::map<Link, int> SMDS_VolumeTool::myFwdLinks
private

Referenced by IsFaceExternal().

bool SMDS_VolumeTool::myIgnoreCentralNodes
private
int SMDS_VolumeTool::myMaxFaceNbNodes
mutableprivate
int SMDS_VolumeTool::myNbFaces
private
const SMDS_VtkVolume* SMDS_VolumeTool::myPolyedre
private
std::vector< int > SMDS_VolumeTool::myPolyFacetOri
private

Referenced by IsFaceExternal().

std::vector< int > SMDS_VolumeTool::myPolyIndices
private

Referenced by setFace().

std::vector< int > SMDS_VolumeTool::myPolyQuantities
private

Referenced by IsLinked(), and setFace().

bool SMDS_VolumeTool::myVolForward
private
const SMDS_MeshElement* SMDS_VolumeTool::myVolume
private
std::vector<const SMDS_MeshNode*> SMDS_VolumeTool::myVolumeNodes
private