EgtMachKernel 2.1j1 :
- aggiunta gestione richiesta diametro portautensile.
This commit is contained in:
Binary file not shown.
@@ -171,6 +171,7 @@ class MachMgr : public IMachMgr
|
||||
bool TdbGetCurrToolParam( int nType, double& dVal) const override ;
|
||||
bool TdbGetCurrToolParam( int nType, std::string& sVal) const override ;
|
||||
bool TdbGetCurrToolMaxDepth( double& dMaxDepth) const override ;
|
||||
bool TdbGetCurrToolThDiam( double& dThDiam) const override ;
|
||||
int TdbCurrToolDraw( int nGenCtx, int nToolCtx) const override ;
|
||||
bool TdbReload( void) override ;
|
||||
bool TdbSave( void) const override ;
|
||||
|
||||
@@ -263,6 +263,18 @@ MachMgr::TdbGetCurrToolMaxDepth( double& dMaxDepth) const
|
||||
return pTsMgr->GetCurrToolMaxDepth( dSafe, dMaxDepth) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
MachMgr::TdbGetCurrToolThDiam( double& dThDiam) const
|
||||
{
|
||||
// recupero il gestore di utensili della macchina corrente
|
||||
ToolsMgr* pTsMgr = GetCurrToolsMgr() ;
|
||||
if ( pTsMgr == nullptr)
|
||||
return false ;
|
||||
// recupero il diametro del portautensili
|
||||
return pTsMgr->GetCurrToolThDiam( dThDiam) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
MachMgr::TdbCurrToolDraw( int nGenCtx, int nToolCtx) const
|
||||
|
||||
@@ -714,3 +714,39 @@ ToolsMgr::GetCurrToolMaxDepth( double dSafe, double& dMaxDepth) const
|
||||
|
||||
return false ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ToolsMgr::GetCurrToolThDiam( double& dThDiam) const
|
||||
{
|
||||
// verifico esistenza utensile corrente
|
||||
if ( ! m_bCurrTool)
|
||||
return false ;
|
||||
|
||||
// se punta a forare, lama, fresa o scalpello
|
||||
if ( ( m_tdCurrTool.m_nType & TF_DRILLBIT) != 0 ||
|
||||
( m_tdCurrTool.m_nType & TF_SAWBLADE) != 0 ||
|
||||
( m_tdCurrTool.m_nType & TF_MILL) != 0 ||
|
||||
( m_tdCurrTool.m_nType & TF_CHISEL) != 0) {
|
||||
// recupero le dimensioni del porta utensili
|
||||
double dTHoldLen = 0 ;
|
||||
double dTHoldDiam = 0 ;
|
||||
if ( ! GetValInNotes( m_tdCurrTool.m_sSysNotes, TSI_THLEN, dTHoldLen) ||
|
||||
! GetValInNotes( m_tdCurrTool.m_sSysNotes, TSI_THDIAM, dTHoldDiam)) {
|
||||
(const_cast<ToolsMgr*>(this))->SaveCurrTool() ;
|
||||
Save() ;
|
||||
GetValInNotes( m_tdCurrTool.m_sSysNotes, TSI_THLEN, dTHoldLen) ;
|
||||
GetValInNotes( m_tdCurrTool.m_sSysNotes, TSI_THDIAM, dTHoldDiam) ;
|
||||
}
|
||||
dThDiam = dTHoldDiam ;
|
||||
return true ;
|
||||
}
|
||||
// se mortasatrice/sega a catena o waterjet
|
||||
else if ( ( m_tdCurrTool.m_nType & TF_MORTISE) != 0 ||
|
||||
( m_tdCurrTool.m_nType & TF_WATERJET) != 0) {
|
||||
dThDiam = 0 ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
return false ;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ class ToolsMgr
|
||||
bool GetCurrToolParam( int nType, double& dVal) const ;
|
||||
bool GetCurrToolParam( int nType, std::string& sVal) const ;
|
||||
bool GetCurrToolMaxDepth( double dSafe, double& dMaxDepth) const ;
|
||||
bool GetCurrToolThDiam( double& dThDiam) const ;
|
||||
const ToolData* GetCurrTool( void) const
|
||||
{ if ( m_bCurrTool)
|
||||
return &m_tdCurrTool ;
|
||||
|
||||
Reference in New Issue
Block a user