diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 33d20b1..8609905 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ diff --git a/EgtMachKernel.vcxproj b/EgtMachKernel.vcxproj index 9463bdc..91caa32 100644 --- a/EgtMachKernel.vcxproj +++ b/EgtMachKernel.vcxproj @@ -131,6 +131,7 @@ copy $(TargetPath) \EgtProg\DllD32 true Use CompileAsCpp + stdcpp17 true @@ -198,6 +199,7 @@ copy $(TargetPath) \EgtProg\Dll32 true true false + stdcpp17 false diff --git a/Simulator.cpp b/Simulator.cpp index 09a9528..6c6ab40 100644 --- a/Simulator.cpp +++ b/Simulator.cpp @@ -948,6 +948,7 @@ Simulator::ManageSingleMove( int& nStatus, double& dMove) int nCdInd, nObjInd ; bool bCollCheck = true ; + // Eseguo movimento assi principali ed eventuali ausiliari if ( m_bEnabAxes) { // Calcolo distanza di movimento double dSqDist = 0 ; @@ -981,8 +982,8 @@ Simulator::ManageSingleMove( int& nStatus, double& dMove) // se attivo CollisionCheck approssimo movimento con pił step int nStep = 1 ; if ( NeedCollisionCheck()) { - const double LEN_STEP = 20. ; - nStep = max( int( dDist / LEN_STEP), 1) ; + const double LEN_COLL_STEP = 10. ; + nStep = max( int( dMove / LEN_COLL_STEP), 1) ; } for ( int i = 1 ; i <= nStep ; ++ i) { double dCurrCoeff = dPrevCoeff + ( m_dCoeff - dPrevCoeff) / nStep * i ; @@ -1067,6 +1068,8 @@ Simulator::ManageSingleMove( int& nStatus, double& dMove) } } } + + // altrimenti eseguo movimento soli eventuali assi ausiliari else { // Calcolo distanza di movimento double dSqDist = 0 ; @@ -1078,7 +1081,7 @@ Simulator::ManageSingleMove( int& nStatus, double& dMove) double dPrevCoeff = m_dCoeff ; double dDist = sqrt( dSqDist) ; if ( dDist > EPS_SMALL) { - int nStep = int( max( dDist / ( ( nMoveType == 0 ? 4 : 1) * m_dStep), 1.)) ; + int nStep = int( max( dDist / ( ( nMoveType == 0 ? 2 : 1) * m_dStep), 1.)) ; m_dCoeff += 1. / nStep ; if ( m_dCoeff > 1) m_dCoeff = 1 ;