EgtMachKernel 1.6e6 :

- prima gestione sottopezzi
- migliorata verifica extracorse assi.
This commit is contained in:
Dario Sassi
2015-05-19 20:23:48 +00:00
parent 8ac8373376
commit fe07bb767d
8 changed files with 98 additions and 22 deletions
+22 -16
View File
@@ -331,32 +331,38 @@ Machine::VerifyOutOfStroke( double dX, double dY, double dZ, double dAngA, doubl
// default tutto ok
nStat = 0 ;
// primo lineare
if ( dX < m_vCalcLinAx[0].stroke.Min)
nStat += 1 ;
else if( dX > m_vCalcLinAx[0].stroke.Max)
nStat += 2 ;
if ( m_vCalcLinAx.size() >= 1) {
if ( dX < m_vCalcLinAx[0].stroke.Min)
nStat += 1 ;
else if( dX > m_vCalcLinAx[0].stroke.Max)
nStat += 2 ;
}
// secondo lineare
if ( dY < m_vCalcLinAx[1].stroke.Min)
nStat += 4 ;
else if( dY > m_vCalcLinAx[1].stroke.Max)
nStat += 8 ;
if ( m_vCalcLinAx.size() >= 2) {
if ( dY < m_vCalcLinAx[1].stroke.Min)
nStat += 4 ;
else if( dY > m_vCalcLinAx[1].stroke.Max)
nStat += 8 ;
}
// terzo lineare
if ( dZ < m_vCalcLinAx[2].stroke.Min)
nStat += 16 ;
else if( dZ > m_vCalcLinAx[2].stroke.Max)
nStat += 32 ;
if ( m_vCalcLinAx.size() >= 3) {
if ( dZ < m_vCalcLinAx[2].stroke.Min)
nStat += 16 ;
else if( dZ > m_vCalcLinAx[2].stroke.Max)
nStat += 32 ;
}
// eventuale primo rotante
if ( abs( nStat) >= 1) {
if ( m_vCalcRotAx.size() >= 1) {
if ( dAngA < m_vCalcRotAx[0].stroke.Min)
nStat += 64 ;
else if( dAngA > m_vCalcRotAx[0].stroke.Max)
nStat += 128 ;
}
// eventuale secondo rotante
if ( abs( nStat) >= 2) {
if ( dAngB < m_vCalcLinAx[1].stroke.Min)
if ( m_vCalcRotAx.size() >= 2) {
if ( dAngB < m_vCalcRotAx[1].stroke.Min)
nStat += 256 ;
else if( dAngB > m_vCalcLinAx[1].stroke.Max)
else if( dAngB > m_vCalcRotAx[1].stroke.Max)
nStat += 512 ;
}
return true ;