EgtMachKernel :

- modifiche varie per OmagCut.
This commit is contained in:
Dario Sassi
2015-09-19 08:27:21 +00:00
parent e2a7280a07
commit 41c09abe37
16 changed files with 366 additions and 8 deletions
+107
View File
@@ -14,8 +14,10 @@
//--------------------------- Include ----------------------------------------
#include "stdafx.h"
#include "ToolData.h"
#include "/EgtDev/Include/EMkToolConst.h"
#include "/EgtDev/Include/EGkGeoConst.h"
#include "/EgtDev/Include/EGnStringUtils.h"
#include "/EgtDev/Include/EGnEgtUUID.h"
#include <array>
#include <cassert>
@@ -237,3 +239,108 @@ ToolData::VerifySpeed( double dVal) const
{
return ( dVal < m_dMaxSpeed + EPS_SMALL) ;
}
//----------------------------------------------------------------------------
bool
ToolData::GetParam( int nType, int& nVal) const
{
switch ( nType) {
case TPA_CORR :
nVal = m_nCorr ;
return true ;
case TPA_EXIT :
nVal = m_nExit ;
return true ;
case TPA_TYPE :
nVal = m_nType ;
return true ;
}
return false ;
}
//----------------------------------------------------------------------------
bool
ToolData::GetParam( int nType, double& dVal) const
{
switch ( nType) {
case TPA_CORNRAD :
dVal = m_dCornRad ;
return true ;
case TPA_DIAM :
dVal = m_dDiam ;
return true ;
case TPA_TOTDIAM :
dVal = m_dTDiam ;
return true ;
case TPA_FEED :
dVal = m_dFeed ;
return true ;
case TPA_ENDFEED :
dVal = m_dEndFeed ;
return true ;
case TPA_STARTFEED :
dVal = m_dStartFeed ;
return true ;
case TPA_TIPFEED :
dVal = m_dTipFeed ;
return true ;
case TPA_LEN :
dVal = m_dLen ;
return true ;
case TPA_TOTLEN :
dVal = m_dTLen ;
return true ;
case TPA_MAXMAT :
dVal = m_dMaxMat ;
return true ;
case TPA_LONOFFSET :
dVal = m_dOffsL ;
return true ;
case TPA_RADOFFSET :
dVal = m_dOffsR ;
return true ;
case TPA_SPEED :
dVal = m_dSpeed ;
return true ;
case TPA_SIDEANG :
dVal = m_dSideAng ;
return true ;
case TPA_MAXSPEED :
dVal = m_dMaxSpeed ;
return true ;
case TPA_THICK :
dVal = m_dThick ;
return true ;
}
return false ;
}
//----------------------------------------------------------------------------
bool
ToolData::GetParam( int nType, string& sVal) const
{
switch ( nType) {
case TPA_DRAW :
sVal = m_sDraw ;
return true ;
case TPA_HEAD :
sVal = m_sHead ;
return true ;
case TPA_NAME :
sVal = m_sName ;
return true ;
case TPA_SYSNOTES :
sVal = m_sSysNotes ;
return true ;
case TPA_USERNOTES :
sVal = m_sUserNotes ;
return true ;
case TPA_TCPOS :
sVal = m_sTcPos ;
return true ;
case TPA_UUID :
sVal = ::ToString( m_Uuid) ;
return true ;
}
return false ;
}