EgtMachKernel :

- correzione risalite sui link tra lavorazioni.
This commit is contained in:
Dario Sassi
2020-02-20 07:38:19 +00:00
parent d9f3f75e89
commit 263691ba3b
2 changed files with 13 additions and 5 deletions
+12 -4
View File
@@ -1704,7 +1704,7 @@ Operation::AdjustStartEndMovements( bool bVerifyPreviousLink)
while ( bOk && nClPathId != GDB_ID_NULL) {
// se richiesta verifica collegamento con lavorazione precedente, sistemo inizio
if ( bVerifyPreviousLink) {
if ( ! AdjustOneStartMovement( nClPathId, nPrevClPathId, vAxVal, bMaxZ))
if ( ! AdjustOneStartMovement( nClPathId, nPrevClPathId, pPrevOp, vAxVal, bMaxZ))
bOk = false ;
}
bMaxZ = false ;
@@ -1731,7 +1731,7 @@ Operation::AdjustStartEndMovements( bool bVerifyPreviousLink)
//----------------------------------------------------------------------------
bool
Operation::AdjustOneStartMovement( int nClPathId, int nPrevClPathId, const DBLVECTOR& vAxPrev, bool bMaxZ)
Operation::AdjustOneStartMovement( int nClPathId, int nPrevClPathId, Operation* pPrevOp, const DBLVECTOR& vAxPrev, bool bMaxZ)
{
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
return false ;
@@ -1798,8 +1798,16 @@ Operation::AdjustOneStartMovement( int nClPathId, int nPrevClPathId, const DBLVE
}
// risalita sopra fine percorso precedente
DBLVECTOR vAxNew1 ;
if ( ! AddRise( vAxNew1, dSafeZ - vAxPrev[2], nPrevClPathId))
return false ;
if ( nPrevClPathId == GDB_ID_NULL) {
if ( pPrevOp == nullptr ||
! pPrevOp->RemoveRise() ||
! pPrevOp->AddRise( vAxNew1, dSafeZ - vAxPrev[2]))
return false ;
}
else {
if ( ! AddRise( vAxNew1, dSafeZ - vAxPrev[2], nPrevClPathId))
return false ;
}
// aggiungo posizione elevata prima dell'inizio del percorso corrente
if ( m_pGeomDB->Copy( nEntId, GDB_ID_NULL, nEntId, GDB_AFTER) == GDB_ID_NULL)
return false ;
+1 -1
View File
@@ -101,7 +101,7 @@ class Operation : public IUserObj
bool CalculateClPathAxesValues( int nClPathId, int nLinAxes, int nRotAxes, double dRot1W,
double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, DBLVECTOR& vAxRotPrec, int& nOutStrC) ;
bool AdjustStartEndMovements( bool bVerifyPreviousLink = true) ;
bool AdjustOneStartMovement( int nClPathId, int nPrevClPathId, const DBLVECTOR& vAxPrev, bool bMaxZ) ;
bool AdjustOneStartMovement( int nClPathId, int nPrevClPathId, Operation* pPrevOp, const DBLVECTOR& vAxPrev, bool bMaxZ) ;
bool ToolChangeNeeded( const Operation& Op1, const Operation& Op2) const ;
bool RemoveClimb( int nClPathId) ;
bool AddRise( DBLVECTOR& vAxVal, double dDelta = - 1, int nClPathId = GDB_ID_NULL) ;