EgtMachKernel :

- modifiche a Pocketing per svuotature a ZigZag ottimizzate.
This commit is contained in:
DarioS
2022-02-14 12:56:09 +01:00
parent bdb7234fbb
commit 78d717cb39
3 changed files with 222 additions and 46 deletions
+8 -4
View File
@@ -2081,6 +2081,7 @@ Operation::AdjustStartEndMovements( bool bVerifyPreviousLink)
// passo al successivo
nPrevClPathId = nClPathId ;
nClPathId = m_pGeomDB->GetNextGroup( nClPathId) ;
pPrevOp = nullptr ;
}
// aggiungo risalita finale
@@ -2203,14 +2204,17 @@ Operation::AdjustOneStartMovement( int nClPathId, int nPrevClPathId, Operation*
}
// risalita sopra fine percorso precedente
DBLVECTOR vAxNew1 ;
double dDelta = ( ! bZHomeDown ? max( dSafeZ - vAxPrev[2], 0.) : min( dSafeZ - vAxPrev[2], 0.)) ;
if ( nPrevClPathId == GDB_ID_NULL) {
if ( pPrevOp == nullptr ||
! pPrevOp->RemoveRise() ||
! pPrevOp->AddRise( vAxNew1, dDelta, GDB_ID_NULL, bZHomeDown))
if ( pPrevOp == nullptr || ! pPrevOp->RemoveRise())
return false ;
DBLVECTOR vAxPrevNoRise ;
pPrevOp->GetFinalAxesValues( false, vAxPrevNoRise) ;
double dDelta = ( ! bZHomeDown ? max( dSafeZ - vAxPrevNoRise[2], 0.) : min( dSafeZ - vAxPrevNoRise[2], 0.)) ;
if ( ! pPrevOp->AddRise( vAxNew1, dDelta, GDB_ID_NULL, bZHomeDown))
return false ;
}
else {
double dDelta = ( ! bZHomeDown ? max( dSafeZ - vAxPrev[2], 0.) : min( dSafeZ - vAxPrev[2], 0.)) ;
if ( ! AddRise( vAxNew1, dDelta, nPrevClPathId, bZHomeDown))
return false ;
}