]> SALOME platform Git repositories - plugins/ghs3dplugin.git/commitdiff
Salome HOME
#24596 [CEA] New MeshGems license:: regressions in tests duc/V9_7_BR_new_MGLIC occ/new_mg_licnese
authoreap <eap@opencascade.com>
Tue, 10 Aug 2021 16:46:52 +0000 (19:46 +0300)
committereap <eap@opencascade.com>
Tue, 10 Aug 2021 16:46:52 +0000 (19:46 +0300)
src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx
src/GHS3DPlugin/MG_Tetra_API.cxx

index e329a29ce67d47bc89d5a6515d31e51931165734..b785371f55d81d1e77f689eed158726f18fa644f 100644 (file)
@@ -25,7 +25,9 @@
 //
 #include "GHS3DPlugin_Hypothesis.hxx"
 
+#include <Basics_DirUtils.hxx>
 #include <SMESHDS_Mesh.hxx>
+#include <SMESH_File.hxx>
 
 #include <TCollection_AsciiString.hxx>
 
@@ -1814,6 +1816,9 @@ std::string GHS3DPlugin_Hypothesis::CommandToRun(const GHS3DPlugin_Hypothesis* h
 std::string GHS3DPlugin_Hypothesis::GetFileName(const GHS3DPlugin_Hypothesis* hyp)
 {
   std::string aTmpDir = hyp ? hyp->GetWorkingDirectory() : DefaultWorkingDirectory();
+  if ( !SMESH_File( aTmpDir ).exists() )
+    aTmpDir = Kernel_Utils::GetTmpDirByPath( aTmpDir );
+
   const char lastChar = *aTmpDir.rbegin();
 #ifdef WIN32
     if(lastChar != '\\') aTmpDir+='\\';
index e11629a2caa4c5c382dba3e32c7dad8f0a3474a8..93eb485448b783e8d7be47558c0134f1fdd74ee9 100644 (file)
@@ -1099,12 +1099,13 @@ int  MG_Tetra_API::GmfOpenMesh(const char* theFile, int rdOrWr, int ver, int dim
 
 void MG_Tetra_API::GmfSetKwd(int iMesh, GmfKwdCod what, int nb )
 {
-  if ( iMesh == 1 )
+  //if ( iMesh == 1 )
   {
     switch ( what ) {
-    case GmfVertices:  _nbNodes = nb; break;
-    case GmfEdges:     _nbEdges = nb; break;
-    case GmfTriangles: _nbFaces = nb; break;
+    case GmfVertices:   _nbNodes   += nb; break;
+    case GmfEdges:      _nbEdges   += nb; break;
+    case GmfTriangles:  _nbFaces   += nb; break;
+    case GmfTetrahedra: _nbVolumes += nb; break;
     default:;
     }
   }