EgtMachKernel 1.6u6 :
- aggiustamenti nel calcolo assi rotanti - aggiunto Hint assi in note di lavorazione come suggerimento angoli iniziali.
This commit is contained in:
+63
-1
@@ -454,7 +454,7 @@ Machine::FreeKinematicRotAxis( int nId)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Machine::IsKinematicRotAxisBlocked( int nInd)
|
||||
Machine::IsKinematicRotAxisBlocked( int nInd) const
|
||||
{
|
||||
int nRotAxTot = int( m_vCalcRotAx.size()) ;
|
||||
if ( nInd < 0 || nInd >= nRotAxTot)
|
||||
@@ -1006,6 +1006,21 @@ Machine::GetNearestAngleInStroke( int nInd, double dAngRef, double& dAng) const
|
||||
dAng <= m_vCalcRotAx[nInd].stroke.Max) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Machine::LimitAngleToStroke( int nInd, double& dAng) const
|
||||
{
|
||||
// se angolo fittizio (non esiste l'asse rotante corrispondente), non c'è alcunchè da fare
|
||||
if ( nInd < 0 || nInd >= int( m_vCalcRotAx.size()))
|
||||
return true ;
|
||||
// se angolo fuori corsa, lo porto all'estremo più vicino
|
||||
if ( dAng < m_vCalcRotAx[nInd].stroke.Min)
|
||||
dAng = m_vCalcRotAx[nInd].stroke.Min ;
|
||||
else if ( dAng > m_vCalcRotAx[nInd].stroke.Max)
|
||||
dAng = m_vCalcRotAx[nInd].stroke.Max ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Machine::VerifyOutstroke( double dX, double dY, double dZ, const DBLVECTOR& vAng, int& nStat) const
|
||||
@@ -1061,6 +1076,29 @@ Machine::GetCurrRotAxes( void) const
|
||||
return int( m_vCalcRotAx.size()) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Machine::GetCurrAxisName( int nInd, string& sAxName) const
|
||||
{
|
||||
int nLinAxes = int( m_vCalcLinAx.size()) ;
|
||||
int nRotAxes = int( m_vCalcRotAx.size()) ;
|
||||
if ( nInd >= 0 && nInd < nLinAxes) {
|
||||
Axis* pAx = GetAxis( m_vCalcLinAx[nInd].nGrpId) ;
|
||||
if ( pAx == nullptr)
|
||||
return false ;
|
||||
sAxName = pAx->GetName() ;
|
||||
return true ;
|
||||
}
|
||||
else if ( nInd >= nLinAxes && nInd < nLinAxes + nRotAxes) {
|
||||
Axis* pAx = GetAxis( m_vCalcRotAx[nInd-nLinAxes].nGrpId) ;
|
||||
if ( pAx == nullptr)
|
||||
return false ;
|
||||
sAxName = pAx->GetName() ;
|
||||
return true ;
|
||||
}
|
||||
return false ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Machine::GetAllCurrAxesName( STRVECTOR& vAxName) const
|
||||
@@ -1086,6 +1124,30 @@ Machine::GetAllCurrAxesName( STRVECTOR& vAxName) const
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Machine::GetCurrAxisToken( int nInd, string& sAxToken) const
|
||||
{
|
||||
int nLinAxes = int( m_vCalcLinAx.size()) ;
|
||||
int nRotAxes = int( m_vCalcRotAx.size()) ;
|
||||
if ( nInd >= 0 && nInd < nLinAxes) {
|
||||
Axis* pAx = GetAxis( m_vCalcLinAx[nInd].nGrpId) ;
|
||||
if ( pAx == nullptr)
|
||||
return false ;
|
||||
sAxToken = pAx->GetToken() ;
|
||||
return true ;
|
||||
}
|
||||
else if ( nInd >= nLinAxes && nInd < nLinAxes + nRotAxes) {
|
||||
Axis* pAx = GetAxis( m_vCalcRotAx[nInd-nLinAxes].nGrpId) ;
|
||||
if ( pAx == nullptr)
|
||||
return false ;
|
||||
sAxToken = pAx->GetToken() ;
|
||||
return true ;
|
||||
}
|
||||
return false ;
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Machine::GetAllCurrAxesToken( STRVECTOR& vAxToken) const
|
||||
|
||||
Reference in New Issue
Block a user