EgtMachKernel :
- migliorata gestione angoli indeterminati con SCC e DirAux.
This commit is contained in:
+26
-4
@@ -754,9 +754,11 @@ Machine::GetMyAngles( const Vector3d& vtDirT, const Vector3d& vtDirA,
|
||||
// se indeterminato, provo a determinarlo con la direzione ausiliaria
|
||||
if ( ! bDet2) {
|
||||
bool bDetX ;
|
||||
vtDirI2.GetRotation( vtDirAn, vtAx1, dAngA2, bDetX) ;
|
||||
Vector3d vtSccDir ;
|
||||
bool bSccDir = GetSccDir( m_nCalcSolCh, vtDirAn, vtSccDir) ;
|
||||
vtDirI2.GetRotation( vtSccDir, vtAx1, dAngA2, bDetX) ;
|
||||
if ( bDetX)
|
||||
bDet2 = true ;
|
||||
bDet2 = bSccDir ;
|
||||
else
|
||||
dAngA2 = 0 ;
|
||||
}
|
||||
@@ -775,9 +777,11 @@ Machine::GetMyAngles( const Vector3d& vtDirT, const Vector3d& vtDirA,
|
||||
// se indeterminato, provo a determinarlo con la direzione ausiliaria
|
||||
if ( ! bDet1) {
|
||||
bool bDetX ;
|
||||
vtDirI1.GetRotation( vtDirAn, vtAx1, dAngA1, bDetX) ;
|
||||
Vector3d vtSccDir ;
|
||||
bool bSccDir = GetSccDir( m_nCalcSolCh, vtDirAn, vtSccDir) ;
|
||||
vtDirI1.GetRotation( vtSccDir, vtAx1, dAngA1, bDetX) ;
|
||||
if ( bDetX)
|
||||
bDet1 = true ;
|
||||
bDet1 = bSccDir ;
|
||||
else
|
||||
dAngA1 = 0 ;
|
||||
}
|
||||
@@ -1012,6 +1016,24 @@ Machine::GetToolDirFromAngles( double dAngA, double dAngB, Vector3d& vtDir) cons
|
||||
return GetDirection( m_vtCalcDir, vAng, vtDir) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Machine::GetSccDir( int nSolCh, const Vector3d& vtDirA, Vector3d& vtDirScc) const
|
||||
{
|
||||
switch ( nSolCh) {
|
||||
case MCH_SCC_ADIR_XP : vtDirScc = X_AX ; return true ;
|
||||
case MCH_SCC_ADIR_XM : vtDirScc = - X_AX ; return true ;
|
||||
case MCH_SCC_ADIR_YP : vtDirScc = Y_AX ; return true ;
|
||||
case MCH_SCC_ADIR_YM : vtDirScc = - Y_AX ; return true ;
|
||||
case MCH_SCC_ADIR_ZP : vtDirScc = Z_AX ; return true ;
|
||||
case MCH_SCC_ADIR_ZM : vtDirScc = - Z_AX ; return true ;
|
||||
case MCH_SCC_ADIR_NEAR : vtDirScc = vtDirA ; return true ;
|
||||
case MCH_SCC_ADIR_FAR : vtDirScc = - vtDirA ; return true ;
|
||||
}
|
||||
vtDirScc = vtDirA ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Machine::VerifyScc( const Vector3d& vtDirI, const Vector3d& vtDirA, int nSolCh) const
|
||||
|
||||
Reference in New Issue
Block a user