EgtMachKernel :

- aggiunta gestione attrezzaggio anche in simulazione
- in ToolDeselect aggiunto nome prossimo utensile EMT.NEXTTOOL.
This commit is contained in:
Dario Sassi
2017-01-19 11:32:39 +00:00
parent f0c1bc3360
commit 03dd454ef9
5 changed files with 34 additions and 16 deletions
+6 -4
View File
@@ -177,7 +177,7 @@ Generator::ProcessDisposition( int nOpId, int nOpInd)
// Se utensile cambierà
if ( ! m_sTool.empty() && m_sTool != sTool) {
// emetto deselezione vecchio utensile
if ( ! OnToolDeselect( sHead, nExit, sTcPos))
if ( ! OnToolDeselect( sTool, sHead, nExit, sTcPos))
return false ;
}
// Aggiorno utensile e assi macchina
@@ -286,7 +286,7 @@ Generator::ProcessMachining( int nOpId, int nOpInd)
m_pMchMgr->TdbSetCurrTool( m_sTool) ;
}
// emetto deselezione vecchio utensile
if ( ! OnToolDeselect( sNextHead, nNextExit, sNextTcPos))
if ( ! OnToolDeselect( sTool, sNextHead, nNextExit, sNextTcPos))
return false ;
}
// Aggiorno utensile e assi macchina
@@ -781,10 +781,12 @@ Generator::OnToolSelect( const string& sTool, const string& sHead, int nExit, co
//----------------------------------------------------------------------------
bool
Generator::OnToolDeselect( const string& sNextHead, int nNextExit, const string& sNextTcPos)
Generator::OnToolDeselect( const std::string& sNextTool, const string& sNextHead, int nNextExit, const string& sNextTcPos)
{
// assegno il prossimo utensile
bool bOk = m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_NEXTTOOL, sNextTool) ;
// assegno la prossima testa
bool bOk = m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_NEXTHEAD, sNextHead) ;
bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_NEXTHEAD, sNextHead) ;
// assegno la prossima uscita
bOk = bOk && m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_NEXTEXIT, nNextExit) ;
// assegno l'eventuale prossima posizione nel TC