X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FDriverMED%2FDriverMED_W_SMESHDS_Mesh.cxx;fp=src%2FDriverMED%2FDriverMED_W_SMESHDS_Mesh.cxx;h=5076ae51d156712b743f5f3f19cd270822269c08;hp=cb3be452e68b1a1302b1248ab2a184762bc3952e;hb=88ff35ddd4a4442397bc5f6ba893aaf9c51b1856;hpb=ad1d7c52f7a12f0b755a98e925bfd13c3e8daada diff --git a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx index cb3be452e..5076ae51d 100644 --- a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx +++ b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx @@ -53,6 +53,12 @@ using namespace std; using namespace MED; +//================================================================================ +/*! + * \brief Constructor + */ +//================================================================================ + DriverMED_W_SMESHDS_Mesh::DriverMED_W_SMESHDS_Mesh(): myAllSubMeshes (false), myDoGroupOfNodes (false), @@ -65,19 +71,31 @@ DriverMED_W_SMESHDS_Mesh::DriverMED_W_SMESHDS_Mesh(): myAddODOnVertices(false), myDoAllInGroups(false), myVersion(-1), - myZTolerance(-1.) + myZTolerance(-1.), + mySaveNumbers(true) {} +//================================================================================ +/*! + * \brief Set a file name and a version + * \param [in] theFileName - output file name + * \param [in] theVersion - desired MED file version == major * 10 + minor + */ +//================================================================================ + void DriverMED_W_SMESHDS_Mesh::SetFile(const std::string& theFileName, int theVersion) { myVersion = theVersion; Driver_SMESHDS_Mesh::SetFile(theFileName); } +//================================================================================ /*! * MED version is either the latest available, or with an inferior minor, * to ensure backward compatibility on writing med files. */ +//================================================================================ + string DriverMED_W_SMESHDS_Mesh::GetVersionString(int theMinor, int theNbDigits) { TInt majeur, mineur, release; @@ -166,6 +184,12 @@ void DriverMED_W_SMESHDS_Mesh::AddAllToGroup() namespace { + //--------------------------------------------- + /*! + * \brief Retrieving node coordinates utilities + */ + //--------------------------------------------- + typedef double (SMDS_MeshNode::* TGetCoord)() const; typedef const char* TName; typedef const char* TUnit; @@ -344,12 +368,24 @@ namespace } } +//================================================================================ +/*! + * \brief Write my mesh to a file + */ +//================================================================================ + Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform() { MED::PWrapper myMed = CrWrapperW(myFile, myVersion); return this->PerformInternal(myMed); } +//================================================================================ +/*! + * \brief Write my mesh to a MEDCoupling DS + */ +//================================================================================ + Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh_Mem::Perform() { void *ptr(nullptr); @@ -571,7 +607,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::PerformInternal(LowLevelWriter myM #endif const EModeSwitch theMode = eFULL_INTERLACE; const ERepere theSystem = eCART; - const EBooleen theIsElemNum = eVRAI; + const EBooleen theIsElemNum = mySaveNumbers ? eVRAI : eFAUX; const EBooleen theIsElemNames = eFAUX; const EConnectivite theConnMode = eNOD;