From 41089de7ef65fa3aae7a1fa67acb8896f12ca0ce Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 20 Nov 2017 14:25:23 +0000 Subject: [PATCH] EgtMachKernel 1.8k3 : - correzione a lavorazione Chisel per casi con direzione utensile non perpendicolare al piano del percorso. --- Chiseling.cpp | 18 +++++++++++++----- EgtMachKernel.rc | Bin 11782 -> 11782 bytes 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Chiseling.cpp b/Chiseling.cpp index 4094ee0..1869892 100644 --- a/Chiseling.cpp +++ b/Chiseling.cpp @@ -1030,7 +1030,7 @@ Chiseling::ProcessPath( int nPathId, int nPvId, int nClId) // valore offset double dSignOffs = ( m_Params.m_nWorkSide == CHISEL_WS_RIGHT) ? dOffs : - dOffs ; // flag offset - int nFlag = ICurve::OFF_EXTEND ; + int nFlag = ICurve::OFF_EXTEND | ICurve::OFF_MEDIA_INTDZ ; // se percorso chiuso senza overlap ed inizio/fine è un angolo esterno if ( pCompo->IsClosed()) { Vector3d vtStart, vtEnd ; @@ -1143,10 +1143,18 @@ Chiseling::ProcessPath( int nPathId, int nPvId, int nClId) // devono essere due rette if ( pPrevCrv->GetType() == CRV_LINE && pCurrCrv->GetType() == CRV_LINE) { // devono essere abbastanza lunghe e formare un angolo retto dalla parte della correzione - double dPrevLen ; pPrevCrv->GetLength( dPrevLen) ; - double dCurrLen ; pCurrCrv->GetLength( dCurrLen) ; - Vector3d vtPrevDir ; pPrevCrv->GetEndDir( vtPrevDir) ; - Vector3d vtCurrDir ; pCurrCrv->GetStartDir( vtCurrDir) ; + double dPrevLen ; + pPrevCrv->GetLength( dPrevLen) ; + double dCurrLen ; + pCurrCrv->GetLength( dCurrLen) ; + Vector3d vtPrevDir ; + pPrevCrv->GetEndDir( vtPrevDir) ; + vtPrevDir -= ( vtPrevDir * vtExtr) * vtExtr ; + vtPrevDir.Normalize() ; + Vector3d vtCurrDir ; + pCurrCrv->GetStartDir( vtCurrDir) ; + vtCurrDir -= ( vtCurrDir * vtExtr) * vtExtr ; + vtCurrDir.Normalize() ; double dProVett = ( vtPrevDir ^ vtCurrDir) * vtExtr ; const double SIN_ANG_LIM = sin( ( ANG_RIGHT - 100 * EPS_ANG_SMALL) * DEGTORAD) ; if ( dPrevLen > 0.5 * m_TParams.m_dDiam - EPS_SMALL && diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 88d4e72aa859df94513fde00bdbc3cd260d00abd..4cb8c28373853a7bd89384579910b97c4311c1c3 100644 GIT binary patch delta 97 zcmZpRX^YwLhmFyA^ItYwW=7-5j>5W|vxM9jH?QON0rG*u7nvrX5iEd9O=7{OSQ@Kh Hr8(RHPhB8F delta 97 zcmZpRX^YwLhmFx_^ItYwW=5mQj>5W|vxM9jH?QON0rG*u7nvrX5iEd9O=7{OSQ@Kh Hr8(RHP01iS