EgtMachKernel :

- aggiunta gestione prima disposizione in lista operazioni
- migliorato controllo dati macchina al caricamento
- ora macchina deve essere disegnata e definita cinematicamente con tutti gli assi a 0,
  si definisce la posizione home e dopo il carico viene posta in questa posizione.
This commit is contained in:
Dario Sassi
2015-05-31 14:10:00 +00:00
parent 4f150f773c
commit b373807375
27 changed files with 1306 additions and 327 deletions
+16 -6
View File
@@ -40,6 +40,7 @@ Axis::Clone( void) const
// eseguo copia dei dati
if ( pAx != nullptr) {
try { pAx->m_nOwnerId = GDB_ID_NULL ;
pAx->m_pGeomDB = nullptr ;
pAx->m_sName = m_sName ;
pAx->m_nType = m_nType ;
pAx->m_ptPos = m_ptPos ;
@@ -75,10 +76,11 @@ Axis::Dump( string& sOut, const char* szNewLine) const
//----------------------------------------------------------------------------
bool
Axis::SetOwner( int nId)
Axis::SetOwner( int nId, IGeomDB* pGDB)
{
m_nOwnerId = nId ;
return true ;
m_pGeomDB = pGDB ;
return ( m_nOwnerId != GDB_ID_NULL && m_pGeomDB != nullptr) ;
}
//----------------------------------------------------------------------------
@@ -88,25 +90,33 @@ Axis::GetOwner( void) const
return m_nOwnerId ;
}
//----------------------------------------------------------------------------
IGeomDB*
Axis::GetGeomDB( void) const
{
return m_pGeomDB ;
}
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
Axis::Axis( void)
: m_nOwnerId( GDB_ID_NULL), m_nType( MCH_AT_NONE), m_Stroke( {{0,0}}), m_dHomeVal( 0), m_dCurrVal( 0)
: m_nOwnerId( GDB_ID_NULL), m_pGeomDB( nullptr),
m_nType( MCH_AT_NONE), m_Stroke( {{0,0}}), m_dHomeVal( 0), m_dCurrVal( 0)
{
}
//----------------------------------------------------------------------------
bool
Axis::Set( const string& sName, int nType,
const Point3d& ptPos, const Vector3d& vtDir, const STROKE& Stroke, double dVal)
const Point3d& ptPos, const Vector3d& vtDir, const STROKE& Stroke, double dHome)
{
m_sName = sName ;
m_nType = nType ;
m_ptPos = ptPos ;
m_vtDir = vtDir ;
m_Stroke = Stroke ;
m_dHomeVal = dVal ;
m_dCurrVal = dVal ;
m_dHomeVal = dHome ;
m_dCurrVal = 0.0 ;
return m_vtDir.Normalize() ;
}