EgtMachKernel 1.8h1 :
- migliorata gestione oggetti utente operazioni - aggiunta SimGetOperationInfo.
This commit is contained in:
+25
-5
@@ -259,20 +259,40 @@ Simulator::GetAxisInfoPos( int nI, string& sName, string& sToken, bool& bLinear,
|
||||
bool
|
||||
Simulator::GetToolInfo( string& sName, double& dSpeed) const
|
||||
{
|
||||
// Inizializzo i parametri di ritorno
|
||||
sName.clear() ;
|
||||
dSpeed = 0 ;
|
||||
// Verifiche
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
// Assegno il nome dell'utensile
|
||||
sName = m_sTool ;
|
||||
if ( sName.empty()) {
|
||||
dSpeed = 0 ;
|
||||
if ( sName.empty())
|
||||
return true ;
|
||||
}
|
||||
// Recupero speed
|
||||
Machining* pMch = GetMachining( m_pGeomDB->GetUserObj( m_nOpId)) ;
|
||||
const Machining* pMch = GetMachining( m_pGeomDB->GetUserObj( m_nOpId)) ;
|
||||
return ( pMch != nullptr && pMch->GetParam( MPA_SPEED, dSpeed)) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Simulator::GetOperationInfo( string& sName, int& nType) const
|
||||
{
|
||||
// Inizializzo i parametri di ritorno
|
||||
sName.clear() ;
|
||||
nType = OPER_NULL ;
|
||||
// Verifiche
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
// Recupero il tipo
|
||||
Operation* pOpe = GetOperation( m_pGeomDB->GetUserObj( m_nOpId)) ;
|
||||
if ( pOpe == nullptr)
|
||||
return false ;
|
||||
nType = pOpe->GetType() ;
|
||||
// Recupero il nome
|
||||
return m_pGeomDB->GetName( m_nOpId, sName) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Simulator::GetMoveInfo( int& nGmove, double& dFeed) const
|
||||
@@ -281,7 +301,7 @@ Simulator::GetMoveInfo( int& nGmove, double& dFeed) const
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
// Recupero il movimento corrente
|
||||
CamData* pCamData = GetCamData( m_pGeomDB->GetUserObj( m_nEntId)) ;
|
||||
const CamData* pCamData = GetCamData( m_pGeomDB->GetUserObj( m_nEntId)) ;
|
||||
if ( pCamData == nullptr)
|
||||
return false ;
|
||||
// Assegno feed
|
||||
|
||||
Reference in New Issue
Block a user