From c55962ae9b5edd05a13ad14ba3bb8f66cffabb41 Mon Sep 17 00:00:00 2001 From: Riccardo Elitropi Date: Tue, 6 Aug 2024 15:05:48 +0200 Subject: [PATCH] EgtMachKernel : - piccola modifica. --- SurfRoughing.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/SurfRoughing.cpp b/SurfRoughing.cpp index da50ad8..93d4885 100644 --- a/SurfRoughing.cpp +++ b/SurfRoughing.cpp @@ -78,11 +78,13 @@ using namespace std ; // 3028 = "Error in SurfRoughing : Error in CalcPocketing" // 3029 = "Error in SurfRoughing : Error in Classifying border" // 3029 = "Error in SurfRoughing : Simplify Chunks for SubSteps failed" +// 3030 = "Error in SurfRoughing : Conformal ZigZag not valid at step (xx)" // 3051 = "Warning in SurfRoughing : Skipped entity (xx)" // 3052 = "Warning in SurfRoughing : No machinable path" // 3053 = "Warning in SurfRoughing : Tool name changed (xx)" // 3054 = "Warning in SurfRoughing : Tool data changed (xx)" // 3055 = "Warning in SurfRoughing : CalcPocketing failed with substep (xx)" +// 3056 = "Warning in SurfRoughing : invalid Conformal ZigZag at substep (xx)" //---------------------------------------------------------------------------- static string KEY_SURF_POCK = "SurfPock_" ; @@ -91,12 +93,14 @@ static string KEY_SURF_LIMIT = "SurfLimit_" ; #define ENABLE_DEBUG 0 static string _DEBUG_GROUP_TERRACE = "Terraces" ; static string _DEBUG_GROUP_FEED = "Feeds" ; +bool _DEBUG_CLEAR_GROUP_TERRACE = TRUE ; +bool _DEBUG_CLEAR_GROUP_FEED = TRUE ; /* start debug functions */ void SurfRoughing::DrawLoopsSurf( const ISurfFlatRegion* pSfr, bool bWithSurf, Color Col, bool bAlphaCoverage, int nStep) { - int myId = m_pGeomDB->GetFirstNameInGroup( GDB_ID_ROOT, _DEBUG_GROUP_TERRACE) ; + int myId = m_pGeomDB->GetFirstNameInGroup( GDB_ID_ROOT, _DEBUG_GROUP_TERRACE) ; if ( myId == GDB_ID_NULL) { myId = m_pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, GLOB_FRM) ; m_pGeomDB->SetName( myId, _DEBUG_GROUP_TERRACE) ; @@ -1851,9 +1855,16 @@ SurfRoughing::AddPocket( const INTINTVECTOR& vPocket, const Vector3d& vtTool, co return false ; } } + // se la svuotatura è di tipo conformal ZigZag ma la geometria non è valida if ( nSubType == SURFROU_SUB_CONFORMAL_ZIGZAG && vpCrvs.empty()) { - string sWarn = "Warning in SurfRoughing : CalcPocketing failed with substep (" + ToString( pSfrPock->GetTempParam( 0), 1) + ")" ; - m_pMchMgr->SetWarning( 3055, sWarn) ; + if ( bIsSubStep) { + string sWarn = "Warning in SurfRoughing : invalid Conformal ZigZag at substep (" + ToString( pSfrPock->GetTempParam( 0), 1) + ")" ; + m_pMchMgr->SetWarning( 3056, sWarn) ; + } + else { + m_pMchMgr->SetLastError( 3030, "Error in SurfRoughing : Conformal ZigZag not valid at step (" + ToString( pSfrPock->GetTempParam( 0), 1) + ")") ; + return false ; + } } // recupero la Depth della regione