diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index d009d28..58fac06 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ 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) ; }