From a60e8e2da796c2011fbcfeecb6dadc0391526d76 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 31 Dec 2024 15:50:57 +0100 Subject: [PATCH] EgtMachKerenel : - modifiche a NewLinkMgr, ora con codice 1 controlla le aree protette solo sui link mentre con codice 2 le controlla anche nelle lavorazione (con codice 0 come prima le controlla sempre). --- MachineCalc.cpp | 3 +++ Operation.cpp | 2 +- SurfFinishing.cpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/MachineCalc.cpp b/MachineCalc.cpp index 8a79d89..305e9ea 100644 --- a/MachineCalc.cpp +++ b/MachineCalc.cpp @@ -1747,6 +1747,9 @@ Machine::VerifyProtectedAreas( double dX, double dY, double dZ, const DBLVECTOR& // se non esiste funzione gestione aree protette, non devo fare alcunchè if ( ! LuaExistsFunction( ON_VERIFY_PROTECTEDAREAS)) return true ; + // se non è collegamento e aree protette solo per questi, non devo fare alcunchè + if ( nLinkType == 0 && m_nNewLinkMgr == 1) + return true ; // default bool bOk = true ; int nErr = 99 ; diff --git a/Operation.cpp b/Operation.cpp index 6e7f7b5..33b2b5e 100644 --- a/Operation.cpp +++ b/Operation.cpp @@ -2960,7 +2960,7 @@ Operation::ManageProtectedAreas( const DBLVECTOR& vAxStart, const DBLVECTOR& vAx bool bNewLink = m_pMchMgr->GetCurrMachine()->GetNewLinkMgr() ; // codifica tipo di collegamento - int nLinkType = 0 + ( pPrevOp == nullptr ? 0 : 2) + ( pNextOp == nullptr ? 0 : 1) ; + int nLinkType = ( pPrevOp == nullptr ? 0 : 2) + ( pNextOp == nullptr ? 0 : 1) ; // Verifico se il collegamento le attraversa Point3d ptSta( vAxStart[0], vAxStart[1], vAxStart[2]) ; diff --git a/SurfFinishing.cpp b/SurfFinishing.cpp index 77ef9c9..d79a4fb 100644 --- a/SurfFinishing.cpp +++ b/SurfFinishing.cpp @@ -3394,7 +3394,7 @@ SurfFinishing::ChooseFinishingForOptimal( const ISurfFlatRegion* pSfr, int nChun if ( AreSameOrOppositeVectorApprox( vtTanMaxLine, vtX)) { bSpiral = false ; // ZigZag X_AX.GetAngle( vtX, dSideAng) ; - abs( dSideAng) ; + dSideAng = abs( dSideAng) ; } } }