EgtExecutor 2.5j6 :
- aggiunte funzioni Exe/Lua GetClEntAxesVal e GetAllCurrAxesName - modificate funzioni Exe/Lua FindToolInCurrSetup e GetClEntFlag.
This commit is contained in:
+33
-3
@@ -1585,6 +1585,16 @@ ExeFindToolInCurrSetup( const string& sTool)
|
||||
return pMachMgr->FindToolInCurrSetup( sTool) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetToolSetupPosInCurrSetup( const string& sTool, string& sTcPos)
|
||||
{
|
||||
IMachMgr* pMachMgr = GetCurrMachMgr() ;
|
||||
VERIFY_MACHMGR( pMachMgr, false)
|
||||
// eseguo la verifica
|
||||
return pMachMgr->GetToolSetupPosInCurrSetup( sTool, sTcPos) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetToolsInCurrSetupPos( const string& sTcPos, STRVECTOR& vsTools)
|
||||
@@ -2866,12 +2876,12 @@ ExeGetClEntMove( int nEntId, int& nMove)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetClEntFlag( int nEntId, int& nFlag)
|
||||
ExeGetClEntFlag( int nEntId, int& nFlag, int& nFlag2)
|
||||
{
|
||||
IMachMgr* pMachMgr = GetCurrMachMgr() ;
|
||||
VERIFY_MACHMGR( pMachMgr, false)
|
||||
// recupero il flag
|
||||
return pMachMgr->GetClEntFlag( nEntId, nFlag) ;
|
||||
// recupero i flag
|
||||
return pMachMgr->GetClEntFlag( nEntId, nFlag, nFlag2) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -2884,6 +2894,16 @@ ExeGetClEntIndex( int nEntId, int& nIndex)
|
||||
return pMachMgr->GetClEntIndex( nEntId, nIndex) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetClEntAxesVal( int nEntId, DBLVECTOR& vAxes)
|
||||
{
|
||||
IMachMgr* pMachMgr = GetCurrMachMgr() ;
|
||||
VERIFY_MACHMGR( pMachMgr, false)
|
||||
// recupero il valore degli assi
|
||||
return pMachMgr->GetClEntAxesVal( nEntId, vAxes) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Simulazione
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -3162,6 +3182,16 @@ ExeSetCalcTool( const string& sTool, const string& sHead, int nExit)
|
||||
return pMachMgr->SetCalcTool( sTool, sHead, nExit) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeGetAllCurrAxesName( STRVECTOR& vAxName)
|
||||
{
|
||||
IMachMgr* pMachMgr = GetCurrMachMgr() ;
|
||||
VERIFY_MACHMGR( pMachMgr, false)
|
||||
// recupero gli assi correnti derivanti dalla scelta di tavola e utensile
|
||||
return pMachMgr->GetAllCurrAxesName( vAxName) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeSetRotAxisBlock( const string& sAxis, double dVal)
|
||||
|
||||
Binary file not shown.
+52
-8
@@ -1734,10 +1734,12 @@ LuaFindToolInCurrSetup( lua_State* L)
|
||||
string sTool ;
|
||||
LuaGetParam( L, 1, sTool) ;
|
||||
LuaClearStack( L) ;
|
||||
// verifico l'attrezzaggio della macchinata corrente
|
||||
bool bOk = ExeFindToolInCurrSetup( sTool) ;
|
||||
// verifico attrezzaggio utensile e ne recupero l'eventuale posizione
|
||||
string sTcPos ;
|
||||
bool bOk = ExeGetToolSetupPosInCurrSetup( sTool, sTcPos) ;
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
LuaSetParam( L, sTcPos) ;
|
||||
return 2 ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -2977,14 +2979,18 @@ LuaGetClEntFlag( lua_State* L)
|
||||
LuaGetParam( L, 1, nEntId) ;
|
||||
LuaClearStack( L) ;
|
||||
// recupero il flag
|
||||
int nFlag ;
|
||||
bool bOk = ExeGetClEntFlag( nEntId, nFlag) ;
|
||||
int nFlag, nFlag2 ;
|
||||
bool bOk = ExeGetClEntFlag( nEntId, nFlag, nFlag2) ;
|
||||
// restituisco il risultato
|
||||
if ( bOk)
|
||||
if ( bOk) {
|
||||
LuaSetParam( L, nFlag) ;
|
||||
else
|
||||
LuaSetParam( L, nFlag2) ;
|
||||
}
|
||||
else {
|
||||
LuaSetParam( L) ;
|
||||
return 1 ;
|
||||
LuaSetParam( L) ;
|
||||
}
|
||||
return 2 ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -3006,6 +3012,25 @@ LuaGetClEntIndex( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetClEntAxesVal( lua_State* L)
|
||||
{
|
||||
// 1 parametro : nEntId
|
||||
int nEntId ;
|
||||
LuaGetParam( L, 1, nEntId) ;
|
||||
LuaClearStack( L) ;
|
||||
// recupero il valore degli assi
|
||||
DBLVECTOR vAxes ;
|
||||
bool bOk = ExeGetClEntAxesVal( nEntId, vAxes) ;
|
||||
// restituisco il risultato
|
||||
if ( bOk)
|
||||
LuaSetParam( L, vAxes) ;
|
||||
else
|
||||
LuaSetParam( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
// Simulation
|
||||
//-------------------------------------------------------------------------------
|
||||
@@ -3292,6 +3317,23 @@ LuaSetCalcTool( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetAllCurrAxesName( lua_State* L)
|
||||
{
|
||||
// nessun parametro
|
||||
LuaClearStack( L) ;
|
||||
// imposto l'utensile corrente per il calcolo
|
||||
STRVECTOR vAxName ;
|
||||
bool bOk = ExeGetAllCurrAxesName( vAxName) ;
|
||||
// restituisco il risultato
|
||||
if ( bOk)
|
||||
LuaSetParam( L, vAxName) ;
|
||||
else
|
||||
LuaSetParam( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaSetRotAxisBlock( lua_State* L)
|
||||
@@ -4161,6 +4203,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntMove", LuaGetClEntMove) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntFlag", LuaGetClEntFlag) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntIndex", LuaGetClEntIndex) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetClEntAxesVal", LuaGetClEntAxesVal) ;
|
||||
// Simulation
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSimInit", LuaSimInit) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSimStart", LuaSimStart) ;
|
||||
@@ -4194,6 +4237,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
|
||||
// Machine Calc
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetCalcTable", LuaSetCalcTable) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetCalcTool", LuaSetCalcTool) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetAllCurrAxesName", LuaGetAllCurrAxesName) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSetRotAxisBlock", LuaSetRotAxisBlock) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetRotAxisBlocked", LuaGetRotAxisBlocked) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetCalcTool", LuaGetCalcTool) ;
|
||||
|
||||
Reference in New Issue
Block a user