diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index cfc1307..ab017a5 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ diff --git a/MachMgrGeneration.cpp b/MachMgrGeneration.cpp index 2357967..e02704f 100644 --- a/MachMgrGeneration.cpp +++ b/MachMgrGeneration.cpp @@ -28,18 +28,9 @@ MachMgr::Generate( const string& sCncFile, const string& sInfo) { // se macchina multiprocesso è necessaria stima speciale if ( GetCurrMachine() != nullptr && GetCurrMachine()->GetMultiProcess()) { - // 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") + if ( ! Estimate( sEstFile, sInfo)) return false ; - } } // inizializzazione generatore diff --git a/SimulatorMP.cpp b/SimulatorMP.cpp index 4b7b9a2..ae8749b 100644 --- a/SimulatorMP.cpp +++ b/SimulatorMP.cpp @@ -34,6 +34,7 @@ #include "/EgtDev/Include/EXeConst.h" #include "/EgtDev/Include/EMkToolConst.h" #include "/EgtDev/Include/EMkOperationConst.h" +#include "/EgtDev/Include/EGnFileUtils.h" #include "/EgtDev/Include/EGnGetKeyData.h" #include "/EgtDev/Include/EgtPerfCounter.h" #include "/EgtDev/Include/EgtNumUtils.h" @@ -203,6 +204,13 @@ SimulatorMP::Start( bool bFirst) // Verifico attrezzaggio if ( ! VerifySetup()) bOk = false ; + // Eseguo stima speciale + string sEstFile ; + ExeGetTempDir( sEstFile) ; + sEstFile += "\\Simul.sest" ; + EraseFile( sEstFile) ; + if ( ! m_pMchMgr->Estimate( sEstFile, "")) + bOk = false ; } // Reset utensile, interpolazione e assi correnti @@ -1068,6 +1076,8 @@ SimulatorMP::ManageMove( int& nStatus) bool SimulatorMP::ManageSingleMove( int& nStatus, double& dMove) { + // Per default movimento nullo + dMove = 0 ; // Recupero posizione finale const CamData* pCamData = GetCamData( m_pGeomDB->GetUserObj( m_nEntId)) ; if ( pCamData == nullptr) { @@ -1123,6 +1133,11 @@ SimulatorMP::ManageSingleMove( int& nStatus, double& dMove) AxesEnd[i] = m_AxesVal[i] ; } } + // Se comandi in sospeso, esco + if ( ! m_CmdData.empty()) { + m_dCoeff = 2 * EPS_ZERO ; + return true ; + } } // Posizione e direzione attuali degli utensili e riferimenti dei pezzi (per Vmill)