EgtMachKernel 1.6k6 :

- aggiunta a simulazione funzione per info e posizione assi.
This commit is contained in:
Dario Sassi
2015-11-16 08:16:45 +00:00
parent 052e1ba5e1
commit 7bf96be389
5 changed files with 31 additions and 1 deletions
+18 -1
View File
@@ -70,7 +70,7 @@ Simulator::Start( void)
return false ;
// cerco la prima lavorazione
nOpId = m_pMchMgr->GetNextOperation( nOpId) ;
while ( nOpId != GDB_ID_NULL && ( m_pMchMgr->GetOperationType( nOpId) & OPER_MACH) == 0)
while ( nOpId != GDB_ID_NULL && ! IsValidMachiningType( m_pMchMgr->GetOperationType( nOpId)))
nOpId = m_pMchMgr->GetNextOperation( nOpId) ;
if ( nOpId == GDB_ID_NULL)
return false ;
@@ -97,6 +97,9 @@ Simulator::Start( void)
bool
Simulator::Move( void)
{
// Verifiche
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
return false ;
// Se arrivato alla fine dell'interpolazione, recupero una nuova entità
if ( m_dCoeff > 0.999) {
m_nEntId = m_pGeomDB->GetNext( m_nEntId) ;
@@ -152,6 +155,20 @@ Simulator::Move( void)
return true ;
}
//----------------------------------------------------------------------------
bool
Simulator::GetAxisInfoPos( int nI, string& sName, double& dVal)
{
// Verifiche
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
return false ;
// recupero i dati dell'asse
if ( nI < 0 || nI >= int( m_AxesName.size()))
return false ;
sName = m_AxesName[nI] ;
return m_pMchMgr->GetAxisPos( sName, dVal) ;
}
//----------------------------------------------------------------------------
bool
Simulator::SetStep( double dStep)