Writer of a mesh in STL (STereoLithography) file format. More...
#include <DriverSTL_W_SMDS_Mesh.h>

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_Mesh * | myMesh |
| 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 |
Writer of a mesh in STL (STereoLithography) file format.
|
inherited |
| DriverSTL_W_SMDS_Mesh::DriverSTL_W_SMDS_Mesh | ( | ) |
References myIsAscii.
| DriverSTL_W_SMDS_Mesh::~DriverSTL_W_SMDS_Mesh | ( | ) |
Destructor deletes temporary faces.
References myVolumeFacets.
|
protectedinherited |
Stores an error message.
We consider an error fatal if none mesh can be read
References Driver_Mesh::DRS_FAIL, Driver_Mesh::DRS_WARN_SKIP_ELEM, MESSAGE, Driver_Mesh::myErrorMessages, and Driver_Mesh::myStatus.
Referenced by DriverGMF_Write::Perform(), DriverGMF_Read::Perform(), DriverMED_W_Field::Perform(), and DriverGMF_Read::storeBadNodeIds().
|
private |
Finds free facets of volumes for which faces are missing in the mesh.
References SMDS_Mesh::FindElement(), SMDS_VolumeTool::GetFaceNodes(), SMDS_VolumeTool::IsFreeFace(), SMDS_VolumeTool::IsPoly(), Driver_SMDS_Mesh::myMesh, myNbVolumeTrias, myVolumeFacets, SMDS_VolumeTool::NbFaceNodes(), SMDS_VolumeTool::NbFaces(), SMDS_VolumeTool::Set(), SMDSAbs_Face, and SMDS_Mesh::volumesIterator().
Referenced by Perform().
|
virtualinherited |
Return a structure containing description of errors.
References COMPERR_OK, Driver_Mesh::DRS_OK, Driver_Mesh::myErrorMessages, Driver_Mesh::myStatus, and SMESH_ComputeError::New().
Referenced by SMESH_Mesh_i::exportMEDFields(), SMESH_Mesh::GMFToMesh(), and SMESH_Mesh::MEDToMesh().
|
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().
|
virtualinherited |
References Driver_Mesh::myMeshName.
Referenced by SMESH_Mesh::CGNSToMesh().
|
virtual |
Implements Driver_Mesh.
References Driver_Mesh::DRS_FAIL, Driver_Mesh::DRS_OK, findVolumeTriangles(), myIsAscii, Driver_SMDS_Mesh::myMesh, writeAscii(), and writeBinary().
|
virtualinherited |
Reimplemented in DriverMED_W_SMESHDS_Mesh.
References Driver_Mesh::myFile.
Referenced by SMESH_Mesh::CGNSToMesh(), SMESH_Gen_i::CreateMeshesFromCGNS(), SMESH_Gen_i::CreateMeshesFromMEDorSAUV(), SMESH_Mesh_i::ExportPartToMED(), SMESH_PreMeshInfo::FullLoadFromFile(), SMESH_Mesh::GMFToMesh(), SMESH_Mesh::MEDToMesh(), DriverMED_W_SMESHDS_Mesh::SetFile(), SMESH_Mesh::STLToMesh(), and SMESH_Mesh::UNVToMesh().
|
inherited |
References Driver_SMDS_Mesh::myMesh.
Referenced by SMESH_Mesh::STLToMesh(), and SMESH_Mesh::UNVToMesh().
|
inherited |
|
virtualinherited |
References Driver_Mesh::myMeshName.
Referenced by SMESH_Mesh_i::ExportPartToMED().
| void DriverSTL_W_SMDS_Mesh::SetName | ( | const std::string | name | ) |
|
virtualinherited |
|
private |
References Driver_Mesh::DRS_FAIL, Driver_Mesh::DRS_OK, getFaces(), getNormale(), getTriangles(), Driver_Mesh::myFile, myName, MESHCUT::normale, SMESH_File::openForWriting(), and SMESH_File::writeRaw().
Referenced by Perform().
|
private |
Writes all triangles in binary format.
References Driver_Mesh::DRS_FAIL, Driver_Mesh::DRS_OK, SMDS_Mesh::facesIterator(), getFaces(), getNbTriangles(), getNormale(), getTriangles(), LABEL_SIZE, Driver_Mesh::myFile, Driver_SMDS_Mesh::myMesh, myName, myNbVolumeTrias, MESHCUT::normale, SMESH_File::openForWriting(), SMESH_File::write(), writeFloat(), writeInteger(), SMESH_File::writeRaw(), SMDS_MeshNode::X(), SMDS_MeshNode::Y(), and SMDS_MeshNode::Z().
Referenced by Perform().
|
protectedinherited |
Referenced by Driver_Mesh::addMessage(), and Driver_Mesh::GetError().
|
protectedinherited |
|
private |
Referenced by DriverSTL_W_SMDS_Mesh(), Perform(), and SetIsAscii().
|
protectedinherited |
|
protectedinherited |
Referenced by DriverMED_W_Field::Perform(), DriverMED_W_SMESHDS_Mesh::Perform(), and Driver_Mesh::SetMeshId().
|
protectedinherited |
|
private |
Referenced by writeAscii(), and writeBinary().
|
private |
Referenced by findVolumeTriangles(), and writeBinary().
|
protectedinherited |
Referenced by Driver_Mesh::addMessage(), Driver_Mesh::GetError(), and DriverGMF_Read::storeBadNodeIds().
|
private |
Referenced by findVolumeTriangles(), getFaces(), and ~DriverSTL_W_SMDS_Mesh().