diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index a67e72e..c7a0d6c 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ diff --git a/Milling.cpp b/Milling.cpp index bc54437..47bc613 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -3480,29 +3480,29 @@ Milling::AddLeadIn( const Point3d& ptP1, const Point3d& ptStart, const Vector3d& pCompo->GetDomain( dParS, dParE) ; if ( ! pCrv.Set( CreateCurveComposite()) || ! pCrv->AddCurve( pCompo->CopyParamRange( dU, dParE))) return false ; - if ( m_dAddedOverlap > EPS_SMALL) { - pCrv->Invert() ; - pCrv->TrimStartAtLen( m_dAddedOverlap) ; - pCrv->Invert() ; - } } else { if ( ! pCrv.Set( pCompo->Clone())) return false ; } + if ( m_dAddedOverlap > EPS_SMALL) { + pCrv->Invert() ; + pCrv->TrimStartAtLen( m_dAddedOverlap) ; + pCrv->Invert() ; + } } else { double dU ; if ( pCompo->GetParamAtLength( m_dAddedOverlap + dTang, dU)) { if ( ! pCrv.Set( CreateCurveComposite()) || ! pCrv->AddCurve( pCompo->CopyParamRange( 0, dU))) return false ; - if ( m_dAddedOverlap > EPS_SMALL) - pCrv->TrimStartAtLen( m_dAddedOverlap) ; } else { if ( ! pCrv.Set( pCompo->Clone())) return false ; } + if ( m_dAddedOverlap > EPS_SMALL) + pCrv->TrimStartAtLen( m_dAddedOverlap) ; pCrv->Invert() ; } pCrv->SetExtrusion( vtN) ; @@ -3655,13 +3655,13 @@ Milling::AddLeadOut( const Point3d& ptEnd, const Vector3d& vtEnd, const Vector3d if ( pCompo->GetParamAtLength( m_dAddedOverlap + dTang, dU)) { if ( ! pCrv.Set( CreateCurveComposite()) || ! pCrv->AddCurve( pCompo->CopyParamRange( 0, dU))) return false ; - if ( m_dAddedOverlap > EPS_SMALL) - pCrv->TrimStartAtLen( m_dAddedOverlap) ; } else { if ( ! pCrv.Set( pCompo->Clone())) return false ; } + if ( m_dAddedOverlap > EPS_SMALL) + pCrv->TrimStartAtLen( m_dAddedOverlap) ; } else { double dLen, dU ; @@ -3670,17 +3670,14 @@ Milling::AddLeadOut( const Point3d& ptEnd, const Vector3d& vtEnd, const Vector3d pCompo->GetDomain( dParS, dParE) ; if ( ! pCrv.Set( CreateCurveComposite()) || ! pCrv->AddCurve( pCompo->CopyParamRange( dU, dParE))) return false ; - if ( m_dAddedOverlap > EPS_SMALL) { - pCrv->Invert() ; - pCrv->TrimStartAtLen( m_dAddedOverlap) ; - pCrv->Invert() ; - } } else { if ( ! pCrv.Set( pCompo->Clone())) return false ; } pCrv->Invert() ; + if ( m_dAddedOverlap > EPS_SMALL) + pCrv->TrimStartAtLen( m_dAddedOverlap) ; } pCrv->SetExtrusion( vtN) ; // la porto alla giusta quota