From a3a97ecbe3976652f4e68d46f12029bacdd20c12 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 31 Oct 2019 07:48:44 +0000 Subject: [PATCH] =?UTF-8?q?EgtMachKernel=202.1j9=20:=20-=20in=20lavorazion?= =?UTF-8?q?e=20WJ=20rallentamento=20su=20angoli=20interni=20allungato=20op?= =?UTF-8?q?portunamente=20se=20angolo=20di=20fianco=20=C3=A8=20positivo.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EgtMachKernel.rc | Bin 11782 -> 11782 bytes WaterJetting.cpp | 36 +++++++++++++++++++++++++++++------- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 94f155d6d7f365d519a8e7f059e9550809ee50f0..2c8075e2069728d9e642bb15a1990f669dda6499 100644 GIT binary patch delta 97 zcmZpRX^YwLhmFy4^ItYwW=6}&j>5W|vxM9jH?QON0rG*u7nvrX5iEd9O=7{OSQ@Kh Hr8(RHSk)kM delta 97 zcmZpRX^YwLhmFx<^ItYwW=4z2j>5W|vxM9jH?QON0rG*u7nvrX5iEd9O=7{OSQ@Kh Hr8(RHS3w|Z diff --git a/WaterJetting.cpp b/WaterJetting.cpp index 4ca527c..f27b338 100644 --- a/WaterJetting.cpp +++ b/WaterJetting.cpp @@ -38,6 +38,7 @@ using namespace std ; // 3201 = "Error in WaterJetting : UpdateToolData failed" // 3202 = "Error in WaterJetting : Offset not computable" // 3203 = "Error in WaterJetting : Empty RawBox" +// 3204 = "Error in WaterJetting : entity too small near inside corner" // 3205 = "Error in WaterJetting : machining depth (xx) bigger than MaxMaterial (yy)" // 3207 = "Error in WaterJetting : Approach not computable" // 3208 = "Error in WaterJetting : LeadIn not computable" @@ -60,6 +61,9 @@ using namespace std ; // 3254 = "Warning in WaterJetting : Tool data changed (xx)" // 3255 = "Warning in WaterJetting : skipped Path too short" +//---------------------------------------------------------------------------- +const double EXTRA_ACC_LEN = 0.1 ; + //---------------------------------------------------------------------------- USEROBJ_REGISTER( GetOperationClass( OPER_WATERJETTING), WaterJetting) ; @@ -1894,7 +1898,7 @@ WaterJetting::AddStandardWj( const ICurveComposite* pCompo, const Vector3d& vtTo // lunghezza entità double dLen ; pCrvC->GetLength( dLen) ; // lunghezza di accelerazione - double dAccLen = min( m_Params.m_dCornerSlowLen, dLen / 2 - 0.1) ; + double dAccLen = min( m_Params.m_dCornerSlowLen, dLen / 2 - EXTRA_ACC_LEN) ; // Feed ridotta double dMinFeed = GetActualReducedFeed() ; // ciclo sui punti di accelerazione @@ -1913,7 +1917,16 @@ WaterJetting::AddStandardWj( const ICurveComposite* pCompo, const Vector3d& vtTo // lunghezza entità double dLen ; pCrvC->GetLength( dLen) ; // lunghezza di accelerazione - double dAccLen = min( m_Params.m_dCornerSlowLen, dLen / 2 - 0.1) ; + double dAccLen = min( m_Params.m_dCornerSlowLen, dLen / 2 - EXTRA_ACC_LEN) ; + if ( m_Params.m_dSideAngle > 0) { + double dW = m_dElev * sin( m_Params.m_dSideAngle * DEGTORAD) ; + double dSlowLen = dW / tan( ( 180 - abs( dAng)) / 2 * DEGTORAD) ; + if ( dSlowLen > dLen / 2 - EXTRA_ACC_LEN) { + m_pMchMgr->SetLastError( 3204, "Error in WaterJetting : entity too small near inside corner") ; + return false ; + } + dAccLen = min( dSlowLen + m_Params.m_dCornerSlowLen, dLen / 2 - EXTRA_ACC_LEN) ; + } // Feed ridotta double dMinFeed = GetActualReducedFeed() ; // Direzioni utensile nell'angolo e finale @@ -1954,8 +1967,8 @@ WaterJetting::AddStandardWj( const ICurveComposite* pCompo, const Vector3d& vtTo if ( m_Params.m_nExtCornerType == WJET_EC_SLOW && IsExternalAngle( dAng)) { // lunghezza entità double dLen ; pCrvC->GetLength( dLen) ; - // lunghezza di accelerazione - double dAccLen = min( m_Params.m_dCornerSlowLen, dLen / 2 - 0.1) ; + // lunghezza di decelerazione + double dAccLen = min( m_Params.m_dCornerSlowLen, dLen / 2 - EXTRA_ACC_LEN) ; // Feed ridotta double dMinFeed = GetActualReducedFeed() ; // ciclo sui punti di decelerazione @@ -1974,8 +1987,17 @@ WaterJetting::AddStandardWj( const ICurveComposite* pCompo, const Vector3d& vtTo if ( m_Params.m_nIntCornerType == WJET_IC_SLOW && IsInternalAngle( dAng)) { // lunghezza entità double dLen ; pCrvC->GetLength( dLen) ; - // lunghezza di accelerazione - double dAccLen = min( m_Params.m_dCornerSlowLen, dLen / 2 - 0.1) ; + // lunghezza di deccelerazione + double dAccLen = min( m_Params.m_dCornerSlowLen, dLen / 2 - EXTRA_ACC_LEN) ; + if ( m_Params.m_dSideAngle > 0) { + double dW = m_dElev * sin( m_Params.m_dSideAngle * DEGTORAD) ; + double dSlowLen = dW / tan( ( 180 - abs( dAng)) / 2 * DEGTORAD) ; + if ( dSlowLen > dLen / 2 - EXTRA_ACC_LEN) { + m_pMchMgr->SetLastError( 3204, "Error in WaterJetting : entity too small near inside corner") ; + return false ; + } + dAccLen = min( dSlowLen + m_Params.m_dCornerSlowLen, dLen / 2 - EXTRA_ACC_LEN) ; + } // Feed ridotta double dMinFeed = GetActualReducedFeed() ; // Direzioni utensile iniziale e nell'angolo @@ -2502,7 +2524,7 @@ WaterJetting::CalcOffset( ICurveComposite* pCompo, double dSignOffs) //---------------------------------------------------------------------------- // Valore limite angolo per corner -const double ANG_CORNER = 30 ; +const double ANG_CORNER = 10 ; //---------------------------------------------------------------------------- bool