EgtExecutor 1.8b7 :
- aggiunta funzione Exe e Lua GetRotAxisBlocked.
This commit is contained in:
@@ -2310,6 +2310,16 @@ ExeSetRotAxisBlock( const string& sAxis, double dVal)
|
||||
return pMachMgr->SetRotAxisBlock( sAxis, dVal) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetRotAxisBlocked( int nInd, string& sAxis, double& dVal)
|
||||
{
|
||||
IMachMgr* pMachMgr = GetCurrMachMgr() ;
|
||||
VERIFY_MACHMGR( pMachMgr, false)
|
||||
// recupero dati bloccaggio asse in posizione nInd (0-based)
|
||||
return pMachMgr->GetRotAxisBlocked( nInd, sAxis, dVal) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetCalcTool( string& sTool)
|
||||
|
||||
Binary file not shown.
@@ -2605,6 +2605,30 @@ LuaSetRotAxisBlock( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetRotAxisBlocked( lua_State* L)
|
||||
{
|
||||
// 1 parametro : nInd ( 0-based)
|
||||
int nInd ;
|
||||
LuaCheckParam( L, 1, nInd)
|
||||
LuaClearStack( L) ;
|
||||
// recupero dati bloccaggio asse in posizione nInd
|
||||
string sAxis ;
|
||||
double dVal ;
|
||||
bool bOk = ExeGetRotAxisBlocked( nInd, sAxis, dVal) ;
|
||||
// restituisco il risultato
|
||||
if ( bOk) {
|
||||
LuaSetParam( L, sAxis) ;
|
||||
LuaSetParam( L, dVal) ;
|
||||
}
|
||||
else {
|
||||
LuaSetParam( L) ;
|
||||
LuaSetParam( L) ;
|
||||
}
|
||||
return 2 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetCalcTool( lua_State* L)
|
||||
@@ -3200,6 +3224,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetCalcTable", LuaSetCalcTable) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetCalcTool", LuaSetCalcTool) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetRotAxisBlock", LuaSetRotAxisBlock) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetRotAxisBlocked", LuaGetRotAxisBlocked) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetCalcTool", LuaGetCalcTool) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetCalcAngles", LuaGetCalcAngles) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetCalcPositions", LuaGetCalcPositions) ;
|
||||
|
||||
Reference in New Issue
Block a user