From: eap Date: Tue, 10 Aug 2021 16:46:52 +0000 (+0300) Subject: #24596 [CEA] New MeshGems license:: regressions in tests X-Git-Tag: V9_8_0a1^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a5b7d4d0bbd1d4c681a75f32c65ab09f8117027e;p=plugins%2Fghs3dplugin.git #24596 [CEA] New MeshGems license:: regressions in tests --- diff --git a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx index e329a29..b785371 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx @@ -25,7 +25,9 @@ // #include "GHS3DPlugin_Hypothesis.hxx" +#include #include +#include #include @@ -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+='\\'; diff --git a/src/GHS3DPlugin/MG_Tetra_API.cxx b/src/GHS3DPlugin/MG_Tetra_API.cxx index e11629a..93eb485 100644 --- a/src/GHS3DPlugin/MG_Tetra_API.cxx +++ b/src/GHS3DPlugin/MG_Tetra_API.cxx @@ -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:; } }