diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 3aa2010..7fce8fb 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ 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 : {