EgtMachKernel 1.6v3 :
- corretto errore calcolo nomi nuovi per utensili, lavorazioni, gruppi di lavoro e operazioni quando più corti di 2 caratteri - aggiunti controlli su validità nomi a utensili in carico e lavorazioni - separato overlap di fresature da overlap di forature - sulle GetParam si assegna sempre valore di default al parametro di ritorno.
This commit is contained in:
+15
-3
@@ -222,10 +222,12 @@ MachMgr::GetOperationNewName( string& sName) const
|
||||
// se nome vuoto, assegno radice standard
|
||||
if ( sName.empty())
|
||||
sName = "Oper" ;
|
||||
// se presenti caratteri vietati, li sostituisco
|
||||
ValidateName( sName) ;
|
||||
// verifico che il nome sia unico
|
||||
int nCount = 0 ;
|
||||
string sOrigName = sName ;
|
||||
if ( sOrigName.rfind( "_1") == sOrigName.length() - 2)
|
||||
if ( sOrigName.length() > 2 && sOrigName.rfind( "_1") == sOrigName.length() - 2)
|
||||
sOrigName.erase( sOrigName.length() - 2) ;
|
||||
while ( GetOperationId( sName) != GDB_ID_NULL) {
|
||||
++ nCount ;
|
||||
@@ -654,7 +656,12 @@ MachMgr::AddMachining( const string& sName, const string& sMachining)
|
||||
if ( nId == GDB_ID_NULL)
|
||||
return GDB_ID_NULL ;
|
||||
// assegno il nome
|
||||
m_pGeomDB->SetName( nId, sNewName) ;
|
||||
if ( ! m_pGeomDB->SetName( nId, sNewName)) {
|
||||
string sOut = "AddMachining error : " + sNewName + " invalid name " ;
|
||||
LOG_INFO( GetEMkLogger(), sOut.c_str())
|
||||
m_pGeomDB->Erase( nId) ;
|
||||
return GDB_ID_NULL ;
|
||||
}
|
||||
// installo il gestore della lavorazione
|
||||
Machining* pMch = CreateMachining( nMchType) ;
|
||||
m_pGeomDB->SetUserObj( nId, pMch) ;
|
||||
@@ -693,7 +700,12 @@ MachMgr::AddMachining( const string& sName, int nMchType, const string& sTool)
|
||||
if ( nId == GDB_ID_NULL)
|
||||
return GDB_ID_NULL ;
|
||||
// assegno il nome
|
||||
m_pGeomDB->SetName( nId, sNewName) ;
|
||||
if ( ! m_pGeomDB->SetName( nId, sNewName)) {
|
||||
string sOut = "AddMachining error : " + sNewName + " invalid name " ;
|
||||
LOG_INFO( GetEMkLogger(), sOut.c_str())
|
||||
m_pGeomDB->Erase( nId) ;
|
||||
return GDB_ID_NULL ;
|
||||
}
|
||||
// installo il gestore della lavorazione
|
||||
Machining* pMch = CreateMachining( nMchType) ;
|
||||
m_pGeomDB->SetUserObj( nId, pMch) ;
|
||||
|
||||
Reference in New Issue
Block a user