diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 539003b..5dce87a 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ 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