EgtMachKernel 3.1h2 :
- modifiche per gestione visualizzazione Vmill in simulazione con funzione SimShowVMill (implementata solo in SimulatorSP).
This commit is contained in:
Binary file not shown.
@@ -342,6 +342,7 @@ class MachMgr : public IMachMgr
|
||||
bool SimGetMoveInfo( int& nGmove, double& dFeed) const override ;
|
||||
bool SimSetStep( double dStep) override ;
|
||||
bool SimSetUiStatus( int nUiStatus) override ;
|
||||
bool SimShowVMill( bool bShow) override ;
|
||||
bool SimEnableToolTipTrace( bool bEnable) override ;
|
||||
bool SimGoHome( void) override ;
|
||||
bool SimExit( void) override ;
|
||||
|
||||
@@ -130,6 +130,17 @@ MachMgr::SimSetUiStatus( int nUiStatus)
|
||||
return m_pSimul->SetUiStatus( nUiStatus) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
MachMgr::SimShowVMill( bool bShow)
|
||||
{
|
||||
// verifico simulatore
|
||||
if ( m_pSimul == nullptr)
|
||||
return false ;
|
||||
// imposto visualizzazione solidi Vmill
|
||||
return m_pSimul->ShowVMill( bShow) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
MachMgr::SimEnableToolTipTrace( bool bEnable)
|
||||
|
||||
@@ -61,6 +61,7 @@ class __declspec( novtable) ISimulator
|
||||
virtual bool SetToolForVmill( const std::string& sTool, const std::string& sHead, int nExit, int nFlag,
|
||||
double dPar1, double dPar2, const INTVECTOR& vVmill, bool bFirst) = 0 ;
|
||||
virtual bool EnableToolsForVmill( bool bEnable) = 0 ;
|
||||
virtual bool ShowVMill( bool bShow) = 0 ;
|
||||
virtual bool EnableToolTipTrace( bool bEnable) = 0 ;
|
||||
virtual int MoveAxes( int nMoveType, const SAMVECTOR& vAxNaEpSt) = 0 ;
|
||||
virtual bool SaveCmd( int nType, int nPar, const std::string& sPar, const std::string& sPar2) = 0 ;
|
||||
|
||||
@@ -48,6 +48,8 @@ class SimulatorMP : public ISimulator
|
||||
bool SetToolForVmill( const std::string& sTool, const std::string& sHead, int nExit, int nFlag,
|
||||
double dPar1, double dPar2, const INTVECTOR& vVmill, bool bFirst) override ;
|
||||
bool EnableToolsForVmill( bool bEnable) override ;
|
||||
bool ShowVMill( bool bShow) override
|
||||
{ return false ; }
|
||||
bool EnableToolTipTrace( bool bEnable) override
|
||||
{ return false ; }
|
||||
int MoveAxes( int nMoveType, const SAMVECTOR& vAxNaEpSt) override ;
|
||||
|
||||
@@ -1681,6 +1681,44 @@ SimulatorSP::ResetCollisionMark( void)
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
SimulatorSP::ShowVMill( bool bShow)
|
||||
{
|
||||
// recupero tutti i grezzi collegati agli assi macchina
|
||||
INTVECTOR vRawId = m_pMachine->GetAllLinkedRawParts() ;
|
||||
// recupero gli altri grezzi
|
||||
int nRawId = m_pMchMgr->GetFirstRawPart() ;
|
||||
while ( nRawId != GDB_ID_NULL) {
|
||||
vRawId.push_back( nRawId) ;
|
||||
nRawId = m_pMchMgr->GetNextRawPart( nRawId) ;
|
||||
}
|
||||
// recupero eventuale gruppo delle curve di traccia
|
||||
if ( ! m_pMachine->LuaGetGlobVar( GLOB_VAR + GVAR_TOOLTRACE, m_nTraceGroup))
|
||||
m_nTraceGroup = GDB_ID_NULL ;
|
||||
// ciclo sui grezzi
|
||||
for ( int nRawId : vRawId) {
|
||||
// se grezzo attivo nella fase corrente
|
||||
if ( m_pMchMgr->VerifyRawPartPhase( nRawId, m_pMchMgr->GetCurrPhase())) {
|
||||
// ciclo sugli oggetti del grezzo
|
||||
int nId = m_pGeomDB->GetFirstInGroup( nRawId) ;
|
||||
while ( nId != GDB_ID_NULL) {
|
||||
// se è il VMill
|
||||
if ( find( m_VmId.begin(), m_VmId.end(), nId) != m_VmId.end())
|
||||
m_pGeomDB->SetStatus( nId, ( bShow ? GDB_ST_ON : GDB_ST_OFF)) ;
|
||||
// se altrimenti è il gruppo di tracciatura
|
||||
else if ( nId == m_nTraceGroup)
|
||||
m_pGeomDB->SetStatus( nId, GDB_ST_ON) ;
|
||||
// altro
|
||||
else
|
||||
m_pGeomDB->SetStatus( nId, ( bShow ? GDB_ST_OFF : GDB_ST_ON)) ;
|
||||
nId = m_pGeomDB->GetNext( nId) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
SimulatorSP::EnableToolTipTrace( bool bEnable)
|
||||
|
||||
@@ -48,6 +48,7 @@ class SimulatorSP : public ISimulator
|
||||
bool SetToolForVmill( const std::string& sTool, const std::string& sHead, int nExit, int nFlag,
|
||||
double dPar1, double dPar2, const INTVECTOR& vVmill, bool bFirst) override ;
|
||||
bool EnableToolsForVmill( bool bEnable) override ;
|
||||
bool ShowVMill( bool bShow) override ;
|
||||
bool EnableToolTipTrace( bool bEnable) override ;
|
||||
int MoveAxes( int nMoveType, const SAMVECTOR& vAxNaEpSt) override ;
|
||||
bool SaveCmd( int nType, int nPar, const std::string& sPar, const std::string& sPar2) override
|
||||
|
||||
Reference in New Issue
Block a user