EgtGeomKernel 1.5c7 :
- migliorata gestione materiale (colore ora caso speciale) - si invalida rappresentazione grafica alla modifica del materiale - spostato comando COUNTER di TSC in EgtGeneral.
This commit is contained in:
+19
-30
@@ -70,10 +70,6 @@ GdbExecutor::SetCmdParser( ICmdParser* pParser)
|
||||
if ( m_pOtherExec != nullptr)
|
||||
m_pOtherExec->SetCmdParser( m_pParser) ;
|
||||
|
||||
// imposto variabili predefinite
|
||||
m_pParser->AddVariable( "$ROOT", GDB_ID_ROOT) ;
|
||||
m_pParser->AddVariable( "$NN", ID_NO) ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
@@ -94,6 +90,20 @@ GdbExecutor::SetGeomDB( IGeomDB* pGdb)
|
||||
return ( m_pGDB != nullptr) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbExecutor::AddStandardVariables( void)
|
||||
{
|
||||
// imposto variabili predefinite
|
||||
m_pParser->AddVariable( "$ROOT", GDB_ID_ROOT) ;
|
||||
m_pParser->AddVariable( "$NN", ID_NO) ;
|
||||
// se c'è esecutore dipendente
|
||||
if ( m_pOtherExec != nullptr)
|
||||
return m_pOtherExec->AddStandardVariables() ;
|
||||
else
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbExecutor::Execute( const string& sCmd1, const string& sCmd2, const STRVECTOR& vsParams)
|
||||
@@ -134,8 +144,8 @@ GdbExecutor::Execute( const string& sCmd1, const string& sCmd2, const STRVECTOR&
|
||||
return ExecuteMode( sCmd2, vsParams) ;
|
||||
else if ( sCmd1 == "STA" || sCmd1 == "STATUS")
|
||||
return ExecuteStatus( sCmd2, vsParams) ;
|
||||
else if ( sCmd1 == "COL" || sCmd1 == "COLOR")
|
||||
return ExecuteColor( sCmd2, vsParams) ;
|
||||
else if ( sCmd1 == "MAT" || sCmd1 == "MATERIAL")
|
||||
return ExecuteMaterial( sCmd2, vsParams) ;
|
||||
else if ( sCmd1 == "NAM" || sCmd1 == "NAME")
|
||||
return ExecuteName( sCmd2, vsParams) ;
|
||||
else if ( sCmd1 == "INF" || sCmd1 == "INFO")
|
||||
@@ -164,8 +174,6 @@ GdbExecutor::Execute( const string& sCmd1, const string& sCmd2, const STRVECTOR&
|
||||
return ExecuteSave( vsParams) ;
|
||||
else if ( sCmd1 == "OUTSCL")
|
||||
return ExecuteOutScl( sCmd2, vsParams) ;
|
||||
else if ( sCmd1 == "COUNTER")
|
||||
return ExecuteCounter( sCmd2, vsParams) ;
|
||||
else if ( m_pOtherExec != nullptr)
|
||||
return m_pOtherExec->Execute( sCmd1, sCmd2, vsParams) ;
|
||||
|
||||
@@ -1023,7 +1031,7 @@ GdbExecutor::ExecuteStatus( const string& sCmd2, const STRVECTOR& vsParams)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbExecutor::ExecuteColor( const string& sCmd2, const STRVECTOR& vsParams)
|
||||
GdbExecutor::ExecuteMaterial( const string& sCmd2, const STRVECTOR& vsParams)
|
||||
{
|
||||
// assegnazione colore di oggetto
|
||||
if ( sCmd2.empty()) {
|
||||
@@ -1041,7 +1049,7 @@ GdbExecutor::ExecuteColor( const string& sCmd2, const STRVECTOR& vsParams)
|
||||
// esecuzione impostazione colore
|
||||
STRVECTOR::iterator Iter ;
|
||||
for ( Iter = vsNames.begin() ; Iter != vsNames.end() ; ++Iter) {
|
||||
if ( ! m_pGDB->SetColor( GetIdParam( *Iter), cCol))
|
||||
if ( ! m_pGDB->SetMaterial( GetIdParam( *Iter), cCol))
|
||||
return false ;
|
||||
}
|
||||
return true ;
|
||||
@@ -1056,7 +1064,7 @@ GdbExecutor::ExecuteColor( const string& sCmd2, const STRVECTOR& vsParams)
|
||||
if ( ! GetColorParam( vsParams[0], cCol))
|
||||
return false ;
|
||||
// imposto il colore di default
|
||||
return m_pGDB->SetDefaultColor( cCol) ;
|
||||
return m_pGDB->SetDefaultMaterial( cCol) ;
|
||||
}
|
||||
|
||||
return false ;
|
||||
@@ -1615,22 +1623,3 @@ GdbExecutor::OutGroupScl( int nId, int nFlag)
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GdbExecutor::ExecuteCounter( const string& sCmd2, const STRVECTOR& vsParams)
|
||||
{
|
||||
// avvio il counter
|
||||
if ( sCmd2 == "START") {
|
||||
m_Counter.Start() ;
|
||||
}
|
||||
// fermo il counter ed emetto i risultati
|
||||
else if ( sCmd2 == "STOP") {
|
||||
m_Counter.Stop() ;
|
||||
string sOut = " " + ( ( vsParams.size() >= 1) ? vsParams[0] : "ExecTime =") ;
|
||||
sOut += " " + ToString( m_Counter.GetTime(), 2) + " ms" ;
|
||||
LOG_INFO( GetEGkLogger(), sOut.c_str())
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
Reference in New Issue
Block a user