Version: 9.16.0
DriverGMF_Read Class Reference

Driver reading a mesh from the GMF file. More...

#include <DriverGMF_Read.hxx>

Inheritance diagram for DriverGMF_Read:

Public Types

enum  Status {
  DRS_OK , DRS_EMPTY , DRS_WARN_RENUMBER , DRS_WARN_SKIP_ELEM ,
  DRS_WARN_DESCENDING , DRS_FAIL , DRS_TOO_LARGE_MESH
}
 

Public Member Functions

 DriverGMF_Read ()
 
 ~DriverGMF_Read ()
 
void SetMakeRequiredGroups (bool theMakeRequiredGroups)
 
void SetMakeFaultGroups (bool theMakeFaultGroups)
 
virtual Status Perform ()
 Read a GMF file. More...
 
bool GetMeshInfo (smIdType &nbVertex, smIdType &nbEdge, smIdType &nbFace, smIdType &nbVol)
 Return number of mesh entities in a file. More...
 
void SetMesh (SMESHDS_Mesh *theMesh)
 
void SetMeshId (int theMeshId)
 
virtual void SetFile (const std::string &theFileName)
 
virtual void SetMeshName (const std::string &theMeshName)
 
virtual std::string GetMeshName () const
 
virtual void SetOption (const std::string &, const std::string &)
 
virtual SMESH_ComputeErrorPtr GetError ()
 Return a structure containing description of errors. More...
 

Static Public Member Functions

template<typename IDTYPE >
static bool IsMeshTooLarge (const SMDS_Mesh *mesh, bool checkIDs)
 

Protected Member Functions

Status addMessage (const std::string &msg, const bool isFatal=false)
 Stores an error message. More...
 

Static Protected Member Functions

static std::string fixUTF8 (const std::string &s)
 Assure a string is UTF-8 valid by replacing invalid chars. More...
 

Protected Attributes

SMESHDS_MeshmyMesh
 
std::string myFile
 
std::string myMeshName
 
int myMeshId
 
std::vector< std::string > myErrorMessages
 
Status myStatus
 

Private Member Functions

Status storeBadNodeIds (const char *gmfKwd, int elemNb, int nb,...)
 Store a message about invalid IDs of nodes. More...
 

Private Attributes

bool _makeRequiredGroups
 
bool _makeFaultGroups
 

Detailed Description

Driver reading a mesh from the GMF file.

The mesh to read is selected by an index (counted form 0) set via SetMeshId()

Member Enumeration Documentation

◆ Status

enum Driver_Mesh::Status
inherited
Enumerator
DRS_OK 
DRS_EMPTY 
DRS_WARN_RENUMBER 
DRS_WARN_SKIP_ELEM 
DRS_WARN_DESCENDING 
DRS_FAIL 
DRS_TOO_LARGE_MESH 

Constructor & Destructor Documentation

◆ DriverGMF_Read()

DriverGMF_Read::DriverGMF_Read ( )

◆ ~DriverGMF_Read()

DriverGMF_Read::~DriverGMF_Read ( )

Member Function Documentation

◆ addMessage()

◆ fixUTF8()

std::string Driver_Mesh::fixUTF8 ( const std::string &  s)
staticprotectedinherited

Assure a string is UTF-8 valid by replacing invalid chars.

Referenced by DriverMED_R_SMESHDS_Mesh::Perform().

◆ GetError()

◆ GetMeshInfo()

bool DriverGMF_Read::GetMeshInfo ( smIdType &  nbVertex,
smIdType &  nbEdge,
smIdType &  nbFace,
smIdType &  nbVol 
)

◆ GetMeshName()

std::string Driver_Mesh::GetMeshName ( ) const
virtualinherited

◆ IsMeshTooLarge()

template<typename IDTYPE >
static bool Driver_Mesh::IsMeshTooLarge ( const SMDS_Mesh mesh,
bool  checkIDs 
)
staticinherited

◆ Perform()

◆ SetFile()

◆ SetMakeFaultGroups()

void DriverGMF_Read::SetMakeFaultGroups ( bool  theMakeFaultGroups)

◆ SetMakeRequiredGroups()

void DriverGMF_Read::SetMakeRequiredGroups ( bool  theMakeRequiredGroups)

Referenced by SMESH_Mesh::GMFToMesh().

◆ SetMesh()

◆ SetMeshId()

◆ SetMeshName()

void Driver_Mesh::SetMeshName ( const std::string &  theMeshName)
virtualinherited

◆ SetOption()

virtual void Driver_Mesh::SetOption ( const std::string &  ,
const std::string &   
)
virtualinherited

◆ storeBadNodeIds()

Driver_Mesh::Status DriverGMF_Read::storeBadNodeIds ( const char *  gmfKwd,
int  elemNb,
int  nb,
  ... 
)
private

Store a message about invalid IDs of nodes.

References Driver_Mesh::addMessage(), Driver_Mesh::DRS_OK, SMDS_Mesh::FindNode(), Driver_SMESHDS_Mesh::myMesh, and Driver_Mesh::myStatus.

Referenced by Perform().

Field Documentation

◆ _makeFaultGroups

bool DriverGMF_Read::_makeFaultGroups
private

Referenced by Perform().

◆ _makeRequiredGroups

bool DriverGMF_Read::_makeRequiredGroups
private

Referenced by Perform().

◆ myErrorMessages

std::vector< std::string > Driver_Mesh::myErrorMessages
protectedinherited

◆ myFile

◆ myMesh

◆ myMeshId

◆ myMeshName

◆ myStatus

Status Driver_Mesh::myStatus
protectedinherited