From b7bfccdfebbdfae3b25ff811235de6a8ecf6aa82 Mon Sep 17 00:00:00 2001 From: DarioS Date: Thu, 5 May 2022 00:00:56 +0200 Subject: [PATCH] EgtMachKernel : - in svuotature ZigZag consentite con utensili che non lavorano di testa se iniziano dall'esterno (quindi anche ottimizzate). --- Pocketing.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Pocketing.cpp b/Pocketing.cpp index 2ee1665..72cc99c 100644 --- a/Pocketing.cpp +++ b/Pocketing.cpp @@ -1926,14 +1926,6 @@ Pocketing::AddZigZag( const ICurveComposite* pCompo, const Vector3d& vtTool, con // lunghezza di approccio/retrazione double dAppr = m_Params.m_dStartPos ; - // se utensile che non lavora di testa poichè ingresso non fuori dal pezzo, errore - if ( m_TParams.m_nType == TT_MILL_NOTIP) { - if ( ! LeadInIsOk()) { - m_pMchMgr->SetLastError( 2431, "Error in Pocketing : LeadIn with Mill NoTip in material") ; - return false ; - } - } - // determino numero e affondamento degli step int nStep = 1 ; nStep = max( 1, static_cast( ceil( dElev / dOkStep))) ; @@ -1966,11 +1958,19 @@ Pocketing::AddZigZag( const ICurveComposite* pCompo, const Vector3d& vtTool, con double dTestElev ; if ( ! GetElevation( m_nPhase, ptStart, vtTool, m_TParams.m_dDiam / 2, vtTool, dTestElev) || dTestElev < EPS_SMALL) bOutRawLeadIn = true ; - // sistemo attacco e uscita + // sistemo attacco e uscita (per essere completamente fuori dal grezzo) if ( bOutRawLeadIn) vpCrvs[0]->ExtendStartByLen( m_TParams.m_dDiam / 2 + dSafeZ) ; vpCrvs[0]->ExtendEndByLen( m_TParams.m_dDiam / 4) ; } + + // se non ottimizzato e utensile che non lavora di testa poichè ingresso non fuori dal pezzo, errore + if ( ( ! bOptimizedZigZag || ! bOutRawLeadIn) && m_TParams.m_nType == TT_MILL_NOTIP) { + if ( ! LeadInIsOk()) { + m_pMchMgr->SetLastError( 2431, "Error in Pocketing : LeadIn with Mill NoTip in material") ; + return false ; + } + } // se caso non ottimizzato calcolo curva offsettata del raggio utensile + sovramateriale + (se non lucidatura) extra double dTRad = m_TParams.m_dDiam / 2 ;