From 91644356a67bed8070e8c93bd25f8d8200f71c2b Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Sat, 11 Feb 2017 16:05:34 +0000 Subject: [PATCH] EgtMachKernel 1.8b3 : - correzioni per visualizzare/nascondere aggregati su TC in simulazione e convivere con LookMachine. --- EgtMachKernel.rc | Bin 11774 -> 11774 bytes Machine.cpp | 5 +++-- MachineHeads.cpp | 3 ++- Simulator.cpp | 15 +++++++++------ 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 530556c6b010ed8c4faab7b18bad1f1c7e47a1c5..5e0760e88f2d833bbfe2311e85ad1d36f39d591c 100644 GIT binary patch delta 97 zcmewt{V#gMFE&Qw&A-`fnHh~IKa|wnoW?bQ1uSxrY4Qod0+^@}R1`^_2jk{d(jGv4 NK<#LXK~l;gTmUD-Bai?9 delta 97 zcmewt{V#gMFE&P_&A-`fnHh~HKa|wnoW?bQ1uSxrY4Qod0+^@}R1`^_2jk{d(jGv4 NK<#LXK~l;gTmU8!BZvS1 diff --git a/Machine.cpp b/Machine.cpp index cdbefa1..d19033c 100644 --- a/Machine.cpp +++ b/Machine.cpp @@ -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 ; } diff --git a/MachineHeads.cpp b/MachineHeads.cpp index 1a4b6b0..6985669 100644 --- a/MachineHeads.cpp +++ b/MachineHeads.cpp @@ -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 ; } \ No newline at end of file diff --git a/Simulator.cpp b/Simulator.cpp index 1168476..d5c94d5 100644 --- a/Simulator.cpp +++ b/Simulator.cpp @@ -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 ; }