EgtMachKernel :

- nel calcolo assi di robot ora si gestiscono anche MCH_SCC_ADIR_NEAR e MCH_SCC_ADIR_FAR.
This commit is contained in:
Dario Sassi
2025-08-11 18:48:08 +02:00
parent bc6c7d8745
commit e92a37aa4f
2 changed files with 120 additions and 57 deletions
+13 -6
View File
@@ -2610,9 +2610,10 @@ Operation::CalculateClPathRobotAxesValues( int nClPathId, int nLinAxes, int nRot
// cancello eventuali punti aggiunti
EraseAddedPoints( nClPathId) ;
// eventuale direzione Aux preferenziale
int nSolCh = GetSolCh() ;
bool bUseRefAux = true ;
Vector3d vtRefAux = Y_AX ;
switch ( GetSolCh()) {
Vector3d vtRefAux = V_NULL ;
switch ( nSolCh) {
case MCH_SCC_ADIR_XP : vtRefAux = X_AX ; break ;
case MCH_SCC_ADIR_XM : vtRefAux = -X_AX ; break ;
case MCH_SCC_ADIR_YP : vtRefAux = Y_AX ; break ;
@@ -2654,10 +2655,16 @@ Operation::CalculateClPathRobotAxesValues( int nClPathId, int nLinAxes, int nRot
Vector3d vtDir = pCamData->GetToolDir() ;
Vector3d vtAux ;
if ( ! bUseRefAux) {
Frame3d frTool ;
frTool.Set( ORIG, vtDir) ;
frTool.Rotate( frTool.Orig(), frTool.VersZ(), 0, 1) ;
vtAux = frTool.VersX() ;
if ( nSolCh == MCH_SCC_ADIR_NEAR || nSolCh == MCH_SCC_ADIR_FAR) {
vtAux = OrthoCompo( pCamData->GetAuxDir(), vtDir) ;
vtAux.Normalize() ;
}
else {
Frame3d frTool ;
frTool.Set( ORIG, vtDir) ;
frTool.Rotate( frTool.Orig(), frTool.VersZ(), 0, 1) ;
vtAux = frTool.VersX() ;
}
}
else {
vtAux = OrthoCompo( vtRefAux, vtDir) ;