EgtMachKernel 3.1h2 :

- modifiche per gestione visualizzazione Vmill in simulazione con funzione SimShowVMill (implementata solo in SimulatorSP).
This commit is contained in:
Dario Sassi
2026-08-13 18:09:21 +02:00
parent 1976b39c0b
commit 1ff741b794
7 changed files with 54 additions and 0 deletions
+38
View File
@@ -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)