EgtMachKernel :
- nella scelta angoli quando delta dal precedente vale +/-180 si privilegia 180.
This commit is contained in:
+2
-2
@@ -1458,9 +1458,9 @@ Machine::GetNearestAngleInStroke( int nInd, double dAngRef, double& dAng) const
|
||||
if ( nInd < 0 || nInd >= int( m_vCalcRotAx.size()))
|
||||
return true ;
|
||||
// cerco l'angolo più vicino stando nella corsa
|
||||
while ( dAng - dAngRef > ANG_STRAIGHT && dAng - ANG_FULL >= m_vCalcRotAx[nInd].stroke.Min)
|
||||
while ( dAng - dAngRef > ANG_STRAIGHT + EPS_ANG_ZERO && dAng - ANG_FULL >= m_vCalcRotAx[nInd].stroke.Min)
|
||||
dAng -= ANG_FULL ;
|
||||
while ( dAng - dAngRef < -ANG_STRAIGHT && dAng + ANG_FULL <= m_vCalcRotAx[nInd].stroke.Max)
|
||||
while ( dAng - dAngRef < -ANG_STRAIGHT + EPS_ANG_ZERO && dAng + ANG_FULL <= m_vCalcRotAx[nInd].stroke.Max)
|
||||
dAng += ANG_FULL ;
|
||||
return ( dAng >= m_vCalcRotAx[nInd].stroke.Min &&
|
||||
dAng <= m_vCalcRotAx[nInd].stroke.Max) ;
|
||||
|
||||
Reference in New Issue
Block a user