EgtExecutor 1.6v3 :
- aggiunta KeepFixture ed estesa KeepRawPart.
This commit is contained in:
+24
-3
@@ -455,16 +455,17 @@ ExeModifyRawPartHeight( int nRawId, double dHeight)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeKeepRawPart( int nRawId)
|
||||
ExeKeepRawPart( int nRawId, int nSouPhase)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// confermo il grezzo nella fase corrente della macchinata corrente
|
||||
bool bOk = pGseCtx->m_pMachMgr->KeepRawPart( nRawId) ;
|
||||
bool bOk = pGseCtx->m_pMachMgr->KeepRawPart( nRawId, nSouPhase) ;
|
||||
ExeSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtKeepRawPart(" + ToString( nRawId) + ")" +
|
||||
string sLua = "EgtKeepRawPart(" + ToString( nRawId) + "," +
|
||||
ToString( nSouPhase) + ")" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
@@ -829,6 +830,26 @@ ExeAddFixture( const string& sName, const Point3d& ptPos, double dAngRotDeg, dou
|
||||
return nId ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeKeepFixture( int nFxtId, int nSouPhase)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// confermo il bloccaggio nella fase corrente della macchinata corrente
|
||||
bool bOk = pGseCtx->m_pMachMgr->KeepFixture( nFxtId, nSouPhase) ;
|
||||
ExeSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtKeepFixture(" + ToString( nFxtId) + "," +
|
||||
ToString( nSouPhase) + ")" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
// restituisco il risultato
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeRemoveFixture( int nFxtId)
|
||||
|
||||
Binary file not shown.
+22
-2
@@ -453,12 +453,14 @@ LuaModifyRawPartHeight( lua_State* L)
|
||||
static int
|
||||
LuaKeepRawPart( lua_State* L)
|
||||
{
|
||||
// 1 parametro : nRawId
|
||||
// 1 o 2 parametri : nRawId [, nSouPhase]
|
||||
int nRawId ;
|
||||
LuaCheckParam( L, 1, nRawId)
|
||||
int nSouPhase = 0 ;
|
||||
LuaGetParam( L, 2, nSouPhase) ;
|
||||
LuaClearStack( L) ;
|
||||
// confermo il grezzo nella fase corrente della macchinata corrente
|
||||
bool bOk = ExeKeepRawPart( nRawId) ;
|
||||
bool bOk = ExeKeepRawPart( nRawId, nSouPhase) ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
@@ -840,6 +842,23 @@ LuaAddFixture( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaKeepFixture( lua_State* L)
|
||||
{
|
||||
// 1 o 2 parametri : nFxtId [, nSouPhase]
|
||||
int nFxtId ;
|
||||
LuaCheckParam( L, 1, nFxtId)
|
||||
int nSouPhase = 0 ;
|
||||
LuaGetParam( L, 2, nSouPhase) ;
|
||||
LuaClearStack( L) ;
|
||||
// confermo il bloccaggio nella fase corrente della macchinata corrente
|
||||
bool bOk = ExeKeepFixture( nFxtId, nSouPhase) ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaRemoveFixture( lua_State* L)
|
||||
@@ -2799,6 +2818,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetTableRef", LuaGetTableRef) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetTableArea", LuaGetTableArea) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAddFixture", LuaAddFixture) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtKeepFixture", LuaKeepFixture) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtRemoveFixture", LuaRemoveFixture) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetFirstFixture", LuaGetFirstFixture) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetNextFixture", LuaGetNextFixture) ;
|
||||
|
||||
Reference in New Issue
Block a user