EgtMachKernel 1.6k10 :

- sistemazioni varie in grezzi, lavorazioni, ....
This commit is contained in:
Dario Sassi
2015-12-07 08:03:39 +00:00
parent 5eb5cb387f
commit 42e1a696a1
33 changed files with 1354 additions and 277 deletions
+42 -2
View File
@@ -108,13 +108,16 @@ Simulator::Move( int& nStatus)
m_dCoeff = 0 ;
}
// Se arrivato alla fine di un percorso di lavoro, recupero un nuovo CLpath
if ( m_nEntId == GDB_ID_NULL) {
while ( m_nEntId == GDB_ID_NULL) {
m_nCLPathId = m_pGeomDB->GetNextGroup( m_nCLPathId) ;
// se non ce ne sono altri, devo passare a una nuova lavorazione
if ( m_nCLPathId == GDB_ID_NULL)
break ;
m_nEntId = m_pGeomDB->GetFirstInGroup( m_nCLPathId) ;
m_dCoeff = 0 ;
}
// Se arrivato alla fine di una lavorazione, recupero la successiva
if ( m_nCLPathId == GDB_ID_NULL) {
while ( m_nCLPathId == GDB_ID_NULL) {
m_nOpId = m_pMchMgr->GetNextOperation( m_nOpId) ;
// se non ce ne sono altre, sono alla fine
if ( m_nOpId == GDB_ID_NULL) {
@@ -191,6 +194,43 @@ Simulator::GetAxisInfoPos( int nI, string& sName, double& dVal)
return m_pMchMgr->GetAxisPos( sName, dVal) ;
}
//----------------------------------------------------------------------------
bool
Simulator::GetToolInfo( string& sName, double& dSpeed)
{
// Verifiche
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
return false ;
// Assegno il nome dell'utensile
if ( m_sTool.empty())
return false ;
sName = m_sTool ;
// Recupero speed
Machining* pMch = dynamic_cast<Machining*>( m_pGeomDB->GetUserObj( m_nOpId)) ;
return ( pMch != nullptr && pMch->GetParam( MPA_TOOLSPEED, dSpeed)) ;
}
//----------------------------------------------------------------------------
bool
Simulator::GetMoveInfo( int& nGmove, double& dFeed)
{
// Verifiche
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
return false ;
// Recupero il movimento corrente
CamData* pCamData = dynamic_cast<CamData*>( m_pGeomDB->GetUserObj( m_nEntId)) ;
if ( pCamData == nullptr)
return false ;
// Assegno feed
dFeed = pCamData->GetFeed() ;
// Assegno tipo di movimento
if ( dFeed < EPS_SMALL)
nGmove = 0 ;
else
nGmove = 1 ;
return true ;
}
//----------------------------------------------------------------------------
bool
Simulator::SetStep( double dStep)