Merge branch 'master' of https://gitlab.steamware.net/egaltech/EgtExecutor
This commit is contained in:
@@ -3140,6 +3140,36 @@ ExeGetClEntAxesVal( int nEntId, DBLVECTOR& vAxes)
|
||||
return pMachMgr->GetClEntAxesVal( nEntId, vAxes) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetClEntTDir( int nEntId, Vector3d& vTDir)
|
||||
{
|
||||
IMachMgr* pMachMgr = GetCurrMachMgr() ;
|
||||
VERIFY_MACHMGR( pMachMgr, false) ;
|
||||
// recupero vTDir
|
||||
return pMachMgr->GetClEntTDir( nEntId, vTDir) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetClEntCDir( int nEntId, Vector3d& vtCDir)
|
||||
{
|
||||
IMachMgr* pMachMgr = GetCurrMachMgr() ;
|
||||
VERIFY_MACHMGR( pMachMgr, false) ;
|
||||
// recupero CDir
|
||||
return pMachMgr->GetClEntCDir( nEntId, vtCDir) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetClEntADir( int nEntId, Vector3d& vADir)
|
||||
{
|
||||
IMachMgr* pMachMgr = GetCurrMachMgr() ;
|
||||
VERIFY_MACHMGR( pMachMgr, false) ;
|
||||
// recupero ADir
|
||||
return pMachMgr->GetClEntADir( nEntId, vADir) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Simulazione
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Binary file not shown.
+64
-7
@@ -1462,7 +1462,7 @@ LuaTdbIsCurrToolModified( lua_State* L)
|
||||
{
|
||||
// nessun parametro
|
||||
LuaClearStack( L) ;
|
||||
// verifico se l'utensile corrente è stato modificato
|
||||
// verifico se l'utensile corrente � stato modificato
|
||||
bool bOk = ExeTdbIsCurrToolModified() ;
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
@@ -2037,7 +2037,7 @@ LuaMdbIsCurrMachiningModified( lua_State* L)
|
||||
{
|
||||
// nessun parametro
|
||||
LuaClearStack( L) ;
|
||||
// verifico se la lavorazione corrente è stata modificata
|
||||
// verifico se la lavorazione corrente � stata modificata
|
||||
bool bOk = ExeMdbIsCurrMachiningModified() ;
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
@@ -3309,6 +3309,60 @@ LuaGetClEntAxesVal( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetClEntTDir( lua_State* L)
|
||||
{
|
||||
// 1 parametro : nEntId
|
||||
int nEntId ;
|
||||
LuaGetParam( L, 1, nEntId) ;
|
||||
LuaClearStack( L) ;
|
||||
// recupero vTDir
|
||||
Vector3d vTDir ;
|
||||
bool bOk = ExeGetClEntTDir( nEntId, vTDir) ;
|
||||
if ( bOk)
|
||||
LuaSetParam( L, vTDir) ;
|
||||
else
|
||||
LuaSetParam( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetClEntCDir( lua_State* L)
|
||||
{
|
||||
// 1 parametro : nEntId
|
||||
int nEntId ;
|
||||
LuaGetParam( L, 1, nEntId) ;
|
||||
LuaClearStack( L) ;
|
||||
// recupero vCDir
|
||||
Vector3d vCDir ;
|
||||
bool bOk = ExeGetClEntCDir( nEntId, vCDir) ;
|
||||
if ( bOk)
|
||||
LuaSetParam( L, vCDir) ;
|
||||
else
|
||||
LuaSetParam( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetClEntADir( lua_State* L)
|
||||
{
|
||||
// 1 parametro : nEntId
|
||||
int nEntId ;
|
||||
LuaGetParam( L, 1, nEntId) ;
|
||||
LuaClearStack( L) ;
|
||||
// recupero vADir
|
||||
Vector3d vADir ;
|
||||
bool bOk = ExeGetClEntADir( nEntId, vADir) ;
|
||||
if ( bOk)
|
||||
LuaSetParam( L, vADir) ;
|
||||
else
|
||||
LuaSetParam( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
// Simulation
|
||||
//-------------------------------------------------------------------------------
|
||||
@@ -3492,7 +3546,7 @@ LuaSimGetMoveInfo( lua_State* L)
|
||||
{
|
||||
// nessun parametro
|
||||
LuaClearStack( L) ;
|
||||
// recupero tipo e veolcità del movimento corrente
|
||||
// recupero tipo e veolcit� del movimento corrente
|
||||
int nGmove ;
|
||||
double dFeed ;
|
||||
bool bOk = ExeSimGetMoveInfo( nGmove, dFeed) ;
|
||||
@@ -3800,7 +3854,7 @@ LuaGetCalcPositions( lua_State* L)
|
||||
// restituisco il risultato
|
||||
if ( bOk) {
|
||||
LuaSetParam( L, bOk) ;
|
||||
LuaSetParam( L, 0) ; // assegnato per compatibilità
|
||||
LuaSetParam( L, 0) ; // assegnato per compatibilit�
|
||||
LuaSetParam( L, dX) ;
|
||||
LuaSetParam( L, dY) ;
|
||||
LuaSetParam( L, dZ) ;
|
||||
@@ -4647,11 +4701,14 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
|
||||
// CL Entities Interrogations
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntMove", LuaGetClEntMove) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntFlag", LuaGetClEntFlag) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntIndex", LuaGetClEntIndex) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntFeed", LuaGetClEntFeed) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntIndex", LuaGetClEntIndex) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntFeed", LuaGetClEntFeed) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntAxesStatus", LuaGetClEntAxesStatus) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntAxesMask", LuaGetClEntAxesMask) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntAxesVal", LuaGetClEntAxesVal) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntAxesVal", LuaGetClEntAxesVal) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntTDir", LuaGetClEntTDir) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntCDir", LuaGetClEntCDir) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntADir", LuaGetClEntADir) ;
|
||||
// Simulation
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSimInit", LuaSimInit) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSimStart", LuaSimStart) ;
|
||||
|
||||
Reference in New Issue
Block a user