EgtMachKernel :

- in generazione anticipata dichiarazione utensile per OnDispositionStart con movimenti testa.
This commit is contained in:
Dario Sassi
2016-11-19 18:27:34 +00:00
parent a369920354
commit 2c36cd98fe
+22 -19
View File
@@ -164,6 +164,28 @@ Generator::ProcessDisposition( int nOpId, int nOpInd)
bool bEmpty = pDisp->IsEmpty() ;
bool bSomeByHand = pDisp->GetSomeByHand() ;
// Se disposizione con movimenti macchina
if ( ! pDisp->IsEmpty()) {
// Recupero l'utensile della disposizione corrente
string sTool ; string sHead ; int nExit ; string sTcPos ;
if ( ! pDisp->GetToolData( sTool, sHead, nExit, sTcPos))
return false ;
// Se utensile cambierà
if ( ! m_sTool.empty() && m_sTool != sTool) {
// emetto deselezione vecchio utensile
if ( ! OnToolDeselect( sHead, nExit, sTcPos))
return false ;
}
// Aggiorno utensile e assi macchina
if ( ! UpdateDispTool( sTool, sHead, nExit) || ! UpdateAxes())
return false ;
// Se utensile cambiato, emetto selezione nuovo utensile
if ( m_sTool != m_sPrevTool) {
if ( ! OnToolSelect( sTool, sHead, nExit, sTcPos))
return false ;
}
}
// Emetto inizio disposizione
if ( ! OnDispositionStart( nOpId, nOpInd, nPhase, bEmpty, bSomeByHand))
return false ;
@@ -208,25 +230,6 @@ Generator::ProcessDisposition( int nOpId, int nOpInd)
// Se disposizione con movimenti macchina
if ( ! pDisp->IsEmpty()) {
// Recupero l'utensile della disposizione corrente
string sTool ; string sHead ; int nExit ; string sTcPos ;
if ( ! pDisp->GetToolData( sTool, sHead, nExit, sTcPos))
return false ;
// Se utensile cambierà
if ( ! m_sTool.empty() && m_sTool != sTool) {
// emetto deselezione vecchio utensile
if ( ! OnToolDeselect( sHead, nExit, sTcPos))
return false ;
}
// Aggiorno utensile e assi macchina
if ( ! UpdateDispTool( sTool, sHead, nExit) || ! UpdateAxes())
return false ;
// Se utensile cambiato, emetto selezione nuovo utensile
if ( m_sTool != m_sPrevTool) {
if ( ! OnToolSelect( sTool, sHead, nExit, sTcPos))
return false ;
}
// Ciclo su tutti i percorsi CL della disposizione
int nClPathInd = 0 ;
int nClId = m_pGeomDB->GetFirstNameInGroup( nOpId, MCH_CL) ;