EgtExecutor 1.6f4 :

- ApproxCurve con nuove opzioni
- aggiunta funzione ExeSetMachiningParam.
This commit is contained in:
Dario Sassi
2015-06-30 14:00:47 +00:00
parent ff53dcb8e3
commit 57d69257f1
5 changed files with 84 additions and 2 deletions
+40
View File
@@ -15,6 +15,7 @@
#include "stdafx.h"
#include "LUA.h"
#include "/EgtDev/Include/EXeExecutor.h"
#include "/EgtDev/Include/EMkMachiningConst.h"
#include "/EgtDev/Include/EGkGdbConst.h"
#include "/EgtDev/Include/EGkLuaAux.h"
@@ -791,6 +792,44 @@ LuaAddMachining( lua_State* L)
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaSetMachiningParam( lua_State* L)
{
// 2 parametri : nType, xVal
int nType ;
LuaCheckParam( L, 1, nType)
bool bOk = false ;
if ( ( nType & MPA_BOOL) != 0) {
bool bVal ;
LuaCheckParam( L, 2, bVal)
// imposto il parametro alla lavorazione corrente
bOk = ExeSetMachiningParam( nType, bVal) ;
}
else if ( ( nType & MPA_INT) != 0) {
int nVal ;
LuaCheckParam( L, 2, nVal)
// imposto il parametro alla lavorazione corrente
bOk = ExeSetMachiningParam( nType, nVal) ;
}
else if ( ( nType & MPA_DOU) != 0) {
double dVal ;
LuaCheckParam( L, 2, dVal)
// imposto il parametro alla lavorazione corrente
bOk = ExeSetMachiningParam( nType, dVal) ;
}
else if ( ( nType & MPA_STR) != 0) {
string sVal ;
LuaCheckParam( L, 2, sVal)
// imposto il parametro alla lavorazione corrente
bOk = ExeSetMachiningParam( nType, sVal) ;
}
LuaClearStack( L) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaSetMachiningGeometry( lua_State* L)
@@ -866,6 +905,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtGetCalcPositions", LuaGetCalcPositions) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtVerifyOutOfStroke", LuaVerifyOutOfStroke) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtAddMachining", LuaAddMachining) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSetMachiningParam", LuaSetMachiningParam) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSetMachiningGeometry", LuaSetMachiningGeometry) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtApplyMachining", LuaApplyMachining) ;