EgtMachKernel 1.8f2 :
- aggiunte Update di lavorazioni e disposizione per ricalcolo assi macchina ecollegamenti.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user