EgtExecutor :
- aggiunte EXE/LUA RemoveAllOperations.
This commit is contained in:
+42
-31
@@ -854,6 +854,47 @@ ExeTdbSave( void)
|
||||
return pGseCtx->m_pMachMgr->TdbSave() ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Operazioni
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
ExeGetFirstOperation( void)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// recupero la prima operazione della macchinata corrente
|
||||
return pGseCtx->m_pMachMgr->GetFirstOperation() ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
ExeGetNextOperation( int nId)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// recupero la successiva operazione della macchinata corrente
|
||||
return pGseCtx->m_pMachMgr->GetNextOperation( nId) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
ExeGetOperationType( int nId)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// recupero il tipo di operazione della macchinata corrente
|
||||
return pGseCtx->m_pMachMgr->GetOperationType( nId) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeRemoveAllOperations( void)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// elimino tutte le operazioni della macchinata corrente tranne il primo posizionamento
|
||||
return pGseCtx->m_pMachMgr->RemoveAllOperations( true) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Lavorazioni
|
||||
@@ -924,37 +965,7 @@ ExeApplyMachining( void)
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// imposto la geometria alla lavorazione corrente
|
||||
return pGseCtx->m_pMachMgr->Apply() ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
ExeGetFirstOperation( void)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// recupero la prima operazione della macchinata corrente
|
||||
return pGseCtx->m_pMachMgr->GetFirstOperation() ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
ExeGetNextOperation( int nId)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// recupero la successiva operazione della macchinata corrente
|
||||
return pGseCtx->m_pMachMgr->GetNextOperation( nId) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
ExeGetOperationType( int nId)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// recupero il tipo di operazione della macchinata corrente
|
||||
return pGseCtx->m_pMachMgr->GetOperationType( nId) ;
|
||||
return pGseCtx->m_pMachMgr->MachiningApply() ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
+17
-3
@@ -1159,6 +1159,19 @@ LuaGetOperationType( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaRemoveAllOperations( lua_State* L)
|
||||
{
|
||||
// nessun parametro
|
||||
LuaClearStack( L) ;
|
||||
// elimino tutte le operazioni della macchinata corrente
|
||||
bool bOk = ExeRemoveAllOperations() ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaSimStart( lua_State* L)
|
||||
@@ -1288,13 +1301,14 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtTdbGetToolParam", LuaTdbGetToolParam) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtTdbSave", LuaTdbSave) ;
|
||||
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetFirstOperation", LuaGetFirstOperation) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetNextOperation", LuaGetNextOperation) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetOperationType", LuaGetOperationType) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtRemoveAllOperations", LuaRemoveAllOperations) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAddMachining", LuaAddMachining) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetMachiningParam", LuaSetMachiningParam) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetMachiningGeometry", LuaSetMachiningGeometry) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtApplyMachining", LuaApplyMachining) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetFirstOperation", LuaGetFirstOperation) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetNextOperation", LuaGetNextOperation) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetOperationType", LuaGetOperationType) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSimStart", LuaSimStart) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSimMove", LuaSimMove) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSimHome", LuaSimHome) ;
|
||||
|
||||
Reference in New Issue
Block a user