diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index b0c051c..b4a4f27 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ diff --git a/MachMgr.h b/MachMgr.h index c973a4a..fc24c46 100644 --- a/MachMgr.h +++ b/MachMgr.h @@ -225,7 +225,7 @@ class MachMgr : public IMachMgr // Simulation bool SimStart( void) override ; bool SimMove( int& nStatus) override ; - bool SimGetAxisInfoPos( int nI, std::string& sName, double& dVal) override ; + bool SimGetAxisInfoPos( int nI, std::string& sToken, double& dVal) override ; bool SimGetToolInfo( std::string& sName, double& dSpeed) override ; bool SimGetMoveInfo( int& nGmove, double& dFeed) override ; bool SimSetStep( double dStep) override ; diff --git a/MachMgrSimulation.cpp b/MachMgrSimulation.cpp index cb1c270..fb287ba 100644 --- a/MachMgrSimulation.cpp +++ b/MachMgrSimulation.cpp @@ -52,13 +52,13 @@ MachMgr::SimMove( int& nStatus) //---------------------------------------------------------------------------- bool -MachMgr::SimGetAxisInfoPos( int nI, string& sName, double& dVal) +MachMgr::SimGetAxisInfoPos( int nI, string& sToken, double& dVal) { // verifico simulatore if ( m_pSimul == nullptr) return false ; // recupero quote - return m_pSimul->GetAxisInfoPos( nI, sName, dVal) ; + return m_pSimul->GetAxisInfoPos( nI, sToken, dVal) ; } //---------------------------------------------------------------------------- diff --git a/Operation.cpp b/Operation.cpp index 8688635..fd88239 100644 --- a/Operation.cpp +++ b/Operation.cpp @@ -1327,6 +1327,16 @@ Operation::TestCollisionAvoid( const DBLVECTOR& vAxStart, const DBLVECTOR& vAxEn // il numero di assi deve essere costante if ( vAxName.size() != vAxStart.size() || vAxName.size() != vAxEnd.size()) return false ; + // !!! Temporaneo in attesa di gestione attrezzaggio !!! + // Se testa con Info ZMAXONROT != 0 e variazione assi rotanti -> collisione + int nHeadId = pMch->GetCurrHead() ; + int nVal = 0 ; + if ( m_pGeomDB->GetInfo( nHeadId, "ZMAXONROT", nVal) && nVal != 0) { + if ( vAxName.size() > 3 && abs( vAxEnd[3] - vAxStart[3]) > 100 * EPS_ANG_SMALL) + return false ; + if ( vAxName.size() > 4 && abs( vAxEnd[4] - vAxStart[4]) > 100 * EPS_ANG_SMALL) + return false ; + } // Porto la macchina in home pMch->ResetAllAxesPos() ; // Elenco grezzi attivi diff --git a/Simulator.cpp b/Simulator.cpp index b8385f7..e8c1851 100644 --- a/Simulator.cpp +++ b/Simulator.cpp @@ -384,7 +384,7 @@ Simulator::Move( int& nStatus) //---------------------------------------------------------------------------- bool -Simulator::GetAxisInfoPos( int nI, string& sName, double& dVal) +Simulator::GetAxisInfoPos( int nI, string& sToken, double& dVal) { // Verifiche if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr) @@ -392,7 +392,8 @@ Simulator::GetAxisInfoPos( int nI, string& sName, double& dVal) // recupero i dati dell'asse if ( nI < 0 || nI >= int( m_AxesName.size())) return false ; - sName = m_AxesName[nI] ; + string sName = m_AxesName[nI] ; + sToken = m_AxesToken[nI] ; return m_pMchMgr->GetAxisPos( sName, dVal) ; } diff --git a/Simulator.h b/Simulator.h index 67d7357..cc80716 100644 --- a/Simulator.h +++ b/Simulator.h @@ -29,7 +29,7 @@ class Simulator bool Init( MachMgr* pMchMgr) ; bool Start( void) ; bool Move( int& nStatus) ; - bool GetAxisInfoPos( int nI, std::string& sName, double& dVal) ; + bool GetAxisInfoPos( int nI, std::string& sToken, double& dVal) ; bool GetToolInfo( std::string& sName, double& dSpeed) ; bool GetMoveInfo( int& nGmove, double& dFeed) ; bool SetStep( double dStep) ;