EgtMachKernel 3.1h2 :
- modifiche per gestione visualizzazione Vmill in simulazione con funzione SimShowVMill (implementata solo in SimulatorSP).
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user