From 13dc2dab02194658663345ac2499008d6fc9f5a7 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 7 Mar 2016 11:27:37 +0000 Subject: [PATCH] EgtMachKernel 1.6n13 : - corretto utilizzo curve in lavorazione con lama (tieni era implicita e salta ignorata). --- EgtMachKernel.rc | Bin 11798 -> 11798 bytes MachineHeads.cpp | 5 ++++- Sawing.cpp | 42 +++++++++++++++++++++++------------------- SawingData.h | 2 +- 4 files changed, 28 insertions(+), 21 deletions(-) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 539003b51ec8fe3d773e6235664adab66a3e9b14..5dce87a6c48911191e5081f6fee4fd846fdd4337 100644 GIT binary patch delta 102 zcmbOhGc9JrKQ>0=&5ZmPnI>Q0%wsg3>?oqUIfrWs3s}^d87|_+xOs=LACQl!*n@HN P9%&zl6snE`%3)jpXCNLh delta 102 zcmbOhGc9JrKQ>0g&5ZmPnI>Q0%wsg1>?oqUIfrWs3s}^d87|_+xOs=LACQl!*n@HN P9%&zl6snE`%3)jpW3(P1 diff --git a/MachineHeads.cpp b/MachineHeads.cpp index d74f4d3..6556639 100644 --- a/MachineHeads.cpp +++ b/MachineHeads.cpp @@ -47,8 +47,11 @@ Machine::LoadTool( const string& sHead, int nExit, const string& sTool) if ( ! m_pMchMgr->TdbSetCurrTool( sTool) || ! m_pMchMgr->TdbGetCurrToolParam( TPA_DRAW, sDraw)) return false ; string sToolFile = m_sMachineDir + "\\" + TOOLS_DIR + "\\" + sDraw ; - if ( ! ExistsFile( sToolFile)) + if ( ! ExistsFile( sToolFile)) { + string sOut = "Missing tool (" + sTool + ") draw : " + sToolFile ; + LOG_ERROR( GetEMkLogger(), sOut.c_str()) ; return false ; + } // pulisco il gruppo dell'uscita m_pGeomDB->EmptyGroup( nExGrp) ; // inserisco l'utensile nel gruppo diff --git a/Sawing.cpp b/Sawing.cpp index ec08308..a7a27c9 100644 --- a/Sawing.cpp +++ b/Sawing.cpp @@ -1048,28 +1048,32 @@ Sawing::ProcessEntity( const ICurve* pCrvP, const ICurve* pCrvC, const ICurve* p switch ( pCrvC->GetType()) { case CRV_LINE : { - const ICurveLine* pLine = GetCurveLine( pCrvC) ; - if ( pLine == nullptr) - return false ; - return ProcessLine( pCrvP, pLine, pCrvN, dDepth, dExtraCut, bIsFirst, bIsLast, sName, nPvId, nClId) ; + const ICurveLine* pLine = GetCurveLine( pCrvC) ; + if ( pLine == nullptr) + return false ; + return ProcessLine( pCrvP, pLine, pCrvN, dDepth, dExtraCut, bIsFirst, bIsLast, sName, nPvId, nClId) ; } case CRV_ARC : - { - const ICurveArc* pArc = GetCurveArc( pCrvC) ; - if ( pArc == nullptr) - return false ; - // verifico che non ci sia angolo di fianco - if ( abs( m_Params.m_dSideAngle) > EPS_ANG_SMALL) { - LOG_INFO( GetEMkLogger(), "Error in Sawing : SideAngle not allowed on Arc") ; - return false ; + if ( m_Params.m_nCurveUse == SAW_CRV_KEEP) { + const ICurveArc* pArc = GetCurveArc( pCrvC) ; + if ( pArc == nullptr) + return false ; + // verifico che non ci sia angolo di fianco + if ( abs( m_Params.m_dSideAngle) > EPS_ANG_SMALL) { + LOG_INFO( GetEMkLogger(), "Error in Sawing : SideAngle not allowed on Arc") ; + return false ; + } + // se arco lavorato dall'esterno + if ( ( pArc->GetAngCenter() > 0 && m_Params.m_nWorkSide == SAW_WS_RIGHT) || + ( pArc->GetAngCenter() < 0 && m_Params.m_nWorkSide == SAW_WS_LEFT)) + return ProcessExtArc( pCrvP, pArc, pCrvN, dDepth, dExtraCut, bIsFirst, bIsLast, sName, nPvId, nClId) ; + // altrimenti arco lavorato dall'interno + else + return ProcessIntArc( pCrvP, pArc, pCrvN, dDepth, dExtraCut, bIsFirst, bIsLast, sName, nPvId, nClId) ; } - // se arco lavorato dall'esterno - if ( ( pArc->GetAngCenter() > 0 && m_Params.m_nWorkSide == SAW_WS_RIGHT) || - ( pArc->GetAngCenter() < 0 && m_Params.m_nWorkSide == SAW_WS_LEFT)) - return ProcessExtArc( pCrvP, pArc, pCrvN, dDepth, dExtraCut, bIsFirst, bIsLast, sName, nPvId, nClId) ; - // altrimenti arco lavorato dall'interno - else - return ProcessIntArc( pCrvP, pArc, pCrvN, dDepth, dExtraCut, bIsFirst, bIsLast, sName, nPvId, nClId) ; + else { + LOG_INFO( GetEMkLogger(), "Warning in Sawing : Skipped Arc") ; + return true ; } default : return false ; diff --git a/SawingData.h b/SawingData.h index 8676e27..7771031 100644 --- a/SawingData.h +++ b/SawingData.h @@ -35,7 +35,7 @@ struct SawingData : public MachiningData int m_nLeadInType ; // tipo di attacco (interno, centro, fuori, esteso, esteso fuori) int m_nExtLinkType ; // tipo di collegamento su ang esterno ( centro, esteso prec, esteso succ, esteso minore) int m_nLeadOutType ; // tipo di uscita (interno, centro, esteso) - int m_nCurveUse ; // gestione delle curve(salta, approssima, convesso) + int m_nCurveUse ; // gestione delle curve(salta, approssima, convesso, fai) double m_dApprox ; // valore di approssimazione per curve std::string m_sSysNotes ; // note interne std::string m_sUserNotes ; // note dell'utente