EgtMachKernel 1.6k10 :
- sistemazioni varie in grezzi, lavorazioni, ....
This commit is contained in:
+26
-2
@@ -24,7 +24,8 @@ using namespace std ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
enum nDrillingKey {
|
||||
KEY_INV = 0,
|
||||
KEY_DH = 0,
|
||||
KEY_INV,
|
||||
KEY_LAT,
|
||||
KEY_LSE,
|
||||
KEY_LSS,
|
||||
@@ -38,6 +39,7 @@ enum nDrillingKey {
|
||||
KEY_ZZZ} ; // rappresenta il numero di elementi
|
||||
|
||||
static const std::array<std::string,KEY_ZZZ> sDrillingKey = {
|
||||
"DH",
|
||||
"INV",
|
||||
"LAT",
|
||||
"LSE",
|
||||
@@ -86,6 +88,7 @@ DrillingData::CopyFrom( const MachiningData* pMdata)
|
||||
m_ToolUuid = pDdata->m_ToolUuid ;
|
||||
m_sToolName = pDdata->m_sToolName ;
|
||||
m_bInvert = pDdata->m_bInvert ;
|
||||
m_sDepth = pDdata->m_sDepth ;
|
||||
m_dStartPos = pDdata->m_dStartPos ;
|
||||
m_dStartSlowLen = pDdata->m_dStartSlowLen ;
|
||||
m_dEndSlowLen = pDdata->m_dEndSlowLen ;
|
||||
@@ -112,6 +115,7 @@ DrillingData::SameAs(const MachiningData* pMdata) const
|
||||
m_ToolUuid == pDdata->m_ToolUuid &&
|
||||
m_sToolName == pDdata->m_sToolName &&
|
||||
m_bInvert == pDdata->m_bInvert &&
|
||||
m_sDepth == pDdata->m_sDepth &&
|
||||
m_dStartPos == pDdata->m_dStartPos &&
|
||||
m_dStartSlowLen == pDdata->m_dStartSlowLen &&
|
||||
m_dEndSlowLen == pDdata->m_dEndSlowLen &&
|
||||
@@ -156,6 +160,11 @@ DrillingData::FromString( const string& sString, int& nKey)
|
||||
nKey = FindDrillingKey( ToUpper( sKey)) ;
|
||||
bool bOk = ( nKey >= 0) ;
|
||||
switch ( nKey) {
|
||||
case KEY_DH :
|
||||
m_sDepth = sVal ;
|
||||
if ( m_sDepth.empty())
|
||||
m_sDepth = "TH" ;
|
||||
break ;
|
||||
case KEY_INV :
|
||||
bOk = ::FromString( sVal, m_bInvert) ;
|
||||
break ;
|
||||
@@ -202,6 +211,7 @@ string
|
||||
DrillingData::ToString( int nInd) const
|
||||
{
|
||||
switch ( nInd) {
|
||||
case KEY_DH : return ( sDrillingKey[KEY_DH] + "=" + m_sDepth) ;
|
||||
case KEY_INV : return ( sDrillingKey[KEY_INV] + "=" + ::ToString( m_bInvert)) ;
|
||||
case KEY_LAT : return ( sDrillingKey[KEY_LAT] + "=" + ::ToString( m_dThroughAddLen)) ;
|
||||
case KEY_LSE : return ( sDrillingKey[KEY_LSE] + "=" + ::ToString( m_dEndSlowLen)) ;
|
||||
@@ -226,7 +236,7 @@ DrillingData::VerifyTool( const ToolsMgr* pToolsMgr, const std::string& sVal, co
|
||||
pTdata = pToolsMgr->GetTool( sVal) ;
|
||||
if ( pTdata == nullptr)
|
||||
return false ;
|
||||
if ( ( pTdata->m_nType & TF_DRILLBIT) == 0 ||
|
||||
if ( ( pTdata->m_nType & TF_DRILLBIT) == 0 &&
|
||||
pTdata->m_nType != TT_MILL_STD)
|
||||
return false ;
|
||||
return true ;
|
||||
@@ -256,6 +266,9 @@ bool
|
||||
DrillingData::SetParam( int nType, double dVal)
|
||||
{
|
||||
switch ( nType) {
|
||||
case MPA_DEPTH :
|
||||
m_sDepth = ::ToString( dVal) ;
|
||||
return true ;
|
||||
case MPA_STARTPOS :
|
||||
m_dStartPos = dVal ;
|
||||
return true ;
|
||||
@@ -289,6 +302,9 @@ DrillingData::SetParam( int nType, const string& sVal)
|
||||
case MPA_TOOL :
|
||||
m_sToolName = sVal ;
|
||||
return true ;
|
||||
case MPA_DEPTH_STR :
|
||||
m_sDepth = sVal ;
|
||||
return true ;
|
||||
case MPA_TUUID :
|
||||
return ::FromString( sVal, m_ToolUuid) ;
|
||||
case MPA_UUID :
|
||||
@@ -313,6 +329,11 @@ DrillingData::GetParam( int nType, bool& bVal) const
|
||||
bool
|
||||
DrillingData::GetParam( int nType, int& nVal) const
|
||||
{
|
||||
switch ( nType) {
|
||||
case MPA_TYPE :
|
||||
nVal = MT_DRILLING ;
|
||||
return true ;
|
||||
}
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -354,6 +375,9 @@ DrillingData::GetParam( int nType, string& sVal) const
|
||||
case MPA_TOOL :
|
||||
sVal = m_sToolName ;
|
||||
return true ;
|
||||
case MPA_DEPTH_STR :
|
||||
sVal = m_sDepth ;
|
||||
return true ;
|
||||
case MPA_TUUID :
|
||||
sVal = ::ToString( m_ToolUuid) ;
|
||||
return true ;
|
||||
|
||||
Reference in New Issue
Block a user