diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index d6b7a13..4428a86 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ diff --git a/Sawing.cpp b/Sawing.cpp index 84bf3e2..703fd10 100644 --- a/Sawing.cpp +++ b/Sawing.cpp @@ -1592,7 +1592,7 @@ Sawing::GenerateLineCl( const ICurveLine* pLine, const Vector3d& vtTool, const V double dCutH = dElev - dExtraCut ; int nStep = 2 ; if ( m_Params.m_nStepType == SAW_ST_ZIGZAG) { - nStep = static_cast( ceil( dCutH / dActStep)) ; + nStep = static_cast( ceil( dCutH / ( dActStep + EPS_SMALL))) ; if ( ( nStep % 2) == 1) nStep += 1 ; } @@ -1629,7 +1629,7 @@ Sawing::GenerateLineCl( const ICurveLine* pLine, const Vector3d& vtTool, const V // 2-3 -> lavorazione // calcolo numero e valore degli step double dCutH = dElev - dExtraCut ; - int nStep = static_cast( ceil( dCutH / dActStep)) ; + int nStep = static_cast( ceil( dCutH / ( dActStep + EPS_SMALL))) ; double dStep = dCutH / nStep ; // esecuzione degli step for ( int i = nStep - 1 ; i >= 0 ; -- i) { @@ -2215,7 +2215,7 @@ Sawing::GenerateExtCurveCl( const ICurveComposite* pCrv, double dCutH = dElev - dExtraCut ; int nStep = 2 ; if ( m_Params.m_nStepType == SAW_ST_ZIGZAG) { - nStep = static_cast( ceil( dCutH / m_Params.m_dStepExtArc)) ; + nStep = static_cast( ceil( dCutH / ( m_Params.m_dStepExtArc + EPS_SMALL))) ; if ( ( nStep % 2) == 1) nStep += 1 ; } @@ -2308,7 +2308,7 @@ Sawing::GenerateExtCurveCl( const ICurveComposite* pCrv, // 2-3 -> lavorazione // calcolo numero e valore degli step double dCutH = dElev - dExtraCut ; - int nStep = static_cast( ceil( dCutH / m_Params.m_dStepExtArc)) ; + int nStep = static_cast( ceil( dCutH / ( m_Params.m_dStepExtArc + EPS_SMALL))) ; double dStep = dCutH / nStep ; // esecuzione degli step for ( int i = nStep - 1 ; i >= 0 ; -- i) { @@ -2898,7 +2898,7 @@ Sawing::GenerateIntArcCl( const ICurveArc* pArc, double dCutH = dElev - dExtraCut ; int nStep = 2 ; if ( m_Params.m_nStepType == SAW_ST_ZIGZAG) { - nStep = static_cast( ceil( dCutH / m_Params.m_dStepIntArc)) ; + nStep = static_cast( ceil( dCutH / ( m_Params.m_dStepIntArc + EPS_SMALL))) ; if ( ( nStep % 2) == 1) nStep += 1 ; } @@ -2993,7 +2993,7 @@ Sawing::GenerateIntArcCl( const ICurveArc* pArc, // 2-3 -> lavorazione // calcolo numero e valore degli step double dCutH = dElev - dExtraCut ; - int nStep = static_cast( ceil( dCutH / m_Params.m_dStepIntArc)) ; + int nStep = static_cast( ceil( dCutH / ( m_Params.m_dStepIntArc + EPS_SMALL))) ; double dStep = dCutH / nStep ; // esecuzione degli step for ( int i = nStep - 1 ; i >= 0 ; -- i) {