From 14e7894c237190d7b513b3f6b60ba7926620ceab Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Sat, 4 Jul 2020 15:11:24 +0000 Subject: [PATCH] EgtMachKernel 2.2g2 : - in reset per simulazione scambiato ordine tra reset macchina e reset assi - migliorato controllo quando interpolare percorso in ApproxWithArcsIfUseful (per fresatura, svuotatura,...). --- EgtMachKernel.rc | Bin 11774 -> 11774 bytes Operation.cpp | 15 ++++++++++----- Simulator.cpp | 4 ++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index d009d28462d2e8fd9254c6741914dfdbc02ed26d..58fac06dac5d14442e58ce4263647ba246ffaf4b 100644 GIT binary patch delta 97 zcmewt{V#gMFE&P_&A-`fnHh~HKa|wnoW?bQ1uSxrY4Qod0+^@}R1`^_2jk{d(jGv4 NK<#LXK~l;gTmU8!BZvS1 delta 97 zcmewt{V#gMFE&QQ&A-`fnHdcyKa|wnoW?bQ1uSxrY4Qod0+^@}R1`^_2jk{d(jGv4 NK<#LXK~l;gTmU3rBY*$^ diff --git a/Operation.cpp b/Operation.cpp index 4a06dc0..1afdacf 100644 --- a/Operation.cpp +++ b/Operation.cpp @@ -809,11 +809,16 @@ Operation::ApproxWithArcsIfUseful( ICurveComposite* pCompo, bool bCareTempProp) pCompo->GetExtrusion( vtExtr) ; double dThick = 0 ; pCompo->GetThickness( dThick) ; - // verifico se sono tante linee - double dLen = 0 ; - pCompo->GetLength( dLen) ; - int nCrvs = pCompo->GetCurveCount() ; - if ( nCrvs < 10 || dLen > nCrvs * LIN_FEA_STD) + // verifico se ci sono tante linee corte + int nSmallLineCnt = 0 ; + const ICurve* pCrv = pCompo->GetFirstCurve() ; + while ( pCrv != nullptr) { + double dLen ; + if ( pCrv->GetLength( dLen) && dLen < LIN_FEA_STD / 2) + ++ nSmallLineCnt ; + pCrv = pCompo->GetNextCurve() ; + } + if ( nSmallLineCnt < 10) return true ; // limito l'approssimazione alle curve piane Frame3d frRef ; diff --git a/Simulator.cpp b/Simulator.cpp index cbef702..38cdaeb 100644 --- a/Simulator.cpp +++ b/Simulator.cpp @@ -393,10 +393,10 @@ Simulator::GoHome( void) // controllo validità stato if ( m_pGeomDB == nullptr || m_pMchMgr == nullptr || m_pMachine == nullptr) return false ; - // porto la macchina in home - m_pMchMgr->ResetAllAxesPos() ; // reset stato macchina OnResetMachine() ; + // porto la macchina in home + m_pMchMgr->ResetAllAxesPos() ; // assegno valori home degli assi macchina attivi return m_pMchMgr->GetAllCurrAxesHomePos( m_AxesVal) ; }