EgtMachKernel 1.8d6 :
- all'avvio simulazione si carica l'utensile della prima lavorazione senza lanciare script OnSelectTool.
This commit is contained in:
+7
-7
@@ -287,7 +287,7 @@ Simulator::Stop( void)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Simulator::UpdateTool( bool bForced)
|
||||
Simulator::UpdateTool( bool bFirst)
|
||||
{
|
||||
// Recupero l'utensile della lavorazione corrente
|
||||
Machining* pMch = GetMachining( m_pGeomDB->GetUserObj( m_nOpId)) ;
|
||||
@@ -313,10 +313,10 @@ Simulator::UpdateTool( bool bForced)
|
||||
if ( ! OnToolDeselect( sTool, sHead, nExit, sTcPos))
|
||||
return false ;
|
||||
}
|
||||
// se cambiato oppure forzato, attivo l'utensile della lavorazione
|
||||
if ( sTool != m_sTool || bForced) {
|
||||
// se forzato, pulisco la testa
|
||||
if ( bForced)
|
||||
// se cambiato oppure prima volta, attivo l'utensile della lavorazione
|
||||
if ( sTool != m_sTool || bFirst) {
|
||||
// se prima volta, pulisco la testa
|
||||
if ( bFirst)
|
||||
m_pMchMgr->ResetHeadSet( sHead) ;
|
||||
// carico l'utensile (e lo rendo corrente)
|
||||
if ( ! m_pMchMgr->SetCalcTool( sTool, sHead, nExit))
|
||||
@@ -326,7 +326,7 @@ Simulator::UpdateTool( bool bForced)
|
||||
if ( ! UpdateAxes())
|
||||
return false ;
|
||||
// eventuale lancio script
|
||||
if ( ! OnToolSelect( m_sTool, sHead, nExit, sTcPos))
|
||||
if ( ! bFirst && ! OnToolSelect( m_sTool, sHead, nExit, sTcPos))
|
||||
return false ;
|
||||
}
|
||||
return true ;
|
||||
@@ -351,7 +351,7 @@ Simulator::UpdateTool( bool bForced)
|
||||
if ( ! UpdateAxes())
|
||||
return false ;
|
||||
// eventuale lancio script
|
||||
if ( ! OnToolSelect( m_sTool, sHead, nExit, sTcPos))
|
||||
if ( ! bFirst && ! OnToolSelect( m_sTool, sHead, nExit, sTcPos))
|
||||
return false ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user