Files
EgtExecutor/EXE_BeamMgr.cpp
T
Dario Sassi 5656595353 EgtExecutor 2.2i2 :
- aggiunta gestione BeamMgr
- aggiunte funzioni ExeInitBeamMgr, ExeBeamCalcSolid, ExeBeamGetSolid, ExeBeamShowSolid.
2020-09-02 17:47:38 +00:00

72 lines
2.3 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2020-2020
//----------------------------------------------------------------------------
// File : EXE_BeamMgr.cpp Data : 30.08.20 Versione : 2.2i1
// Contenuto : Funzioni Beam Manager per EXE.
//
//
//
// Modifiche : 30.08.20 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
//--------------------------- Include ----------------------------------------
#include "stdafx.h"
#include "EXE.h"
#include "EXE_Macro.h"
#include "DllExchange.h"
#include "/EgtDev/Include/EXeExecutor.h"
#include "/EgtDev/Include/EgtPointerOwner.h"
using namespace std ;
//-----------------------------------------------------------------------------
bool
ExeInitBeamMgr( int nFlag)
{
GseContext* pGseCtx = GetCurrGseContext() ;
VERIFY_CTX_GEOMDB( pGseCtx, false)
// inizializzazione gestore travi
PtrOwner<IBeamMgr> pBeamMgr( MyCreateBeamMgr()) ;
VERIFY_NULL( Get( pBeamMgr), "Error in CreateBeamMgr", false)
bool bOk = pBeamMgr->Init( pGseCtx->m_pGeomDB, nFlag) ;
// assegno il gestore al contesto
pGseCtx->m_pBeamMgr = ( bOk ? Release( pBeamMgr) : nullptr) ;
// log avvio Beam Manager
string sLog = "BeamMgr" ;
sLog += ( bOk ? " started" : " error") ;
LOG_INFO( GetLogger(), sLog.c_str())
return bOk ;
}
//-----------------------------------------------------------------------------
bool
ExeBeamCalcSolid( int nPartId, bool bRecalc)
{
IBeamMgr* pBeamMgr = GetCurrBeamMgr() ;
VERIFY_BEAMMGR( pBeamMgr, false)
// calcolo il solido della trave
return pBeamMgr->CalcSolid( nPartId, bRecalc) ;
}
//-----------------------------------------------------------------------------
int
ExeBeamGetSolid( int nPartId)
{
IBeamMgr* pBeamMgr = GetCurrBeamMgr() ;
VERIFY_BEAMMGR( pBeamMgr, false)
// recupero l'identificativo del solido della trave
return pBeamMgr->GetSolid( nPartId) ;
}
//-----------------------------------------------------------------------------
bool
ExeBeamShowSolid( int nPartId, bool bShow)
{
IBeamMgr* pBeamMgr = GetCurrBeamMgr() ;
VERIFY_BEAMMGR( pBeamMgr, false)
// aggiorno lo stato di visualizzazione della trave (solido e complementari)
return pBeamMgr->ShowSolid( nPartId, bShow) ;
}