EgtMachKernel :

- aggiunto sottotipo fresa per polishing.
This commit is contained in:
Dario Sassi
2020-02-21 11:04:17 +00:00
parent 65daa04bc4
commit b775e58f22
2 changed files with 18 additions and 8 deletions
+10 -4
View File
@@ -515,8 +515,8 @@ MachMgr::UpdateStandardToolDraw( const ToolData* pTdata, int nGenCtx, int nToolC
// Acquisisco il programma lua di creazione disegno utensile
if ( ! ExeLuaExecFile( m_sToolMakersDir + "\\" + sMaker))
return TD_INT_ERR ;
// Assegno i dati utensile a seconda del tipo
bool bOk = true ;
// Assegno i dati utensile
bool bOk = ExeLuaSetGlobIntVar( "TOOL.TYPE", nType) ;
switch ( nType) {
case TT_DRILL_STD :
case TT_DRILL_LONG :
@@ -539,6 +539,7 @@ MachMgr::UpdateStandardToolDraw( const ToolData* pTdata, int nGenCtx, int nToolC
break ;
case TT_MILL_STD :
case TT_MILL_NOTIP :
case TT_MILL_POLISHING :
case TT_WATERJET :
bOk = bOk && ExeLuaSetGlobStringVar( "TOOL.TOOLHOLDER", sThPath) ;
bOk = bOk && ExeLuaSetGlobNumVar( "TOOL.TOTLEN", dTotLen) ;
@@ -596,7 +597,7 @@ MachMgr::UpdateCustomToolDraw( const ToolData* pTdata, int nGenCtx, int nToolCtx
double dDiam = 0 ;
pTdata->GetParam( TPA_DIAM, dDiam) ;
// Solo per frese
if ( nType != TT_MILL_STD && nType != TT_MILL_NOTIP)
if ( nType != TT_MILL_STD && nType != TT_MILL_NOTIP && nType != TT_MILL_POLISHING)
return TD_INT_ERR ;
// Imposto contesto per il disegno utensile
if ( ! ExeSetCurrentContext( nToolCtx))
@@ -628,6 +629,7 @@ MachMgr::GetToolMakerKeyFromType( int nType) const
return SAWBLADEMAKER_KEY ;
case TT_MILL_STD :
case TT_MILL_NOTIP :
case TT_MILL_POLISHING :
return MILLMAKER_KEY ;
case TT_MORTISE_STD :
return MORTISEMAKER_KEY ;
@@ -670,6 +672,10 @@ MachMgr::GetToolHolderPath( const string& sHeadName, int nExit, int nType) const
string sKey2 = sKey + ":MILL_NOTIP" ;
sToolHolder = GetPrivateProfileStringUtf8( TOOLHOLDER_SEC.c_str(), sKey2.c_str(), "", sMachIni.c_str()) ;
}
else if ( nType == TT_MILL_POLISHING) {
string sKey2 = sKey + ":MILL_POLISHING" ;
sToolHolder = GetPrivateProfileStringUtf8( TOOLHOLDER_SEC.c_str(), sKey2.c_str(), "", sMachIni.c_str()) ;
}
if ( sToolHolder.empty())
sToolHolder = GetPrivateProfileStringUtf8( TOOLHOLDER_SEC.c_str(), sKey.c_str(), "", sMachIni.c_str()) ;
// Se non trovato, provo da sezione Tools di Ini di macchina
@@ -678,7 +684,7 @@ MachMgr::GetToolHolderPath( const string& sHeadName, int nExit, int nType) const
sToolHolder = GetPrivateProfileStringUtf8( TOOLS_SEC.c_str(), DRILLHOLDER_KEY.c_str(), "", sMachIni.c_str()) ;
else if ( nType == TT_SAW_STD || nType == TT_SAW_FLAT)
sToolHolder = GetPrivateProfileStringUtf8( TOOLS_SEC.c_str(), SAWBLADEHOLDER_KEY.c_str(), "", sMachIni.c_str()) ;
else if ( nType == TT_MILL_STD || nType == TT_MILL_NOTIP)
else if ( nType == TT_MILL_STD || nType == TT_MILL_NOTIP || nType == TT_MILL_POLISHING)
sToolHolder = GetPrivateProfileStringUtf8( TOOLS_SEC.c_str(), MILLHOLDER_KEY.c_str(), "", sMachIni.c_str()) ;
}
// Se non trovato ancora, esco