From 52a26ceb527880f859fc8fe6de4f5cdb29f2a8eb Mon Sep 17 00:00:00 2001 From: DarioS Date: Mon, 4 Oct 2021 09:15:29 +0200 Subject: [PATCH] EgtMachKernel 2.3j1 : - corretto controlli attacchi/uscite lame in fresature con testa da sotto. --- EgtMachKernel.rc | Bin 11774 -> 11782 bytes Milling.cpp | 15 +++++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index f5678ce7651596ce230c5092fbf7fbe2567d29e2..e177d567b791f9a17bd6c9783e66a7d3d43d5097 100644 GIT binary patch delta 129 zcmewt-4?Uq8ymYJg8_pMgW=}iY}U-oSqz4gA4=+OPUGrfL6W)1H2H*J9zs?KMHWS$ T2jk{d(k{&SG=r2Vhj0M^?&c=# delta 121 zcmZpR`4_$68yl-7gARlF=D%##%*>e#=93+TbvI`TxiM~D$L+=pm%PX{`HWy5l7b!< PxEzK?X*?R0=5PZ5z=0$Q diff --git a/Milling.cpp b/Milling.cpp index 00168b3..719d55f 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -1480,7 +1480,7 @@ Milling::AdjustEndPointForAxesCalc( const CamData* pCamData, Point3d& ptP) const // se utensile lama if ( ( m_TParams.m_nType & TF_SAWBLADE) != 0) { // traslazione opposta a quanto fatto in AdjustPathDrawForSaw - double dOffset = 0.5 * m_TParams.m_dTDiam - 10 * EPS_SMALL ; + double dOffset = 0.5 * m_TParams.m_dDiam - 10 * EPS_SMALL ; ptP.Translate( dOffset * pCamData->GetCorrDir()) ; } // negli altri casi, non devo fare alcunché @@ -1501,7 +1501,7 @@ Milling::AdjustArcCenterForAxesCalc( const CamData* pCamData, Point3d& ptCen) co // se versori correzione uguali, correggo il centro if ( AreSameVectorApprox( pCamData->GetCorrDir(), pPrevCamData->GetCorrDir())) { // traslazione opposta a quanto fatto in AdjustPathDrawForSaw - double dOffset = 0.5 * m_TParams.m_dTDiam - 10 * EPS_SMALL ; + double dOffset = 0.5 * m_TParams.m_dDiam - 10 * EPS_SMALL ; ptCen.Translate( dOffset * pCamData->GetCorrDir()) ; } } @@ -1943,7 +1943,7 @@ Milling::AdjustPathDrawForSaw( int nClPathId) if ( ( m_TParams.m_nType & TF_SAWBLADE) == 0) return true ; // porto il percorso praticamente sull'estremo della lama ( appena meno per evitare di trasformare archi in punti) - double dOffset = 0.5 * m_TParams.m_dTDiam - 10 * EPS_SMALL ; + double dOffset = 0.5 * m_TParams.m_dDiam - 10 * EPS_SMALL ; Vector3d vtPrevCorr ; for ( int nId = m_pGeomDB->GetFirstInGroup( nClPathId) ; nId != GDB_ID_NULL ; @@ -2237,7 +2237,8 @@ Milling::AddStandardMilling( const ICurveComposite* pCompo, const Vector3d& vtTo // determino se l'inizio dell'attacco è fuori dal grezzo bool bOutStart = GetPointOutOfRaw( ptP1, vtTool, dElev, dSafeZ) ; // determino se l'inizio dell'attacco è sopra il grezzo - bool bAboveStart = m_bAboveHead && GetPointAboveRaw( ptP1, vtTool) ; + bool bGeomAboveStart = GetPointAboveRaw( ptP1, vtTool) ; + bool bAboveStart = ( m_bAboveHead && bGeomAboveStart) ; // imposto versore correzione e ausiliario sul punto di partenza CalcAndSetCorrAuxDir( pCompo, i) ; // aggiungo approccio per frese normali @@ -2273,7 +2274,7 @@ Milling::AddStandardMilling( const ICurveComposite* pCompo, const Vector3d& vtTo double dSawStartElev = 0 ; bool bUnderStart = m_bAboveHead && GetPointUnderRaw( ptP1, vtTool, m_TParams.m_dTDiam / 2, GetRadiusForStartEndElevation( false), m_TParams.m_dLen, true, dSafeZ, dSawStartElev) ; - if ( ! bUnderStart && bOk) { + if ( ! bGeomAboveStart && ! bUnderStart && bOk) { m_pMchMgr->SetLastError( 2314, "Error in Milling : LeadIn must be out of rawpart") ; bOk = false ; } @@ -2382,11 +2383,13 @@ Milling::AddStandardMilling( const ICurveComposite* pCompo, const Vector3d& vtTo // verifico di uscire in aria bool bOutEnd = GetPointOutOfRaw( ptP1, vtTool, dElev, dSafeZ) ; if ( ! bOutEnd) { + // verifico se sono sopra + bool bGeomAboveEnd = GetPointAboveRaw( ptP1, vtTool) ; // verifico se sono sotto double dSawEndElev = 0 ; bool bUnderEnd = m_bAboveHead && GetPointUnderRaw( ptP1, vtTool, m_TParams.m_dTDiam / 2, GetRadiusForStartEndElevation( false), m_TParams.m_dLen, true, dSafeZ, dSawEndElev) ; - if ( ! bUnderEnd && bOk) { + if ( ! bGeomAboveEnd && ! bUnderEnd && bOk) { m_pMchMgr->SetLastError( 2324, "Error in Milling : LeadOut must be out of rawpart") ; bOk = false ; }