EgtMachKernel 2.6h1 :

- aggiunta gestione SpecialEstimate (stima speciale lanciata in automatico prima di generare).
This commit is contained in:
Dario Sassi
2024-08-06 14:43:36 +02:00
parent 5a4f77030c
commit 450a37e4f3
7 changed files with 117 additions and 8 deletions
+19 -2
View File
@@ -18,6 +18,7 @@
#include "MachConst.h"
#include "Generator.h"
#include "Estimator.h"
#include "/EgtDev/Include/EGnFileUtils.h"
using namespace std ;
@@ -25,6 +26,22 @@ using namespace std ;
bool
MachMgr::Generate( const string& sCncFile, const string& sInfo)
{
// se necessaria stima speciale
if ( GetCurrMachine() != nullptr && GetCurrMachine()->GetSpecialEstimate()) {
// inizializzazione stimatore
Estimator estPP ;
if ( ! estPP.Init( this)) {
LOG_ERROR( GetEMkLogger(), "Error on Estimate Init")
return false ;
}
// esecuzione della stima
string sEstFile = ChangeFileExtension( sCncFile, "sest") ;
if ( ! estPP.Run( sEstFile, sInfo)) {
LOG_ERROR( GetEMkLogger(), "Error on Estimate Run")
return false ;
}
}
// inizializzazione generatore
Generator genPP ;
if ( ! genPP.Init( this)) {
@@ -44,13 +61,13 @@ MachMgr::Generate( const string& sCncFile, const string& sInfo)
bool
MachMgr::Estimate( const string& sEstFile, const string& sInfo)
{
// inizializzazione generatore
// inizializzazione stimatore
Estimator estPP ;
if ( ! estPP.Init( this)) {
LOG_ERROR( GetEMkLogger(), "Error on Estimate Init")
return false ;
}
// esecuzione della generazione
// esecuzione della stima
if ( ! estPP.Run( sEstFile, sInfo)) {
LOG_ERROR( GetEMkLogger(), "Error on Estimate Run")
return false ;