EgtMachKernel :
- aggiunte funzioni EmtModifyAxisPosition e EmtModifyAxisDirection per variare dati assi secondo testa corrente.
This commit is contained in:
+35
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user