From db6ae7538fa04b630418ea41aa81db9ceaa4cc67 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 5 Mar 2024 08:57:15 +0100 Subject: [PATCH] EgtMachKernel 2.6c1 : - migliorato calcolo collegamento tra passate di fresature a step OneWay. --- EgtMachKernel.rc | Bin 11774 -> 11774 bytes Milling.cpp | 9 +++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 5156166d5f5e6bdacb921656a72d16038777ca79..d1408ce0f5417d45a4ae3f235cb772b10b5762d1 100644 GIT binary patch delta 121 zcmewt{V#gMH#Syd1|0^&&A-{KnVFLr3@1O7)ZLuM)x!c8zsNNCgkT;*P6$a3MUMyL R=2g-z%(yjz6ex#q0RU-NCWrt4 delta 121 zcmewt{V#gMH#Sxy1|0^I&A-{KnVFLqOeQ~+)ZLuM)x!c8zsNNCgkT;*P6$a3MUMyL R=2g-z%(yjz6ex#q0RU}7CYS&K 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 ; }