diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 5156166..d1408ce 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ diff --git a/Milling.cpp b/Milling.cpp index a1e0176..ba2c59c 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -3073,13 +3073,14 @@ Milling::AddOneWayMilling( const ICurveComposite* pCompo, const Vector3d& vtTool Point3d ptPer = ptPe + ( dEndElev + dSafeZ) * vtTool ; // verifica dei punti intermedi bSafeDirLinkStartEnd = true ; - const int N_STEP = 4 ; - for ( int i = 1 ; i < N_STEP ; ++ i) { - double dCoeff = double( i) / N_STEP ; + int nStep = Clamp( int( Dist( ptPsr, ptPer) / m_TParams.m_dDiam), 4, 16) ; + for ( int i = 1 ; i < nStep ; ++ i) { + double dCoeff = double( i) / nStep ; + Point3d ptPm = Media( ptPsr, ptPer, dCoeff) ; Vector3d vtCm = Media( vtCs, vtCe, dCoeff) ; if ( ! vtCm.Normalize()) vtCm = vtCs ; - if ( ! GetPointOutOfRaw( Media( ptPsr, ptPer, dCoeff), vtTool, vtCm, dElev, dSafeZ)) { + if ( ! GetPointOutOfRaw( ptPm, vtTool, vtCm, dElev, dSafeZ)) { bSafeDirLinkStartEnd = false ; break ; }