EgtExecutor 1.8g4 :

- migliorata gestione errori lavorazioni
- se manca texture si segnala in log e si continua senza errori.
This commit is contained in:
Dario Sassi
2017-07-21 12:59:06 +00:00
parent 2cd3a34901
commit 376552abc8
3 changed files with 35 additions and 10 deletions
+8 -3
View File
@@ -2330,7 +2330,7 @@ ExeApplyAllMachinings( bool bStopOnFirstErr, string& sErrList)
if ( ! pMachMgr->DispositionSpecialApply( nOperId, true)) {
bOk = false ;
if ( pMachMgr->GetLastErrorId() != 0)
sErrList += pMachMgr->GetLastErrorString() + "\r\n" ;
sErrList += pMachMgr->GetOperationName( nOperId) + " -> " + pMachMgr->GetLastErrorString() + "\r\n" ;
if ( bStopOnFirstErr)
break ;
}
@@ -2339,8 +2339,13 @@ ExeApplyAllMachinings( bool bStopOnFirstErr, string& sErrList)
pMachMgr->SetCurrMachining( nOperId) ;
if ( ! pMachMgr->MachiningApply( true)) {
bOk = false ;
if ( pMachMgr->GetLastErrorId() != 0)
sErrList += pMachMgr->GetLastErrorString() + "\r\n" ;
if ( pMachMgr->GetLastErrorId() != 0) {
sErrList += pMachMgr->GetOperationName( nOperId) + " -> " + pMachMgr->GetLastErrorString() ;
string sInfo = pMachMgr->GetOutstrokeInfo( ExeUiUnitsAreMM()) ;
if ( ! sInfo.empty())
sErrList += sInfo ;
sErrList += "\r\n" ;
}
if ( bStopOnFirstErr)
break ;
}
BIN
View File
Binary file not shown.
+27 -7
View File
@@ -15,6 +15,7 @@
#include "stdafx.h"
#include "PhotoObj.h"
#include "GseContext.h"
#include "EXE.h"
#include "/EgtDev/Include/EXeExecutor.h"
#include "/EgtDev/Include/EXeConst.h"
#include "/EgtDev/Include/EGrScene.h"
@@ -23,7 +24,7 @@
#include "/EgtDev/Include/EGkStringUtils3d.h"
#include "/EgtDev/Include/EGnStringKeyVal.h"
#include "/EgtDev/Include/EGnFileUtils.h"
// per far dimenticare macro di WinUser.h
#undef GetClassName
using namespace std ;
@@ -151,11 +152,26 @@ PhotoObj::Load( const STRVECTOR& vString, int nBaseGdbId)
// sostituzione dell'eventuale riferimento al nome del progetto nella path
ReplaceString( m_sPath, SUB_PROJECT_TITLE, sFileTitle) ;
// carico la texture dalla path indicata
if ( ExistsFile( m_sPath))
return ExeLoadTexture( m_sName, m_sPath, 0, m_dDimX, m_dDimY, TXR_CLAMP) ;
if ( ExistsFile( m_sPath)) {
if ( ! ExeLoadTexture( m_sName, m_sPath, 0, m_dDimX, m_dDimY, TXR_CLAMP)) {
string sOut = "Error loading image " + m_sPath ;
LOG_ERROR( GetLogger(), sOut.c_str())
}
return true ;
}
// provo dalla path del progetto corrente
string sName = GetFileName( m_sPath) ;
return ExeLoadTexture( m_sName, sFileDir + "\\" + sName, 0, m_dDimX, m_dDimY, TXR_CLAMP) ;
string sOtherPath = sFileDir + "\\" + GetFileName( m_sPath) ;
if ( ExistsFile( sOtherPath)) {
if ( ! ExeLoadTexture( m_sName, sOtherPath, 0, m_dDimX, m_dDimY, TXR_CLAMP)) {
string sOut = "Error loading image " + sOtherPath ;
LOG_ERROR( GetLogger(), sOut.c_str())
}
}
else {
string sOut = "Error missing image " + sOtherPath ;
LOG_ERROR( GetLogger(), sOut.c_str())
}
return true ;
}
// altrimenti ne verifico solo l'esistenza
else {
@@ -172,8 +188,12 @@ PhotoObj::Load( const STRVECTOR& vString, int nBaseGdbId)
if ( ExistsFile( m_sPath))
return true ;
// provo dalla path del progetto corrente
string sName = GetFileName( m_sPath) ;
return ExistsFile( sFileDir + "\\" + sName) ;
string sOtherPath = sFileDir + "\\" + GetFileName( m_sPath) ;
if ( ! ExistsFile( sOtherPath)) {
string sOut = "Error missing image " + sOtherPath ;
LOG_ERROR( GetLogger(), sOut.c_str())
}
return true ;
}
}