SMESH_Mesh Class Reference

#include <SMESH_Mesh.hxx>


Public Types

enum  ElementOrder { ORDER_ANY, ORDER_LINEAR, ORDER_QUADRATIC }

Public Member Functions

 SMESH_Mesh (int theLocalId, int theStudyId, SMESH_Gen *theGen, bool theIsEmbeddedMode, SMESHDS_Document *theDocument)
virtual ~SMESH_Mesh ()
void ShapeToMesh (const TopoDS_Shape &aShape)
int UNVToMesh (const char *theFileName)
int MEDToMesh (const char *theFileName, const char *theMeshName)
int STLToMesh (const char *theFileName)
SMESH_Hypothesis::Hypothesis_Status AddHypothesis (const TopoDS_Shape &aSubShape, int anHypId) throw (SALOME_Exception)
SMESH_Hypothesis::Hypothesis_Status RemoveHypothesis (const TopoDS_Shape &aSubShape, int anHypId) throw (SALOME_Exception)
const list< const SMESHDS_Hypothesis * > & GetHypothesisList (const TopoDS_Shape &aSubShape) const throw (SALOME_Exception)
const SMESH_HypothesisGetHypothesis (const TopoDS_Shape &aSubShape, const SMESH_HypoFilter &aFilter, const bool andAncestors) const
int GetHypotheses (const TopoDS_Shape &aSubShape, const SMESH_HypoFilter &aFilter, list< const SMESHDS_Hypothesis * > &aHypList, const bool andAncestors) const
 Return hypothesis assigned to the shape.
const list< SMESHDS_Command * > & GetLog () throw (SALOME_Exception)
void ClearLog () throw (SALOME_Exception)
int GetId ()
SMESHDS_MeshGetMeshDS ()
SMESH_GenGetGen ()
SMESH_subMeshGetSubMesh (const TopoDS_Shape &aSubShape) throw (SALOME_Exception)
SMESH_subMeshGetSubMeshContaining (const TopoDS_Shape &aSubShape) throw (SALOME_Exception)
SMESH_subMeshGetSubMeshContaining (const int aShapeID) throw (SALOME_Exception)
void NotifySubMeshesHypothesisModification (const SMESH_Hypothesis *theChangedHyp)
const list< SMESH_subMesh * > & GetSubMeshUsingHypothesis (SMESHDS_Hypothesis *anHyp) throw (SALOME_Exception)
bool IsUsedHypothesis (SMESHDS_Hypothesis *anHyp, const SMESH_subMesh *aSubMesh)
bool IsNotConformAllowed () const
bool IsMainShape (const TopoDS_Shape &theShape) const
const TopTools_ListOfShape & GetAncestors (const TopoDS_Shape &theSubShape) const
bool HasDuplicatedGroupNamesMED ()
void ExportMED (const char *file, const char *theMeshName=NULL, bool theAutoGroups=true, int theVersion=0) throw (SALOME_Exception)
void ExportDAT (const char *file) throw (SALOME_Exception)
void ExportUNV (const char *file) throw (SALOME_Exception)
void ExportSTL (const char *file, const bool isascii) throw (SALOME_Exception)
int NbNodes () throw (SALOME_Exception)
int NbEdges (ElementOrder order=ORDER_ANY) throw (SALOME_Exception)
int NbFaces (ElementOrder order=ORDER_ANY) throw (SALOME_Exception)
int NbTriangles (ElementOrder order=ORDER_ANY) throw (SALOME_Exception)
 Return the number of 3 nodes faces in the mesh.
int NbQuadrangles (ElementOrder order=ORDER_ANY) throw (SALOME_Exception)
 Return the number of 4 nodes faces in the mesh.
int NbPolygons () throw (SALOME_Exception)
 Return the number of polygonal faces in the mesh.
int NbVolumes (ElementOrder order=ORDER_ANY) throw (SALOME_Exception)
int NbTetras (ElementOrder order=ORDER_ANY) throw (SALOME_Exception)
int NbHexas (ElementOrder order=ORDER_ANY) throw (SALOME_Exception)
int NbPyramids (ElementOrder order=ORDER_ANY) throw (SALOME_Exception)
int NbPrisms (ElementOrder order=ORDER_ANY) throw (SALOME_Exception)
int NbPolyhedrons () throw (SALOME_Exception)
int NbSubMesh () throw (SALOME_Exception)
int NbGroup () const
SMESH_GroupAddGroup (const SMDSAbs_ElementType theType, const char *theName, int &theId, const TopoDS_Shape &theShape=TopoDS_Shape())
SMESH_GroupGetGroup (const int theGroupID)
list< intGetGroupIds ()
void RemoveGroup (const int theGroupID)
const SMESH_HypothesisIsLocal1DHypothesis (const TopoDS_Shape &theEdge)
bool IsPropagationHypothesis (const TopoDS_Shape &theEdge)
bool IsPropagatedHypothesis (const TopoDS_Shape &theEdge, TopoDS_Shape &theMainEdge)
bool IsReversedInChain (const TopoDS_Shape &theEdge, const TopoDS_Shape &theMainEdge)
bool RebuildPropagationChains ()
bool RemovePropagationChain (const TopoDS_Shape &theMainEdge)
bool BuildPropagationChain (const TopoDS_Shape &theMainEdge)
SMDSAbs_ElementType GetElementType (const int id, const bool iselem)
ostream & Dump (ostream &save)

Private Member Functions

 SMESH_Mesh ()
 SMESH_Mesh (const SMESH_Mesh &)
void CleanMeshOnPropagationChain (const TopoDS_Shape &theMainEdge)

Private Attributes

int _id
int _studyId
int _idDoc
int _groupId
bool _isShapeToMesh
list< SMESH_subMesh * > _subMeshesUsingHypothesisList
SMESHDS_Document_myDocument
SMESHDS_Mesh_myMeshDS
map< int, SMESH_subMesh * > _mapSubMesh
map< int, SMESH_Group * > _mapGroup
SMESH_Gen_gen
TopTools_IndexedDataMapOfShapeListOfShape _mapAncestors
IndexedMapOfChain _mapPropagationChains


Member Enumeration Documentation

enum SMESH_Mesh::ElementOrder
 

ElementOrder points out entities of what order are requested

Enumerator:
ORDER_ANY 
ORDER_LINEAR  entities of any order
ORDER_QUADRATIC  entities of 2nd order


Constructor & Destructor Documentation

SMESH_Mesh.SMESH_Mesh  )  [private]
 

SMESH_Mesh.SMESH_Mesh const SMESH_Mesh  )  [private]
 

SMESH_Mesh::SMESH_Mesh int  theLocalId,
int  theStudyId,
SMESH_Gen theGen,
bool  theIsEmbeddedMode,
SMESHDS_Document theDocument
 

SMESH_Mesh::~SMESH_Mesh  )  [virtual]
 


Member Function Documentation

void SMESH_Mesh::ShapeToMesh const TopoDS_Shape aShape  ) 
 

int SMESH_Mesh::UNVToMesh const char *  theFileName  ) 
 

int SMESH_Mesh::MEDToMesh const char *  theFileName,
const char *  theMeshName
 

consult DriverMED_R_SMESHDS_Mesh.ReadStatus for returned value

int SMESH_Mesh::STLToMesh const char *  theFileName  ) 
 

SMESH_Hypothesis::Hypothesis_Status SMESH_Mesh::AddHypothesis const TopoDS_Shape aSubShape,
int  anHypId
throw (SALOME_Exception)
 

SMESH_Hypothesis::Hypothesis_Status SMESH_Mesh::RemoveHypothesis const TopoDS_Shape aSubShape,
int  anHypId
throw (SALOME_Exception)
 

const list< const SMESHDS_Hypothesis * > & SMESH_Mesh::GetHypothesisList const TopoDS_Shape aSubShape  )  const throw (SALOME_Exception)
 

const SMESH_Hypothesis * SMESH_Mesh::GetHypothesis const TopoDS_Shape aSubShape,
const SMESH_HypoFilter aFilter,
const bool  andAncestors
const
 

int SMESH_Mesh::GetHypotheses const TopoDS_Shape aSubShape,
const SMESH_HypoFilter aFilter,
list< const SMESHDS_Hypothesis * > &  aHypList,
const bool  andAncestors
const
 

Parameters:
aSubShape - the shape to check
aFilter - the hypothesis filter
aHypList - the list of the found hypotheses
andAncestors - flag to check hypos assigned to ancestors of the shape
Return values:
int - number of unique hypos in aHypList

const list< SMESHDS_Command * > & SMESH_Mesh::GetLog  )  throw (SALOME_Exception)
 

void SMESH_Mesh::ClearLog  )  throw (SALOME_Exception)
 

int SMESH_Mesh::GetId  ) 
 

SMESHDS_Mesh * SMESH_Mesh::GetMeshDS  ) 
 

SMESH_Gen * SMESH_Mesh::GetGen  ) 
 

SMESH_subMesh * SMESH_Mesh::GetSubMesh const TopoDS_Shape aSubShape  )  throw (SALOME_Exception)
 

Get or Create the SMESH_subMesh object implementation

SMESH_subMesh * SMESH_Mesh::GetSubMeshContaining const TopoDS_Shape aSubShape  )  throw (SALOME_Exception)
 

Get the SMESH_subMesh object implementation. Dont create it, return null if it does not exist.

SMESH_subMesh * SMESH_Mesh::GetSubMeshContaining const int  aShapeID  )  throw (SALOME_Exception)
 

Get the SMESH_subMesh object implementation. Dont create it, return null if it does not exist.

void SMESH_Mesh::NotifySubMeshesHypothesisModification const SMESH_Hypothesis theChangedHyp  ) 
 

const list< SMESH_subMesh * > & SMESH_Mesh::GetSubMeshUsingHypothesis SMESHDS_Hypothesis anHyp  )  throw (SALOME_Exception)
 

bool SMESH_Mesh::IsUsedHypothesis SMESHDS_Hypothesis anHyp,
const SMESH_subMesh aSubMesh
 

bool SMESH_Mesh::IsNotConformAllowed  )  const
 

bool SMESH_Mesh::IsMainShape const TopoDS_Shape theShape  )  const
 

const TopTools_ListOfShape & SMESH_Mesh::GetAncestors const TopoDS_Shape theSubShape  )  const
 

bool SMESH_Mesh::HasDuplicatedGroupNamesMED  ) 
 

Check group names for duplications. Consider maximum group name length stored in MED file.

void SMESH_Mesh::ExportMED const char *  file,
const char *  theMeshName = NULL,
bool  theAutoGroups = true,
int  theVersion = 0
throw (SALOME_Exception)
 

void SMESH_Mesh::ExportDAT const char *  file  )  throw (SALOME_Exception)
 

void SMESH_Mesh::ExportUNV const char *  file  )  throw (SALOME_Exception)
 

void SMESH_Mesh::ExportSTL const char *  file,
const bool  isascii
throw (SALOME_Exception)
 

int SMESH_Mesh::NbNodes  )  throw (SALOME_Exception)
 

int SMESH_Mesh::NbEdges ElementOrder  order = ORDER_ANY  )  throw (SALOME_Exception)
 

int SMESH_Mesh::NbFaces ElementOrder  order = ORDER_ANY  )  throw (SALOME_Exception)
 

int SMESH_Mesh::NbTriangles ElementOrder  order = ORDER_ANY  )  throw (SALOME_Exception)
 

This method run in O(n)

int SMESH_Mesh::NbQuadrangles ElementOrder  order = ORDER_ANY  )  throw (SALOME_Exception)
 

This method run in O(n)

int SMESH_Mesh::NbPolygons  )  throw (SALOME_Exception)
 

This method run in O(n)

int SMESH_Mesh::NbVolumes ElementOrder  order = ORDER_ANY  )  throw (SALOME_Exception)
 

int SMESH_Mesh::NbTetras ElementOrder  order = ORDER_ANY  )  throw (SALOME_Exception)
 

int SMESH_Mesh::NbHexas ElementOrder  order = ORDER_ANY  )  throw (SALOME_Exception)
 

int SMESH_Mesh::NbPyramids ElementOrder  order = ORDER_ANY  )  throw (SALOME_Exception)
 

int SMESH_Mesh::NbPrisms ElementOrder  order = ORDER_ANY  )  throw (SALOME_Exception)
 

int SMESH_Mesh::NbPolyhedrons  )  throw (SALOME_Exception)
 

int SMESH_Mesh::NbSubMesh  )  throw (SALOME_Exception)
 

int SMESH_Mesh.NbGroup  )  const
 

SMESH_Group * SMESH_Mesh::AddGroup const SMDSAbs_ElementType  theType,
const char *  theName,
int theId,
const TopoDS_Shape theShape = TopoDS_Shape()
 

SMESH_Group * SMESH_Mesh::GetGroup const int  theGroupID  ) 
 

list< int > SMESH_Mesh::GetGroupIds  ) 
 

void SMESH_Mesh::RemoveGroup const int  theGroupID  ) 
 

const SMESH_Hypothesis * SMESH_Mesh::IsLocal1DHypothesis const TopoDS_Shape theEdge  ) 
 

IsLocal1DHypothesis Returns a local 1D hypothesis used for theEdge

bool SMESH_Mesh::IsPropagationHypothesis const TopoDS_Shape theEdge  ) 
 

IsPropagationHypothesis

bool SMESH_Mesh::IsPropagatedHypothesis const TopoDS_Shape theEdge,
TopoDS_Shape theMainEdge
 

IsPropagatedHypothesis

bool SMESH_Mesh::IsReversedInChain const TopoDS_Shape theEdge,
const TopoDS_Shape theMainEdge
 

IsReversedInChain

bool SMESH_Mesh::RebuildPropagationChains  ) 
 

RebuildPropagationChains Rebuild all existing propagation chains. Have to be used, if 1D hypothesis have been assigned/removed to/from any edge

bool SMESH_Mesh::RemovePropagationChain const TopoDS_Shape theMainEdge  ) 
 

RemovePropagationChain Have to be used, if Propagation hypothesis is removed from <theMainEdge>

bool SMESH_Mesh::BuildPropagationChain const TopoDS_Shape theMainEdge  ) 
 

BuildPropagationChain

SMDSAbs_ElementType SMESH_Mesh::GetElementType const int  id,
const bool  iselem
 

ostream & SMESH_Mesh::Dump ostream &  save  ) 
 

void SMESH_Mesh::CleanMeshOnPropagationChain const TopoDS_Shape theMainEdge  )  [private]
 

CleanMeshOnPropagationChain


Field Documentation

int SMESH_Mesh._id [private]
 

int SMESH_Mesh._studyId [private]
 

int SMESH_Mesh._idDoc [private]
 

int SMESH_Mesh._groupId [private]
 

bool SMESH_Mesh._isShapeToMesh [private]
 

list<SMESH_subMesh *> SMESH_Mesh._subMeshesUsingHypothesisList [private]
 

SMESHDS_Document* SMESH_Mesh._myDocument [private]
 

SMESHDS_Mesh* SMESH_Mesh._myMeshDS [private]
 

map<int, SMESH_subMesh *> SMESH_Mesh._mapSubMesh [private]
 

map<int, SMESH_Group *> SMESH_Mesh._mapGroup [private]
 

SMESH_Gen* SMESH_Mesh._gen [private]
 

TopTools_IndexedDataMapOfShapeListOfShape SMESH_Mesh._mapAncestors [private]
 

IndexedMapOfChain SMESH_Mesh._mapPropagationChains [private]