From bc373d2e33645f6c4fbdb767591c46d88ae2d363 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 8 Jul 2024 08:58:16 +0200 Subject: [PATCH 1/3] EgtMachKernel : - in sgrossatura superfici piccola modifica per Zloc attacchi dei vari livelli con eliche e similari. --- SurfRoughing.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/SurfRoughing.cpp b/SurfRoughing.cpp index 1b76da1..39137c7 100644 --- a/SurfRoughing.cpp +++ b/SurfRoughing.cpp @@ -1853,17 +1853,16 @@ SurfRoughing::AddPocket( const INTINTVECTOR& vPocket, const Vector3d& vtTool, co } // altrimenti, approccio di collegamento else { + // cambio posizione punto per fare elica o similari solo sulla parte con materiale + if ( ( GetLeadInType() == POCKET_LI_ZIGZAG || + GetLeadInType() == POCKET_LI_HELIX || + GetLeadInType() == POCKET_LI_GLIDE) && ! bIsSubStep) { + ptP1 -= ( nBasicStep * dStep) * vtTool ; + } if ( ! AddLinkApproach( ptP1, vtTool, dSafeZ, dStElev, dAppr)) { m_pMchMgr->SetLastError( 3012, "Error in SurfRoughing : Link not computable") ; return false ; } - if ( ! bIsSubStep) { - ptP1 -= ( nBasicStep * dStep) * vtTool ; - SetFeed( GetTipFeed()) ; - SetFlag( 0) ; - if ( AddLinearMove( ptP1) == GDB_ID_NULL) - return false ; - } } // aggiungo attacco SetFeed( GetStartFeed()) ; From 38635cade46aaedbae97f0a9301eda5e664adbd9 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 8 Jul 2024 09:10:22 +0200 Subject: [PATCH 2/3] EgtMachKerenl : - in sgrossatura superfici piccola modifica su ENABLE_DEBUG. --- SurfRoughing.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SurfRoughing.cpp b/SurfRoughing.cpp index 39137c7..f4cae5e 100644 --- a/SurfRoughing.cpp +++ b/SurfRoughing.cpp @@ -86,7 +86,7 @@ using namespace std ; static string KEY_SURF_POCK = "SurfPock_" ; static string KEY_SURF_LIMIT = "SurfLimit_" ; -static const bool ENABLE_DEBUG = false ; +#define ENABLE_DEBUG 0 static string _DEBUG_GROUP_TERRACE = "Terraces" ; static string _DEBUG_GROUP_FEED = "Feeds" ; @@ -1763,9 +1763,9 @@ SurfRoughing::AddPocket( const INTINTVECTOR& vPocket, const Vector3d& vtTool, co if ( ! bIsSubStep) ++ nBasicStep ; - if ( ENABLE_DEBUG) { + #if ENABLE_DEBUG DrawLoopsSurf( pSfrPock, true, Color( 1., 1., 1., .1), bIsSubStep, nCurrStep) ; - } + #endif ICRVCOMPOPOVECTOR vpCrvs ; // percorso di svuotatura // se si tratta di uno step base, allora lavoro l'intera superficie @@ -1789,9 +1789,9 @@ SurfRoughing::AddPocket( const INTINTVECTOR& vPocket, const Vector3d& vtTool, co // ciclo sui percorsi for ( int k = 0 ; k < int( vpCrvs.size()) ; ++ k) { - if ( ENABLE_DEBUG) { + #if ENABLE_DEBUG DrawFeed( vpCrvs[k], nCurrStep) ; - } + #endif // controllo se il percorso ha un ingresso presso un lato aperto bool bOutStart = ( vpCrvs[k]->GetCurveCount() > 0 && vpCrvs[k]->GetCurve( 0)->GetTempProp( 0) == 2) ; From 8af2794f87927e4ca715f795beb877ccea72311b Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 8 Jul 2024 10:18:33 +0200 Subject: [PATCH 3/3] EgtMachKernel : - in sgrossatura superfici piccole migliorie. --- SurfRoughing.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SurfRoughing.cpp b/SurfRoughing.cpp index f4cae5e..4c32c19 100644 --- a/SurfRoughing.cpp +++ b/SurfRoughing.cpp @@ -86,7 +86,7 @@ using namespace std ; static string KEY_SURF_POCK = "SurfPock_" ; static string KEY_SURF_LIMIT = "SurfLimit_" ; -#define ENABLE_DEBUG 0 +#define ENABLE_DEBUG 1 static string _DEBUG_GROUP_TERRACE = "Terraces" ; static string _DEBUG_GROUP_FEED = "Feeds" ; @@ -292,7 +292,7 @@ SurfRoughing::SurfRoughing( void) m_nStatus = MCH_ST_TO_VERIFY ; m_nPaths = 0 ; m_dMaxHelixRad = INFINITO ; - m_dSubStepToler = 2000 * EPS_SMALL ; + m_dSubStepToler = 2.0 / 2 ; } //---------------------------------------------------------------------------- @@ -1472,6 +1472,10 @@ SurfRoughing::ProcessPath( int nPathId, int nTempId, int nPvId, int nClId) // se regione risultante non vuota if ( pSfr->IsValid() && pSfr->GetChunkCount() > 0) { + #if ENABLE_DEBUG + DrawLoopsSurf( pSfr, true, Color( 1., 1., 1., .1), it->bSubStep, it->nInd) ; + #endif + // se si tratta di un SottoStep, rimuovo tutti i chunk troppo snelli if ( it->bSubStep) { if ( ! RemoveChunksUnderTolerance( pSfr)) { @@ -1763,10 +1767,6 @@ SurfRoughing::AddPocket( const INTINTVECTOR& vPocket, const Vector3d& vtTool, co if ( ! bIsSubStep) ++ nBasicStep ; - #if ENABLE_DEBUG - DrawLoopsSurf( pSfrPock, true, Color( 1., 1., 1., .1), bIsSubStep, nCurrStep) ; - #endif - ICRVCOMPOPOVECTOR vpCrvs ; // percorso di svuotatura // se si tratta di uno step base, allora lavoro l'intera superficie if ( ! CalcPocketing( pSfrPock, m_TParams.m_dDiam / 2, 0., m_Params.m_dSideStep, m_Params.m_dSideAngle,