EgtMachKernel 1.6k6 :
- aggiunta a simulazione funzione per info e posizione assi.
This commit is contained in:
Binary file not shown.
@@ -166,6 +166,7 @@ class MachMgr : public IMachMgr
|
||||
// Simulation
|
||||
virtual bool SimStart( void) ;
|
||||
virtual bool SimMove( void) ;
|
||||
virtual bool SimGetAxisInfoPos( int nI, std::string& sName, double& dVal) ;
|
||||
virtual bool SimSetStep( double dStep) ;
|
||||
virtual bool SimStop( void) ;
|
||||
// Generation
|
||||
|
||||
@@ -48,6 +48,17 @@ MachMgr::SimMove( void)
|
||||
return m_pSimul->Move() ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
MachMgr::SimGetAxisInfoPos( int nI, string& sName, double& dVal)
|
||||
{
|
||||
// verifico simulatore
|
||||
if ( m_pSimul == nullptr)
|
||||
return false ;
|
||||
// recupero quote
|
||||
return m_pSimul->GetAxisInfoPos( nI, sName, dVal) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
MachMgr::SimSetStep( double dStep)
|
||||
|
||||
+18
-1
@@ -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)
|
||||
|
||||
@@ -27,6 +27,7 @@ class Simulator
|
||||
bool Init( MachMgr* pMchMgr) ;
|
||||
bool Start( void) ;
|
||||
bool Move( void) ;
|
||||
bool GetAxisInfoPos( int nI, std::string& sName, double& dVal) ;
|
||||
bool SetStep( double dStep) ;
|
||||
bool Stop( void) ;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user