diff --git a/Chiseling.cpp b/Chiseling.cpp index 6f01e25..aeeef47 100644 --- a/Chiseling.cpp +++ b/Chiseling.cpp @@ -503,13 +503,15 @@ Chiseling::Apply( bool bRecalc, bool bPostApply) // verifico se necessario continuare nell'aggiornamento if ( ! bRecalc && ! bToolChanged && - ( m_nStatus == MCH_ST_OK || ( ! bPostApply && m_nStatus == MCH_ST_NO_POSTAPPL))) { + ( m_nStatus == MCH_ST_OK || m_nStatus == MCH_ST_NO_POSTAPPL)) { // confermo i percorsi di lavorazione m_nChisels = nCurrChisels ; - LOG_DBG_INFO( GetEMkLogger(), "Chiseling apply skipped : status already ok") ; + string sLog = string( "Chiseling apply skipped : status ") + ( m_nStatus == MCH_ST_OK ? "already ok" : "no postapply") ; + LOG_DBG_INFO( GetEMkLogger(), sLog.c_str()) ; // eseguo aggiornamento assi macchina e collegamento con operazione precedente if ( ! Update( bPostApply)) return false ; + m_nStatus = ( bPostApply ? MCH_ST_OK : MCH_ST_NO_POSTAPPL) ; LOG_DBG_INFO( GetEMkLogger(), "Update done") ; // esco con successo return true ; diff --git a/Drilling.cpp b/Drilling.cpp index 0aaa5f0..e5c486b 100644 --- a/Drilling.cpp +++ b/Drilling.cpp @@ -582,13 +582,15 @@ Drilling::Apply( bool bRecalc, bool bPostApply) // verifico se necessario continuare nell'aggiornamento if ( ! bRecalc && ! bToolChanged && - ( m_nStatus == MCH_ST_OK || ( ! bPostApply && m_nStatus == MCH_ST_NO_POSTAPPL))) { + ( m_nStatus == MCH_ST_OK || m_nStatus == MCH_ST_NO_POSTAPPL)) { // confermo i percorsi di lavorazione m_nDrillings = nCurrDrillings ; - LOG_DBG_INFO( GetEMkLogger(), "Drilling apply skipped : status already ok") ; + string sLog = string( "Drilling apply skipped : status ") + ( m_nStatus == MCH_ST_OK ? "already ok" : "no postapply") ; + LOG_DBG_INFO( GetEMkLogger(), sLog.c_str()) ; // eseguo aggiornamento assi macchina e collegamento con operazione precedente if ( ! Update( bPostApply)) return false ; + m_nStatus = ( bPostApply ? MCH_ST_OK : MCH_ST_NO_POSTAPPL) ; LOG_DBG_INFO( GetEMkLogger(), "Update done") ; // esco con successo return true ; diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 111203e..cfc1307 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ diff --git a/FiveAxisMilling.cpp b/FiveAxisMilling.cpp index 9adf62d..38fd900 100644 --- a/FiveAxisMilling.cpp +++ b/FiveAxisMilling.cpp @@ -564,13 +564,15 @@ FiveAxisMilling::Apply( bool bRecalc, bool bPostApply) // verifico se necessario continuare nell'aggiornamento if ( ! bRecalc && ! bToolChanged && - ( m_nStatus == MCH_ST_OK || ( ! bPostApply && m_nStatus == MCH_ST_NO_POSTAPPL))) { + ( m_nStatus == MCH_ST_OK || m_nStatus == MCH_ST_NO_POSTAPPL)) { // confermo i percorsi di lavorazione m_nMills = nCurrMills ; - LOG_DBG_INFO( GetEMkLogger(), "FiveAxisMilling apply skipped : status already ok") ; + string sLog = string( "FiveAxisMilling apply skipped : status ") + ( m_nStatus == MCH_ST_OK ? "already ok" : "no postapply") ; + LOG_DBG_INFO( GetEMkLogger(), sLog.c_str()) ; // eseguo aggiornamento assi macchina e collegamento con operazione precedente if ( ! Update( bPostApply)) return false ; + m_nStatus = ( bPostApply ? MCH_ST_OK : MCH_ST_NO_POSTAPPL) ; LOG_DBG_INFO( GetEMkLogger(), "Update done") ; // esco con successo return true ; @@ -664,9 +666,13 @@ FiveAxisMilling::Apply( bool bRecalc, bool bPostApply) // assegno ingombri dei vari percorsi di lavorazione e della lavorazione nel suo complesso CalcAndSetBBox( nClId) ; + ExeProcessEvents( 80, 0) ; + // eseguo aggiornamento assi macchina e collegamento con operazione precedente if ( ! Update( bPostApply)) return false ; + + ExeProcessEvents( 100, 0) ; // aggiorno stato della lavorazione m_nStatus = ( bPostApply ? MCH_ST_OK : MCH_ST_NO_POSTAPPL) ; diff --git a/GenMachining.cpp b/GenMachining.cpp index bebb25c..e41999b 100644 --- a/GenMachining.cpp +++ b/GenMachining.cpp @@ -557,13 +557,15 @@ GenMachining::Apply( bool bRecalc, bool bPostApply) // verifico se necessario continuare nell'aggiornamento if ( ! bRecalc && ! bToolChanged && - ( m_nStatus == MCH_ST_OK || ( ! bPostApply && m_nStatus == MCH_ST_NO_POSTAPPL))) { + ( m_nStatus == MCH_ST_OK || m_nStatus == MCH_ST_NO_POSTAPPL)) { // confermo i percorsi di lavorazione m_nMills = nCurrMills ; - LOG_DBG_INFO( GetEMkLogger(), "GenMachining apply skipped : status already ok") ; + string sLog = string( "GenMachining apply skipped : status ") + ( m_nStatus == MCH_ST_OK ? "already ok" : "no postapply") ; + LOG_DBG_INFO( GetEMkLogger(), sLog.c_str()) ; // eseguo aggiornamento assi macchina e collegamento con operazione precedente if ( ! Update( bPostApply)) return false ; + m_nStatus = ( bPostApply ? MCH_ST_OK : MCH_ST_NO_POSTAPPL) ; LOG_DBG_INFO( GetEMkLogger(), "Update done") ; // esco con successo return true ; diff --git a/Milling.cpp b/Milling.cpp index f1b7cd5..993fc0c 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -725,13 +725,15 @@ Milling::Apply( bool bRecalc, bool bPostApply) // verifico se necessario continuare nell'aggiornamento if ( ! bRecalc && ! bToolChanged && - ( m_nStatus == MCH_ST_OK || ( ! bPostApply && m_nStatus == MCH_ST_NO_POSTAPPL))) { + ( m_nStatus == MCH_ST_OK || m_nStatus == MCH_ST_NO_POSTAPPL)) { // confermo i percorsi di lavorazione m_nMills = nCurrMills ; - LOG_DBG_INFO( GetEMkLogger(), "Milling apply skipped : status already ok") ; + string sLog = string( "Milling apply skipped : status ") + ( m_nStatus == MCH_ST_OK ? "already ok" : "no postapply") ; + LOG_DBG_INFO( GetEMkLogger(), sLog.c_str()) ; // eseguo aggiornamento assi macchina e collegamento con operazione precedente if ( ! Update( bPostApply)) return false ; + m_nStatus = ( bPostApply ? MCH_ST_OK : MCH_ST_NO_POSTAPPL) ; LOG_DBG_INFO( GetEMkLogger(), "Update done") ; // esco con successo return true ; diff --git a/Mortising.cpp b/Mortising.cpp index a021cb4..2a481b2 100644 --- a/Mortising.cpp +++ b/Mortising.cpp @@ -523,13 +523,15 @@ Mortising::Apply( bool bRecalc, bool bPostApply) // verifico se necessario continuare nell'aggiornamento if ( ! bRecalc && ! bToolChanged && - ( m_nStatus == MCH_ST_OK || ( ! bPostApply && m_nStatus == MCH_ST_NO_POSTAPPL))) { + ( m_nStatus == MCH_ST_OK || m_nStatus == MCH_ST_NO_POSTAPPL)) { // confermo i percorsi di lavorazione m_nMortises = nCurrMortises ; - LOG_DBG_INFO( GetEMkLogger(), "Mortising apply skipped : status already ok") ; + string sLog = string( "Mortising apply skipped : status ") + ( m_nStatus == MCH_ST_OK ? "already ok" : "no postapply") ; + LOG_DBG_INFO( GetEMkLogger(), sLog.c_str()) ; // eseguo aggiornamento assi macchina e collegamento con operazione precedente if ( ! Update( bPostApply)) return false ; + m_nStatus = ( bPostApply ? MCH_ST_OK : MCH_ST_NO_POSTAPPL) ; LOG_DBG_INFO( GetEMkLogger(), "Update done") ; // esco con successo return true ; diff --git a/Pocketing.cpp b/Pocketing.cpp index f48ab64..4d0985a 100644 --- a/Pocketing.cpp +++ b/Pocketing.cpp @@ -630,13 +630,15 @@ Pocketing::Apply( bool bRecalc, bool bPostApply) // verifico se necessario continuare nell'aggiornamento if ( ! bRecalc && ! bToolChanged && - ( m_nStatus == MCH_ST_OK || ( ! bPostApply && m_nStatus == MCH_ST_NO_POSTAPPL))) { + ( m_nStatus == MCH_ST_OK || m_nStatus == MCH_ST_NO_POSTAPPL)) { // confermo i percorsi di lavorazione m_nPockets = nCurrPockets ; - LOG_DBG_INFO( GetEMkLogger(), "Pocketing apply skipped : status already ok") ; + string sLog = string( "Pocketing apply skipped : status ") + ( m_nStatus == MCH_ST_OK ? "already ok" : "no postapply") ; + LOG_DBG_INFO( GetEMkLogger(), sLog.c_str()) ; // eseguo aggiornamento assi macchina e collegamento con operazione precedente if ( ! Update( bPostApply)) return false ; + m_nStatus = ( bPostApply ? MCH_ST_OK : MCH_ST_NO_POSTAPPL) ; LOG_DBG_INFO( GetEMkLogger(), "Update done") ; // esco con successo return true ; diff --git a/PocketingNT.cpp b/PocketingNT.cpp index 6bd70f5..c63c929 100644 --- a/PocketingNT.cpp +++ b/PocketingNT.cpp @@ -638,13 +638,15 @@ PocketingNT::Apply( bool bRecalc, bool bPostApply) // verifico se necessario continuare nell'aggiornamento if ( ! bRecalc && ! bToolChanged && - ( m_nStatus == MCH_ST_OK || ( ! bPostApply && m_nStatus == MCH_ST_NO_POSTAPPL))) { + ( m_nStatus == MCH_ST_OK || m_nStatus == MCH_ST_NO_POSTAPPL)) { // confermo i percorsi di lavorazione m_nPockets = nCurrPockets ; - LOG_DBG_INFO( GetEMkLogger(), "PocketingNT apply skipped : status already ok") ; + string sLog = string( "PocketingNT apply skipped : status ") + ( m_nStatus == MCH_ST_OK ? "already ok" : "no postapply") ; + LOG_DBG_INFO( GetEMkLogger(), sLog.c_str()) ; // eseguo aggiornamento assi macchina e collegamento con operazione precedente if ( ! Update( bPostApply)) return false ; + m_nStatus = ( bPostApply ? MCH_ST_OK : MCH_ST_NO_POSTAPPL) ; LOG_DBG_INFO( GetEMkLogger(), "Update done") ; // esco con successo return true ; @@ -2298,7 +2300,7 @@ PocketingNT::ProcessPath( int nPathId, int nPvId, int nClId) ++ nPocket ; // aggiorno la progressBar - ExeProcessEvents( 5 + nProgressBarStep * 45 / nStep, 100) ; + ExeProcessEvents( 5 + nProgressBarStep * 45 / nStep, 0) ; } @@ -2597,7 +2599,7 @@ PocketingNT::CalcPaths( STEPINFOPOVECTOR& vStepInfo) vStepInfo[i].vPaths[j].pCrvPath.Set( vCrvPaths[j]) ; } // aggiorno la progressBar - ExeProcessEvents( 50 + i * 50 / int( vStepInfo.size()), 100) ; + ExeProcessEvents( 50 + i * 50 / int( vStepInfo.size()), 0) ; } return true ; @@ -2807,7 +2809,7 @@ PocketingNT::AddPocket( STEPINFOPOVECTOR& vStepInfo, const Vector3d& vtTool, dou } // aggiorno per sicurezza la ProgressBar nel caso di Step vuoti - ExeProcessEvents( 100, 100) ; + ExeProcessEvents( 100, 0) ; return true ; } diff --git a/SawFinishing.cpp b/SawFinishing.cpp index b124515..592c4c0 100644 --- a/SawFinishing.cpp +++ b/SawFinishing.cpp @@ -498,13 +498,15 @@ SawFinishing::Apply( bool bRecalc, bool bPostApply) // verifico se necessario continuare nell'aggiornamento if ( ! bRecalc && ! bToolChanged && - ( m_nStatus == MCH_ST_OK || ( ! bPostApply && m_nStatus == MCH_ST_NO_POSTAPPL))) { + ( m_nStatus == MCH_ST_OK || m_nStatus == MCH_ST_NO_POSTAPPL)) { // confermo i percorsi di lavorazione m_nCuts = nCurrCuts ; - LOG_DBG_INFO( GetEMkLogger(), "SawFinishing apply skipped : status already ok") ; + string sLog = string( "SawFinishing apply skipped : status ") + ( m_nStatus == MCH_ST_OK ? "already ok" : "no postapply") ; + LOG_DBG_INFO( GetEMkLogger(), sLog.c_str()) ; // eseguo aggiornamento assi macchina e collegamento con operazione precedente if ( ! Update( bPostApply)) return false ; + m_nStatus = ( bPostApply ? MCH_ST_OK : MCH_ST_NO_POSTAPPL) ; LOG_DBG_INFO( GetEMkLogger(), "Update done") ; // esco con successo return true ; diff --git a/SawRoughing.cpp b/SawRoughing.cpp index 27658f7..007304f 100644 --- a/SawRoughing.cpp +++ b/SawRoughing.cpp @@ -481,13 +481,15 @@ SawRoughing::Apply( bool bRecalc, bool bPostApply) // verifico se necessario continuare nell'aggiornamento if ( ! bRecalc && ! bToolChanged && - ( m_nStatus == MCH_ST_OK || ( ! bPostApply && m_nStatus == MCH_ST_NO_POSTAPPL))) { + ( m_nStatus == MCH_ST_OK || m_nStatus == MCH_ST_NO_POSTAPPL)) { // confermo i percorsi di lavorazione m_nCuts = nCurrCuts ; - LOG_DBG_INFO( GetEMkLogger(), "SawRoughing apply skipped : status already ok") ; + string sLog = string( "SawRoughing apply skipped : status ") + ( m_nStatus == MCH_ST_OK ? "already ok" : "no postapply") ; + LOG_DBG_INFO( GetEMkLogger(), sLog.c_str()) ; // eseguo aggiornamento assi macchina e collegamento con operazione precedente if ( ! Update( bPostApply)) return false ; + m_nStatus = ( bPostApply ? MCH_ST_OK : MCH_ST_NO_POSTAPPL) ; LOG_DBG_INFO( GetEMkLogger(), "Update done") ; // esco con successo return true ; diff --git a/Sawing.cpp b/Sawing.cpp index a9c8ee4..82c80c5 100644 --- a/Sawing.cpp +++ b/Sawing.cpp @@ -646,13 +646,15 @@ Sawing::Apply( bool bRecalc, bool bPostApply) // verifico se necessario continuare nell'aggiornamento if ( ! bRecalc && ! bToolChanged && - ( m_nStatus == MCH_ST_OK || ( ! bPostApply && m_nStatus == MCH_ST_NO_POSTAPPL))) { + ( m_nStatus == MCH_ST_OK || m_nStatus == MCH_ST_NO_POSTAPPL)) { // confermo i percorsi di lavorazione m_nCuts = nCurrCuts ; - LOG_DBG_INFO( GetEMkLogger(), "Sawing apply skipped : status already ok") ; + string sLog = string( "Sawing apply skipped : status ") + ( m_nStatus == MCH_ST_OK ? "already ok" : "no postapply") ; + LOG_DBG_INFO( GetEMkLogger(), sLog.c_str()) ; // eseguo aggiornamento assi macchina e collegamento con operazione precedente if ( ! Update( bPostApply)) return false ; + m_nStatus = ( bPostApply ? MCH_ST_OK : MCH_ST_NO_POSTAPPL) ; LOG_DBG_INFO( GetEMkLogger(), "Update done") ; // esco con successo return true ; diff --git a/SurfFinishing.cpp b/SurfFinishing.cpp index e0e785e..9a6cbe1 100644 --- a/SurfFinishing.cpp +++ b/SurfFinishing.cpp @@ -508,13 +508,15 @@ SurfFinishing::Apply( bool bRecalc, bool bPostApply) // verifico se necessario continuare nell'aggiornamento if ( ! bRecalc && ! bToolChanged && - ( m_nStatus == MCH_ST_OK || ( ! bPostApply && m_nStatus == MCH_ST_NO_POSTAPPL))) { + ( m_nStatus == MCH_ST_OK || m_nStatus == MCH_ST_NO_POSTAPPL)) { // confermo i percorsi di lavorazione m_nPaths = nCurrPaths ; - LOG_DBG_INFO( GetEMkLogger(), "SurfFinishing apply skipped : status already ok") ; + string sLog = string( "SurfFinishing apply skipped : status ") + ( m_nStatus == MCH_ST_OK ? "already ok" : "no postapply") ; + LOG_DBG_INFO( GetEMkLogger(), sLog.c_str()) ; // eseguo aggiornamento assi macchina e collegamento con operazione precedente if ( ! Update( bPostApply)) return false ; + m_nStatus = ( bPostApply ? MCH_ST_OK : MCH_ST_NO_POSTAPPL) ; LOG_DBG_INFO( GetEMkLogger(), "Update done") ; // esco con successo return true ; diff --git a/SurfRoughing.cpp b/SurfRoughing.cpp index 28f02d5..fb11560 100644 --- a/SurfRoughing.cpp +++ b/SurfRoughing.cpp @@ -548,13 +548,15 @@ SurfRoughing::Apply( bool bRecalc, bool bPostApply) // verifico se necessario continuare nell'aggiornamento if ( ! bRecalc && ! bToolChanged && - ( m_nStatus == MCH_ST_OK || ( ! bPostApply && m_nStatus == MCH_ST_NO_POSTAPPL))) { + ( m_nStatus == MCH_ST_OK || m_nStatus == MCH_ST_NO_POSTAPPL)) { // confermo i percorsi di lavorazione m_nPaths = nCurrPaths ; - LOG_DBG_INFO( GetEMkLogger(), "SurfRoughing apply skipped : status already ok") ; + string sLog = string( "SurfRoughing apply skipped : status ") + ( m_nStatus == MCH_ST_OK ? "already ok" : "no postapply") ; + LOG_DBG_INFO( GetEMkLogger(), sLog.c_str()) ; // eseguo aggiornamento assi macchina e collegamento con operazione precedente if ( ! Update( bPostApply)) return false ; + m_nStatus = ( bPostApply ? MCH_ST_OK : MCH_ST_NO_POSTAPPL) ; LOG_DBG_INFO( GetEMkLogger(), "Update done") ; // esco con successo return true ; @@ -1602,14 +1604,14 @@ SurfRoughing::ProcessPath( int nPathId, int nTempId, int nPvId, int nClId) vPocket.emplace_back( make_pair( nNew_SfrPock_Id, nNew_SfrLimit_Id)) ; // aggiorno la progressBar - ExeProcessEvents( 5 + nProgressBarStep * 45 / int( vStepInfo.size()), 100) ; + ExeProcessEvents( 5 + nProgressBarStep * 45 / int( vStepInfo.size()), 0) ; } else { delete( it->pSfrRemoved) ; // non ho rimosso nulla it->pSfrRemoved = nullptr ; // aggiorno la progressBar - ExeProcessEvents( 5 + nProgressBarStep * 45 / int( vStepInfo.size()), 100) ; + ExeProcessEvents( 5 + nProgressBarStep * 45 / int( vStepInfo.size()), 0) ; } } @@ -2133,7 +2135,7 @@ SurfRoughing::CalcPaths( const INTINTVECTOR& vPocket, STEPINFOSRVECTOR& vStepInf ++ nInd ; // aggiorno la progressBar - ExeProcessEvents( 50 + nInd * 50 / int( vPocket.size()), 100) ; + ExeProcessEvents( 50 + nInd * 50 / int( vPocket.size()), 0) ; } vStepInfo.resize( nInd) ; @@ -2351,7 +2353,7 @@ SurfRoughing::AddPocket( const INTINTVECTOR& vPocket, const Vector3d& vtTool, do } // aggiorno per sicurezza la ProgressBar nel caso di Step vuoti - ExeProcessEvents( 100, 100) ; + ExeProcessEvents( 100, 0) ; return true ; } diff --git a/WaterJetting.cpp b/WaterJetting.cpp index 0fa909b..85bfcdc 100644 --- a/WaterJetting.cpp +++ b/WaterJetting.cpp @@ -630,13 +630,15 @@ WaterJetting::Apply( bool bRecalc, bool bPostApply) // verifico se necessario continuare nell'aggiornamento if ( ! bRecalc && ! bToolChanged && - ( m_nStatus == MCH_ST_OK || ( ! bPostApply && m_nStatus == MCH_ST_NO_POSTAPPL))) { + ( m_nStatus == MCH_ST_OK || m_nStatus == MCH_ST_NO_POSTAPPL)) { // confermo i percorsi di lavorazione m_nMills = nCurrMills ; - LOG_DBG_INFO( GetEMkLogger(), "Milling apply skipped : status already ok") ; + string sLog = string( "WaterJetting apply skipped : status ") + ( m_nStatus == MCH_ST_OK ? "already ok" : "no postapply") ; + LOG_DBG_INFO( GetEMkLogger(), sLog.c_str()) ; // eseguo aggiornamento assi macchina e collegamento con operazione precedente if ( ! Update( bPostApply)) return false ; + m_nStatus = ( bPostApply ? MCH_ST_OK : MCH_ST_NO_POSTAPPL) ; LOG_DBG_INFO( GetEMkLogger(), "Update done") ; // esco con successo return true ;