From 9e12f9d3b622e12e52b4eb079fa02b14883275e0 Mon Sep 17 00:00:00 2001 From: DarioS Date: Tue, 18 Apr 2023 09:47:45 +0200 Subject: [PATCH] EgtMachKernel : - corretto Virtual Milling in Simulazione per frese che non lavorano di testa ma che si muovono con un piccolo angolo verso il basso (max 5deg). --- Simulator.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Simulator.cpp b/Simulator.cpp index 08d3a7c..dc8c7f8 100644 --- a/Simulator.cpp +++ b/Simulator.cpp @@ -1303,12 +1303,15 @@ Simulator::ExecLineVmill( int nVmId, int nCurrTool, double dVmTdOffs, double dVm } // Se utensile che non lavora di testa if ( ! m_bCutOnTip) { - // se movimento di testa, non eseguo asportazione + // se movimento di testa (angolo movimento verso la testa oltre 5.8deg), non eseguo asportazione Vector3d vtDirM = Media( vtHiL, vtHfL) ; vtDirM.Normalize() ; - double dAxMove = ( ptHfL - ptHiL) * vtDirM ; - if ( dAxMove < -EPS_SMALL && dAxMove < -0.5 * abs( dAxMove)) - return true ; + double dAxMove = ( ptHfL - ptHiL) * vtDirM ; + if ( dAxMove < -EPS_SMALL) { + double dMove = ( ptHfL - ptHiL).Len() ; + if ( dAxMove < -0.1 * abs( dMove)) + return true ; + } } // Eseguo return pVZM->MillingStep( nCurrTool, ptHiL, vtHiL, vtAiL, ptHfL, vtHfL, vtAfL) ;