diff --git a/EgtGeomKernel.rc b/EgtGeomKernel.rc index 00e3f09..9298822 100644 Binary files a/EgtGeomKernel.rc and b/EgtGeomKernel.rc differ diff --git a/VolZmapVolume.cpp b/VolZmapVolume.cpp index 20e3680..df6681a 100644 --- a/VolZmapVolume.cpp +++ b/VolZmapVolume.cpp @@ -55,13 +55,13 @@ VolZmap::SubtractIntervals( int nGrid, int nI, int nJ, } // Riporto le coordinate cicliche delle normali nell'ordine di partenza (da griglia a sistema intrinseco) - if ( !bSkipSwap && nGrid == 1) { + if ( ! bSkipSwap && nGrid == 1) { swap( vtNmi.x, vtNmi.z) ; swap( vtNmi.y, vtNmi.z) ; swap( vtNma.x, vtNma.z) ; swap( vtNma.y, vtNma.z) ; } - else if ( !bSkipSwap && nGrid == 2) { + else if ( ! bSkipSwap && nGrid == 2) { swap( vtNmi.y, vtNmi.z) ; swap( vtNmi.x, vtNmi.z) ; swap( vtNma.y, vtNma.z) ; @@ -4544,11 +4544,25 @@ VolZmap::CompCyl_Milling( int nGrid, const Point3d& ptS, const Point3d& ptE, double dLongLen = vtMoveLong.Len() ; double dOrtLen = vtMoveOrt.Len() ; + int nSkip = 0 ; + for ( int i = nStartI ; i <= nEndI ; ++ i) { for ( int j = nStartJ ; j <= nEndJ ; ++ j) { Point3d ptC( ( i + 0.5) * m_dStep, ( j + 0.5) * m_dStep, 0) ; - + + // salto il controllo degli spilloni sotto il piano limite in basso o sopra il piano limite in alto + if ( ( ptC - ptITip) * vtToolDir < -EPS_SMALL && + ( ptC + Z_AX * m_dMaxZ[nGrid] - ptITip) * vtToolDir < -EPS_SMALL) { + ++ nSkip ; + continue ; + } + if ( ( ptC - ptI - vtMoveLong) * vtToolDir > EPS_SMALL && + ( ptC + Z_AX * m_dMaxZ[nGrid] - ptI - vtMoveLong) * vtToolDir > EPS_SMALL) { + ++ nSkip ; + continue ; + } + Point3d ptInt1, ptInt2 ; Vector3d vtN1, vtN2 ; @@ -4592,6 +4606,10 @@ VolZmap::CompCyl_Milling( int nGrid, const Point3d& ptS, const Point3d& ptE, } } } + + //string sLog = "Skipped dexel = " + ToString( nSkip) + " / " + ToString( ( nEndI - nStartI + 1) * ( nEndJ - nStartJ + 1)) ; + //LOG_DBG_INFO( GetEGkLogger(), sLog.c_str()) + return true ; }