EgtMachKernel :

- aggiunte RemoveOperation e RemoveAllOperations.
This commit is contained in:
Dario Sassi
2015-10-28 12:07:22 +00:00
parent 2c89d112fa
commit a4525dd059
4 changed files with 45 additions and 14 deletions
+29 -1
View File
@@ -195,6 +195,34 @@ MachMgr::GetOperationId( const string& sName) const
return GDB_ID_NULL ;
}
//----------------------------------------------------------------------------
bool
MachMgr::RemoveOperation( int nId)
{
// verifico sia una Operazione
if ( GetOperationType( nId) == OPER_NULL)
return false ;
// eseguo la rimozione
m_pGeomDB->Erase( nId) ;
return true ;
}
//----------------------------------------------------------------------------
bool
MachMgr::RemoveAllOperations( bool bExceptFirstDisp)
{
// indice terminazione ciclo
int nStopId = ( bExceptFirstDisp ? GetFirstOperation() : GDB_ID_NULL) ;
// rimuovo tutte le operazioni a partire dalla fine
int nOperId = GetLastOperation() ;
while ( nOperId != nStopId) {
RemoveOperation( nOperId) ;
nOperId = GetLastOperation() ;
}
return true ;
}
//----------------------------------------------------------------------------
// Dispositions
//----------------------------------------------------------------------------
@@ -401,7 +429,7 @@ MachMgr::SetMachiningGeometry( const SELVECTOR& vIds)
//----------------------------------------------------------------------------
bool
MachMgr::Apply( void)
MachMgr::MachiningApply( void)
{
// recupero la lavorazione corrente
int nCurrMchId = GetCurrMachining() ;