EgtMachKernel :

- corretta gestione approccio/retrazione frese notip da sotto con testa da sopra e viceversa
- prima versione della nuova gestione dei collegamenti tra lavorazioni e con cambio utensile.
This commit is contained in:
Dario Sassi
2024-12-10 17:31:46 +01:00
parent d0b78e5825
commit 646f5cf02f
9 changed files with 379 additions and 96 deletions
+4 -2
View File
@@ -48,6 +48,7 @@ static const string EVAR_R1 = ".R1" ; // (num) valore del pri
static const string EVAR_R2 = ".R2" ; // (num) valore del secondo asse rotante
static const string EVAR_R3 = ".R3" ; // (num) valore del terzo asse rotante
static const string EVAR_R4 = ".R4" ; // (num) valore del quarto asse rotante
static const string EVAR_ISLINK = ".ISLINK" ; // (bool) flag per indicare controllo posizioni in un link
static const string EVAR_ERROR = ".ERR" ; // OUT (int) codice di errore ( 0 = ok)
static const string EVAR_STAT = ".STAT" ; // OUT (int) codice di stato ( 0 = ok)
static const string EVAR_AUXINFO = ".AUXINFO" ; // OUT (string) stringa con info ausiliarie
@@ -1718,7 +1719,7 @@ Machine::VerifyOutstroke( double dX, double dY, double dZ, const DBLVECTOR& vAng
}
// verifica delle aree protette
if ( nStat == 0)
return const_cast<Machine*>( this)->VerifyProtectedAreas( dX, dY, dZ, vAng, nStat) ;
return const_cast<Machine*>( this)->VerifyProtectedAreas( dX, dY, dZ, vAng, false, nStat) ;
return true ;
}
@@ -1732,7 +1733,7 @@ Machine::VerifyOutstroke( double dX, double dY, double dZ, const DBLVECTOR& vAng
//----------------------------------------------------------------------------
bool
Machine::VerifyProtectedAreas( double dX, double dY, double dZ, const DBLVECTOR& vAng, int& nStat)
Machine::VerifyProtectedAreas( double dX, double dY, double dZ, const DBLVECTOR& vAng, bool bIsLink, int& nStat)
{
// se non esiste funzione gestione aree protette, non devo fare alcunchè
if ( ! LuaExistsFunction( ON_VERIFY_PROTECTEDAREAS))
@@ -1756,6 +1757,7 @@ Machine::VerifyProtectedAreas( double dX, double dY, double dZ, const DBLVECTOR&
bOk = bOk && LuaSetGlobVar( EMC_VAR + EVAR_R3, vAng[2]) ;
if ( vAng.size() >= 4)
bOk = bOk && LuaSetGlobVar( EMC_VAR + EVAR_R4, vAng[3]) ;
bOk = bOk && LuaSetGlobVar( EMC_VAR + EVAR_ISLINK, bIsLink) ;
// chiamo funzione
bOk = bOk && LuaCallFunction( ON_VERIFY_PROTECTEDAREAS) ;
// recupero il risultato