diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 5eb031e..ded0507 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ 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 ; } } }