EgtMachKernel :

- correzioni per controllo punto medio con centri di lavoro e robot.
This commit is contained in:
Dario Sassi
2025-08-04 07:59:59 +02:00
parent 3f8d6867e2
commit be6750fd14
+8 -18
View File
@@ -2123,10 +2123,8 @@ Operation::MyCalculateClPathMcentAxesValues( int nClPathId, int nLinAxes, int nR
LOG_ERROR( GetEMkLogger(), sOut.c_str())
return false ;
}
if ( bAxesError) {
if ( bAxesError)
bOk = false ;
continue ;
}
}
// Se esistono aree protette, devo comunque verificare i punti intermedi
if ( ! bMidAdded && m_pMchMgr->ExistProtectedAreas()) {
@@ -2490,6 +2488,7 @@ Operation::VerifyMcentLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDir
return true ;
// Va inserito il punto medio
bAdded = true ;
Point3d ptMid = Media( ptPrec, ptP) ;
Vector3d vtDirMid = Media( vtDirPrec, vtDir) ;
if ( ! vtDirMid.Normalize()) {
@@ -2588,18 +2587,14 @@ Operation::VerifyMcentLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDir
ptMid, vtDirMid, vtAuxMid, vtCorrMid, vAxMid,
nCnt, nMidEntId, dRot1W, nMoveType, bToolShow, bAdded1, bAxError1))
return false ;
if ( bAxError1) {
if ( bAxError1)
bAxError = true ;
return true ;
}
if ( ! VerifyMcentLineMidPoint( ptMid, vtDirMid, vtAuxMid, vtCorrMid, vAxMid,
ptP, vtDir, vtAux, vtCorr, vAxVal,
nCnt, nEntId, dRot1W, nMoveType, bToolShow, bAdded2, bAxError2))
return false ;
if ( bAxError2) {
if ( bAxError2)
bAxError = true ;
return true ;
}
return true ;
}
@@ -2703,10 +2698,8 @@ Operation::CalculateClPathRobotAxesValues( int nClPathId, int nLinAxes, int nRot
LOG_ERROR( GetEMkLogger(), sOut.c_str())
return false ;
}
if ( bAxesError) {
if ( bAxesError)
bOk = false ;
continue ;
}
}
}
// aggiorno valori precedenti
@@ -2845,6 +2838,7 @@ Operation::VerifyRobotLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDir
return true ;
// Va inserito il punto medio
bAdded = true ;
Point3d ptMid = Media( ptPrec, ptP) ;
Vector3d vtDirMid = Media( vtDirPrec, vtDir) ;
if ( ! vtDirMid.Normalize()) {
@@ -2928,18 +2922,14 @@ Operation::VerifyRobotLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDir
ptMid, vtDirMid, vtAuxMid, vtCorrMid, vAxMid,
nCnt, nMidEntId, nMoveType, bToolShow, bAdded1, bAxError1))
return false ;
if ( bAxError1) {
if ( bAxError1)
bAxError = true ;
return true ;
}
if ( ! VerifyRobotLineMidPoint( ptMid, vtDirMid, vtAuxMid, vtCorrMid, vAxMid,
ptP, vtDir, vtAux, vtCorr, vAxVal,
nCnt, nEntId, nMoveType, bToolShow, bAdded2, bAxError2))
return false ;
if ( bAxError2) {
if ( bAxError2)
bAxError = true ;
return true ;
}
return true ;
}