diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 61e6c9d..c7268ec 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ diff --git a/Milling.cpp b/Milling.cpp index 35724db..880b8c1 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -3406,7 +3406,7 @@ Milling::CalcLeadInStart( const Point3d& ptStart, const Vector3d& vtStart, const } else { double dU ; - if ( ! pCompo->GetParamAtLength( dTang, dU) || + if ( ! pCompo->GetParamAtLength( m_dAddedOverlap + dTang, dU) || ! pCompo->GetPointD1D2( dU, ICurve::FROM_MINUS, ptP1)) { if ( ! pCompo->GetEndPoint( ptP1)) return false ; @@ -3483,6 +3483,11 @@ 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())) @@ -3491,9 +3496,11 @@ Milling::AddLeadIn( const Point3d& ptP1, const Point3d& ptStart, const Vector3d& } else { double dU ; - if ( pCompo->GetParamAtLength( dTang, 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())) @@ -3648,9 +3655,11 @@ Milling::AddLeadOut( const Point3d& ptEnd, const Vector3d& vtEnd, const Vector3d PtrOwner pCrv ; if ( ! bInvert) { double dU ; - if ( pCompo->GetParamAtLength( dTang, 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())) @@ -3664,6 +3673,11 @@ 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()))