EgtMachKernel :

- aggiunte funzioni EmtModifyAxisPosition e EmtModifyAxisDirection per variare dati assi secondo testa corrente.
This commit is contained in:
Dario Sassi
2019-12-24 08:40:28 +00:00
parent 2ccd9fee17
commit 50bbbe202b
5 changed files with 120 additions and 3 deletions
+35 -1
View File
@@ -380,7 +380,7 @@ Machine::AdjustAxis( int nLay, const string& sPart, const string& sName,
Vector3d vtDirN = vtDir ;
if ( ! vtDirN.Normalize() || ! AreSameVectorEpsilon( vtAxis, vtDirN, 10 * SIN_EPS_ANG_SMALL)) {
double dAngRot ;
if ( ! vtAxis.GetAngle( vtDirN, dAngRot) || abs( dAngRot) > m_dExitMaxRotAdj) {
if ( ! vtAxis.GetAngle( vtDirN, dAngRot) || abs( dAngRot) > m_dAxisMaxRotAdj) {
string sOut = " Wrong Axis Vector or Dir " + sPart ;
LOG_ERROR( GetEMkLogger(), sOut.c_str()) ;
return false ;
@@ -420,6 +420,40 @@ Machine::AdjustAxis( int nLay, const string& sPart, const string& sName,
return true ;
}
//----------------------------------------------------------------------------
bool
Machine::ModifyMachineAxisPosition( const string& sName, const Point3d& ptPos)
{
// controllo GeomDB
if ( m_pGeomDB == nullptr)
return false ;
// recupero il gruppo dell'asse
int nAxGrp = GetGroup( sName) ;
// recupero il relativo gestore
Axis* pAx = GetAxis( nAxGrp) ;
if ( pAx == nullptr)
return false ;
// eseguo la modifica
return pAx->Modify( ptPos, m_dAxisMaxAdjust) ;
}
//----------------------------------------------------------------------------
bool
Machine::ModifyMachineAxisDirection( const string& sName, const Vector3d& vtDir)
{
// controllo GeomDB
if ( m_pGeomDB == nullptr)
return false ;
// recupero il gruppo dell'asse
int nAxGrp = GetGroup( sName) ;
// recupero il relativo gestore
Axis* pAx = GetAxis( nAxGrp) ;
if ( pAx == nullptr)
return false ;
// eseguo la modifica
return pAx->Modify( vtDir, m_dAxisMaxRotAdj) ;
}
//----------------------------------------------------------------------------
bool
Machine::ModifyMachineAxisStroke( const string& sName, const STROKE& Stroke)