EgtMachKernel 1.8f2 :

- aggiunte Update di lavorazioni e disposizione per ricalcolo assi macchina ecollegamenti.
This commit is contained in:
Dario Sassi
2017-06-17 16:55:44 +00:00
parent 88d87de77e
commit a4c7789a91
22 changed files with 232 additions and 50 deletions
+44
View File
@@ -606,6 +606,25 @@ MachMgr::DispositionSpecialApply( int nId, bool bRecalc)
return pDisp->SpecialApply( bRecalc) ;
}
//----------------------------------------------------------------------------
bool
MachMgr::DispositionSpecialUpdate( int nId)
{
ResetLastError() ;
// verifico sia attiva
bool bActive ;
if ( ! GetOperationMode( nId, bActive))
return false ;
if ( ! bActive)
return true ;
// recupero la disposizione
Disposition* pDisp = ::GetDisposition( m_pGeomDB->GetUserObj( nId)) ;
if ( pDisp == nullptr)
return false ;
// lancio l'azione
return pDisp->SpecialUpdate() ;
}
//----------------------------------------------------------------------------
// Machinings
//----------------------------------------------------------------------------
@@ -932,6 +951,31 @@ MachMgr::MachiningApply( bool bRecalc)
return pMch->Apply( bRecalc) ;
}
//----------------------------------------------------------------------------
bool
MachMgr::MachiningUpdate( void)
{
ResetLastError() ;
// recupero la lavorazione corrente
int nCurrMchId = GetCurrMachining() ;
if ( nCurrMchId == GDB_ID_NULL)
return false ;
// verifico sia attiva
bool bActive ;
if ( ! GetOperationMode( nCurrMchId, bActive))
return false ;
if ( ! bActive)
return true ;
// ne recupero il gestore
Machining* pMch = GetMachining( m_pGeomDB->GetUserObj( nCurrMchId)) ;
if ( pMch == nullptr)
return false ;
// imposto fase della lavorazione come temporaneamente corrente
SetTempPhase TmpPhase( this, pMch->GetPhase()) ;
// aggiorno valori assi macchina e collegamento con operazione precedente
return pMch->Update() ;
}
//----------------------------------------------------------------------------
bool
MachMgr::GetMachiningParam( int nType, bool& bVal) const