EgtMachKernel 1.8c7 :

- modifiche per gestione unificata dell'attrezzaggio
- caricamento degli utensili di tutte le uscite di una testa al caricamento di un utensile qualunque della stessa.
This commit is contained in:
Dario Sassi
2017-04-01 08:53:52 +00:00
parent c8c07b7d7e
commit d10c193039
13 changed files with 127 additions and 41 deletions
+10 -12
View File
@@ -63,16 +63,12 @@ MachMgr::ImportSetup( const string& sName)
sFileName += sDefault + "." + SETUP_EXT ;
}
// gestione attrezzaggio
SetupMgr stuMgr ;
stuMgr.Init( this) ;
// importo l'attrezzaggio
if ( ! stuMgr.Import( sFileName))
if ( ! m_stuMgr.Import( sFileName))
return false ;
// lo inserisco nel progetto
return stuMgr.Save() ;
return m_stuMgr.Save() ;
}
//----------------------------------------------------------------------------
@@ -82,11 +78,6 @@ MachMgr::VerifyCurrSetup( STRVECTOR& vsErrors)
// pulizia vettore degli utensili mancanti
vsErrors.clear() ;
// recupero attrezzaggio corrente
SetupMgr stuMgr ;
if ( ! stuMgr.Init( this) || ! stuMgr.Load())
return false ;
// ciclo sulle lavorazioni della macchinata corrente per ricavare gli utensili utilizzati
int nOpId = GetFirstActiveOperation() ;
while ( nOpId != GDB_ID_NULL) {
@@ -108,7 +99,7 @@ MachMgr::VerifyCurrSetup( STRVECTOR& vsErrors)
vsErrors.push_back( sErr) ;
}
// Se utensile non attrezzato
if ( ! stuMgr.FindTool( sTool)) {
if ( ! m_stuMgr.FindTool( sTool)) {
// se non presente nella lista dei non attrezzati, lo aggiungo
if ( find( vsErrors.begin(), vsErrors.end(), sTool) == vsErrors.end())
vsErrors.push_back( sTool) ;
@@ -120,3 +111,10 @@ MachMgr::VerifyCurrSetup( STRVECTOR& vsErrors)
return vsErrors.empty() ;
}
//----------------------------------------------------------------------------
bool
MachMgr::UpdateSetup( void)
{
return m_stuMgr.Load() ;
}