From e524e44a1daf32d1347eda611bd7de2e5e50ccb9 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 10 Oct 2017 07:50:35 +0000 Subject: [PATCH] EgtMachKernel 1.8j2 : - corretta spezzatura attacchi e uscite ad arco su contornature su richiesta. --- EgtMachKernel.rc | Bin 11782 -> 11782 bytes Milling.cpp | 22 ++++++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 3aa2010dc5e2057252e54478264f4ee19e35347f..7fce8fb98057cb0a795294bbc32ac0b7124bf62d 100644 GIT binary patch delta 97 zcmZpRX^YwLhmFx_^ItYwW=5mQj>5W|vxM9jH?QON0rG*u7nvrX5iEd9O=7{OSQ@Kh Hr8(RHP01iS delta 97 zcmZpRX^YwLhmFy2^ItYwW=6xwj>5W|vxM9jH?QON0rG*u7nvrX5iEd9O=7{OSQ@Kh Hr8(RHOf?`f diff --git a/Milling.cpp b/Milling.cpp index ea5b0ce..a262376 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -2749,7 +2749,16 @@ Milling::AddLeadIn( const Point3d& ptP1, const Point3d& ptStart, const Vector3d& if ( IsNull( pCrv)) return false ; pCrv->Invert() ; - return ( AddCurveMove( pCrv, MCH_CL_LEADIN) != GDB_ID_NULL) ; + // eventuale spezzatura + if ( bSplitArcs) { + PtrOwner pCompo( CreateCurveComposite()) ; + if ( IsNull( pCompo) || ! pCompo->AddCurve( Release( pCrv)) || ! ApproxWithLines( pCompo)) + return false ; + return ( AddCurveMove( pCompo, MCH_CL_LEADIN) != GDB_ID_NULL) ; + } + else { + return ( AddCurveMove( pCrv, MCH_CL_LEADIN) != GDB_ID_NULL) ; + } } case MILL_LI_GLIDE : { @@ -2905,7 +2914,16 @@ Milling::AddLeadOut( const Point3d& ptEnd, const Vector3d& vtEnd, const Vector3d PtrOwner pCrv( GetArc2PVN( ptEnd, ptP1, vtEnd, vtN)) ; if ( IsNull( pCrv)) return false ; - return ( AddCurveMove( pCrv, MCH_CL_LEADOUT) != GDB_ID_NULL) ; + // eventuale spezzatura + if ( bSplitArcs) { + PtrOwner pCompo( CreateCurveComposite()) ; + if ( IsNull( pCompo) || ! pCompo->AddCurve( Release( pCrv)) || ! ApproxWithLines( pCompo)) + return false ; + return ( AddCurveMove( pCompo, MCH_CL_LEADOUT) != GDB_ID_NULL) ; + } + else { + return ( AddCurveMove( pCrv, MCH_CL_LEADOUT) != GDB_ID_NULL) ; + } } case MILL_LO_GLIDE : {