Salome HOME
reintroduction of choice of MED minor version when exporting MED files
[modules/smesh.git] / src / SMESH / SMESH_Mesh.cxx
index afefed35a9f660365e0443e00de9c2d45c66bbbe..3f16ab7dd58be1869e0428e07ca8e675e4cb8a9b 100644 (file)
@@ -1402,6 +1402,10 @@ bool SMESH_Mesh::HasDuplicatedGroupNamesMED()
  *  \param [in] theAutoGroups - boolean parameter for creating/not creating
  *              the groups Group_On_All_Nodes, Group_On_All_Faces, ... ;
  *              the typical use is auto_groups=false.
+ *  \param [in] theMinor - define the minor version (y, where version is x.y.z) of MED file format.
+ *              The theMinor must be between 0 and the current minor version of MED file library.
+ *              If theMinor is equal to -1, the minor version is not changed (default).
+ *              The major version (x, where version is x.y.z) cannot be changed.
  *  \param [in] meshPart - mesh data to export
  *  \param [in] theAutoDimension - if \c true, a space dimension of a MED mesh can be either
      *         - 1D if all mesh nodes lie on OX coordinate axis, or
@@ -1417,6 +1421,7 @@ bool SMESH_Mesh::HasDuplicatedGroupNamesMED()
 void SMESH_Mesh::ExportMED(const char *        file, 
                            const char*         theMeshName, 
                            bool                theAutoGroups,
+                           int                 theMinor,
                            const SMESHDS_Mesh* meshPart,
                            bool                theAutoDimension,
                            bool                theAddODOnVertices,
@@ -1427,7 +1432,7 @@ void SMESH_Mesh::ExportMED(const char *        file,
   SMESH_TRY;
 
   DriverMED_W_SMESHDS_Mesh myWriter;
-  myWriter.SetFile         ( file );
+  myWriter.SetFile         ( file , theMinor);
   myWriter.SetMesh         ( meshPart ? (SMESHDS_Mesh*) meshPart : _myMeshDS   );
   myWriter.SetAutoDimension( theAutoDimension );
   myWriter.AddODOnVertices ( theAddODOnVertices );