From a677bb991f1df8607c7625a754a3a6e4603da899 Mon Sep 17 00:00:00 2001 From: DarioS Date: Sat, 14 May 2022 12:11:40 +0200 Subject: [PATCH] EgtMachKernel 2.4e2 : - corretta GetPartDirFromAngles per asse rotante di testa speciale (ralla). --- EgtMachKernel.rc | Bin 11774 -> 11774 bytes MachineCalc.cpp | 10 +++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index a93b572ff1443f22bf2c4222c721317f69d517b9..966ab6205843ba3e9830e33c8be9af1f686e1647 100644 GIT binary patch delta 97 zcmewt{V#gMFE&P_&A-`fnHh~HKa|wnoW?bQ1uSxrY4Qod0+^@}R1`^_2jk{d(jGv4 NK<#LXK~l;gTmU8!BZvS1 delta 97 zcmewt{V#gMFE&QQ&A-`fnHdcyKa|wnoW?bQ1uSxrY4Qod0+^@}R1`^_2jk{d(jGv4 NK<#LXK~l;gTmU3rBY*$^ diff --git a/MachineCalc.cpp b/MachineCalc.cpp index bead7ee..30660d1 100644 --- a/MachineCalc.cpp +++ b/MachineCalc.cpp @@ -1305,7 +1305,7 @@ Machine::GetAuxDirFromAngles( const DBLVECTOR& vAng, Vector3d& vtDir) const bool Machine::GetPartDirFromAngles( const Vector3d& vtPart, const DBLVECTOR& vAng, Vector3d& vtDir) const { - // è espressa nel riferimento di macchina (tiene conto delle sole rotazioni di tavola) + // è espressa nel riferimento di macchina (tiene conto delle sole rotazioni di tavola e asse rotante speciale di testa) // verifico dimensione vettore angoli rispetto al numero di assi rotanti if ( vAng.size() < m_vCalcRotAx.size()) @@ -1321,6 +1321,14 @@ Machine::GetPartDirFromAngles( const Vector3d& vtPart, const DBLVECTOR& vAng, Ve vtDir.Rotate( m_vCalcRotAx[i-1].vtDir, vAng[i-1]) ; } + // eseguo rotazione inversa eventuale asse rotante speciale di testa + if ( m_nHeadSpecRotAxis != -1) { + if ( m_nHeadSpecRotAxis < 0 || m_nHeadSpecRotAxis >= int( m_vCalcRotAx.size())) + return false ; + int i = m_nHeadSpecRotAxis ; + vtDir.Rotate( m_vCalcRotAx[i].vtDir, -vAng[i]) ; + } + return true ; }