EgtExecutor 1.6l9 :
- modifiche varie - aggiunta funzione EXE e LUA GetOutstrokeInfo - rinominata funzione EXE e LUA VerifyOutOfStroke in VerifyOutStroke.
This commit is contained in:
+39
-8
@@ -1093,22 +1093,32 @@ ExeRemoveAllOperations( void)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeSetOperationMode( int nId, bool bShow)
|
||||
ExeSetOperationMode( int nId, bool bActive)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// imposto lo stato di visualizzazione dell'operazione
|
||||
return pGseCtx->m_pMachMgr->SetOperationMode( nId, bShow) ;
|
||||
// imposto lo stato dell'operazione
|
||||
return pGseCtx->m_pMachMgr->SetOperationMode( nId, bActive) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeSetAllOperationsMode( bool bShow)
|
||||
ExeGetOperationMode( int nId, bool& bActive)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// imposto lo stato di visualizzazione di tutte le operazioni
|
||||
return pGseCtx->m_pMachMgr->SetAllOperationsMode( true, bShow) ;
|
||||
// recupero lo stato dell'operazione
|
||||
return pGseCtx->m_pMachMgr->GetOperationMode( nId, bActive) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeSetAllOperationsMode( bool bActive)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// imposto lo stato di tutte le operazioni
|
||||
return pGseCtx->m_pMachMgr->SetAllOperationsMode( true, bActive) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -1121,6 +1131,16 @@ ExeSetOperationStatus( int nId, bool bShow)
|
||||
return pGseCtx->m_pMachMgr->SetOperationStatus( nId, bShow) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetOperationStatus( int nId, bool& bShow)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// recupero lo stato di visualizzazione dell'operazione
|
||||
return pGseCtx->m_pMachMgr->GetOperationStatus( nId, bShow) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeSetAllOperationsStatus( bool bShow)
|
||||
@@ -1443,12 +1463,23 @@ ExeGetCalcToolDirFromAngles( double dAngA, double dAngB, Vector3d& vtDir)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeVerifyOutOfStroke( double dX, double dY, double dZ, double dAngA, double dAngB, int& nStat)
|
||||
ExeVerifyOutstroke( double dX, double dY, double dZ, double dAngA, double dAngB, int& nStat)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// verifica l'extracorsa degli assi
|
||||
return pGseCtx->m_pMachMgr->VerifyOutOfStroke( dX, dY, dZ, dAngA, dAngB, nStat) ;
|
||||
return pGseCtx->m_pMachMgr->VerifyOutstroke( dX, dY, dZ, dAngA, dAngB, nStat) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetOutstrokeInfo( string& sInfo)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// recupero informazioni su extracorsa degli assi
|
||||
sInfo = pGseCtx->m_pMachMgr->GetOutstrokeInfo() ;
|
||||
return ( ! sInfo.empty()) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Binary file not shown.
+20
-3
@@ -1791,7 +1791,7 @@ LuaGetCalcTipFromPositions( lua_State* L)
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaVerifyOutOfStroke( lua_State* L)
|
||||
LuaVerifyOutstroke( lua_State* L)
|
||||
{
|
||||
// 5 parametri : dX, dY, dZ, dAngA, dAngB
|
||||
double dX ;
|
||||
@@ -1807,7 +1807,7 @@ LuaVerifyOutOfStroke( lua_State* L)
|
||||
LuaClearStack( L) ;
|
||||
// imposto la tavola corrente per il calcolo
|
||||
int nStat ;
|
||||
bool bOk = ExeVerifyOutOfStroke( dX, dY, dZ, dAngA, dAngB, nStat) ;
|
||||
bool bOk = ExeVerifyOutstroke( dX, dY, dZ, dAngA, dAngB, nStat) ;
|
||||
// restituisco il risultato
|
||||
if ( bOk) {
|
||||
LuaSetParam( L, bOk) ;
|
||||
@@ -1820,6 +1820,22 @@ LuaVerifyOutOfStroke( lua_State* L)
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetOutstrokeInfo( lua_State* L)
|
||||
{
|
||||
// nessun parametro
|
||||
LuaClearStack( L) ;
|
||||
// recupero le info sull'ultima extracorsa
|
||||
string sInfo ;
|
||||
bool bOk = ExeGetOutstrokeInfo( sInfo) ;
|
||||
if ( bOk)
|
||||
LuaSetParam( L, sInfo) ;
|
||||
else
|
||||
LuaSetParam( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
// Machine Move
|
||||
//-------------------------------------------------------------------------------
|
||||
@@ -2035,7 +2051,8 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetCalcAngles", LuaGetCalcAngles) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetCalcPositions", LuaGetCalcPositions) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetCalcTipFromPositions", LuaGetCalcTipFromPositions) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtVerifyOutOfStroke", LuaVerifyOutOfStroke) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtVerifyOutstroke", LuaVerifyOutstroke) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetOutstrokeInfo", LuaGetOutstrokeInfo) ;
|
||||
// Machine Move
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetAxisPos", LuaSetAxisPos) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetAxisPos", LuaGetAxisPos) ;
|
||||
|
||||
Reference in New Issue
Block a user