EgtMachKernel 1.9l5 :

- migliorie simulazione con Vmill.
This commit is contained in:
Dario Sassi
2019-01-16 08:35:45 +00:00
parent b6127178ba
commit d7901abd69
2 changed files with 7 additions and 4 deletions
+7 -4
View File
@@ -943,10 +943,13 @@ Simulator::ManageSingleMove( int& nStatus, double& dMove)
vtRot.Rotate( vtN, dPrevCoeff * dAngCen) ;
// approssimo movimento con 1 o più step a seconda ci sia Vmill
int nStep = 1 ;
const double ANG_STEP = 15.0 ;
const double LEN_STEP = 1.0 ;
if ( m_nVmId != GDB_ID_NULL)
nStep = int( max( max( abs( dDiffAng) / ANG_STEP, abs( dDiffAng * DEGTORAD * dRad) / LEN_STEP), 1.0)) ;
if ( m_nVmId != GDB_ID_NULL) {
const double LEN_STEP = 2. ;
nStep = max( int( abs( dDiffAng * DEGTORAD * dRad) / LEN_STEP), 1) ;
const double ANG_STEP = 10. ;
if ( abs( dDiffAng) / nStep > ANG_STEP)
nStep = int( abs( dDiffAng) / ANG_STEP) ;
}
for ( int i = 1 ; i <= nStep ; ++ i) {
double dCurrCoeff = dPrevCoeff + ( m_dCoeff - dPrevCoeff) / nStep * i ;
// assi lineari