EgtMachKernel 2.5j4 :
- aggiunte a interfaccia di MachMgr le funzioni GetClEntAxesVal, GetToolSetupPosInCurrSetup e GetAllCurrAxesName.
This commit is contained in:
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2023
|
||||
//----------------------------------------------------------------------------
|
||||
// File : MachMgr.h Data : 25.08.23 Versione : 2.5h3
|
||||
// File : MachMgr.h Data : 28.10.23 Versione : 2.5j4
|
||||
// Contenuto : Dichiarazione della classe MachMgr.
|
||||
//
|
||||
//
|
||||
@@ -12,6 +12,7 @@
|
||||
// 17.03.21 DS Aggiunte funzioni per import/export utensili.
|
||||
// 21.09.22 DS Aggiunta GetAxisOffset.
|
||||
// 25.08.23 DS Aggiunta CopyMachGroup.
|
||||
// 28.10.23 DS Aggiunte GetClEntAxesVal e GetToolSetupPosInCurrSetup.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -205,6 +206,7 @@ class MachMgr : public IMachMgr
|
||||
bool ImportSetup( const std::string& sName) override ;
|
||||
bool VerifyCurrSetup( STRVECTOR& vsErrors) override ;
|
||||
bool FindToolInCurrSetup( const std::string& sTool) override ;
|
||||
bool GetToolSetupPosInCurrSetup( const std::string& sTool, std::string& sTcPos) override ;
|
||||
bool GetToolsInCurrSetupPos( const std::string& sTcPos, STRVECTOR& vsTools) override ;
|
||||
bool UpdateCurrSetup( void) override ;
|
||||
bool EraseCurrSetup( void) override ;
|
||||
@@ -303,8 +305,9 @@ class MachMgr : public IMachMgr
|
||||
bool GetMachiningEndPoint( Point3d& ptEnd) const override ;
|
||||
// CL Entities Interrogations
|
||||
bool GetClEntMove( int nEntId, int& nMove) const override ;
|
||||
bool GetClEntFlag( int nEntId, int& nFlag) const override ;
|
||||
bool GetClEntFlag( int nEntId, int& nFlag, int& nFlag2) const override ;
|
||||
bool GetClEntIndex( int nEntId, int& nIndex) const override ;
|
||||
bool GetClEntAxesVal( int nEntId, DBLVECTOR& vAxes) const override ;
|
||||
// Simulation
|
||||
bool SimInit( void) override ;
|
||||
bool SimStart( bool bFirst) override ;
|
||||
@@ -323,6 +326,7 @@ class MachMgr : public IMachMgr
|
||||
// Machine Calc
|
||||
bool SetCalcTable( const std::string& sTable) override ;
|
||||
bool SetCalcTool( const std::string& sTool, const std::string& sHead, int nExit) override ;
|
||||
bool GetAllCurrAxesName( STRVECTOR& vAxName) const override ;
|
||||
bool SetRotAxisBlock( const std::string& sAxis, double dVal) override ;
|
||||
bool GetRotAxisBlocked( int nInd, std::string& sAxis, double& dVal) const override ;
|
||||
bool GetCalcTool( std::string& sTool) const override ;
|
||||
@@ -432,7 +436,6 @@ class MachMgr : public IMachMgr
|
||||
// MachineCalc
|
||||
int GetCurrLinAxes( void) const ;
|
||||
int GetCurrRotAxes( void) const ;
|
||||
bool GetAllCurrAxesName( STRVECTOR& vAxName) const ;
|
||||
bool GetAllCurrAxesHomePos( DBLVECTOR& vAxHomeVal) const ;
|
||||
bool GetCurrAxisHomePos( int nInd, double& dHome) const ;
|
||||
const Frame3d& GetCurrLinAxesFrame( void) const ;
|
||||
|
||||
+24
-4
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2019-2019
|
||||
// EgalTech 2019-2023
|
||||
//----------------------------------------------------------------------------
|
||||
// File : MachMgrClEntities.cpp Data : 15.10.19 Versione : 2.1j4
|
||||
// File : MachMgrClEntities.cpp Data : 27.10.23 Versione : 2.5j4
|
||||
// Contenuto : Implementazione interrogazione entità CL della classe MachMgr.
|
||||
//
|
||||
//
|
||||
@@ -39,10 +39,11 @@ MachMgr::GetClEntMove( int nEntId, int& nMove) const
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
MachMgr::GetClEntFlag( int nEntId, int& nFlag) const
|
||||
MachMgr::GetClEntFlag( int nEntId, int& nFlag, int& nFlag2) const
|
||||
{
|
||||
// default
|
||||
nFlag = 0 ;
|
||||
nFlag2 = 0 ;
|
||||
// verifico validita GeomDB
|
||||
if ( m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
@@ -50,8 +51,9 @@ MachMgr::GetClEntFlag( int nEntId, int& nFlag) const
|
||||
const CamData* pCamData = GetCamData( m_pGeomDB->GetUserObj( nEntId)) ;
|
||||
if ( pCamData == nullptr)
|
||||
return false ;
|
||||
// recupero il flag
|
||||
// recupero i flag
|
||||
nFlag = pCamData->GetFlag() ;
|
||||
nFlag2 = pCamData->GetFlag2() ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
@@ -72,3 +74,21 @@ MachMgr::GetClEntIndex( int nEntId, int& nIndex) const
|
||||
nIndex = pCamData->GetIndex() ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
MachMgr::GetClEntAxesVal( int nEntId, DBLVECTOR& vAxes) const
|
||||
{
|
||||
// default
|
||||
vAxes.clear() ;
|
||||
// verifico validita GeomDB
|
||||
if ( m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
// recupero l'oggetto CamData
|
||||
const CamData* pCamData = GetCamData( m_pGeomDB->GetUserObj( nEntId)) ;
|
||||
if ( pCamData == nullptr)
|
||||
return false ;
|
||||
// recupero i valori degli assi
|
||||
vAxes = pCamData->GetAxesVal() ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
@@ -130,6 +130,13 @@ MachMgr::FindToolInCurrSetup( const string& sTool)
|
||||
return m_stuMgr.FindTool( sTool) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
MachMgr::GetToolSetupPosInCurrSetup( const string& sTool, string& sTcPos)
|
||||
{
|
||||
return m_stuMgr.GetToolSetupPos( sTool, sTcPos) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
MachMgr::GetToolsInCurrSetupPos( const string& sTcPos, STRVECTOR& vsTools)
|
||||
|
||||
+8
-2
@@ -277,14 +277,20 @@ SetupMgr::GetPosData( int nPos, string& sTcPos, string& sHead, int& nExit, strin
|
||||
bool
|
||||
SetupMgr::GetToolData( const string& sName, string& sTcPos, string& sHead, int& nExit, int* pnPos) const
|
||||
{
|
||||
// reset valori di ritorno
|
||||
sTcPos.clear() ;
|
||||
sHead.clear() ;
|
||||
nExit = 0 ;
|
||||
if ( pnPos != nullptr)
|
||||
*pnPos = 0 ;
|
||||
// verifico validità utensile
|
||||
if ( IsEmptyOrSpaces( sName))
|
||||
return false ;
|
||||
// cerco l'utensile
|
||||
int nI = - 1 ;
|
||||
for ( size_t i = 0 ; i < m_vStuData.size() ; ++ i) {
|
||||
for ( int i = 0 ; i < int( m_vStuData.size()) ; ++ i) {
|
||||
if ( m_vStuData[i].m_nExit > 0 && EqualNoCase( sName, m_vStuData[i].m_sName)) {
|
||||
nI = int( i) ;
|
||||
nI = i ;
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user