EgtExecutor 2.1j4 :

- aggiunte funzioni Exe e Lua GetClEntMove, GetClEntFlag, GetClEntindex.
This commit is contained in:
Dario Sassi
2019-10-16 06:35:55 +00:00
parent 3cd59132dd
commit 26a7dfef8b
3 changed files with 97 additions and 2 deletions
+34 -2
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2015
// EgalTech 2015-2019
//----------------------------------------------------------------------------
// File : EXE_MachMgr.cpp Data : 05.05.15 Versione : 1.6e1
// File : EXE_MachMgr.cpp Data : 15.10.19 Versione : 2.1j4
// Contenuto : Funzioni Machining Manager per EXE.
//
//
@@ -2573,6 +2573,38 @@ ExeUpdateAllMachinings( bool bStopOnFirstErr, string& sErrList)
return bOk ;
}
//-----------------------------------------------------------------------------
// CL Entities Interrogations
//-----------------------------------------------------------------------------
bool
ExeGetClEntMove( int nEntId, int& nMove)
{
IMachMgr* pMachMgr = GetCurrMachMgr() ;
VERIFY_MACHMGR( pMachMgr, false)
// recupero il tipo di movimento
return pMachMgr->GetClEntMove( nEntId, nMove) ;
}
//-----------------------------------------------------------------------------
bool
ExeGetClEntFlag( int nEntId, int& nFlag)
{
IMachMgr* pMachMgr = GetCurrMachMgr() ;
VERIFY_MACHMGR( pMachMgr, false)
// recupero il flag
return pMachMgr->GetClEntFlag( nEntId, nFlag) ;
}
//-----------------------------------------------------------------------------
bool
ExeGetClEntIndex( int nEntId, int& nIndex)
{
IMachMgr* pMachMgr = GetCurrMachMgr() ;
VERIFY_MACHMGR( pMachMgr, false)
// recupero l'indice
return pMachMgr->GetClEntIndex( nEntId, nIndex) ;
}
//-----------------------------------------------------------------------------
// Simulazione
//-----------------------------------------------------------------------------
BIN
View File
Binary file not shown.
+63
View File
@@ -2697,6 +2697,65 @@ LuaUpdateAllMachinings( lua_State* L)
return 2 ;
}
//-----------------------------------------------------------------------------
// CL Entities Interrogations
//-----------------------------------------------------------------------------
static int
LuaGetClEntMove( lua_State* L)
{
// 1 parametro : nEntId
int nEntId ;
LuaGetParam( L, 1, nEntId) ;
LuaClearStack( L) ;
// recupero il tipo di movimento
int nMove ;
bool bOk = ExeGetClEntMove( nEntId, nMove) ;
// restituisco il risultato
if ( bOk)
LuaSetParam( L, nMove) ;
else
LuaSetParam( L) ;
return 1 ;
}
//-----------------------------------------------------------------------------
static int
LuaGetClEntFlag( lua_State* L)
{
// 1 parametro : nEntId
int nEntId ;
LuaGetParam( L, 1, nEntId) ;
LuaClearStack( L) ;
// recupero il flag
int nFlag ;
bool bOk = ExeGetClEntFlag( nEntId, nFlag) ;
// restituisco il risultato
if ( bOk)
LuaSetParam( L, nFlag) ;
else
LuaSetParam( L) ;
return 1 ;
}
//-----------------------------------------------------------------------------
static int
LuaGetClEntIndex( lua_State* L)
{
// 1 parametro : nEntId
int nEntId ;
LuaGetParam( L, 1, nEntId) ;
LuaClearStack( L) ;
// recupero l'indice
int nIndex ;
bool bOk = ExeGetClEntIndex( nEntId, nIndex) ;
// restituisco il risultato
if ( bOk)
LuaSetParam( L, nIndex) ;
else
LuaSetParam( L) ;
return 1 ;
}
//-------------------------------------------------------------------------------
// Simulation
//-------------------------------------------------------------------------------
@@ -3715,6 +3774,10 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtGetMachiningEndPoint", LuaGetMachiningEndPoint) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtApplyAllMachinings", LuaApplyAllMachinings) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtUpdateAllMachinings", LuaUpdateAllMachinings) ;
// CL Entities Interrogations
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntMove", LuaGetClEntMove) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntFlag", LuaGetClEntFlag) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntIndex", LuaGetClEntIndex) ;
// Simulation
bOk = bOk && luaMgr.RegisterFunction( "EgtSimInit", LuaSimInit) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSimStart", LuaSimStart) ;