From eed89dab37616a56a5f835c2c637cec9d26b4722 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 29 Oct 2024 16:51:32 +0100 Subject: [PATCH] EgtGeomKernel 2.6j4 : - in Vmill velocizzato taglio dexel con cilindri di grande diametro (come le lame). --- EgtGeomKernel.rc | Bin 11718 -> 11718 bytes VolZmapVolume.cpp | 24 +++++++++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/EgtGeomKernel.rc b/EgtGeomKernel.rc index 00e3f096eb5496deae6bf2db5e10a37c57ff402f..92988221aa5950607bfff205efac5187292b894c 100644 GIT binary patch delta 260 zcmX>WeJpyzI%aKGhCGIJh8%`WhGK>c1_cHUhESkLCPN8BDnkm89}HwAf_cT0FKS6| z{=m$^%xJRtHs5)s$u(R$lRrqRF`7)?C?LLBKq-!K^8{`$h_o$`0t*`mtzZFbKoS8e z?2(2l#9~eesm?k$`JT?a$*WeJpyzI%aiGhCGIJh8%`ehGHOAV9;O)W+-7u1ma8}FBB-731Uyas3kpFPd#gM z9Lqc=M&r%*`OY&hX`jGK#;zcG^Fwu6)J>CBt_NlipBAM6KDupe@OZchZce6ybVG-gbx%@?)4G64W6 Cb4btt 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 ; }