EgtMachKernel 1.6j2 :

- aggiunta prima versione del Simulator.
This commit is contained in:
Dario Sassi
2015-10-23 07:59:43 +00:00
parent 45e3e41eac
commit 2de785c6ce
21 changed files with 609 additions and 19 deletions
+23 -1
View File
@@ -228,6 +228,27 @@ Machine::AddKinematicAxis( bool bOnHead, int nId)
return true ;
}
//----------------------------------------------------------------------------
string
Machine::GetKinematicAxis( int nInd)
{
// controllo GeomDB
if ( m_pGeomDB == nullptr)
return "" ;
// controllo indice
int nLinAxTot = int( m_vCalcLinAx.size()) ;
int nRotAxTot = int( m_vCalcRotAx.size()) ;
if ( nInd < 0 || nInd >= nLinAxTot + nRotAxTot)
return "" ;
// recupero nome
string sName ;
if ( nInd < nLinAxTot)
m_pGeomDB->GetName( m_vCalcLinAx[nInd].nGrpId, sName) ;
else
m_pGeomDB->GetName( m_vCalcRotAx[nInd-nLinAxTot].nGrpId, sName) ;
return sName ;
}
//----------------------------------------------------------------------------
bool
Machine::GetAngles( const Vector3d& vtDirT, const Vector3d& vtDirA,
@@ -392,7 +413,7 @@ Machine::GetPositions( const Point3d& ptP, double dAngA, double dAngB,
vtDirH.Rotate( vtAx1, dAngA) ;
}
// assegno l'offset tesat
// assegno l'offset testa
Vector3d vtDtHe = ORIG - m_ptCalcPos ;
// calcolo il recupero degli assi : è l'opposto dello spostamento della posizione
@@ -406,6 +427,7 @@ Machine::GetPositions( const Point3d& ptP, double dAngA, double dAngB,
dY = ptP.y + vtDtHe.y + vtDtAx.y + vtDtTL.y ;
dZ = ptP.z + vtDtHe.z + vtDtAx.z + vtDtTL.z ;
nStat = 0 ;
return true ;
}