EgtExecutor 2.4h1 :

- modifiche per gestione SelInfo di ultimi due oggetti selezionati
- corrette macro di doppia verifica come VERIFY_CTX_GEOMDB
- aggiunta gestione flag RUL_TYPE_ISOPAR_SMOOTH in creazione superficie rigata.
This commit is contained in:
DarioS
2022-08-17 19:14:00 +02:00
parent cd556c3175
commit 5c7ed7e3c1
5 changed files with 34 additions and 13 deletions
+15 -2
View File
@@ -84,10 +84,16 @@ ExeSelectObj( int nId)
bool
ExeDeselectObj( int nId)
{
GseContext* pGseCtx = GetCurrGseContext() ;
VERIFY_CTX_GEOMDB( pGseCtx, false)
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, false)
// deseleziono l'oggetto
bool bOk = pGeomDB->DeselectObj( nId) ;
// eventuale sistemazione ultimi selezionati
if ( nId == pGseCtx->m_siSel.nLastId)
pGseCtx->m_siSel.ResetLast() ;
else if ( nId == pGseCtx->m_siSel.nPrevId)
pGseCtx->m_siSel.ResetPrev() ;
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sLua = "EgtDeselectObj(" + ToString( nId) + ")" +
@@ -125,6 +131,8 @@ ExeSelectAll( bool bOnlyIfVisible)
// passo al successivo
nId1 = ExeGetNextPart( nId1, bOnlyIfVisible) ;
}
// reset info ultimi due selezionati
pGseCtx->m_siSel.Reset() ;
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sLua = "EgtSelectAll(" + string( bOnlyIfVisible ? "true" : "false") + ")" +
@@ -139,10 +147,13 @@ ExeSelectAll( bool bOnlyIfVisible)
bool
ExeDeselectAll( void)
{
GseContext* pGseCtx = GetCurrGseContext() ;
VERIFY_CTX_GEOMDB( pGseCtx, false)
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, false)
// deseleziono tutto
bool bOk = pGeomDB->ClearSelection() ;
// reset info ultimi due selezionati
pGseCtx->m_siSel.Reset() ;
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sLua = "EgtDeselectAll()"
@@ -164,6 +175,8 @@ ExeSelectGroupObjs( int nGroupId)
// verifico sia un gruppo
if ( pGeomDB->GetGdbType( nGroupId) == GDB_TY_GROUP) {
bOk = pGeomDB->SelectGroupObjs( nGroupId, pGseCtx->m_nObjFilterForSelect) ;
// reset info ultimi due selezionati
pGseCtx->m_siSel.Reset() ;
}
else
bOk = false ;
+10 -10
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2014-2020
// EgalTech 2014-2022
//----------------------------------------------------------------------------
// File : EXE_Macro Data : 02.09.20 Versione : 2.2i1
// File : EXE_Macro Data : 15.08.22 Versione : 2.4h1
// Contenuto : Macro locali per moduli EXE.
//
//
@@ -41,31 +41,31 @@
#endif
//-----------------------------------------------------------------------------
#define VERIFY_CTX( pC, Ret) VERIFY_NULL( pC, "Context invalid", Ret)
#define VERIFY_CTX( pC, Ret) VERIFY_NULL( pC, "Context invalid", Ret)
//-----------------------------------------------------------------------------
#define VERIFY_GEOMDB( pG, Ret) VERIFY_NULL( pG, "GeomDB invalid", Ret)
#define VERIFY_GEOMDB( pG, Ret) VERIFY_NULL( pG, "GeomDB invalid", Ret)
//-----------------------------------------------------------------------------
#define VERIFY_CTX_GEOMDB( pC, Ret) VERIFY_2NULL( pC, pC->m_pGeomDB, "Context or GeomDB invalid", Ret)
#define VERIFY_CTX_GEOMDB( pC, Ret) VERIFY_2NULL( pC, ( pC != nullptr ? pC->m_pGeomDB : nullptr), "Context or GeomDB invalid", Ret)
//-----------------------------------------------------------------------------
#define VERIFY_MACHMGR( pM, Ret) VERIFY_NULL( pM, "MachMgr invalid", Ret)
//-----------------------------------------------------------------------------
#define VERIFY_CTX_MACHMGR( pC, Ret) VERIFY_2NULL( pC, pC->m_pMachMgr, "Context or MachMgr invalid", Ret)
#define VERIFY_CTX_MACHMGR( pC, Ret) VERIFY_2NULL( pC, ( pC != nullptr ? pC->m_pMachMgr : nullptr), "Context or MachMgr invalid", Ret)
//-----------------------------------------------------------------------------
#define VERIFY_SCENE( pS, Ret) VERIFY_NULL( pS, "Scene invalid", Ret)
#define VERIFY_SCENE( pS, Ret) VERIFY_NULL( pS, "Scene invalid", Ret)
//-----------------------------------------------------------------------------
#define VERIFY_CTX_SCENE( pC, Ret) VERIFY_2NULL( pC, pC->m_pScene, "Context or Scene invalid", Ret)
#define VERIFY_CTX_SCENE( pC, Ret) VERIFY_2NULL( pC, ( pC != nullptr ? pC->m_pScene : nullptr), "Context or Scene invalid", Ret)
//-----------------------------------------------------------------------------
#define VERIFY_TSCEXEC( pT, Ret) VERIFY_NULL( pT, "TscExecutor invalid", Ret)
#define VERIFY_TSCEXEC( pT, Ret) VERIFY_NULL( pT, "TscExecutor invalid", Ret)
//-----------------------------------------------------------------------------
#define VERIFY_BEAMMGR( pM, Ret) VERIFY_NULL( pM, "BeamMgr invalid", Ret)
//-----------------------------------------------------------------------------
#define VERIFY_CTX_BEAMMGR( pC, Ret) VERIFY_2NULL( pC, pC->m_pBeamMgr, "Context or BeamMgr invalid", Ret)
#define VERIFY_CTX_BEAMMGR( pC, Ret) VERIFY_2NULL( pC, ( pC != nullptr ? pC->m_pBeamMgr : nullptr), "Context or BeamMgr invalid", Ret)
BIN
View File
Binary file not shown.
+4
View File
@@ -36,6 +36,10 @@ struct SelInfo {
{ nPrevId = nLastId ; nPrevSub = nLastSub ; ptPrevSel = ptLastSel ; nLastId = nI ; nLastSub = nS ; ptLastSel = ptP ; }
void Reset( void)
{ nLastId = GDB_ID_NULL ; nLastSub = 0 ; ptLastSel = ORIG ; nPrevId = GDB_ID_NULL ; nPrevSub = 0 ; ptPrevSel = ORIG ; }
void ResetLast( void)
{ nLastId = nPrevId ; nLastSub = nPrevSub ; ptLastSel = ptPrevSel ; nPrevId = GDB_ID_NULL ; nPrevSub = 0 ; ptPrevSel = ORIG ; }
void ResetPrev( void)
{ nPrevId = GDB_ID_NULL ; nPrevSub = 0 ; ptPrevSel = ORIG ; }
} ;
//----------------------------------------------------------------------------
+5 -1
View File
@@ -616,7 +616,11 @@ LuaCreateSurfTmRuled( lua_State* L)
LuaGetParam( L, 4, dLinTol) ;
LuaClearStack( L) ;
// creo STM riempiendo un contorno piano
int nType = ( sType == "MD" ? RUL_TYPE_MINDIST : RUL_TYPE_ISOPAR) ;
int nType = RUL_TYPE_ISOPAR ;
if ( sType == "MD")
nType = RUL_TYPE_MINDIST ;
else if ( sType == "IP_SM")
nType = RUL_TYPE_ISOPAR_SMOOTH ;
int nId = ExeCreateSurfTmRuled( nParentId, nPtOrCrvId1, nPtOrCrvId2, nType, dLinTol) ;
// restituisco il risultato
if ( nId != GDB_ID_NULL)