From 29fcef21242fff569f04356d38cf06f4fd223d6d Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 9 Dec 2019 20:27:44 +0300 Subject: [PATCH] Fix for '[CEA 17019] mg-tetra.exe command line in console not printed correctly' issue. --- src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx | 42 +++++++++++++++-------- src/GHS3DPlugin/GHS3DPlugin_Optimizer.cxx | 22 ++++++++---- 2 files changed, 43 insertions(+), 21 deletions(-) diff --git a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx index f7b8125..4004437 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_GHS3D.cxx @@ -1757,19 +1757,26 @@ bool GHS3DPlugin_GHS3D::Compute(SMESH_Mesh& theMesh, mgTetra.SetLogFile( aLogFileName.ToCString() ); cmd += TCollection_AsciiString(" 1>" ) + aLogFileName; // dump into file } - std::cout << std::endl; - std::cout << "MG-Tetra execution..." << std::endl; - std::cout << cmd << std::endl; + + BRIEF_INFOS("") + BRIEF_INFOS("MG-Tetra execution...") + BRIEF_INFOS(cmd) _computeCanceled = false; std::string errStr; Ok = mgTetra.Compute( cmd.ToCString(), errStr ); // run - if ( _logInStandardOutput && mgTetra.IsLibrary() ) - std::cout << std::endl << mgTetra.GetLog() << std::endl; - if ( Ok ) - std::cout << std::endl << "End of MG-Tetra execution !" << std::endl; + if ( _logInStandardOutput && mgTetra.IsLibrary() ) { + BRIEF_INFOS(""); + BRIEF_INFOS(mgTetra.GetLog()); + BRIEF_INFOS("") + } + if ( Ok ) { + BRIEF_INFOS(""); + BRIEF_INFOS("End of MG-Tetra execution !"); + BRIEF_INFOS("") + } // -------------- // read a result @@ -1980,19 +1987,26 @@ bool GHS3DPlugin_GHS3D::Compute(SMESH_Mesh& theMesh, mgTetra.SetLogFile( aLogFileName.ToCString() ); cmd += TCollection_AsciiString(" 1>" ) + aLogFileName; // dump into file } - std::cout << std::endl; - std::cout << "MG-Tetra execution..." << std::endl; - std::cout << cmd << std::endl; + + BRIEF_INFOS("") + BRIEF_INFOS("MG-Tetra execution...") + BRIEF_INFOS(cmd) _computeCanceled = false; std::string errStr; Ok = mgTetra.Compute( cmd.ToCString(), errStr ); // run - if ( _logInStandardOutput && mgTetra.IsLibrary() ) - std::cout << std::endl << mgTetra.GetLog() << std::endl; - if ( Ok ) - std::cout << std::endl << "End of MG-Tetra execution !" << std::endl; + if ( _logInStandardOutput && mgTetra.IsLibrary() ) { + BRIEF_INFOS(""); + BRIEF_INFOS(mgTetra.GetLog()); + BRIEF_INFOS("") + } + if ( Ok ) { + BRIEF_INFOS(""); + BRIEF_INFOS("End of MG-Tetra execution !"); + BRIEF_INFOS("") + } // -------------- // read a result diff --git a/src/GHS3DPlugin/GHS3DPlugin_Optimizer.cxx b/src/GHS3DPlugin/GHS3DPlugin_Optimizer.cxx index db6529e..ef61b36 100644 --- a/src/GHS3DPlugin/GHS3DPlugin_Optimizer.cxx +++ b/src/GHS3DPlugin/GHS3DPlugin_Optimizer.cxx @@ -427,19 +427,27 @@ bool GHS3DPlugin_Optimizer::Compute(SMESH_Mesh& theMesh, mgTetra.SetLogFile( aLogFileName.c_str() ); cmd += " 1>" + aLogFileName; // dump into file } - std::cout << std::endl; - std::cout << "MG-Tetra execution..." << std::endl; - std::cout << cmd << std::endl; + + BRIEF_INFOS("") + BRIEF_INFOS("MG-Tetra execution...") + BRIEF_INFOS(cmd) _computeCanceled = false; std::string errStr; Ok = mgTetra.Compute( cmd, errStr ); // run - if ( logInStandardOutput && mgTetra.IsLibrary() ) - std::cout << std::endl << mgTetra.GetLog() << std::endl; - if ( Ok ) - std::cout << std::endl << "End of MG-Tetra execution !" << std::endl; + if ( _logInStandardOutput && mgTetra.IsLibrary() ) { + BRIEF_INFOS(""); + BRIEF_INFOS(mgTetra.GetLog()); + BRIEF_INFOS("") + } + if ( Ok ) { + BRIEF_INFOS(""); + BRIEF_INFOS("End of MG-Tetra execution !"); + BRIEF_INFOS("") + } + // -------------- // read a result -- 2.39.2