From 5ec4ed439f4fc78f60fbecff1c8f2fd28d19b9b5 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 9 Oct 2023 13:07:33 +0200 Subject: [PATCH] EgtExecutor 2.5j1 : - riallineamento - sistemazioni per chiave di rete esposta su Internet. --- EXE_GdbModifySurf.cpp | 10 ++++++---- EXE_General.cpp | 13 ++++++++----- EgtExecutor.rc | Bin 18898 -> 18898 bytes LUA_GdbGetSurf.cpp | 8 +++++--- LUA_GdbModifySurf.cpp | 19 +++++++++++-------- 5 files changed, 30 insertions(+), 20 deletions(-) diff --git a/EXE_GdbModifySurf.cpp b/EXE_GdbModifySurf.cpp index be40422..1fda080 100644 --- a/EXE_GdbModifySurf.cpp +++ b/EXE_GdbModifySurf.cpp @@ -929,9 +929,9 @@ ExeSurfTmCut( int nId, int nCutterId, bool bInVsOut, bool bSaveOnEq) //---------------------------------------------------------------------------- bool -ExeSubtractProjectedFacesOnStmFace( int nSurfId, int nFaceInd, int nDestGrpId, - INTVECTOR vSurfsId, INTVECTOR vSurfFacesInd, bool bOCFlag, - int& nNewId, bool& bExistProjection, int& nNewFaceNbr) +ExeSurfTmSubtractProjectedFacesOnFace( int nSurfId, int nFaceInd, int nDestGrpId, + INTVECTOR vSurfsId, INTVECTOR vSurfFacesInd, bool bOCFlag, + bool& bExistProjection, int& nNewId, int& nNewFaceNbr) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, false) @@ -965,8 +965,10 @@ ExeSubtractProjectedFacesOnStmFace( int nSurfId, int nFaceInd, int nDestGrpId, ISurfTriMesh* pStmRes = nullptr ; bool bOk = SubtractProjectedFacesOnStmFace( *pStm, nFaceInd, vpStmOthers, vSurfFacesInd, bOCFlag, bExistProjection, pStmRes, nNewFaceNbr) ; - if ( ! bOk) + if ( ! bOk) { delete( pStmRes) ; + pStmRes = nullptr ; + } nNewId = GDB_ID_NULL ; if ( bOk && pStmRes != nullptr) { diff --git a/EXE_General.cpp b/EXE_General.cpp index a4a11d7..e79436d 100644 --- a/EXE_General.cpp +++ b/EXE_General.cpp @@ -278,9 +278,12 @@ ExeSetLockId( const string& sLockId) bOk = ( s_nKeyType != KEY_LOCK_TYPE_HW) ; break ; case KEY_LOCK_TYPE_HW : - ExeSetNetHwKey( bNetKey, nUserId) ; - bOk = true ; - break ; + { string sAddrPort ; + GetLockIdStringNetData( sLockId, sAddrPort) ; + ExeSetNetHwKey( bNetKey, nUserId, sAddrPort) ; + bOk = true ; + break ; + } } if ( bOk) s_sLockId = sLockId ; @@ -300,11 +303,11 @@ ExeGetLockId( void) //----------------------------------------------------------------------------- bool -ExeSetNetHwKey( bool bNetHwKey, int nUserId) +ExeSetNetHwKey( bool bNetHwKey, int nUserId, const string& sAddrPort) { s_bNetHwKey = bNetHwKey ; SetEGnNetHwKey( s_bNetHwKey) ; - return SetNetHwKey( s_bNetHwKey, nUserId) ; + return SetNetHwKey( s_bNetHwKey, nUserId, sAddrPort) ; } //----------------------------------------------------------------------------- diff --git a/EgtExecutor.rc b/EgtExecutor.rc index 067d24928861ab260d3ea10d7af220c72391f070..46959fd9cec273cf29f2befccee1ba612280b831 100644 GIT binary patch delta 188 zcmcaKneozO#trM3bzK?q7}6PX7%~}(88R3Y7&I6{fg+gOGCjW3-Hkpfg+2nstJp3T*Ji!*^FjPW}-)!JKhZ&m$&|bF9 JKiqCH0Ra9DFWLYA delta 153 zcmcaKneozO#trM3)jb*V7}6PX7*ZLEfmne-gCUrqgdq`#Gl9HNpll|HJz3tlb#okx qm@TmyHqUn~W)#c^o9GEPF$ZW;;%0g0jm((Bljl1g+&s_Sgb4t{vm@dF diff --git a/LUA_GdbGetSurf.cpp b/LUA_GdbGetSurf.cpp index b8cfa0a..0602f12 100644 --- a/LUA_GdbGetSurf.cpp +++ b/LUA_GdbGetSurf.cpp @@ -723,7 +723,7 @@ LuaExtractSurfTmLoops( lua_State* L) static int LuaGetSurfTmSilhouette( lua_State* L) { - // 4 o 5 o 6 parametri : nId, vtDir, dToler, nDestGrpId [, nRefType] [, bAllTria] + // 4 o 5 o 6 parametri : nId, vtDir, dToler, nDestGrpId [, nRefType [, bAllTria]] int nId ; LuaCheckParam( L, 1, nId) Vector3d vtDir ; @@ -733,9 +733,11 @@ LuaGetSurfTmSilhouette( lua_State* L) int nDestGrpId ; LuaCheckParam( L, 4, nDestGrpId) int nRefType = RTY_DEFAULT ; - LuaGetParam( L, 5, nRefType) ; bool bAllTria = false ; - LuaGetParam( L, 6, bAllTria) ; + if ( LuaGetParam( L, 5, nRefType)) + LuaGetParam( L, 6, bAllTria) ; + else + LuaGetParam( L, 5, bAllTria) ; LuaClearStack( L) ; // recupero i contorni della superficie int nCount = 0 ; diff --git a/LUA_GdbModifySurf.cpp b/LUA_GdbModifySurf.cpp index 23f9746..4717ab6 100644 --- a/LUA_GdbModifySurf.cpp +++ b/LUA_GdbModifySurf.cpp @@ -392,7 +392,7 @@ LuaSurfTmCut( lua_State* L) static int LuaSubtractProjectedFacesOnStmFace( lua_State* L) { - // 3 o 4 o 5 o 6 parametri : nSurfId, nFaceInd, nDestGrpId [, vSurfsId] [, vSurfFacesInd] [, bOCFlag] + // 3 o 4 o 5 o 6 parametri : nSurfId, nFaceInd, nDestGrpId [, vSurfsId, vSurfFacesInd] [, bOCFlag] int nSurfId ; LuaCheckParam( L, 1, nSurfId) ; int nFaceInd ; @@ -400,25 +400,28 @@ LuaSubtractProjectedFacesOnStmFace( lua_State* L) int nDestGrpId ; LuaCheckParam( L, 3, nDestGrpId) ; INTVECTOR vSurfsId ; - LuaGetParam( L, 4, vSurfsId) ; INTVECTOR vSurfFacesInd ; - LuaGetParam( L, 5, vSurfFacesInd) ; bool bOCFlag = true ; - LuaGetParam( L, 6, bOCFlag) ; + if ( LuaGetParam( L, 4, vSurfsId)) { + LuaCheckParam( L, 5, vSurfFacesInd) + LuaGetParam( L, 6, bOCFlag) ; + } + else + LuaGetParam( L, 4, bOCFlag) ; LuaClearStack( L) ; // sottraggo alla faccia scelta la proiezione delle altre int nNewId = GDB_ID_NULL; bool bExistProjection = false ; - int nNewFaceNbr = -1 ; - bool bOk = ExeSubtractProjectedFacesOnStmFace( nSurfId, nFaceInd, nDestGrpId, vSurfsId, vSurfFacesInd, - bOCFlag, nNewId, bExistProjection, nNewFaceNbr) ; + int nNewFaceNbr = 0 ; + bool bOk = ExeSurfTmSubtractProjectedFacesOnFace( nSurfId, nFaceInd, nDestGrpId, vSurfsId, vSurfFacesInd, + bOCFlag, bExistProjection, nNewId, nNewFaceNbr) ; LuaSetParam( L, bOk) ; LuaSetParam( L, bExistProjection) ; - LuaSetParam( L, nNewFaceNbr) ; if ( nNewId != GDB_ID_NULL) LuaSetParam( L, nNewId) ; else LuaSetParam( L) ; + LuaSetParam( L, nNewFaceNbr) ; return 4 ; }