EgtMachKernel 1.8b3 :

- correzioni per visualizzare/nascondere aggregati su TC in simulazione e convivere con LookMachine.
This commit is contained in:
Dario Sassi
2017-02-11 16:05:34 +00:00
parent 58acb18f79
commit 91644356a6
4 changed files with 14 additions and 9 deletions
BIN
View File
Binary file not shown.
+3 -2
View File
@@ -690,11 +690,12 @@ Machine::EnableHeadInSet( const string& sHead)
const STRVECTOR& vsHSet = GetHSet( sHead) ;
if ( vsHSet.empty())
return false ;
// spengo tutte le teste tranne questa
// spengo tutte le teste dell'insieme tranne questa
for ( size_t i = 0 ; i < vsHSet.size() ; ++ i) {
int nH = GetGroup( vsHSet[i]) ;
bool bShow = ( vsHSet[i] == sHead) ;
m_pGeomDB->SetStatus( nH, ( bShow ? GDB_ST_ON : GDB_ST_OFF)) ;
m_pGeomDB->SetMode( nH, ( bShow ? GDB_MD_STD : GDB_MD_HIDDEN)) ;
//m_pGeomDB->SetStatus( nH, ( bShow ? GDB_ST_ON : GDB_ST_OFF)) ;
}
return true ;
}
+2 -1
View File
@@ -178,7 +178,8 @@ Machine::ResetHeadSet( const string& sHead)
pExit->SetTool( "") ;
}
// visualizzo solo la prima testa
m_pGeomDB->SetStatus( nHdGrp, ( i == 0 ? GDB_ST_ON : GDB_ST_OFF)) ;
m_pGeomDB->SetMode( nHdGrp, ( i == 0 ? GDB_MD_STD : GDB_MD_HIDDEN)) ;
//m_pGeomDB->SetStatus( nHdGrp, ( i == 0 ? GDB_ST_ON : GDB_ST_OFF)) ;
}
return true ;
}
+9 -6
View File
@@ -314,8 +314,8 @@ Simulator::UpdateTool( bool bForced)
// ripristino l'utensile corrente
m_pMchMgr->TdbSetCurrTool( m_sTool) ;
}
// se cambierà e non forzato (inizio), scarico l'utensile corrente
if ( sTool != m_sTool && ! bForced) {
// se cambierà ed esiste il corrente, lo scarico
if ( sTool != m_sTool && ! m_sTool.empty()) {
// eventuale lancio script per scarico utensile
if ( ! OnToolDeselect( sTool, sHead, nExit, sTcPos))
return false ;
@@ -344,9 +344,12 @@ Simulator::UpdateTool( bool bForced)
// recupero i dati
string sTool ; string sHead ; int nExit ; string sTcPos ;
pDisp->GetToolData( sTool, sHead, nExit, sTcPos) ;
// eventuale lancio script per scarico utensile
if ( ! OnToolDeselect( sTool, sHead, nExit, sTcPos))
return false ;
// se cambierà ed esiste il corrente, lo scarico
if ( sTool != m_sTool && ! m_sTool.empty()) {
// eventuale lancio script per scarico utensile
if ( ! OnToolDeselect( sTool, sHead, nExit, sTcPos))
return false ;
}
// carico l'utensile
if ( ! m_pMchMgr->SetCalcTool( sTool, sHead, nExit))
return false ;
@@ -452,7 +455,7 @@ Simulator::FindAndManageOperationStart( bool bFirst, int& nStatus)
Machining* pMch = GetMachining( m_pGeomDB->GetUserObj( m_nOpId)) ;
if ( pMch != nullptr && ! pMch->IsEmpty()) {
// aggiorno utensile e assi conseguenti
if ( ! UpdateTool()) {
if ( ! UpdateTool( bFirst)) {
nStatus = MCH_SIM_ERR ;
return false ;
}