#include "utilities.h"
-#include "DriverMED_W_SMESHDS_Mesh.h"
#include "DriverDAT_W_SMDS_Mesh.h"
-#include "DriverUNV_W_SMDS_Mesh.h"
-#include "DriverSTL_W_SMDS_Mesh.h"
-
+#include "DriverGMF_Read.hxx"
+#include "DriverGMF_Write.hxx"
#include "DriverMED_R_SMESHDS_Mesh.h"
-#include "DriverUNV_R_SMDS_Mesh.h"
+#include "DriverMED_W_SMESHDS_Mesh.h"
#include "DriverSTL_R_SMDS_Mesh.h"
+#include "DriverSTL_W_SMDS_Mesh.h"
+#include "DriverUNV_R_SMDS_Mesh.h"
+#include "DriverUNV_W_SMDS_Mesh.h"
#ifdef WITH_CGNS
#include "DriverCGNS_Read.hxx"
#include "DriverCGNS_Write.hxx"
return res;
}
+//================================================================================
+/*!
+ * \brief Fill its data by reading a GMF file
+ */
+//================================================================================
+
+SMESH_ComputeErrorPtr SMESH_Mesh::GMFToMesh(const char* theFileName)
+{
+ DriverGMF_Read myReader;
+ myReader.SetMesh(_myMeshDS);
+ myReader.SetFile(theFileName);
+ myReader.Perform();
+ //theMeshName = myReader.GetMeshName();
+
+ // create groups
+ SynchronizeGroups();
+
+ return myReader.GetError();
+}
+
//=============================================================================
/*!
*
throw SALOME_Exception("Export failed");
}
+//================================================================================
+/*!
+ * \brief Export the mesh to a GMF file
+ */
+//================================================================================
+
+void SMESH_Mesh::ExportGMF(const char * file,
+ const SMESHDS_Mesh* meshDS)
+{
+ DriverGMF_Write myWriter;
+ myWriter.SetFile( file );
+ myWriter.SetMesh( const_cast<SMESHDS_Mesh*>( meshDS ));
+ myWriter.Perform();
+}
+
//================================================================================
/*!
* \brief Return number of nodes in the mesh
#include "SMESH_SMESH.hxx"
-#include "SMESH_Hypothesis.hxx"
-#include "SMESH_Controls.hxx"
-
-#include "SMESHDS_Mesh.hxx"
-#include "SMESHDS_Command.hxx"
#include "SMDSAbs_ElementType.hxx"
+#include "SMESHDS_Command.hxx"
+#include "SMESHDS_Mesh.hxx"
+#include "SMESH_ComputeError.hxx"
+#include "SMESH_Controls.hxx"
+#include "SMESH_Hypothesis.hxx"
#include "Utils_SALOME_Exception.hxx"
#include <map>
#include <list>
+
#ifdef WNT
#pragma warning(disable:4251) // Warning DLL Interface ...
#pragma warning(disable:4290) // Warning Exception ...
int CGNSToMesh(const char* theFileName, const int theMeshIndex, std::string& theMeshName);
+ SMESH_ComputeErrorPtr GMFToMesh(const char* theFileName);
+
SMESH_Hypothesis::Hypothesis_Status
AddHypothesis(const TopoDS_Shape & aSubShape, int anHypId)
throw(SALOME_Exception);
const SMESHDS_Mesh* meshPart = 0) throw(SALOME_Exception);
void ExportCGNS(const char * file,
const SMESHDS_Mesh* mesh);
+ void ExportGMF(const char * file,
+ const SMESHDS_Mesh* mesh);
void ExportSAUV(const char *file,
const char* theMeshName = NULL,
bool theAutoGroups = true) throw(SALOME_Exception);