EgtMachKernel (NewLink) :

- correzione a funzione SpecialLink e aggiunto parametro a funzione GetDoubleToolData.
This commit is contained in:
Riccardo Elitropi
2026-03-19 09:52:01 +01:00
parent b418e2d3ef
commit 708fe02b9b
9 changed files with 42 additions and 35 deletions
+7 -8
View File
@@ -304,14 +304,14 @@ Machining::MyPrepareToolPreview( bool bDouble)
return false ;
// se necessario, imposto l'utensile corrente
string sTool, sHead ;
string sTool, sTcPos, sHead ;
int nExitDBLId ;
if ( ! bDouble) {
sTool = GetToolName() ;
sHead = GetHeadName() ;
}
else {
if ( ! GetDoubleToolData( sTool, sHead, nExitDBLId))
if ( ! GetDoubleToolData( sTool, sTcPos, sHead, nExitDBLId))
return false ;
}
@@ -646,8 +646,8 @@ Machining::PrepareToolPreview( void)
}
if ( bOk && nStdIdDBL != GDB_ID_NULL) {
// imposto l'utensile per la lavorazione in doppio
string sTool, sHead ; int nDblExit ;
bOk = ( GetDoubleToolData( sTool, sHead, nDblExit)) ;
string sTool, sTcPos, sHead ; int nDblExit ;
bOk = ( GetDoubleToolData( sTool, sTcPos, sHead, nDblExit)) ;
if ( bOk) {
bool bOkToolSet = ( m_pMchMgr->SetCalcTool( sTool, sHead, nDblExit)) ;
bOk = bOkToolSet && MyPrepareToolPreview( true) && MyChangeToolPreviewShow( m_nLookFlag, true) ;
@@ -833,8 +833,8 @@ Machining::MyToolPreview( int nEntId, bool bDouble) const
if ( ! bDouble)
m_pMchMgr->GetAllCurrAxesNames( vAxNames) ;
else {
string sDBLTool, sDBLHead ; int nDBLExit ;
bool bOk = ( GetDoubleToolData( sDBLTool, sDBLHead, nDBLExit) && m_pMchMgr->SetCalcTool( sDBLTool, sDBLHead, nDBLExit)) ;
string sDBLTool, sDBLTcPos, sDBLHead ; int nDBLExit ;
bool bOk = ( GetDoubleToolData( sDBLTool, sDBLTcPos, sDBLHead, nDBLExit) && m_pMchMgr->SetCalcTool( sDBLTool, sDBLHead, nDBLExit)) ;
if ( bOk)
m_pMchMgr->GetAllCurrAxesNames( vAxNames) ;
m_pMchMgr->SetCalcTool( GetToolName(), GetHeadName(), GetExitNbr()) ;
@@ -1020,7 +1020,7 @@ Machining::GetDoubleType( const string& sUserNotes)
//----------------------------------------------------------------------------
bool
Machining::GetDoubleToolData( string& sDblTool, string& sDblHead, int& nDblExit) const
Machining::GetDoubleToolData( string& sDblTool, string& sDblTcPos, string& sDblHead, int& nDblExit) const
{
if ( m_pGeomDB == nullptr || m_pMchMgr == nullptr)
return false ;
@@ -1031,7 +1031,6 @@ Machining::GetDoubleToolData( string& sDblTool, string& sDblHead, int& nDblExit)
// recupero dati utensile in doppio
if ( ! GetValInNotes( GetToolData().m_sUserNotes, "DOUBLE", sDblTool))
return false ;
string sDblTcPos ;
if ( ! m_pMchMgr->GetCurrSetupMgr().GetToolData( sDblTool, sDblTcPos, sDblHead, nDblExit)) {
const ToolData* pTdata = pTMgr->GetTool( sDblTool) ;
if ( pTdata == nullptr)