EgtMachKernel 1.9c6 :

- piccola miglioria in simulazione a interpolazione archi per Vmill.
This commit is contained in:
Dario Sassi
2018-03-28 18:47:34 +00:00
parent c85f0aab32
commit 56ad1fd791
2 changed files with 3 additions and 1 deletions
+3 -1
View File
@@ -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