From 89d46baf43b1be8f935e9fc65a18bca678530432 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 17 Apr 2024 06:58:27 +0200 Subject: [PATCH] EgtMachKernel 2.6d4 : - aggiunta gestione riferimento canonico per calcolo cinematica robot comunque disposto nello spazio - adattamento funzioni di calcolo posizione, direzione utensile e ausiliaria da questi angoli - in svuotatura corretta mancata esplosione di archi in rette sui percorsi di ritorno quando richiesta. --- EgtMachKernel.rc | Bin 11774 -> 11774 bytes Machine.cpp | 1 + Machine.h | 1 + MachineCalc.cpp | 39 +++++++++++++++++++++++++++++++++------ Operation.cpp | 2 +- Pocketing.cpp | 8 +++++++- 6 files changed, 43 insertions(+), 8 deletions(-) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index cbfee2e7c38ffc2aa112e121d0573ed2ab86711a..2a174e2167ce6debe0d94194f84f65769d9592ff 100644 GIT binary patch delta 236 zcmewt{V#gMI%aKGhCGIJh8%`WhGK>c1_cHUhESkLCPN8BDnkm89}HwAf_cT0IklxX ze_&=~W;EISUhX2(<& nF)y2}rOv|(a;PWRX*mp)Acsx= 0 ; --i) vtTool.Rotate( m_vCalcRotAx[i].vtDir, vAng1[i]) ; double dAng6 ; bool bDet6 ; - if ( ! vtTool.GetRotation( vtDirT, vtR6, EPS_SMALL, dAng6, bDet6) || ! bDet6) { + if ( ! vtTool.GetRotation( vtDirTL, vtR6, EPS_SMALL, dAng6, bDet6) || ! bDet6) { Vector3d vtAux = m_vtCalcADir ; for ( int i = 4; i >= 0 ; --i) vtAux.Rotate( m_vCalcRotAx[i].vtDir, vAng1[i]) ; - if ( ! vtAux.GetRotation( vtDirA, vtR6, EPS_SMALL, dAng6, bDet6) || ! bDet6) { + if ( ! vtAux.GetRotation( vtDirAL, vtR6, EPS_SMALL, dAng6, bDet6) || ! bDet6) { LOG_ERROR( GetEMkLogger(), "Error : R6 not calculable (robot)") return false ; } diff --git a/Operation.cpp b/Operation.cpp index 3c04180..d336d83 100644 --- a/Operation.cpp +++ b/Operation.cpp @@ -42,7 +42,7 @@ using namespace std ; //---------------------------------------------------------------------------- const double MAX_DIST_RAW = 200.0 ; -const double MAX_ROBOT_G0_LEN = 300.0 ; +const double MAX_ROBOT_G0_LEN = 299.0 ; //---------------------------------------------------------------------------- bool diff --git a/Pocketing.cpp b/Pocketing.cpp index ffee199..b55c615 100644 --- a/Pocketing.cpp +++ b/Pocketing.cpp @@ -4223,8 +4223,14 @@ Pocketing::CalcCircleSpiral( const Point3d& ptCen, const Vector3d& vtN, double d return false ; } pRCrv->AddCurve( Release( pArc2)) ; - // inverto e eventualmente sistemo archi + // inverto pRCrv->Invert() ; + // se necessario, approssimo con rette + if ( bSplitArcs && ! ApproxWithLines( pRCrv)) { + m_pMchMgr->SetLastError( 2419, "Error in Pocketing : Linear Approx not computable") ; + return false ; + } + // eventuale sistemazione archi VerifyArcs( pRCrv) ; }