EgtMachKernel :
- piccola miglioria al simulatore (reset utensili all'avvio).
This commit is contained in:
+8
-4
@@ -83,7 +83,7 @@ Simulator::Start( void)
|
||||
m_nOpId = nOpId ;
|
||||
|
||||
// aggiornamenti legati al cambio di lavorazione (utensile e assi conseguenti)
|
||||
if ( ! UpdateTool() || ! UpdateAxes())
|
||||
if ( ! UpdateTool( true) || ! UpdateAxes())
|
||||
return false ;
|
||||
|
||||
// porto la macchina in home
|
||||
@@ -284,7 +284,7 @@ Simulator::Stop( void)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Simulator::UpdateTool( void)
|
||||
Simulator::UpdateTool( bool bForced)
|
||||
{
|
||||
// Recupero l'utensile della lavorazione corrente
|
||||
string sTool ;
|
||||
@@ -293,10 +293,14 @@ Simulator::UpdateTool( void)
|
||||
return false ;
|
||||
if ( ! m_pMchMgr->TdbSetCurrTool( sTool))
|
||||
return false ;
|
||||
// se cambiato, attivo l'utensile della lavorazione
|
||||
if ( sTool != m_sTool) {
|
||||
// se cambiato oppure forzato, attivo l'utensile della lavorazione
|
||||
if ( sTool != m_sTool || bForced) {
|
||||
string sHead ; m_pMchMgr->TdbGetCurrToolParam( TPA_HEAD, sHead) ;
|
||||
int nExit ; m_pMchMgr->TdbGetCurrToolParam( TPA_EXIT, nExit) ;
|
||||
// se forzato, pulisco la testa
|
||||
if ( bForced)
|
||||
m_pMchMgr->ResetHeadSet( sHead) ;
|
||||
// carico l'utensile
|
||||
if ( ! m_pMchMgr->SetCalcTool( sTool, sHead, nExit))
|
||||
return false ;
|
||||
m_sTool = sTool ;
|
||||
|
||||
Reference in New Issue
Block a user