EgtExecutor 1.8k4 :

- a ApplyAllMachinings di Exe e Lua aggiunto parametro di ricalcolo
- in Lua corretta EgtSetInfo con stringhe numeriche.
This commit is contained in:
Dario Sassi
2017-12-02 18:38:30 +00:00
parent a3f5a10e14
commit 1fd62c7180
4 changed files with 46 additions and 40 deletions
+8 -6
View File
@@ -2340,7 +2340,7 @@ ExeGetMachiningEndPoint( Point3d& ptEnd)
//-----------------------------------------------------------------------------
bool
ExeApplyAllMachinings( bool bStopOnFirstErr, string& sErrList)
ExeApplyAllMachinings( bool bRecalc, bool bStopOnFirstErr, string& sErrList)
{
sErrList.clear() ;
IMachMgr* pMachMgr = GetCurrMachMgr() ;
@@ -2357,7 +2357,7 @@ ExeApplyAllMachinings( bool bStopOnFirstErr, string& sErrList)
while ( nOperId != GDB_ID_NULL) {
if ( pMachMgr->GetOperationType( nOperId) == OPER_DISP) {
pMachMgr->SetCurrPhase( pMachMgr->GetOperationPhase( nOperId)) ;
if ( ! pMachMgr->DispositionSpecialApply( nOperId, true)) {
if ( ! pMachMgr->DispositionSpecialApply( nOperId, bRecalc)) {
bOk = false ;
if ( pMachMgr->GetLastErrorId() != 0)
sErrList += pMachMgr->GetOperationName( nOperId) + " -> " + pMachMgr->GetLastErrorString() + "\r\n" ;
@@ -2367,7 +2367,7 @@ ExeApplyAllMachinings( bool bStopOnFirstErr, string& sErrList)
}
else {
pMachMgr->SetCurrMachining( nOperId) ;
if ( ! pMachMgr->MachiningApply( true)) {
if ( ! pMachMgr->MachiningApply( bRecalc, true)) {
bOk = false ;
if ( pMachMgr->GetLastErrorId() != 0) {
sErrList += pMachMgr->GetOperationName( nOperId) + " -> " + pMachMgr->GetLastErrorString() ;
@@ -2390,11 +2390,13 @@ ExeApplyAllMachinings( bool bStopOnFirstErr, string& sErrList)
pMachMgr->ResetCurrMachining() ;
// Ripristino stato visualizzazione macchina
pMachMgr->SetMachineLook( nCurrLook) ;
// Progetto modificato
ExeSetModified() ;
// Se richiesto ricalcolo, progetto modificato
if ( bRecalc)
ExeSetModified() ;
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sLua = "EgtApplyAllMachinings(" + string( bStopOnFirstErr ? "true" : "false") + ")" +
string sLua = "EgtApplyAllMachinings(" + string( bRecalc ? "true" : "false") + ")" +
string( bStopOnFirstErr ? "true" : "false") + ")" +
" -- Ok=" + ToString( bOk) ;
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
}