EgtExecutor 1.6g3 :

- correzione controlli in ExeCreateGeoFrame
- ExeInitGeomDB rinominata ExeInitContext
- aggiunta ExeDeleteContext
- migliorato log di ExeExit
- aggiunta possibilità di leggere e scrivere variabili LUA_Base.cpp
- aggiunta possibilità di chiamare funzioni Lua.
This commit is contained in:
Dario Sassi
2015-07-14 15:48:55 +00:00
parent d070901ce0
commit c5fdfea88c
27 changed files with 673 additions and 524 deletions
+74 -74
View File
@@ -30,7 +30,7 @@ LuaGetMachGroupNbr( lua_State* L)
// recupero il numero di macchinate
int nTot = ExeGetMachGroupNbr() ;
// restituisco il risultato
LuaSetReturn( L, nTot) ;
LuaSetParam( L, nTot) ;
return 1 ;
}
@@ -44,9 +44,9 @@ LuaGetFirstMachGroup( lua_State* L)
int nId = ExeGetFirstMachGroup() ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -62,9 +62,9 @@ LuaGetNextMachGroup( lua_State* L)
int nNextId = ExeGetNextMachGroup( nId) ;
// restituisco il risultato
if ( nNextId != GDB_ID_NULL)
LuaSetReturn( L, nNextId) ;
LuaSetParam( L, nNextId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -82,9 +82,9 @@ LuaAddMachGroup( lua_State* L)
int nId = ExeAddMachGroup( sName, sMachineName) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -99,7 +99,7 @@ LuaRemoveMachGroup( lua_State* L)
// rimuovo la macchinata
bool bOk = ExeRemoveMachGroup( nMGroupInd) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -116,9 +116,9 @@ LuaGetMachGroupName( lua_State* L)
bool bOk = ExeGetMachGroupName( nMGroupInd, sName) ;
// restituisco il risultato
if ( bOk)
LuaSetReturn( L, sName) ;
LuaSetParam( L, sName) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -134,9 +134,9 @@ LuaGetMachGroupId( lua_State* L)
int nId = ExeGetMachGroupId( sGroupName) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -151,7 +151,7 @@ LuaSetCurrMachGroup( lua_State* L)
// imposto il gruppo corrente
bool bOk = ExeSetCurrMachGroup( nMGroupInd) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -164,7 +164,7 @@ LuaResetCurrMachGroup( lua_State* L)
// imposto il gruppo corrente
bool bOk = ExeResetCurrMachGroup() ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -178,9 +178,9 @@ LuaGetCurrMachGroup( lua_State* L)
int nId = ExeGetCurrMachGroup() ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -193,7 +193,7 @@ LuaGetRawPartNbr( lua_State* L)
// recupero il numero di grezzi nella macchinata corrente
int nCount = ExeGetRawPartNbr() ;
// restituisco il risultato
LuaSetReturn( L, nCount) ;
LuaSetParam( L, nCount) ;
return 1 ;
}
@@ -207,9 +207,9 @@ LuaGetFirstRawPart( lua_State* L)
int nId = ExeGetFirstRawPart() ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -225,9 +225,9 @@ LuaGetNextRawPart( lua_State* L)
int nId = ExeGetNextRawPart( nRawId) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
//-------------------------------------------------------------------------------
@@ -250,9 +250,9 @@ LuaAddRawPart( lua_State* L)
int nInd = ExeAddRawPart( ptOrig, dWidth, dLength, dHeight, cCol) ;
// restituisco il risultato
if ( nInd != GDB_ID_NULL)
LuaSetReturn( L, nInd) ;
LuaSetParam( L, nInd) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -274,9 +274,9 @@ LuaAddRawPartWithPart( lua_State* L)
int nInd = ExeAddRawPartWithPart( nPartId, nCrvId, dOverMat, cCol) ;
// restituisco il risultato
if ( nInd != GDB_ID_NULL)
LuaSetReturn( L, nInd) ;
LuaSetParam( L, nInd) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -293,7 +293,7 @@ LuaModifyRawPartHeight( lua_State* L)
// modifico lo spessore del grezzo
bool bOk = ExeModifyRawPartHeight( nRawId, dHeight) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -308,7 +308,7 @@ LuaRemoveRawPart( lua_State* L)
// elimino il grezzo dalla macchinata corrente
bool bOk = ExeRemoveRawPart( nRawId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -325,7 +325,7 @@ LuaMoveRawPart( lua_State* L)
// traslo il grezzo
bool bOk = ExeMoveRawPart( nRawId, vtMove) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -344,7 +344,7 @@ LuaRotateRawPart( lua_State* L)
// ruoto il grezzo
bool bOk = ExeRotateRawPart( nRawId, vtAx, dAngRotDeg) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -363,7 +363,7 @@ LuaMoveToCornerRawPart( lua_State* L)
// sposto il grezzo nel corner
bool bOk = ExeMoveToCornerRawPart( nRawId, ptCorner, nFlag) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -382,7 +382,7 @@ LuaMoveToCenterRawPart( lua_State* L)
// sposto il grezzo nel corner
bool bOk = ExeMoveToCenterRawPart( nRawId, ptCenter, nFlag) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -397,7 +397,7 @@ LuaGetPartInRawPartNbr( lua_State* L)
// recupero il numero di pezzi nel grezzo
int nCount = ExeGetPartInRawPartNbr( nRawId) ;
// restituisco il risultato
LuaSetReturn( L, nCount) ;
LuaSetParam( L, nCount) ;
return 1 ;
}
@@ -413,9 +413,9 @@ LuaGetFirstPartInRawPart( lua_State* L)
int nId = ExeGetFirstPartInRawPart( nRawId) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -431,9 +431,9 @@ LuaGetNextPartInRawPart( lua_State* L)
int nId = ExeGetNextPartInRawPart( nPartId) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -452,7 +452,7 @@ LuaAddPartToRawPart( lua_State* L)
// inserisco il grezzo nella macchinata corrente
bool bOk = ExeAddPartToRawPart( nPartId, ptPos, nRawId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -467,7 +467,7 @@ LuaRemovePartFromRawPart( lua_State* L)
// elimino il grezzo dalla macchinata corrente
bool bOk = ExeRemovePartFromRawPart( nPartId) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -484,7 +484,7 @@ LuaTranslatePartInRawPart( lua_State* L)
// traslo il pezzo nel grezzo
bool bOk = ExeTranslatePartInRawPart( nPartId, vtMove) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -503,7 +503,7 @@ LuaRotatePartInRawPart( lua_State* L)
// ruoto il pezzo nel grezzo
bool bOk = ExeRotatePartInRawPart( nPartId, vtAx, dAngRotDeg) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -518,7 +518,7 @@ LuaSetTable( lua_State* L)
// imposto la tavola corrente
bool bOk = ExeSetTable( sTable) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -538,9 +538,9 @@ LuaAddSubPiece( lua_State* L)
int nId = ExeAddSubPiece( sName, ptPos, dAngRotDeg) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -557,7 +557,7 @@ LuaSetAxisPos( lua_State* L)
// metto l'asse nella nuova posizione
bool bOk = ExeSetAxisPos( sAxis, dVal) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -574,9 +574,9 @@ LuaGetAxisPos( lua_State* L)
bool bOk = ExeGetAxisPos( sAxis, &dVal) ;
// restituisco il risultato
if ( bOk)
LuaSetReturn( L, dVal) ;
LuaSetParam( L, dVal) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -593,9 +593,9 @@ LuaGetAxisHomePos( lua_State* L)
bool bOk = ExeGetAxisHomePos( sAxis, &dHomeVal) ;
// restituisco il risultato
if ( bOk)
LuaSetReturn( L, dHomeVal) ;
LuaSetParam( L, dHomeVal) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -610,7 +610,7 @@ LuaResetAxisPos( lua_State* L)
// metto l'asse nella posizione home
bool bOk = ExeResetAxisPos( sAxis) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -629,7 +629,7 @@ LuaLoadTool( lua_State* L)
// carico l'utensile
bool bOk = ExeLoadTool( sHead, nExit, sTool) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -644,7 +644,7 @@ LuaResetHeadSet( lua_State* L)
// carico l'utensile
bool bOk = ExeResetHeadSet( sHead) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -659,7 +659,7 @@ LuaSetCalcTable( lua_State* L)
// imposto la tavola corrente per i calcoli macchina
bool bOk = ExeSetCalcTable( sTable) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -678,7 +678,7 @@ LuaSetCalcTool( lua_State* L)
// imposto la tavola corrente per il calcolo
bool bOk = ExeSetCalcTool( sTool, sHead, nExit) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -697,16 +697,16 @@ LuaGetCalcAngles( lua_State* L)
bool bOk = ExeGetCalcAngles( vtDirT, vtDirA, nStat, dAngA1, dAngB1, dAngA2, dAngB2) ;
// restituisco il risultato
if ( bOk) {
LuaSetReturn( L, bOk) ;
LuaSetReturn( L, nStat) ;
LuaSetReturn( L, dAngA1) ;
LuaSetReturn( L, dAngB1) ;
LuaSetReturn( L, dAngA2) ;
LuaSetReturn( L, dAngB2) ;
LuaSetParam( L, bOk) ;
LuaSetParam( L, nStat) ;
LuaSetParam( L, dAngA1) ;
LuaSetParam( L, dAngB1) ;
LuaSetParam( L, dAngA2) ;
LuaSetParam( L, dAngB2) ;
return 6 ;
}
else {
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
}
@@ -728,15 +728,15 @@ LuaGetCalcPositions( lua_State* L)
bool bOk = ExeGetCalcPositions( ptP, dAngA, dAngB, nStat, dX, dY, dZ) ;
// restituisco il risultato
if ( bOk) {
LuaSetReturn( L, bOk) ;
LuaSetReturn( L, nStat) ;
LuaSetReturn( L, dX) ;
LuaSetReturn( L, dY) ;
LuaSetReturn( L, dZ) ;
LuaSetParam( L, bOk) ;
LuaSetParam( L, nStat) ;
LuaSetParam( L, dX) ;
LuaSetParam( L, dY) ;
LuaSetParam( L, dZ) ;
return 5 ;
}
else {
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
}
@@ -762,12 +762,12 @@ LuaVerifyOutOfStroke( lua_State* L)
bool bOk = ExeVerifyOutOfStroke( dX, dY, dZ, dAngA, dAngB, nStat) ;
// restituisco il risultato
if ( bOk) {
LuaSetReturn( L, bOk) ;
LuaSetReturn( L, nStat) ;
LuaSetParam( L, bOk) ;
LuaSetParam( L, nStat) ;
return 2 ;
}
else {
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
}
@@ -786,9 +786,9 @@ LuaAddMachining( lua_State* L)
int nId = ExeAddMachining( sName, sMachining) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)
LuaSetReturn( L, nId) ;
LuaSetParam( L, nId) ;
else
LuaSetReturn( L) ;
LuaSetParam( L) ;
return 1 ;
}
@@ -826,7 +826,7 @@ LuaSetMachiningParam( lua_State* L)
}
LuaClearStack( L) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -841,7 +841,7 @@ LuaSetMachiningGeometry( lua_State* L)
// imposto la geometria alla lavorazione corrente
bool bOk = ExeSetMachiningGeometry( vSel) ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
@@ -854,7 +854,7 @@ LuaApplyMachining( lua_State* L)
// imposto la geometria alla lavorazione corrente
bool bOk = ExeApplyMachining() ;
// restituisco il risultato
LuaSetReturn( L, bOk) ;
LuaSetParam( L, bOk) ;
return 1 ;
}