EgtMachKernel :
- correzioni per calcolo posizione utensile fuori pezzo in fresatura - ora GetElevation può gestire un offset della superficie utensile tramite il parametro dSafeDist.
This commit is contained in:
+31
-31
@@ -31,19 +31,19 @@
|
||||
using namespace std ;
|
||||
|
||||
//------------------------------ Errors --------------------------------------
|
||||
// 2801 = "Error in FiveAxisMilling : UpdateToolData failed"
|
||||
// 2802 = "Error in FiveAxisMilling : missing Script (xxx)"
|
||||
// 2803 = "Error in FiveAxisMilling : Error in xxx (nnn)"
|
||||
// 2804 = "Error in FiveAxisMilling : axes values not calculable"
|
||||
// 2805 = "Error in FiveAxisMilling : outstroke xx"
|
||||
// 2806 = "Error in FiveAxisMilling : link movements not calculable"
|
||||
// 2807 = "Error in FiveAxisMilling : link outstroke xx"
|
||||
// 2808 = "Error in FiveAxisMilling : post apply not calculable"
|
||||
// 2809 = "Error in FiveAxisMilling : Tool loading failed"
|
||||
// 2851 = "Warning in FiveAxisMilling : Skipped entity (xx)"
|
||||
// 2852 = "Warning in FiveAxisMilling : No machinable path"
|
||||
// 2853 = "Warning in FiveAxisMilling : Tool name changed (xx)"
|
||||
// 2854 = "Warning in FiveAxisMilling : Tool data changed (xx)"
|
||||
// 3301 = "Error in FiveAxisMilling : UpdateToolData failed"
|
||||
// 3302 = "Error in FiveAxisMilling : missing Script (xxx)"
|
||||
// 3303 = "Error in FiveAxisMilling : Error in xxx (nnn)"
|
||||
// 3304 = "Error in FiveAxisMilling : axes values not calculable"
|
||||
// 3305 = "Error in FiveAxisMilling : outstroke xx"
|
||||
// 3306 = "Error in FiveAxisMilling : link movements not calculable"
|
||||
// 3307 = "Error in FiveAxisMilling : link outstroke xx"
|
||||
// 3308 = "Error in FiveAxisMilling : post apply not calculable"
|
||||
// 3309 = "Error in FiveAxisMilling : Tool loading failed"
|
||||
// 3351 = "Warning in FiveAxisMilling : Skipped entity (xx)"
|
||||
// 3352 = "Warning in FiveAxisMilling : No machinable path"
|
||||
// 3353 = "Warning in FiveAxisMilling : Tool name changed (xx)"
|
||||
// 3354 = "Warning in FiveAxisMilling : Tool data changed (xx)"
|
||||
|
||||
//------------------------------ Constants -----------------------------------
|
||||
static const string EMC_VAR = "EMC" ; // tabella variabili locali per calcolo
|
||||
@@ -420,7 +420,7 @@ FiveAxisMilling::SetGeometry( const SELVECTOR& vIds)
|
||||
int nSubs ;
|
||||
if ( ! VerifyGeometry( Id, nSubs, nType)) {
|
||||
string sInfo = "Warning in FiveAxisMilling : Skipped entity " + ToString( Id) ;
|
||||
m_pMchMgr->SetWarning( 2851, sInfo) ;
|
||||
m_pMchMgr->SetWarning( 3351, sInfo) ;
|
||||
continue ;
|
||||
}
|
||||
// posso aggiungere alla lista
|
||||
@@ -445,13 +445,13 @@ FiveAxisMilling::Preview( bool bRecalc)
|
||||
|
||||
// aggiorno dati geometrici dell'utensile
|
||||
if ( ! UpdateToolData()) {
|
||||
m_pMchMgr->SetLastError( 2801, "Error in FiveAxisMilling : UpdateToolData failed") ;
|
||||
m_pMchMgr->SetLastError( 3301, "Error in FiveAxisMilling : UpdateToolData failed") ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
// rendo corrente l'utensile usato nella lavorazione
|
||||
if ( ! m_pMchMgr->SetCalcTool( m_TParams.m_sName, m_TParams.m_sHead, m_TParams.m_nExit)) {
|
||||
m_pMchMgr->SetLastError( 2809, "Error in FiveAxisMilling : Tool loading failed") ;
|
||||
m_pMchMgr->SetLastError( 3309, "Error in FiveAxisMilling : Tool loading failed") ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -482,7 +482,7 @@ FiveAxisMilling::Preview( bool bRecalc)
|
||||
// verifico esistenza funzione
|
||||
if ( ! pMch->LuaExistsFunction( sPreview)) {
|
||||
string sErr = "Error in FiveAxisMilling : missing Script " + sPreview ;
|
||||
m_pMchMgr->SetLastError( 2802, sErr) ;
|
||||
m_pMchMgr->SetLastError( 3302, sErr) ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -529,7 +529,7 @@ FiveAxisMilling::Preview( bool bRecalc)
|
||||
if ( ! bOk || nErr != 0) {
|
||||
m_nMills = 0 ;
|
||||
string sErr = "Error in FiveAxisMilling : Error in " + sPreview + " (" + ToString( nErr) + ")" ;
|
||||
m_pMchMgr->SetLastError( 2803, sErr) ;
|
||||
m_pMchMgr->SetLastError( 3303, sErr) ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -551,7 +551,7 @@ FiveAxisMilling::Apply( bool bRecalc, bool bPostApply)
|
||||
// aggiorno dati geometrici dell'utensile
|
||||
bool bToolChanged = true ;
|
||||
if ( ! UpdateToolData( &bToolChanged)) {
|
||||
m_pMchMgr->SetLastError( 2801, "Error in FiveAxisMilling : UpdateToolData failed") ;
|
||||
m_pMchMgr->SetLastError( 3301, "Error in FiveAxisMilling : UpdateToolData failed") ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -572,7 +572,7 @@ FiveAxisMilling::Apply( bool bRecalc, bool bPostApply)
|
||||
|
||||
// rendo corrente l'utensile usato nella lavorazione
|
||||
if ( ! m_pMchMgr->SetCalcTool( m_TParams.m_sName, m_TParams.m_sHead, m_TParams.m_nExit)) {
|
||||
m_pMchMgr->SetLastError( 2809, "Error in FiveAxisMilling : Tool loading failed") ;
|
||||
m_pMchMgr->SetLastError( 3309, "Error in FiveAxisMilling : Tool loading failed") ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -603,7 +603,7 @@ FiveAxisMilling::Apply( bool bRecalc, bool bPostApply)
|
||||
// verifico esistenza funzione
|
||||
if ( ! pMch->LuaExistsFunction( sApply)) {
|
||||
string sErr = "Error in FiveAxisMilling : missing Script " + sApply ;
|
||||
m_pMchMgr->SetLastError( 2802, sErr) ;
|
||||
m_pMchMgr->SetLastError( 3302, sErr) ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -650,7 +650,7 @@ FiveAxisMilling::Apply( bool bRecalc, bool bPostApply)
|
||||
if ( ! bOk || nErr != 0) {
|
||||
m_nMills = 0 ;
|
||||
string sErr = "Error in FiveAxisMilling : Error in " + sApply + " (" + ToString( nErr) + ")" ;
|
||||
m_pMchMgr->SetLastError( 2803, sErr) ;
|
||||
m_pMchMgr->SetLastError( 3303, sErr) ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -681,7 +681,7 @@ FiveAxisMilling::Update( bool bPostApply)
|
||||
|
||||
// se lavorazione vuota, esco
|
||||
if ( m_nMills == 0) {
|
||||
m_pMchMgr->SetWarning( 2852, "Warning in FiveAxisMilling : No machinable path") ;
|
||||
m_pMchMgr->SetWarning( 3352, "Warning in FiveAxisMilling : No machinable path") ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
@@ -698,9 +698,9 @@ FiveAxisMilling::Update( bool bPostApply)
|
||||
if ( ! CalculateAxesValues( sHint)) {
|
||||
string sInfo = m_pMchMgr->GetOutstrokeInfo() ;
|
||||
if ( sInfo.empty())
|
||||
m_pMchMgr->SetLastError( 2804, "Error in FiveAxisMilling : axes values not calculable") ;
|
||||
m_pMchMgr->SetLastError( 3304, "Error in FiveAxisMilling : axes values not calculable") ;
|
||||
else
|
||||
m_pMchMgr->SetLastError( 2805, "Error in FiveAxisMilling : outstroke ") ;
|
||||
m_pMchMgr->SetLastError( 3305, "Error in FiveAxisMilling : outstroke ") ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -711,9 +711,9 @@ FiveAxisMilling::Update( bool bPostApply)
|
||||
if ( ! AdjustStartEndMovements( bVpl)) {
|
||||
string sInfo = m_pMchMgr->GetOutstrokeInfo() ;
|
||||
if ( sInfo.empty())
|
||||
m_pMchMgr->SetLastError( 2806, "Error in FiveAxisMilling : link movements not calculable") ;
|
||||
m_pMchMgr->SetLastError( 3306, "Error in FiveAxisMilling : link movements not calculable") ;
|
||||
else
|
||||
m_pMchMgr->SetLastError( 2807, "Error in FiveAxisMilling : link outstroke ") ;
|
||||
m_pMchMgr->SetLastError( 3307, "Error in FiveAxisMilling : link outstroke ") ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -724,9 +724,9 @@ FiveAxisMilling::Update( bool bPostApply)
|
||||
string sErr ;
|
||||
if ( bPostApply && ! PostApply( sErr)) {
|
||||
if ( ! IsEmptyOrSpaces( sErr))
|
||||
m_pMchMgr->SetLastError( 2808, sErr) ;
|
||||
m_pMchMgr->SetLastError( 3308, sErr) ;
|
||||
else
|
||||
m_pMchMgr->SetLastError( 2808, "Error in FiveAxisMilling : post apply not calculable") ;
|
||||
m_pMchMgr->SetLastError( 3308, "Error in FiveAxisMilling : post apply not calculable") ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -887,13 +887,13 @@ FiveAxisMilling::UpdateToolData( bool* pbChanged)
|
||||
if ( ! EqualNoCase( m_Params.m_sToolName, m_TParams.m_sName)) {
|
||||
string sInfo = "Warning in FiveAxisMilling : tool name changed (" +
|
||||
m_Params.m_sToolName + "->" + m_TParams.m_sName + ")" ;
|
||||
m_pMchMgr->SetWarning( 2853, sInfo) ;
|
||||
m_pMchMgr->SetWarning( 3353, sInfo) ;
|
||||
m_Params.m_sToolName = m_TParams.m_sName ;
|
||||
}
|
||||
if ( bChanged) {
|
||||
string sInfo = "Warning in FiveAxisMilling : tool data changed (" +
|
||||
m_Params.m_sToolName + ")" ;
|
||||
m_pMchMgr->SetWarning( 2854, sInfo) ;
|
||||
m_pMchMgr->SetWarning( 3354, sInfo) ;
|
||||
}
|
||||
// se definito parametro di ritorno, lo assegno
|
||||
if ( pbChanged != nullptr)
|
||||
|
||||
Reference in New Issue
Block a user