From 71c04f4987d839033eb5bd16df19b1ebac7eba77 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 17 Dec 2019 16:45:10 +0000 Subject: [PATCH] EgtMachKernel 2.1l5 : - corretta fresatura su contorno chiuso con overlap ed attacco/uscita ad inseguimento. --- EgtMachKernel.rc | Bin 11782 -> 11782 bytes Milling.cpp | 20 +++++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 61e6c9dcaf3cd2733bb8aa047f6cddb111446615..c7268ecbf2753fb2defd6b1218706932eb3f93ec 100644 GIT binary patch delta 97 zcmZpRX^YwLhmFy6^ItYwW=7M=j>5W|vxM9jH?QON0rG*u7nvrX5iEd9O=7{OSQ@Kh Hr8(RHQiUK= delta 97 zcmZpRX^YwLhmFx>^ItYwW=50Aj>5W|vxM9jH?QON0rG*u7nvrX5iEd9O=7{OSQ@Kh Hr8(RHQ1Kv2 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()))