From a5b7d4d0bbd1d4c681a75f32c65ab09f8117027e Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 10 Aug 2021 19:46:52 +0300 Subject: [PATCH] #24596 [CEA] New MeshGems license:: regressions in tests --- src/GHS3DPlugin/GHS3DPlugin_Hypothesis.cxx | 5 +++++ src/GHS3DPlugin/MG_Tetra_API.cxx | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) 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:; } } -- 2.30.2