From 3ef50b6a90a5ceb2d8ca8a0fc8df9bc0451e3f26 Mon Sep 17 00:00:00 2001 From: DarioS Date: Wed, 21 Dec 2022 09:44:49 +0100 Subject: [PATCH] EgtMachKernel 2.4l3 : - modifiche a fesature per spostare punto di attacco su percorsi chiusi (sovrapposizione > 0.001 e allungamento attacco diventa spostamento inizio). --- EgtMachKernel.rc | Bin 11782 -> 11782 bytes Milling.cpp | 31 +++++++++++++++++++++---------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 5eb031e1a7351de490a6f020d524e1141853e1d2..ded0507e5bc993bd4d462ef99f6a8b122b0a3263 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 diff --git a/Milling.cpp b/Milling.cpp index ca0f89f..3210946 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -1648,6 +1648,19 @@ Milling::ProcessPath( int nPathId, int nPvId, int nClId) } } + // eventuale spostamento inizio per percorso chiuso con sovrapposizione + if ( pCompo->IsClosed() && m_Params.m_dOverlap > EPS_SMALL && abs( m_Params.m_dStartAddLen) > EPS_SMALL) { + double dPos = -m_Params.m_dStartAddLen ; + if ( dPos < 0) { + double dLen ; + pCompo->GetLength( dLen) ; + dPos += dLen ; + } + double dPar ; + if ( pCompo->GetParamAtLength( dPos, dPar)) + pCompo->ChangeStartPoint( dPar) ; + } + // se utensile non centrato, eseguo correzione raggio utensile ed eventuale offset double dOffs = 0.5 * m_TParams.m_dDiam + GetOffsR() ; if ( m_Params.m_nWorkSide != MILL_WS_CENTER && abs( dOffs) > EPS_SMALL) { @@ -1662,16 +1675,14 @@ Milling::ProcessPath( int nPathId, int nPvId, int nClId) // eventuale sovrapposizione per percorso chiuso m_dAddedOverlap = 0 ; - if ( pCompo->IsClosed()) { - if ( m_Params.m_dOverlap > EPS_SMALL) { - double dParS, dParE ; - if ( pCompo->GetParamAtLength( 0.0, dParS) && - pCompo->GetParamAtLength( m_Params.m_dOverlap, dParE)) { - PtrOwner pCrv( pCompo->CopyParamRange( dParS, dParE)) ; - if ( ! IsNull( pCrv)) { - pCompo->AddCurve( Release( pCrv)) ; - m_dAddedOverlap = m_Params.m_dOverlap ; - } + if ( pCompo->IsClosed() && m_Params.m_dOverlap > EPS_SMALL) { + double dParS, dParE ; + if ( pCompo->GetParamAtLength( 0.0, dParS) && + pCompo->GetParamAtLength( m_Params.m_dOverlap, dParE)) { + PtrOwner pCrv( pCompo->CopyParamRange( dParS, dParE)) ; + if ( ! IsNull( pCrv)) { + pCompo->AddCurve( Release( pCrv)) ; + m_dAddedOverlap = m_Params.m_dOverlap ; } } }