From 56ad1fd7918bcfdd62b6379b4ad03e543d82da0f Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 28 Mar 2018 18:47:34 +0000 Subject: [PATCH] EgtMachKernel 1.9c6 : - piccola miglioria in simulazione a interpolazione archi per Vmill. --- EgtMachKernel.rc | Bin 11774 -> 11774 bytes Simulator.cpp | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index a05beb8a42b01a8e4c8650e53474e16cfbf25f73..f4cbc915fe10720d1f26ba2a865ffa7f39a436be 100644 GIT binary patch delta 97 zcmewt{V#gMFE&QA&A-`fnHkL{Ka|wnoW?bQ1uSxrY4Qod0+^@}R1`^_2jk{d(jGv4 NK<#LXK~l;gTmUTDBd7oX delta 97 zcmewt{V#gMFE&Qg&A-`fnHfzdKa|wnoW?bQ1uSxrY4Qod0+^@}R1`^_2jk{d(jGv4 NK<#LXK~l;gTmUO4BcK2P diff --git a/Simulator.cpp b/Simulator.cpp index c21b5bf..c1fed12 100644 --- a/Simulator.cpp +++ b/Simulator.cpp @@ -936,6 +936,7 @@ Simulator::ManageMove( int& nStatus) // dati dell'arco Point3d ptCen = pCamData->GetAxesCen() ; double dAngCen = pCamData->GetAxesAngCen() ; + double dRad = pCamData->GetAxesRad() ; Vector3d vtN = pCamData->GetAxesNormDir() ; double dDeltaN = ( Point3d( AxesEnd[0], AxesEnd[1], AxesEnd[2]) - ptCen) * vtN ; double dDiffAng = ( m_dCoeff - dPrevCoeff) * dAngCen ; @@ -944,8 +945,9 @@ Simulator::ManageMove( int& nStatus) // approssimo movimento con 1 o pił step a seconda ci sia Vmill int nStep = 1 ; const double ANG_STEP = 5.0 ; + const double LEN_STEP = 0.5 ; if ( m_nVmId != GDB_ID_NULL) - nStep = int( max( abs( dDiffAng) / ANG_STEP, 1.)) ; + nStep = int( max( max( abs( dDiffAng) / ANG_STEP, abs( dDiffAng * DEGTORAD * dRad) / LEN_STEP), 1.0)) ; for ( int i = 1 ; i <= nStep ; ++ i) { double dCurrCoeff = dPrevCoeff + ( m_dCoeff - dPrevCoeff) / nStep * i ; // assi lineari