Version: 8.3.0
DriverSTL_W_SMDS_Mesh Class Reference

Writer of a mesh in STL (STereoLithography) file format. More...

#include <DriverSTL_W_SMDS_Mesh.h>

Inheritance diagram for DriverSTL_W_SMDS_Mesh:

Public Types

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

Public Member Functions

 DriverSTL_W_SMDS_Mesh ()
 
 ~DriverSTL_W_SMDS_Mesh ()
 Destructor deletes temporary faces. More...
 
virtual Status Perform ()
 
void SetIsAscii (const bool theIsAscii=false)
 
void SetName (const std::string name)
 
void SetMesh (SMDS_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 &optionName, const std::string &optionValue)
 
virtual SMESH_ComputeErrorPtr GetError ()
 Return a structure containing description of errors. More...
 

Protected Member Functions

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

Protected Attributes

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

Private Member Functions

Status writeAscii () const
 
Status writeBinary () const
 Writes all triangles in binary format. More...
 
void findVolumeTriangles ()
 Finds free facets of volumes for which faces are missing in the mesh. More...
 
SMDS_ElemIteratorPtr getFaces () const
 Return iterator on both faces in the mesh and on temporary faces. More...
 

Private Attributes

bool myIsAscii
 
std::string myName
 
int myNbVolumeTrias
 
std::vector< const
SMDS_MeshElement * > 
myVolumeFacets
 

Detailed Description

Writer of a mesh in STL (STereoLithography) file format.

Member Enumeration Documentation

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

Constructor & Destructor Documentation

DriverSTL_W_SMDS_Mesh::DriverSTL_W_SMDS_Mesh ( )

References myIsAscii.

DriverSTL_W_SMDS_Mesh::~DriverSTL_W_SMDS_Mesh ( )

Destructor deletes temporary faces.

References myVolumeFacets.

Member Function Documentation

Driver_Mesh::Status Driver_Mesh::addMessage ( const std::string &  msg,
const bool  isFatal = false 
)
protectedinherited
SMESH_ComputeErrorPtr Driver_Mesh::GetError ( )
virtualinherited
SMDS_ElemIteratorPtr DriverSTL_W_SMDS_Mesh::getFaces ( ) const
private

Return iterator on both faces in the mesh and on temporary faces.

References SMDS_Mesh::elementsIterator(), Driver_SMDS_Mesh::myMesh, myVolumeFacets, and SMDSAbs_Face.

Referenced by writeAscii(), and writeBinary().

std::string Driver_Mesh::GetMeshName ( ) const
virtualinherited
void DriverSTL_W_SMDS_Mesh::SetIsAscii ( const bool  theIsAscii = false)

References myIsAscii.

void Driver_SMDS_Mesh::SetMesh ( SMDS_Mesh theMesh)
inherited
void Driver_Mesh::SetMeshName ( const std::string &  theMeshName)
virtualinherited
void DriverSTL_W_SMDS_Mesh::SetName ( const std::string  name)
virtual void Driver_Mesh::SetOption ( const std::string &  optionName,
const std::string &  optionValue 
)
virtualinherited

Field Documentation

std::vector< std::string > Driver_Mesh::myErrorMessages
protectedinherited
bool DriverSTL_W_SMDS_Mesh::myIsAscii
private
int Driver_Mesh::myMeshId
protectedinherited
std::string Driver_Mesh::myMeshName
protectedinherited
std::string DriverSTL_W_SMDS_Mesh::myName
private

Referenced by writeAscii(), and writeBinary().

int DriverSTL_W_SMDS_Mesh::myNbVolumeTrias
private

Referenced by findVolumeTriangles(), and writeBinary().

Status Driver_Mesh::myStatus
protectedinherited
std::vector<const SMDS_MeshElement*> DriverSTL_W_SMDS_Mesh::myVolumeFacets
private