From fece411fa792fe0899e8b6290b704448359b1a13 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 9 May 2024 20:22:50 +0200 Subject: [PATCH] EgtMachKernel : - piccola correzione nei collegamenti tra le passate delle Fresature OneWay. --- Milling.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Milling.cpp b/Milling.cpp index 010559a..3c6509c 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -3053,7 +3053,8 @@ Milling::AddOneWayMilling( const ICurveComposite* pCompo, const Vector3d& vtTool else bUhBelowStartEnd = GetPointBelowRaw( ptPs, vtTool) && GetPointBelowRaw( ptPe, vtTool) ; // verifico se collegamento diretto tra ingresso e uscita è fuori dal grezzo - bool bSafeDirLinkStartEnd = ( bAhAboveStartEnd || bUhBelowStartEnd) ; + bool bSafeDirLinkStartEnd = ( bAhAboveStartEnd || bUhBelowStartEnd || + ( ! bMidRetract && m_bStartOutRaw && m_bEndOutRaw)) ; if ( ! bSafeDirLinkStartEnd) { // verifica dei punti intermedi bool bIsOut = true ; @@ -3241,7 +3242,7 @@ Milling::AddOneWayMilling( const ICurveComposite* pCompo, const Vector3d& vtTool // aggiungo opportuno approccio if ( ! AddSawBladeSideApproach( ptP1, vtAppr, vtTool, dSafeZ, dSawStartElev, dStElev, dAppr, - k == 1, bSplitArcs, bAddInsert)) { + k == 1, bSplitArcs, bAddInsert && bMidRetract)) { m_pMchMgr->SetLastError( 2309, "Error in Milling : Approach not computable") ; return false ; } @@ -3337,7 +3338,7 @@ Milling::AddOneWayMilling( const ICurveComposite* pCompo, const Vector3d& vtTool return false ; } // se step finale o intermedi con retrazione - if ( k == nStep || bMidRetract) { + if ( k == nStep || bMidRetract || ! bSafeDirLinkStartEnd) { // determino se la fine dell'uscita è fuori dal grezzo Vector3d vtRetr( vtTool.x, vtTool.y, 0) ; if ( ! vtRetr.Normalize()) @@ -3429,7 +3430,7 @@ Milling::AddOneWayMilling( const ICurveComposite* pCompo, const Vector3d& vtTool bOk = false ; } // aggiungo opportuna retrazione - if ( ! AddSawBladeSideRetract( ptP1, vtRetr, vtTool, dSafeZ, dSawEndElev, dEndElev, dAppr, bAddExtract)) { + if ( ! AddSawBladeSideRetract( ptP1, vtRetr, vtTool, dSafeZ, dSawEndElev, dEndElev, dAppr, bAddExtract && bMidRetract)) { m_pMchMgr->SetLastError( 2312, "Error in Milling : Retract not computable") ; return false ; }