EgtMachKernel 2.7h1 :

- in simulazione corretta segnalazione extracorsa per robot
- aggiunta gestione suggerimento angoli iniziali come home con comando "Home".
This commit is contained in:
Dario Sassi
2025-08-03 13:37:44 +02:00
parent 9d447b875b
commit 3f8d6867e2
5 changed files with 74 additions and 43 deletions
+32 -24
View File
@@ -1702,39 +1702,47 @@ Machine::VerifyOutstroke( double dX, double dY, double dZ, const DBLVECTOR& vAng
DBLVECTOR vLin( 3) ; vLin[0] = dX ; vLin[1] = dY ; vLin[2] = dZ ;
for ( size_t i = 0 ; i < m_vCalcLinAx.size() && i < vLin.size() ; ++ i) {
if ( vLin[i] < m_vCalcLinAx[i].stroke.Min) {
if ( nStat == 0) {
m_OutstrokeInfo.sAxName = GetAxis( m_vCalcLinAx[i].nGrpId)->GetName() ;
m_OutstrokeInfo.sAxToken = GetAxis( m_vCalcLinAx[i].nGrpId)->GetToken() ;
m_OutstrokeInfo.bLinear = true ;
m_OutstrokeInfo.dExtra = vLin[i] - m_vCalcLinAx[i].stroke.Min ;
m_OutstrokeInfo.sAuxInfo = " (L" + ToString( int(i) + 1) + "-) " ;
}
nStat += ( 1 << ( 2 * i)) ;
m_OutstrokeInfo.sAxName = GetAxis( m_vCalcLinAx[i].nGrpId)->GetName() ;
m_OutstrokeInfo.sAxToken = GetAxis( m_vCalcLinAx[i].nGrpId)->GetToken() ;
m_OutstrokeInfo.bLinear = true ;
m_OutstrokeInfo.dExtra = vLin[i] - m_vCalcLinAx[i].stroke.Min ;
m_OutstrokeInfo.sAuxInfo = " (L" + ToString( int(i) + 1) + "-) " ;
}
else if( vLin[i] > m_vCalcLinAx[i].stroke.Max) {
else if ( vLin[i] > m_vCalcLinAx[i].stroke.Max) {
if ( nStat == 0) {
m_OutstrokeInfo.sAxName = GetAxis( m_vCalcLinAx[i].nGrpId)->GetName() ;
m_OutstrokeInfo.sAxToken = GetAxis( m_vCalcLinAx[i].nGrpId)->GetToken() ;
m_OutstrokeInfo.bLinear = true ;
m_OutstrokeInfo.dExtra = vLin[i] - m_vCalcLinAx[i].stroke.Max ;
m_OutstrokeInfo.sAuxInfo = " (L" + ToString( int(i) + 1) + "+) " ;
}
nStat += ( 2 << ( 2 * i)) ;
m_OutstrokeInfo.sAxName = GetAxis( m_vCalcLinAx[i].nGrpId)->GetName() ;
m_OutstrokeInfo.sAxToken = GetAxis( m_vCalcLinAx[i].nGrpId)->GetToken() ;
m_OutstrokeInfo.bLinear = true ;
m_OutstrokeInfo.dExtra = vLin[i] - m_vCalcLinAx[i].stroke.Max ;
m_OutstrokeInfo.sAuxInfo = " (L" + ToString( int(i) + 1) + "+) " ;
}
}
// verifica degli assi rotanti
for ( size_t i = 0 ; i < m_vCalcRotAx.size() && i < vAng.size() ; ++ i) {
if ( vAng[i] < m_vCalcRotAx[i].stroke.Min) {
if ( nStat == 0) {
m_OutstrokeInfo.sAxName = GetAxis( m_vCalcRotAx[i].nGrpId)->GetName() ;
m_OutstrokeInfo.sAxToken = GetAxis( m_vCalcRotAx[i].nGrpId)->GetToken() ;
m_OutstrokeInfo.bLinear = false ;
m_OutstrokeInfo.dExtra = vAng[i] - m_vCalcRotAx[i].stroke.Min ;
m_OutstrokeInfo.sAuxInfo = " (R" + ToString( int(i) + 1) + "-) " ;
}
nStat += ( 64 << ( 2 * i)) ;
m_OutstrokeInfo.sAxName = GetAxis( m_vCalcRotAx[i].nGrpId)->GetName() ;
m_OutstrokeInfo.sAxToken = GetAxis( m_vCalcRotAx[i].nGrpId)->GetToken() ;
m_OutstrokeInfo.bLinear = false ;
m_OutstrokeInfo.dExtra = vAng[i] - m_vCalcRotAx[i].stroke.Min ;
m_OutstrokeInfo.sAuxInfo = " (R" + ToString( int(i) + 1) + "-) " ;
}
else if( vAng[i] > m_vCalcRotAx[i].stroke.Max) {
else if ( vAng[i] > m_vCalcRotAx[i].stroke.Max) {
if ( nStat == 0) {
m_OutstrokeInfo.sAxName = GetAxis( m_vCalcRotAx[i].nGrpId)->GetName() ;
m_OutstrokeInfo.sAxToken = GetAxis( m_vCalcRotAx[i].nGrpId)->GetToken() ;
m_OutstrokeInfo.bLinear = false ;
m_OutstrokeInfo.dExtra = vAng[i] - m_vCalcRotAx[i].stroke.Max ;
m_OutstrokeInfo.sAuxInfo = " (R" + ToString( int(i) + 1) + "+) " ;
}
nStat += ( 128 << ( 2 * i)) ;
m_OutstrokeInfo.sAxName = GetAxis( m_vCalcRotAx[i].nGrpId)->GetName() ;
m_OutstrokeInfo.sAxToken = GetAxis( m_vCalcRotAx[i].nGrpId)->GetToken() ;
m_OutstrokeInfo.bLinear = false ;
m_OutstrokeInfo.dExtra = vAng[i] - m_vCalcRotAx[i].stroke.Max ;
m_OutstrokeInfo.sAuxInfo = " (R" + ToString( int(i) + 1) + "+) " ;
}
}
// verifica delle aree protette
@@ -1856,9 +1864,9 @@ Machine::GetOutstrokeInfo( bool bMM) const
if ( m_OutstrokeInfo.sAxName == AXIS_NAME_PROTECTEDAREAS)
return m_OutstrokeInfo.sAuxInfo ;
else if ( bMM || ! m_OutstrokeInfo.bLinear)
return m_OutstrokeInfo.sAxToken + "=" + ToString( m_OutstrokeInfo.dExtra, 1) + m_OutstrokeInfo.sAuxInfo ;
return m_OutstrokeInfo.sAxToken + "=" + ToString( m_OutstrokeInfo.dExtra, 2) + m_OutstrokeInfo.sAuxInfo ;
else
return m_OutstrokeInfo.sAxToken + "=" + ToString( m_OutstrokeInfo.dExtra / ONEINCH, 2) + m_OutstrokeInfo.sAuxInfo ;
return m_OutstrokeInfo.sAxToken + "=" + ToString( m_OutstrokeInfo.dExtra / ONEINCH, 3) + m_OutstrokeInfo.sAuxInfo ;
}
//----------------------------------------------------------------------------