From: eap Date: Wed, 24 Aug 2016 17:46:51 +0000 (+0300) Subject: 53538: Salome application crashes after computing mesh X-Git-Tag: V8_1_0rc1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=122032657d9e4b2d22681007035591707e7f6c55;p=plugins%2Fghs3dprlplugin.git 53538: Salome application crashes after computing mesh --- diff --git a/src/GHS3DPRLPlugin/MG_TetraHPC_API.cxx b/src/GHS3DPRLPlugin/MG_TetraHPC_API.cxx index 6bd90d5..df33404 100644 --- a/src/GHS3DPRLPlugin/MG_TetraHPC_API.cxx +++ b/src/GHS3DPRLPlugin/MG_TetraHPC_API.cxx @@ -398,12 +398,12 @@ struct MG_TetraHPC_API::LibData int IsVertexRequired( int iNode ) { - return ! ( iNode < int( _xyz.size() - _nodeSize.size() )); + return ! ( iNode < int( NbNodes() - _nodeSize.size() )); } double GetSizeAtVertex( int iNode ) { - return IsVertexRequired( iNode ) ? _nodeSize[ iNode - _xyz.size() + _nodeSize.size() ] : 0.; + return IsVertexRequired( iNode ) ? _nodeSize[ iNode - NbNodes() + _nodeSize.size() ] : 0.; } }; @@ -733,7 +733,12 @@ bool MG_TetraHPC_API::Compute( const std::string& cmdLine ) } // compute - return _libData->Compute( outFile ); + bool ok = _libData->Compute( outFile ); + + GetLog(); // write a log file + _logFile = ""; // not to write it again + + return ok; #endif } @@ -745,9 +750,6 @@ bool MG_TetraHPC_API::Compute( const std::string& cmdLine ) // errStr = SMESH_Comment("system(mg-tetra.exe ...) command failed with error: ") // << strerror( errno ); - // GetLog(); // write a log file - // _logFile = ""; // not to write it again - return false; }