Salome HOME
bos #26436 [CEA] CopyMesh and mg-hexa V9_8_0a1 V9_8_0a2 V9_8_0b1
authoreap <eap@opencascade.com>
Tue, 12 Oct 2021 10:26:43 +0000 (13:26 +0300)
committereap <eap@opencascade.com>
Tue, 12 Oct 2021 10:26:43 +0000 (13:26 +0300)
src/HexoticPlugin/HexoticPlugin_Hexotic.cxx
src/HexoticPlugin/MG_Hexotic_API.cxx
src/HexoticPlugin/MG_Hexotic_API.hxx

index 2e87506228ec5bac09bf435d7df1b250a675e50a..883330326abe3d7d227e19e7c34d8e6b5d4ff87d 100644 (file)
@@ -350,7 +350,8 @@ static void writeInput(MG_Hexotic_API*     theHexaInput,
                        const SMESHDS_Mesh* theMeshDS)
 {
   int meshID = theHexaInput->GmfOpenMesh( theFile, GmfWrite, GMFVERSION, GMFDIMENSION);
-  
+  theHexaInput->SetIsInputMesh( true ); // it's a mesh file
+
   // nodes
   int iN = 0;
   smIdType nbNodes = theMeshDS->NbNodes();
@@ -953,6 +954,8 @@ std::vector<std::string> HexoticPlugin_Hexotic::writeSizeMapFile( MG_Hexotic_API
     mgInput->GmfOpenMesh( myVerticesFile.c_str(), GmfWrite, GMFVERSION, GMFDIMENSION );  
   int solFileID =
     mgInput->GmfOpenMesh( mySolFile.c_str(), GmfWrite, GMFVERSION, GMFDIMENSION );
+
+  mgInput->SetIsInputMesh( false ); // they are not mesh files
   
   int pointsNumber = points.size();
   
index 5f88f1ce28c2ae3207bc6cbf24480c8051c3d1d9..155f9dba3c5eb20bed06a85d4ac5f8d36802f53d 100644 (file)
@@ -1268,9 +1268,6 @@ void MG_Hexotic_API::GmfSetLin(int iMesh, GmfKwdCod what, int node1, int node2,
 
 void MG_Hexotic_API::GmfCloseMesh( int iMesh )
 {
-  if ( iMesh == 1 )
-    _isMesh = false;
-
   if ( _useLib ) {
 #ifdef USE_MG_LIBS
     return;
index e3d2cf4eb942a64e53f01b95d5fbf6a55d78727d..093f728ca8daea65b6375883662eb79e4bdbbc6b 100644 (file)
@@ -42,6 +42,7 @@ public:
   bool IsExecutable() { return !IsLibrary(); }
   void SetUseExecutable();
   void SetInputFile( const std::string mesh2DFile );
+  void SetIsInputMesh(bool isMeshIn) { _isMesh = isMeshIn; }
 
   // IN to MESHGEMS
   int  GmfOpenMesh(const char* theFile, int rdOrWr, int ver, int dim);