EgtMachKernel :
- aggiunto controllo che gli assi mossi in Disposition siano assi dipendenti dalla tavola (MachMgr::IsDispositionAxis).
This commit is contained in:
@@ -405,6 +405,35 @@ MachMgr::ResetAxisPos( const string& sAxis)
|
||||
return ( ( pMch != nullptr) ? pMch->ResetAxisPos( sAxis) : false) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
MachMgr::IsDispositionAxis( const string& sAxis, const string& sTable) const
|
||||
{
|
||||
Machine* pMch = GetCurrMachine() ;
|
||||
if ( m_pGeomDB == nullptr || pMch == nullptr)
|
||||
return false ;
|
||||
// recupero Id asse
|
||||
int nAxId = pMch->GetAxisId( sAxis) ;
|
||||
if ( nAxId == GDB_ID_NULL)
|
||||
return false ;
|
||||
// recupero eventuale Id tavola
|
||||
int nTabId = GDB_ID_NULL ;
|
||||
if ( ! sTable.empty()) {
|
||||
nTabId = pMch->GetTableId( sTable) ;
|
||||
if ( nTabId == GDB_ID_NULL)
|
||||
return false ;
|
||||
}
|
||||
// se direttamente dipendente dalla tavola
|
||||
int nParentId = m_pGeomDB->GetParentId( nAxId) ;
|
||||
if ( ( nTabId != GDB_ID_NULL && nParentId == nTabId) || pMch->IsTableGroup( nParentId))
|
||||
return true ;
|
||||
// altrimenti deve dipendere da asse dipendente dalla tavola
|
||||
if ( ! pMch->IsAxisGroup( nParentId))
|
||||
return false ;
|
||||
int nGrParId = m_pGeomDB->GetParentId( nParentId) ;
|
||||
return ( ( nTabId != GDB_ID_NULL && nGrParId == nTabId) || pMch->IsTableGroup( nGrParId)) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
MachMgr::ResetAllAxesPos( void)
|
||||
|
||||
Reference in New Issue
Block a user