EgtExecutor 1.6l3 :

- aggiornamento per preview lavorazioni.
This commit is contained in:
Dario Sassi
2015-12-15 14:52:02 +00:00
parent bdcb1ae7e9
commit bb4772673b
3 changed files with 33 additions and 5 deletions
+12 -2
View File
@@ -1165,12 +1165,22 @@ ExeSetMachiningGeometry( const SELVECTOR& vIds)
//-----------------------------------------------------------------------------
bool
ExeApplyMachining( void)
ExePreviewMachining( bool bRecalc)
{
GseContext* pGseCtx = GetCurrGseContext() ;
VERIFY_CTX_MACHMGR( pGseCtx, false)
// imposto la geometria alla lavorazione corrente
return pGseCtx->m_pMachMgr->MachiningApply() ;
return pGseCtx->m_pMachMgr->MachiningPreview( bRecalc) ;
}
//-----------------------------------------------------------------------------
bool
ExeApplyMachining( bool bRecalc)
{
GseContext* pGseCtx = GetCurrGseContext() ;
VERIFY_CTX_MACHMGR( pGseCtx, false)
// imposto la geometria alla lavorazione corrente
return pGseCtx->m_pMachMgr->MachiningApply( bRecalc) ;
}
//-----------------------------------------------------------------------------
BIN
View File
Binary file not shown.
+21 -3
View File
@@ -1379,14 +1379,31 @@ LuaSetMachiningGeometry( lua_State* L)
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaPreviewMachining( lua_State* L)
{
// 1 o nessun parametro : [bRecalc]
bool bRecalc = false ;
LuaGetParam( L, 1, bRecalc) ;
LuaClearStack( L) ;
// calcolo l'anteprima (se prevista) della lavorazione corrente
bool bOk = ExePreviewMachining( bRecalc) ;
// restituisco il risultato
LuaSetParam( L, bOk) ;
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaApplyMachining( lua_State* L)
{
// nessun parametro
// 1 o nessun parametro : [bRecalc]
bool bRecalc = false ;
LuaGetParam( L, 1, bRecalc) ;
LuaClearStack( L) ;
// imposto la geometria alla lavorazione corrente
bool bOk = ExeApplyMachining() ;
// calcolo la lavorazione corrente
bool bOk = ExeApplyMachining( bRecalc) ;
// restituisco il risultato
LuaSetParam( L, bOk) ;
return 1 ;
@@ -1911,6 +1928,7 @@ LuaInstallMachMgr( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtSetCurrMachining", LuaSetCurrMachining) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSetMachiningParam", LuaSetMachiningParam) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtSetMachiningGeometry", LuaSetMachiningGeometry) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtPreviewMachining", LuaPreviewMachining) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtApplyMachining", LuaApplyMachining) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtGetMachiningParam", LuaGetMachiningParam) ;
// Simulation