EgtMachKernel :

- gestione rinvio da sotto con gestione normale e con rotazione alla MDC.
This commit is contained in:
Dario Sassi
2017-06-10 15:44:40 +00:00
parent 948a9b2251
commit 88d87de77e
11 changed files with 373 additions and 1001 deletions
+26 -2
View File
@@ -1569,6 +1569,8 @@ Operation::RemoveHome( void)
bool
Operation::CalcDeltaZForHeadRotation( const DBLVECTOR& vAxStart, const DBLVECTOR& vAxEnd, double& dDeltaZ)
{
if ( m_pMchMgr == nullptr)
return false ;
// il numero di assi deve essere costante
if ( vAxStart.size() != vAxEnd.size())
return false ;
@@ -1638,7 +1640,7 @@ Operation::TestCollisionAvoid( const DBLVECTOR& vAxStart, const DBLVECTOR& vAxEn
// Se testa con Info ZMAXONROT != 0 e movimento assi rotanti -> collisione
int nHeadId = pMch->GetCurrHead() ;
int nVal = 0 ;
if ( m_pGeomDB->GetInfo( nHeadId, "ZMAXONROT", nVal) && nVal != 0) {
if ( m_pGeomDB->GetInfo( nHeadId, MCH_ZMAXONROT, nVal) && nVal != 0) {
int nLinAxes = m_pMchMgr->GetCurrLinAxes() ;
int nRotAxes = m_pMchMgr->GetCurrRotAxes() ;
for ( int i = nLinAxes ; i < nLinAxes + nRotAxes ; ++ i) {
@@ -1763,7 +1765,7 @@ bool
Operation::SpecialMoveZup( Vector3d& vtTool, DBLVECTOR& vAx, bool& bModif)
{
// recupero la macchina corrente
Machine* pMch = m_pMchMgr->GetCurrMachine() ;
Machine* pMch = ( m_pMchMgr != nullptr ? m_pMchMgr->GetCurrMachine() : nullptr) ;
if ( pMch == nullptr)
return false ;
// costanti
@@ -1815,3 +1817,25 @@ Operation::SpecialMoveZup( Vector3d& vtTool, DBLVECTOR& vAx, bool& bModif)
return true ;
}
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
bool
Operation::GetAggrBottomData( const string& sHead, AggrBottom& agbData)
{
// inizializzo la struttura
agbData.Clear() ;
// verifiche
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
return false ;
// recupero identificativo della testa
int nHeadId = m_pMchMgr->GetHeadId( sHead) ;
if ( nHeadId == GDB_ID_NULL)
return false ;
// leggo i dati
m_pGeomDB->GetInfo( nHeadId, MCH_AGB_TYPE, agbData.nType) ;
m_pGeomDB->GetInfo( nHeadId, MCH_AGB_DMAX, agbData.dDMax) ;
m_pGeomDB->GetInfo( nHeadId, MCH_AGB_ENCH, agbData.dEncH) ;
m_pGeomDB->GetInfo( nHeadId, MCH_AGB_ENCV, agbData.dEncV) ;
return true ;
}