From bb4772673b172f49c37358f9649fdcc8b8bef5be Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 15 Dec 2015 14:52:02 +0000 Subject: [PATCH] EgtExecutor 1.6l3 : - aggiornamento per preview lavorazioni. --- EXE_MachMgr.cpp | 14 ++++++++++++-- EgtExecutor.rc | Bin 11710 -> 11694 bytes LUA_MachMgr.cpp | 24 +++++++++++++++++++++--- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/EXE_MachMgr.cpp b/EXE_MachMgr.cpp index 588597c..8fc6d5a 100644 --- a/EXE_MachMgr.cpp +++ b/EXE_MachMgr.cpp @@ -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) ; } //----------------------------------------------------------------------------- diff --git a/EgtExecutor.rc b/EgtExecutor.rc index 0a7c70a7c86bcf336cde797205c88566445de27b..3e9339a38d55ea7ad02932fe9550858ee9f9de71 100644 GIT binary patch delta 121 zcmdlNy)Jsg4>ndK1|0_D&Hve)nVEAKj3oo~1|0@N27}EP#jZ0=zQUQqoXuc3`67qp`T)EN~SEe diff --git a/LUA_MachMgr.cpp b/LUA_MachMgr.cpp index c196754..9c9f2b4 100644 --- a/LUA_MachMgr.cpp +++ b/LUA_MachMgr.cpp @@ -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