EgtMachKernel :
. modifiche in simulazione per richiamo OnSelectTool all'inizio (EMT.FIRST a true).
This commit is contained in:
+8
-4
@@ -326,7 +326,7 @@ Simulator::UpdateTool( bool bFirst)
|
||||
if ( ! UpdateAxes())
|
||||
return false ;
|
||||
// eventuale lancio script
|
||||
if ( ! bFirst && ! OnToolSelect( m_sTool, sHead, nExit, sTcPos))
|
||||
if ( ! OnToolSelect( m_sTool, sHead, nExit, sTcPos, bFirst))
|
||||
return false ;
|
||||
}
|
||||
return true ;
|
||||
@@ -351,7 +351,7 @@ Simulator::UpdateTool( bool bFirst)
|
||||
if ( ! UpdateAxes())
|
||||
return false ;
|
||||
// eventuale lancio script
|
||||
if ( ! bFirst && ! OnToolSelect( m_sTool, sHead, nExit, sTcPos))
|
||||
if ( ! OnToolSelect( m_sTool, sHead, nExit, sTcPos, bFirst))
|
||||
return false ;
|
||||
return true ;
|
||||
}
|
||||
@@ -482,7 +482,7 @@ Simulator::FindAndManageOperationStart( bool bFirst, int& nStatus)
|
||||
// cambio fase
|
||||
m_pMchMgr->SetCurrPhase( pDisp->GetPhase()) ;
|
||||
// aggiorno utensile e assi conseguenti
|
||||
if ( ! UpdateTool()) {
|
||||
if ( ! UpdateTool( bFirst)) {
|
||||
nStatus = MCH_SIM_ERR ;
|
||||
return false ;
|
||||
}
|
||||
@@ -855,7 +855,8 @@ Simulator::OnDispositionEnd( void)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Simulator::OnToolSelect( const string& sTool, const string& sHead, int nExit, const string& sTcPos)
|
||||
Simulator::OnToolSelect( const string& sTool, const string& sHead, int nExit, const string& sTcPos,
|
||||
bool bFirst)
|
||||
{
|
||||
// assegno il nome dell'utensile, la testa e l'uscita
|
||||
if ( ! m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_TOOL, sTool) ||
|
||||
@@ -877,6 +878,9 @@ Simulator::OnToolSelect( const string& sTool, const string& sHead, int nExit, co
|
||||
return false ;
|
||||
}
|
||||
}
|
||||
// assegno il flag di chiamata di utensile iniziale
|
||||
if ( ! m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_FIRST, bFirst))
|
||||
return false ;
|
||||
// verifico esistenza funzione
|
||||
if ( ! m_pMachine->LuaExistsFunction( ON_SIMUL_TOOL_SELECT))
|
||||
return true ;
|
||||
|
||||
Reference in New Issue
Block a user