From 4ab7788d6d789ddaf554e26f088832487dbaf14e Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 21 Jan 2026 09:46:38 +0100 Subject: [PATCH] EgtMachkernel : - aggiunta gestione OnSpecialApplyMachining appena prima del calcolo dei collegamenti tra lavorazioni. --- Chiseling.cpp | 21 +++++++++++++----- Drilling.cpp | 39 +++++++++++++++++++++------------ FiveAxisMilling.cpp | 19 ++++++++++++---- GenMachining.cpp | 21 +++++++++++++----- Machining.cpp | 53 +++++++++++++++++++++++++++++++++++++++++++++ Machining.h | 1 + Milling.cpp | 41 ++++++++++++++++++++++------------- Mortising.cpp | 21 +++++++++++++----- Pocketing.cpp | 41 ++++++++++++++++++++++------------- PocketingNT.cpp | 41 ++++++++++++++++++++++------------- Probing.cpp | 21 +++++++++++++----- SawFinishing.cpp | 21 +++++++++++++----- SawRoughing.cpp | 19 ++++++++++++---- Sawing.cpp | 21 +++++++++++++----- SurfFinishing.cpp | 21 +++++++++++++----- SurfRoughing.cpp | 22 ++++++++++++++----- WaterJetting.cpp | 13 ++++++++++- 17 files changed, 327 insertions(+), 109 deletions(-) diff --git a/Chiseling.cpp b/Chiseling.cpp index 3a1bceb..3bc3fae 100644 --- a/Chiseling.cpp +++ b/Chiseling.cpp @@ -44,6 +44,7 @@ using namespace std ; // 2910 = "Error in Chiseling : link movements not calculable" // 2911 = "Error in Chiseling : link outstroke xx" // 2912 = "Error in Chiseling : post apply not calculable" +// 2913 = "Error in Chiseling : special apply not calculable" // 2951 = "Warning in Chiseling : Skipped entity (xx)" // 2952 = "Warning in Chiseling : Plunges not found" // 2953 = "Warning in Chiseling : Tool name changed (xx)" @@ -623,6 +624,16 @@ Chiseling::Update( bool bPostApply) // assegno estremi degli assi dei vari percorsi di lavorazione e della lavorazione nel suo complesso CalcAndSetAxesBBox() ; + // esecuzione eventuali personalizzazioni speciali + string sSpecErr ; + if ( bPostApply && ! SpecialApply( sSpecErr)) { + if ( ! IsEmptyOrSpaces( sSpecErr)) + m_pMchMgr->SetLastError( 2913, sSpecErr) ; + else + m_pMchMgr->SetLastError( 2913, "Error in Chiseling : special apply not calculable") ; + return false ; + } + // gestione movimenti all'inizio di ogni singolo percorso di lavorazione e alla fine della lavorazione if ( ! AdjustStartEndMovements()) { string sInfo = m_pMchMgr->GetOutstrokeInfo() ; @@ -633,11 +644,11 @@ Chiseling::Update( bool bPostApply) return false ; } - // esecuzione eventuali personalizzazioni - string sErr ; - if ( bPostApply && ! PostApply( sErr)) { - if ( ! IsEmptyOrSpaces( sErr)) - m_pMchMgr->SetLastError( 2912, sErr) ; + // esecuzione eventuali personalizzazioni finali + string sPostErr ; + if ( bPostApply && ! PostApply( sPostErr)) { + if ( ! IsEmptyOrSpaces( sPostErr)) + m_pMchMgr->SetLastError( 2912, sPostErr) ; else m_pMchMgr->SetLastError( 2912, "Error in Chiseling : post apply not calculable") ; return false ; diff --git a/Drilling.cpp b/Drilling.cpp index 3ffb12a..0cf476d 100644 --- a/Drilling.cpp +++ b/Drilling.cpp @@ -53,6 +53,7 @@ using namespace std ; // 2116 = "Error in Drilling : multi drilling head without valid tools" // 2117 = "Error in Drilling : incorrect multi drilling head" // 2118 = "Error in Drilling : Tool loading failed" +// 2119 = "Error in Drilling : special apply not calculable" // 2151 = "Warning in Drilling : Skipped entity (xx)" // 2152 = "Warning in Drilling : No machinable path" // 2153 = "Warning in Drilling : Tool name changed (xx)" @@ -746,16 +747,6 @@ Drilling::Update( bool bPostApply) // assegno estremi degli assi dei vari percorsi di lavorazione e della lavorazione nel suo complesso CalcAndSetAxesBBox() ; - // gestione movimenti all'inizio di ogni singolo percorso di lavorazione e alla fine della lavorazione - if ( ! AdjustStartEndMovements()) { - string sInfo = m_pMchMgr->GetOutstrokeInfo() ; - if ( sInfo.empty()) - m_pMchMgr->SetLastError( 2111, "Error in Drilling : link movements not calculable") ; - else - m_pMchMgr->SetLastError( 2112, "Error in Drilling : link outstroke ") ; - return false ; - } - // se lavorazione in doppio, calcolo assi e movimenti di approccio e retrazione relativi if ( GetDoubleType( m_Params.m_sUserNotes) != 0) { // elimino le entità CLIMB, RISE e HOME della lavorazione in doppio @@ -784,11 +775,31 @@ Drilling::Update( bool bPostApply) return false ; } + // esecuzione eventuali personalizzazioni speciali + string sSpecErr ; + if ( bPostApply && ! SpecialApply( sSpecErr)) { + if ( ! IsEmptyOrSpaces( sSpecErr)) + m_pMchMgr->SetLastError( 2119, sSpecErr) ; + else + m_pMchMgr->SetLastError( 2119, "Error in Drilling : special apply not calculable") ; + return false ; + } + + // gestione movimenti all'inizio di ogni singolo percorso di lavorazione e alla fine della lavorazione + if ( ! AdjustStartEndMovements()) { + string sInfo = m_pMchMgr->GetOutstrokeInfo() ; + if ( sInfo.empty()) + m_pMchMgr->SetLastError( 2111, "Error in Drilling : link movements not calculable") ; + else + m_pMchMgr->SetLastError( 2112, "Error in Drilling : link outstroke ") ; + return false ; + } + // esecuzione eventuali personalizzazioni - string sErr ; - if ( bPostApply && ! PostApply( sErr)) { - if ( ! IsEmptyOrSpaces( sErr)) - m_pMchMgr->SetLastError( 2113, sErr) ; + string sPostErr ; + if ( bPostApply && ! PostApply( sPostErr)) { + if ( ! IsEmptyOrSpaces( sPostErr)) + m_pMchMgr->SetLastError( 2113, sPostErr) ; else m_pMchMgr->SetLastError( 2113, "Error in Drilling : post apply not calculable") ; return false ; diff --git a/FiveAxisMilling.cpp b/FiveAxisMilling.cpp index 7a28b26..077d21e 100644 --- a/FiveAxisMilling.cpp +++ b/FiveAxisMilling.cpp @@ -43,6 +43,7 @@ using namespace std ; // 3308 = "Error in FiveAxisMilling : post apply not calculable" // 3309 = "Error in FiveAxisMilling : Tool loading failed" // 3310 = "Error in FiveAxisMilling : aggregate from bottom not allowed" +// 3311 = "Error in FiveAxisMilling : special apply not calculable" // 3351 = "Warning in FiveAxisMilling : Skipped entity (xx)" // 3352 = "Warning in FiveAxisMilling : No machinable path" // 3353 = "Warning in FiveAxisMilling : Tool name changed (xx)" @@ -743,6 +744,16 @@ FiveAxisMilling::Update( bool bPostApply) // assegno estremi degli assi dei vari percorsi di lavorazione e della lavorazione nel suo complesso CalcAndSetAxesBBox() ; + // esecuzione eventuali personalizzazioni speciali + string sSpecErr ; + if ( bPostApply && ! PostApply( sSpecErr)) { + if ( ! IsEmptyOrSpaces( sSpecErr)) + m_pMchMgr->SetLastError( 3311, sSpecErr) ; + else + m_pMchMgr->SetLastError( 3311, "Error in FiveAxisMilling : special apply not calculable") ; + return false ; + } + // gestione movimenti all'inizio di ogni singolo percorso di lavorazione e alla fine della lavorazione if ( ! AdjustStartEndMovements()) { string sInfo = m_pMchMgr->GetOutstrokeInfo() ; @@ -754,10 +765,10 @@ FiveAxisMilling::Update( bool bPostApply) } // esecuzione eventuali personalizzazioni - string sErr ; - if ( bPostApply && ! PostApply( sErr)) { - if ( ! IsEmptyOrSpaces( sErr)) - m_pMchMgr->SetLastError( 3308, sErr) ; + string sPostErr ; + if ( bPostApply && ! PostApply( sPostErr)) { + if ( ! IsEmptyOrSpaces( sPostErr)) + m_pMchMgr->SetLastError( 3308, sPostErr) ; else m_pMchMgr->SetLastError( 3308, "Error in FiveAxisMilling : post apply not calculable") ; return false ; diff --git a/GenMachining.cpp b/GenMachining.cpp index c327a00..ffa4ec7 100644 --- a/GenMachining.cpp +++ b/GenMachining.cpp @@ -41,6 +41,7 @@ using namespace std ; // 2807 = "Error in GenMachining : link outstroke xx" // 2808 = "Error in GenMachining : post apply not calculable" // 2809 = "Error in GenMachining : Tool loading failed" +// 2810 = "Error in GenMachining : special apply not calculable" // 2851 = "Warning in GenMachining : Skipped entity (xx)" // 2852 = "Warning in GenMachining : No machinable path" // 2853 = "Warning in GenMachining : Tool name changed (xx)" @@ -714,6 +715,16 @@ GenMachining::Update( bool bPostApply) // assegno estremi degli assi dei vari percorsi di lavorazione e della lavorazione nel suo complesso CalcAndSetAxesBBox() ; + // esecuzione eventuali personalizzazioni speciali + string sSpecErr ; + if ( bPostApply && ! SpecialApply( sSpecErr)) { + if ( ! IsEmptyOrSpaces( sSpecErr)) + m_pMchMgr->SetLastError( 2810, sSpecErr) ; + else + m_pMchMgr->SetLastError( 2810, "Error in GenMachining : special apply not calculable") ; + return false ; + } + // gestione movimenti all'inizio di ogni singolo percorso di lavorazione e alla fine della lavorazione bool bVpl ; if ( ! FromString( ExtractInfo( m_Params.m_sUserNotes, UN_VPL_COLON), bVpl)) @@ -727,11 +738,11 @@ GenMachining::Update( bool bPostApply) return false ; } - // esecuzione eventuali personalizzazioni - string sErr ; - if ( bPostApply && ! PostApply( sErr)) { - if ( ! IsEmptyOrSpaces( sErr)) - m_pMchMgr->SetLastError( 2808, sErr) ; + // esecuzione eventuali personalizzazioni finali + string sPostErr ; + if ( bPostApply && ! PostApply( sPostErr)) { + if ( ! IsEmptyOrSpaces( sPostErr)) + m_pMchMgr->SetLastError( 2808, sPostErr) ; else m_pMchMgr->SetLastError( 2808, "Error in GenMachining : post apply not calculable") ; return false ; diff --git a/Machining.cpp b/Machining.cpp index 396df02..af745c8 100644 --- a/Machining.cpp +++ b/Machining.cpp @@ -552,6 +552,59 @@ Machining::ActivateDrillingUnit( int nHeadId, const INTVECTOR& vActExit) const return ( bOk && nErr == 0) ; } +//---------------------------------------------------------------------------- +bool +Machining::SpecialApply( string& sErr) +{ + // recupero la macchina corrente + Machine* pMch = m_pMchMgr->GetCurrMachine() ; + if ( pMch == nullptr) + return false ; + // costanti + static const string EMC_VAR = "EMC" ; // tabella variabili locali per calcolo + static const string EVAR_PHASE = ".PHASE" ; // IN (int) indice fase + static const string EVAR_MCHID = ".MCHID" ; // IN (int) identificativo della lavorazione + static const string EVAR_ERROR = ".ERR" ; // OUT (int) codice di errore ( 0 = ok, > 0 errore, < 0 warning) + static const string EVAR_MSG = ".MSG" ; // OUT (string) stringa di errore ( opzionale) + static const string ON_SPECIAL_APPLY = "OnSpecialApplyMachining" ; + + // se non esiste la funzione, esco + if ( ! pMch->LuaExistsFunction( ON_SPECIAL_APPLY)) + return true ; + + // eseguo l'azione + bool bOk = true ; + int nErr = 99 ; + // imposto valori parametri + bOk = bOk && pMch->LuaCreateGlobTable( EMC_VAR) ; + bOk = bOk && pMch->LuaSetGlobVar( EMC_VAR + EVAR_PHASE, m_nPhase) ; + bOk = bOk && pMch->LuaSetGlobVar( EMC_VAR + EVAR_MCHID, m_nOwnerId) ; + // eseguo + bOk = bOk && pMch->LuaCallFunction( ON_SPECIAL_APPLY, false) ; + // recupero valori parametri obbligatori + bOk = bOk && pMch->LuaGetGlobVar( EMC_VAR + EVAR_ERROR, nErr) ; + // recupero valori parametri opzionali + string sMsg ; + bOk && pMch->LuaGetGlobVar( EMC_VAR + EVAR_MSG, sMsg) ; + // reset + bOk = bOk && pMch->LuaResetGlobVar( EMC_VAR) ; + // segnalo errori + if ( ! bOk || nErr > 0) { + bOk = false ; + sErr = sMsg ; + if ( IsEmptyOrSpaces( sErr)) + sErr = " Error in " + ON_SPECIAL_APPLY + " (" + ToString( nErr) + ")" ; + } + // recupero eventuale warning + else if ( nErr < 0) { + string sOut = sMsg ; + if ( IsEmptyOrSpaces( sOut)) + sOut = " Warning in " + ON_SPECIAL_APPLY + " (" + ToString( abs( nErr)) + ")" ; + m_pMchMgr->SetWarning( abs( nErr), sOut) ; + } + return bOk ; +} + //---------------------------------------------------------------------------- bool Machining::PostApply( string& sErr) diff --git a/Machining.h b/Machining.h index 2f0d3ff..0be8395 100644 --- a/Machining.h +++ b/Machining.h @@ -56,6 +56,7 @@ class Machining : public Operation protected : Machining( void) ; + bool SpecialApply( std::string& sErr) ; bool PostApply( std::string& sErr) ; int GetDoubleType( const std::string& sUserNotes) ; bool GetDoubleToolData( std::string& sDblTool, std::string& sDblHead, int& nDblExit) ; diff --git a/Milling.cpp b/Milling.cpp index 39935ca..cb040a6 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -77,6 +77,7 @@ const double LIM_SIN_DIFF_DIR = 0.175 ; // 2323 = "Error in Milling : machining depth (xxx) bigger than MaxDepth (yyy)" // 2324 = "Error in Milling : LeadOut must be out of rawpart" // 2325 = "Error in Milling : Mirror for Double calculation failed" +// 2326 = "Error in Milling : special apply not calculable" // 2351 = "Warning in Milling : Skipped entity (xx)" // 2352 = "Warning in Milling : No machinable path" // 2353 = "Warning in Milling : Tool name changed (xx)" @@ -904,16 +905,6 @@ Milling::Update( bool bPostApply) // assegno estremi degli assi dei vari percorsi di lavorazione e della lavorazione nel suo complesso CalcAndSetAxesBBox() ; - // gestione movimenti all'inizio e fine di ogni singolo percorso di lavorazione - if ( ! AdjustStartEndMovements()) { - string sInfo = m_pMchMgr->GetOutstrokeInfo() ; - if ( sInfo.empty()) - m_pMchMgr->SetLastError( 2319, "Error in Milling : link movements not calculable") ; - else - m_pMchMgr->SetLastError( 2320, "Error in Milling : link outstroke ") ; - return false ; - } - // se lavorazione in doppio, calcolo assi e movimenti di approccio e retrazione relativi if ( GetDoubleType( m_Params.m_sUserNotes) != 0) { // elimino le entità CLIMB, RISE e HOME della lavorazione in doppio @@ -942,11 +933,31 @@ Milling::Update( bool bPostApply) return false ; } - // esecuzione eventuali personalizzazioni - string sErr ; - if ( bPostApply && ! PostApply( sErr)) { - if ( ! IsEmptyOrSpaces( sErr)) - m_pMchMgr->SetLastError( 2321, sErr) ; + // esecuzione eventuali personalizzazioni speciali + string sSpecErr ; + if ( bPostApply && ! SpecialApply( sSpecErr)) { + if ( ! IsEmptyOrSpaces( sSpecErr)) + m_pMchMgr->SetLastError( 2326, sSpecErr) ; + else + m_pMchMgr->SetLastError( 2326, "Error in Milling : special apply not calculable") ; + return false ; + } + + // gestione movimenti all'inizio e fine di ogni singolo percorso di lavorazione + if ( ! AdjustStartEndMovements()) { + string sInfo = m_pMchMgr->GetOutstrokeInfo() ; + if ( sInfo.empty()) + m_pMchMgr->SetLastError( 2319, "Error in Milling : link movements not calculable") ; + else + m_pMchMgr->SetLastError( 2320, "Error in Milling : link outstroke ") ; + return false ; + } + + // esecuzione eventuali personalizzazioni finali + string sPostErr ; + if ( bPostApply && ! PostApply( sPostErr)) { + if ( ! IsEmptyOrSpaces( sPostErr)) + m_pMchMgr->SetLastError( 2321, sPostErr) ; else m_pMchMgr->SetLastError( 2321, "Error in Milling : post apply not calculable") ; return false ; diff --git a/Mortising.cpp b/Mortising.cpp index f635287..6c864f5 100644 --- a/Mortising.cpp +++ b/Mortising.cpp @@ -46,6 +46,7 @@ using namespace std ; // 2511 = "Error in Mortising : post apply not calculable" // 2512 = "Error in Mortising : Tool MaxMaterial too small (xx)" // 2513 = "Error in Mortising : Closed path not allowed" +// 2514 = "Error in Mortising : special apply not calculable" // 2551 = "Warning in Mortising : Skipped entity (xx)" // 2552 = "Warning in Mortising : Plunges not found" // 2553 = "Warning in Mortising : Tool name changed (xx)" @@ -663,6 +664,16 @@ Mortising::Update( bool bPostApply) // assegno estremi degli assi dei vari percorsi di lavorazione e della lavorazione nel suo complesso CalcAndSetAxesBBox() ; + // esecuzione eventuali personalizzazioni speciali + string sSpecErr ; + if ( bPostApply && ! SpecialApply( sSpecErr)) { + if ( ! IsEmptyOrSpaces( sSpecErr)) + m_pMchMgr->SetLastError( 2514, sSpecErr) ; + else + m_pMchMgr->SetLastError( 2514, "Error in Mortising : special apply not calculable") ; + return false ; + } + // gestione movimenti all'inizio di ogni singolo percorso di lavorazione e alla fine della lavorazione if ( ! AdjustStartEndMovements()) { string sInfo = m_pMchMgr->GetOutstrokeInfo() ; @@ -673,11 +684,11 @@ Mortising::Update( bool bPostApply) return false ; } - // esecuzione eventuali personalizzazioni - string sErr ; - if ( bPostApply && ! PostApply( sErr)) { - if ( ! IsEmptyOrSpaces( sErr)) - m_pMchMgr->SetLastError( 2511, sErr) ; + // esecuzione eventuali personalizzazioni finali + string sPostErr ; + if ( bPostApply && ! PostApply( sPostErr)) { + if ( ! IsEmptyOrSpaces( sPostErr)) + m_pMchMgr->SetLastError( 2511, sPostErr) ; else m_pMchMgr->SetLastError( 2511, "Error in Mortising : post apply not calculable") ; return false ; diff --git a/Pocketing.cpp b/Pocketing.cpp index b703656..517f0a6 100644 --- a/Pocketing.cpp +++ b/Pocketing.cpp @@ -80,6 +80,7 @@ static string KEY_OPEN = "OPEN" ; // 2430 = "Error in Pocketing : adjust open edges failed" // 2431 = "Error in Pocketing : LeadIn with Mill NoTip in material" // 2432 = "Error in Pocketing : Mirror for Double calculation failed" +// 2433 = "Error in Pocketing : special apply not calculable" // 2451 = "Warning in Pocketing : Skipped entity (xx)" // 2452 = "Warning in Pocketing : No machinable pocket" // 2453 = "Warning in Pocketing : Tool name changed (xx)" @@ -775,16 +776,6 @@ Pocketing::Update( bool bPostApply) // assegno estremi degli assi dei vari percorsi di lavorazione e della lavorazione nel suo complesso CalcAndSetAxesBBox() ; - // gestione movimenti all'inizio di ogni singolo percorso di lavorazione e alla fine della lavorazione - if ( ! AdjustStartEndMovements()) { - string sInfo = m_pMchMgr->GetOutstrokeInfo() ; - if ( sInfo.empty()) - m_pMchMgr->SetLastError( 2425, "Error in Pocketing : link movements not calculable") ; - else - m_pMchMgr->SetLastError( 2426, "Error in Pocketing : link outstroke ") ; - return false ; - } - // se lavorazione in doppio, calcolo assi e movimenti di approccio e retrazione relativi if ( GetDoubleType( m_Params.m_sUserNotes) != 0) { // elimino le entità CLIMB, RISE e HOME della lavorazione in doppio @@ -813,11 +804,31 @@ Pocketing::Update( bool bPostApply) return false ; } - // esecuzione eventuali personalizzazioni - string sErr ; - if ( bPostApply && ! PostApply( sErr)) { - if ( ! IsEmptyOrSpaces( sErr)) - m_pMchMgr->SetLastError( 2427, sErr) ; + // esecuzione eventuali personalizzazioni speciali + string sSpecErr ; + if ( bPostApply && ! SpecialApply( sSpecErr)) { + if ( ! IsEmptyOrSpaces( sSpecErr)) + m_pMchMgr->SetLastError( 2433, sSpecErr) ; + else + m_pMchMgr->SetLastError( 2433, "Error in Pocketing : special apply not calculable") ; + return false ; + } + + // gestione movimenti all'inizio di ogni singolo percorso di lavorazione e alla fine della lavorazione + if ( ! AdjustStartEndMovements()) { + string sInfo = m_pMchMgr->GetOutstrokeInfo() ; + if ( sInfo.empty()) + m_pMchMgr->SetLastError( 2425, "Error in Pocketing : link movements not calculable") ; + else + m_pMchMgr->SetLastError( 2426, "Error in Pocketing : link outstroke ") ; + return false ; + } + + // esecuzione eventuali personalizzazioni finali + string sPostErr ; + if ( bPostApply && ! PostApply( sPostErr)) { + if ( ! IsEmptyOrSpaces( sPostErr)) + m_pMchMgr->SetLastError( 2427, sPostErr) ; else m_pMchMgr->SetLastError( 2427, "Error in Pocketing : post apply not calculable") ; return false ; diff --git a/PocketingNT.cpp b/PocketingNT.cpp index 7d62479..b4981ec 100644 --- a/PocketingNT.cpp +++ b/PocketingNT.cpp @@ -97,6 +97,7 @@ static double TOOL_RAD_PTSTART = 20. ; // 2436 = "Error in PocketingNT : not valid Raw" // 2437 = "Error in PocketingNT : not valid Trim Surf" // 2438 = "Error in PocketingNT : not valid Pocketing Volume" +// 2439 = "Error in PocketingNT : special apply not calculable" // 2451 = "Warning in PocketingNT : Skipped entity (xx)" // 2452 = "Warning in PocketingNT : No pocket" // 2453 = "Warning in PocketingNT : Tool name changed (xx)" @@ -849,16 +850,6 @@ PocketingNT::Update( bool bPostApply) // assegno estremi degli assi dei vari percorsi di lavorazione e della lavorazione nel suo complesso CalcAndSetAxesBBox() ; - // gestione movimenti all'inizio di ogni singolo percorso di lavorazione e alla fine della lavorazione - if ( ! AdjustStartEndMovements()) { - string sInfo = m_pMchMgr->GetOutstrokeInfo() ; - if ( sInfo.empty()) - m_pMchMgr->SetLastError( 2425, "Error in PocketingNT : link movements not calculable") ; - else - m_pMchMgr->SetLastError( 2426, "Error in PocketingNT : link outstroke ") ; - return false ; - } - // se lavorazione in doppio, calcolo assi e movimenti di approccio e retrazione relativi if ( GetDoubleType( m_Params.m_sUserNotes) != 0) { // elimino le entità CLIMB, RISE e HOME della lavorazione in doppio @@ -887,11 +878,31 @@ PocketingNT::Update( bool bPostApply) return false ; } - // esecuzione eventuali personalizzazioni - string sErr ; - if ( bPostApply && ! PostApply( sErr)) { - if ( ! IsEmptyOrSpaces( sErr)) - m_pMchMgr->SetLastError( 2427, sErr) ; + // esecuzione eventuali personalizzazioni speciali + string sSpecErr ; + if ( bPostApply && ! SpecialApply( sSpecErr)) { + if ( ! IsEmptyOrSpaces( sSpecErr)) + m_pMchMgr->SetLastError( 2439, sSpecErr) ; + else + m_pMchMgr->SetLastError( 2439, "Error in PocketingNT : special apply not calculable") ; + return false ; + } + + // gestione movimenti all'inizio di ogni singolo percorso di lavorazione e alla fine della lavorazione + if ( ! AdjustStartEndMovements()) { + string sInfo = m_pMchMgr->GetOutstrokeInfo() ; + if ( sInfo.empty()) + m_pMchMgr->SetLastError( 2425, "Error in PocketingNT : link movements not calculable") ; + else + m_pMchMgr->SetLastError( 2426, "Error in PocketingNT : link outstroke ") ; + return false ; + } + + // esecuzione eventuali personalizzazioni finali + string sPostErr ; + if ( bPostApply && ! PostApply( sPostErr)) { + if ( ! IsEmptyOrSpaces( sPostErr)) + m_pMchMgr->SetLastError( 2427, sPostErr) ; else m_pMchMgr->SetLastError( 2427, "Error in PocketingNT : post apply not calculable") ; return false ; diff --git a/Probing.cpp b/Probing.cpp index 131decf..db114e7 100644 --- a/Probing.cpp +++ b/Probing.cpp @@ -41,6 +41,7 @@ using namespace std ; // 3407 = "Error in Probing : link outstroke xx" // 3408 = "Error in Probing : post apply not calculable" // 3409 = "Error in Probing : Tool loading failed" +// 3410 = "Error in Probing : special apply not calculable" // 3451 = "Warning in Probing : Skipped entity (xx)" // 3452 = "Warning in Probing : No machinable path" // 3453 = "Warning in Probing : Tool name changed (xx)" @@ -679,6 +680,16 @@ Probing::Update( bool bPostApply) // assegno estremi degli assi dei vari percorsi di lavorazione e della lavorazione nel suo complesso CalcAndSetAxesBBox() ; + // esecuzione eventuali personalizzazioni speciali + string sSpecErr ; + if ( bPostApply && ! SpecialApply( sSpecErr)) { + if ( ! IsEmptyOrSpaces( sSpecErr)) + m_pMchMgr->SetLastError( 3410, sSpecErr) ; + else + m_pMchMgr->SetLastError( 3410, "Error in Probing : special apply not calculable") ; + return false ; + } + // gestione movimenti all'inizio di ogni singolo percorso di lavorazione e alla fine della lavorazione if ( ! AdjustStartEndMovements()) { string sInfo = m_pMchMgr->GetOutstrokeInfo() ; @@ -689,11 +700,11 @@ Probing::Update( bool bPostApply) return false ; } - // esecuzione eventuali personalizzazioni - string sErr ; - if ( bPostApply && ! PostApply( sErr)) { - if ( ! IsEmptyOrSpaces( sErr)) - m_pMchMgr->SetLastError( 3408, sErr) ; + // esecuzione eventuali personalizzazioni finali + string sPostErr ; + if ( bPostApply && ! PostApply( sPostErr)) { + if ( ! IsEmptyOrSpaces( sPostErr)) + m_pMchMgr->SetLastError( 3408, sPostErr) ; else m_pMchMgr->SetLastError( 3408, "Error in Probing : post apply not calculable") ; return false ; diff --git a/SawFinishing.cpp b/SawFinishing.cpp index ae7de44..3f9481c 100644 --- a/SawFinishing.cpp +++ b/SawFinishing.cpp @@ -51,6 +51,7 @@ using namespace std ; // 2713 = "Error in SawFinishing : link movements not calculable" // 2714 = "Error in SawFinishing : link outstroke xx" // 2715 = "Error in SawFinishing : post apply not calculable" +// 2716 = "Error in SawFinishing : special apply not calculable" // 2751 = "Warning in SawFinishing : Skipped entity (xx)" // 2752 = "Warning in SawFinishing : No machinable path" // 2753 = "Warning in SawFinishing : Tool name changed (xx)" @@ -635,6 +636,16 @@ SawFinishing::Update( bool bPostApply) // assegno estremi degli assi dei vari percorsi di lavorazione e della lavorazione nel suo complesso CalcAndSetAxesBBox() ; + // esecuzione eventuali personalizzazioni speciali + string sSpecErr ; + if ( bPostApply && ! SpecialApply( sSpecErr)) { + if ( ! IsEmptyOrSpaces( sSpecErr)) + m_pMchMgr->SetLastError( 2716, sSpecErr) ; + else + m_pMchMgr->SetLastError( 2716, "Error in SawFinishing : special apply not calculable") ; + return false ; + } + // gestione movimenti all'inizio di ogni singolo percorso di lavorazione e alla fine della lavorazione if ( ! AdjustStartEndMovements()) { string sInfo = m_pMchMgr->GetOutstrokeInfo() ; @@ -645,11 +656,11 @@ SawFinishing::Update( bool bPostApply) return false ; } - // esecuzione eventuali personalizzazioni - string sErr ; - if ( bPostApply && ! PostApply( sErr)) { - if ( ! IsEmptyOrSpaces( sErr)) - m_pMchMgr->SetLastError( 2715, sErr) ; + // esecuzione eventuali personalizzazioni finali + string sPostErr ; + if ( bPostApply && ! PostApply( sPostErr)) { + if ( ! IsEmptyOrSpaces( sPostErr)) + m_pMchMgr->SetLastError( 2715, sPostErr) ; else m_pMchMgr->SetLastError( 2715, "Error in SawFinishing : post apply not calculable") ; return false ; diff --git a/SawRoughing.cpp b/SawRoughing.cpp index 0255c2e..1013efe 100644 --- a/SawRoughing.cpp +++ b/SawRoughing.cpp @@ -52,6 +52,7 @@ using namespace std ; // 2613 = "Error in SawRoughing : link movements not calculable" // 2614 = "Error in SawRoughing : link outstroke xxx" // 2615 = "Error in SawRoughing : post apply not calculable" +// 2616 = "Error in SawRoughing : special apply not calculable" // 2651 = "Warning in SawRoughing : Skipped entity (xx)" // 2652 = "Warning in SawRoughing : No machinable path" // 2653 = "Warning in SawRoughing : Tool name changed (xx)" @@ -655,6 +656,16 @@ SawRoughing::Update( bool bPostApply) // assegno estremi degli assi dei vari percorsi di lavorazione e della lavorazione nel suo complesso CalcAndSetAxesBBox() ; + // esecuzione eventuali personalizzazioni speciali + string sSpecErr ; + if ( bPostApply && ! SpecialApply( sSpecErr)) { + if ( ! IsEmptyOrSpaces( sSpecErr)) + m_pMchMgr->SetLastError( 2616, sSpecErr) ; + else + m_pMchMgr->SetLastError( 2616, "Error in SawRoughing : special apply not calculable") ; + return false ; + } + // gestione movimenti all'inizio di ogni singolo percorso di lavorazione e alla fine della lavorazione if ( ! AdjustStartEndMovements()) { string sInfo = m_pMchMgr->GetOutstrokeInfo() ; @@ -666,10 +677,10 @@ SawRoughing::Update( bool bPostApply) } // esecuzione eventuali personalizzazioni - string sErr ; - if ( bPostApply && ! PostApply( sErr)) { - if ( ! IsEmptyOrSpaces( sErr)) - m_pMchMgr->SetLastError( 2615, sErr) ; + string sPostErr ; + if ( bPostApply && ! PostApply( sPostErr)) { + if ( ! IsEmptyOrSpaces( sPostErr)) + m_pMchMgr->SetLastError( 2615, sPostErr) ; else m_pMchMgr->SetLastError( 2615, "Error in SawRoughing : post apply not calculable") ; return false ; diff --git a/Sawing.cpp b/Sawing.cpp index a33f416..a4db978 100644 --- a/Sawing.cpp +++ b/Sawing.cpp @@ -57,6 +57,7 @@ using namespace std ; // 2217 = "Error in Sawing : link movements not calculable" // 2218 = "Error in Sawing : link outstroke xxx" // 2219 = "Error in Sawing : post apply not calculable" +// 2220 = "Error in Sawing : special apply not calculable" // 2251 = "Warning in Sawing : Skipped entity xxx" // 2252 = "Warning in Sawing : No machinable path" // 2253 = "Warning in Sawing : Tool name changed (xx)" @@ -782,6 +783,16 @@ Sawing::Update( bool bPostApply) // assegno estremi degli assi dei vari percorsi di lavorazione e della lavorazione nel suo complesso CalcAndSetAxesBBox() ; + // esecuzione eventuali personalizzazioni speciali + string sSpecErr ; + if ( bPostApply && ! SpecialApply( sSpecErr)) { + if ( ! IsEmptyOrSpaces( sSpecErr)) + m_pMchMgr->SetLastError( 2220, sSpecErr) ; + else + m_pMchMgr->SetLastError( 2220, "Error in Sawing : special apply not calculable") ; + return false ; + } + // gestione movimenti all'inizio di ogni singolo percorso di lavorazione e alla fine della lavorazione if ( ! AdjustStartEndMovements()) { string sInfo = m_pMchMgr->GetOutstrokeInfo() ; @@ -792,11 +803,11 @@ Sawing::Update( bool bPostApply) return false ; } - // esecuzione eventuali personalizzazioni - string sErr ; - if ( bPostApply && ! PostApply( sErr)) { - if ( ! IsEmptyOrSpaces( sErr)) - m_pMchMgr->SetLastError( 2219, sErr) ; + // esecuzione eventuali personalizzazioni finali + string sPostErr ; + if ( bPostApply && ! PostApply( sPostErr)) { + if ( ! IsEmptyOrSpaces( sPostErr)) + m_pMchMgr->SetLastError( 2219, sPostErr) ; else m_pMchMgr->SetLastError( 2219, "Error in Sawing : post apply not calculable") ; return false ; diff --git a/SurfFinishing.cpp b/SurfFinishing.cpp index f62b6f2..dfd8b61 100644 --- a/SurfFinishing.cpp +++ b/SurfFinishing.cpp @@ -92,6 +92,7 @@ using namespace std ; // 3133 = "Error in SurfFinishing : Projecting curves on Surface failed" // 3134 = "Error in SurfFinishing : Projecting Path failed" // 3135 = "Error in SurfFinishing : Calc Region Elvation failed" +// 3136 = "Error in SurfFinishing : special apply not calculable" // 3151 = "Warning in SurfFinishing : Skipped entity (xx)" // 3152 = "Warning in SurfFinishing : No machinable path" // 3153 = "Warning in SurfFinishing : Tool name changed (xx)" @@ -749,6 +750,16 @@ SurfFinishing::Update( bool bPostApply) // assegno estremi degli assi dei vari percorsi di lavorazione e della lavorazione nel suo complesso CalcAndSetAxesBBox() ; + // esecuzione eventuali personalizzazioni speciali + string sSpecErr ; + if ( bPostApply && ! SpecialApply( sSpecErr)) { + if ( ! IsEmptyOrSpaces( sSpecErr)) + m_pMchMgr->SetLastError( 3136, sSpecErr) ; + else + m_pMchMgr->SetLastError( 3136, "Error in SurfFinishing : special apply not calculable") ; + return false ; + } + // gestione movimenti all'inizio di ogni singolo percorso di lavorazione e alla fine della lavorazione if ( ! AdjustStartEndMovements()) { string sInfo = m_pMchMgr->GetOutstrokeInfo() ; @@ -759,11 +770,11 @@ SurfFinishing::Update( bool bPostApply) return false ; } - // esecuzione eventuali personalizzazioni - string sErr ; - if ( bPostApply && ! PostApply( sErr)) { - if ( ! IsEmptyOrSpaces( sErr)) - m_pMchMgr->SetLastError( 3120, sErr) ; + // esecuzione eventuali personalizzazioni finali + string sPostErr ; + if ( bPostApply && ! PostApply( sPostErr)) { + if ( ! IsEmptyOrSpaces( sPostErr)) + m_pMchMgr->SetLastError( 3120, sPostErr) ; else m_pMchMgr->SetLastError( 3120, "Error in SurfFinishing : post apply not calculable") ; return false ; diff --git a/SurfRoughing.cpp b/SurfRoughing.cpp index 9a4d783..6574f4d 100644 --- a/SurfRoughing.cpp +++ b/SurfRoughing.cpp @@ -80,7 +80,6 @@ using namespace std ; // 3026 = "Error in SurfRoughing : Detecting open edges failed" // 3027 = "Error in SurfRoughing : Slicing Raw failed" // 3028 = "Error in SurfRoughing : Error in CalcPocketing" -// 3029 = "Error in SurfRoughing : Error in Classifying border" // 3029 = "Error in SurfRoughing : Simplify Chunks for SubSteps failed" // 3030 = "Error in SurfRoughing : Conformal ZigZag not valid at step (xx)" // 3031 = "Error in SurfRoughing : LeadIn with Mill NoTip in material" @@ -88,6 +87,7 @@ using namespace std ; // 3033 = "Error in SurfRoughing : CalcRegion elevation failed" // 3034 = "Error in SurfRoughing : Linking paths failed" // 3035 = "Error in SurfRoughing : Entity without Info" +// 3036 = "Error in SurfRoughing : special apply not calculable" // 3051 = "Warning in SurfRoughing : Skipped entity (xx)" // 3052 = "Warning in SurfRoughing : No machinable path" // 3053 = "Warning in SurfRoughing : Tool name changed (xx)" @@ -737,6 +737,16 @@ SurfRoughing::Update( bool bPostApply) // assegno estremi degli assi dei vari percorsi di lavorazione e della lavorazione nel suo complesso CalcAndSetAxesBBox() ; + // esecuzione eventuali personalizzazioni speciali + string sSpecErr ; + if ( bPostApply && ! SpecialApply( sSpecErr)) { + if ( ! IsEmptyOrSpaces( sSpecErr)) + m_pMchMgr->SetLastError( 3036, sSpecErr) ; + else + m_pMchMgr->SetLastError( 3036, "Error in SurfRoughing : special apply not calculable") ; + return false ; + } + // gestione movimenti all'inizio di ogni singolo percorso di lavorazione e alla fine della lavorazione if ( ! AdjustStartEndMovements()) { string sInfo = m_pMchMgr->GetOutstrokeInfo() ; @@ -747,11 +757,11 @@ SurfRoughing::Update( bool bPostApply) return false ; } - // esecuzione eventuali personalizzazioni - string sErr ; - if ( bPostApply && ! PostApply( sErr)) { - if ( ! IsEmptyOrSpaces( sErr)) - m_pMchMgr->SetLastError( 3020, sErr) ; + // esecuzione eventuali personalizzazioni finali + string sPostErr ; + if ( bPostApply && ! PostApply( sPostErr)) { + if ( ! IsEmptyOrSpaces( sPostErr)) + m_pMchMgr->SetLastError( 3020, sPostErr) ; else m_pMchMgr->SetLastError( 3020, "Error in SurfRoughing : post apply not calculable") ; return false ; diff --git a/WaterJetting.cpp b/WaterJetting.cpp index 1910812..fa4e60e 100644 --- a/WaterJetting.cpp +++ b/WaterJetting.cpp @@ -58,6 +58,7 @@ using namespace std ; // 3219 = "Error in WaterJetting : Tool loading failed" // 3220 = "Error in WaterJetting : Center work not allowed with side angle" // 3221 = "Error in WaterJetting : Path plane different from XY" +// 3222 = "Error in WaterJetting : special apply not calculable" // 3251 = "Warning in WaterJetting : Skipped entity (xx)" // 3252 = "Warning in WaterJetting : No machinable path" // 3253 = "Warning in WaterJetting : Tool name changed (xx)" @@ -770,6 +771,16 @@ WaterJetting::Update( bool bPostApply) // assegno estremi degli assi dei vari percorsi di lavorazione e della lavorazione nel suo complesso CalcAndSetAxesBBox() ; + // esecuzione eventuali personalizzazioni speciali + string sSpecErr ; + if ( bPostApply && ! SpecialApply( sSpecErr)) { + if ( ! IsEmptyOrSpaces( sSpecErr)) + m_pMchMgr->SetLastError( 3222, sSpecErr) ; + else + m_pMchMgr->SetLastError( 3222, "Error in WaterJetting : special apply not calculable") ; + return false ; + } + // gestione movimenti all'inizio di ogni singolo percorso di lavorazione e alla fine della lavorazione if ( ! AdjustStartEndMovements()) { string sInfo = m_pMchMgr->GetOutstrokeInfo() ; @@ -780,7 +791,7 @@ WaterJetting::Update( bool bPostApply) return false ; } - // esecuzione eventuali personalizzazioni + // esecuzione eventuali personalizzazioni finali string sErr ; if ( bPostApply && ! PostApply( sErr)) { if ( ! IsEmptyOrSpaces( sErr))