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) ; } } }